diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index c64dc978648..e764e051f6a 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -2208,11 +2208,6 @@ function NumberFormatter_defineProperty(obj, key, value) { if (key in obj) { Obj var NumberFormatter_window = window, NumberFormatter_$ = NumberFormatter_window.$; -/** - * Number Formatter for formatting numbers, percent and currencies values - * - * @type {object} - */ var NumberFormatter_NumberFormatter = /*#__PURE__*/function () { function NumberFormatter() { @@ -2225,15 +2220,7 @@ var NumberFormatter_NumberFormatter = /*#__PURE__*/function () { NumberFormatter_createClass(NumberFormatter, [{ key: "format", - value: - /** - * Formats the given numeric value with the given pattern - * - * @param value - * @param pattern - * @returns {string} - */ - function format(val, formatPattern, maxFractionDigits, minFractionDigits) { + value: function format(val, formatPattern, maxFractionDigits, minFractionDigits) { if (!NumberFormatter_$.isNumeric(val)) { return String(val); } @@ -2309,13 +2296,6 @@ var NumberFormatter_NumberFormatter = /*#__PURE__*/function () { return this.replaceSymbols(result); } - /** - * Replaces the placeholders with real symbols - * - * @param value - * @returns {string} - */ - }, { key: "replaceSymbols", value: function replaceSymbols(value) { @@ -2348,27 +2328,37 @@ var NumberFormatter_NumberFormatter = /*#__PURE__*/function () { } }, { key: "valOrDefault", - value: function valOrDefault(def, val) { + value: function valOrDefault(val, def) { if (typeof val === 'undefined') { return def; } return val; } + }, { + key: "parseFormattedNumber", + value: function parseFormattedNumber(value) { + var isNegative = value.indexOf(Matomo_Matomo.numbers.symbolMinus) > -1 || value.startsWith('-'); + var numberParts = value.split(Matomo_Matomo.numbers.symbolDecimal); + numberParts.forEach(function (val, index) { + numberParts[index] = val.replace(/[^0-9]/g, ''); + }); + return (isNegative ? -1 : 1) * parseFloat(numberParts.join('.')); + } }, { key: "formatNumber", value: function formatNumber(value, maxFractionDigits, minFractionDigits) { - return this.format(value, Matomo_Matomo.numbers.patternNumber, this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits)); + return this.format(value, Matomo_Matomo.numbers.patternNumber, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); } }, { key: "formatPercent", value: function formatPercent(value, maxFractionDigits, minFractionDigits) { - return this.format(value, Matomo_Matomo.numbers.patternPercent, this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits)); + return this.format(value, Matomo_Matomo.numbers.patternPercent, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); } }, { key: "formatCurrency", value: function formatCurrency(value, currency, maxFractionDigits, minFractionDigits) { - var formatted = this.format(value, Matomo_Matomo.numbers.patternCurrency, this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits)); + var formatted = this.format(value, Matomo_Matomo.numbers.patternCurrency, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); return formatted.replace('¤', currency); } }, { diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index e4b3d05effa..0578b9a4d00 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -85,7 +85,7 @@ function de(e,t){return be(e)||he(e,t)||pe(e,t)||me()}function me(){throw new Ty * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.ajaxHelper=Ze;var ut=window,dt=ut.$,mt=function(){function e(){it(this,e),st(this,"defaultMinFractionDigits",0),st(this,"defaultMaxFractionDigits",2)}return ct(e,[{key:"format",value:function(e,t,n,r){if(!dt.isNumeric(e))return String(e);var o=e,a=t||ue.numbers.patternNumber,i=a.split(";");1===i.length&&i.push("-".concat(i[0]));var l=o<0;if(a=l?i[1]:i[0],o=Math.abs(o),n>=0){var c=Math.pow(10,n);o=Math.round(o*c)/c}var s=o.toString().split("."),u=s[0],d=s[1]||"",m=-1!==a.indexOf(",");if(m){var p=a.match(/#+0/),f=(null===p||void 0===p?void 0:p[0].length)||0,h=(null===p||void 0===p?void 0:p[0].length)||0,b=a.split(",");b.length>2&&(h=b[1].length);var v=u.split("").reverse(),g=[];g.push(v.splice(0,f).reverse().join(""));while(v.length)g.push(v.splice(0,h).reverse().join(""));g=g.reverse(),u=g.join(",")}if(r>0&&(d=d.replace(/0+$/,""),d.length0?ue.numbers.symbolPlus:"").concat(o)}},{key:"calculateAndFormatEvolution",value:function(e,t,n){var r,o=parseInt(t,10),a=parseInt(e,10)-o;r=0===a||Number.isNaN(a)?0:0===o||Number.isNaN(o)?100:a/o*100;var i=3;return Math.abs(r)>100?i=0:Math.abs(r)>10?i=1:Math.abs(r)>1&&(i=2),this.formatEvolution(r,i,0,n)}}]),e}(),pt=new mt;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var n=0;n=0){var c=Math.pow(10,n);o=Math.round(o*c)/c}var s=o.toString().split("."),u=s[0],d=s[1]||"",m=-1!==a.indexOf(",");if(m){var p=a.match(/#+0/),f=(null===p||void 0===p?void 0:p[0].length)||0,h=(null===p||void 0===p?void 0:p[0].length)||0,b=a.split(",");b.length>2&&(h=b[1].length);var v=u.split("").reverse(),g=[];g.push(v.splice(0,f).reverse().join(""));while(v.length)g.push(v.splice(0,h).reverse().join(""));g=g.reverse(),u=g.join(",")}if(r>0&&(d=d.replace(/0+$/,""),d.length-1||e.startsWith("-"),n=e.split(ue.numbers.symbolDecimal);return n.forEach((function(e,t){n[t]=e.replace(/[^0-9]/g,"")})),(t?-1:1)*parseFloat(n.join("."))}},{key:"formatNumber",value:function(e,t,n){return this.format(e,ue.numbers.patternNumber,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(n,this.defaultMinFractionDigits))}},{key:"formatPercent",value:function(e,t,n){return this.format(e,ue.numbers.patternPercent,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(n,this.defaultMinFractionDigits))}},{key:"formatCurrency",value:function(e,t,n,r){var o=this.format(e,ue.numbers.patternCurrency,this.valOrDefault(n,this.defaultMaxFractionDigits),this.valOrDefault(r,this.defaultMinFractionDigits));return o.replace("¤",t)}},{key:"formatEvolution",value:function(e,t,n,r){if(r)return this.formatPercent(Math.abs(e),t,n);var o=this.formatPercent(e,t,n);return"".concat(e>0?ue.numbers.symbolPlus:"").concat(o)}},{key:"calculateAndFormatEvolution",value:function(e,t,n){var r,o=parseInt(t,10),a=parseInt(e,10)-o;r=0===a||Number.isNaN(a)?0:0===o||Number.isNaN(o)?100:a/o*100;var i=3;return Math.abs(r)>100?i=0:Math.abs(r)>10?i=1:Math.abs(r)>1&&(i=2),this.formatEvolution(r,i,0,n)}}]),e}(),pt=new mt;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var n=0;n { }) }); + const formattedNumberTestData: Array> = [ + ['en', '+100%', 100], + ['en', '-75%', -75], + ['en', '12,245.66', 12245.66], + ['en', '-0.555', -0.555], + ['ar', '؜+51٬239٫56٪؜', 51239.56], + ['be', '+51 239,56 %', 51239.56], + ['de', '+51.239,56 %', 51239.56 ], + ['de', '-239,56 $%', -239.56 ], + ['he', '‎+152,551,239.56%', 152551239.56], + ['he', '‎-152,551,239.56', -152551239.56], + ['hi', '+15,25,51,240%', 152551240], + ['lt', '−152 551 240 %', -152551240], + ]; + + formattedNumberTestData.forEach((testdata) => { + const [ lang, input, expected ] = testdata; + + it(`should correctly parse formatted number with (${lang}, ${input})`, () => { + + window.piwik.numbers = formats[lang]; + + const result = NumberFormatter.parseFormattedNumber(input as string); + + expect(result).toEqual(expected); + }) + }); + }); diff --git a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts b/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts index c08689abbeb..bf06ed20c46 100644 --- a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts +++ b/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts @@ -9,23 +9,11 @@ import Matomo from '../Matomo/Matomo'; const { $ } = window; -/** - * Number Formatter for formatting numbers, percent and currencies values - * - * @type {object} - */ class NumberFormatter { defaultMinFractionDigits = 0; defaultMaxFractionDigits = 2; - /** - * Formats the given numeric value with the given pattern - * - * @param value - * @param pattern - * @returns {string} - */ private format( val: string|number, formatPattern: string, @@ -119,12 +107,6 @@ class NumberFormatter { return this.replaceSymbols(result); } - /** - * Replaces the placeholders with real symbols - * - * @param value - * @returns {string} - */ private replaceSymbols(value: string): string { const replacements = { '.': Matomo.numbers.symbolDecimal, @@ -155,7 +137,7 @@ class NumberFormatter { return newValue; } - private valOrDefault(def: number, val?: number): number { + private valOrDefault(val: number|undefined, def: number): number { if (typeof val === 'undefined') { return def; } @@ -163,6 +145,17 @@ class NumberFormatter { return val; } + public parseFormattedNumber(value: string): number { + const isNegative = value.indexOf(Matomo.numbers.symbolMinus) > -1 || value.startsWith('-'); + const numberParts = value.split(Matomo.numbers.symbolDecimal); + + numberParts.forEach((val, index) => { + numberParts[index] = val.replace(/[^0-9]/g, ''); + }); + + return (isNegative ? -1 : 1) * parseFloat(numberParts.join('.')); + } + public formatNumber( value: string|number, maxFractionDigits?: number, @@ -171,8 +164,8 @@ class NumberFormatter { return this.format( value, Matomo.numbers.patternNumber, - this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), - this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits), + this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), + this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), ); } @@ -184,8 +177,8 @@ class NumberFormatter { return this.format( value, Matomo.numbers.patternPercent, - this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), - this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits), + this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), + this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), ); } @@ -198,8 +191,8 @@ class NumberFormatter { const formatted = this.format( value, Matomo.numbers.patternCurrency, - this.valOrDefault(this.defaultMaxFractionDigits, maxFractionDigits), - this.valOrDefault(this.defaultMinFractionDigits, minFractionDigits), + this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), + this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), ); return formatted.replace('¤', currency); } diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php index 91b9eb94602..126ab482ca6 100644 --- a/plugins/MultiSites/API.php +++ b/plugins/MultiSites/API.php @@ -317,7 +317,6 @@ private function buildDataTable($idSites, $period, $date, $segment, $_restrictSi $pastData->filter('ReplaceColumnNames', array($columnNameRewrites)); $this->populateLabel($pastData); // labels are needed to calculate evolution $this->calculateEvolutionPercentages($dataTable, $pastData, $apiMetrics); - $this->setPastTotalVisitsMetadata($dataTable, $pastData); $this->setPreviousMetricsTotalsMetadata($dataTable, $pastData, $totalMetrics); if ($dataTable instanceof DataTable) { @@ -554,7 +553,7 @@ private function setMetricsTotalsMetadata($dataTable, $apiMetrics) private function setPreviousMetricsTotalsMetadata($dataTable, $pastData, $apiMetrics) { if ($dataTable instanceof DataTable\Map) { - $currentDataTables = $pastData->getDataTables(); + $currentDataTables = $dataTable->getDataTables(); $pastDataTables = $pastData->getDataTables(); $currentLabels = array_keys($currentDataTables); $pastLabels = array_keys($pastDataTables); @@ -589,29 +588,6 @@ private function setPreviousMetricsTotalsMetadata($dataTable, $pastData, $apiMet } } - /** - * Sets the number of total visits in the pastTable on the dataTable as metadata. - * - * @param DataTable $dataTable - * @param DataTable $pastTable - */ - private function setPastTotalVisitsMetadata($dataTable, $pastTable) - { - if ($pastTable instanceof DataTable) { - $total = 0; - $metric = 'nb_visits'; - - $rows = $pastTable->getRows(); - $rows = $this->filterRowsForTotalsCalculation($rows); - - foreach ($rows as $row) { - $total += $row->getColumn($metric); - } - - $dataTable->setMetadata(self::getTotalMetadataName($metric . '_lastdate'), $total); - } - } - /** * @param Row[] $rows * @return mixed diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index 687be7fc329..7578d2ac66e 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -826,74 +826,75 @@ function SitesTablevue_type_template_id_198e6bf1_render(_ctx, _cache, $props, $s } // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=198e6bf1 -// 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=00161366 +// 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=784430e8 -var SitesTableSitevue_type_template_id_00161366_hoisted_1 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_1 = { class: "label" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_2 = ["href", "title"]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_2 = ["href", "title"]; -var SitesTableSitevue_type_template_id_00161366_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var SitesTableSitevue_type_template_id_784430e8_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-outlink" }, null, -1); -var SitesTableSitevue_type_template_id_00161366_hoisted_4 = [SitesTableSitevue_type_template_id_00161366_hoisted_3]; -var SitesTableSitevue_type_template_id_00161366_hoisted_5 = ["href"]; -var SitesTableSitevue_type_template_id_00161366_hoisted_6 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_4 = [SitesTableSitevue_type_template_id_784430e8_hoisted_3]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_5 = ["href"]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_6 = { key: 1, class: "value" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_7 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_7 = { class: "value" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_8 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_8 = { class: "value" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_9 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_9 = { class: "value" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_10 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_10 = { key: 0 }; -var SitesTableSitevue_type_template_id_00161366_hoisted_11 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_11 = { class: "value" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_12 = ["colspan"]; -var SitesTableSitevue_type_template_id_00161366_hoisted_13 = ["src"]; -var SitesTableSitevue_type_template_id_00161366_hoisted_14 = { +var SitesTableSitevue_type_template_id_784430e8_hoisted_12 = ["colspan"]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_13 = ["src"]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_14 = { key: 1, class: "sitesTableSparkline" }; -var SitesTableSitevue_type_template_id_00161366_hoisted_15 = ["href", "title"]; -var SitesTableSitevue_type_template_id_00161366_hoisted_16 = ["src"]; -function SitesTableSitevue_type_template_id_00161366_render(_ctx, _cache, $props, $setup, $data, $options) { +var SitesTableSitevue_type_template_id_784430e8_hoisted_15 = ["href", "title"]; +var SitesTableSitevue_type_template_id_784430e8_hoisted_16 = ["src"]; +function SitesTableSitevue_type_template_id_784430e8_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_00161366_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"], { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", SitesTableSitevue_type_template_id_784430e8_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_00161366_hoisted_4, 8, SitesTableSitevue_type_template_id_00161366_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, SitesTableSitevue_type_template_id_784430e8_hoisted_4, 8, SitesTableSitevue_type_template_id_784430e8_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_00161366_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_00161366_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_00161366_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_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_00161366_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_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_00161366_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.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_00161366_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_00161366_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatCurrency(_ctx.site.revenue, _ctx.site.currencySymbol)), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 9, SitesTableSitevue_type_template_id_784430e8_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_784430e8_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_784430e8_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_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_784430e8_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_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_784430e8_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.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_784430e8_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatCurrency(_ctx.site.revenue, _ctx.site.currencySymbol || '')), 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_00161366_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, SitesTableSitevue_type_template_id_784430e8_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.calculateAndFormatEvolution(_ctx.site[_ctx.sparklineMetric], _ctx.site["previous_".concat(_ctx.sparklineMetric)], true)), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_00161366_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_00161366_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.calculateAndFormatEvolution(_ctx.site[_ctx.sparklineMetric], _ctx.site["previous_".concat(_ctx.sparklineMetric)], true)), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_784430e8_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_784430e8_hoisted_14, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, rel: "noreferrer noopener", target: "_blank", href: _ctx.dashboardUrl, @@ -903,9 +904,9 @@ function SitesTableSitevue_type_template_id_00161366_render(_ctx, _cache, $props width: "100", height: "25", src: _ctx.evolutionSparklineSrc - }, null, 8, SitesTableSitevue_type_template_id_00161366_hoisted_16)], 8, SitesTableSitevue_type_template_id_00161366_hoisted_15)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, null, 8, SitesTableSitevue_type_template_id_784430e8_hoisted_16)], 8, SitesTableSitevue_type_template_id_784430e8_hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); } -// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=00161366 +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=784430e8 // 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 @@ -1006,7 +1007,7 @@ function SitesTableSitevue_type_template_id_00161366_render(_ctx, _cache, $props -SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_00161366_render +SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_784430e8_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 @@ -1754,88 +1755,88 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { }(); /* harmony default export */ var Dashboard_store = (new Dashboard_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/Dashboard/Dashboard.vue?vue&type=template&id=8fff7c04 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=c3a6c2b2 -var Dashboardvue_type_template_id_8fff7c04_hoisted_1 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_1 = { ref: "root" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_2 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_2 = { class: "card-title" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_3 = ["innerHTML", "title"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_4 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_3 = ["innerHTML", "title"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_4 = { id: "mt", class: "dataTable card-table", cellspacing: "0" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_5 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_5 = { class: "heading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_6 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_6 = { class: "heading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_7 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_7 = { class: "heading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_8 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_8 = { class: "heading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_9 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_9 = { class: "heading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_10 = ["colspan"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_11 = ["value"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_12 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_10 = ["colspan"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_11 = ["value"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_12 = { value: "visits_evolution" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_13 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_13 = { value: "pageviews_evolution" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_14 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_14 = { value: "hits_evolution" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_15 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_15 = { key: 0, value: "revenue_evolution" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_16 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_16 = { key: 0 }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_17 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_17 = { colspan: "7", class: "allWebsitesLoading" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_18 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_18 = { key: 1 }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_19 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_19 = { key: 0 }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_20 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_20 = { colspan: "7" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_21 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_21 = { class: "notification system notification-error" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var Dashboardvue_type_template_id_8fff7c04_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var Dashboardvue_type_template_id_8fff7c04_hoisted_24 = ["href"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_24 = ["href"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_25 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_25 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); -var Dashboardvue_type_template_id_8fff7c04_hoisted_26 = ["href"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_27 = ["href"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_26 = ["href"]; +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_27 = ["href"]; -var Dashboardvue_type_template_id_8fff7c04_hoisted_28 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_28 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); -var Dashboardvue_type_template_id_8fff7c04_hoisted_29 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_29 = { colspan: "8", class: "paging" }; -var Dashboardvue_type_template_id_8fff7c04_hoisted_30 = { +var Dashboardvue_type_template_id_c3a6c2b2_hoisted_30 = { class: "row" }; var _hoisted_31 = { @@ -1887,7 +1888,7 @@ var _hoisted_43 = { }; var _hoisted_44 = ["placeholder"]; var _hoisted_45 = ["title"]; -function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $setup, $data, $options) { +function Dashboardvue_type_template_id_c3a6c2b2_render(_ctx, _cache, $props, $setup, $data, $options) { var _this = this; var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); @@ -1896,7 +1897,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se var _component_MultisitesSite = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MultisitesSite"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Dashboardvue_type_template_id_8fff7c04_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", Dashboardvue_type_template_id_8fff7c04_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Dashboardvue_type_template_id_c3a6c2b2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", Dashboardvue_type_template_id_c3a6c2b2_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { "help-url": _ctx.externalRawLink('https://matomo.org/faq/new-to-piwik/all-websites-dashboard/'), "feature-name": _ctx.translate('General_AllWebsitesDashboard') }, { @@ -1905,10 +1906,10 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se class: "smallTitle", innerHTML: _ctx.$sanitize(_this.smallTitleContent), title: _ctx.smallTitleTooltip - }, null, 8, Dashboardvue_type_template_id_8fff7c04_hoisted_3)]; + }, null, 8, Dashboardvue_type_template_id_c3a6c2b2_hoisted_3)]; }), _: 1 - }, 8, ["help-url", "feature-name"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", Dashboardvue_type_template_id_8fff7c04_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, 8, ["help-url", "feature-name"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", Dashboardvue_type_template_id_c3a6c2b2_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "names", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["label", { columnSorted: 'label' === _ctx.sortColumn @@ -1916,7 +1917,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.sortBy('label'); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_8fff7c04_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_c3a6c2b2_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["arrow", { multisites_asc: !_ctx.reverse && 'label' === _ctx.sortColumn, multisites_desc: _ctx.reverse && 'label' === _ctx.sortColumn @@ -1940,7 +1941,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_8fff7c04_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_c3a6c2b2_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "pageviews", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multisites-column", { columnSorted: 'nb_pageviews' === _ctx.sortColumn @@ -1956,7 +1957,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_8fff7c04_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_c3a6c2b2_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "hits", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multisites-column", { columnSorted: 'hits' === _ctx.sortColumn @@ -1972,7 +1973,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_8fff7c04_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1)], 2), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_c3a6c2b2_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1)], 2), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { key: 0, id: "revenue", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multisites-column", { @@ -1989,7 +1990,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se style: { "margin-right": "3.5px" } - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_8fff7c04_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Dashboardvue_type_template_id_c3a6c2b2_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { id: "evolution", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ columnSorted: _ctx.evolutionSelector === _ctx.sortColumn @@ -2020,22 +2021,22 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se _ctx.sortBy(_ctx.evolutionSelector); }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_8fff7c04_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_8fff7c04_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_8fff7c04_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", Dashboardvue_type_template_id_8fff7c04_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 40, Dashboardvue_type_template_id_8fff7c04_hoisted_11)], 10, Dashboardvue_type_template_id_8fff7c04_hoisted_10)])]), _ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_8fff7c04_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_8fff7c04_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_c3a6c2b2_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_c3a6c2b2_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", Dashboardvue_type_template_id_c3a6c2b2_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", Dashboardvue_type_template_id_c3a6c2b2_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 40, Dashboardvue_type_template_id_c3a6c2b2_hoisted_11)], 10, Dashboardvue_type_template_id_c3a6c2b2_hoisted_10)])]), _ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_c3a6c2b2_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_c3a6c2b2_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { "loading-message": _ctx.loadingMessage, loading: _ctx.isLoading - }, null, 8, ["loading-message", "loading"])])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_8fff7c04_hoisted_18, [_ctx.errorLoadingSites ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", Dashboardvue_type_template_id_8fff7c04_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_8fff7c04_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_8fff7c04_hoisted_21, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), Dashboardvue_type_template_id_8fff7c04_hoisted_22, Dashboardvue_type_template_id_8fff7c04_hoisted_23, 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", { + }, null, 8, ["loading-message", "loading"])])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", Dashboardvue_type_template_id_c3a6c2b2_hoisted_18, [_ctx.errorLoadingSites ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", Dashboardvue_type_template_id_c3a6c2b2_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_c3a6c2b2_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_c3a6c2b2_hoisted_21, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), Dashboardvue_type_template_id_c3a6c2b2_hoisted_22, Dashboardvue_type_template_id_c3a6c2b2_hoisted_23, 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, Dashboardvue_type_template_id_8fff7c04_hoisted_24), Dashboardvue_type_template_id_8fff7c04_hoisted_25, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Faq')), 9, Dashboardvue_type_template_id_c3a6c2b2_hoisted_24), Dashboardvue_type_template_id_c3a6c2b2_hoisted_25, 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, Dashboardvue_type_template_id_8fff7c04_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, " – ", 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_CommunityHelp')), 9, Dashboardvue_type_template_id_c3a6c2b2_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, " – ", 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.professionalHelpUrl - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, Dashboardvue_type_template_id_8fff7c04_hoisted_27), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Dashboardvue_type_template_id_8fff7c04_hoisted_28])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (website) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, Dashboardvue_type_template_id_c3a6c2b2_hoisted_27), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.areAdsForProfessionalServicesEnabled]]), Dashboardvue_type_template_id_c3a6c2b2_hoisted_28])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (website) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_MultisitesSite, { key: website.idsite, website: website, @@ -2045,7 +2046,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se metric: _ctx.sortColumn, "display-revenue-column": _ctx.displayRevenueColumn }, null, 8, ["website", "evolution-metric", "date-sparkline", "show-sparklines", "metric", "display-revenue-column"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tfoot", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_8fff7c04_hoisted_29, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_8fff7c04_hoisted_30, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_31, [_ctx.hasSuperUserAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tfoot", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Dashboardvue_type_template_id_c3a6c2b2_hoisted_29, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Dashboardvue_type_template_id_c3a6c2b2_hoisted_30, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_31, [_ctx.hasSuperUserAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, href: _ctx.addSiteUrl }, [_hoisted_33, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_AddSite')), 1)], 8, _hoisted_32)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_34, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { @@ -2077,7 +2078,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se title: _ctx.translate('General_ClickToSearch') }, null, 8, _hoisted_45)])])])])])])], 512); } -// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=8fff7c04 +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.vue?vue&type=template&id=c3a6c2b2 // 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/Dashboard/Dashboard.vue?vue&type=script&lang=ts @@ -2159,7 +2160,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se }, smallTitleTooltip: function smallTitleTooltip() { var state = Dashboard_store.state.value; - return Object(external_CoreHome_["translate"])('General_EvolutionSummaryGeneric', Object(external_CoreHome_["translate"])('General_NVisits', "".concat(state.totalVisits)), this.date, "".concat(state.lastVisits), state.lastVisitsDate, Object(external_CoreHome_["calculateAndFormatEvolution"])(state.totalVisits, state.lastVisits)); + return Object(external_CoreHome_["translate"])('General_EvolutionSummaryGeneric', Object(external_CoreHome_["translate"])('General_NVisits', "".concat(state.totalVisits)), this.date, "".concat(state.lastVisits), state.lastVisitsDate, external_CoreHome_["NumberFormatter"].calculateAndFormatEvolution(external_CoreHome_["NumberFormatter"].parseFormattedNumber(state.totalVisits), external_CoreHome_["NumberFormatter"].parseFormattedNumber(state.lastVisits))); }, loadingMessage: function loadingMessage() { return Dashboard_store.state.value.loadingMessage; @@ -2202,7 +2203,7 @@ function Dashboardvue_type_template_id_8fff7c04_render(_ctx, _cache, $props, $se -Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_8fff7c04_render +Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_c3a6c2b2_render /* harmony default export */ var Dashboard = (Dashboardvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/index.ts diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 4b728eecfc7..9b1aa260872 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 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,"AllWebsitesDashboard",(function(){return De})),n.d(t,"MultisitesSite",(function(){return mt})),n.d(t,"DashboadStore",(function(){return jt})),n.d(t,"Dashboard",(function(){return pn})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var o=n("8bbf"),i={class:"dashboardHeader"},s={class:"card-title"},l={class:"dashboardControls"},c={class:"siteSearch"},u=["placeholder"],d=["title"],b=["href"];function m(e,t,n,r,a,m){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,b)):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=n("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 n=0;n0&&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.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&&(n.pattern=this.searchTerm),p["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:"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(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:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(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),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,""),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),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"},_={key:0,class:"kpiCard kpiCardLoading"},N=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),C={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,n,r,a,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",_,[N,Object(o["createElementVNode"])("div",C,[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,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:"kpi-card-".concat(n)},[n>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={class:"kpiCardValue"},M={class:"kpiCardEvolution"},D={key:1,class:"kpiCardEvolution"},x=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),L=[x],A=["innerHTML"];function R(e,t,n,r,a,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",P,Object(o["toDisplayString"])(e.kpi.value),1),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["createTextVNode"])(" "+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=R;var F=G,I=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:F},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"},ne=Object(o["createElementVNode"])("br",null,null,-1),re=Object(o["createElementVNode"])("br",null,null,-1),ae=["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,n,r,a,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),ne,re,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,ae),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.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),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={evolutionPeriod:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(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),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,""),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),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"},_={key:0,class:"kpiCard kpiCardLoading"},N=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),C={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,n,a,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",_,[N,Object(o["createElementVNode"])("div",C,[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={class:"kpiCardValue"},M={class:"kpiCardEvolution"},D={key:1,class:"kpiCardEvolution"},x=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),L=[x],A=["innerHTML"];function R(e,t,r,n,a,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",P,Object(o["toDisplayString"])(e.kpi.value),1),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["createTextVNode"])(" "+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=R;var F=G,I=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:F},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),ne=Object(o["createElementVNode"])("br",null,null,-1),ae=["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,n,a,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,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,ae),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.paginationCurrentPagen&&(e=n),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 n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=p["NumberFormatter"].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=p["NumberFormatter"].formatNumber(e.previous_nb_visits),o=p["NumberFormatter"].formatNumber(e.nb_visits),i=p["NumberFormatter"].formatPercent(e.visits_evolution),r=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&&(a="".concat(e.previous_nb_pageviews),o="".concat(e.nb_pageviews),i=p["NumberFormatter"].formatPercent(e.pageviews_evolution),r=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&&(a="".concat(e.previous_hits),o="".concat(e.hits),i=p["NumberFormatter"].formatPercent(e.hits_evolution),r=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&&(a=p["NumberFormatter"].formatCurrency(e.previous_revenue,e.currencySymbol),o=p["NumberFormatter"].formatCurrency(e.revenue,e.currencySymbol),i=p["NumberFormatter"].formatPercent(e.revenue_evolution),r=Object(p["translate"])("General_ColumnRevenue"),s=p["NumberFormatter"].formatCurrency(Math.round(parseInt(e.previous_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(s),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(p["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.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=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","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 ft,gt={ref:"root"},St={class:"card-title"},kt=["innerHTML","title"],yt={id:"mt",class:"dataTable card-table",cellspacing:"0"},_t={class:"heading"},Nt={class:"heading"},Ct={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},Rt={key:0},Gt={colspan:"7"},Ft={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"},en={style:{cursor:"pointer"}},tn={class:"dataTablePages"},nn={id:"counter"},rn={style:{cursor:"pointer"},class:"pointer"},an=Object(o["createElementVNode"])("div",{class:"col s3"}," ",-1),on={row_id:"last"},sn={colspan:"8",class:"site_search"},ln={class:"row"},cn={class:"input-field col s12"},un=["placeholder"],dn=["title"];function bn(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",gt,[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",_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",Ct,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",Rt,[Object(o["createElementVNode"])("td",Gt,[Object(o["createElementVNode"])("div",Ft,[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",en,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],512),[[o["vShow"],!(0===e.currentPage)]]),Object(o["createElementVNode"])("span",tn,[Object(o["createElementVNode"])("span",nn,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",rn,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),an])])]),Object(o["createElementVNode"])("tr",on,[Object(o["createElementVNode"])("td",sn,[Object(o["createElementVNode"])("div",ln,[Object(o["createElementVNode"])("div",cn,[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,un),[[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,dn)])])])])])])],512)}var mn=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:p["EnrichedHeadline"],ActivityIndicator:p["ActivityIndicator"],MultisitesSite:mt},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,Object(p["calculateAndFormatEvolution"])(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(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)}}});mn.render=bn;var pn=mn; + */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))),n=null,a="0",o="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=p["NumberFormatter"].formatNumber(e.previous_nb_visits),o=p["NumberFormatter"].formatNumber(e.nb_visits),i=p["NumberFormatter"].formatPercent(e.visits_evolution),n=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&&(a="".concat(e.previous_nb_pageviews),o="".concat(e.nb_pageviews),i=p["NumberFormatter"].formatPercent(e.pageviews_evolution),n=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&&(a="".concat(e.previous_hits),o="".concat(e.hits),i=p["NumberFormatter"].formatPercent(e.hits_evolution),n=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&&(a=p["NumberFormatter"].formatCurrency(e.previous_revenue,e.currencySymbol),o=p["NumberFormatter"].formatCurrency(e.revenue,e.currencySymbol),i=p["NumberFormatter"].formatPercent(e.revenue_evolution),n=Object(p["translate"])("General_ColumnRevenue"),s=p["NumberFormatter"].formatCurrency(Math.round(parseInt(e.previous_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),n)switch(e.tooltip="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonIncomplete",[r]),"\n"),e.tooltip+="".concat(Object(p["translate"])("MultiSites_EvolutionComparisonProportional",[r,"".concat(s),n,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),n,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),n,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),n,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(p["translate"])("MultiSites_EvolutionComparisonYear",["".concat(o),n,"".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 ft,gt={ref:"root"},St={class:"card-title"},kt=["innerHTML","title"],yt={id:"mt",class:"dataTable card-table",cellspacing:"0"},_t={class:"heading"},Nt={class:"heading"},Ct={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},Rt={key:0},Gt={colspan:"7"},Ft={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"},nr={style:{cursor:"pointer"},class:"pointer"},ar=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,n,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",gt,[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",_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",Ct,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",Rt,[Object(o["createElementVNode"])("td",Gt,[Object(o["createElementVNode"])("div",Ft,[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",nr,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),ar])])]),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 br=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:p["EnrichedHeadline"],ActivityIndicator:p["ActivityIndicator"],MultisitesSite:mt},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=dr;var mr=br; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue index c44d9fabbc4..88d00171f3f 100644 --- a/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue @@ -37,7 +37,7 @@ {{ formatNumber(site.nb_pageviews) }} {{ formatNumber(site.hits) }} - {{ formatCurrency(site.revenue, site.currencySymbol) }} + {{ formatCurrency(site.revenue, site.currencySymbol || '') }} @@ -58,6 +58,7 @@ target="_blank" :href="dashboardUrl" :title="translate('General_GoTo', translate('Dashboard_DashboardOf', siteLabel))" + v-if="!site.isGroup" >