diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-04-12 15:31:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 15:31:32 +0300 |
commit | 7144bfdf7993b15dacda016fcfce5d29f1e1c7db (patch) | |
tree | 8083d2d37850d885c5f52702bb70d827207f8d9e /plugins | |
parent | c51f8f21ac3b46fed57081908d6cfebfe6e22e27 (diff) |
[Vue] changes for AnonymousPiwikUsageMeasurement (#19079)
* adding events for use with AnonymousPiwikUsageMeasurement (so angularjs does not have to be used)
* adding more events and changes required for AnonymousPiwikUsageMeasurement
* undo submodule change
* bump version to beta for plugin tests
* built vue files
* revert submodule change
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins')
13 files changed, 186 insertions, 115 deletions
diff --git a/plugins/Dashboard/javascripts/dashboard.js b/plugins/Dashboard/javascripts/dashboard.js index cd7c62d5f6..e4157c2465 100644 --- a/plugins/Dashboard/javascripts/dashboard.js +++ b/plugins/Dashboard/javascripts/dashboard.js @@ -169,6 +169,8 @@ function copyDashboardToUser() { var DashboardSettingsControlBase = function (element) { UIControl.call(this, element); + window.CoreHome.Matomo.postEvent('Dashboard.DashboardSettings.mounted', $(element)[0]); + // on menu item click, trigger action event on this var self = this; this.$element.on('click', 'ul.submenu li[data-action]', function (e) { @@ -222,6 +224,8 @@ function copyDashboardToUser() { $.extend(DashboardSettingsControlBase.prototype, UIControl.prototype, { _destroy: function () { + window.CoreHome.Matomo.postEvent('Dashboard.DashboardSettings.unmounted', this.$element[0]); + UIControl.prototype._destroy.call(this); $('body').off('mouseup', null, this.onBodyMouseUp); diff --git a/plugins/Dashboard/javascripts/dashboardObject.js b/plugins/Dashboard/javascripts/dashboardObject.js index 1308d1a7a3..de9455c372 100644 --- a/plugins/Dashboard/javascripts/dashboardObject.js +++ b/plugins/Dashboard/javascripts/dashboardObject.js @@ -4,6 +4,7 @@ * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ + (function ($) { var layoutColumnSelector = '#dashboardWidgetsArea > .col'; @@ -61,6 +62,8 @@ generateLayout(options.layout); } + window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.mounted', { element: this }); + return this; }, @@ -70,6 +73,10 @@ * @return void */ destroy: function () { + if (dashboardElement && dashboardElement.length) { + window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.unmounted', {element: dashboardElement[0]}); + } + $(dashboardElement).remove(); dashboardElement = null; destroyWidgets(); diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.js b/plugins/Marketplace/vue/dist/Marketplace.umd.js index b311896acf..eacf24ffa5 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.js @@ -193,7 +193,8 @@ var _window = window, } binding.value.onClickHandler = onClickPluginNameLink.bind(null, binding); - $(element).on('click', binding.value.onClickHandler); + $(element).on('click', binding.value.onClickHandler) // attribute added for AnonymousPiwikUsageMeasurement + .attr('matomo-plugin-name', pluginName); }, unmounted: function unmounted(element, binding) { $(element).off('click', binding.value.onClickHandler); @@ -234,7 +235,7 @@ window.angular.module('piwikApp').directive('piwikPluginName', piwikPluginName); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=210cda1c +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=0f694c50 var _hoisted_1 = { class: "row marketplaceActions", @@ -299,7 +300,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { }) })], 8, _hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512); } -// CONCATENATED MODULE: ./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=210cda1c +// CONCATENATED MODULE: ./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=0f694c50 // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); @@ -359,6 +360,16 @@ var Marketplacevue_type_script_lang_ts_window = window, searchQuery: this.query }; }, + mounted: function mounted() { + external_CoreHome_["Matomo"].postEvent('Marketplace.Marketplace.mounted', { + element: this.$refs.root + }); + }, + unmounted: function unmounted() { + external_CoreHome_["Matomo"].postEvent('Marketplace.Marketplace.unmounted', { + element: this.$refs.root + }); + }, created: function created() { function syncMaxHeight2(selector) { if (!selector) { diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js index 0d582d3964..a21ddba546 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js @@ -1,18 +1,18 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return P})),n.d(t,"LicenseKey",(function(){return Z})),n.d(t,"PluginName",(function(){return c})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}function i(e,t){var n=e.value.pluginName,l=e.value.activePluginTab;t.preventDefault(),l&&(n+="!".concat(l)),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return P})),n.d(t,"LicenseKey",(function(){return Z})),n.d(t,"PluginName",(function(){return c})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}function o(e,t){var n=e.value.pluginName,l=e.value.activePluginTab;t.preventDefault(),l&&(n+="!".concat(l)),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.broadcast.addPopoverHandler("browsePluginDetail",(function(e){var t=e,n=null;-1!==e.indexOf("!")&&(n=e.substr(e.indexOf("!")+1),t=e.substr(0,e.indexOf("!")));var l="module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(t));n&&(l+="&activeTab=".concat(encodeURIComponent(n))),window.Piwik_Popover.createPopupAndLoadUrl(l,"details")}));var o=window,r=o.$,c={mounted:function(e,t){var n=t.value.pluginName;n&&(t.value.onClickHandler=i.bind(null,t),r(e).on("click",t.value.onClickHandler))},unmounted:function(e,t){r(e).off("click",t.value.onClickHandler)}}; +window.broadcast.addPopoverHandler("browsePluginDetail",(function(e){var t=e,n=null;-1!==e.indexOf("!")&&(n=e.substr(e.indexOf("!")+1),t=e.substr(0,e.indexOf("!")));var l="module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(t));n&&(l+="&activeTab=".concat(encodeURIComponent(n))),window.Piwik_Popover.createPopupAndLoadUrl(l,"details")}));var i=window,r=i.$,c={mounted:function(e,t){var n=t.value.pluginName;n&&(t.value.onClickHandler=o.bind(null,t),r(e).on("click",t.value.onClickHandler).attr("matomo-plugin-name",n))},unmounted:function(e,t){r(e).off("click",t.value.onClickHandler)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function s(){return{restrict:"A",link:function(e,t,n){var l={instance:null,value:{pluginName:n.piwikPluginName,activePluginTab:n.activeplugintab},oldValue:null,modifiers:{},dir:{}};c.mounted(t[0],l),t.on("$destroy",(function(){c.unmounted(t[0],l)}))}}}window.angular.module("piwikApp").directive("piwikPluginName",s);var u=n("8bbf"),d={class:"row marketplaceActions",ref:"root"},p={class:"col s12 m6 l4"},m={class:"col s12 m6 l4"},b={key:0,class:"col s12 m12 l4 "},f=["action"];function g(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("Field");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",d,[Object(u["createElementVNode"])("div",p,[Object(u["createVNode"])(o,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(u["createElementVNode"])("div",m,[Object(u["createVNode"])(o,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),e.pluginsToShow.length>20||e.query?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",b,[Object(u["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(o,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(u["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,f)])):Object(u["createCommentVNode"])("",!0)],512)}var v=n("19dc"),O=n("a5a2"),y=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},h=window,j=h.$,k=Object(u["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:O["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},created:function(){function e(e){if(e){var t=j(e);if(t&&t.length){var n=void 0,l=void 0,a=void 0,i=[],o=0;t.each((function(e,t){var r=j(t),c=r.offset(),s=c.top;o!==s&&(i=[],o=s,n=void 0,l=void 0,a=void 0),i.push(r);var u=r.find("h3").height(),d=r.find(".metadata").height(),p=r.find(".footer").height();n?n<u&&(n=u):n=u,l?l<d&&(l=d):l=d,a?a<p&&(a=p):a=p,j.each(i,(function(e,t){n&&t.find("h3").height("".concat(n,"px")),l&&t.find(".metadata").height("".concat(l,"px")),a&&t.find(".footer").height("".concat(a,"px"))}))}))}}}Object(u["nextTick"])((function(){var t=j(".marketplace .plugin .description");t.dotdotdot({after:"a.more",watch:"window"}),v["Matomo"].helper.compileVueDirectives(t),e(".marketplace .plugin")}))},methods:{changePluginSort:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=y(Object(v["translate"])("General_Plugins"));return"".concat(Object(v["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});k.render=g;var P=k,V={class:"marketplace-max-width"},N={class:"marketplace-paid-intro"},S={key:0},A={key:0},U=Object(u["createElementVNode"])("br",null,null,-1),w={class:"licenseToolbar valign-wrapper"},M=["href"],L={key:0},C={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},T=Object(u["createElementVNode"])("br",null,null,-1),E=Object(u["createElementVNode"])("br",null,null,-1),K=["data-href","value"],B=["value"],_={key:1},x={key:0},I=["innerHTML"],q=Object(u["createElementVNode"])("br",null,null,-1),F={class:"licenseToolbar valign-wrapper"},D={key:1},H=["innerHTML"],$={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},R=["value"],G=["value"];function Q(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("DefaultLicenseKeyFields"),r=Object(u["resolveComponent"])("SaveButton"),c=Object(u["resolveComponent"])("ActivityIndicator");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",V,[Object(u["createElementVNode"])("div",N,[e.isValidConsumer?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",S,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",A,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),U,Object(u["createElementVNode"])("div",w,[Object(u["createVNode"])(o,{"model-value":e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"]),Object(u["createVNode"])(r,{class:"valign",id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),value:e.translate("Marketplace_RemoveLicenseKey")},null,8,["value"]),Object(u["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(u["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,M),e.showInstallAllPaidPlugins?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",L,[Object(u["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(u["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(u["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(u["createElementVNode"])("div",C,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(u["createElementVNode"])("p",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),T,E]),Object(u["createElementVNode"])("ul",null,[(Object(u["openBlock"])(!0),Object(u["createElementBlock"])(u["Fragment"],null,Object(u["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(u["openBlock"])(),Object(u["createElementBlock"])("li",{key:e},Object(u["toDisplayString"])(e),1)})),128))]),Object(u["createElementVNode"])("p",null,[Object(u["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,K),Object(u["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,B)])],512)])):Object(u["createCommentVNode"])("",!0)]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):Object(u["createCommentVNode"])("",!0)])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",_,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",x,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,I),q,Object(u["createElementVNode"])("div",F,[Object(u["createVNode"])(o,{"model-value":e.licenseKey,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[5]||(t[5]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"])]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",D,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,H)]))]))]),Object(u["createElementVNode"])("div",$,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(u["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,R),Object(u["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,G)],512)])}var z={class:"valign licenseKeyText"};function J(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("Field"),r=Object(u["resolveComponent"])("SaveButton");return Object(u["openBlock"])(),Object(u["createElementBlock"])(u["Fragment"],null,[Object(u["createElementVNode"])("div",z,[Object(u["createVNode"])(o,{uicontrol:"text",name:"license_key","full-width":!0,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),placeholder:e.licenseKeyPlaceholder},null,8,["model-value","placeholder"])]),Object(u["createVNode"])(r,{class:"valign",onConfirm:t[1]||(t[1]=function(t){return e.$emit("confirm")}),disabled:!e.enableUpdate,value:e.saveButtonText,id:"submit_license_key"},null,8,["disabled","value"])],64)}var W=Object(u["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:O["Field"],SaveButton:O["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(v["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(v["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(v["translate"])("CoreUpdater_UpdateTitle"):Object(v["translate"])("Marketplace_ActivateLicenseKey")}}});W.render=J;var Y=W,X=Object(u["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:O["SaveButton"],ActivityIndicator:v["ActivityIndicator"],DefaultLicenseKeyFields:Y},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){v["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;v["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(v["NotificationsStore"].show({message:n,context:"success",type:"transient"}),v["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;v["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(v["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(v["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},installAllPaidPluginsLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});X.render=Q;var Z=X; +function s(){return{restrict:"A",link:function(e,t,n){var l={instance:null,value:{pluginName:n.piwikPluginName,activePluginTab:n.activeplugintab},oldValue:null,modifiers:{},dir:{}};c.mounted(t[0],l),t.on("$destroy",(function(){c.unmounted(t[0],l)}))}}}window.angular.module("piwikApp").directive("piwikPluginName",s);var u=n("8bbf"),d={class:"row marketplaceActions",ref:"root"},p={class:"col s12 m6 l4"},m={class:"col s12 m6 l4"},b={key:0,class:"col s12 m12 l4 "},f=["action"];function g(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("Field");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",d,[Object(u["createElementVNode"])("div",p,[Object(u["createVNode"])(i,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(u["createElementVNode"])("div",m,[Object(u["createVNode"])(i,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),e.pluginsToShow.length>20||e.query?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",b,[Object(u["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(i,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(u["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,f)])):Object(u["createCommentVNode"])("",!0)],512)}var v=n("19dc"),O=n("a5a2"),y=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},h=window,j=h.$,k=Object(u["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:O["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},mounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},created:function(){function e(e){if(e){var t=j(e);if(t&&t.length){var n=void 0,l=void 0,a=void 0,o=[],i=0;t.each((function(e,t){var r=j(t),c=r.offset(),s=c.top;i!==s&&(o=[],i=s,n=void 0,l=void 0,a=void 0),o.push(r);var u=r.find("h3").height(),d=r.find(".metadata").height(),p=r.find(".footer").height();n?n<u&&(n=u):n=u,l?l<d&&(l=d):l=d,a?a<p&&(a=p):a=p,j.each(o,(function(e,t){n&&t.find("h3").height("".concat(n,"px")),l&&t.find(".metadata").height("".concat(l,"px")),a&&t.find(".footer").height("".concat(a,"px"))}))}))}}}Object(u["nextTick"])((function(){var t=j(".marketplace .plugin .description");t.dotdotdot({after:"a.more",watch:"window"}),v["Matomo"].helper.compileVueDirectives(t),e(".marketplace .plugin")}))},methods:{changePluginSort:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=y(Object(v["translate"])("General_Plugins"));return"".concat(Object(v["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});k.render=g;var P=k,V={class:"marketplace-max-width"},N={class:"marketplace-paid-intro"},M={key:0},S={key:0},A=Object(u["createElementVNode"])("br",null,null,-1),U={class:"licenseToolbar valign-wrapper"},w=["href"],L={key:0},E={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},C=Object(u["createElementVNode"])("br",null,null,-1),T=Object(u["createElementVNode"])("br",null,null,-1),K=["data-href","value"],B=["value"],_={key:1},x={key:0},I=["innerHTML"],q=Object(u["createElementVNode"])("br",null,null,-1),F={class:"licenseToolbar valign-wrapper"},D={key:1},H=["innerHTML"],$={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},R=["value"],G=["value"];function Q(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("DefaultLicenseKeyFields"),r=Object(u["resolveComponent"])("SaveButton"),c=Object(u["resolveComponent"])("ActivityIndicator");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",V,[Object(u["createElementVNode"])("div",N,[e.isValidConsumer?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",M,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",S,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),A,Object(u["createElementVNode"])("div",U,[Object(u["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"]),Object(u["createVNode"])(r,{class:"valign",id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),value:e.translate("Marketplace_RemoveLicenseKey")},null,8,["value"]),Object(u["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(u["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,w),e.showInstallAllPaidPlugins?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",L,[Object(u["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(u["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(u["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(u["createElementVNode"])("div",E,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(u["createElementVNode"])("p",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),C,T]),Object(u["createElementVNode"])("ul",null,[(Object(u["openBlock"])(!0),Object(u["createElementBlock"])(u["Fragment"],null,Object(u["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(u["openBlock"])(),Object(u["createElementBlock"])("li",{key:e},Object(u["toDisplayString"])(e),1)})),128))]),Object(u["createElementVNode"])("p",null,[Object(u["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,K),Object(u["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,B)])],512)])):Object(u["createCommentVNode"])("",!0)]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):Object(u["createCommentVNode"])("",!0)])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",_,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",x,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,I),q,Object(u["createElementVNode"])("div",F,[Object(u["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[5]||(t[5]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"])]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",D,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,H)]))]))]),Object(u["createElementVNode"])("div",$,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(u["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,R),Object(u["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,G)],512)])}var z={class:"valign licenseKeyText"};function J(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("Field"),r=Object(u["resolveComponent"])("SaveButton");return Object(u["openBlock"])(),Object(u["createElementBlock"])(u["Fragment"],null,[Object(u["createElementVNode"])("div",z,[Object(u["createVNode"])(i,{uicontrol:"text",name:"license_key","full-width":!0,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),placeholder:e.licenseKeyPlaceholder},null,8,["model-value","placeholder"])]),Object(u["createVNode"])(r,{class:"valign",onConfirm:t[1]||(t[1]=function(t){return e.$emit("confirm")}),disabled:!e.enableUpdate,value:e.saveButtonText,id:"submit_license_key"},null,8,["disabled","value"])],64)}var W=Object(u["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:O["Field"],SaveButton:O["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(v["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(v["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(v["translate"])("CoreUpdater_UpdateTitle"):Object(v["translate"])("Marketplace_ActivateLicenseKey")}}});W.render=J;var Y=W,X=Object(u["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:O["SaveButton"],ActivityIndicator:v["ActivityIndicator"],DefaultLicenseKeyFields:Y},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){v["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;v["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(v["NotificationsStore"].show({message:n,context:"success",type:"transient"}),v["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;v["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(v["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(v["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},installAllPaidPluginsLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});X.render=Q;var Z=X; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue index 6e8adc90dc..c8e452298b 100644 --- a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue +++ b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue @@ -113,6 +113,12 @@ export default defineComponent({ searchQuery: this.query, }; }, + mounted() { + Matomo.postEvent('Marketplace.Marketplace.mounted', { element: this.$refs.root }); + }, + unmounted() { + Matomo.postEvent('Marketplace.Marketplace.unmounted', { element: this.$refs.root }); + }, created() { function syncMaxHeight2(selector: string) { if (!selector) { diff --git a/plugins/Marketplace/vue/src/PluginName/PluginName.ts b/plugins/Marketplace/vue/src/PluginName/PluginName.ts index c12b4681ee..f3f9721af3 100644 --- a/plugins/Marketplace/vue/src/PluginName/PluginName.ts +++ b/plugins/Marketplace/vue/src/PluginName/PluginName.ts @@ -60,7 +60,9 @@ export default { } binding.value.onClickHandler = onClickPluginNameLink.bind(null, binding); - $(element).on('click', binding.value.onClickHandler!); + $(element).on('click', binding.value.onClickHandler!) + // attribute added for AnonymousPiwikUsageMeasurement + .attr('matomo-plugin-name', pluginName); }, unmounted(element: HTMLElement, binding: DirectiveBinding<PluginNameDirectiveValue>): void { $(element).off('click', binding.value.onClickHandler!); diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index abc2461684..6d36598136 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -144,94 +144,97 @@ var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=96049642 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=72fd34d8 var _hoisted_1 = { key: 0, class: "multisites-label label" }; var _hoisted_2 = ["href"]; -var _hoisted_3 = ["href", "title"]; +var _hoisted_3 = { + key: 0 +}; +var _hoisted_4 = ["href", "title"]; -var _hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-outlink" }, null, -1); -var _hoisted_5 = [_hoisted_4]; -var _hoisted_6 = { +var _hoisted_6 = [_hoisted_5]; +var _hoisted_7 = { key: 1, class: "multisites-label label" }; -var _hoisted_7 = { +var _hoisted_8 = { class: "value" }; -var _hoisted_8 = { +var _hoisted_9 = { class: "multisites-column" }; -var _hoisted_9 = { +var _hoisted_10 = { class: "value" }; -var _hoisted_10 = { +var _hoisted_11 = { class: "multisites-column" }; -var _hoisted_11 = { +var _hoisted_12 = { class: "value" }; -var _hoisted_12 = { +var _hoisted_13 = { key: 2, class: "multisites-column" }; -var _hoisted_13 = { +var _hoisted_14 = { class: "value" }; -var _hoisted_14 = ["title"]; -var _hoisted_15 = { +var _hoisted_15 = ["title"]; +var _hoisted_16 = { key: 0, class: "visits value" }; -var _hoisted_16 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/arrow_up.png", alt: "" }, null, -1); -var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var _hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_18 = { +var _hoisted_19 = { style: { "color": "green" } }; -var _hoisted_19 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/stop.png", alt: "" }, null, -1); -var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var _hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var _hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/arrow_down.png", alt: "" }, null, -1); -var _hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var _hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_23 = { +var _hoisted_24 = { style: { "color": "red" } }; -var _hoisted_24 = { +var _hoisted_25 = { key: 4, style: { "width": "180px" } }; -var _hoisted_25 = { +var _hoisted_26 = { key: 0, class: "sparkline", style: { @@ -239,29 +242,30 @@ var _hoisted_25 = { "margin": "auto" } }; -var _hoisted_26 = ["href", "title"]; -var _hoisted_27 = ["src"]; +var _hoisted_27 = ["href", "title"]; +var _hoisted_28 = ["src"]; function render(_ctx, _cache, $props, $setup, $data, $options) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ 'groupedWebsite': _ctx.website.group, 'website': !_ctx.website.group, 'group': _ctx.website.isGroup - }) + }), + ref: "root" }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { title: "View reports", class: "value truncated-text-line", href: _ctx.dashboardUrl(_ctx.website) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 9, _hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 9, _hoisted_2), _ctx.website.main_url ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.website.main_url, title: _ctx.translate('General_GoTo', _ctx.website.main_url) - }, _hoisted_5, 8, _hoisted_3)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_pageviews), 1)]), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.period !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { + }, _hoisted_6, 8, _hoisted_4)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_pageviews), 1)]), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.period !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { key: 3, class: "multisites-evolution", title: _ctx.website.tooltip - }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_16, _hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 1]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_19, _hoisted_20, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_21, _hoisted_22, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === -1]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, _hoisted_14)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSparklines ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_24, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_25, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_17, _hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_19, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 1]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_20, _hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_22, _hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === -1]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, _hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSparklines ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_25, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_26, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.dashboardUrl(_ctx.website), @@ -271,9 +275,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { width: "100", height: "25", src: _ctx.sparklineImage(_ctx.website) - }, null, 8, _hoisted_27)], 8, _hoisted_26)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, null, 8, _hoisted_28)], 8, _hoisted_27)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); } -// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=96049642 +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=72fd34d8 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=script&lang=ts @@ -293,6 +297,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { displayRevenueColumn: Boolean, metric: String }, + mounted: function mounted() { + external_CoreHome_["Matomo"].postEvent('MultiSites.MultiSitesSite.mounted', { + element: this.$refs.root + }); + }, + unmounted: function unmounted() { + external_CoreHome_["Matomo"].postEvent('MultiSites.MultiSitesSite.unmounted', { + element: this.$refs.root + }); + }, methods: { dashboardUrl: function dashboardUrl(website) { return "index.php?module=CoreHome&action=index&date=".concat(this.date, "&period=").concat(this.period) + "&idSite=".concat(website.idsite).concat(this.tokenParam); @@ -378,139 +392,142 @@ MultisitesSitevue_type_script_lang_ts.render = render }, directiveName: 'piwikMultisitesSite' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=3809d5a2 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=2f07c1b1 -var Dashboardvue_type_template_id_3809d5a2_hoisted_1 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_1 = { + ref: "root" +}; +var Dashboardvue_type_template_id_2f07c1b1_hoisted_2 = { class: "card-title" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_2 = ["innerHTML", "title"]; -var Dashboardvue_type_template_id_3809d5a2_hoisted_3 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_3 = ["innerHTML", "title"]; +var Dashboardvue_type_template_id_2f07c1b1_hoisted_4 = { id: "mt", class: "dataTable card-table", cellspacing: "0" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_4 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_5 = { class: "heading" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_5 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_6 = { class: "heading" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_6 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_7 = { class: "heading" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_7 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_8 = { class: "heading" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_8 = ["colspan"]; -var Dashboardvue_type_template_id_3809d5a2_hoisted_9 = ["value"]; -var Dashboardvue_type_template_id_3809d5a2_hoisted_10 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_9 = ["colspan"]; +var Dashboardvue_type_template_id_2f07c1b1_hoisted_10 = ["value"]; +var Dashboardvue_type_template_id_2f07c1b1_hoisted_11 = { value: "visits_evolution" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_11 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_12 = { value: "pageviews_evolution" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_12 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_13 = { key: 0, value: "revenue_evolution" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_13 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_14 = { key: 0 }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_14 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_15 = { colspan: "7", class: "allWebsitesLoading" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_15 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_16 = { key: 1 }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_16 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_17 = { key: 0 }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_17 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_18 = { colspan: "7" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_18 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_19 = { class: "notification system notification-error" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_19 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var Dashboardvue_type_template_id_2f07c1b1_hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var Dashboardvue_type_template_id_3809d5a2_hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var Dashboardvue_type_template_id_2f07c1b1_hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var Dashboardvue_type_template_id_3809d5a2_hoisted_21 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_22 = { rel: "noreferrer noopener", target: "_blank", href: "https://matomo.org/faq/troubleshooting/faq_19489/" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); +var Dashboardvue_type_template_id_2f07c1b1_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); -var Dashboardvue_type_template_id_3809d5a2_hoisted_23 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_24 = { rel: "noreferrer noopener", target: "_blank", href: "https://forum.matomo.org/" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_24 = ["href"]; +var Dashboardvue_type_template_id_2f07c1b1_hoisted_25 = ["href"]; -var Dashboardvue_type_template_id_3809d5a2_hoisted_25 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); +var Dashboardvue_type_template_id_2f07c1b1_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); -var Dashboardvue_type_template_id_3809d5a2_hoisted_26 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_27 = { colspan: "8", class: "paging" }; -var Dashboardvue_type_template_id_3809d5a2_hoisted_27 = { +var Dashboardvue_type_template_id_2f07c1b1_hoisted_28 = { class: "row" }; -var _hoisted_28 = { +var _hoisted_29 = { class: "col s3 add_new_site" }; -var _hoisted_29 = ["href"]; +var _hoisted_30 = ["href"]; -var _hoisted_30 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var _hoisted_31 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, null, -1); -var _hoisted_31 = { +var _hoisted_32 = { class: "col s6" }; -var _hoisted_32 = { +var _hoisted_33 = { style: { "cursor": "pointer" } }; -var _hoisted_33 = { +var _hoisted_34 = { class: "dataTablePages" }; -var _hoisted_34 = { +var _hoisted_35 = { id: "counter" }; -var _hoisted_35 = { +var _hoisted_36 = { style: { "cursor": "pointer" }, class: "pointer" }; -var _hoisted_36 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { +var _hoisted_37 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "col s3" }, " ", -1); -var _hoisted_37 = { +var _hoisted_38 = { row_id: "last" }; -var _hoisted_38 = { +var _hoisted_39 = { colspan: "8", class: "site_search" }; -var _hoisted_39 = { +var _hoisted_40 = { class: "row" }; -var _hoisted_40 = { +var _hoisted_41 = { class: "input-field col s12" }; -var _hoisted_41 = ["placeholder"]; -var _hoisted_42 = ["title"]; -function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_42 = ["placeholder"]; +var _hoisted_43 = ["title"]; +function Dashboardvue_type_template_id_2f07c1b1_render(_ctx, _cache, $props, $setup, $data, $options) { var _this = this; var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); @@ -519,7 +536,7 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se var _component_MultisitesSite = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MultisitesSite"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", Dashboardvue_type_template_id_3809d5a2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Dashboardvue_type_template_id_2f07c1b1_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", Dashboardvue_type_template_id_2f07c1b1_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { "help-url": "https://matomo.org/docs/manage-websites/#all-websites-dashboard", "feature-name": _ctx.translate('General_AllWebsitesDashboard') }, { @@ -528,10 +545,10 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se class: "smallTitle", innerHTML: _ctx.$sanitize(_this.smallTitleContent), title: _ctx.smallTitleTooltip - }, null, 8, Dashboardvue_type_template_id_3809d5a2_hoisted_2)]; + }, null, 8, Dashboardvue_type_template_id_2f07c1b1_hoisted_3)]; }), _: 1 - }, 8, ["feature-name"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", Dashboardvue_type_template_id_3809d5a2_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, 8, ["feature-name"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", Dashboardvue_type_template_id_2f07c1b1_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "names", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["label", { columnSorted: 'label' === _ctx.sortColumn @@ -539,7 +556,7 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.sortBy('label'); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_3809d5a2_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_2f07c1b1_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["arrow", { multisites_asc: !_ctx.reverse && 'label' === _ctx.sortColumn, multisites_desc: _ctx.reverse && 'label' === _ctx.sortColumn @@ -563,7 +580,7 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_3809d5a2_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_2f07c1b1_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "pageviews", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multisites-column", { columnSorted: 'nb_pageviews' === _ctx.sortColumn @@ -579,7 +596,7 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_3809d5a2_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)], 2), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_2f07c1b1_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)], 2), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { key: 0, id: "revenue", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multisites-column", { @@ -596,7 +613,7 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_3809d5a2_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_2f07c1b1_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "evolution", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ columnSorted: _ctx.evolutionSelector === _ctx.sortColumn @@ -627,14 +644,14 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se _ctx.sortBy(_ctx.evolutionSelector); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_3809d5a2_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_3809d5a2_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", Dashboardvue_type_template_id_3809d5a2_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 40, Dashboardvue_type_template_id_3809d5a2_hoisted_9)], 10, Dashboardvue_type_template_id_3809d5a2_hoisted_8)])]), _ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_3809d5a2_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_3809d5a2_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_2f07c1b1_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_2f07c1b1_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", Dashboardvue_type_template_id_2f07c1b1_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 40, Dashboardvue_type_template_id_2f07c1b1_hoisted_10)], 10, Dashboardvue_type_template_id_2f07c1b1_hoisted_9)])]), _ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_2f07c1b1_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_2f07c1b1_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { "loading-message": _ctx.loadingMessage, loading: _ctx.isLoading - }, null, 8, ["loading-message", "loading"])])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_3809d5a2_hoisted_15, [_ctx.errorLoadingSites ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", Dashboardvue_type_template_id_3809d5a2_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_3809d5a2_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_3809d5a2_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), Dashboardvue_type_template_id_3809d5a2_hoisted_19, Dashboardvue_type_template_id_3809d5a2_hoisted_20, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NeedMoreHelp')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", Dashboardvue_type_template_id_3809d5a2_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Faq')), 1), Dashboardvue_type_template_id_3809d5a2_hoisted_22, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", Dashboardvue_type_template_id_3809d5a2_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_CommunityHelp')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, " – ", 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ["loading-message", "loading"])])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_2f07c1b1_hoisted_16, [_ctx.errorLoadingSites ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", Dashboardvue_type_template_id_2f07c1b1_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_2f07c1b1_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_2f07c1b1_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), Dashboardvue_type_template_id_2f07c1b1_hoisted_20, Dashboardvue_type_template_id_2f07c1b1_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NeedMoreHelp')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", Dashboardvue_type_template_id_2f07c1b1_hoisted_22, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Faq')), 1), Dashboardvue_type_template_id_2f07c1b1_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", Dashboardvue_type_template_id_2f07c1b1_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_CommunityHelp')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, " – ", 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.professionalHelpUrl - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, Dashboardvue_type_template_id_3809d5a2_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Dashboardvue_type_template_id_3809d5a2_hoisted_25])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (website) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, Dashboardvue_type_template_id_2f07c1b1_hoisted_25), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Dashboardvue_type_template_id_2f07c1b1_hoisted_26])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (website) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_MultisitesSite, { key: website.idsite, website: website, @@ -644,22 +661,22 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se metric: _ctx.sortColumn, "display-revenue-column": _ctx.displayRevenueColumn }, null, 8, ["website", "evolution-metric", "date-sparkline", "show-sparklines", "metric", "display-revenue-column"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tfoot", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_3809d5a2_hoisted_26, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_3809d5a2_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_28, [_ctx.hasSuperUserAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tfoot", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_2f07c1b1_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_2f07c1b1_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_29, [_ctx.hasSuperUserAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, href: _ctx.addSiteUrl - }, [_hoisted_30, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_AddSite')), 1)], 8, _hoisted_29)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_31, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, [_hoisted_31, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_AddSite')), 1)], 8, _hoisted_30)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_32, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { id: "prev", class: "previous dataTablePrevious", onClick: _cache[6] || (_cache[6] = function ($event) { return _ctx.previousPage(); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_32, "« " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Previous')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.currentPage === 0)]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_33, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_34, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Pagination', _ctx.paginationLowerBound, _ctx.paginationUpperBound, _ctx.numberOfFilteredSites)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_33, "« " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Previous')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.currentPage === 0)]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_34, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_35, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Pagination', _ctx.paginationLowerBound, _ctx.paginationUpperBound, _ctx.numberOfFilteredSites)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { id: "next", class: "next dataTableNext", onClick: _cache[7] || (_cache[7] = function ($event) { return _ctx.nextPage(); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_35, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Next')) + " »", 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.currentPage >= _ctx.numberOfPages)]])]), _hoisted_36])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", _hoisted_37, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_38, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_39, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_40, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_36, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Next')) + " »", 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.currentPage >= _ctx.numberOfPages)]])]), _hoisted_37])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", _hoisted_38, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_39, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_40, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_41, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", onKeydown: _cache[8] || (_cache[8] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function ($event) { return _ctx.searchSite(_ctx.searchTerm); @@ -668,15 +685,15 @@ function Dashboardvue_type_template_id_3809d5a2_render(_ctx, _cache, $props, $se return _ctx.searchTerm = $event; }), placeholder: _ctx.translate('Actions_SubmenuSitesearch') - }, null, 40, _hoisted_41), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 40, _hoisted_42), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-search search_ico", onClick: _cache[10] || (_cache[10] = function ($event) { return _ctx.searchSite(_ctx.searchTerm); }), title: _ctx.translate('General_ClickToSearch') - }, null, 8, _hoisted_42)])])])])])])]); + }, null, 8, _hoisted_43)])])])])])])], 512); } -// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=3809d5a2 +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=2f07c1b1 // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -1079,7 +1096,7 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { -Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_3809d5a2_render +Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_2f07c1b1_render /* harmony default export */ var Dashboard = (Dashboardvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.adapter.ts diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 9a9e970fa8..170f040f4a 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -1,20 +1,20 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["MultiSites"]=t(require("CoreHome"),require("vue")):e["MultiSites"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/MultiSites/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"MultisitesSite",(function(){return x})),n.d(t,"DashboadStore",(function(){return Te})),n.d(t,"Dashboard",(function(){return De})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var o=n("19dc"),i=n("8bbf"),s={key:0,class:"multisites-label label"},l=["href"],c=["href","title"],u=Object(i["createElementVNode"])("span",{class:"icon icon-outlink"},null,-1),d=[u],b={key:1,class:"multisites-label label"},m={class:"value"},p={class:"multisites-column"},v={class:"value"},f={class:"multisites-column"},h={class:"value"},g={key:2,class:"multisites-column"},O={class:"value"},j=["title"],S={key:0,class:"visits value"},_=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_up.png",alt:""},null,-1),y=Object(i["createTextVNode"])(),w={style:{color:"green"}},k=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/stop.png",alt:""},null,-1),V=Object(i["createTextVNode"])(),N=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_down.png",alt:""},null,-1),E=Object(i["createTextVNode"])(),C={style:{color:"red"}},B={key:4,style:{width:"180px"}},M={key:0,class:"sparkline",style:{width:"100px",margin:"auto"}},P=["href","title"],T=["src"];function A(e,t,n,r,a,o){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{class:Object(i["normalizeClass"])({groupedWebsite:e.website.group,website:!e.website.group,group:e.website.isGroup})},[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",s,[Object(i["createElementVNode"])("a",{title:"View reports",class:"value truncated-text-line",href:e.dashboardUrl(e.website)},Object(i["toDisplayString"])(e.websiteLabel),9,l),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.website.main_url,title:e.translate("General_GoTo",e.website.main_url)},d,8,c)])])),e.website.isGroup?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",b,[Object(i["createElementVNode"])("span",m,Object(i["toDisplayString"])(e.websiteLabel),1)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("td",p,[Object(i["createElementVNode"])("span",v,Object(i["toDisplayString"])(e.website.nb_visits),1)]),Object(i["createElementVNode"])("td",f,[Object(i["createElementVNode"])("span",h,Object(i["toDisplayString"])(e.website.nb_pageviews),1)]),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",g,[Object(i["createElementVNode"])("span",O,Object(i["toDisplayString"])(e.website.revenue),1)])):Object(i["createCommentVNode"])("",!0),"range"!==e.period?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",{key:3,class:"multisites-evolution",title:e.website.tooltip},[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",S,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[_,y,Object(i["createElementVNode"])("span",w,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],1===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[k,V,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],0===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[N,E,Object(i["createElementVNode"])("span",C,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],-1===e.website["".concat(e.evolutionMetric,"_trend")]]])]))],8,j)):Object(i["createCommentVNode"])("",!0),e.showSparklines?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",B,[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",M,[Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.dashboardUrl(e.website),title:e.translate("General_GoTo",e.translate("Dashboard_DashboardOf",e.websiteLabel))},[Object(i["createElementVNode"])("img",{alt:"",width:"100",height:"25",src:e.sparklineImage(e.website)},null,8,T)],8,P)]))])):Object(i["createCommentVNode"])("",!0)],2)}var D=Object(i["defineComponent"])({props:{website:{type:Object,required:!0},evolutionMetric:{type:String,required:!0},showSparklines:Boolean,dateSparkline:String,displayRevenueColumn:Boolean,metric:String},methods:{dashboardUrl:function(e){return"index.php?module=CoreHome&action=index&date=".concat(this.date,"&period=").concat(this.period)+"&idSite=".concat(e.idsite).concat(this.tokenParam)},sparklineImage:function(e){var t=this.metric;switch(this.evolutionMetric){case"visits_evolution":t="nb_visits";break;case"pageviews_evolution":t="nb_pageviews";break;case"revenue_evolution":t="revenue";break;default:break}return"index.php?module=MultiSites&action=getEvolutionGraph&period=".concat(this.period,"&date=")+"".concat(this.dateSparkline,"&evolutionBy=").concat(t,"&columns=").concat(t,"&idSite=").concat(e.idsite)+"&idsite=".concat(e.idsite,"&viewDataTable=sparkline").concat(this.tokenParam,"&colors=")+"".concat(encodeURIComponent(JSON.stringify(o["Matomo"].getSparklineColors())))}},computed:{tokenParam:function(){var e=o["MatomoUrl"].urlParsed.value.token_auth;return e?"&token_auth=".concat(e):""},period:function(){return o["Matomo"].period},date:function(){return o["MatomoUrl"].urlParsed.value.date},websiteLabel:function(){return o["Matomo"].helper.htmlDecode(this.website.label)}}});D.render=A;var x=D,G=(Object(o["createAngularJsAdapter"])({component:x,scope:{website:{angularJsBind:"="},evolutionMetric:{angularJsBind:"="},showSparklines:{angularJsBind:"="},dateSparkline:{angularJsBind:"="},displayRevenueColumn:{angularJsBind:"="},metric:{angularJsBind:"="}},directiveName:"piwikMultisitesSite"}),{class:"card-title"}),R=["innerHTML","title"],L={id:"mt",class:"dataTable card-table",cellspacing:"0"},I={class:"heading"},z={class:"heading"},U={class:"heading"},J={class:"heading"},H=["colspan"],F=["value"],q={value:"visits_evolution"},W={value:"pageviews_evolution"},K={key:0,value:"revenue_evolution"},$={key:0},Y={colspan:"7",class:"allWebsitesLoading"},Q={key:1},X={key:0},Z={colspan:"7"},ee={class:"notification system notification-error"},te=Object(i["createElementVNode"])("br",null,null,-1),ne=Object(i["createElementVNode"])("br",null,null,-1),re={rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},ae=Object(i["createTextVNode"])(" – "),oe={rel:"noreferrer noopener",target:"_blank",href:"https://forum.matomo.org/"},ie=["href"],se=Object(i["createTextVNode"])(". "),le={colspan:"8",class:"paging"},ce={class:"row"},ue={class:"col s3 add_new_site"},de=["href"],be=Object(i["createElementVNode"])("span",{class:"icon-add"},null,-1),me={class:"col s6"},pe={style:{cursor:"pointer"}},ve={class:"dataTablePages"},fe={id:"counter"},he={style:{cursor:"pointer"},class:"pointer"},ge=Object(i["createElementVNode"])("div",{class:"col s3"}," ",-1),Oe={row_id:"last"},je={colspan:"8",class:"site_search"},Se={class:"row"},_e={class:"input-field col s12"},ye=["placeholder"],we=["title"]; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["MultiSites"]=t(require("CoreHome"),require("vue")):e["MultiSites"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/MultiSites/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"MultisitesSite",(function(){return G})),n.d(t,"DashboadStore",(function(){return De})),n.d(t,"Dashboard",(function(){return Ge})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var o=n("19dc"),i=n("8bbf"),s={key:0,class:"multisites-label label"},l=["href"],c={key:0},u=["href","title"],d=Object(i["createElementVNode"])("span",{class:"icon icon-outlink"},null,-1),m=[d],b={key:1,class:"multisites-label label"},p={class:"value"},v={class:"multisites-column"},f={class:"value"},h={class:"multisites-column"},g={class:"value"},O={key:2,class:"multisites-column"},j={class:"value"},S=["title"],_={key:0,class:"visits value"},y=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_up.png",alt:""},null,-1),w=Object(i["createTextVNode"])(),k={style:{color:"green"}},V=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/stop.png",alt:""},null,-1),N=Object(i["createTextVNode"])(),E=Object(i["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_down.png",alt:""},null,-1),C=Object(i["createTextVNode"])(),M={style:{color:"red"}},B={key:4,style:{width:"180px"}},P={key:0,class:"sparkline",style:{width:"100px",margin:"auto"}},T=["href","title"],A=["src"];function D(e,t,n,r,a,o){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{class:Object(i["normalizeClass"])({groupedWebsite:e.website.group,website:!e.website.group,group:e.website.isGroup}),ref:"root"},[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",s,[Object(i["createElementVNode"])("a",{title:"View reports",class:"value truncated-text-line",href:e.dashboardUrl(e.website)},Object(i["toDisplayString"])(e.websiteLabel),9,l),e.website.main_url?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",c,[Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.website.main_url,title:e.translate("General_GoTo",e.website.main_url)},m,8,u)])):Object(i["createCommentVNode"])("",!0)])),e.website.isGroup?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",b,[Object(i["createElementVNode"])("span",p,Object(i["toDisplayString"])(e.websiteLabel),1)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("td",v,[Object(i["createElementVNode"])("span",f,Object(i["toDisplayString"])(e.website.nb_visits),1)]),Object(i["createElementVNode"])("td",h,[Object(i["createElementVNode"])("span",g,Object(i["toDisplayString"])(e.website.nb_pageviews),1)]),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",O,[Object(i["createElementVNode"])("span",j,Object(i["toDisplayString"])(e.website.revenue),1)])):Object(i["createCommentVNode"])("",!0),"range"!==e.period?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",{key:3,class:"multisites-evolution",title:e.website.tooltip},[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",_,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[y,w,Object(i["createElementVNode"])("span",k,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],1===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[V,N,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],0===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[E,C,Object(i["createElementVNode"])("span",M,Object(i["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[i["vShow"],-1===e.website["".concat(e.evolutionMetric,"_trend")]]])]))],8,S)):Object(i["createCommentVNode"])("",!0),e.showSparklines?(Object(i["openBlock"])(),Object(i["createElementBlock"])("td",B,[e.website.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",P,[Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.dashboardUrl(e.website),title:e.translate("General_GoTo",e.translate("Dashboard_DashboardOf",e.websiteLabel))},[Object(i["createElementVNode"])("img",{alt:"",width:"100",height:"25",src:e.sparklineImage(e.website)},null,8,A)],8,T)]))])):Object(i["createCommentVNode"])("",!0)],2)}var x=Object(i["defineComponent"])({props:{website:{type:Object,required:!0},evolutionMetric:{type:String,required:!0},showSparklines:Boolean,dateSparkline:String,displayRevenueColumn:Boolean,metric:String},mounted:function(){o["Matomo"].postEvent("MultiSites.MultiSitesSite.mounted",{element:this.$refs.root})},unmounted:function(){o["Matomo"].postEvent("MultiSites.MultiSitesSite.unmounted",{element:this.$refs.root})},methods:{dashboardUrl:function(e){return"index.php?module=CoreHome&action=index&date=".concat(this.date,"&period=").concat(this.period)+"&idSite=".concat(e.idsite).concat(this.tokenParam)},sparklineImage:function(e){var t=this.metric;switch(this.evolutionMetric){case"visits_evolution":t="nb_visits";break;case"pageviews_evolution":t="nb_pageviews";break;case"revenue_evolution":t="revenue";break;default:break}return"index.php?module=MultiSites&action=getEvolutionGraph&period=".concat(this.period,"&date=")+"".concat(this.dateSparkline,"&evolutionBy=").concat(t,"&columns=").concat(t,"&idSite=").concat(e.idsite)+"&idsite=".concat(e.idsite,"&viewDataTable=sparkline").concat(this.tokenParam,"&colors=")+"".concat(encodeURIComponent(JSON.stringify(o["Matomo"].getSparklineColors())))}},computed:{tokenParam:function(){var e=o["MatomoUrl"].urlParsed.value.token_auth;return e?"&token_auth=".concat(e):""},period:function(){return o["Matomo"].period},date:function(){return o["MatomoUrl"].urlParsed.value.date},websiteLabel:function(){return o["Matomo"].helper.htmlDecode(this.website.label)}}});x.render=D;var G=x,R=(Object(o["createAngularJsAdapter"])({component:G,scope:{website:{angularJsBind:"="},evolutionMetric:{angularJsBind:"="},showSparklines:{angularJsBind:"="},dateSparkline:{angularJsBind:"="},displayRevenueColumn:{angularJsBind:"="},metric:{angularJsBind:"="}},directiveName:"piwikMultisitesSite"}),{ref:"root"}),L={class:"card-title"},I=["innerHTML","title"],z={id:"mt",class:"dataTable card-table",cellspacing:"0"},U={class:"heading"},J={class:"heading"},H={class:"heading"},F={class:"heading"},q=["colspan"],W=["value"],$={value:"visits_evolution"},K={value:"pageviews_evolution"},Y={key:0,value:"revenue_evolution"},Q={key:0},X={colspan:"7",class:"allWebsitesLoading"},Z={key:1},ee={key:0},te={colspan:"7"},ne={class:"notification system notification-error"},re=Object(i["createElementVNode"])("br",null,null,-1),ae=Object(i["createElementVNode"])("br",null,null,-1),oe={rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},ie=Object(i["createTextVNode"])(" – "),se={rel:"noreferrer noopener",target:"_blank",href:"https://forum.matomo.org/"},le=["href"],ce=Object(i["createTextVNode"])(". "),ue={colspan:"8",class:"paging"},de={class:"row"},me={class:"col s3 add_new_site"},be=["href"],pe=Object(i["createElementVNode"])("span",{class:"icon-add"},null,-1),ve={class:"col s6"},fe={style:{cursor:"pointer"}},he={class:"dataTablePages"},ge={id:"counter"},Oe={style:{cursor:"pointer"},class:"pointer"},je=Object(i["createElementVNode"])("div",{class:"col s3"}," ",-1),Se={row_id:"last"},_e={colspan:"8",class:"site_search"},ye={class:"row"},we={class:"input-field col s12"},ke=["placeholder"],Ve=["title"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ke(e,t,n,r,a,o){var s=this,l=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("ActivityIndicator"),u=Object(i["resolveComponent"])("MultisitesSite");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",G,[Object(i["createVNode"])(l,{"help-url":"https://matomo.org/docs/manage-websites/#all-websites-dashboard","feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(i["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,R)]})),_:1},8,["feature-name"])]),Object(i["createElementVNode"])("table",L,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",{id:"names",class:Object(i["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(i["createElementVNode"])("span",I,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"label"===e.sortColumn,multisites_desc:e.reverse&&"label"===e.sortColumn}]),style:{"margin-left":"3.5px"}},null,2)],2),Object(i["createElementVNode"])("th",{id:"visits",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_visits"===e.sortColumn,multisites_desc:e.reverse&&"nb_visits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",z,Object(i["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(i["createElementVNode"])("th",{id:"pageviews",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_pageviews"===e.sortColumn,multisites_desc:e.reverse&&"nb_pageviews"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",U,Object(i["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("th",{key:0,id:"revenue",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",J,Object(i["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("th",{id:"evolution",class:Object(i["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&e.evolutionSelector===e.sortColumn,multisites_desc:e.reverse&&e.evolutionSelector===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(i["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(i["createElementVNode"])("select",{class:"selector browser-default",id:"evolution_selector",value:e.evolutionSelector,onChange:t[5]||(t[5]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(i["createElementVNode"])("option",q,Object(i["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(i["createElementVNode"])("option",W,Object(i["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("option",K,Object(i["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(i["createCommentVNode"])("",!0)],40,F)],10,H)])]),e.isLoading?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tbody",$,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",Y,[Object(i["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(i["createCommentVNode"])("",!0),e.isLoading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tbody",Q,[e.errorLoadingSites?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",X,[Object(i["createElementVNode"])("td",Z,[Object(i["createElementVNode"])("div",ee,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),te,ne,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(i["createElementVNode"])("a",re,Object(i["toDisplayString"])(e.translate("General_Faq")),1),ae,Object(i["createElementVNode"])("a",oe,Object(i["toDisplayString"])(e.translate("Feedback_CommunityHelp")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null," – ",512),[[i["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(i["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,ie),[[i["vShow"],e.areAdsForProfessionalServicesEnabled]]),se])])])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sites,(function(t){return Object(i["openBlock"])(),Object(i["createBlock"])(u,{key:t.idsite,website:t,"evolution-metric":e.evolutionSelector,"date-sparkline":e.dateSparkline,"show-sparklines":e.showSparklines,metric:e.sortColumn,"display-revenue-column":e.displayRevenueColumn},null,8,["website","evolution-metric","date-sparkline","show-sparklines","metric","display-revenue-column"])})),128))])),Object(i["createElementVNode"])("tfoot",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",le,[Object(i["createElementVNode"])("div",ce,[Object(i["createElementVNode"])("div",ue,[e.hasSuperUserAccess?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[be,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,de)):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",me,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(i["createElementVNode"])("span",pe,"« "+Object(i["toDisplayString"])(e.translate("General_Previous")),1)],512),[[i["vShow"],!(0===e.currentPage)]]),Object(i["createElementVNode"])("span",ve,[Object(i["createElementVNode"])("span",fe,Object(i["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(i["createElementVNode"])("span",he,Object(i["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[i["vShow"],!(e.currentPage>=e.numberOfPages)]])]),ge])])]),Object(i["createElementVNode"])("tr",Oe,[Object(i["createElementVNode"])("td",je,[Object(i["createElementVNode"])("div",Se,[Object(i["createElementVNode"])("div",_e,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(i["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,ye),[[i["vModelText"],e.searchTerm]]),Object(i["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[10]||(t[10]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,we)])])])])])])])}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(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 Ee(e,t,n){return t&&Ne(e.prototype,t),n&&Ne(e,n),e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Ne(e,t,n,r,a,o){var s=this,l=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("ActivityIndicator"),u=Object(i["resolveComponent"])("MultisitesSite");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",R,[Object(i["createElementVNode"])("h2",L,[Object(i["createVNode"])(l,{"help-url":"https://matomo.org/docs/manage-websites/#all-websites-dashboard","feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(i["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,I)]})),_:1},8,["feature-name"])]),Object(i["createElementVNode"])("table",z,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",{id:"names",class:Object(i["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(i["createElementVNode"])("span",U,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"label"===e.sortColumn,multisites_desc:e.reverse&&"label"===e.sortColumn}]),style:{"margin-left":"3.5px"}},null,2)],2),Object(i["createElementVNode"])("th",{id:"visits",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_visits"===e.sortColumn,multisites_desc:e.reverse&&"nb_visits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",J,Object(i["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(i["createElementVNode"])("th",{id:"pageviews",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_pageviews"===e.sortColumn,multisites_desc:e.reverse&&"nb_pageviews"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",H,Object(i["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("th",{key:0,id:"revenue",class:Object(i["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",F,Object(i["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("th",{id:"evolution",class:Object(i["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&e.evolutionSelector===e.sortColumn,multisites_desc:e.reverse&&e.evolutionSelector===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(i["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(i["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(i["createElementVNode"])("select",{class:"selector browser-default",id:"evolution_selector",value:e.evolutionSelector,onChange:t[5]||(t[5]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(i["createElementVNode"])("option",$,Object(i["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(i["createElementVNode"])("option",K,Object(i["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(i["openBlock"])(),Object(i["createElementBlock"])("option",Y,Object(i["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(i["createCommentVNode"])("",!0)],40,W)],10,q)])]),e.isLoading?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tbody",Q,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",X,[Object(i["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(i["createCommentVNode"])("",!0),e.isLoading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tbody",Z,[e.errorLoadingSites?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",ee,[Object(i["createElementVNode"])("td",te,[Object(i["createElementVNode"])("div",ne,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),re,ae,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(i["createElementVNode"])("a",oe,Object(i["toDisplayString"])(e.translate("General_Faq")),1),ie,Object(i["createElementVNode"])("a",se,Object(i["toDisplayString"])(e.translate("Feedback_CommunityHelp")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null," – ",512),[[i["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(i["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,le),[[i["vShow"],e.areAdsForProfessionalServicesEnabled]]),ce])])])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sites,(function(t){return Object(i["openBlock"])(),Object(i["createBlock"])(u,{key:t.idsite,website:t,"evolution-metric":e.evolutionSelector,"date-sparkline":e.dateSparkline,"show-sparklines":e.showSparklines,metric:e.sortColumn,"display-revenue-column":e.displayRevenueColumn},null,8,["website","evolution-metric","date-sparkline","show-sparklines","metric","display-revenue-column"])})),128))])),Object(i["createElementVNode"])("tfoot",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",ue,[Object(i["createElementVNode"])("div",de,[Object(i["createElementVNode"])("div",me,[e.hasSuperUserAccess?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[pe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,be)):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",ve,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(i["createElementVNode"])("span",fe,"« "+Object(i["toDisplayString"])(e.translate("General_Previous")),1)],512),[[i["vShow"],!(0===e.currentPage)]]),Object(i["createElementVNode"])("span",he,[Object(i["createElementVNode"])("span",ge,Object(i["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(i["createElementVNode"])("span",Oe,Object(i["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[i["vShow"],!(e.currentPage>=e.numberOfPages)]])]),je])])]),Object(i["createElementVNode"])("tr",Se,[Object(i["createElementVNode"])("td",_e,[Object(i["createElementVNode"])("div",ye,[Object(i["createElementVNode"])("div",we,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(i["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,ke),[[i["vModelText"],e.searchTerm]]),Object(i["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[10]||(t[10]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,Ve)])])])])])])],512)}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(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 Me(e,t,n){return t&&Ce(e.prototype,t),n&&Ce(e,n),e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Be=window,Me=Be.NumberFormatter,Pe=function(){function e(){var t=this;Ve(this,e),Ce(this,"privateState",Object(i["reactive"])({sites:[],isLoading:!1,pageSize:25,currentPage:0,totalVisits:"?",totalPageviews:"?",totalActions:"?",totalRevenue:"?",searchTerm:"",lastVisits:"?",lastVisitsDate:"?",numberOfSites:0,loadingMessage:Object(o["translate"])("MultiSites_LoadingWebsites"),reverse:!0,sortColumn:"nb_visits",refreshInterval:0,errorLoadingSites:!1})),Ce(this,"refreshTimeout",null),Ce(this,"fetchAbort",null),Ce(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Ce(this,"numberOfFilteredSites",Object(i["computed"])((function(){return t.state.value.numberOfSites}))),Ce(this,"numberOfPages",Object(i["computed"])((function(){return Math.ceil(t.numberOfFilteredSites.value/t.state.value.pageSize-1)}))),Ce(this,"currentPagingOffset",Object(i["computed"])((function(){return Math.ceil(t.state.value.currentPage*t.state.value.pageSize)}))),Ce(this,"paginationLowerBound",Object(i["computed"])((function(){return t.currentPagingOffset.value+1}))),Ce(this,"paginationUpperBound",Object(i["computed"])((function(){var e=t.currentPagingOffset.value+t.state.value.pageSize,n=t.numberOfFilteredSites.value;return e>n&&(e=n),e})))}return Ee(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=Me.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",i="0",s="0",l="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=Me.formatNumber(e.previous_nb_visits),i=Me.formatNumber(e.nb_visits),s=Me.formatPercent(e.visits_evolution),r=Object(o["translate"])("General_ColumnNbVisits"),l=Me.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(a="".concat(e.previous_Actions_nb_pageviews),i="".concat(e.nb_pageviews),s=Me.formatPercent(e.pageviews_evolution),r=Object(o["translate"])("General_ColumnPageviews"),l=Me.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=Me.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),i=Me.formatCurrency(e.revenue,e.currencySymbol),s=Me.formatPercent(e.revenue_evolution),r=Object(o["translate"])("General_ColumnRevenue"),l=Me.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(l),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonDay",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"week":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"month":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"year":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonYear",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={module:"MultiSites",action:"getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,o["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),Te=new Pe,Ae=Object(i["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:o["EnrichedHeadline"],ActivityIndicator:o["ActivityIndicator"],MultisitesSite:x},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&Te.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){Te.setRefreshInterval(e),Te.fetchAllSites()},sortBy:function(e){Te.sortBy(e)},previousPage:function(){Te.previousPage()},nextPage:function(){Te.nextPage()},searchSite:function(){Te.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},date:function(){return o["MatomoUrl"].urlParsed.value.date},idSite:function(){return o["MatomoUrl"].urlParsed.value.idSite},url:function(){return o["Matomo"].piwik_url},period:function(){return o["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return o["Matomo"].config&&o["Matomo"].config.are_ads_enabled},sortColumn:function(){return Te.state.value.sortColumn},reverse:function(){return Te.state.value.reverse},smallTitleContent:function(){var e=Te.state.value;return Object(o["translate"])("General_TotalVisitsPageviewsActionsRevenue","<strong>".concat(e.totalVisits,"</strong>"),"<strong>".concat(e.totalPageviews,"</strong>"),"<strong>".concat(e.totalActions,"</strong>"),"<strong>".concat(e.totalRevenue,"</strong>"))},smallTitleTooltip:function(){var e=Te.state.value;return Object(o["translate"])("General_EvolutionSummaryGeneric",Object(o["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(o["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return Te.state.value.loadingMessage},isLoading:function(){return Te.state.value.isLoading},errorLoadingSites:function(){return Te.state.value.errorLoadingSites},sites:function(){return Te.state.value.sites},numberOfPages:function(){return Te.numberOfPages.value},currentPage:function(){return Te.state.value.currentPage},paginationLowerBound:function(){return Te.paginationLowerBound.value},paginationUpperBound:function(){return Te.paginationUpperBound.value},numberOfFilteredSites:function(){return Te.numberOfFilteredSites.value},professionalHelpUrl:function(){return"https://matomo.org/support-plans/?pk_campaign=Help&pk_medium=AjaxError&pk_content=MultiSites&pk_source=Matomo_App"},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});Ae.render=ke;var De=Ae; + */var Pe=window,Te=Pe.NumberFormatter,Ae=function(){function e(){var t=this;Ee(this,e),Be(this,"privateState",Object(i["reactive"])({sites:[],isLoading:!1,pageSize:25,currentPage:0,totalVisits:"?",totalPageviews:"?",totalActions:"?",totalRevenue:"?",searchTerm:"",lastVisits:"?",lastVisitsDate:"?",numberOfSites:0,loadingMessage:Object(o["translate"])("MultiSites_LoadingWebsites"),reverse:!0,sortColumn:"nb_visits",refreshInterval:0,errorLoadingSites:!1})),Be(this,"refreshTimeout",null),Be(this,"fetchAbort",null),Be(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Be(this,"numberOfFilteredSites",Object(i["computed"])((function(){return t.state.value.numberOfSites}))),Be(this,"numberOfPages",Object(i["computed"])((function(){return Math.ceil(t.numberOfFilteredSites.value/t.state.value.pageSize-1)}))),Be(this,"currentPagingOffset",Object(i["computed"])((function(){return Math.ceil(t.state.value.currentPage*t.state.value.pageSize)}))),Be(this,"paginationLowerBound",Object(i["computed"])((function(){return t.currentPagingOffset.value+1}))),Be(this,"paginationUpperBound",Object(i["computed"])((function(){var e=t.currentPagingOffset.value+t.state.value.pageSize,n=t.numberOfFilteredSites.value;return e>n&&(e=n),e})))}return Me(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=Te.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",i="0",s="0",l="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=Te.formatNumber(e.previous_nb_visits),i=Te.formatNumber(e.nb_visits),s=Te.formatPercent(e.visits_evolution),r=Object(o["translate"])("General_ColumnNbVisits"),l=Te.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(a="".concat(e.previous_Actions_nb_pageviews),i="".concat(e.nb_pageviews),s=Te.formatPercent(e.pageviews_evolution),r=Object(o["translate"])("General_ColumnPageviews"),l=Te.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=Te.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),i=Te.formatCurrency(e.revenue,e.currencySymbol),s=Te.formatPercent(e.revenue_evolution),r=Object(o["translate"])("General_ColumnRevenue"),l=Te.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(l),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonDay",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"week":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"month":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"year":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonYear",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={module:"MultiSites",action:"getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,o["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),De=new Ae,xe=Object(i["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:o["EnrichedHeadline"],ActivityIndicator:o["ActivityIndicator"],MultisitesSite:G},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&De.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){De.setRefreshInterval(e),De.fetchAllSites()},sortBy:function(e){De.sortBy(e)},previousPage:function(){De.previousPage()},nextPage:function(){De.nextPage()},searchSite:function(){De.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},date:function(){return o["MatomoUrl"].urlParsed.value.date},idSite:function(){return o["MatomoUrl"].urlParsed.value.idSite},url:function(){return o["Matomo"].piwik_url},period:function(){return o["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return o["Matomo"].config&&o["Matomo"].config.are_ads_enabled},sortColumn:function(){return De.state.value.sortColumn},reverse:function(){return De.state.value.reverse},smallTitleContent:function(){var e=De.state.value;return Object(o["translate"])("General_TotalVisitsPageviewsActionsRevenue","<strong>".concat(e.totalVisits,"</strong>"),"<strong>".concat(e.totalPageviews,"</strong>"),"<strong>".concat(e.totalActions,"</strong>"),"<strong>".concat(e.totalRevenue,"</strong>"))},smallTitleTooltip:function(){var e=De.state.value;return Object(o["translate"])("General_EvolutionSummaryGeneric",Object(o["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(o["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return De.state.value.loadingMessage},isLoading:function(){return De.state.value.isLoading},errorLoadingSites:function(){return De.state.value.errorLoadingSites},sites:function(){return De.state.value.sites},numberOfPages:function(){return De.numberOfPages.value},currentPage:function(){return De.state.value.currentPage},paginationLowerBound:function(){return De.paginationLowerBound.value},paginationUpperBound:function(){return De.paginationUpperBound.value},numberOfFilteredSites:function(){return De.numberOfFilteredSites.value},professionalHelpUrl:function(){return"https://matomo.org/support-plans/?pk_campaign=Help&pk_medium=AjaxError&pk_content=MultiSites&pk_source=Matomo_App"},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});xe.render=Ne;var Ge=xe; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */Object(o["createAngularJsAdapter"])({component:De,scope:{displayRevenueColumn:{angularJsBind:"@",transform:o["transformAngularJsBoolAttr"]},showSparklines:{angularJsBind:"@",transform:o["transformAngularJsBoolAttr"]},dateSparkline:{angularJsBind:"@"},pageSize:{angularJsBind:"@",transform:o["transformAngularJsIntAttr"]},autoRefreshTodayReport:{angularJsBind:"@",transform:o["transformAngularJsIntAttr"]}},directiveName:"piwikMultisitesDashboard"})}})})); + */Object(o["createAngularJsAdapter"])({component:Ge,scope:{displayRevenueColumn:{angularJsBind:"@",transform:o["transformAngularJsBoolAttr"]},showSparklines:{angularJsBind:"@",transform:o["transformAngularJsBoolAttr"]},dateSparkline:{angularJsBind:"@"},pageSize:{angularJsBind:"@",transform:o["transformAngularJsIntAttr"]},autoRefreshTodayReport:{angularJsBind:"@",transform:o["transformAngularJsIntAttr"]}},directiveName:"piwikMultisitesDashboard"})}})})); //# sourceMappingURL=MultiSites.umd.min.js.map
\ No newline at end of file diff --git a/plugins/MultiSites/vue/src/Dashboard/Dashboard.vue b/plugins/MultiSites/vue/src/Dashboard/Dashboard.vue index 00eafbb225..abbab71ba7 100644 --- a/plugins/MultiSites/vue/src/Dashboard/Dashboard.vue +++ b/plugins/MultiSites/vue/src/Dashboard/Dashboard.vue @@ -5,7 +5,7 @@ --> <template> - <div> + <div ref="root"> <h2 class="card-title"> <EnrichedHeadline help-url="https://matomo.org/docs/manage-websites/#all-websites-dashboard" diff --git a/plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue b/plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue index ff0171e9f1..8d63572cea 100644 --- a/plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue +++ b/plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue @@ -7,6 +7,7 @@ <template> <tr :class="{'groupedWebsite': website.group, 'website': !website.group, 'group': website.isGroup}" + ref="root" > <td class="multisites-label label" @@ -19,7 +20,7 @@ > {{ websiteLabel }} </a> - <span> + <span v-if="website.main_url"> <a rel="noreferrer noopener" target="_blank" @@ -125,6 +126,12 @@ export default defineComponent({ displayRevenueColumn: Boolean, metric: String, }, + mounted() { + Matomo.postEvent('MultiSites.MultiSitesSite.mounted', { element: this.$refs.root }); + }, + unmounted() { + Matomo.postEvent('MultiSites.MultiSitesSite.unmounted', { element: this.$refs.root }); + }, methods: { dashboardUrl(website: Site) { return `index.php?module=CoreHome&action=index&date=${this.date}&period=${this.period}` diff --git a/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.js b/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.js index d59f8eb454..f8450bb4b5 100644 --- a/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.js +++ b/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.js @@ -271,9 +271,9 @@ var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); ReportParametersvue_type_script_lang_ts.render = render /* harmony default export */ var ReportParameters = (ReportParametersvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue?vue&type=template&id=49678e2a +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue?vue&type=template&id=243c7804 -var ManageScheduledReportvue_type_template_id_49678e2a_hoisted_1 = { +var ManageScheduledReportvue_type_template_id_243c7804_hoisted_1 = { class: "emailReports", ref: "root" }; @@ -309,12 +309,12 @@ var _hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vu id: "bottom" }, null, -1); -function ManageScheduledReportvue_type_template_id_49678e2a_render(_ctx, _cache, $props, $setup, $data, $options) { +function ManageScheduledReportvue_type_template_id_243c7804_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ListReports = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ListReports"); var _component_AddReport = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("AddReport"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ManageScheduledReportvue_type_template_id_49678e2a_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, null, 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_3, null, 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ManageScheduledReportvue_type_template_id_243c7804_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, null, 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_3, null, 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif", alt: _ctx.translate('General_LoadingData') }, null, 8, _hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SegmentEditor_LoadingSegmentedDataMayTakeSomeTime')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ListReports, { @@ -374,7 +374,7 @@ function ManageScheduledReportvue_type_template_id_49678e2a_render(_ctx, _cache, _: 3 }, 8, ["report", "periods", "param-periods", "report-type-options", "report-formats-by-report-type-options", "display-formats", "reports-by-category-by-report-type", "allow-multiple-reports-by-report-type", "count-websites", "site-name", "selected-reports", "report-types", "segment-editor-activated", "saved-segments-by-id"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _hoisted_9])], 512); } -// CONCATENATED MODULE: ./plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue?vue&type=template&id=49678e2a +// CONCATENATED MODULE: ./plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue?vue&type=template&id=243c7804 // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); @@ -1389,6 +1389,14 @@ var ManageScheduledReportvue_type_script_lang_ts_timeZoneDifferenceInHours = ext ManageScheduledReportvue_type_script_lang_ts_$(this.$refs.root).on('click', 'a.entityCancelLink', function () { _this.showListOfReports(); }); + external_CoreHome_["Matomo"].postEvent('ScheduledReports.ManageScheduledReport.mounted', { + element: this.$refs.root + }); + }, + unmounted: function unmounted() { + external_CoreHome_["Matomo"].postEvent('ScheduledReports.ManageScheduledReport.unmounted', { + element: this.$refs.root + }); }, data: function data() { return { @@ -1582,7 +1590,7 @@ var ManageScheduledReportvue_type_script_lang_ts_timeZoneDifferenceInHours = ext -ManageScheduledReportvue_type_script_lang_ts.render = ManageScheduledReportvue_type_template_id_49678e2a_render +ManageScheduledReportvue_type_script_lang_ts.render = ManageScheduledReportvue_type_template_id_243c7804_render /* harmony default export */ var ManageScheduledReport = (ManageScheduledReportvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/ScheduledReports/vue/src/index.ts diff --git a/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.min.js b/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.min.js index 351616fdb5..fd4378e40e 100644 --- a/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.min.js +++ b/plugins/ScheduledReports/vue/dist/ScheduledReports.umd.min.js @@ -4,13 +4,13 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function c(e,t,r,o,n,c){var a=Object(l["resolveComponent"])("Field");return e.report?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",i,[Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"checkbox",name:"report_email_me",introduction:e.translate("ScheduledReports_SendReportTo"),"model-value":e.report.emailMe,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change","emailMe",t)}),title:"".concat(e.translate("ScheduledReports_SentToMe")," (").concat(e.currentUserEmail,")")},null,8,["introduction","model-value","title"]),[[l["vShow"],"email"===e.report.type]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"textarea","var-type":"array","model-value":e.report.additionalEmails,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change","additionalEmails",t)}),title:e.translate("ScheduledReports_AlsoSendReportToTheseEmails")},null,8,["model-value","title"]),[[l["vShow"],"email"===e.report.type]])])])):Object(l["createCommentVNode"])("",!0)}var a=r("a5a2"),p=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},reportType:{type:String,required:!0},defaultDisplayFormat:{type:Number,required:!0},defaultEmailMe:{type:Boolean,required:!0},defaultEvolutionGraph:{type:Boolean,required:!0},currentUserEmail:{type:String,required:!0}},emits:["change"],components:{Field:a["Field"]},setup:function(e){var t=window,r=t.resetReportParametersFunctions,o=t.updateReportParametersFunctions,n=t.getReportParametersFunctions;r[e.reportType]||(r[e.reportType]=function(t){t.displayFormat=e.defaultDisplayFormat,t.emailMe=e.defaultEmailMe,t.evolutionGraph=e.defaultEvolutionGraph,t.additionalEmails=[]}),o[e.reportType]||(o[e.reportType]=function(e){null!==e&&void 0!==e&&e.parameters&&["displayFormat","emailMe","evolutionGraph","additionalEmails"].forEach((function(t){t in e.parameters&&(e[t]=e.parameters[t])}))}),n[e.reportType]||(n[e.reportType]=function(e){return{displayFormat:e.displayFormat,emailMe:e.emailMe,evolutionGraph:e.evolutionGraph,additionalEmails:e.additionalEmails||[]}})}});p.render=c;var d=p,s={class:"emailReports",ref:"root"},u={ref:"reportSentSuccess"},m={ref:"reportUpdatedSuccess"},b=Object(l["createElementVNode"])("div",{id:"ajaxError",style:{display:"none"}},null,-1),O={id:"ajaxLoadingDiv",style:{display:"none"}},y={class:"loadingPiwik"},j=["alt"],h={class:"loadingSegment"},f=Object(l["createElementVNode"])("a",{id:"bottom"},null,-1);function v(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("ListReports"),a=Object(l["resolveComponent"])("AddReport");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,[Object(l["createElementVNode"])("div",u,null,512),Object(l["createElementVNode"])("div",m,null,512),Object(l["createElementVNode"])("div",null,[b,Object(l["createElementVNode"])("div",O,[Object(l["createElementVNode"])("div",y,[Object(l["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,j),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_LoadingData")),1)]),Object(l["createElementVNode"])("div",h,Object(l["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)]),Object(l["withDirectives"])(Object(l["createVNode"])(c,{"content-title":e.contentTitle,"user-login":e.userLogin,"login-module":e.loginModule,reports:e.reports,"site-name":e.decodedSiteName,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,periods:e.periods,"report-types":e.reportTypes,"download-output-type":e.downloadOutputType,language:e.language,"report-formats-by-report-type":e.reportFormatsByReportType,onCreate:t[0]||(t[0]=function(t){return e.createReport()}),onEdit:t[1]||(t[1]=function(t){return e.editReport(t)}),onDelete:t[2]||(t[2]=function(t){return e.deleteReport(t)}),onSendnow:t[3]||(t[3]=function(t){return e.sendReportNow(t)})},null,8,["content-title","user-login","login-module","reports","site-name","segment-editor-activated","saved-segments-by-id","periods","report-types","download-output-type","language","report-formats-by-report-type"]),[[l["vShow"],e.showReportsList]]),e.showReportForm?(Object(l["openBlock"])(),Object(l["createBlock"])(a,{key:0,report:e.report,periods:e.periods,"param-periods":e.paramPeriods,"report-type-options":e.reportTypeOptions,"report-formats-by-report-type-options":e.reportFormatsByReportTypeOptions,"display-formats":e.displayFormats,"reports-by-category-by-report-type":e.reportsByCategoryByReportType,"allow-multiple-reports-by-report-type":e.allowMultipleReportsByReportType,"count-websites":e.countWebsites,"site-name":e.decodedSiteName,"selected-reports":e.selectedReports,"report-types":e.reportTypes,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,onToggleSelectedReport:t[4]||(t[4]=function(t){return e.toggleSelectedReport(t.reportType,t.uniqueId)}),onChange:t[5]||(t[5]=function(t){return e.onChangeProperty(t.prop,t.value)}),onSubmit:t[6]||(t[6]=function(t){return e.submitReport()})},{"report-parameters":Object(l["withCtx"])((function(){return[Object(l["renderSlot"])(e.$slots,"report-parameters")]})),_:3},8,["report","periods","param-periods","report-type-options","report-formats-by-report-type-options","display-formats","reports-by-category-by-report-type","allow-multiple-reports-by-report-type","count-websites","site-name","selected-reports","report-types","segment-editor-activated","saved-segments-by-id"])):Object(l["createCommentVNode"])("",!0),f])],512)}var g=r("19dc"),S=Object(l["createElementVNode"])("div",{class:"clear"},null,-1),R={key:0},E=["innerHTML"],N={id:"emailScheduleInlineHelp",class:"inline-help-node"},V=Object(l["createElementVNode"])("br",null,null,-1),k={id:"emailReportPeriodInlineHelp",class:"inline-help-node"},w=Object(l["createElementVNode"])("br",null,null,-1),_=Object(l["createElementVNode"])("br",null,null,-1),B={key:0,id:"reportHourHelpText",class:"inline-help-node"},T=["textContent"],C={ref:"reportParameters"},P={class:"email"},F={class:"report_evolution_graph"},D={class:"row evolution-graph-period"},x={class:"col s12"},q={for:"report_evolution_period_for_each"},M=["checked"],I=["innerHTML"],A={class:"col s12"},L={for:"report_evolution_period_for_prev"},H=["checked"],G=["value"],U={class:"row"},z={class:"col s12"},W={class:"reportCategory"},Z={class:"listReports"},K=["name","type","id","checked","onChange"],X={key:0,class:"entityInlineHelp"},J=Object(l["createElementVNode"])("br",null,null,-1),Q=["innerHTML"];function Y(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("Field"),a=Object(l["resolveComponent"])("SaveButton"),p=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveDirective"])("form");return Object(l["openBlock"])(),Object(l["createBlock"])(p,{class:"entityAddContainer","content-title":e.translate("ScheduledReports_CreateAndScheduleReport")},{default:Object(l["withCtx"])((function(){return[S,Object(l["withDirectives"])(Object(l["createElementVNode"])("form",{id:"addEditReport",onSubmit:t[13]||(t[13]=function(t){return e.$emit("submit")})},[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"text",name:"website",title:e.translate("General_Website"),disabled:!0,"model-value":e.siteName},null,8,["title","model-value"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"textarea",name:"report_description",title:e.translate("General_Description"),"model-value":e.report.description,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change",{prop:"description",value:t})}),"inline-help":e.translate("ScheduledReports_DescriptionOnFirstPage")},null,8,["title","model-value","inline-help"])]),e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",R,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_segment",title:e.translate("SegmentEditor_ChooseASegment"),"model-value":e.report.idsegment,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change",{prop:"idsegment",value:t})}),options:e.savedSegmentsById},{"inline-help":Object(l["withCtx"])((function(){return[e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:0,id:"reportSegmentInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.reportSegmentInlineHelp)},null,8,E)):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["title","model-value","options"])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_schedule","model-value":e.report.period,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.$emit("change",{prop:"period",value:t}),e.$emit("change",{prop:"periodParam",value:"never"===e.report.period?null:e.report.period})}),title:e.translate("ScheduledReports_EmailSchedule"),options:e.periods},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",N,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_WeeklyScheduleHelp"))+" ",1),V,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MonthlyScheduleHelp")),1)])]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_period","model-value":e.report.periodParam,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.$emit("change",{prop:"periodParam",value:t})}),options:e.paramPeriods,title:e.translate("ScheduledReports_ReportPeriod")},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",k,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp"))+" ",1),w,_,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp2")),1)])]})),_:1},8,["model-value","options","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_hour","model-value":e.report.hour,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.$emit("change",{prop:"hour",value:t})}),title:e.translate("ScheduledReports_ReportHour","X"),options:e.reportHours},{"inline-help":Object(l["withCtx"])((function(){return[0!==e.timezoneOffset&&"0"!==e.timezoneOffset?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",B,[Object(l["createElementVNode"])("span",{textContent:Object(l["toDisplayString"])(e.reportHourUtc)},null,8,T)])):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_type",disabled:1===e.reportTypes.length,"model-value":e.report.type,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.$emit("change",{prop:"type",value:t})}),title:e.translate("ScheduledReports_ReportType"),options:e.reportTypeOptions},null,8,["disabled","model-value","title","options"])]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportFormatsByReportTypeOptions,(function(t,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:r},[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"select",name:"report_format",title:e.translate("ScheduledReports_ReportFormat"),class:Object(l["normalizeClass"])(r),"model-value":e.report["format".concat(r)],"onUpdate:modelValue":function(t){return e.$emit("change",{prop:"format".concat(r),value:t})},options:t},null,8,["title","class","model-value","onUpdate:modelValue","options"]),[[l["vShow"],e.report.type===r]])])})),128)),Object(l["createElementVNode"])("div",C,[Object(l["renderSlot"])(e.$slots,"report-parameters")],512),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",P,[Object(l["createVNode"])(c,{uicontrol:"select",name:"display_format","model-value":e.report.displayFormat,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.$emit("change",{prop:"displayFormat",value:t})}),options:e.displayFormats,introduction:e.translate("ScheduledReports_AggregateReportsFormat")},null,8,["model-value","options","introduction"])]),Object(l["createElementVNode"])("div",F,[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"report_evolution_graph",title:e.translate("ScheduledReports_EvolutionGraph",5),"model-value":e.report.evolutionGraph,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.$emit("change",{prop:"evolutionGraph",value:t})})},null,8,["title","model-value"]),[[l["vShow"],-1!==[2,"2",3,"3"].indexOf(e.report.displayFormat)]])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",D,[Object(l["createElementVNode"])("div",x,[Object(l["createElementVNode"])("label",q,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_each",name:"report_evolution_period_for",type:"radio",value:"each",checked:"each"===e.report.evolutionPeriodFor,onChange:t[8]||(t[8]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,M),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.evolutionGraphsShowForEachInPeriod)},null,8,I)])]),Object(l["createElementVNode"])("div",A,[Object(l["createElementVNode"])("label",L,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_prev",name:"report_evolution_period_for",type:"radio",value:"prev",checked:"prev"===e.report.evolutionPeriodFor,onChange:t[9]||(t[9]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,H),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_EvolutionGraphsShowForPreviousN",e.frequencyPeriodPlural))+": ",1),Object(l["createElementVNode"])("input",{type:"number",name:"report_evolution_period_n",value:e.report.evolutionPeriodN,onKeydown:t[10]||(t[10]=function(t){return e.onEvolutionPeriodN(t)}),onChange:t[11]||(t[11]=function(t){return e.onEvolutionPeriodN(t)})},null,40,G)])])])],512),[[l["vShow"],-1!==[1,"1",2,"2",3,"3"].indexOf(e.report.displayFormat)]])],512),[[l["vShow"],"email"===e.report.type&&"csv"!==e.report.formatemail&&"tsv"!==e.report.formatemail]]),Object(l["createElementVNode"])("div",U,[Object(l["createElementVNode"])("h3",z,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportsIncluded")),1)]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportsByCategoryByReportTypeInColumns,(function(t,r){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{name:"reportsList",class:Object(l["normalizeClass"])("row ".concat(r)),key:r},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"col s12 m6",key:o},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:o},[Object(l["createElementVNode"])("h3",W,Object(l["toDisplayString"])(o),1),Object(l["createElementVNode"])("ul",Z,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t){var o;return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:t.uniqueId},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",{name:"".concat(r,"Reports"),type:e.allowMultipleReportsByReportType[r]?"checkbox":"radio",id:"".concat(r).concat(t.uniqueId),checked:null===(o=e.selectedReports[r])||void 0===o?void 0:o[t.uniqueId],onChange:function(o){return e.$emit("toggleSelectedReport",{reportType:r,uniqueId:t.uniqueId})}},null,40,K),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.decode(t.name)),1),"MultiSites_getAll"===t.uniqueId?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",X,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportIncludeNWebsites",e.countWebsites)),1)):Object(l["createCommentVNode"])("",!0)])])})),128))]),J])})),128))])})),128))],2)),[[l["vShow"],e.report.type===r]])})),128)),Object(l["createVNode"])(a,{value:e.saveButtonTitle,onConfirm:t[12]||(t[12]=function(t){return e.$emit("submit")})},null,8,["value"]),Object(l["createElementVNode"])("div",{class:"entityCancel",innerHTML:e.$sanitize(e.entityCancelText)},null,8,Q)],544),[[d]])]})),_:3},8,["content-title"])} + */function c(e,t,r,o,n,c){var a=Object(l["resolveComponent"])("Field");return e.report?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",i,[Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"checkbox",name:"report_email_me",introduction:e.translate("ScheduledReports_SendReportTo"),"model-value":e.report.emailMe,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change","emailMe",t)}),title:"".concat(e.translate("ScheduledReports_SentToMe")," (").concat(e.currentUserEmail,")")},null,8,["introduction","model-value","title"]),[[l["vShow"],"email"===e.report.type]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"textarea","var-type":"array","model-value":e.report.additionalEmails,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change","additionalEmails",t)}),title:e.translate("ScheduledReports_AlsoSendReportToTheseEmails")},null,8,["model-value","title"]),[[l["vShow"],"email"===e.report.type]])])])):Object(l["createCommentVNode"])("",!0)}var a=r("a5a2"),p=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},reportType:{type:String,required:!0},defaultDisplayFormat:{type:Number,required:!0},defaultEmailMe:{type:Boolean,required:!0},defaultEvolutionGraph:{type:Boolean,required:!0},currentUserEmail:{type:String,required:!0}},emits:["change"],components:{Field:a["Field"]},setup:function(e){var t=window,r=t.resetReportParametersFunctions,o=t.updateReportParametersFunctions,n=t.getReportParametersFunctions;r[e.reportType]||(r[e.reportType]=function(t){t.displayFormat=e.defaultDisplayFormat,t.emailMe=e.defaultEmailMe,t.evolutionGraph=e.defaultEvolutionGraph,t.additionalEmails=[]}),o[e.reportType]||(o[e.reportType]=function(e){null!==e&&void 0!==e&&e.parameters&&["displayFormat","emailMe","evolutionGraph","additionalEmails"].forEach((function(t){t in e.parameters&&(e[t]=e.parameters[t])}))}),n[e.reportType]||(n[e.reportType]=function(e){return{displayFormat:e.displayFormat,emailMe:e.emailMe,evolutionGraph:e.evolutionGraph,additionalEmails:e.additionalEmails||[]}})}});p.render=c;var d=p,s={class:"emailReports",ref:"root"},u={ref:"reportSentSuccess"},m={ref:"reportUpdatedSuccess"},b=Object(l["createElementVNode"])("div",{id:"ajaxError",style:{display:"none"}},null,-1),O={id:"ajaxLoadingDiv",style:{display:"none"}},y={class:"loadingPiwik"},j=["alt"],h={class:"loadingSegment"},f=Object(l["createElementVNode"])("a",{id:"bottom"},null,-1);function v(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("ListReports"),a=Object(l["resolveComponent"])("AddReport");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,[Object(l["createElementVNode"])("div",u,null,512),Object(l["createElementVNode"])("div",m,null,512),Object(l["createElementVNode"])("div",null,[b,Object(l["createElementVNode"])("div",O,[Object(l["createElementVNode"])("div",y,[Object(l["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,j),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_LoadingData")),1)]),Object(l["createElementVNode"])("div",h,Object(l["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)]),Object(l["withDirectives"])(Object(l["createVNode"])(c,{"content-title":e.contentTitle,"user-login":e.userLogin,"login-module":e.loginModule,reports:e.reports,"site-name":e.decodedSiteName,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,periods:e.periods,"report-types":e.reportTypes,"download-output-type":e.downloadOutputType,language:e.language,"report-formats-by-report-type":e.reportFormatsByReportType,onCreate:t[0]||(t[0]=function(t){return e.createReport()}),onEdit:t[1]||(t[1]=function(t){return e.editReport(t)}),onDelete:t[2]||(t[2]=function(t){return e.deleteReport(t)}),onSendnow:t[3]||(t[3]=function(t){return e.sendReportNow(t)})},null,8,["content-title","user-login","login-module","reports","site-name","segment-editor-activated","saved-segments-by-id","periods","report-types","download-output-type","language","report-formats-by-report-type"]),[[l["vShow"],e.showReportsList]]),e.showReportForm?(Object(l["openBlock"])(),Object(l["createBlock"])(a,{key:0,report:e.report,periods:e.periods,"param-periods":e.paramPeriods,"report-type-options":e.reportTypeOptions,"report-formats-by-report-type-options":e.reportFormatsByReportTypeOptions,"display-formats":e.displayFormats,"reports-by-category-by-report-type":e.reportsByCategoryByReportType,"allow-multiple-reports-by-report-type":e.allowMultipleReportsByReportType,"count-websites":e.countWebsites,"site-name":e.decodedSiteName,"selected-reports":e.selectedReports,"report-types":e.reportTypes,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,onToggleSelectedReport:t[4]||(t[4]=function(t){return e.toggleSelectedReport(t.reportType,t.uniqueId)}),onChange:t[5]||(t[5]=function(t){return e.onChangeProperty(t.prop,t.value)}),onSubmit:t[6]||(t[6]=function(t){return e.submitReport()})},{"report-parameters":Object(l["withCtx"])((function(){return[Object(l["renderSlot"])(e.$slots,"report-parameters")]})),_:3},8,["report","periods","param-periods","report-type-options","report-formats-by-report-type-options","display-formats","reports-by-category-by-report-type","allow-multiple-reports-by-report-type","count-websites","site-name","selected-reports","report-types","segment-editor-activated","saved-segments-by-id"])):Object(l["createCommentVNode"])("",!0),f])],512)}var g=r("19dc"),S=Object(l["createElementVNode"])("div",{class:"clear"},null,-1),R={key:0},E=["innerHTML"],N={id:"emailScheduleInlineHelp",class:"inline-help-node"},V=Object(l["createElementVNode"])("br",null,null,-1),k={id:"emailReportPeriodInlineHelp",class:"inline-help-node"},w=Object(l["createElementVNode"])("br",null,null,-1),_=Object(l["createElementVNode"])("br",null,null,-1),B={key:0,id:"reportHourHelpText",class:"inline-help-node"},T=["textContent"],C={ref:"reportParameters"},P={class:"email"},F={class:"report_evolution_graph"},D={class:"row evolution-graph-period"},x={class:"col s12"},M={for:"report_evolution_period_for_each"},q=["checked"],I=["innerHTML"],A={class:"col s12"},L={for:"report_evolution_period_for_prev"},H=["checked"],G=["value"],U={class:"row"},z={class:"col s12"},W={class:"reportCategory"},Z={class:"listReports"},K=["name","type","id","checked","onChange"],X={key:0,class:"entityInlineHelp"},J=Object(l["createElementVNode"])("br",null,null,-1),Q=["innerHTML"];function Y(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("Field"),a=Object(l["resolveComponent"])("SaveButton"),p=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveDirective"])("form");return Object(l["openBlock"])(),Object(l["createBlock"])(p,{class:"entityAddContainer","content-title":e.translate("ScheduledReports_CreateAndScheduleReport")},{default:Object(l["withCtx"])((function(){return[S,Object(l["withDirectives"])(Object(l["createElementVNode"])("form",{id:"addEditReport",onSubmit:t[13]||(t[13]=function(t){return e.$emit("submit")})},[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"text",name:"website",title:e.translate("General_Website"),disabled:!0,"model-value":e.siteName},null,8,["title","model-value"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"textarea",name:"report_description",title:e.translate("General_Description"),"model-value":e.report.description,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change",{prop:"description",value:t})}),"inline-help":e.translate("ScheduledReports_DescriptionOnFirstPage")},null,8,["title","model-value","inline-help"])]),e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",R,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_segment",title:e.translate("SegmentEditor_ChooseASegment"),"model-value":e.report.idsegment,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change",{prop:"idsegment",value:t})}),options:e.savedSegmentsById},{"inline-help":Object(l["withCtx"])((function(){return[e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:0,id:"reportSegmentInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.reportSegmentInlineHelp)},null,8,E)):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["title","model-value","options"])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_schedule","model-value":e.report.period,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.$emit("change",{prop:"period",value:t}),e.$emit("change",{prop:"periodParam",value:"never"===e.report.period?null:e.report.period})}),title:e.translate("ScheduledReports_EmailSchedule"),options:e.periods},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",N,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_WeeklyScheduleHelp"))+" ",1),V,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MonthlyScheduleHelp")),1)])]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_period","model-value":e.report.periodParam,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.$emit("change",{prop:"periodParam",value:t})}),options:e.paramPeriods,title:e.translate("ScheduledReports_ReportPeriod")},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",k,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp"))+" ",1),w,_,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp2")),1)])]})),_:1},8,["model-value","options","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_hour","model-value":e.report.hour,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.$emit("change",{prop:"hour",value:t})}),title:e.translate("ScheduledReports_ReportHour","X"),options:e.reportHours},{"inline-help":Object(l["withCtx"])((function(){return[0!==e.timezoneOffset&&"0"!==e.timezoneOffset?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",B,[Object(l["createElementVNode"])("span",{textContent:Object(l["toDisplayString"])(e.reportHourUtc)},null,8,T)])):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"report_type",disabled:1===e.reportTypes.length,"model-value":e.report.type,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.$emit("change",{prop:"type",value:t})}),title:e.translate("ScheduledReports_ReportType"),options:e.reportTypeOptions},null,8,["disabled","model-value","title","options"])]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportFormatsByReportTypeOptions,(function(t,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:r},[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"select",name:"report_format",title:e.translate("ScheduledReports_ReportFormat"),class:Object(l["normalizeClass"])(r),"model-value":e.report["format".concat(r)],"onUpdate:modelValue":function(t){return e.$emit("change",{prop:"format".concat(r),value:t})},options:t},null,8,["title","class","model-value","onUpdate:modelValue","options"]),[[l["vShow"],e.report.type===r]])])})),128)),Object(l["createElementVNode"])("div",C,[Object(l["renderSlot"])(e.$slots,"report-parameters")],512),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",P,[Object(l["createVNode"])(c,{uicontrol:"select",name:"display_format","model-value":e.report.displayFormat,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.$emit("change",{prop:"displayFormat",value:t})}),options:e.displayFormats,introduction:e.translate("ScheduledReports_AggregateReportsFormat")},null,8,["model-value","options","introduction"])]),Object(l["createElementVNode"])("div",F,[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"report_evolution_graph",title:e.translate("ScheduledReports_EvolutionGraph",5),"model-value":e.report.evolutionGraph,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.$emit("change",{prop:"evolutionGraph",value:t})})},null,8,["title","model-value"]),[[l["vShow"],-1!==[2,"2",3,"3"].indexOf(e.report.displayFormat)]])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",D,[Object(l["createElementVNode"])("div",x,[Object(l["createElementVNode"])("label",M,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_each",name:"report_evolution_period_for",type:"radio",value:"each",checked:"each"===e.report.evolutionPeriodFor,onChange:t[8]||(t[8]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,q),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.evolutionGraphsShowForEachInPeriod)},null,8,I)])]),Object(l["createElementVNode"])("div",A,[Object(l["createElementVNode"])("label",L,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_prev",name:"report_evolution_period_for",type:"radio",value:"prev",checked:"prev"===e.report.evolutionPeriodFor,onChange:t[9]||(t[9]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,H),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_EvolutionGraphsShowForPreviousN",e.frequencyPeriodPlural))+": ",1),Object(l["createElementVNode"])("input",{type:"number",name:"report_evolution_period_n",value:e.report.evolutionPeriodN,onKeydown:t[10]||(t[10]=function(t){return e.onEvolutionPeriodN(t)}),onChange:t[11]||(t[11]=function(t){return e.onEvolutionPeriodN(t)})},null,40,G)])])])],512),[[l["vShow"],-1!==[1,"1",2,"2",3,"3"].indexOf(e.report.displayFormat)]])],512),[[l["vShow"],"email"===e.report.type&&"csv"!==e.report.formatemail&&"tsv"!==e.report.formatemail]]),Object(l["createElementVNode"])("div",U,[Object(l["createElementVNode"])("h3",z,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportsIncluded")),1)]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportsByCategoryByReportTypeInColumns,(function(t,r){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{name:"reportsList",class:Object(l["normalizeClass"])("row ".concat(r)),key:r},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"col s12 m6",key:o},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:o},[Object(l["createElementVNode"])("h3",W,Object(l["toDisplayString"])(o),1),Object(l["createElementVNode"])("ul",Z,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t){var o;return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:t.uniqueId},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",{name:"".concat(r,"Reports"),type:e.allowMultipleReportsByReportType[r]?"checkbox":"radio",id:"".concat(r).concat(t.uniqueId),checked:null===(o=e.selectedReports[r])||void 0===o?void 0:o[t.uniqueId],onChange:function(o){return e.$emit("toggleSelectedReport",{reportType:r,uniqueId:t.uniqueId})}},null,40,K),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.decode(t.name)),1),"MultiSites_getAll"===t.uniqueId?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",X,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportIncludeNWebsites",e.countWebsites)),1)):Object(l["createCommentVNode"])("",!0)])])})),128))]),J])})),128))])})),128))],2)),[[l["vShow"],e.report.type===r]])})),128)),Object(l["createVNode"])(a,{value:e.saveButtonTitle,onConfirm:t[12]||(t[12]=function(t){return e.$emit("submit")})},null,8,["value"]),Object(l["createElementVNode"])("div",{class:"entityCancel",innerHTML:e.$sanitize(e.entityCancelText)},null,8,Q)],544),[[d]])]})),_:3},8,["content-title"])} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ee(e,t){return"".concat((24+parseFloat(e)+t)%24)}function te(e,t){return ie(e)||le(e,t)||oe(e,t)||re()}function re(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oe(e,t){if(e){if("string"===typeof e)return ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ne(e,t):void 0}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function le(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,l=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(o=r.next()).done);i=!0)if(l.push(o.value),t&&l.length===t)break}catch(a){c=!0,n=a}finally{try{i||null==r["return"]||r["return"]()}finally{if(c)throw n}}return l}}function ie(e){if(Array.isArray(e))return e}var ce=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},selectedReports:Object,paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},siteName:{type:String,required:!0},reportTypes:{type:Object,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0}},emits:["submit","change","toggleSelectedReport"],components:{ContentBlock:g["ContentBlock"],Field:a["Field"],SaveButton:a["SaveButton"]},directives:{Form:a["Form"]},created:function(){this.onEvolutionPeriodN=Object(g["debounce"])(this.onEvolutionPeriodN,50)},methods:{onEvolutionPeriodN:function(e){this.$emit("change",{prop:"evolutionPeriodN",value:e.target.value})},decode:function(e){return g["Matomo"].helper.htmlDecode(e)}},setup:function(e,t){var r=Object(l["ref"])(null),o=Object(l["reactive"])({report:Object.assign({},e.report)});return Object(l["watch"])((function(){return o.report}),(function(r){Object.keys(r).forEach((function(o){r[o]!==e.report[o]&&t.emit("change",{prop:o,value:r[o]})}))}),{deep:!0}),Object(l["watch"])((function(){return e.report}),(function(e){Object.assign(o.report,e),g["Matomo"].helper.getAngularDependency("$timeout")()}),{deep:!0}),Object(l["onMounted"])((function(){var e=r.value;g["Matomo"].helper.compileAngularComponents(e,{params:{manageScheduledReport:o}}),g["Matomo"].helper.compileVueEntryComponents(e,{report:o.report,onChange:function(e,r){t.emit("change",{prop:e,value:r})}})})),{reportParameters:r}},beforeUnmount:function(){var e=this.$refs.reportParameters;g["Matomo"].helper.destroyVueComponent(e)},computed:{reportsByCategoryByReportTypeInColumns:function(){var e=this.reportsByCategoryByReportType,t=Object.entries(e).map((function(e){var t=te(e,2),r=t[0],o=t[1],n=Math.floor((Object.keys(o).length+1)/2),l={},i={},c=l;return Object.entries(o).forEach((function(e){var t=te(e,2),r=t[0],o=t[1];c[r]=o,Object.keys(c).length>=n&&(c=i)})),[r,[l,i]]}));return Object.fromEntries(t)},entityCancelText:function(){return Object(g["translate"])("General_OrCancel",'<a class="entityCancelLink">',"</a>")},frequencyPeriodSingle:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.single},frequencyPeriodPlural:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.plural},evolutionGraphsShowForEachInPeriod:function(){return Object(g["translate"])("ScheduledReports_EvolutionGraphsShowForEachInPeriod","<strong>","</strong>",this.frequencyPeriodSingle)},reportSegmentInlineHelp:function(){return Object(g["translate"])("ScheduledReports_Segment_Help",'<a href="./" rel="noreferrer noopener" target="_blank">',"</a>",Object(g["translate"])("SegmentEditor_DefaultAllVisits"),Object(g["translate"])("SegmentEditor_AddNewSegment"))},timezoneOffset:function(){return g["Matomo"].timezoneOffset},timeZoneDifferenceInHours:function(){return g["Matomo"].timezoneOffset/3600},reportHours:function(){for(var e=[],t=0;t<24;t+=1)2*this.timeZoneDifferenceInHours%2!==0?e.push({key:"".concat(t,".5"),value:"".concat(t,":30")}):e.push({key:"".concat(t),value:"".concat(t)});return e},reportHourUtc:function(){var e=ee(this.report.hour,-this.timeZoneDifferenceInHours);return Object(g["translate"])("ScheduledReports_ReportHourWithUTC",[e])},saveButtonTitle:function(){var e=window,t=e.ReportPlugin,r=this.report.idreport>0;return r?t.updateReportString:t.createReportString}}});ce.render=Y;var ae=ce,pe={class:"first"},de={key:0},se={colspan:"7"},ue=Object(l["createElementVNode"])("br",null,null,-1),me=Object(l["createElementVNode"])("br",null,null,-1),be=Object(l["createTextVNode"])("› "),Oe=["href"],ye=Object(l["createElementVNode"])("br",null,null,-1),je=Object(l["createElementVNode"])("br",null,null,-1),he={key:1},fe={colspan:"7"},ve=Object(l["createElementVNode"])("br",null,null,-1),ge=Object(l["createElementVNode"])("br",null,null,-1),Se=Object(l["createElementVNode"])("br",null,null,-1),Re={class:"first"},Ee={key:0,class:"entityInlineHelp",style:{"font-size":"9pt"}},Ne={key:0},Ve={key:1},ke={key:0},we={key:0},_e=Object(l["createElementVNode"])("br",null,null,-1),Be=["onClick"],Te=["src"],Ce=["id","action"],Pe=["value"],Fe=Object(l["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),De=["onClick","id"],xe=["src"],qe={style:{"text-align":"center","padding-top":"2px"}},Me=["onClick","title"],Ie=Object(l["createElementVNode"])("span",{class:"icon-edit"},null,-1),Ae=[Ie],Le={style:{"text-align":"center","padding-top":"2px"}},He=["onClick","title"],$e=Object(l["createElementVNode"])("span",{class:"icon-delete"},null,-1),Ge=[$e],Ue={class:"tableActionBar"},ze=Object(l["createElementVNode"])("span",{class:"icon-add"},null,-1);function We(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("ContentBlock"),a=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createBlock"])(c,{id:"entityEditContainer",class:"entityTableContainer","help-url":"https://matomo.org/docs/email-reports/",feature:"true","content-title":e.contentTitle},{default:Object(l["withCtx"])((function(){var r;return[Object(l["withDirectives"])(Object(l["createElementVNode"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",pe,Object(l["toDisplayString"])(e.translate("General_Description")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_EmailSchedule")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportFormat")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportTo")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Download")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Edit")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Delete")),1)])]),Object(l["createElementVNode"])("tbody",null,["anonymous"===e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",de,[Object(l["createElementVNode"])("td",se,[ue,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MustBeLoggedIn"))+" ",1),me,be,Object(l["createElementVNode"])("a",{href:"index.php?module=".concat(e.loginModule)},Object(l["toDisplayString"])(e.translate("Login_LogIn")),9,Oe),ye,je])])):null!==(r=e.reports)&&void 0!==r&&r.length?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",he,[Object(l["createElementVNode"])("td",fe,[ve,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ThereIsNoReportToManage",e.siteName))+". ",1),ge,Se])])),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.decodedReports,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:t.idreport},[Object(l["createElementVNode"])("td",Re,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.description)+" ",1),e.segmentEditorActivated&&t.idsegment?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ee,[e.savedSegmentsById[t.idsegment]?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Ne,Object(l["toDisplayString"])(e.savedSegmentsById[t.idsegment]),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Ve,Object(l["toDisplayString"])(e.translate("ScheduledReports_SegmentDeleted")),1))])):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.periods[t.period]),1),Object(l["createElementVNode"])("td",null,[t.format?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ke,Object(l["toDisplayString"])(t.format.toUpperCase()),1)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[0===t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",we,Object(l["toDisplayString"])(e.translate("ScheduledReports_NoRecipients")),1)):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.recipients,(function(e,t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("span",{key:t},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e)+" ",1),_e])})),128)),0!==t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:1,href:"#",name:"linkSendNow",class:"link_but withIcon",style:{"margin-top":"3px"},onClick:Object(l["withModifiers"])((function(r){return e.$emit("sendnow",t.idreport)}),["prevent"])},[Object(l["createElementVNode"])("img",{border:"0",src:e.reportTypes[t.type]},null,8,Te),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportNow")),1)],8,Be)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("form",{method:"POST",target:"_blank",id:"downloadReportForm_".concat(t.idreport),action:e.linkTo({module:"API",segment:null,method:"ScheduledReports.generateReport",idReport:t.idreport,outputType:e.downloadOutputType,language:e.language,format:-1!==["html","csv","tsv"].indexOf(t.format)?t.format:"original"})},[Object(l["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.token_auth},null,8,Pe),Fe],8,Ce),Object(l["createElementVNode"])("a",{href:"",rel:"noreferrer noopener",name:"linkDownloadReport",class:"link_but withIcon",onClick:Object(l["withModifiers"])((function(r){return e.displayReport(t.idreport)}),["prevent"]),id:t.idreport},[Object(l["createElementVNode"])("img",{border:"0",width:16,height:16,src:e.reportFormatsByReportType[t.type][t.format]},null,8,xe),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Download")),1)],8,De)]),Object(l["createElementVNode"])("td",qe,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("edit",t.idreport)},title:e.translate("General_Edit")},Ae,8,Me)]),Object(l["createElementVNode"])("td",Le,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("delete",t.idreport)},title:e.translate("General_Delete")},Ge,8,He)])])})),128))])],512),[[a]]),Object(l["createElementVNode"])("div",Ue,["anonymous"!==e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("button",{key:0,id:"add-report",onClick:t[0]||(t[0]=function(t){return e.$emit("create")})},[ze,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_CreateAndScheduleReport")),1)])):Object(l["createCommentVNode"])("",!0)])]})),_:1},8,["content-title"])}var Ze=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},reportTypes:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{ContentTable:g["ContentTable"]},emits:["create","edit","delete","sendnow"],methods:{linkTo:function(e){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),e)))},displayReport:function(e){$("#downloadReportForm_".concat(e)).submit()}},computed:{token_auth:function(){return g["Matomo"].token_auth},decodedReports:function(){return this.reports.map((function(e){return Object.assign(Object.assign({},e),{},{description:g["Matomo"].helper.htmlDecode(e.description)})}))}}});Ze.render=We;var Ke=Ze;function Xe(){g["Matomo"].helper.lazyScrollTo(".emailReports",200)}function Je(e,t){var r;null!==(r=window.updateReportParametersFunctions)&&void 0!==r&&r[e]&&window.updateReportParametersFunctions[e](t)}function Qe(e,t){var r;null!==(r=window.resetReportParametersFunctions)&&void 0!==r&&r[e]&&window.resetReportParametersFunctions[e](t)}window.resetReportParametersFunctions=window.resetReportParametersFunctions||{},window.updateReportParametersFunctions=window.updateReportParametersFunctions||{},window.getReportParametersFunctions=window.getReportParametersFunctions||{};var Ye=window,et=Ye.$,tt=g["Matomo"].timezoneOffset/3600,rt=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},reportTypes:{type:Object,required:!0}},components:{AddReport:ae,ListReports:Ke},directives:{ContentTable:g["ContentTable"],Form:a["Form"]},mounted:function(){var e=this;et(this.$refs.root).on("click","a.entityCancelLink",(function(){e.showListOfReports()}))},data:function(){return{showReportsList:!0,report:{},selectedReports:{}}},methods:{sendReportNow:function(e){var t=this;Xe(),g["AjaxHelper"].post({method:"ScheduledReports.sendReport"},{idReport:e,force:!0}).then((function(){t.fadeInOutSuccessMessage(t.$refs.reportSentSuccess,Object(g["translate"])("ScheduledReports_ReportSent"),!1)}))},formSetEditReport:function(e){var t=this,r=window,o=r.ReportPlugin,n={idreport:e,type:o.defaultReportType,format:o.defaultReportFormat,description:"",period:o.defaultPeriod,hour:o.defaultHour,reports:[],idsegment:"",evolutionPeriodFor:"prev",evolutionPeriodN:o.defaultEvolutionPeriodN,periodParam:o.defaultPeriod};e>0?(n=o.reportList[e],Je(n.type,n)):Qe(n.type,n),n.hour=ee(n.hour,tt),this.selectedReports={},Object.values(n.reports).forEach((function(e){t.selectedReports[n.type]=t.selectedReports[n.type]||{},t.selectedReports[n.type][e]=!0})),n["format".concat(n.type)]=n.format,n.idsegment||(n.idsegment=""),this.report=n,this.report.description=g["Matomo"].helper.htmlDecode(n.description)},fadeInOutSuccessMessage:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g["NotificationsStore"].show({message:t,placeat:e,context:"success",noclear:!0,type:"toast",style:{display:"inline-block",marginTop:"10px"},id:"scheduledReportSuccess"}),r&&g["Matomo"].helper.refreshAfter(2)},changedReportType:function(){Qe(this.report.type,this.report)},deleteReport:function(e){g["Matomo"].helper.modalConfirm("#confirm",{yes:function(){g["AjaxHelper"].post({method:"ScheduledReports.deleteReport"},{idReport:e},{redirectOnSuccess:!0})}})},showListOfReports:function(e){this.showReportsList=!0,g["Matomo"].helper.hideAjaxError(),("undefined"===typeof e||e)&&Xe()},createReport:function(){var e=this;this.showReportsList=!1,Object(l["nextTick"])((function(){e.formSetEditReport(0)}))},editReport:function(e){var t=this;this.showReportsList=!1,Object(l["nextTick"])((function(){t.formSetEditReport(e)}))},submitReport:function(){var e=this,t={idReport:this.report.idreport,description:this.report.description,idSegment:this.report.idsegment,reportType:this.report.type,reportFormat:this.report["format".concat(this.report.type)],periodParam:this.report.periodParam,evolutionPeriodFor:this.report.evolutionPeriodFor};"each"!==t.evolutionPeriodFor&&(t.evolutionPeriodN=this.report.evolutionPeriodN);var r=this.report.period,o=ee(this.report.hour,-tt),n=this.selectedReports[t.reportType]||{},l=Object.keys(n).filter((function(r){return e.selectedReports[t.reportType][r]}));l.length>0&&(t.reports=l);var i=window.getReportParametersFunctions[this.report.type](this.report);t.parameters=i;var c=this.report.idreport>0;return g["AjaxHelper"].post({method:c?"ScheduledReports.updateReport":"ScheduledReports.addReport",period:r,hour:o},t).then((function(){e.fadeInOutSuccessMessage(e.$refs.reportUpdatedSuccess,Object(g["translate"])("ScheduledReports_ReportUpdated"))})),!1},onChangeProperty:function(e,t){this.report[e]=t,"type"===e&&this.changedReportType()},toggleSelectedReport:function(e,t){this.selectedReports[e]=this.selectedReports[e]||{},this.selectedReports[e][t]=!this.selectedReports[e][t]}},computed:{showReportForm:function(){return!this.showReportsList},decodedSiteName:function(){return g["Matomo"].helper.htmlDecode(this.siteName)}}});rt.render=v;var ot=rt; + */function ee(e,t){return"".concat((24+parseFloat(e)+t)%24)}function te(e,t){return ie(e)||le(e,t)||oe(e,t)||re()}function re(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oe(e,t){if(e){if("string"===typeof e)return ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ne(e,t):void 0}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function le(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,l=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(o=r.next()).done);i=!0)if(l.push(o.value),t&&l.length===t)break}catch(a){c=!0,n=a}finally{try{i||null==r["return"]||r["return"]()}finally{if(c)throw n}}return l}}function ie(e){if(Array.isArray(e))return e}var ce=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},selectedReports:Object,paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},siteName:{type:String,required:!0},reportTypes:{type:Object,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0}},emits:["submit","change","toggleSelectedReport"],components:{ContentBlock:g["ContentBlock"],Field:a["Field"],SaveButton:a["SaveButton"]},directives:{Form:a["Form"]},created:function(){this.onEvolutionPeriodN=Object(g["debounce"])(this.onEvolutionPeriodN,50)},methods:{onEvolutionPeriodN:function(e){this.$emit("change",{prop:"evolutionPeriodN",value:e.target.value})},decode:function(e){return g["Matomo"].helper.htmlDecode(e)}},setup:function(e,t){var r=Object(l["ref"])(null),o=Object(l["reactive"])({report:Object.assign({},e.report)});return Object(l["watch"])((function(){return o.report}),(function(r){Object.keys(r).forEach((function(o){r[o]!==e.report[o]&&t.emit("change",{prop:o,value:r[o]})}))}),{deep:!0}),Object(l["watch"])((function(){return e.report}),(function(e){Object.assign(o.report,e),g["Matomo"].helper.getAngularDependency("$timeout")()}),{deep:!0}),Object(l["onMounted"])((function(){var e=r.value;g["Matomo"].helper.compileAngularComponents(e,{params:{manageScheduledReport:o}}),g["Matomo"].helper.compileVueEntryComponents(e,{report:o.report,onChange:function(e,r){t.emit("change",{prop:e,value:r})}})})),{reportParameters:r}},beforeUnmount:function(){var e=this.$refs.reportParameters;g["Matomo"].helper.destroyVueComponent(e)},computed:{reportsByCategoryByReportTypeInColumns:function(){var e=this.reportsByCategoryByReportType,t=Object.entries(e).map((function(e){var t=te(e,2),r=t[0],o=t[1],n=Math.floor((Object.keys(o).length+1)/2),l={},i={},c=l;return Object.entries(o).forEach((function(e){var t=te(e,2),r=t[0],o=t[1];c[r]=o,Object.keys(c).length>=n&&(c=i)})),[r,[l,i]]}));return Object.fromEntries(t)},entityCancelText:function(){return Object(g["translate"])("General_OrCancel",'<a class="entityCancelLink">',"</a>")},frequencyPeriodSingle:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.single},frequencyPeriodPlural:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.plural},evolutionGraphsShowForEachInPeriod:function(){return Object(g["translate"])("ScheduledReports_EvolutionGraphsShowForEachInPeriod","<strong>","</strong>",this.frequencyPeriodSingle)},reportSegmentInlineHelp:function(){return Object(g["translate"])("ScheduledReports_Segment_Help",'<a href="./" rel="noreferrer noopener" target="_blank">',"</a>",Object(g["translate"])("SegmentEditor_DefaultAllVisits"),Object(g["translate"])("SegmentEditor_AddNewSegment"))},timezoneOffset:function(){return g["Matomo"].timezoneOffset},timeZoneDifferenceInHours:function(){return g["Matomo"].timezoneOffset/3600},reportHours:function(){for(var e=[],t=0;t<24;t+=1)2*this.timeZoneDifferenceInHours%2!==0?e.push({key:"".concat(t,".5"),value:"".concat(t,":30")}):e.push({key:"".concat(t),value:"".concat(t)});return e},reportHourUtc:function(){var e=ee(this.report.hour,-this.timeZoneDifferenceInHours);return Object(g["translate"])("ScheduledReports_ReportHourWithUTC",[e])},saveButtonTitle:function(){var e=window,t=e.ReportPlugin,r=this.report.idreport>0;return r?t.updateReportString:t.createReportString}}});ce.render=Y;var ae=ce,pe={class:"first"},de={key:0},se={colspan:"7"},ue=Object(l["createElementVNode"])("br",null,null,-1),me=Object(l["createElementVNode"])("br",null,null,-1),be=Object(l["createTextVNode"])("› "),Oe=["href"],ye=Object(l["createElementVNode"])("br",null,null,-1),je=Object(l["createElementVNode"])("br",null,null,-1),he={key:1},fe={colspan:"7"},ve=Object(l["createElementVNode"])("br",null,null,-1),ge=Object(l["createElementVNode"])("br",null,null,-1),Se=Object(l["createElementVNode"])("br",null,null,-1),Re={class:"first"},Ee={key:0,class:"entityInlineHelp",style:{"font-size":"9pt"}},Ne={key:0},Ve={key:1},ke={key:0},we={key:0},_e=Object(l["createElementVNode"])("br",null,null,-1),Be=["onClick"],Te=["src"],Ce=["id","action"],Pe=["value"],Fe=Object(l["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),De=["onClick","id"],xe=["src"],Me={style:{"text-align":"center","padding-top":"2px"}},qe=["onClick","title"],Ie=Object(l["createElementVNode"])("span",{class:"icon-edit"},null,-1),Ae=[Ie],Le={style:{"text-align":"center","padding-top":"2px"}},$e=["onClick","title"],He=Object(l["createElementVNode"])("span",{class:"icon-delete"},null,-1),Ge=[He],Ue={class:"tableActionBar"},ze=Object(l["createElementVNode"])("span",{class:"icon-add"},null,-1);function We(e,t,r,o,n,i){var c=Object(l["resolveComponent"])("ContentBlock"),a=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createBlock"])(c,{id:"entityEditContainer",class:"entityTableContainer","help-url":"https://matomo.org/docs/email-reports/",feature:"true","content-title":e.contentTitle},{default:Object(l["withCtx"])((function(){var r;return[Object(l["withDirectives"])(Object(l["createElementVNode"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",pe,Object(l["toDisplayString"])(e.translate("General_Description")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_EmailSchedule")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportFormat")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportTo")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Download")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Edit")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Delete")),1)])]),Object(l["createElementVNode"])("tbody",null,["anonymous"===e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",de,[Object(l["createElementVNode"])("td",se,[ue,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MustBeLoggedIn"))+" ",1),me,be,Object(l["createElementVNode"])("a",{href:"index.php?module=".concat(e.loginModule)},Object(l["toDisplayString"])(e.translate("Login_LogIn")),9,Oe),ye,je])])):null!==(r=e.reports)&&void 0!==r&&r.length?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",he,[Object(l["createElementVNode"])("td",fe,[ve,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ThereIsNoReportToManage",e.siteName))+". ",1),ge,Se])])),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.decodedReports,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:t.idreport},[Object(l["createElementVNode"])("td",Re,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.description)+" ",1),e.segmentEditorActivated&&t.idsegment?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ee,[e.savedSegmentsById[t.idsegment]?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Ne,Object(l["toDisplayString"])(e.savedSegmentsById[t.idsegment]),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Ve,Object(l["toDisplayString"])(e.translate("ScheduledReports_SegmentDeleted")),1))])):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.periods[t.period]),1),Object(l["createElementVNode"])("td",null,[t.format?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ke,Object(l["toDisplayString"])(t.format.toUpperCase()),1)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[0===t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",we,Object(l["toDisplayString"])(e.translate("ScheduledReports_NoRecipients")),1)):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.recipients,(function(e,t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("span",{key:t},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e)+" ",1),_e])})),128)),0!==t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:1,href:"#",name:"linkSendNow",class:"link_but withIcon",style:{"margin-top":"3px"},onClick:Object(l["withModifiers"])((function(r){return e.$emit("sendnow",t.idreport)}),["prevent"])},[Object(l["createElementVNode"])("img",{border:"0",src:e.reportTypes[t.type]},null,8,Te),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportNow")),1)],8,Be)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("form",{method:"POST",target:"_blank",id:"downloadReportForm_".concat(t.idreport),action:e.linkTo({module:"API",segment:null,method:"ScheduledReports.generateReport",idReport:t.idreport,outputType:e.downloadOutputType,language:e.language,format:-1!==["html","csv","tsv"].indexOf(t.format)?t.format:"original"})},[Object(l["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.token_auth},null,8,Pe),Fe],8,Ce),Object(l["createElementVNode"])("a",{href:"",rel:"noreferrer noopener",name:"linkDownloadReport",class:"link_but withIcon",onClick:Object(l["withModifiers"])((function(r){return e.displayReport(t.idreport)}),["prevent"]),id:t.idreport},[Object(l["createElementVNode"])("img",{border:"0",width:16,height:16,src:e.reportFormatsByReportType[t.type][t.format]},null,8,xe),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Download")),1)],8,De)]),Object(l["createElementVNode"])("td",Me,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("edit",t.idreport)},title:e.translate("General_Edit")},Ae,8,qe)]),Object(l["createElementVNode"])("td",Le,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("delete",t.idreport)},title:e.translate("General_Delete")},Ge,8,$e)])])})),128))])],512),[[a]]),Object(l["createElementVNode"])("div",Ue,["anonymous"!==e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("button",{key:0,id:"add-report",onClick:t[0]||(t[0]=function(t){return e.$emit("create")})},[ze,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_CreateAndScheduleReport")),1)])):Object(l["createCommentVNode"])("",!0)])]})),_:1},8,["content-title"])}var Ze=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},reportTypes:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{ContentTable:g["ContentTable"]},emits:["create","edit","delete","sendnow"],methods:{linkTo:function(e){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),e)))},displayReport:function(e){$("#downloadReportForm_".concat(e)).submit()}},computed:{token_auth:function(){return g["Matomo"].token_auth},decodedReports:function(){return this.reports.map((function(e){return Object.assign(Object.assign({},e),{},{description:g["Matomo"].helper.htmlDecode(e.description)})}))}}});Ze.render=We;var Ke=Ze;function Xe(){g["Matomo"].helper.lazyScrollTo(".emailReports",200)}function Je(e,t){var r;null!==(r=window.updateReportParametersFunctions)&&void 0!==r&&r[e]&&window.updateReportParametersFunctions[e](t)}function Qe(e,t){var r;null!==(r=window.resetReportParametersFunctions)&&void 0!==r&&r[e]&&window.resetReportParametersFunctions[e](t)}window.resetReportParametersFunctions=window.resetReportParametersFunctions||{},window.updateReportParametersFunctions=window.updateReportParametersFunctions||{},window.getReportParametersFunctions=window.getReportParametersFunctions||{};var Ye=window,et=Ye.$,tt=g["Matomo"].timezoneOffset/3600,rt=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},reportTypes:{type:Object,required:!0}},components:{AddReport:ae,ListReports:Ke},directives:{ContentTable:g["ContentTable"],Form:a["Form"]},mounted:function(){var e=this;et(this.$refs.root).on("click","a.entityCancelLink",(function(){e.showListOfReports()})),g["Matomo"].postEvent("ScheduledReports.ManageScheduledReport.mounted",{element:this.$refs.root})},unmounted:function(){g["Matomo"].postEvent("ScheduledReports.ManageScheduledReport.unmounted",{element:this.$refs.root})},data:function(){return{showReportsList:!0,report:{},selectedReports:{}}},methods:{sendReportNow:function(e){var t=this;Xe(),g["AjaxHelper"].post({method:"ScheduledReports.sendReport"},{idReport:e,force:!0}).then((function(){t.fadeInOutSuccessMessage(t.$refs.reportSentSuccess,Object(g["translate"])("ScheduledReports_ReportSent"),!1)}))},formSetEditReport:function(e){var t=this,r=window,o=r.ReportPlugin,n={idreport:e,type:o.defaultReportType,format:o.defaultReportFormat,description:"",period:o.defaultPeriod,hour:o.defaultHour,reports:[],idsegment:"",evolutionPeriodFor:"prev",evolutionPeriodN:o.defaultEvolutionPeriodN,periodParam:o.defaultPeriod};e>0?(n=o.reportList[e],Je(n.type,n)):Qe(n.type,n),n.hour=ee(n.hour,tt),this.selectedReports={},Object.values(n.reports).forEach((function(e){t.selectedReports[n.type]=t.selectedReports[n.type]||{},t.selectedReports[n.type][e]=!0})),n["format".concat(n.type)]=n.format,n.idsegment||(n.idsegment=""),this.report=n,this.report.description=g["Matomo"].helper.htmlDecode(n.description)},fadeInOutSuccessMessage:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g["NotificationsStore"].show({message:t,placeat:e,context:"success",noclear:!0,type:"toast",style:{display:"inline-block",marginTop:"10px"},id:"scheduledReportSuccess"}),r&&g["Matomo"].helper.refreshAfter(2)},changedReportType:function(){Qe(this.report.type,this.report)},deleteReport:function(e){g["Matomo"].helper.modalConfirm("#confirm",{yes:function(){g["AjaxHelper"].post({method:"ScheduledReports.deleteReport"},{idReport:e},{redirectOnSuccess:!0})}})},showListOfReports:function(e){this.showReportsList=!0,g["Matomo"].helper.hideAjaxError(),("undefined"===typeof e||e)&&Xe()},createReport:function(){var e=this;this.showReportsList=!1,Object(l["nextTick"])((function(){e.formSetEditReport(0)}))},editReport:function(e){var t=this;this.showReportsList=!1,Object(l["nextTick"])((function(){t.formSetEditReport(e)}))},submitReport:function(){var e=this,t={idReport:this.report.idreport,description:this.report.description,idSegment:this.report.idsegment,reportType:this.report.type,reportFormat:this.report["format".concat(this.report.type)],periodParam:this.report.periodParam,evolutionPeriodFor:this.report.evolutionPeriodFor};"each"!==t.evolutionPeriodFor&&(t.evolutionPeriodN=this.report.evolutionPeriodN);var r=this.report.period,o=ee(this.report.hour,-tt),n=this.selectedReports[t.reportType]||{},l=Object.keys(n).filter((function(r){return e.selectedReports[t.reportType][r]}));l.length>0&&(t.reports=l);var i=window.getReportParametersFunctions[this.report.type](this.report);t.parameters=i;var c=this.report.idreport>0;return g["AjaxHelper"].post({method:c?"ScheduledReports.updateReport":"ScheduledReports.addReport",period:r,hour:o},t).then((function(){e.fadeInOutSuccessMessage(e.$refs.reportUpdatedSuccess,Object(g["translate"])("ScheduledReports_ReportUpdated"))})),!1},onChangeProperty:function(e,t){this.report[e]=t,"type"===e&&this.changedReportType()},toggleSelectedReport:function(e,t){this.selectedReports[e]=this.selectedReports[e]||{},this.selectedReports[e][t]=!this.selectedReports[e][t]}},computed:{showReportForm:function(){return!this.showReportsList},decodedSiteName:function(){return g["Matomo"].helper.htmlDecode(this.siteName)}}});rt.render=v;var ot=rt; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue b/plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue index 7aa6a1846a..0b8ea1966a 100644 --- a/plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue +++ b/plugins/ScheduledReports/vue/src/ManageScheduledReport/ManageScheduledReport.vue @@ -202,6 +202,15 @@ export default defineComponent({ $(this.$refs.root as HTMLElement).on('click', 'a.entityCancelLink', () => { this.showListOfReports(); }); + + Matomo.postEvent('ScheduledReports.ManageScheduledReport.mounted', { + element: this.$refs.root, + }); + }, + unmounted() { + Matomo.postEvent('ScheduledReports.ManageScheduledReport.unmounted', { + element: this.$refs.root, + }); }, data(): ManageScheduledReportState { return { |