From ebf2218b7b07cbe2d4cd849a9aa88f2f69ee0ca4 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Mon, 16 Dec 2024 17:45:48 +0100 Subject: [PATCH] apply review feedback --- plugins/MultiSites/vue/dist/MultiSites.umd.js | 39 +++++++------- .../MultiSites/vue/dist/MultiSites.umd.min.js | 6 +-- .../AllWebsitesDashboard.less | 2 + .../vue/src/AllWebsitesDashboard/KPICard.vue | 52 +++++++++---------- 4 files changed, 48 insertions(+), 51 deletions(-) diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index 4bc03a85bb3..0d0bf1afcbf 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -556,51 +556,48 @@ function KPICardContainervue_type_template_id_87c62b90_render(_ctx, _cache, $pro } // 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=190cea7a +// 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=c61db362 -var KPICardvue_type_template_id_190cea7a_hoisted_1 = { +var KPICardvue_type_template_id_c61db362_hoisted_1 = { class: "kpiCard" }; -var KPICardvue_type_template_id_190cea7a_hoisted_2 = { - class: "kpiCardContent" -}; -var KPICardvue_type_template_id_190cea7a_hoisted_3 = { +var KPICardvue_type_template_id_c61db362_hoisted_2 = { class: "kpiCardTitle" }; -var KPICardvue_type_template_id_190cea7a_hoisted_4 = ["title"]; -var KPICardvue_type_template_id_190cea7a_hoisted_5 = { +var KPICardvue_type_template_id_c61db362_hoisted_3 = ["title"]; +var KPICardvue_type_template_id_c61db362_hoisted_4 = { class: "kpiCardEvolution" }; -var KPICardvue_type_template_id_190cea7a_hoisted_6 = { +var KPICardvue_type_template_id_c61db362_hoisted_5 = { key: 1, class: "kpiCardEvolution" }; -var KPICardvue_type_template_id_190cea7a_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var KPICardvue_type_template_id_c61db362_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "kpiCardEvolutionTrend" }, " ", -1); -var _hoisted_8 = [KPICardvue_type_template_id_190cea7a_hoisted_7]; -var _hoisted_9 = ["innerHTML"]; -function KPICardvue_type_template_id_190cea7a_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_190cea7a_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_190cea7a_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_190cea7a_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var KPICardvue_type_template_id_c61db362_hoisted_7 = [KPICardvue_type_template_id_c61db362_hoisted_6]; +var _hoisted_8 = ["innerHTML"]; +function KPICardvue_type_template_id_c61db362_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_c61db362_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_c61db362_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", { class: "kpiCardValue", title: _ctx.kpi.valueCompact !== _ctx.kpi.value ? _ctx.kpi.value : '' - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.valueCompact), 9, KPICardvue_type_template_id_190cea7a_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_190cea7a_hoisted_5, [_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"], { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.valueCompact), 9, KPICardvue_type_template_id_c61db362_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_c61db362_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_["createElementVNode"])("span", null, 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_190cea7a_hoisted_6, _hoisted_8))]), _ctx.kpi.badge ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + }, 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_["createElementVNode"])("span", null, 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_c61db362_hoisted_5, KPICardvue_type_template_id_c61db362_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, _hoisted_9)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]); + }, null, 8, _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=190cea7a +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=template&id=c61db362 // 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 @@ -663,7 +660,7 @@ function KPICardvue_type_template_id_190cea7a_render(_ctx, _cache, $props, $setu -KPICardvue_type_script_lang_ts.render = KPICardvue_type_template_id_190cea7a_render +KPICardvue_type_script_lang_ts.render = KPICardvue_type_template_id_c61db362_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 @@ -727,7 +724,7 @@ var SitesTablevue_type_template_id_198e6bf1_hoisted_8 = { key: 0, value: "revenue_evolution" }; -var SitesTablevue_type_template_id_198e6bf1_hoisted_9 = { +var _hoisted_9 = { key: 0 }; var _hoisted_10 = { @@ -819,7 +816,7 @@ function SitesTablevue_type_template_id_198e6bf1_render(_ctx, _cache, $props, $s 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_198e6bf1_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_198e6bf1_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_198e6bf1_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_198e6bf1_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_198e6bf1_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", SitesTablevue_type_template_id_198e6bf1_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", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_198e6bf1_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_198e6bf1_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_198e6bf1_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_198e6bf1_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_198e6bf1_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/') diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index f7f00ec1760..0f927eea52e 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -1,16 +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 r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="plugins/MultiSites/vue/dist/",r(r.s="fae3")}({"19dc":function(t,r){t.exports=e},"8bbf":function(e,r){e.exports=t},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"AllWebsitesDashboard",(function(){return xe})),r.d(t,"MultisitesSite",(function(){return pt})),r.d(t,"DashboadStore",(function(){return jt})),r.d(t,"Dashboard",(function(){return pr})),"undefined"!==typeof window){var a=window.document.currentScript,n=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(r.p=n[1])}var o=r("8bbf"),i={class:"dashboardHeader"},s={class:"card-title"},l={class:"dashboardControls"},c={class:"siteSearch"},u=["placeholder"],d=["title"],m=["href"];function b(e,t,r,a,n,b){var p=Object(o["resolveComponent"])("EnrichedHeadline"),v=Object(o["resolveComponent"])("KPICardContainer"),h=Object(o["resolveComponent"])("SitesTable");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",i,[Object(o["createElementVNode"])("h1",s,[Object(o["createVNode"])(p,{"feature-name":e.translate("MultiSites_AllWebsitesDashboardTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("MultiSites_AllWebsitesDashboardTitle")),1)]})),_:1},8,["feature-name"])])]),Object(o["createVNode"])(v,{"is-loading":e.isLoadingKPIs,"model-value":e.kpis},null,8,["is-loading","model-value"]),Object(o["createElementVNode"])("div",l,[Object(o["createElementVNode"])("div",c,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onKeydown:t[0]||(t[0]=Object(o["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,u),[[o["vModelText"],e.searchTerm]]),Object(o["createElementVNode"])("span",{class:"icon-search",onClick:t[2]||(t[2]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,d)]),!e.isWidgetized&&e.isUserAllowedToAddSite?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,class:"btn",href:e.addSiteUrl},Object(o["toDisplayString"])(e.translate("SitesManager_AddSite")),9,m)):Object(o["createCommentVNode"])("",!0)]),Object(o["createVNode"])(h,{"display-revenue":e.displayRevenue,"display-sparklines":e.displaySparklines},null,8,["display-revenue","display-sparklines"])],64)}var p=r("19dc");function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r0&&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 r={method:"MultiSites.getAllWithGroups",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,format_metrics:0,showColumns:["hits_evolution","hits_evolution_trend","label","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&&(r.pattern=this.searchTerm),p["AjaxHelper"].fetch(r,{abortController:this.fetchAbort}).then((function(r){t||(e.updateDashboardKPIs(r),p["Matomo"].postEvent("MultiSites.DashboardKPIs.updated",{parameters:(new p["AjaxHelper"]).mixinDefaultGetParams({filter_limit:e.pageSize,filter_offset:e.currentPagingOffset.value,filter_sort_column:e.privateState.sortColumn,filter_sort_order:e.privateState.sortOrder,pattern:e.searchTerm}),kpis:e.privateState.dashboardKPIs})),e.updateDashboardSites(r)})).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:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=p["Periods"].parse(p["Matomo"].period,p["Matomo"].currentDateString)}catch(r){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={badges:{hits:"",pageviews:"",revenue:"",visits:""},evolutionPeriod:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(e.totals.hits),hitsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.hits),hitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.hits,e.totals.previous_hits,!0),hitsTrend:Math.sign(e.totals.hits-e.totals.previous_hits),pageviews:p["NumberFormatter"].formatNumber(e.totals.nb_pageviews),pageviewsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.nb_pageviews),pageviewsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_pageviews,e.totals.previous_nb_pageviews,!0),pageviewsTrend:Math.sign(e.totals.nb_pageviews-e.totals.previous_nb_pageviews),revenue:p["NumberFormatter"].formatCurrency(e.totals.revenue,""),revenueCompact:p["NumberFormatter"].formatCurrencyCompact(e.totals.revenue,""),revenueEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.revenue,e.totals.previous_revenue,!0),revenueTrend:Math.sign(e.totals.revenue-e.totals.previous_revenue),visits:p["NumberFormatter"].formatNumber(e.totals.nb_visits),visitsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.nb_visits),visitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_visits,e.totals.previous_nb_visits,!0),visitsTrend:Math.sign(e.totals.nb_visits-e.totals.previous_nb_visits)}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites}}]),e}(),k=new S,y={class:"kpiCardContainer"},C={key:0,class:"kpiCard kpiCardLoading"},_=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),N={class:"kpiCardValue"},E=Object(o["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),V={key:0,class:"kpiCardBadge"};function w(e,t,r,a,n,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("KPICard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",y,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",C,[_,Object(o["createElementVNode"])("div",N,[Object(o["createVNode"])(s)]),E,e.hasKpiBadge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",V," ")):Object(o["createCommentVNode"])("",!0)])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:1},Object(o["renderList"])(e.kpis,(function(t,r){return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:"kpi-card-".concat(r)},[r>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var T={class:"kpiCard"},B={class:"kpiCardContent"},P={class:"kpiCardTitle"},M=["title"],D={class:"kpiCardEvolution"},x={key:1,class:"kpiCardEvolution"},L=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),A=[L],F=["innerHTML"];function G(e,t,r,a,n,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("div",P,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(o["createElementVNode"])("div",{class:"kpiCardValue",title:e.kpi.valueCompact!==e.kpi.value?e.kpi.value:""},Object(o["toDisplayString"])(e.kpi.valueCompact),9,M),Object(o["createElementVNode"])("div",D,[""!==e.kpi.evolutionValue?(Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:0},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.kpi.evolutionValue)+"  ",1)],2),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",x,A))]),e.kpi.badge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,F)):Object(o["createCommentVNode"])("",!0)])])}var R=Object(o["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}}});R.render=G;var I=R,z=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:I},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}}});z.render=w;var U=z,H={class:"sitesTableContainer"},q={class:"card-table dataTable sitesTable"},K={class:"sitesTableEvolutionSelector"},W=["value"],$={value:"hits_evolution"},J={value:"visits_evolution"},Y={value:"pageviews_evolution"},Q={key:0,value:"revenue_evolution"},X={key:0},Z={class:"sitesTableLoading",colspan:"7"},ee={key:1},te={colspan:"7"},re={class:"notification system notification-error"},ae=Object(o["createElementVNode"])("br",null,null,-1),ne=Object(o["createElementVNode"])("br",null,null,-1),oe=["href"],ie=Object(o["createTextVNode"])(" – "),se=["href"],le=["href"],ce=Object(o["createTextVNode"])(". "),ue={key:0,class:"sitesTablePagination"},de={class:"dataTablePages"};function me(e,t,r,a,n,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("SitesTableSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",H,[Object(o["createElementVNode"])("table",q,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(o["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(o["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},["hits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(o["createElementVNode"])("option",$,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(o["createElementVNode"])("option",J,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",Y,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",Q,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,W)])])]),Object(o["createElementVNode"])("tbody",null,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",X,[Object(o["createElementVNode"])("td",Z,[Object(o["createVNode"])(s)])])):e.errorLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",ee,[Object(o["createElementVNode"])("td",te,[Object(o["createElementVNode"])("div",re,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),ae,ne,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,oe),ie,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,se),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.errorShowProfessionalHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,le),[[o["vShow"],e.errorShowProfessionalHelp]]),ce])])])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:2},Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"display-sparkline":e.displaySparklines,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","display-sparkline","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ue,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(o["toDisplayString"])(e.translate("General_Previous")),513),[[o["vShow"],0!==e.paginationCurrentPage]]),Object(o["createElementVNode"])("span",de,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[o["vShow"],e.paginationCurrentPage0&&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 r={method:"MultiSites.getAllWithGroups",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,format_metrics:0,showColumns:["hits_evolution","hits_evolution_trend","label","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&&(r.pattern=this.searchTerm),p["AjaxHelper"].fetch(r,{abortController:this.fetchAbort}).then((function(r){t||(e.updateDashboardKPIs(r),p["Matomo"].postEvent("MultiSites.DashboardKPIs.updated",{parameters:(new p["AjaxHelper"]).mixinDefaultGetParams({filter_limit:e.pageSize,filter_offset:e.currentPagingOffset.value,filter_sort_column:e.privateState.sortColumn,filter_sort_order:e.privateState.sortOrder,pattern:e.searchTerm}),kpis:e.privateState.dashboardKPIs})),e.updateDashboardSites(r)})).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:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=p["Periods"].parse(p["Matomo"].period,p["Matomo"].currentDateString)}catch(r){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={badges:{hits:"",pageviews:"",revenue:"",visits:""},evolutionPeriod:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(e.totals.hits),hitsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.hits),hitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.hits,e.totals.previous_hits,!0),hitsTrend:Math.sign(e.totals.hits-e.totals.previous_hits),pageviews:p["NumberFormatter"].formatNumber(e.totals.nb_pageviews),pageviewsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.nb_pageviews),pageviewsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_pageviews,e.totals.previous_nb_pageviews,!0),pageviewsTrend:Math.sign(e.totals.nb_pageviews-e.totals.previous_nb_pageviews),revenue:p["NumberFormatter"].formatCurrency(e.totals.revenue,""),revenueCompact:p["NumberFormatter"].formatCurrencyCompact(e.totals.revenue,""),revenueEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.revenue,e.totals.previous_revenue,!0),revenueTrend:Math.sign(e.totals.revenue-e.totals.previous_revenue),visits:p["NumberFormatter"].formatNumber(e.totals.nb_visits),visitsCompact:p["NumberFormatter"].formatNumberCompact(e.totals.nb_visits),visitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_visits,e.totals.previous_nb_visits,!0),visitsTrend:Math.sign(e.totals.nb_visits-e.totals.previous_nb_visits)}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites}}]),e}(),k=new S,y={class:"kpiCardContainer"},C={key:0,class:"kpiCard kpiCardLoading"},_=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),N={class:"kpiCardValue"},E=Object(o["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),V={key:0,class:"kpiCardBadge"};function w(e,t,r,a,n,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("KPICard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",y,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",C,[_,Object(o["createElementVNode"])("div",N,[Object(o["createVNode"])(s)]),E,e.hasKpiBadge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",V," ")):Object(o["createCommentVNode"])("",!0)])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:1},Object(o["renderList"])(e.kpis,(function(t,r){return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:"kpi-card-".concat(r)},[r>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var T={class:"kpiCard"},B={class:"kpiCardTitle"},P=["title"],M={class:"kpiCardEvolution"},D={key:1,class:"kpiCardEvolution"},x=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),L=[x],A=["innerHTML"];function F(e,t,r,a,n,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(o["createElementVNode"])("div",{class:"kpiCardValue",title:e.kpi.valueCompact!==e.kpi.value?e.kpi.value:""},Object(o["toDisplayString"])(e.kpi.valueCompact),9,P),Object(o["createElementVNode"])("div",M,[""!==e.kpi.evolutionValue?(Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:0},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.kpi.evolutionValue)+"  ",1)],2),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",D,L))]),e.kpi.badge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,A)):Object(o["createCommentVNode"])("",!0)])}var G=Object(o["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=F;var R=G,I=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:R},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=w;var z=I,U={class:"sitesTableContainer"},H={class:"card-table dataTable sitesTable"},q={class:"sitesTableEvolutionSelector"},K=["value"],W={value:"hits_evolution"},$={value:"visits_evolution"},J={value:"pageviews_evolution"},Y={key:0,value:"revenue_evolution"},Q={key:0},X={class:"sitesTableLoading",colspan:"7"},Z={key:1},ee={colspan:"7"},te={class:"notification system notification-error"},re=Object(o["createElementVNode"])("br",null,null,-1),ae=Object(o["createElementVNode"])("br",null,null,-1),ne=["href"],oe=Object(o["createTextVNode"])(" – "),ie=["href"],se=["href"],le=Object(o["createTextVNode"])(". "),ce={key:0,class:"sitesTablePagination"},ue={class:"dataTablePages"};function de(e,t,r,a,n,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("SitesTableSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",U,[Object(o["createElementVNode"])("table",H,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(o["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(o["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},["hits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(o["createElementVNode"])("th",q,[Object(o["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(o["createElementVNode"])("option",W,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(o["createElementVNode"])("option",$,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",J,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",Y,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,K)])])]),Object(o["createElementVNode"])("tbody",null,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Q,[Object(o["createElementVNode"])("td",X,[Object(o["createVNode"])(s)])])):e.errorLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Z,[Object(o["createElementVNode"])("td",ee,[Object(o["createElementVNode"])("div",te,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),re,ae,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,ne),oe,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ie),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.errorShowProfessionalHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,se),[[o["vShow"],e.errorShowProfessionalHelp]]),le])])])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:2},Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"display-sparkline":e.displaySparklines,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","display-sparkline","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ce,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(o["toDisplayString"])(e.translate("General_Previous")),513),[[o["vShow"],0!==e.paginationCurrentPage]]),Object(o["createElementVNode"])("span",ue,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[o["vShow"],e.paginationCurrentPager&&(e=r),e})))}return Ot(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var r=e.sites;r.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var r=p["NumberFormatter"].formatPercent(Math.round(100*parseInt(e.ratio,10))),a=null,n="0",o="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(n=p["NumberFormatter"].formatNumber(e.previous_nb_visits),o=p["NumberFormatter"].formatNumber(e.nb_visits),i=p["NumberFormatter"].formatPercent(e.visits_evolution),a=Object(p["translate"])("General_ColumnNbVisits"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(n="".concat(e.previous_nb_pageviews),o="".concat(e.nb_pageviews),i=p["NumberFormatter"].formatPercent(e.pageviews_evolution),a=Object(p["translate"])("General_ColumnPageviews"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_nb_pageviews,10)*parseInt(e.ratio,10)))),"hits_evolution"===t.state.value.sortColumn&&(n="".concat(e.previous_hits),o="".concat(e.hits),i=p["NumberFormatter"].formatPercent(e.hits_evolution),a=Object(p["translate"])("General_ColumnHits"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_hits,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(n=p["NumberFormatter"].formatCurrency(e.previous_revenue,e.currencySymbol),o=p["NumberFormatter"].formatCurrency(e.revenue,e.currencySymbol),i=p["NumberFormatter"].formatPercent(e.revenue_evolution),a=Object(p["translate"])("General_ColumnRevenue"),s=p["NumberFormatter"].formatCurrency(Math.round(parseInt(e.previous_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),a)switch(e.tooltip="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonIncomplete",[r]),"\n"),e.tooltip+="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonProportional",[r,"".concat(s),a,"".concat(n)]),"\n"),e.periodName){case"day":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonYear",["".concat(o),a,"".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.totalHits=e.totals.hits,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.previous_nb_visits,this.privateState.sites=r,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","hits","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","hits_evolution","hits_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,p["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 gt,St={ref:"root"},kt={class:"card-title"},yt=["innerHTML","title"],Ct={id:"mt",class:"dataTable card-table",cellspacing:"0"},_t={class:"heading"},Nt={class:"heading"},Et={class:"heading"},Vt={class:"heading"},wt={class:"heading"},Tt=["colspan"],Bt=["value"],Pt={value:"visits_evolution"},Mt={value:"pageviews_evolution"},Dt={value:"hits_evolution"},xt={key:0,value:"revenue_evolution"},Lt={key:0},At={colspan:"7",class:"allWebsitesLoading"},Ft={key:1},Gt={key:0},Rt={colspan:"7"},It={class:"notification system notification-error"},zt=Object(o["createElementVNode"])("br",null,null,-1),Ut=Object(o["createElementVNode"])("br",null,null,-1),Ht=["href"],qt=Object(o["createTextVNode"])(" – "),Kt=["href"],Wt=["href"],$t=Object(o["createTextVNode"])(". "),Jt={colspan:"8",class:"paging"},Yt={class:"row"},Qt={class:"col s3 add_new_site"},Xt=["href"],Zt=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),er={class:"col s6"},tr={style:{cursor:"pointer"}},rr={class:"dataTablePages"},ar={id:"counter"},nr={style:{cursor:"pointer"},class:"pointer"},or=Object(o["createElementVNode"])("div",{class:"col s3"}," ",-1),ir={row_id:"last"},sr={colspan:"8",class:"site_search"},lr={class:"row"},cr={class:"input-field col s12"},ur=["placeholder"],dr=["title"];function mr(e,t,r,a,n,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",St,[Object(o["createElementVNode"])("h2",kt,[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,yt)]})),_:1},8,["help-url","feature-name"])]),Object(o["createElementVNode"])("table",Ct,[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",_t,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",Nt,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",Et,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),Object(o["createElementVNode"])("th",{id:"hits",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"hits"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"hits"===e.sortColumn,multisites_desc:e.reverse&&"hits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",Vt,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),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[4]||(t[4]=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",wt,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[5]||(t[5]=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[6]||(t[6]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(o["createElementVNode"])("option",Pt,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",Mt,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),Object(o["createElementVNode"])("option",Dt,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",xt,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,Bt)],10,Tt)])]),e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",Lt,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",At,[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",Ft,[e.errorLoadingSites?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Gt,[Object(o["createElementVNode"])("td",Rt,[Object(o["createElementVNode"])("div",It,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),zt,Ut,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,Ht),qt,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,Kt),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,Wt),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),$t])])])):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",Jt,[Object(o["createElementVNode"])("div",Yt,[Object(o["createElementVNode"])("div",Qt,[e.hasSuperUserAccess?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[Zt,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,Xt)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",er,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.previousPage()})},[Object(o["createElementVNode"])("span",tr,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],512),[[o["vShow"],!(0===e.currentPage)]]),Object(o["createElementVNode"])("span",rr,[Object(o["createElementVNode"])("span",ar,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[8]||(t[8]=function(t){return e.nextPage()})},[Object(o["createElementVNode"])("span",nr,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),or])])]),Object(o["createElementVNode"])("tr",ir,[Object(o["createElementVNode"])("td",sr,[Object(o["createElementVNode"])("div",lr,[Object(o["createElementVNode"])("div",cr,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onKeydown:t[9]||(t[9]=Object(o["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,ur),[[o["vModelText"],e.searchTerm]]),Object(o["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[11]||(t[11]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,dr)])])])])])])],512)}var br=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:p["EnrichedHeadline"],ActivityIndicator:p["ActivityIndicator"],MultisitesSite:pt},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 p["Matomo"].hasSuperUserAccess},date:function(){return p["MatomoUrl"].urlParsed.value.date},idSite:function(){return p["MatomoUrl"].urlParsed.value.idSite},url:function(){return p["Matomo"].piwik_url},period:function(){return p["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return p["Matomo"].config&&p["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(p["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=jt.state.value;return Object(p["translate"])("General_EvolutionSummaryGeneric",Object(p["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,p["NumberFormatter"].calculateAndFormatEvolution(p["NumberFormatter"].parseFormattedNumber(e.totalVisits),p["NumberFormatter"].parseFormattedNumber(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(p["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)}}});br.render=mr;var pr=br; + */var ft=function(){function e(){var t=this;pt(this,e),Ot(this,"privateState",Object(o["reactive"])({sites:[],isLoading:!1,pageSize:25,currentPage:0,totalVisits:"?",totalPageviews:"?",totalHits:"?",totalActions:"?",totalRevenue:"?",searchTerm:"",lastVisits:"?",lastVisitsDate:"?",numberOfSites:0,loadingMessage:Object(p["translate"])("MultiSites_LoadingWebsites"),reverse:!0,sortColumn:"nb_visits",refreshInterval:0,errorLoadingSites:!1})),Ot(this,"refreshTimeout",null),Ot(this,"fetchAbort",null),Ot(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),Ot(this,"numberOfFilteredSites",Object(o["computed"])((function(){return t.state.value.numberOfSites}))),Ot(this,"numberOfPages",Object(o["computed"])((function(){return Math.ceil(t.numberOfFilteredSites.value/t.state.value.pageSize-1)}))),Ot(this,"currentPagingOffset",Object(o["computed"])((function(){return Math.ceil(t.state.value.currentPage*t.state.value.pageSize)}))),Ot(this,"paginationLowerBound",Object(o["computed"])((function(){return t.currentPagingOffset.value+1}))),Ot(this,"paginationUpperBound",Object(o["computed"])((function(){var e=t.currentPagingOffset.value+t.state.value.pageSize,r=t.numberOfFilteredSites.value;return e>r&&(e=r),e})))}return ht(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var r=e.sites;r.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var r=p["NumberFormatter"].formatPercent(Math.round(100*parseInt(e.ratio,10))),a=null,n="0",o="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(n=p["NumberFormatter"].formatNumber(e.previous_nb_visits),o=p["NumberFormatter"].formatNumber(e.nb_visits),i=p["NumberFormatter"].formatPercent(e.visits_evolution),a=Object(p["translate"])("General_ColumnNbVisits"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(n="".concat(e.previous_nb_pageviews),o="".concat(e.nb_pageviews),i=p["NumberFormatter"].formatPercent(e.pageviews_evolution),a=Object(p["translate"])("General_ColumnPageviews"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_nb_pageviews,10)*parseInt(e.ratio,10)))),"hits_evolution"===t.state.value.sortColumn&&(n="".concat(e.previous_hits),o="".concat(e.hits),i=p["NumberFormatter"].formatPercent(e.hits_evolution),a=Object(p["translate"])("General_ColumnHits"),s=p["NumberFormatter"].formatNumber(Math.round(parseInt(e.previous_hits,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(n=p["NumberFormatter"].formatCurrency(e.previous_revenue,e.currencySymbol),o=p["NumberFormatter"].formatCurrency(e.revenue,e.currencySymbol),i=p["NumberFormatter"].formatPercent(e.revenue_evolution),a=Object(p["translate"])("General_ColumnRevenue"),s=p["NumberFormatter"].formatCurrency(Math.round(parseInt(e.previous_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),a)switch(e.tooltip="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonIncomplete",[r]),"\n"),e.tooltip+="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonProportional",[r,"".concat(s),a,"".concat(n)]),"\n"),e.periodName){case"day":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),a,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonYear",["".concat(o),a,"".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.totalHits=e.totals.hits,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.previous_nb_visits,this.privateState.sites=r,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","hits","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","hits_evolution","hits_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,p["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}(),gt=new ft,jt={ref:"root"},St={class:"card-title"},kt=["innerHTML","title"],yt={id:"mt",class:"dataTable card-table",cellspacing:"0"},Ct={class:"heading"},_t={class:"heading"},Nt={class:"heading"},Et={class:"heading"},Vt={class:"heading"},wt=["colspan"],Tt=["value"],Bt={value:"visits_evolution"},Pt={value:"pageviews_evolution"},Mt={value:"hits_evolution"},Dt={key:0,value:"revenue_evolution"},xt={key:0},Lt={colspan:"7",class:"allWebsitesLoading"},At={key:1},Ft={key:0},Gt={colspan:"7"},Rt={class:"notification system notification-error"},It=Object(o["createElementVNode"])("br",null,null,-1),zt=Object(o["createElementVNode"])("br",null,null,-1),Ut=["href"],Ht=Object(o["createTextVNode"])(" – "),qt=["href"],Kt=["href"],Wt=Object(o["createTextVNode"])(". "),$t={colspan:"8",class:"paging"},Jt={class:"row"},Yt={class:"col s3 add_new_site"},Qt=["href"],Xt=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),Zt={class:"col s6"},er={style:{cursor:"pointer"}},tr={class:"dataTablePages"},rr={id:"counter"},ar={style:{cursor:"pointer"},class:"pointer"},nr=Object(o["createElementVNode"])("div",{class:"col s3"}," ",-1),or={row_id:"last"},ir={colspan:"8",class:"site_search"},sr={class:"row"},lr={class:"input-field col s12"},cr=["placeholder"],ur=["title"];function dr(e,t,r,a,n,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",jt,[Object(o["createElementVNode"])("h2",St,[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,kt)]})),_:1},8,["help-url","feature-name"])]),Object(o["createElementVNode"])("table",yt,[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",Ct,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",_t,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",Nt,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),Object(o["createElementVNode"])("th",{id:"hits",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"hits"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"hits"===e.sortColumn,multisites_desc:e.reverse&&"hits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",Et,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),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[4]||(t[4]=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",Vt,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[5]||(t[5]=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[6]||(t[6]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(o["createElementVNode"])("option",Bt,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",Pt,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),Object(o["createElementVNode"])("option",Mt,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",Dt,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,Tt)],10,wt)])]),e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",xt,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",Lt,[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",At,[e.errorLoadingSites?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Ft,[Object(o["createElementVNode"])("td",Gt,[Object(o["createElementVNode"])("div",Rt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),It,zt,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,Ut),Ht,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,qt),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,Kt),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),Wt])])])):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",$t,[Object(o["createElementVNode"])("div",Jt,[Object(o["createElementVNode"])("div",Yt,[e.hasSuperUserAccess?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[Xt,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,Qt)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Zt,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.previousPage()})},[Object(o["createElementVNode"])("span",er,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],512),[[o["vShow"],!(0===e.currentPage)]]),Object(o["createElementVNode"])("span",tr,[Object(o["createElementVNode"])("span",rr,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[8]||(t[8]=function(t){return e.nextPage()})},[Object(o["createElementVNode"])("span",ar,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),nr])])]),Object(o["createElementVNode"])("tr",or,[Object(o["createElementVNode"])("td",ir,[Object(o["createElementVNode"])("div",sr,[Object(o["createElementVNode"])("div",lr,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onKeydown:t[9]||(t[9]=Object(o["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,cr),[[o["vModelText"],e.searchTerm]]),Object(o["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[11]||(t[11]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,ur)])])])])])])],512)}var mr=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:p["EnrichedHeadline"],ActivityIndicator:p["ActivityIndicator"],MultisitesSite:bt},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&>.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){gt.setRefreshInterval(e),gt.fetchAllSites()},sortBy:function(e){gt.sortBy(e)},previousPage:function(){gt.previousPage()},nextPage:function(){gt.nextPage()},searchSite:function(){gt.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return p["Matomo"].hasSuperUserAccess},date:function(){return p["MatomoUrl"].urlParsed.value.date},idSite:function(){return p["MatomoUrl"].urlParsed.value.idSite},url:function(){return p["Matomo"].piwik_url},period:function(){return p["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return p["Matomo"].config&&p["Matomo"].config.are_ads_enabled},sortColumn:function(){return gt.state.value.sortColumn},reverse:function(){return gt.state.value.reverse},smallTitleContent:function(){var e=gt.state.value;return Object(p["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=gt.state.value;return Object(p["translate"])("General_EvolutionSummaryGeneric",Object(p["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,p["NumberFormatter"].calculateAndFormatEvolution(p["NumberFormatter"].parseFormattedNumber(e.totalVisits),p["NumberFormatter"].parseFormattedNumber(e.lastVisits)))},loadingMessage:function(){return gt.state.value.loadingMessage},isLoading:function(){return gt.state.value.isLoading},errorLoadingSites:function(){return gt.state.value.errorLoadingSites},sites:function(){return gt.state.value.sites},numberOfPages:function(){return gt.numberOfPages.value},currentPage:function(){return gt.state.value.currentPage},paginationLowerBound:function(){return gt.paginationLowerBound.value},paginationUpperBound:function(){return gt.paginationUpperBound.value},numberOfFilteredSites:function(){return gt.numberOfFilteredSites.value},professionalHelpUrl:function(){return Object(p["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)}}});mr.render=dr;var br=mr; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less index 618bffa1c47..df33b261f46 100644 --- a/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less @@ -198,6 +198,7 @@ } .kpiCardEvolutionTrend { + width: 1%; font-size: 1rem; white-space: nowrap; vertical-align: middle; @@ -226,6 +227,7 @@ height: 1.5rem; margin-top: 0.5rem; padding: 0 0.35rem; + width: fit-content; } } diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue index 1359d09cbc1..f5febab508f 100644 --- a/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue @@ -7,37 +7,35 @@