From 8fa525fa6d970c432ac34737250ede49dd77a509 Mon Sep 17 00:00:00 2001 From: Marc Neudert Date: Mon, 1 Jul 2024 15:06:27 +0200 Subject: [PATCH] Build vue components --- plugins/MultiSites/vue/dist/MultiSites.umd.js | 1194 ++++++++++++++++- .../MultiSites/vue/dist/MultiSites.umd.min.js | 10 +- 2 files changed, 1156 insertions(+), 48 deletions(-) diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index cd9f566388da..6e9768906ff2 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -118,6 +118,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; __webpack_require__.r(__webpack_exports__); // EXPORTS +__webpack_require__.d(__webpack_exports__, "AllWebsitesDashboard", function() { return /* reexport */ AllWebsitesDashboard; }); __webpack_require__.d(__webpack_exports__, "MultisitesSite", function() { return /* reexport */ MultisitesSite; }); __webpack_require__.d(__webpack_exports__, "DashboadStore", function() { return /* reexport */ Dashboard_store; }); __webpack_require__.d(__webpack_exports__, "Dashboard", function() { return /* reexport */ Dashboard; }); @@ -141,78 +142,1181 @@ if (typeof window !== 'undefined') { // 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/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=template&id=1b51d230 + +var _hoisted_1 = { + class: "dashboardHeader" +}; +var _hoisted_2 = { + class: "card-title" +}; +var _hoisted_3 = { + key: 0, + id: "periodString", + class: "borderedControl" +}; +var _hoisted_4 = { + class: "dashboardControls" +}; +var _hoisted_5 = { + class: "siteSearch" +}; +var _hoisted_6 = ["placeholder"]; +var _hoisted_7 = ["title"]; +var _hoisted_8 = ["href"]; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); + + var _component_PeriodSelector = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodSelector"); + + var _component_KPICardContainer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("KPICardContainer"); + + var _component_SitesTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SitesTable"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), 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_["createElementVNode"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h1", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + "feature-name": _ctx.translate('MultiSites_AllWebsitesDashboardTitle') + }, { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('MultiSites_AllWebsitesDashboardTitle')), 1)]; + }), + _: 1 + }, 8, ["feature-name"])]), !_ctx.isWidgetized ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodSelector, { + periods: _ctx.selectablePeriods + }, null, 8, ["periods"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_KPICardContainer, { + "is-loading": _ctx.isLoadingKPIs, + "model-value": _ctx.kpis + }, null, 8, ["is-loading", "model-value"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + type: "text", + onKeydown: _cache[0] || (_cache[0] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function ($event) { + return _ctx.searchSite(_ctx.searchTerm); + }, ["enter"])), + "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { + return _ctx.searchTerm = $event; + }), + placeholder: _ctx.translate('Actions_SubmenuSitesearch') + }, null, 40, _hoisted_6), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon-search", + onClick: _cache[2] || (_cache[2] = function ($event) { + return _ctx.searchSite(_ctx.searchTerm); + }), + title: _ctx.translate('General_ClickToSearch') + }, null, 8, _hoisted_7)]), !_ctx.isWidgetized && _ctx.isUserAllowedToAddSite ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, + class: "btn", + href: _ctx.addSiteUrl + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_AddSite')), 9, _hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SitesTable, { + "display-revenue": _ctx.displayRevenue, + "display-sparklines": _ctx.displaySparklines + }, null, 8, ["display-revenue", "display-sparklines"])], 64); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=template&id=1b51d230 + +// EXTERNAL MODULE: external "CoreHome" +var external_CoreHome_ = __webpack_require__("19dc"); + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + + + +var AllWebsitesDashboard_store_DashboardStore = /*#__PURE__*/function () { + function DashboardStore() { + var _this = this; + + _classCallCheck(this, DashboardStore); + + _defineProperty(this, "fetchAbort", null); + + _defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ + dashboardKPIs: { + evolutionPeriod: 'day', + hits: '?', + hitsEvolution: '', + hitsTrend: 0, + pageviews: '?', + pageviewsEvolution: '', + pageviewsTrend: 0, + revenue: '?', + revenueEvolution: '', + revenueTrend: 0, + visits: '?', + visitsEvolution: '', + visitsTrend: 0 + }, + dashboardSites: [], + errorLoading: false, + isLoadingKPIs: false, + isLoadingSites: false, + numSites: 0, + paginationCurrentPage: 0, + sparklineDate: '', + sortColumn: 'nb_visits', + sortOrder: 'desc' + })); + + _defineProperty(this, "autoRefreshInterval", 0); + + _defineProperty(this, "autoRefreshTimeout", null); + + _defineProperty(this, "pageSize", 25); + + _defineProperty(this, "searchTerm", ''); + + _defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); + })); + + _defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Math.ceil(_this.state.value.numSites / _this.pageSize - 1); + })); + + _defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Math.ceil(_this.state.value.paginationCurrentPage * _this.pageSize); + })); + + _defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + if (_this.state.value.numSites === 0) { + return 0; + } + + return 1 + _this.currentPagingOffset.value; + })); + + _defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + if (_this.state.value.numSites === 0) { + return 0; + } + + var end = _this.pageSize + _this.currentPagingOffset.value; + var max = _this.state.value.numSites; + + if (end < max) { + return end; + } + + return max; + })); + } + + _createClass(DashboardStore, [{ + key: "refreshData", + value: function refreshData() { + var _this2 = this; + + var onlySites = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.fetchAbort) { + this.fetchAbort.abort(); + this.fetchAbort = null; + this.cancelAutoRefresh(); + } + + this.fetchAbort = new AbortController(); + this.privateState.errorLoading = false; + this.privateState.isLoadingKPIs = !onlySites; + this.privateState.isLoadingSites = true; + var params = { + method: 'MultiSites.mockDashboardData', + filter_limit: this.pageSize, + filter_offset: this.currentPagingOffset.value, + filter_sort_column: this.privateState.sortColumn, + filter_sort_order: this.privateState.sortOrder, + showColumns: ['hits_evolution', 'hits_evolution_trend', 'label', 'nb_hits', 'nb_pageviews', 'nb_visits', 'pageviews_evolution', 'pageviews_evolution_trend', 'revenue', 'revenue_evolution', 'revenue_evolution_trend', 'visits_evolution', 'visits_evolution_trend'].join(',') + }; + + if (this.searchTerm) { + params.pattern = this.searchTerm; + } + + return external_CoreHome_["AjaxHelper"].fetch(params, { + abortController: this.fetchAbort + }).then(function (response) { + if (!onlySites) { + _this2.updateDashboardKPIs(response); + } + + _this2.updateDashboardSites(response); + }).catch(function () { + _this2.privateState.dashboardSites = []; + _this2.privateState.errorLoading = true; + }).finally(function () { + _this2.privateState.isLoadingKPIs = false; + _this2.privateState.isLoadingSites = false; + _this2.fetchAbort = null; + + _this2.startAutoRefresh(); + }); + } + }, { + key: "navigateNextPage", + value: function navigateNextPage() { + if (this.privateState.paginationCurrentPage === this.numberOfPages.value) { + return; + } + + this.privateState.paginationCurrentPage += 1; + this.refreshData(true); + } + }, { + key: "navigatePreviousPage", + value: function navigatePreviousPage() { + if (this.privateState.paginationCurrentPage === 0) { + return; + } + + this.privateState.paginationCurrentPage -= 1; + this.refreshData(true); + } + }, { + key: "searchSite", + value: function searchSite(term) { + this.searchTerm = term; + this.privateState.paginationCurrentPage = 0; + this.refreshData(true); + } + }, { + key: "setAutoRefreshInterval", + value: function setAutoRefreshInterval(interval) { + this.autoRefreshInterval = interval; + } + }, { + key: "setPageSize", + value: function setPageSize(size) { + this.pageSize = size; + } + }, { + key: "sortBy", + value: function sortBy(column) { + if (this.privateState.sortColumn === column) { + this.privateState.sortOrder = this.privateState.sortOrder === 'desc' ? 'asc' : 'desc'; + } else { + this.privateState.sortOrder = column === 'label' ? 'asc' : 'desc'; + } + + this.privateState.sortColumn = column; + this.refreshData(true); + } + }, { + key: "cancelAutoRefresh", + value: function cancelAutoRefresh() { + if (!this.autoRefreshTimeout) { + return; + } + + clearTimeout(this.autoRefreshTimeout); + this.autoRefreshTimeout = null; + } + }, { + key: "startAutoRefresh", + value: function startAutoRefresh() { + var _this3 = this; + + this.cancelAutoRefresh(); + + if (this.autoRefreshInterval <= 0) { + return; + } + + var currentPeriod; + + try { + currentPeriod = external_CoreHome_["Periods"].parse(external_CoreHome_["Matomo"].period, external_CoreHome_["Matomo"].currentDateString); + } catch (e) {// gracefully ignore period parsing errors + } + + if (!currentPeriod || !currentPeriod.containsToday()) { + return; + } + + this.autoRefreshTimeout = setTimeout(function () { + _this3.autoRefreshTimeout = null; + + _this3.refreshData(); + }, this.autoRefreshInterval * 1000); + } + }, { + key: "updateDashboardKPIs", + value: function updateDashboardKPIs(response) { + this.privateState.dashboardKPIs = { + evolutionPeriod: external_CoreHome_["Matomo"].period, + hits: response.totals.nb_hits, + hitsEvolution: response.totals.hits_evolution, + hitsTrend: response.totals.hits_evolution_trend, + pageviews: response.totals.nb_pageviews, + pageviewsEvolution: response.totals.pageviews_evolution, + pageviewsTrend: response.totals.pageviews_evolution_trend, + revenue: response.totals.revenue, + revenueEvolution: response.totals.revenue_evolution, + revenueTrend: response.totals.revenue_evolution_trend, + visits: response.totals.nb_visits, + visitsEvolution: response.totals.visits_evolution, + visitsTrend: response.totals.visits_evolution_trend + }; + } + }, { + key: "updateDashboardSites", + value: function updateDashboardSites(response) { + this.privateState.dashboardSites = response.sites; + this.privateState.numSites = response.numSites; + this.privateState.sparklineDate = response.sparklineDate; + } + }]); + + return DashboardStore; +}(); + +/* harmony default export */ var AllWebsitesDashboard_store = (new AllWebsitesDashboard_store_DashboardStore()); +// 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/AllWebsitesDashboard/KPICardContainer.vue?vue&type=template&id=87c62b90 + +var KPICardContainervue_type_template_id_87c62b90_hoisted_1 = { + class: "kpiCardContainer" +}; +var KPICardContainervue_type_template_id_87c62b90_hoisted_2 = { + key: 0, + class: "kpiCard kpiCardLoading" +}; + +var KPICardContainervue_type_template_id_87c62b90_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + class: "kpiCardTitle" +}, " ", -1); + +var KPICardContainervue_type_template_id_87c62b90_hoisted_4 = { + class: "kpiCardValue" +}; + +var KPICardContainervue_type_template_id_87c62b90_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + class: "kpiCardEvolution" +}, [/*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "kpiCardEvolutionTrend" +}, " ")], -1); + +var KPICardContainervue_type_template_id_87c62b90_hoisted_6 = { + key: 0, + class: "kpiCardBadge" +}; +function KPICardContainervue_type_template_id_87c62b90_render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); + + var _component_KPICard = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("KPICard"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_1, [_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_2, [KPICardContainervue_type_template_id_87c62b90_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader)]), KPICardContainervue_type_template_id_87c62b90_hoisted_5, _ctx.hasKpiBadge ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_6, " ")) : 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"], { + key: 1 + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.kpis, function (kpi, index) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: "kpi-card-".concat(index) + }, [index > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ + kpiCardDivider: true, + kpiCardDividerBadge: _ctx.hasKpiBadge + }) + }, " ", 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_KPICard, { + "model-value": kpi + }, null, 8, ["model-value"])], 64); + }), 128))]); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=template&id=87c62b90 + +// 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/AllWebsitesDashboard/KPICard.vue?vue&type=template&id=3c2758fa + +var KPICardvue_type_template_id_3c2758fa_hoisted_1 = { + class: "kpiCard" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_2 = { + class: "kpiCardTitle" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_3 = { + class: "kpiCardValue" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_4 = { + class: "kpiCardEvolution" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_5 = { + key: 1, + class: "kpiCardEvolution" +}; + +var KPICardvue_type_template_id_3c2758fa_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "kpiCardEvolutionTrend" +}, " ", -1); + +var KPICardvue_type_template_id_3c2758fa_hoisted_7 = [KPICardvue_type_template_id_3c2758fa_hoisted_6]; +var KPICardvue_type_template_id_3c2758fa_hoisted_8 = ["innerHTML"]; +function KPICardvue_type_template_id_3c2758fa_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"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardIcon ".concat(_ctx.kpi.icon)) + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.kpi.title)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.value), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_4, [_ctx.kpi.evolutionValue !== '' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardEvolutionTrend ".concat(_ctx.evolutionTrendClass)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardEvolutionIcon ".concat(_ctx.evolutionTrendIcon)) + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.evolutionValue), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.evolutionTrendFrom)), 1)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_5, KPICardvue_type_template_id_3c2758fa_hoisted_7))]), _ctx.kpi.badge ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 0, + innerHTML: _ctx.$sanitize(_ctx.kpi.badge), + class: "kpiCardBadge" + }, null, 8, KPICardvue_type_template_id_3c2758fa_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=template&id=3c2758fa + +// 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/AllWebsitesDashboard/KPICard.vue?vue&type=script&lang=ts + +/* harmony default export */ var KPICardvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + modelValue: { + type: Object, + required: true + } + }, + computed: { + evolutionTrendFrom: function evolutionTrendFrom() { + switch (this.kpi.evolutionPeriod) { + case 'day': + return 'MultiSites_EvolutionFromPreviousDay'; + + case 'week': + return 'MultiSites_EvolutionFromPreviousWeek'; + + case 'month': + return 'MultiSites_EvolutionFromPreviousMonth'; + + case 'year': + return 'MultiSites_EvolutionFromPreviousYear'; + + default: + return 'MultiSites_EvolutionFromPreviousPeriod'; + } + }, + evolutionTrendClass: function evolutionTrendClass() { + if (this.kpi.evolutionTrend === 1) { + return 'kpiTrendPositive'; + } + + if (this.kpi.evolutionTrend === -1) { + return 'kpiTrendNegative'; + } + + return 'kpiTrendNeutral'; + }, + evolutionTrendIcon: function evolutionTrendIcon() { + if (this.kpi.evolutionTrend === 1) { + return 'icon-chevron-up'; + } + + if (this.kpi.evolutionTrend === -1) { + return 'icon-chevron-down'; + } + + return 'icon-circle'; + }, + kpi: function kpi() { + return this.modelValue; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue + + + +KPICardvue_type_script_lang_ts.render = KPICardvue_type_template_id_3c2758fa_render + +/* harmony default export */ var KPICard = (KPICardvue_type_script_lang_ts); +// 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/AllWebsitesDashboard/KPICardContainer.vue?vue&type=script&lang=ts + + + +/* harmony default export */ var KPICardContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + MatomoLoader: external_CoreHome_["MatomoLoader"], + KPICard: KPICard + }, + props: { + isLoading: Boolean, + modelValue: { + type: Array, + required: true + } + }, + computed: { + hasKpiBadge: function hasKpiBadge() { + return this.kpis.some(function (kpi) { + return !!kpi.badge; + }); + }, + kpis: function kpis() { + return this.modelValue; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue + + + +KPICardContainervue_type_script_lang_ts.render = KPICardContainervue_type_template_id_87c62b90_render + +/* harmony default export */ var KPICardContainer = (KPICardContainervue_type_script_lang_ts); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=0d846a88 + +var SitesTablevue_type_template_id_0d846a88_hoisted_1 = { + class: "sitesTableContainer" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_2 = { + class: "card-table dataTable sitesTable" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_3 = { + class: "sitesTableEvolutionSelector" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_4 = ["value"]; +var SitesTablevue_type_template_id_0d846a88_hoisted_5 = { + value: "hits_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_6 = { + value: "visits_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_7 = { + value: "pageviews_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_8 = { + key: 0, + value: "revenue_evolution" +}; +var _hoisted_9 = { + key: 0 +}; +var _hoisted_10 = { + class: "sitesTableLoading", + colspan: "7" +}; +var _hoisted_11 = { + key: 1 +}; +var _hoisted_12 = { + colspan: "7" +}; +var _hoisted_13 = { + class: "notification system notification-error" +}; + +var _hoisted_14 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); + +var _hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); + +var _hoisted_16 = ["href"]; + +var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); + +var _hoisted_18 = ["href"]; +var _hoisted_19 = ["href"]; + +var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); + +var _hoisted_21 = { + key: 0, + class: "sitesTablePagination" +}; +var _hoisted_22 = { + class: "dataTablePages" +}; +function SitesTablevue_type_template_id_0d846a88_render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); + + var _component_SitesTableSite = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SitesTableSite"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), 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_["createElementVNode"])("div", SitesTablevue_type_template_id_0d846a88_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", SitesTablevue_type_template_id_0d846a88_hoisted_2, [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", { + onClick: _cache[0] || (_cache[0] = function ($event) { + return _ctx.sortBy('label'); + }), + class: "label" + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')) + " ", 1), _ctx.sortColumn === 'label' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[1] || (_cache[1] = function ($event) { + return _ctx.sortBy('nb_visits'); + }) + }, [_ctx.sortColumn === 'nb_visits' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[2] || (_cache[2] = function ($event) { + return _ctx.sortBy('nb_pageviews'); + }) + }, [_ctx.sortColumn === 'nb_pageviews' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[3] || (_cache[3] = function ($event) { + return _ctx.sortBy('nb_hits'); + }) + }, [_ctx.sortColumn === 'nb_hits' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { + key: 0, + onClick: _cache[4] || (_cache[4] = function ($event) { + return _ctx.sortBy('revenue'); + }) + }, [_ctx.sortColumn === 'revenue' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[5] || (_cache[5] = function ($event) { + return _ctx.sortBy(_ctx.evolutionSelector); + }) + }, [_ctx.sortColumn === _ctx.evolutionSelector ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('MultiSites_Evolution')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", SitesTablevue_type_template_id_0d846a88_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", { + class: "browser-default", + value: _ctx.evolutionSelector, + onChange: _cache[6] || (_cache[6] = function ($event) { + return _ctx.changeEvolutionSelector($event.target.value); + }) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_8, 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, SitesTablevue_type_template_id_0d846a88_hoisted_4)])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", _hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader)])])) : _ctx.errorLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _hoisted_14, _hoisted_15, 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", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.externalRawLink('https://matomo.org/faq/troubleshooting/faq_19489/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Faq')), 9, _hoisted_16), _hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.externalRawLink('https://forum.matomo.org/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_CommunityHelp')), 9, _hoisted_18), 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.errorShowProfessionalHelp]]), 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.externalRawLink('https://matomo.org/support-plans/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, _hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.errorShowProfessionalHelp]]), _hoisted_20])])])) : (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"], { + key: 2 + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (site) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_SitesTableSite, { + "display-revenue": _ctx.displayRevenue, + "evolution-metric": _ctx.evolutionMetric, + key: "site-".concat(site.idsite), + "model-value": site, + "sparkline-date": _ctx.sparklineDate, + "sparkline-metric": _ctx.sparklineMetric + }, null, 8, ["display-revenue", "evolution-metric", "model-value", "sparkline-date", "sparkline-metric"]); + }), 128))])])]), !_ctx.isLoading || _ctx.paginationUpperBound > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_21, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "dataTablePrevious", + onClick: _cache[7] || (_cache[7] = function ($event) { + return _ctx.navigatePreviousPage(); + }) + }, " « " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Previous')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.paginationCurrentPage !== 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_22, 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", { + class: "dataTableNext", + onClick: _cache[8] || (_cache[8] = function ($event) { + return _ctx.navigateNextPage(); + }) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Next')) + " » ", 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.paginationCurrentPage < _ctx.paginationMaxPage]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=0d846a88 + +// 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/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=47f7cfe0 + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_1 = { + class: "label" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_2 = ["href", "title"]; + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon icon-outlink" +}, null, -1); + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_4 = [SitesTableSitevue_type_template_id_47f7cfe0_hoisted_3]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_5 = ["href"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_6 = { + key: 1, + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_7 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_8 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_9 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_10 = { + key: 0 +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_11 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_12 = ["colspan"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_13 = ["src"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_14 = { + key: 1, + class: "sitesTableSparkline" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_15 = ["href", "title"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_16 = ["src"]; +function SitesTableSitevue_type_template_id_47f7cfe0_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"])({ + sitesTableGroup: !!_ctx.site.isGroup, + sitesTableGroupSite: !_ctx.site.isGroup && !!_ctx.site.group, + sitesTableSite: !_ctx.site.isGroup && !_ctx.site.group + }) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_1, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.site.main_url, + title: _ctx.translate('General_GoTo', _ctx.site.main_url) + }, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_4, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + title: "View reports", + class: "value", + href: _ctx.dashboardUrl + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 9, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_5)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 1))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_pageviews), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_hits), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + colspan: _ctx.displaySparkline ? 1 : 2 + }, [!_ctx.site.isGroup && !!_ctx.site[_ctx.evolutionMetric] ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + src: _ctx.evolutionIconSrc, + alt: "" + }, null, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.evolutionTrendClass) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site[_ctx.evolutionMetric]), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_12), _ctx.displaySparkline ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.dashboardUrl, + title: _ctx.translate('General_GoTo', _ctx.translate('Dashboard_DashboardOf', _ctx.siteLabel)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + alt: "", + width: "100", + height: "25", + src: _ctx.evolutionSparklineSrc + }, null, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_16)], 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_15)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=47f7cfe0 + +// 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/AllWebsitesDashboard/SitesTableSite.vue?vue&type=script&lang=ts + + +/* harmony default export */ var SitesTableSitevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + displayRevenue: { + type: Boolean, + required: true + }, + evolutionMetric: { + type: String, + required: true + }, + modelValue: { + type: Object, + required: true + }, + sparklineDate: String, + sparklineMetric: String + }, + computed: { + dashboardUrl: function dashboardUrl() { + var dashboardParams = external_CoreHome_["MatomoUrl"].stringify({ + module: 'CoreHome', + action: 'index', + date: external_CoreHome_["Matomo"].currentDateString, + period: external_CoreHome_["Matomo"].period, + idSite: this.site.idsite + }); + return "?".concat(dashboardParams).concat(this.tokenParam); + }, + displaySparkline: function displaySparkline() { + return !this.site.isGroup && this.sparklineDate && this.sparklineMetric; + }, + evolutionIconSrc: function evolutionIconSrc() { + if (this.evolutionTrend === 1) { + return 'plugins/MultiSites/images/arrow_up.png'; + } + + if (this.evolutionTrend === -1) { + return 'plugins/MultiSites/images/arrow_down.png'; + } + + return 'plugins/MultiSites/images/stop.png'; + }, + evolutionSparklineSrc: function evolutionSparklineSrc() { + var sparklineParams = external_CoreHome_["MatomoUrl"].stringify({ + module: 'MultiSites', + action: 'getEvolutionGraph', + date: this.sparklineDate, + period: external_CoreHome_["Matomo"].period, + idSite: this.site.idsite, + columns: this.sparklineMetric, + evolutionBy: this.sparklineMetric, + colors: JSON.stringify(external_CoreHome_["Matomo"].getSparklineColors()), + viewDataTable: 'sparkline' + }); + return "?".concat(sparklineParams).concat(this.tokenParam); + }, + evolutionTrend: function evolutionTrend() { + var property = "".concat(this.evolutionMetric, "_trend"); + return this.site[property]; + }, + evolutionTrendClass: function evolutionTrendClass() { + if (this.evolutionTrend === 1) { + return 'evolutionTrendPositive'; + } + + if (this.evolutionTrend === -1) { + return 'evolutionTrendNegative'; + } + + return ''; + }, + site: function site() { + return this.modelValue; + }, + siteLabel: function siteLabel() { + return external_CoreHome_["Matomo"].helper.htmlDecode(this.site.label); + }, + tokenParam: function tokenParam() { + var token_auth = external_CoreHome_["MatomoUrl"].urlParsed.value.token_auth; + return token_auth ? "&token_auth=".concat(token_auth) : ''; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue + + + +SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_47f7cfe0_render + +/* harmony default export */ var SitesTableSite = (SitesTableSitevue_type_script_lang_ts); +// 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/AllWebsitesDashboard/SitesTable.vue?vue&type=script&lang=ts + + + + +/* harmony default export */ var SitesTablevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + MatomoLoader: external_CoreHome_["MatomoLoader"], + SitesTableSite: SitesTableSite + }, + props: { + displayRevenue: { + type: Boolean, + required: true + }, + displaySparklines: { + type: Boolean, + required: true + } + }, + data: function data() { + return { + evolutionSelector: 'visits_evolution' + }; + }, + computed: { + errorLoading: function errorLoading() { + return AllWebsitesDashboard_store.state.value.errorLoading; + }, + errorShowProfessionalHelp: function errorShowProfessionalHelp() { + return external_CoreHome_["Matomo"].config && external_CoreHome_["Matomo"].config.are_ads_enabled; + }, + evolutionMetric: function evolutionMetric() { + return this.evolutionSelector; + }, + isLoading: function isLoading() { + return AllWebsitesDashboard_store.state.value.isLoadingSites; + }, + numberOfFilteredSites: function numberOfFilteredSites() { + return AllWebsitesDashboard_store.state.value.numSites; + }, + paginationCurrentPage: function paginationCurrentPage() { + return AllWebsitesDashboard_store.state.value.paginationCurrentPage; + }, + paginationLowerBound: function paginationLowerBound() { + return AllWebsitesDashboard_store.paginationLowerBound.value; + }, + paginationUpperBound: function paginationUpperBound() { + return AllWebsitesDashboard_store.paginationUpperBound.value; + }, + paginationMaxPage: function paginationMaxPage() { + return AllWebsitesDashboard_store.numberOfPages.value; + }, + sites: function sites() { + return AllWebsitesDashboard_store.state.value.dashboardSites; + }, + sortColumn: function sortColumn() { + return AllWebsitesDashboard_store.state.value.sortColumn; + }, + sortColumnClass: function sortColumnClass() { + return { + sitesTableSort: true, + sitesTableSortAsc: this.sortOrder === 'asc', + sitesTableSortDesc: this.sortOrder === 'desc' + }; + }, + sortOrder: function sortOrder() { + return AllWebsitesDashboard_store.state.value.sortOrder; + }, + sparklineMetric: function sparklineMetric() { + switch (this.evolutionMetric) { + case 'hits_evolution': + return 'nb_hits'; + + case 'pageviews_evolution': + return 'nb_pageviews'; + + case 'revenue_evolution': + return 'revenue'; + + case 'visits_evolution': + return 'nb_visits'; + + default: + return ''; + } + }, + sparklineDate: function sparklineDate() { + return this.displaySparklines ? AllWebsitesDashboard_store.state.value.sparklineDate : null; + } + }, + methods: { + changeEvolutionSelector: function changeEvolutionSelector(metric) { + this.evolutionSelector = metric; + this.sortBy(metric); + }, + navigateNextPage: function navigateNextPage() { + AllWebsitesDashboard_store.navigateNextPage(); + }, + navigatePreviousPage: function navigatePreviousPage() { + AllWebsitesDashboard_store.navigatePreviousPage(); + }, + sortBy: function sortBy(column) { + AllWebsitesDashboard_store.sortBy(column); + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue + + + +SitesTablevue_type_script_lang_ts.render = SitesTablevue_type_template_id_0d846a88_render + +/* harmony default export */ var SitesTable = (SitesTablevue_type_script_lang_ts); +// 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/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=script&lang=ts + + + + + +/* harmony default export */ var AllWebsitesDashboardvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + EnrichedHeadline: external_CoreHome_["EnrichedHeadline"], + KPICardContainer: KPICardContainer, + PeriodSelector: external_CoreHome_["PeriodSelector"], + SitesTable: SitesTable + }, + props: { + autoRefreshInterval: { + type: Number, + required: true + }, + displayRevenue: { + type: Boolean, + required: true + }, + displaySparklines: { + type: Boolean, + required: true + }, + isWidgetized: { + type: Boolean, + required: true + }, + kpiBadgeHits: { + type: String, + required: true + }, + pageSize: { + type: Number, + required: true + }, + selectablePeriods: { + type: Array, + required: true + } + }, + data: function data() { + return { + searchTerm: '' + }; + }, + mounted: function mounted() { + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () { + return external_CoreHome_["MatomoUrl"].hashParsed.value; + }, function () { + return AllWebsitesDashboard_store.refreshData(); + }); + AllWebsitesDashboard_store.setAutoRefreshInterval(this.autoRefreshInterval); + AllWebsitesDashboard_store.setPageSize(this.pageSize); + AllWebsitesDashboard_store.refreshData(); + }, + computed: { + addSiteUrl: function addSiteUrl() { + return "?".concat(external_CoreHome_["MatomoUrl"].stringify(Object.assign(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].urlParsed.value), external_CoreHome_["MatomoUrl"].hashParsed.value), {}, { + module: 'SitesManager', + action: 'index', + showaddsite: '1' + }))); + }, + isLoadingKPIs: function isLoadingKPIs() { + return AllWebsitesDashboard_store.state.value.isLoadingKPIs; + }, + kpis: function kpis() { + var dashboardKPIs = AllWebsitesDashboard_store.state.value.dashboardKPIs; + var kpis = [{ + icon: 'icon-user', + title: 'MultiSites_TotalVisits', + value: dashboardKPIs.visits, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.visitsTrend, + evolutionValue: dashboardKPIs.visitsEvolution + }, { + icon: 'icon-show', + title: 'MultiSites_TotalPageviews', + value: dashboardKPIs.pageviews, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.pageviewsTrend, + evolutionValue: dashboardKPIs.pageviewsEvolution + }, { + badge: this.kpiBadgeHits, + icon: 'icon-hits', + title: 'MultiSites_TotalHits', + value: dashboardKPIs.hits, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.hitsTrend, + evolutionValue: dashboardKPIs.hitsEvolution + }]; + + if (this.displayRevenue) { + kpis.push({ + icon: 'icon-dollar-sign', + title: 'General_TotalRevenue', + value: dashboardKPIs.revenue, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.revenueTrend, + evolutionValue: dashboardKPIs.revenueEvolution + }); + } + + return kpis; + }, + isUserAllowedToAddSite: function isUserAllowedToAddSite() { + return external_CoreHome_["Matomo"].hasSuperUserAccess; + } + }, + methods: { + searchSite: function searchSite(term) { + AllWebsitesDashboard_store.searchSite(term); + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue + + + +AllWebsitesDashboardvue_type_script_lang_ts.render = render + +/* harmony default export */ var AllWebsitesDashboard = (AllWebsitesDashboardvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=052ab191 -var _hoisted_1 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_1 = { key: 0, class: "multisites-label label" }; -var _hoisted_2 = ["href"]; -var _hoisted_3 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_2 = ["href"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_3 = { key: 0 }; -var _hoisted_4 = ["href", "title"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_4 = ["href", "title"]; -var _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-outlink" }, null, -1); -var _hoisted_6 = [_hoisted_5]; -var _hoisted_7 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_6 = [MultisitesSitevue_type_template_id_052ab191_hoisted_5]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_7 = { key: 1, class: "multisites-label label" }; -var _hoisted_8 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_8 = { class: "value" }; -var _hoisted_9 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_9 = { class: "multisites-column" }; -var _hoisted_10 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_10 = { class: "value" }; -var _hoisted_11 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_11 = { class: "multisites-column" }; -var _hoisted_12 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_12 = { class: "value" }; -var _hoisted_13 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_13 = { key: 2, class: "multisites-column" }; -var _hoisted_14 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_14 = { class: "value" }; -var _hoisted_15 = ["title"]; -var _hoisted_16 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_15 = ["title"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_16 = { key: 0, class: "visits value" }; -var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_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_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var MultisitesSitevue_type_template_id_052ab191_hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_19 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_19 = { style: { "color": "green" } }; -var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_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_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var MultisitesSitevue_type_template_id_052ab191_hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/arrow_down.png", alt: "" @@ -241,7 +1345,7 @@ var _hoisted_26 = { }; var _hoisted_27 = ["href", "title"]; var _hoisted_28 = ["src"]; -function render(_ctx, _cache, $props, $setup, $data, $options) { +function MultisitesSitevue_type_template_id_052ab191_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, @@ -249,20 +1353,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { '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", { + }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", MultisitesSitevue_type_template_id_052ab191_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), _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", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 9, MultisitesSitevue_type_template_id_052ab191_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", MultisitesSitevue_type_template_id_052ab191_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_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", { + }, MultisitesSitevue_type_template_id_052ab191_hoisted_6, 8, MultisitesSitevue_type_template_id_052ab191_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", MultisitesSitevue_type_template_id_052ab191_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_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", MultisitesSitevue_type_template_id_052ab191_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_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", MultisitesSitevue_type_template_id_052ab191_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_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", MultisitesSitevue_type_template_id_052ab191_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_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_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", { + }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultisitesSitevue_type_template_id_052ab191_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [MultisitesSitevue_type_template_id_052ab191_hoisted_17, MultisitesSitevue_type_template_id_052ab191_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_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, [MultisitesSitevue_type_template_id_052ab191_hoisted_20, MultisitesSitevue_type_template_id_052ab191_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, [MultisitesSitevue_type_template_id_052ab191_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, MultisitesSitevue_type_template_id_052ab191_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), @@ -276,9 +1380,6 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { } // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=052ab191 -// EXTERNAL MODULE: external "CoreHome" -var external_CoreHome_ = __webpack_require__("19dc"); - // 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 @@ -356,17 +1457,17 @@ var external_CoreHome_ = __webpack_require__("19dc"); -MultisitesSitevue_type_script_lang_ts.render = render +MultisitesSitevue_type_script_lang_ts.render = MultisitesSitevue_type_template_id_052ab191_render /* harmony default export */ var MultisitesSite = (MultisitesSitevue_type_script_lang_ts); // 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"); } } +function Dashboard_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function Dashboard_store_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function Dashboard_store_createClass(Constructor, protoProps, staticProps) { if (protoProps) Dashboard_store_defineProperties(Constructor.prototype, protoProps); if (staticProps) Dashboard_store_defineProperties(Constructor, staticProps); return Constructor; } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function Dashboard_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*! * Matomo - free/libre analytics platform @@ -383,9 +1484,9 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { function DashboardStore() { var _this = this; - _classCallCheck(this, DashboardStore); + Dashboard_store_classCallCheck(this, DashboardStore); - _defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ + Dashboard_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ sites: [], isLoading: false, pageSize: 25, @@ -405,31 +1506,31 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { errorLoadingSites: false })); - _defineProperty(this, "refreshTimeout", null); + Dashboard_store_defineProperty(this, "refreshTimeout", null); - _defineProperty(this, "fetchAbort", null); + Dashboard_store_defineProperty(this, "fetchAbort", null); - _defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); })); - _defineProperty(this, "numberOfFilteredSites", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "numberOfFilteredSites", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return _this.state.value.numberOfSites; })); - _defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Math.ceil(_this.numberOfFilteredSites.value / _this.state.value.pageSize - 1); })); - _defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Math.ceil(_this.state.value.currentPage * _this.state.value.pageSize); })); - _defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return _this.currentPagingOffset.value + 1; })); - _defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { var end = _this.currentPagingOffset.value + _this.state.value.pageSize; var max = _this.numberOfFilteredSites.value; @@ -441,7 +1542,7 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { })); } - _createClass(DashboardStore, [{ + Dashboard_store_createClass(DashboardStore, [{ key: "cancelRefereshInterval", value: function cancelRefereshInterval() { if (this.refreshTimeout) { @@ -1075,6 +2176,7 @@ Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_40e2a52d + // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 232b90a68f9a..3da8b04e4bae 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -1,10 +1,16 @@ -(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 q})),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("8bbf"),i={key:0,class:"multisites-label label"},s=["href"],l={key:0},c=["href","title"],u=Object(o["createElementVNode"])("span",{class:"icon icon-outlink"},null,-1),b=[u],d={key:1,class:"multisites-label label"},m={class:"value"},p={class:"multisites-column"},v={class:"value"},f={class:"multisites-column"},h={class:"value"},O={key:2,class:"multisites-column"},j={class:"value"},g=["title"],S={key:0,class:"visits value"},_=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_up.png",alt:""},null,-1),y=Object(o["createTextVNode"])(),w={style:{color:"green"}},k=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/stop.png",alt:""},null,-1),V=Object(o["createTextVNode"])(),E=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_down.png",alt:""},null,-1),N=Object(o["createTextVNode"])(),C={style:{color:"red"}},M={key:4,style:{width:"180px"}},P={key:0,class:"sparkline",style:{width:"100px",margin:"auto"}},B=["href","title"],T=["src"];function x(e,t,n,r,a,u){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{class:Object(o["normalizeClass"])({groupedWebsite:e.website.group,website:!e.website.group,group:e.website.isGroup}),ref:"root"},[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",i,[Object(o["createElementVNode"])("a",{title:"View reports",class:"value truncated-text-line",href:e.dashboardUrl(e.website)},Object(o["toDisplayString"])(e.websiteLabel),9,s),e.website.main_url?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",l,[Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.website.main_url,title:e.translate("General_GoTo",e.website.main_url)},b,8,c)])):Object(o["createCommentVNode"])("",!0)])),e.website.isGroup?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",d,[Object(o["createElementVNode"])("span",m,Object(o["toDisplayString"])(e.websiteLabel),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",p,[Object(o["createElementVNode"])("span",v,Object(o["toDisplayString"])(e.website.nb_visits),1)]),Object(o["createElementVNode"])("td",f,[Object(o["createElementVNode"])("span",h,Object(o["toDisplayString"])(e.website.nb_pageviews),1)]),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",O,[Object(o["createElementVNode"])("span",j,Object(o["toDisplayString"])(e.website.revenue),1)])):Object(o["createCommentVNode"])("",!0),"range"!==e.period?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:3,class:"multisites-evolution",title:e.website.tooltip},[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",S,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[_,y,Object(o["createElementVNode"])("span",w,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],1===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[k,V,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],0===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[E,N,Object(o["createElementVNode"])("span",C,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],-1===e.website["".concat(e.evolutionMetric,"_trend")]]])]))],8,g)):Object(o["createCommentVNode"])("",!0),e.showSparklines?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",M,[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",P,[Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.dashboardUrl(e.website),title:e.translate("General_GoTo",e.translate("Dashboard_DashboardOf",e.websiteLabel))},[Object(o["createElementVNode"])("img",{alt:"",width:"100",height:"25",src:e.sparklineImage(e.website)},null,8,T)],8,B)]))])):Object(o["createCommentVNode"])("",!0)],2)}var D=n("19dc"),A=Object(o["defineComponent"])({props:{website:{type:Object,required:!0},evolutionMetric:{type:String,required:!0},showSparklines:Boolean,dateSparkline:String,displayRevenueColumn:Boolean,metric:String},mounted:function(){D["Matomo"].postEvent("MultiSites.MultiSitesSite.mounted",{element:this.$refs.root})},unmounted:function(){D["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(D["Matomo"].getSparklineColors())))}},computed:{tokenParam:function(){var e=D["MatomoUrl"].urlParsed.value.token_auth;return e?"&token_auth=".concat(e):""},period:function(){return D["Matomo"].period},date:function(){return D["MatomoUrl"].urlParsed.value.date},websiteLabel:function(){return D["Matomo"].helper.htmlDecode(this.website.label)}}});A.render=x;var G=A;function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;nn&&(e=n),e})))}return I(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=H.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",o="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=H.formatNumber(e.previous_nb_visits),o=H.formatNumber(e.nb_visits),i=H.formatPercent(e.visits_evolution),r=Object(D["translate"])("General_ColumnNbVisits"),s=H.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),o="".concat(e.nb_pageviews),i=H.formatPercent(e.pageviews_evolution),r=Object(D["translate"])("General_ColumnPageviews"),s=H.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=H.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),o=H.formatCurrency(e.revenue,e.currencySymbol),i=H.formatPercent(e.revenue_evolution),r=Object(D["translate"])("General_ColumnRevenue"),s=H.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(D["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(D["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(s),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonYear",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);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={method:"MultiSites.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,D["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}(),q=new F,W={ref:"root"},$={class:"card-title"},K=["innerHTML","title"],J={id:"mt",class:"dataTable card-table",cellspacing:"0"},Y={class:"heading"},Q={class:"heading"},X={class:"heading"},Z={class:"heading"},ee=["colspan"],te=["value"],ne={value:"visits_evolution"},re={value:"pageviews_evolution"},ae={key:0,value:"revenue_evolution"},oe={key:0},ie={colspan:"7",class:"allWebsitesLoading"},se={key:1},le={key:0},ce={colspan:"7"},ue={class:"notification system notification-error"},be=Object(o["createElementVNode"])("br",null,null,-1),de=Object(o["createElementVNode"])("br",null,null,-1),me=["href"],pe=Object(o["createTextVNode"])(" – "),ve=["href"],fe=["href"],he=Object(o["createTextVNode"])(". "),Oe={colspan:"8",class:"paging"},je={class:"row"},ge={class:"col s3 add_new_site"},Se=["href"],_e=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),ye={class:"col s6"},we={style:{cursor:"pointer"}},ke={class:"dataTablePages"},Ve={id:"counter"},Ee={style:{cursor:"pointer"},class:"pointer"},Ne=Object(o["createElementVNode"])("div",{class:"col s3"}," ",-1),Ce={row_id:"last"},Me={colspan:"8",class:"site_search"},Pe={class:"row"},Be={class:"input-field col s12"},Te=["placeholder"],xe=["title"];function De(e,t,n,r,a,i){var s=this,l=Object(o["resolveComponent"])("EnrichedHeadline"),c=Object(o["resolveComponent"])("ActivityIndicator"),u=Object(o["resolveComponent"])("MultisitesSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",W,[Object(o["createElementVNode"])("h2",$,[Object(o["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/faq/new-to-piwik/all-websites-dashboard/"),"feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(o["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,K)]})),_:1},8,["help-url","feature-name"])]),Object(o["createElementVNode"])("table",J,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{id:"names",class:Object(o["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(o["createElementVNode"])("span",Y,Object(o["toDisplayString"])(e.translate("General_Website")),1),Object(o["createElementVNode"])("span",{class:Object(o["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(o["createElementVNode"])("th",{id:"visits",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(o["createElementVNode"])("span",{class:Object(o["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(o["createElementVNode"])("span",Q,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(o["createElementVNode"])("th",{id:"pageviews",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(o["createElementVNode"])("span",{class:Object(o["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(o["createElementVNode"])("span",X,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,id:"revenue",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",Z,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{id:"evolution",class:Object(o["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(o["createElementVNode"])("span",{class:Object(o["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(o["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(o["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(o["createElementVNode"])("option",ne,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",re,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",ae,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,te)],10,ee)])]),e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",oe,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",ie,[Object(o["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(o["createCommentVNode"])("",!0),e.isLoading?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",se,[e.errorLoadingSites?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",le,[Object(o["createElementVNode"])("td",ce,[Object(o["createElementVNode"])("div",ue,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),be,de,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(o["toDisplayString"])(e.translate("General_Faq")),9,me),pe,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ve),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,fe),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),he])])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["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(o["createElementVNode"])("tfoot",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",Oe,[Object(o["createElementVNode"])("div",je,[Object(o["createElementVNode"])("div",ge,[e.hasSuperUserAccess?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[_e,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,Se)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",ye,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(o["createElementVNode"])("span",we,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],512),[[o["vShow"],!(0===e.currentPage)]]),Object(o["createElementVNode"])("span",ke,[Object(o["createElementVNode"])("span",Ve,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(o["createElementVNode"])("span",Ee,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),Ne])])]),Object(o["createElementVNode"])("tr",Ce,[Object(o["createElementVNode"])("td",Me,[Object(o["createElementVNode"])("div",Pe,[Object(o["createElementVNode"])("div",Be,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(o["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,Te),[[o["vModelText"],e.searchTerm]]),Object(o["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,xe)])])])])])])],512)}var Ae=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:D["EnrichedHeadline"],ActivityIndicator:D["ActivityIndicator"],MultisitesSite:G},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&q.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){q.setRefreshInterval(e),q.fetchAllSites()},sortBy:function(e){q.sortBy(e)},previousPage:function(){q.previousPage()},nextPage:function(){q.nextPage()},searchSite:function(){q.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return D["Matomo"].hasSuperUserAccess},date:function(){return D["MatomoUrl"].urlParsed.value.date},idSite:function(){return D["MatomoUrl"].urlParsed.value.idSite},url:function(){return D["Matomo"].piwik_url},period:function(){return D["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return D["Matomo"].config&&D["Matomo"].config.are_ads_enabled},sortColumn:function(){return q.state.value.sortColumn},reverse:function(){return q.state.value.reverse},smallTitleContent:function(){var e=q.state.value;return Object(D["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=q.state.value;return Object(D["translate"])("General_EvolutionSummaryGeneric",Object(D["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(D["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return q.state.value.loadingMessage},isLoading:function(){return q.state.value.isLoading},errorLoadingSites:function(){return q.state.value.errorLoadingSites},sites:function(){return q.state.value.sites},numberOfPages:function(){return q.numberOfPages.value},currentPage:function(){return q.state.value.currentPage},paginationLowerBound:function(){return q.paginationLowerBound.value},paginationUpperBound:function(){return q.paginationUpperBound.value},numberOfFilteredSites:function(){return q.numberOfFilteredSites.value},professionalHelpUrl:function(){return Object(D["externalRawLink"])("https://matomo.org/support-plans/")},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=De;var Ge=Ae; + */var g=function(){function e(){var t=this;h(this,e),f(this,"fetchAbort",null),f(this,"privateState",Object(a["reactive"])({dashboardKPIs:{evolutionPeriod:"day",hits:"?",hitsEvolution:"",hitsTrend:0,pageviews:"?",pageviewsEvolution:"",pageviewsTrend:0,revenue:"?",revenueEvolution:"",revenueTrend:0,visits:"?",visitsEvolution:"",visitsTrend:0},dashboardSites:[],errorLoading:!1,isLoadingKPIs:!1,isLoadingSites:!1,numSites:0,paginationCurrentPage:0,sparklineDate:"",sortColumn:"nb_visits",sortOrder:"desc"})),f(this,"autoRefreshInterval",0),f(this,"autoRefreshTimeout",null),f(this,"pageSize",25),f(this,"searchTerm",""),f(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),f(this,"numberOfPages",Object(a["computed"])((function(){return Math.ceil(t.state.value.numSites/t.pageSize-1)}))),f(this,"currentPagingOffset",Object(a["computed"])((function(){return Math.ceil(t.state.value.paginationCurrentPage*t.pageSize)}))),f(this,"paginationLowerBound",Object(a["computed"])((function(){return 0===t.state.value.numSites?0:1+t.currentPagingOffset.value}))),f(this,"paginationUpperBound",Object(a["computed"])((function(){if(0===t.state.value.numSites)return 0;var e=t.pageSize+t.currentPagingOffset.value,n=t.state.value.numSites;return e0&&void 0!==arguments[0]&&arguments[0];this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelAutoRefresh()),this.fetchAbort=new AbortController,this.privateState.errorLoading=!1,this.privateState.isLoadingKPIs=!t,this.privateState.isLoadingSites=!0;var n={method:"MultiSites.mockDashboardData",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,showColumns:["hits_evolution","hits_evolution_trend","label","nb_hits","nb_pageviews","nb_visits","pageviews_evolution","pageviews_evolution_trend","revenue","revenue_evolution","revenue_evolution_trend","visits_evolution","visits_evolution_trend"].join(",")};return this.searchTerm&&(n.pattern=this.searchTerm),m["AjaxHelper"].fetch(n,{abortController:this.fetchAbort}).then((function(n){t||e.updateDashboardKPIs(n),e.updateDashboardSites(n)})).catch((function(){e.privateState.dashboardSites=[],e.privateState.errorLoading=!0})).finally((function(){e.privateState.isLoadingKPIs=!1,e.privateState.isLoadingSites=!1,e.fetchAbort=null,e.startAutoRefresh()}))}},{key:"navigateNextPage",value:function(){this.privateState.paginationCurrentPage!==this.numberOfPages.value&&(this.privateState.paginationCurrentPage+=1,this.refreshData(!0))}},{key:"navigatePreviousPage",value:function(){0!==this.privateState.paginationCurrentPage&&(this.privateState.paginationCurrentPage-=1,this.refreshData(!0))}},{key:"searchSite",value:function(e){this.searchTerm=e,this.privateState.paginationCurrentPage=0,this.refreshData(!0)}},{key:"setAutoRefreshInterval",value:function(e){this.autoRefreshInterval=e}},{key:"setPageSize",value:function(e){this.pageSize=e}},{key:"sortBy",value:function(e){this.privateState.sortColumn===e?this.privateState.sortOrder="desc"===this.privateState.sortOrder?"asc":"desc":this.privateState.sortOrder="label"===e?"asc":"desc",this.privateState.sortColumn=e,this.refreshData(!0)}},{key:"cancelAutoRefresh",value:function(){this.autoRefreshTimeout&&(clearTimeout(this.autoRefreshTimeout),this.autoRefreshTimeout=null)}},{key:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=m["Periods"].parse(m["Matomo"].period,m["Matomo"].currentDateString)}catch(n){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={evolutionPeriod:m["Matomo"].period,hits:e.totals.nb_hits,hitsEvolution:e.totals.hits_evolution,hitsTrend:e.totals.hits_evolution_trend,pageviews:e.totals.nb_pageviews,pageviewsEvolution:e.totals.pageviews_evolution,pageviewsTrend:e.totals.pageviews_evolution_trend,revenue:e.totals.revenue,revenueEvolution:e.totals.revenue_evolution,revenueTrend:e.totals.revenue_evolution_trend,visits:e.totals.nb_visits,visitsEvolution:e.totals.visits_evolution,visitsTrend:e.totals.visits_evolution_trend}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites,this.privateState.sparklineDate=e.sparklineDate}}]),e}(),S=new g,k={class:"kpiCardContainer"},y={key:0,class:"kpiCard kpiCardLoading"},_=Object(a["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),C={class:"kpiCardValue"},E=Object(a["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(a["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),V={key:0,class:"kpiCardBadge"};function N(e,t,n,r,o,i){var s=Object(a["resolveComponent"])("MatomoLoader"),l=Object(a["resolveComponent"])("KPICard");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",k,[e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",y,[_,Object(a["createElementVNode"])("div",C,[Object(a["createVNode"])(s)]),E,e.hasKpiBadge?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",V," ")):Object(a["createCommentVNode"])("",!0)])):(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:1},Object(a["renderList"])(e.kpis,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:"kpi-card-".concat(n)},[n>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var w={class:"kpiCard"},T={class:"kpiCardTitle"},B={class:"kpiCardValue"},P={class:"kpiCardEvolution"},M={key:1,class:"kpiCardEvolution"},D=Object(a["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),x=[D],L=["innerHTML"];function R(e,t,n,r,o,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",w,[Object(a["createElementVNode"])("div",T,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(a["createElementVNode"])("div",B,Object(a["toDisplayString"])(e.kpi.value),1),Object(a["createElementVNode"])("div",P,[""!==e.kpi.evolutionValue?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.kpi.evolutionValue),1)],2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",M,x))]),e.kpi.badge?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,L)):Object(a["createCommentVNode"])("",!0)])}var G=Object(a["defineComponent"])({props:{modelValue:{type:Object,required:!0}},computed:{evolutionTrendFrom:function(){switch(this.kpi.evolutionPeriod){case"day":return"MultiSites_EvolutionFromPreviousDay";case"week":return"MultiSites_EvolutionFromPreviousWeek";case"month":return"MultiSites_EvolutionFromPreviousMonth";case"year":return"MultiSites_EvolutionFromPreviousYear";default:return"MultiSites_EvolutionFromPreviousPeriod"}},evolutionTrendClass:function(){return 1===this.kpi.evolutionTrend?"kpiTrendPositive":-1===this.kpi.evolutionTrend?"kpiTrendNegative":"kpiTrendNeutral"},evolutionTrendIcon:function(){return 1===this.kpi.evolutionTrend?"icon-chevron-up":-1===this.kpi.evolutionTrend?"icon-chevron-down":"icon-circle"},kpi:function(){return this.modelValue}}});G.render=R;var A=G,I=Object(a["defineComponent"])({components:{MatomoLoader:m["MatomoLoader"],KPICard:A},props:{isLoading:Boolean,modelValue:{type:Array,required:!0}},computed:{hasKpiBadge:function(){return this.kpis.some((function(e){return!!e.badge}))},kpis:function(){return this.modelValue}}});I.render=N;var z=I,U={class:"sitesTableContainer"},F={class:"card-table dataTable sitesTable"},H={class:"sitesTableEvolutionSelector"},q=["value"],K={value:"hits_evolution"},W={value:"visits_evolution"},$={value:"pageviews_evolution"},J={key:0,value:"revenue_evolution"},Y={key:0},Q={class:"sitesTableLoading",colspan:"7"},X={key:1},Z={colspan:"7"},ee={class:"notification system notification-error"},te=Object(a["createElementVNode"])("br",null,null,-1),ne=Object(a["createElementVNode"])("br",null,null,-1),re=["href"],oe=Object(a["createTextVNode"])(" – "),ae=["href"],ie=["href"],se=Object(a["createTextVNode"])(". "),le={key:0,class:"sitesTablePagination"},ce={class:"dataTablePages"};function ue(e,t,n,r,o,i){var s=Object(a["resolveComponent"])("MatomoLoader"),l=Object(a["resolveComponent"])("SitesTableSite");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",U,[Object(a["createElementVNode"])("table",F,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(a["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(a["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("nb_hits")})},["nb_hits"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(a["createElementVNode"])("th",H,[Object(a["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(a["createElementVNode"])("option",K,Object(a["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(a["createElementVNode"])("option",W,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(a["createElementVNode"])("option",$,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("option",J,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(a["createCommentVNode"])("",!0)],40,q)])])]),Object(a["createElementVNode"])("tbody",null,[e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",Y,[Object(a["createElementVNode"])("td",Q,[Object(a["createVNode"])(s)])])):e.errorLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",X,[Object(a["createElementVNode"])("td",Z,[Object(a["createElementVNode"])("div",ee,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),te,ne,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(a["toDisplayString"])(e.translate("General_Faq")),9,re),oe,Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(a["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ae),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null," – ",512),[[a["vShow"],e.errorShowProfessionalHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(a["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,ie),[[a["vShow"],e.errorShowProfessionalHelp]]),se])])])):(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:2},Object(a["renderList"])(e.sites,(function(t){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"sparkline-date":e.sparklineDate,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","sparkline-date","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",le,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(a["toDisplayString"])(e.translate("General_Previous")),513),[[a["vShow"],0!==e.paginationCurrentPage]]),Object(a["createElementVNode"])("span",ce,Object(a["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(a["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[a["vShow"],e.paginationCurrentPagen&&(e=n),e})))}return pt(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=ht.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,o="0",a="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(o=ht.formatNumber(e.previous_nb_visits),a=ht.formatNumber(e.nb_visits),i=ht.formatPercent(e.visits_evolution),r=Object(m["translate"])("General_ColumnNbVisits"),s=ht.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(o="".concat(e.previous_Actions_nb_pageviews),a="".concat(e.nb_pageviews),i=ht.formatPercent(e.pageviews_evolution),r=Object(m["translate"])("General_ColumnPageviews"),s=ht.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(o=ht.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),a=ht.formatCurrency(e.revenue,e.currencySymbol),i=ht.formatPercent(e.revenue_evolution),r=Object(m["translate"])("General_ColumnRevenue"),s=ht.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(m["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(m["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(s),r,"".concat(o)]),"\n"),e.periodName){case"day":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonDay",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonYear",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);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={method:"MultiSites.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,m["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}(),jt=new Ot,ft={ref:"root"},gt={class:"card-title"},St=["innerHTML","title"],kt={id:"mt",class:"dataTable card-table",cellspacing:"0"},yt={class:"heading"},_t={class:"heading"},Ct={class:"heading"},Et={class:"heading"},Vt=["colspan"],Nt=["value"],wt={value:"visits_evolution"},Tt={value:"pageviews_evolution"},Bt={key:0,value:"revenue_evolution"},Pt={key:0},Mt={colspan:"7",class:"allWebsitesLoading"},Dt={key:1},xt={key:0},Lt={colspan:"7"},Rt={class:"notification system notification-error"},Gt=Object(a["createElementVNode"])("br",null,null,-1),At=Object(a["createElementVNode"])("br",null,null,-1),It=["href"],zt=Object(a["createTextVNode"])(" – "),Ut=["href"],Ft=["href"],Ht=Object(a["createTextVNode"])(". "),qt={colspan:"8",class:"paging"},Kt={class:"row"},Wt={class:"col s3 add_new_site"},$t=["href"],Jt=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),Yt={class:"col s6"},Qt={style:{cursor:"pointer"}},Xt={class:"dataTablePages"},Zt={id:"counter"},en={style:{cursor:"pointer"},class:"pointer"},tn=Object(a["createElementVNode"])("div",{class:"col s3"}," ",-1),nn={row_id:"last"},rn={colspan:"8",class:"site_search"},on={class:"row"},an={class:"input-field col s12"},sn=["placeholder"],ln=["title"];function cn(e,t,n,r,o,i){var s=this,l=Object(a["resolveComponent"])("EnrichedHeadline"),c=Object(a["resolveComponent"])("ActivityIndicator"),u=Object(a["resolveComponent"])("MultisitesSite");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ft,[Object(a["createElementVNode"])("h2",gt,[Object(a["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/faq/new-to-piwik/all-websites-dashboard/"),"feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(a["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,St)]})),_:1},8,["help-url","feature-name"])]),Object(a["createElementVNode"])("table",kt,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{id:"names",class:Object(a["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(a["createElementVNode"])("span",yt,Object(a["toDisplayString"])(e.translate("General_Website")),1),Object(a["createElementVNode"])("span",{class:Object(a["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(a["createElementVNode"])("th",{id:"visits",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(a["createElementVNode"])("span",{class:Object(a["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(a["createElementVNode"])("span",_t,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(a["createElementVNode"])("th",{id:"pageviews",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(a["createElementVNode"])("span",{class:Object(a["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(a["createElementVNode"])("span",Ct,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("th",{key:0,id:"revenue",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(a["createElementVNode"])("span",Et,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("th",{id:"evolution",class:Object(a["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(a["createElementVNode"])("span",{class:Object(a["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(a["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(a["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(a["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(a["createElementVNode"])("option",wt,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(a["createElementVNode"])("option",Tt,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("option",Bt,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(a["createCommentVNode"])("",!0)],40,Nt)],10,Vt)])]),e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tbody",Pt,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",Mt,[Object(a["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(a["createCommentVNode"])("",!0),e.isLoading?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("tbody",Dt,[e.errorLoadingSites?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",xt,[Object(a["createElementVNode"])("td",Lt,[Object(a["createElementVNode"])("div",Rt,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),Gt,At,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(a["toDisplayString"])(e.translate("General_Faq")),9,It),zt,Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(a["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,Ut),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null," – ",512),[[a["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(a["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,Ft),[[a["vShow"],e.areAdsForProfessionalServicesEnabled]]),Ht])])])):Object(a["createCommentVNode"])("",!0),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t){return Object(a["openBlock"])(),Object(a["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(a["createElementVNode"])("tfoot",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",qt,[Object(a["createElementVNode"])("div",Kt,[Object(a["createElementVNode"])("div",Wt,[e.hasSuperUserAccess?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[Jt,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,$t)):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Yt,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(a["createElementVNode"])("span",Qt,"« "+Object(a["toDisplayString"])(e.translate("General_Previous")),1)],512),[[a["vShow"],!(0===e.currentPage)]]),Object(a["createElementVNode"])("span",Xt,[Object(a["createElementVNode"])("span",Zt,Object(a["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(a["createElementVNode"])("span",en,Object(a["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[a["vShow"],!(e.currentPage>=e.numberOfPages)]])]),tn])])]),Object(a["createElementVNode"])("tr",nn,[Object(a["createElementVNode"])("td",rn,[Object(a["createElementVNode"])("div",on,[Object(a["createElementVNode"])("div",an,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(a["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,sn),[[a["vModelText"],e.searchTerm]]),Object(a["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,ln)])])])])])])],512)}var un=Object(a["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:m["EnrichedHeadline"],ActivityIndicator:m["ActivityIndicator"],MultisitesSite:ut},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&jt.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){jt.setRefreshInterval(e),jt.fetchAllSites()},sortBy:function(e){jt.sortBy(e)},previousPage:function(){jt.previousPage()},nextPage:function(){jt.nextPage()},searchSite:function(){jt.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return m["Matomo"].hasSuperUserAccess},date:function(){return m["MatomoUrl"].urlParsed.value.date},idSite:function(){return m["MatomoUrl"].urlParsed.value.idSite},url:function(){return m["Matomo"].piwik_url},period:function(){return m["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return m["Matomo"].config&&m["Matomo"].config.are_ads_enabled},sortColumn:function(){return jt.state.value.sortColumn},reverse:function(){return jt.state.value.reverse},smallTitleContent:function(){var e=jt.state.value;return Object(m["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=jt.state.value;return Object(m["translate"])("General_EvolutionSummaryGeneric",Object(m["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(m["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return jt.state.value.loadingMessage},isLoading:function(){return jt.state.value.isLoading},errorLoadingSites:function(){return jt.state.value.errorLoadingSites},sites:function(){return jt.state.value.sites},numberOfPages:function(){return jt.numberOfPages.value},currentPage:function(){return jt.state.value.currentPage},paginationLowerBound:function(){return jt.paginationLowerBound.value},paginationUpperBound:function(){return jt.paginationUpperBound.value},numberOfFilteredSites:function(){return jt.numberOfFilteredSites.value},professionalHelpUrl:function(){return Object(m["externalRawLink"])("https://matomo.org/support-plans/")},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});un.render=cn;var dn=un; /*! * Matomo - free/libre analytics platform *