diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-07-14 10:40:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 10:40:11 +0300 |
commit | 392ef0bb0f2a05999813d743d070c34ac5d017f9 (patch) | |
tree | 6fbc3516ba506d0b63ba96f96edab144a3cb7ade /plugins | |
parent | aa9425ff2b20a43004576183425047c3fa21d2ad (diff) |
Fixes row evolution for rows containing encoded entities (#19490)
* Fixes rowevolution for rows containing encoded entities
* adjust tests
* Do not sanitize goal details in APIresponse and adjust usages to prevent xss
* update UI test
Diffstat (limited to 'plugins')
25 files changed, 104 insertions, 56 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index 0f7a209045..b724d3f18f 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -3620,9 +3620,9 @@ MatomoDialogvue_type_script_lang_ts.render = MatomoDialogvue_type_template_id_00 }, noScope: true })); -// 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/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=7b85675d +// 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/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=744f4bf7 -var EnrichedHeadlinevue_type_template_id_7b85675d_hoisted_1 = { +var EnrichedHeadlinevue_type_template_id_744f4bf7_hoisted_1 = { key: 0, class: "title", tabindex: "6" @@ -3654,7 +3654,7 @@ var _hoisted_11 = { var _hoisted_12 = ["innerHTML"]; var _hoisted_13 = ["innerHTML"]; var _hoisted_14 = ["href"]; -function EnrichedHeadlinevue_type_template_id_7b85675d_render(_ctx, _cache, $props, $setup, $data, $options) { +function EnrichedHeadlinevue_type_template_id_744f4bf7_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_RateFeature = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("RateFeature"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { @@ -3666,11 +3666,11 @@ function EnrichedHeadlinevue_type_template_id_7b85675d_render(_ctx, _cache, $pro return _ctx.showIcons = false; }), ref: "root" - }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_7b85675d_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_744f4bf7_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 1, class: "title", href: _ctx.editUrl, - title: _ctx.translate('CoreHome_ClickToEditX', _ctx.$sanitize(_ctx.actualFeatureName)) + title: _ctx.translate('CoreHome_ClickToEditX', _ctx.htmlEntities(_ctx.actualFeatureName)) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 8, _hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_3, [_ctx.helpUrl && !_ctx.actualInlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, rel: "noreferrer noopener", @@ -3703,7 +3703,7 @@ function EnrichedHeadlinevue_type_template_id_7b85675d_render(_ctx, _cache, $pro href: _ctx.helpUrl }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_MoreDetails')), 9, _hoisted_14)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showInlineHelp]])], 544); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=7b85675d +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=744f4bf7 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/useExternalPluginComponent.ts /*! @@ -3857,6 +3857,11 @@ var RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); } } }); + }, + methods: { + htmlEntities: function htmlEntities(v) { + return Matomo_Matomo.helper.htmlEntities(v); + } } })); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts @@ -3865,7 +3870,7 @@ var RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); -EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_7b85675d_render +EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_744f4bf7_render /* harmony default export */ var EnrichedHeadline = (EnrichedHeadlinevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 40d28457eb..9fb4aac37d 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -258,13 +258,13 @@ function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _n(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Dn)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Pn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Tn,8,Vn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},xn,10,An)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Bn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Mn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Ln),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Fn)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Rn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} + */function _n(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.htmlEntities(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Dn)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Pn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Tn,8,Vn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},xn,10,An)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Bn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Mn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Ln),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Fn)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Rn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function $n(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var Hn=$n("Feedback","RateFeature"),Un=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:Hn},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,a=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();a&&a.length&&(e.actualInlineHelp="<p>".concat(a,"</p>"),setTimeout((function(){return r.remove()}),0))}}var o;e.actualFeatureName||(e.actualFeatureName=null===(o=t.querySelector(".title"))||void 0===o?void 0:o.textContent);if(S.period&&S.currentDateString){var l=p.parse(S.period,S.currentDateString);e.reportGenerated&&l.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))}});Un.render=_n;var qn=Un,Wn=(kt({component:qn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Jn={class:"card-content"},Gn={key:0,class:"card-title"},zn={key:1,class:"card-title"},Yn={ref:"content"}; + */function $n(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var Hn=$n("Feedback","RateFeature"),Un=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:Hn},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,a=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();a&&a.length&&(e.actualInlineHelp="<p>".concat(a,"</p>"),setTimeout((function(){return r.remove()}),0))}}var o;e.actualFeatureName||(e.actualFeatureName=null===(o=t.querySelector(".title"))||void 0===o?void 0:o.textContent);if(S.period&&S.currentDateString){var l=p.parse(S.period,S.currentDateString);e.reportGenerated&&l.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))},methods:{htmlEntities:function(e){return S.helper.htmlEntities(e)}}});Un.render=_n;var qn=Un,Wn=(kt({component:qn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Jn={class:"card-content"},Gn={key:0,class:"card-title"},zn={key:1,class:"card-title"},Yn={ref:"content"}; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue index c83ee915fa..cf827bea5f 100644 --- a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue +++ b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue @@ -22,7 +22,7 @@ v-if="editUrl" class="title" :href="editUrl" - :title="translate('CoreHome_ClickToEditX', $sanitize(actualFeatureName))" + :title="translate('CoreHome_ClickToEditX', htmlEntities(actualFeatureName))" > <slot /> </a> @@ -200,5 +200,10 @@ export default defineComponent({ } }); }, + methods: { + htmlEntities(v: string) { + return Matomo.helper.htmlEntities(v); + }, + }, }); </script> diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js index d93608191b..78e00cb3f2 100644 --- a/plugins/CoreVisualizations/javascripts/jqplot.js +++ b/plugins/CoreVisualizations/javascripts/jqplot.js @@ -568,7 +568,12 @@ function rowEvolutionGetMetricNameFromRow(tr) } // make sure percent axes don't go above 100% - if (axis.tickOptions.formatString.substring(2, 3) == '%' && maxCrossDataSets > 100) { + if ( + axis.tickOptions + && axis.tickOptions.formatString + && axis.tickOptions.formatString.substring(2, 3) == '%' + && maxCrossDataSets > 100 + ) { maxCrossDataSets = 100; } @@ -771,8 +776,11 @@ JQPlotExternalSeriesToggle.prototype = { for (var k = 0; k < this.originalSeries.length; k++) { if (this.originalSeries[k] && this.originalSeries[k].label - && this.originalSeries[k].label === this.activated[j]) { - + && ( + this.originalSeries[k].label === this.activated[j] + || piwikHelper.htmlDecode(this.originalSeries[k].label) === this.activated[j] + ) + ) { config.data.push(this.originalData[k]); config.params.seriesColors.push(this.originalSeriesColors[k]); config.params.series.push($.extend(true, {}, this.originalSeries[k])); diff --git a/plugins/Feedback/vue/dist/Feedback.umd.js b/plugins/Feedback/vue/dist/Feedback.umd.js index 97d46b5c17..e0f1144560 100644 --- a/plugins/Feedback/vue/dist/Feedback.umd.js +++ b/plugins/Feedback/vue/dist/Feedback.umd.js @@ -144,7 +144,7 @@ var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=bc746c6c +// 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/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=bac0409e var _hoisted_1 = ["title"]; var _hoisted_2 = { @@ -309,7 +309,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ReviewLinks = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ReviewLinks"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - title: _ctx.translate('Feedback_RateFeatureTitle', _ctx.$sanitize(_ctx.title)), + title: _ctx.translate('Feedback_RateFeatureTitle', _ctx.htmlEntities(_ctx.title)), class: "ratefeature" }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "iconContainer", @@ -459,7 +459,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["modelValue"])], 8, _hoisted_1); } -// CONCATENATED MODULE: ./plugins/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=bc746c6c +// CONCATENATED MODULE: ./plugins/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=bac0409e // 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/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=template&id=9a880eb6 @@ -566,6 +566,9 @@ var _window = window, _this2.errorMessage = res.value; } }); + }, + htmlEntities: function htmlEntities(v) { + return external_CoreHome_["Matomo"].helper.htmlEntities(v); } } })); diff --git a/plugins/Feedback/vue/dist/Feedback.umd.min.js b/plugins/Feedback/vue/dist/Feedback.umd.min.js index 423148b782..2b6d297bd6 100644 --- a/plugins/Feedback/vue/dist/Feedback.umd.min.js +++ b/plugins/Feedback/vue/dist/Feedback.umd.min.js @@ -1,10 +1,10 @@ -(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["Feedback"]=t(require("CoreHome"),require("vue")):e["Feedback"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Feedback/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"ReviewLinks",(function(){return re})),a.d(t,"RateFeature",(function(){return be})),a.d(t,"FeedbackQuestion",(function(){return Se})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(a.p=l[1])}var o=a("19dc"),c=a("8bbf"),i=["title"],r={class:"ui-confirm ratefeatureDialog"},s={key:0},d={key:0},u={key:1},b=Object(c["createElementVNode"])("br",null,null,-1),k={class:"row"},m={style:{"text-align":"left","margin-top":"16px"}},p={for:"useful",class:"ratelabel"},j=Object(c["createElementVNode"])("br",null,null,-1),O={for:"easy",class:"ratelabel"},f=Object(c["createElementVNode"])("br",null,null,-1),g={for:"configurable",class:"ratelabel"},v=Object(c["createElementVNode"])("br",null,null,-1),h={for:"likeother",class:"ratelabel"},F={key:1},V={key:0},y={key:1},N=Object(c["createElementVNode"])("br",null,null,-1),E={class:"row"},R={style:{"text-align":"left"}},w={for:"missingfeatures",class:"ratelabel"},M=Object(c["createElementVNode"])("br",null,null,-1),D={for:"makeeasier",class:"ratelabel"},x=Object(c["createElementVNode"])("br",null,null,-1),B={for:"speedup",class:"ratelabel"},_=Object(c["createElementVNode"])("br",null,null,-1),C={for:"fixbugs",class:"ratelabel"},S=Object(c["createElementVNode"])("br",null,null,-1),T={for:"dislikeother",class:"ratelabel"},L=Object(c["createElementVNode"])("br",null,null,-1),H={key:2,class:"messageContainer",style:{"text-align":"left"}},U={key:0},q={key:1},z={key:2},Q={key:3},$={key:4},I={key:5},P={key:6},A={key:7},G={key:8},J={key:9,class:"error-text"},Y=["innerHTML"],K=["title","value"],W=["value"],X={class:"ui-confirm ratefeatureDialog"},Z=["innerHTML"],ee={key:0},te={key:1},ae=["value"];function ne(e,t,a,n,l,o){var ne=Object(c["resolveComponent"])("MatomoDialog"),le=Object(c["resolveComponent"])("ReviewLinks");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{title:e.translate("Feedback_RateFeatureTitle",e.$sanitize(e.title)),class:"ratefeature"},[Object(c["createElementVNode"])("div",{class:"iconContainer",onMouseenter:t[2]||(t[2]=function(t){return e.expanded=!0}),onMouseleave:t[3]||(t[3]=function(t){return e.expanded=!1})},[Object(c["createElementVNode"])("img",{onClick:t[0]||(t[0]=function(t){e.likeFeature()}),class:"like-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-up.png"}),Object(c["createElementVNode"])("img",{onClick:t[1]||(t[1]=function(t){e.dislikeFeature()}),class:"dislike-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-down.png"})],32),Object(c["createVNode"])(ne,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showFeedbackForm=t}),onYes:t[15]||(t[15]=function(t){return e.sendFeedback()}),onValidation:t[16]||(t[16]=function(t){return e.sendFeedback()})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",r,[e.like?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",s,[e.title?(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",d,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeNamedFeature",e.title)),1)):Object(c["createCommentVNode"])("",!0),e.title?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",u,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLike")),1)),b,Object(c["createElementVNode"])("div",k,[Object(c["createElementVNode"])("div",m,[Object(c["createElementVNode"])("label",p,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"useful",value:"useful","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureUsefulInfo")),1)]),j,Object(c["createElementVNode"])("label",O,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"easy",value:"easy","onUpdate:modelValue":t[5]||(t[5]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureEasyToUse")),1)]),f,Object(c["createElementVNode"])("label",g,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"configurable",value:"configurable","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureConfigurable")),1)]),v,Object(c["createElementVNode"])("label",h,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"likeother",value:"likeother","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)])])])])):Object(c["createCommentVNode"])("",!0),e.like?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",F,[e.title?(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",V,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeNamedFeature",e.title)),1)):Object(c["createCommentVNode"])("",!0),e.title?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",y,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislike")),1)),N,Object(c["createElementVNode"])("div",E,[Object(c["createElementVNode"])("div",R,[Object(c["createElementVNode"])("label",w,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"missingfeatures",value:"missingfeatures","onUpdate:modelValue":t[8]||(t[8]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeAddMissingFeatures")),1)]),M,Object(c["createElementVNode"])("label",D,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"makeeasier",value:"makeeasier","onUpdate:modelValue":t[9]||(t[9]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeMakeEasier")),1)]),x,Object(c["createElementVNode"])("label",B,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"speedup",value:"speedup","onUpdate:modelValue":t[10]||(t[10]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeSpeedUp")),1)]),_,Object(c["createElementVNode"])("label",C,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"fixbugs",value:"fixbugs","onUpdate:modelValue":t[11]||(t[11]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeFixBugs")),1)]),S,Object(c["createElementVNode"])("label",T,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"dislikeother",value:"dislikeother","onUpdate:modelValue":t[12]||(t[12]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)]),L])])])),e.likeReason||e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",H,[e.likeReason&&"useful"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",U,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraUseful")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"easy"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",q,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraEasy")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"configurable"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",z,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraConfigurable")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"likeother"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",Q,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtra")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"missingfeatures"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",$,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraMissing")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"makeeasier"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",I,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraEasier")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"fixbugs"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",P,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraBugs")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"speedup"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",A,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraSpeed")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"dislikeother"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",G,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtra")),1)):Object(c["createCommentVNode"])("",!0),e.errorMessage?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",J,Object(c["toDisplayString"])(e.errorMessage),1)):Object(c["createCommentVNode"])("",!0),Object(c["withDirectives"])(Object(c["createElementVNode"])("textarea",{ref:"feedbackText",class:Object(c["normalizeClass"])(["materialize-textarea",{"has-error":e.errorMessage}]),id:"feedbacktext","onUpdate:modelValue":t[13]||(t[13]=function(t){return e.feedbackMessage=t})},null,2),[[c["vModelText"],e.feedbackMessage]]),e.likeReason||e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",{key:10,innerHTML:e.$sanitize(e.translate("Feedback_Policy","\n <a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>","</a>"))},null,8,Y)):Object(c["createCommentVNode"])("",!0)])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("input",{class:"btn",type:"button",role:"validation",title:e.translate("Feedback_RateFeatureSendFeedbackInformation"),value:e.translate("Feedback_SendFeedback")},null,8,K),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,W)])]})),_:1},8,["modelValue"]),Object(c["createVNode"])(ne,{modelValue:e.ratingDone,"onUpdate:modelValue":t[17]||(t[17]=function(t){return e.ratingDone=t})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",X,[Object(c["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYouHeart","<i class='icon-heart red-text'></i>"))},null,8,Z),e.like?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",ee,[Object(c["createVNode"])(le)])):Object(c["createCommentVNode"])("",!0),e.like?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",te,Object(c["toDisplayString"])(e.translate("Feedback_AppreciateFeedback")),1)),Object(c["createElementVNode"])("input",{type:"button",value:e.translate("General_Close"),role:"yes"},null,8,ae)])]})),_:1},8,["modelValue"])],8,i)}var le={class:"requestReview"},oe=Object(c["createStaticVNode"])('<br><br><div class="review-links"><div class="review-link"><a href="https://www.capterra.com/p/182627/Matomo-Analytics/" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/capterra.svg"></div><div class="link">Capterra</div></a></div><div class="review-link"><a href="https://www.g2crowd.com/products/matomo-formerly-piwik/details" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/g2crowd.svg"></div><div class="link">G2 Crowd</div></a></div><div class="review-link"><a href="https://www.producthunt.com/posts/matomo-2" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/producthunt.svg"></div><div class="link">Product Hunt</div></a></div><div class="review-link"><a href="https://www.saasworthy.com/product/matomo" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/saasworthy.png"></div><div class="link">SaaSworthy</div></a></div><div class="review-link"><a href="https://www.trustradius.com/products/matomo/reviews" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/trustradius.svg"></div><div class="link">TrustRadius</div></a></div></div>',3);function ce(e,t,a,n,l,o){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",le,[Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("Feedback_PleaseLeaveExternalReviewForMatomo")),1),oe])}var ie=Object(c["defineComponent"])({});ie.render=ce;var re=ie,se=window,de=se.$,ue=Object(c["defineComponent"])({props:{title:String},components:{MatomoDialog:o["MatomoDialog"],ReviewLinks:re},data:function(){return{like:!1,likeReason:null,dislikeReason:null,ratingDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:"",errorMessage:null}},watch:{likeReason:"doFocusInput",dislikeReason:"doFocusInput"},methods:{dislikeFeature:function(){this.ratingDone=!1,this.like=!1,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},likeFeature:function(){this.ratingDone=!1,this.like=!0,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},doFocusInput:function(){var e=this;this.$nextTick((function(){e.focusInput()}))},focusInput:function(){null!=this.$refs.feedbackText&&this.$refs.feedbackText.focus()},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForFeature",featureName:this.title,like:this.like?1:0,choice:this.like?this.likeReason:this.dislikeReason,message:this.feedbackMessage}).then((function(t){"success"===t.value?(de(".modal").modal("close"),e.ratingDone=!0,e.feedbackMessage=""):e.errorMessage=t.value}))}}});ue.render=ne;var be=ue,ke=(Object(o["createAngularJsAdapter"])({component:be,scope:{title:{angularJsBind:"@"}},directiveName:"piwikRateFeature"}),{key:0,class:"bannerHeader"}),me=Object(c["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),pe=Object(c["createElementVNode"])("i",{class:"icon-close white-text"},null,-1),je=[pe],Oe={class:"ratefeature"},fe={class:"ui-confirm ratefeatureDialog"},ge=["innerHTML"],ve=Object(c["createElementVNode"])("br",null,null,-1),he={class:"messageContainer"},Fe={key:0,class:"error-text"},Ve=Object(c["createElementVNode"])("br",null,null,-1),ye=["innerHTML"],Ne=["value"],Ee=["value"],Re={class:"ui-confirm ratefeatureDialog"},we=["innerHTML"],Me=["value"]; +(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["Feedback"]=t(require("CoreHome"),require("vue")):e["Feedback"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Feedback/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"ReviewLinks",(function(){return re})),a.d(t,"RateFeature",(function(){return be})),a.d(t,"FeedbackQuestion",(function(){return Se})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(a.p=l[1])}var o=a("19dc"),i=a("8bbf"),c=["title"],r={class:"ui-confirm ratefeatureDialog"},s={key:0},d={key:0},u={key:1},b=Object(i["createElementVNode"])("br",null,null,-1),k={class:"row"},m={style:{"text-align":"left","margin-top":"16px"}},p={for:"useful",class:"ratelabel"},j=Object(i["createElementVNode"])("br",null,null,-1),O={for:"easy",class:"ratelabel"},f=Object(i["createElementVNode"])("br",null,null,-1),g={for:"configurable",class:"ratelabel"},v=Object(i["createElementVNode"])("br",null,null,-1),h={for:"likeother",class:"ratelabel"},F={key:1},V={key:0},y={key:1},N=Object(i["createElementVNode"])("br",null,null,-1),E={class:"row"},R={style:{"text-align":"left"}},w={for:"missingfeatures",class:"ratelabel"},M=Object(i["createElementVNode"])("br",null,null,-1),D={for:"makeeasier",class:"ratelabel"},x=Object(i["createElementVNode"])("br",null,null,-1),B={for:"speedup",class:"ratelabel"},_=Object(i["createElementVNode"])("br",null,null,-1),C={for:"fixbugs",class:"ratelabel"},S=Object(i["createElementVNode"])("br",null,null,-1),T={for:"dislikeother",class:"ratelabel"},L=Object(i["createElementVNode"])("br",null,null,-1),H={key:2,class:"messageContainer",style:{"text-align":"left"}},U={key:0},q={key:1},Q={key:2},z={key:3},I={key:4},P={key:5},$={key:6},A={key:7},G={key:8},J={key:9,class:"error-text"},Y=["innerHTML"],K=["title","value"],W=["value"],X={class:"ui-confirm ratefeatureDialog"},Z=["innerHTML"],ee={key:0},te={key:1},ae=["value"];function ne(e,t,a,n,l,o){var ne=Object(i["resolveComponent"])("MatomoDialog"),le=Object(i["resolveComponent"])("ReviewLinks");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{title:e.translate("Feedback_RateFeatureTitle",e.htmlEntities(e.title)),class:"ratefeature"},[Object(i["createElementVNode"])("div",{class:"iconContainer",onMouseenter:t[2]||(t[2]=function(t){return e.expanded=!0}),onMouseleave:t[3]||(t[3]=function(t){return e.expanded=!1})},[Object(i["createElementVNode"])("img",{onClick:t[0]||(t[0]=function(t){e.likeFeature()}),class:"like-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-up.png"}),Object(i["createElementVNode"])("img",{onClick:t[1]||(t[1]=function(t){e.dislikeFeature()}),class:"dislike-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-down.png"})],32),Object(i["createVNode"])(ne,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showFeedbackForm=t}),onYes:t[15]||(t[15]=function(t){return e.sendFeedback()}),onValidation:t[16]||(t[16]=function(t){return e.sendFeedback()})},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",r,[e.like?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",s,[e.title?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",d,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeNamedFeature",e.title)),1)):Object(i["createCommentVNode"])("",!0),e.title?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",u,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLike")),1)),b,Object(i["createElementVNode"])("div",k,[Object(i["createElementVNode"])("div",m,[Object(i["createElementVNode"])("label",p,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"useful",value:"useful","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.likeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureUsefulInfo")),1)]),j,Object(i["createElementVNode"])("label",O,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"easy",value:"easy","onUpdate:modelValue":t[5]||(t[5]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.likeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureEasyToUse")),1)]),f,Object(i["createElementVNode"])("label",g,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"configurable",value:"configurable","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.likeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureConfigurable")),1)]),v,Object(i["createElementVNode"])("label",h,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"likeother",value:"likeother","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.likeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)])])])])):Object(i["createCommentVNode"])("",!0),e.like?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",F,[e.title?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",V,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeNamedFeature",e.title)),1)):Object(i["createCommentVNode"])("",!0),e.title?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",y,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislike")),1)),N,Object(i["createElementVNode"])("div",E,[Object(i["createElementVNode"])("div",R,[Object(i["createElementVNode"])("label",w,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"missingfeatures",value:"missingfeatures","onUpdate:modelValue":t[8]||(t[8]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.dislikeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeAddMissingFeatures")),1)]),M,Object(i["createElementVNode"])("label",D,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"makeeasier",value:"makeeasier","onUpdate:modelValue":t[9]||(t[9]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.dislikeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeMakeEasier")),1)]),x,Object(i["createElementVNode"])("label",B,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"speedup",value:"speedup","onUpdate:modelValue":t[10]||(t[10]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.dislikeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeSpeedUp")),1)]),_,Object(i["createElementVNode"])("label",C,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"fixbugs",value:"fixbugs","onUpdate:modelValue":t[11]||(t[11]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.dislikeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeFixBugs")),1)]),S,Object(i["createElementVNode"])("label",T,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"dislikeother",value:"dislikeother","onUpdate:modelValue":t[12]||(t[12]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[i["vModelRadio"],e.dislikeReason]]),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)]),L])])])),e.likeReason||e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",H,[e.likeReason&&"useful"===e.likeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",U,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraUseful")),1)):Object(i["createCommentVNode"])("",!0),e.likeReason&&"easy"===e.likeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",q,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraEasy")),1)):Object(i["createCommentVNode"])("",!0),e.likeReason&&"configurable"===e.likeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Q,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraConfigurable")),1)):Object(i["createCommentVNode"])("",!0),e.likeReason&&"likeother"===e.likeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",z,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtra")),1)):Object(i["createCommentVNode"])("",!0),e.dislikeReason&&"missingfeatures"===e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",I,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraMissing")),1)):Object(i["createCommentVNode"])("",!0),e.dislikeReason&&"makeeasier"===e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",P,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraEasier")),1)):Object(i["createCommentVNode"])("",!0),e.dislikeReason&&"fixbugs"===e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",$,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraBugs")),1)):Object(i["createCommentVNode"])("",!0),e.dislikeReason&&"speedup"===e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",A,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraSpeed")),1)):Object(i["createCommentVNode"])("",!0),e.dislikeReason&&"dislikeother"===e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",G,Object(i["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtra")),1)):Object(i["createCommentVNode"])("",!0),e.errorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",J,Object(i["toDisplayString"])(e.errorMessage),1)):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("textarea",{ref:"feedbackText",class:Object(i["normalizeClass"])(["materialize-textarea",{"has-error":e.errorMessage}]),id:"feedbacktext","onUpdate:modelValue":t[13]||(t[13]=function(t){return e.feedbackMessage=t})},null,2),[[i["vModelText"],e.feedbackMessage]]),e.likeReason||e.dislikeReason?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:10,innerHTML:e.$sanitize(e.translate("Feedback_Policy","\n <a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>","</a>"))},null,8,Y)):Object(i["createCommentVNode"])("",!0)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("input",{class:"btn",type:"button",role:"validation",title:e.translate("Feedback_RateFeatureSendFeedbackInformation"),value:e.translate("Feedback_SendFeedback")},null,8,K),Object(i["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,W)])]})),_:1},8,["modelValue"]),Object(i["createVNode"])(ne,{modelValue:e.ratingDone,"onUpdate:modelValue":t[17]||(t[17]=function(t){return e.ratingDone=t})},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",X,[Object(i["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYouHeart","<i class='icon-heart red-text'></i>"))},null,8,Z),e.like?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ee,[Object(i["createVNode"])(le)])):Object(i["createCommentVNode"])("",!0),e.like?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",te,Object(i["toDisplayString"])(e.translate("Feedback_AppreciateFeedback")),1)),Object(i["createElementVNode"])("input",{type:"button",value:e.translate("General_Close"),role:"yes"},null,8,ae)])]})),_:1},8,["modelValue"])],8,c)}var le={class:"requestReview"},oe=Object(i["createStaticVNode"])('<br><br><div class="review-links"><div class="review-link"><a href="https://www.capterra.com/p/182627/Matomo-Analytics/" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/capterra.svg"></div><div class="link">Capterra</div></a></div><div class="review-link"><a href="https://www.g2crowd.com/products/matomo-formerly-piwik/details" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/g2crowd.svg"></div><div class="link">G2 Crowd</div></a></div><div class="review-link"><a href="https://www.producthunt.com/posts/matomo-2" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/producthunt.svg"></div><div class="link">Product Hunt</div></a></div><div class="review-link"><a href="https://www.saasworthy.com/product/matomo" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/saasworthy.png"></div><div class="link">SaaSworthy</div></a></div><div class="review-link"><a href="https://www.trustradius.com/products/matomo/reviews" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/trustradius.svg"></div><div class="link">TrustRadius</div></a></div></div>',3);function ie(e,t,a,n,l,o){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",le,[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("Feedback_PleaseLeaveExternalReviewForMatomo")),1),oe])}var ce=Object(i["defineComponent"])({});ce.render=ie;var re=ce,se=window,de=se.$,ue=Object(i["defineComponent"])({props:{title:String},components:{MatomoDialog:o["MatomoDialog"],ReviewLinks:re},data:function(){return{like:!1,likeReason:null,dislikeReason:null,ratingDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:"",errorMessage:null}},watch:{likeReason:"doFocusInput",dislikeReason:"doFocusInput"},methods:{dislikeFeature:function(){this.ratingDone=!1,this.like=!1,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},likeFeature:function(){this.ratingDone=!1,this.like=!0,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},doFocusInput:function(){var e=this;this.$nextTick((function(){e.focusInput()}))},focusInput:function(){null!=this.$refs.feedbackText&&this.$refs.feedbackText.focus()},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForFeature",featureName:this.title,like:this.like?1:0,choice:this.like?this.likeReason:this.dislikeReason,message:this.feedbackMessage}).then((function(t){"success"===t.value?(de(".modal").modal("close"),e.ratingDone=!0,e.feedbackMessage=""):e.errorMessage=t.value}))},htmlEntities:function(e){return o["Matomo"].helper.htmlEntities(e)}}});ue.render=ne;var be=ue,ke=(Object(o["createAngularJsAdapter"])({component:be,scope:{title:{angularJsBind:"@"}},directiveName:"piwikRateFeature"}),{key:0,class:"bannerHeader"}),me=Object(i["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),pe=Object(i["createElementVNode"])("i",{class:"icon-close white-text"},null,-1),je=[pe],Oe={class:"ratefeature"},fe={class:"ui-confirm ratefeatureDialog"},ge=["innerHTML"],ve=Object(i["createElementVNode"])("br",null,null,-1),he={class:"messageContainer"},Fe={key:0,class:"error-text"},Ve=Object(i["createElementVNode"])("br",null,null,-1),ye=["innerHTML"],Ne=["value"],Ee=["value"],Re={class:"ui-confirm ratefeatureDialog"},we=["innerHTML"],Me=["value"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function De(e,t,a,n,l,o){var i=Object(c["resolveComponent"])("MatomoDialog");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[e.isHidden?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",ke,[Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),me]),Object(c["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(){return e.showQuestion&&e.showQuestion.apply(e,arguments)}),class:"btn"},Object(c["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(c["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=function(){return e.disableReminder&&e.disableReminder.apply(e,arguments)})},je)])),Object(c["createElementVNode"])("div",Oe,[Object(c["createVNode"])(i,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showFeedbackForm=t}),onValidation:t[4]||(t[4]=function(t){return e.sendFeedback()})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",fe,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>"))},null,8,ge),ve,Object(c["createElementVNode"])("div",he,[e.errorMessage?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Fe,Object(c["toDisplayString"])(e.errorMessage),1)):Object(c["createCommentVNode"])("",!0),Object(c["withDirectives"])(Object(c["createElementVNode"])("textarea",{id:"message",class:Object(c["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.feedbackMessage=t})},null,2),[[c["vModelText"],e.feedbackMessage]])]),Ve,Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.feedbackPolicy)},null,8,ye),Object(c["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,Ne),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,Ee)])]})),_:1},8,["modelValue"]),Object(c["createVNode"])(i,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.feedbackDone=t})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",Re,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>"))},null,8,we),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,Me)])]})),_:1},8,["modelValue"])])])}var xe=window,Be=xe.$,_e="feedback-question",Ce=Object(c["defineComponent"])({props:{showQuestionBanner:String},components:{MatomoDialog:o["MatomoDialog"]},computed:{isHidden:function(){return"0"===this.showQuestionBanner||!!this.hide},feedbackPolicy:function(){return Object(o["translate"])("Feedback_Policy",'<a rel="nofollow" href="https://matomo.org/privacy-policy/" target="_blank">',"</a>")}},data:function(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm:function(e){this.questionText=Object(o["translate"])("Feedback_Question".concat(this.question)),e&&setInterval((function(){Be("#message").focus()}),500)}},created:function(){"0"!==this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion:function(){Object(o["getCookie"])(_e)?this.question=parseInt(Object(o["getCookie"])(_e)):this.question=this.getRandomIntBetween(0,4);var e=(this.question+1)%4,t=6048e5;Object(o["setCookie"])(_e,"".concat(e),t)},getRandomIntBetween:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion:function(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder:function(){o["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then((function(t){"success"===t.value?(Be(".modal").modal("close"),e.feedbackDone=!0,e.hide=!0):e.errorMessage=t.value}))}}});Ce.render=De;var Se=Ce; + */function De(e,t,a,n,l,o){var c=Object(i["resolveComponent"])("MatomoDialog");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[e.isHidden?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ke,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),me]),Object(i["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(){return e.showQuestion&&e.showQuestion.apply(e,arguments)}),class:"btn"},Object(i["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(i["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=function(){return e.disableReminder&&e.disableReminder.apply(e,arguments)})},je)])),Object(i["createElementVNode"])("div",Oe,[Object(i["createVNode"])(c,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showFeedbackForm=t}),onValidation:t[4]||(t[4]=function(t){return e.sendFeedback()})},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",fe,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>"))},null,8,ge),ve,Object(i["createElementVNode"])("div",he,[e.errorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fe,Object(i["toDisplayString"])(e.errorMessage),1)):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("textarea",{id:"message",class:Object(i["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.feedbackMessage=t})},null,2),[[i["vModelText"],e.feedbackMessage]])]),Ve,Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.feedbackPolicy)},null,8,ye),Object(i["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,Ne),Object(i["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,Ee)])]})),_:1},8,["modelValue"]),Object(i["createVNode"])(c,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.feedbackDone=t})},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Re,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>"))},null,8,we),Object(i["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,Me)])]})),_:1},8,["modelValue"])])])}var xe=window,Be=xe.$,_e="feedback-question",Ce=Object(i["defineComponent"])({props:{showQuestionBanner:String},components:{MatomoDialog:o["MatomoDialog"]},computed:{isHidden:function(){return"0"===this.showQuestionBanner||!!this.hide},feedbackPolicy:function(){return Object(o["translate"])("Feedback_Policy",'<a rel="nofollow" href="https://matomo.org/privacy-policy/" target="_blank">',"</a>")}},data:function(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm:function(e){this.questionText=Object(o["translate"])("Feedback_Question".concat(this.question)),e&&setInterval((function(){Be("#message").focus()}),500)}},created:function(){"0"!==this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion:function(){Object(o["getCookie"])(_e)?this.question=parseInt(Object(o["getCookie"])(_e)):this.question=this.getRandomIntBetween(0,4);var e=(this.question+1)%4,t=6048e5;Object(o["setCookie"])(_e,"".concat(e),t)},getRandomIntBetween:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion:function(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder:function(){o["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then((function(t){"success"===t.value?(Be(".modal").modal("close"),e.feedbackDone=!0,e.hide=!0):e.errorMessage=t.value}))}}});Ce.render=De;var Se=Ce; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Feedback/vue/src/RateFeature/RateFeature.vue b/plugins/Feedback/vue/src/RateFeature/RateFeature.vue index 76ba6bce62..709d1cbf2d 100644 --- a/plugins/Feedback/vue/src/RateFeature/RateFeature.vue +++ b/plugins/Feedback/vue/src/RateFeature/RateFeature.vue @@ -6,7 +6,7 @@ <template> <div - :title="translate('Feedback_RateFeatureTitle', $sanitize(title))" + :title="translate('Feedback_RateFeatureTitle', htmlEntities(title))" class="ratefeature" > <div @@ -197,7 +197,7 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import { MatomoDialog, AjaxHelper } from 'CoreHome'; +import { Matomo, MatomoDialog, AjaxHelper } from 'CoreHome'; import ReviewLinks from '../ReviewLinks/ReviewLinks.vue'; const { $ } = window; @@ -284,6 +284,9 @@ export default defineComponent({ } }); }, + htmlEntities(v: string) { + return Matomo.helper.htmlEntities(v); + }, }, }); </script> diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php index c361ab323e..119210ad49 100644 --- a/plugins/Goals/API.php +++ b/plugins/Goals/API.php @@ -113,6 +113,10 @@ class API extends \Piwik\Plugin\API private function formatGoal($goal) { + $goal['name'] = Common::unsanitizeInputValue($goal['name']); + $goal['description'] = Common::unsanitizeInputValue($goal['description']); + $goal['pattern_type'] = Common::unsanitizeInputValue($goal['pattern_type']); + if ($goal['match_attribute'] == 'manually') { unset($goal['pattern']); unset($goal['pattern_type']); diff --git a/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php b/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php index f72d71c06a..ad20a36b0a 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php @@ -8,7 +8,6 @@ namespace Piwik\Plugins\Goals\Columns\Metrics; use Piwik\API\Request; -use Piwik\Common; use Piwik\DataTable\Row; use Piwik\Piwik; use Piwik\Plugin\ProcessedMetric; @@ -83,7 +82,7 @@ abstract class GoalSpecificProcessedMetric extends ProcessedMetric if (isset($this->idSite)) { $allGoals = Request::processRequest('Goals.getGoals', ['idSite' => $this->idSite, 'filter_limit' => '-1'], $default = []); $goalName = @$allGoals[$this->idGoal]['name']; - return Common::sanitizeInputValue($goalName); + return $goalName; } else { return ""; } diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index 13b1ab942e..671a22e5ea 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -14,11 +14,13 @@ use Piwik\DataTable; use Piwik\DataTable\Renderer\Json; use Piwik\DataTable\Filter\AddColumnsProcessedMetricsGoal; use Piwik\FrontController; +use Piwik\NumberFormatter; use Piwik\Piwik; use Piwik\Plugin\Manager; use Piwik\Plugins\CoreVisualizations\Visualizations\Sparklines; use Piwik\Plugins\Live\Live; use Piwik\Plugins\Referrers\API as APIReferrers; +use Piwik\Site; use Piwik\Translation\Translator; use Piwik\View; use Piwik\ViewDataTable\Factory as ViewDataTableFactory; @@ -420,15 +422,8 @@ class Controller extends \Piwik\Plugin\Controller { $goals = $this->goals; - // unsanitize goal names and other text data (not done in API so as not to break - // any other code/cause security issues) foreach ($goals as &$goal) { - $goal['name'] = Common::unsanitizeInputValue($goal['name']); - $goal['description'] = Common::unsanitizeInputValue($goal['description']); - if (isset($goal['pattern'])) { - $goal['pattern'] = Common::unsanitizeInputValue($goal['pattern']); - } - $goal['revenue_pretty'] = \Piwik\piwik_format_money($goal['revenue'], $this->idSite); + $goal['revenue_pretty'] = NumberFormatter::getInstance()->formatCurrency($goal['revenue'], Site::getCurrencySymbolFor($this->idSite)); } $view->goals = $goals; diff --git a/plugins/Goals/Pages.php b/plugins/Goals/Pages.php index 3fbd1993da..f5d4ac1cd8 100644 --- a/plugins/Goals/Pages.php +++ b/plugins/Goals/Pages.php @@ -8,7 +8,6 @@ */ namespace Piwik\Plugins\Goals; -use Piwik\Common; use Piwik\Piwik; use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution; use Piwik\Plugins\CoreVisualizations\Visualizations\Sparklines; @@ -166,7 +165,7 @@ class Pages $widgets = array(); $idGoal = (int) $goal['idgoal']; - $name = Common::sanitizeInputValue($goal['name']); + $name = $goal['name']; $params = array('idGoal' => $idGoal); $config = $this->factory->createWidget(); diff --git a/plugins/Goals/Reports/Base.php b/plugins/Goals/Reports/Base.php index 24e6ecc725..5790691cc6 100644 --- a/plugins/Goals/Reports/Base.php +++ b/plugins/Goals/Reports/Base.php @@ -9,7 +9,6 @@ namespace Piwik\Plugins\Goals\Reports; use Piwik\API\Request; -use Piwik\Common; use Piwik\Piwik; abstract class Base extends \Piwik\Plugin\Report @@ -28,8 +27,6 @@ abstract class Base extends \Piwik\Plugin\Report $goals = $this->getGoalsForIdSite($idSite); foreach ($goals as $goal) { - $goal['name'] = Common::sanitizeInputValue($goal['name']); - $this->name = $goalNameFormatter($goal); $this->parameters = array('idGoal' => $goal['idgoal']); $this->order = $this->orderGoal + $goal['idgoal'] * 3; diff --git a/plugins/Goals/Reports/Get.php b/plugins/Goals/Reports/Get.php index 3affc112f5..247e4c1de0 100644 --- a/plugins/Goals/Reports/Get.php +++ b/plugins/Goals/Reports/Get.php @@ -252,9 +252,9 @@ class Get extends Base $goal = $this->getGoal($idGoal); if (!empty($goal['name'])) { - $view->config->title = Piwik::translate('Goals_GoalX', "'" . Common::unsanitizeInputValue($goal['name']) . "'"); + $view->config->title = Piwik::translate('Goals_GoalX', "'" . $goal['name'] . "'"); if (!empty($goal['description'])) { - $view->config->description = Common::unsanitizeInputValue($goal['description']); + $view->config->description = $goal['description']; } } else { $view->config->title = Piwik::translate('General_EvolutionOverPeriod'); diff --git a/plugins/Goals/VisitorDetails.php b/plugins/Goals/VisitorDetails.php index 34091d13ab..8280a739f9 100644 --- a/plugins/Goals/VisitorDetails.php +++ b/plugins/Goals/VisitorDetails.php @@ -87,7 +87,13 @@ class VisitorDetails extends VisitorDetailsAbstract AND log_conversion.idgoal > 0 ORDER BY log_conversion.idvisit, log_conversion.server_time ASC "; - return $this->getDb()->fetchAll($sql); + $conversions = $this->getDb()->fetchAll($sql); + + foreach ($conversions as &$conversion) { + $conversion['goalName'] = Common::unsanitizeInputValue($conversion['goalName']); + } + + return $conversions; } diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php index 943078ea36..dbccd776a1 100644 --- a/plugins/Goals/Visualizations/Goals.php +++ b/plugins/Goals/Visualizations/Goals.php @@ -335,8 +335,6 @@ class Goals extends HtmlTable $siteGoals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1'], $default = []); foreach ($siteGoals as &$goal) { - $goal['name'] = Common::sanitizeInputValue($goal['name']); - $goal['quoted_name'] = '"' . $goal['name'] . '"'; $allGoals[$goal['idgoal']] = $goal; } diff --git a/plugins/Goals/tests/UI/Goals_spec.js b/plugins/Goals/tests/UI/Goals_spec.js index 7744f664d0..064cd44f86 100644 --- a/plugins/Goals/tests/UI/Goals_spec.js +++ b/plugins/Goals/tests/UI/Goals_spec.js @@ -93,4 +93,22 @@ describe("Goals", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('action_goals_visualization_page_urls_subtable'); }); + it("should load row evolution", async function() { + const row = await page.waitForSelector('.dataTable tbody tr:first-child'); + await row.hover(); + + const icon = await page.waitForSelector('.dataTable tbody tr:first-child a.actionRowEvolution'); + await icon.click(); + + await page.waitForSelector('.ui-dialog'); + await page.waitForNetworkIdle(); + + const series = await page.waitForSelector('[data-name="series3"]'); + await series.click(); + + await page.waitForTimeout(250); // rendering + + const dialog = await page.$('.ui-dialog'); + expect(await dialog.screenshot()).to.matchImage('action_goals_row_evolution'); + }); }); diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_row_evolution.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_row_evolution.png new file mode 100644 index 0000000000..666924af87 --- /dev/null +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_row_evolution.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e14ef0f683d204813182402fc54ce2542e534bd095176d151390bfff65bfba14 +size 69247 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls.png index e220dbaf53..13c0a17895 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac9a261a5e07fdb3e0f7e8f288c60d24006ba422954da51a3d49b94bb48dd9a4 -size 84872 +oid sha256:291c650f47b0ff5613d015bab4458d7fa118acbbf8ed881c5ebc9d75139122de +size 86969 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls_subtable.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls_subtable.png index 988266e868..57b7a14d28 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls_subtable.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_action_goals_visualization_page_urls_subtable.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ade1ca9828ac959373f42d264d81a03ed1aa9890f5efcb4bc08cf953a54a67e -size 100110 +oid sha256:2573e75f7025a0206aa44c2c9622684a55d2b0e16de87913dd848f885741a2dd +size 103576 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_page_titles.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_page_titles.png index 9f96078c52..f26624b157 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_page_titles.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_page_titles.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8263d66780f9155a0b848800c388bd76042af8de1dbc23a9deb60b30ddc0ce4 -size 21344 +oid sha256:5ad9c89628a657b097cacb85808642e2ba7563594bfe2f66dd0ea177cc1f49d9 +size 21463 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_pages.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_pages.png index 03774901da..183b80f061 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_pages.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_entry_pages.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:823c687d16d41a17a648919294b98c643c111ed993c7b7f31815f2ae683ebd88 -size 23218 +oid sha256:dd552acbb19071682bbb74edcf74bdce1c5f70a26c43dd433bfc3014979fd0fb +size 23337 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_page_titles.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_page_titles.png index 47af40b9a7..c2bbf287d6 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_page_titles.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_page_titles.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:785460b835a0d0021f9e293b2bd3750004deb63917432edca90f461896d54ae3 -size 54585 +oid sha256:65506cd7f337e4d00ced6fe6325df10ca10df17c274755c9d1b9854b8bb5cafe +size 53106 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_pages.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_pages.png index 2b7caf00e5..e01e5c4cf1 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_pages.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_goals_by_pages.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bea3ab414b5f5480d9fbca9d575adf11eb87c56403b26b0f92a3c042a585635 -size 36518 +oid sha256:73e16d21434bc987115a1f986e824fc4cd8f2693b9f075a5800203962d3e0bea +size 39068 diff --git a/plugins/Goals/tests/UI/expected-screenshots/Goals_overview.png b/plugins/Goals/tests/UI/expected-screenshots/Goals_overview.png index 02295ca9c8..5f71d18eed 100644 --- a/plugins/Goals/tests/UI/expected-screenshots/Goals_overview.png +++ b/plugins/Goals/tests/UI/expected-screenshots/Goals_overview.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bdbc9c486c72e19c414f71e560ba6af3e332aa0e462503a904420a68e236482b -size 118280 +oid sha256:f9ad845e54e4056054dd23411f6c9103029bc3a930e0b1afdc2adb5730a930ab +size 122070 diff --git a/plugins/PagePerformance/javascripts/jqplotStackedBarEvolutionGraph.js b/plugins/PagePerformance/javascripts/jqplotStackedBarEvolutionGraph.js index b3f6b20c5b..c7b5f7ac94 100644 --- a/plugins/PagePerformance/javascripts/jqplotStackedBarEvolutionGraph.js +++ b/plugins/PagePerformance/javascripts/jqplotStackedBarEvolutionGraph.js @@ -199,7 +199,12 @@ } // make sure percent axes don't go above 100% - if (axis.tickOptions.formatString.substring(2, 3) == '%' && maxCrossDataSets > 100) { + if ( + axis.tickOptions + && axis.tickOptions.formatString + && axis.tickOptions.formatString.substring(2, 3) == '%' + && maxCrossDataSets > 100 + ) { maxCrossDataSets = 100; } @@ -215,4 +220,4 @@ }); -})(jQuery, require);
\ No newline at end of file +})(jQuery, require); |