Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-02-11 00:25:52 +0300
committerGitHub <noreply@github.com>2022-02-11 00:25:52 +0300
commitf82326bcad877763b0151df6ccb23a9deaf34494 (patch)
tree2ef18d0c6c92eff81502798b3365ee110df0b7e8 /plugins/CoreHome
parenta36b45a3764cd28303d2ce27c600c7d6f5a5ed20 (diff)
[Vue] migrate user edit form directive to Vue component (#18576)
* force a digest after a location change * use proper abortcontroller method instead of promise hack, have to add new polyfill + try to fix random test failure * some UI test fixes * fix some report export issues * several save button fixes + make replace approximation in createAngularJsAdapter better * fix sparkline * apply after manual click triggering in savebutton * css fixes and piwik-content-table was never applied by angularjs in installtion * rebuild vue * add names to divs so they can still be queried as they were in angularjs * rebuild vue * rebuild vue * now that format_metrics checkbox works, need to check it * small delay before processing first popover * fix dropdown class/directive name * fix overlay test * remove unintended changes * remove unintended changes * migrate archiving controller * do not do a passthrough transpile of vue typescript, and fix many typescript errors in existing code * more typescript fixes * even more fixes * workarounds to fix recursive typing issues * get corehome to build w/ full typescript build and output type definitions to local dir * get outputted typings to be used when compiling other plugins and fix typescript issues in CorePluginsAdmin * readd corehome umd * fix typescript errors in ExampleVue plugin * fix feedback typescript errors * rebuild * migrate branding controller and get to build * fix issues and get to work * rebuild * fix notification scroll * migrate smtp settings controller in coreadminhome * get to work * migrate js tracking code generator and get to build * migrate image tracking code generator and get to build * get to work in UI * get UI tests to pass locally * forgot to add files + rebuild vue * update screenshots * Show a summary of new features (#18065) * Added "What is new" notification display, populated by a new event * Removed test example event hook * Added support for applying a link attribute to menu items, fixes layout issue for mobile with html menu items * Updated UI test screenshots * Revert accidental edit * Hide the "What's new" icon if there are no new features to show * Changed to use changes.json, track user last viewed, added ui test * Fix UserManager unit tests broken by new ts_changes_viewed user field * Moved getChanges to separate helper class, added unit test, added user view access check * Updated to add new changes table and populate only on plugin update/install * Added missing fixture class, updated UI screenshots * Updated matomo font to add ringing bell and new releases icons * Fix for integration test * Reworked class structure, removed unnecessary angular directive, merged templates, other tidy ups * built vue files * built vue files * Added null user check, missing table exception handling, show plugin name in change title, better handling of missing change fields * Added sample changes file, moved UserChanges db code to changes model, added return type hints, better db error code handling, various other improvements * Revert accidental UI screenshot commit * Fix for incorrect link name parameter in sample changes, switched back to using $db->query for INSERT IGNORE * Integration test fix, UI screenshot updates * Test fix * Added link styling, show CoreHome changes without plugin prefix in title * Update UI test screenshot * Added styles to the popover, added event for filtering changes * Test fix * UI test screenshot updates Co-authored-by: sgiehl <stefan@matomo.org> Co-authored-by: bx80 <bx80@users.noreply.github.com> * Update test translation (#18531) update a test failed XML * updates all submodules (#18541) Co-authored-by: diosmosis <diosmosis@users.noreply.github.com> * Translations update from Hosted Weblate (#18529) * Translated using Weblate (Greek) Currently translated at 100.0% (162 of 162 strings) Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/el/ [ci skip] Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Vasilis Lourdas <dev@lourdas.eu> * Translated using Weblate (Chinese (Simplified)) Currently translated at 83.9% (136 of 162 strings) Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/zh_Hans/ [ci skip] Translated using Weblate (Chinese (Simplified)) Currently translated at 99.6% (620 of 622 strings) Translation: Matomo/Matomo Base Translate-URL: https://hosted.weblate.org/projects/matomo/matomo-base/zh_Hans/ [ci skip] Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: 刘韬 <lyuutau@outlook.com> * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/ [ci skip] Co-authored-by: Vasilis Lourdas <dev@lourdas.eu> Co-authored-by: 刘韬 <lyuutau@outlook.com> * [Vue] migrate report export directive and popover (#18440) * update files * sidenav start * make getRef a utility method * tweak * add return type * finish converting side-nav directive * starting on reporting menu conversion * remove unused properties * convert reporting pages service * migrate report metadata store * remove angularjs files * migrating reporting pages store * make store adapters more immutable * get service adapters to work * fix a UI test * another html fix * migrate most of reporting menu directive and model * Use themed font family for input forms to override materialize.css styling * rebuild vue * add a missing div * ui test fixes * update styling * get to build * get to load in the UI w/o error * clone result of functions * fix compile issue * migrate widget loader and get to load in UI * rebuild vue * migrate widgetcontainer * migrate widget bydimension container * migrate widget + add tooltips directive * quick fix * Updating version to 4.6.0 * loading in page * update expected screenshot * add wait just in case travis is slow * fix ordering bug * add another wait * rebuild vue * css tweak * fix some bugs and tests * undo screenshot changes * Menus test passing locally * [Vue] date picker viewDate property is not kept up to date (#18385) * viewDate ref is not kept up to date * rebuild corehome * reporting menu subcategory items are meant to be normal links * update some screenshots * use innerText instead of text() since angularjs maintains newlines in HTML that vue does not add * trigger angularjs digest after ajaxhelper request * rebuild vue * update screenshots, fix bug in link generation in reporting menu and allow syncing multiple screenshot regexes at a time * undo box-shadow change for UI tests * fix more issues & update more tests * update some screenshots * fix some tests * rebuild CoreHome * quick fix * built vue files * fix angularjs issue * add comment * update umd files * 4.6.1-rc1 * 4.6.1 * fix field array title * apply some pr feedback * apply more pr feedback * another fix * tweak * fix ng-change not executed before ng-model * fix another set of issues * fix another issue * rebuild vue * better ng-change/ng-model fix * update some screenshots * rebuild vue * remove some TODOs * initiate initial ng-change ONLY for site selectors where this behavior applies * emit/broadcast on correct scope in wrapper * rebuild vue * fix some issues * couple more fixes * fix another title issue * rebuild vue * do not report on ajax errors in notifications if not logged in * migrate reporting page and model * rebuild vue * create sites selector model adapter * fix siteselector vue bug, initial site is only set if there is just one site available * rebuild vue * migrate plugin settings directive * remove TODO * migrate plugin filter directive * migrate two more plugins directives * migrate save button * fix a bunch of bugs * fix another widget bug * allow change event name between angularjs and vue * rebuild vue * migrate plugin form directive * get to work * migrate select-on-focus directive and start migrating report-export directive * finish migrating report export directive & popover component + create reusable function to create vue app and add globals to it * rebuild vue * remove angularjs files and move less contents to vue dir * built vue files * fix function signature * fix vue warning * fix ajax request race condition * rebuild vue * add new notification type "help" so the help notification is not cleared when clearing transient notifications * fix some bugs and tests * update screenshot * update screenshot & fix a test * allow using unminified jquery ui + fix bug in last fix * fix error when enrichedheadline is used in modal * add polyfill min.js * remove two todos * fix widget url logic * update some screenshots and fix sanitization/escape issue * update screenshots * rebuild vue * fix url location updating regression in MatomoUrl.updateLocation use * submodule * update screenshots and fix possible error in json parse * built vue files * Merge branch 'vue-period-selector-regression' into vue-reporting-menu * rebuild vue * use correct variable * rebuild vue * fix widget url logic * segment parameter can be undefined now for some reason * fix ngmodel binding in siteselector adapter (for last time hopefully) * the original site selector only set the first site to the first site in the initial sites query if there was only one site in the entire matomo instance * fix sitesmanager ui test failure * fix usersettings test failure * rebuild vue * more siteselector tweaks. * build CoreHome * more siteselector tweaks. * another siteselector issue * update screenshots * update screenshot and try to fix random failure * fix some issues in widget.vue when containerid is specified * fix couple tests * fix several test failures * fix string concat * fix test failure * extra change * fix last change and random failure * styling fix * fix last fix * real fix this time * fix stray request * proper fix * update build files * try to fix random failure * do not submit form * check for api errors in promise chain in ajaxhelper.ts * force a digest after a location change * use proper abortcontroller method instead of promise hack, have to add new polyfill + try to fix random test failure * some UI test fixes * fix some report export issues * several save button fixes + make replace approximation in createAngularJsAdapter better * apply after manual click triggering in savebutton * add names to divs so they can still be queried as they were in angularjs * rebuild vue * now that format_metrics checkbox works, need to check it * fix unintended changes * updated expected screenshots * update two more * go back to previous format_metrics behavior in popover Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com> * [Vue] remove support in vue for FormField.allSettings (#18542) * deprecate support in vue for FormField.allSettings since deep watching the property doesnt quite work * built vue files * update screenshots * update screenshot * Show a summary of new features (#18065) * Added "What is new" notification display, populated by a new event * Removed test example event hook * Added support for applying a link attribute to menu items, fixes layout issue for mobile with html menu items * Updated UI test screenshots * Revert accidental edit * Hide the "What's new" icon if there are no new features to show * Changed to use changes.json, track user last viewed, added ui test * Fix UserManager unit tests broken by new ts_changes_viewed user field * Moved getChanges to separate helper class, added unit test, added user view access check * Updated to add new changes table and populate only on plugin update/install * Added missing fixture class, updated UI screenshots * Updated matomo font to add ringing bell and new releases icons * Fix for integration test * Reworked class structure, removed unnecessary angular directive, merged templates, other tidy ups * built vue files * built vue files * Added null user check, missing table exception handling, show plugin name in change title, better handling of missing change fields * Added sample changes file, moved UserChanges db code to changes model, added return type hints, better db error code handling, various other improvements * Revert accidental UI screenshot commit * Fix for incorrect link name parameter in sample changes, switched back to using $db->query for INSERT IGNORE * Integration test fix, UI screenshot updates * Test fix * Added link styling, show CoreHome changes without plugin prefix in title * Update UI test screenshot * Added styles to the popover, added event for filtering changes * Test fix * UI test screenshot updates Co-authored-by: sgiehl <stefan@matomo.org> Co-authored-by: bx80 <bx80@users.noreply.github.com> * Update test translation (#18531) update a test failed XML * updates all submodules (#18541) Co-authored-by: diosmosis <diosmosis@users.noreply.github.com> * Translations update from Hosted Weblate (#18529) * Translated using Weblate (Greek) Currently translated at 100.0% (162 of 162 strings) Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/el/ [ci skip] Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Vasilis Lourdas <dev@lourdas.eu> * Translated using Weblate (Chinese (Simplified)) Currently translated at 83.9% (136 of 162 strings) Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/zh_Hans/ [ci skip] Translated using Weblate (Chinese (Simplified)) Currently translated at 99.6% (620 of 622 strings) Translation: Matomo/Matomo Base Translate-URL: https://hosted.weblate.org/projects/matomo/matomo-base/zh_Hans/ [ci skip] Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: 刘韬 <lyuutau@outlook.com> * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin CoreAdminHome Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-coreadminhome/ [ci skip] Co-authored-by: Vasilis Lourdas <dev@lourdas.eu> Co-authored-by: 刘韬 <lyuutau@outlook.com> * [Vue] migrate report export directive and popover (#18440) * update files * sidenav start * make getRef a utility method * tweak * add return type * finish converting side-nav directive * starting on reporting menu conversion * remove unused properties * convert reporting pages service * migrate report metadata store * remove angularjs files * migrating reporting pages store * make store adapters more immutable * get service adapters to work * fix a UI test * another html fix * migrate most of reporting menu directive and model * Use themed font family for input forms to override materialize.css styling * rebuild vue * add a missing div * ui test fixes * update styling * get to build * get to load in the UI w/o error * clone result of functions * fix compile issue * migrate widget loader and get to load in UI * rebuild vue * migrate widgetcontainer * migrate widget bydimension container * migrate widget + add tooltips directive * quick fix * Updating version to 4.6.0 * loading in page * update expected screenshot * add wait just in case travis is slow * fix ordering bug * add another wait * rebuild vue * css tweak * fix some bugs and tests * undo screenshot changes * Menus test passing locally * [Vue] date picker viewDate property is not kept up to date (#18385) * viewDate ref is not kept up to date * rebuild corehome * reporting menu subcategory items are meant to be normal links * update some screenshots * use innerText instead of text() since angularjs maintains newlines in HTML that vue does not add * trigger angularjs digest after ajaxhelper request * rebuild vue * update screenshots, fix bug in link generation in reporting menu and allow syncing multiple screenshot regexes at a time * undo box-shadow change for UI tests * fix more issues & update more tests * update some screenshots * fix some tests * rebuild CoreHome * quick fix * built vue files * fix angularjs issue * add comment * update umd files * 4.6.1-rc1 * 4.6.1 * fix field array title * apply some pr feedback * apply more pr feedback * another fix * tweak * fix ng-change not executed before ng-model * fix another set of issues * fix another issue * rebuild vue * better ng-change/ng-model fix * update some screenshots * rebuild vue * remove some TODOs * initiate initial ng-change ONLY for site selectors where this behavior applies * emit/broadcast on correct scope in wrapper * rebuild vue * fix some issues * couple more fixes * fix another title issue * rebuild vue * do not report on ajax errors in notifications if not logged in * migrate reporting page and model * rebuild vue * create sites selector model adapter * fix siteselector vue bug, initial site is only set if there is just one site available * rebuild vue * migrate plugin settings directive * remove TODO * migrate plugin filter directive * migrate two more plugins directives * migrate save button * fix a bunch of bugs * fix another widget bug * allow change event name between angularjs and vue * rebuild vue * migrate plugin form directive * get to work * migrate select-on-focus directive and start migrating report-export directive * finish migrating report export directive & popover component + create reusable function to create vue app and add globals to it * rebuild vue * remove angularjs files and move less contents to vue dir * built vue files * fix function signature * fix vue warning * fix ajax request race condition * rebuild vue * add new notification type "help" so the help notification is not cleared when clearing transient notifications * fix some bugs and tests * update screenshot * update screenshot & fix a test * allow using unminified jquery ui + fix bug in last fix * fix error when enrichedheadline is used in modal * add polyfill min.js * remove two todos * fix widget url logic * update some screenshots and fix sanitization/escape issue * update screenshots * rebuild vue * fix url location updating regression in MatomoUrl.updateLocation use * submodule * update screenshots and fix possible error in json parse * built vue files * Merge branch 'vue-period-selector-regression' into vue-reporting-menu * rebuild vue * use correct variable * rebuild vue * fix widget url logic * segment parameter can be undefined now for some reason * fix ngmodel binding in siteselector adapter (for last time hopefully) * the original site selector only set the first site to the first site in the initial sites query if there was only one site in the entire matomo instance * fix sitesmanager ui test failure * fix usersettings test failure * rebuild vue * more siteselector tweaks. * build CoreHome * more siteselector tweaks. * another siteselector issue * update screenshots * update screenshot and try to fix random failure * fix some issues in widget.vue when containerid is specified * fix couple tests * fix several test failures * fix string concat * fix test failure * extra change * fix last change and random failure * styling fix * fix last fix * real fix this time * fix stray request * proper fix * update build files * try to fix random failure * do not submit form * check for api errors in promise chain in ajaxhelper.ts * force a digest after a location change * use proper abortcontroller method instead of promise hack, have to add new polyfill + try to fix random test failure * some UI test fixes * fix some report export issues * several save button fixes + make replace approximation in createAngularJsAdapter better * apply after manual click triggering in savebutton * add names to divs so they can still be queried as they were in angularjs * rebuild vue * now that format_metrics checkbox works, need to check it * fix unintended changes * updated expected screenshots * update two more * go back to previous format_metrics behavior in popover Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com> * [Vue] remove support in vue for FormField.allSettings (#18542) * deprecate support in vue for FormField.allSettings since deep watching the property doesnt quite work * built vue files * update screenshots * update screenshot * fix tests * rebuild * rebuild * order plugins by dependencies in vue:build and fix warning in corehome build * built vue files * built vue files * remove unused imports * built vue files * remove multilinefield component, fieldtextareaarray does the same thing * edit-trigger is not used anywhere * migrate sitetypes model to store * do not load nonexistant files * remove reference nonexistant files * start converting sitefields component * more work on sitefields component * undo submodule change * rebuild * get sitesmanager to build * get SiteFields component to work in UI * datepicker does not format times * export other stores * fix some typing issues and rebuild * start on site management conversion * add more comma delimited props to list + remove controller JS * rebuild * convert sites manager controller to sitesmanagement component * remove TODOs * finish migrating sitesmanager * remove some TODO * get to build * fixes from testing * rebuild * rebuild and fix issue w/ globalsettings hash detection * migrate capabilities-edit component. * some fixes and get to build * get to work * built vue files * get to work and rebuild * migrate user edit form component * some fixes * fixes * another fix * more fixes * update file * more fixes * fix ref * rebuild vue * couple more fixes * fix bug and rebuild * fix bug and rebuild * fix issue * fix issues and rebuild * fix ui test * fix UI test failure * fixing some issues * complete fixes * fix some more issues * fix ui test failures * another fix * several more fixes * fix delete dialog * more fixes * fix styling issue * more fixes * fix another ui test + update other UI tests * fixing edisiteid handling * update screenshots * fix UI tests somre more * fix random failure * fixes * reference css class not attribute (since that is what is added in vue) * fixing more ui tests * try to fix vue css class in directive issue * tweak * in groupedsetting handle templateFile property for angularjs BC * rebuild vue * fix view tracking code link * fixing UI tests * fix selector in test for this branch only * Update screenshot. * update screenshot * update screenshots * style fix * fix selectors and update screenshot * built vue files * Update screenshot + fix title and spacing. * fix password changing * fixing tests * fix styling * built vue files * more styling fixes * disable inputs while confirm user password modal is displayed for autofill browser features/extensions * update screenshots * fix test Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> Co-authored-by: sgiehl <stefan@matomo.org> Co-authored-by: bx80 <bx80@users.noreply.github.com> Co-authored-by: Peter Zhang <peter@innocraft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Vasilis Lourdas <dev@lourdas.eu> Co-authored-by: 刘韬 <lyuutau@outlook.com> Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.js4
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.min.js2
-rw-r--r--plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js
index 240359edbd..ea95eaca7c 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js
@@ -2055,8 +2055,8 @@ var AjaxHelper_AjaxHelper = /*#__PURE__*/function () {
}, {
key: "post",
- value: function post(params, // eslint-disable-next-line
- postParams) {
+ value: function post(params) {
+ var postParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return this.fetch(params, Object.assign(Object.assign({}, options), {}, {
postParams: postParams
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
index 2ee8996aef..c2baf310b9 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
@@ -99,7 +99,7 @@ function De(){return S}function Pe(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){f
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function qe(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}we.updatePeriodParamsFromUrl=Se.updatePeriodParamsFromUrl.bind(Se),window.angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",De),Pe.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Pe),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var We=function(e){Ie(n,e);var t=Be(n);function n(){return xe(this,n),t.apply(this,arguments)}return n}(Fe(Error)),Je=function(){function e(){xe(this,e),Ae(this,"format","json"),Ae(this,"timeout",null),Ae(this,"callback",null),Ae(this,"useRegularCallbackInCaseOfError",!1),Ae(this,"errorCallback",void 0),Ae(this,"withToken",!1),Ae(this,"completeCallback",void 0),Ae(this,"getParams",{}),Ae(this,"getUrl","?"),Ae(this,"postParams",{}),Ae(this,"loadingElement",null),Ae(this,"errorElement","#ajaxError"),Ae(this,"headers",void 0),Ae(this,"requestHandle",null),Ae(this,"abortController",null),Ae(this,"defaultParams",["idSite","period","date","segment"]),Ae(this,"resolveWithHelper",!1),this.errorCallback=qe}return Te(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ce.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),r.setFormat(n.format||"json"),r.addParams(Object.assign({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new We(n.message);return t}))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Object.assign(Object.assign({},n),{},{postParams:t}))}}]),e}();function Ge(){return window.globalAjaxQueue}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t,n){return t&&Ye(e.prototype,t),n&&Ye(e,n),e}
+ */function qe(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}we.updatePeriodParamsFromUrl=Se.updatePeriodParamsFromUrl.bind(Se),window.angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",De),Pe.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Pe),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var We=function(e){Ie(n,e);var t=Be(n);function n(){return xe(this,n),t.apply(this,arguments)}return n}(Fe(Error)),Je=function(){function e(){xe(this,e),Ae(this,"format","json"),Ae(this,"timeout",null),Ae(this,"callback",null),Ae(this,"useRegularCallbackInCaseOfError",!1),Ae(this,"errorCallback",void 0),Ae(this,"withToken",!1),Ae(this,"completeCallback",void 0),Ae(this,"getParams",{}),Ae(this,"getUrl","?"),Ae(this,"postParams",{}),Ae(this,"loadingElement",null),Ae(this,"errorElement","#ajaxError"),Ae(this,"headers",void 0),Ae(this,"requestHandle",null),Ae(this,"abortController",null),Ae(this,"defaultParams",["idSite","period","date","segment"]),Ae(this,"resolveWithHelper",!1),this.errorCallback=qe}return Te(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ce.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),r.setFormat(n.format||"json"),r.addParams(Object.assign({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new We(n.message);return t}))}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Object.assign(Object.assign({},n),{},{postParams:t}))}}]),e}();function Ge(){return window.globalAjaxQueue}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t,n){return t&&Ye(e.prototype,t),n&&Ye(e,n),e}
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
index fee659fc9b..725d53574e 100644
--- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
+++ b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
@@ -228,7 +228,7 @@ export default class AjaxHelper<T = any> { // eslint-disable-line
static post<R = any>(
params: QueryParameters,
// eslint-disable-next-line
- postParams: any,
+ postParams: any = {},
options: AjaxOptions = {},
): Promise<R> {
return this.fetch<R>(params, { ...options, postParams });