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/MultiSites | |
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/MultiSites')
4 files changed, 124 insertions, 100 deletions
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}` |