diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.js b/plugins/Marketplace/vue/dist/Marketplace.umd.js index 0a2b6ce78f43..81ab21c31097 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.js @@ -154,7 +154,7 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=1547a42f +// 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/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=6d6f7526 var _hoisted_1 = { class: "row marketplaceActions", @@ -221,7 +221,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { }) })], 8, _hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512); } -// CONCATENATED MODULE: ./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=1547a42f +// CONCATENATED MODULE: ./plugins/Marketplace/vue/src/Marketplace/Marketplace.vue?vue&type=template&id=6d6f7526 // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); @@ -238,8 +238,6 @@ var lcfirst = function lcfirst(s) { return "".concat(s[0].toLowerCase()).concat(s.substring(1)); }; -var _window = window, - $ = _window.$; /* harmony default export */ var Marketplacevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { pluginType: { @@ -291,88 +289,6 @@ var _window = window, element: this.$refs.root }); }, - created: function created() { - function syncMaxHeight2(selector) { - if (!selector) { - return; - } - - var $nodes = $(selector); - - if (!$nodes || !$nodes.length) { - return; - } - - var maxh3 = undefined; - var maxMeta = undefined; - var maxFooter = undefined; - var nodesToUpdate = []; - var lastTop = 0; - $nodes.each(function (index, node) { - var $node = $(node); - - var _$node$offset = $node.offset(), - top = _$node$offset.top; - - if (lastTop !== top) { - nodesToUpdate = []; - lastTop = top; - maxh3 = undefined; - maxMeta = undefined; - maxFooter = undefined; - } - - nodesToUpdate.push($node); - var heightH3 = $node.find('h3').height(); - var heightMeta = $node.find('.metadata').height(); - var heightFooter = $node.find('.footer').height(); - - if (!maxh3) { - maxh3 = heightH3; - } else if (maxh3 < heightH3) { - maxh3 = heightH3; - } - - if (!maxMeta) { - maxMeta = heightMeta; - } else if (maxMeta < heightMeta) { - maxMeta = heightMeta; - } - - if (!maxFooter) { - maxFooter = heightFooter; - } else if (maxFooter < heightFooter) { - maxFooter = heightFooter; - } - - $.each(nodesToUpdate, function (i, $nodeToUpdate) { - if (maxh3) { - $nodeToUpdate.find('h3').height("".concat(maxh3, "px")); - } - - if (maxMeta) { - $nodeToUpdate.find('.metadata').height("".concat(maxMeta, "px")); - } - - if (maxFooter) { - $nodeToUpdate.find('.footer').height("".concat(maxFooter, "px")); - } - }); - }); - } - - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () { - // Keeps the plugin descriptions the same height - var descriptions = $('.marketplace .plugin .description'); - descriptions.dotdotdot({ - after: 'a.more', - watch: 'window' - }); - external_CoreHome_["Matomo"].helper.compileVueDirectives(descriptions); // have to recompile any vue directives - - syncMaxHeight2('.marketplace .plugin'); - }); - }, methods: { changePluginSort: function changePluginSort() { external_CoreHome_["MatomoUrl"].updateUrl(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].urlParsed.value), {}, { @@ -880,11 +796,11 @@ function GetNewPluginsAdminvue_type_template_id_3ba8e55b_render(_ctx, _cache, $p -var GetNewPluginsAdminvue_type_script_lang_ts_window = window, - GetNewPluginsAdminvue_type_script_lang_ts_$ = GetNewPluginsAdminvue_type_script_lang_ts_window.$; +var _window = window, + $ = _window.$; function applyDotdotdot(root) { - GetNewPluginsAdminvue_type_script_lang_ts_$('.col .description', root).dotdotdot({ + $('.col .description', root).dotdotdot({ watch: 'window' }); } diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js index cd723ade2f00..e81809894014 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},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 l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},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/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return y})),n.d(t,"LicenseKey",(function(){return Q})),n.d(t,"GetNewPlugins",(function(){return ce})),n.d(t,"GetNewPluginsAdmin",(function(){return he})),n.d(t,"GetPremiumFeatures",(function(){return De})),n.d(t,"MissingReqsNotice",(function(){return Ke})),n.d(t,"OverviewIntro",(function(){return We})),n.d(t,"SubscriptionOverview",(function(){return ft})),n.d(t,"RichMenuButton",(function(){return Pt})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var r=n("8bbf"),i={class:"row marketplaceActions",ref:"root"},c={class:"col s12 m6 l4"},o={class:"col s12 m6 l4"},s={key:0,class:"col s12 m12 l4 "},u=["action"];function p(e,t,n,l,a,p){var d,m=Object(r["resolveComponent"])("Field");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",i,[Object(r["createElementVNode"])("div",c,[Object(r["createVNode"])(m,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(r["createElementVNode"])("div",o,[Object(r["createVNode"])(m,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),(null===(d=e.pluginsToShow)||void 0===d?void 0:d.length)>20||e.query?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",s,[Object(r["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(m,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(r["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,u)])):Object(r["createCommentVNode"])("",!0)],512)}var d=n("19dc"),m=n("a5a2"),b=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},O=window,j=O.$,g=Object(r["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:m["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},mounted:function(){d["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){d["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},created:function(){function e(e){if(e){var t=j(e);if(t&&t.length){var n=void 0,l=void 0,a=void 0,r=[],i=0;t.each((function(e,t){var c=j(t),o=c.offset(),s=o.top;i!==s&&(r=[],i=s,n=void 0,l=void 0,a=void 0),r.push(c);var u=c.find("h3").height(),p=c.find(".metadata").height(),d=c.find(".footer").height();n?n")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(d["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",Object(d["externalLink"])("https://matomo.org/recommends/premium-plugins/"),"")},installAllPaidPluginsLink:function(){return"?".concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});z.render=F;var Q=z,W={class:"getNewPlugins"},Y={class:"row"},J={class:"pluginName"},X=Object(r["createElementVNode"])("br",null,null,-1),Z={key:0},ee=Object(r["createElementVNode"])("br",null,null,-1),te=Object(r["createElementVNode"])("br",null,null,-1),ne=[ee,te],le={class:"widgetBody"},ae=["href"];function re(e,t,n,l,a,i){var c=Object(r["resolveDirective"])("plugin-name");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",W,[Object(r["createElementVNode"])("div",Y,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugins,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(r["withDirectives"])(Object(r["createElementVNode"])("h3",J,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.displayName),1)],512),[[c,{pluginName:t.name}]]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),X,Object(r["withDirectives"])(Object(r["createElementVNode"])("a",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[c,{pluginName:t.name}]])]),n'),"")},pluginRows:function(){var e=[];return this.plugins.forEach((function(t,n){var l=Math.floor(n/3);e[l]=e[l]||[],e[l].push(t)})),e},overviewLink:function(){return"?".concat(d["MatomoUrl"].stringify({module:"Marketplace",action:"overview",show:"premium"}))}}});xe.render=Ce;var De=xe;function Ue(e,t,n,l,a,i){return Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugin.missingRequirements||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1)})),128)}var qe=Object(r["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement:function(e){return"php"===e?"PHP":"".concat(e[0].toUpperCase()).concat(e.substr(1))}}});qe.render=Ue;var Ke=qe,Ie={key:0},Fe={key:1},He=["innerHTML"],$e={key:2},Re=["innerHTML"],Ge=["innerHTML"];function ze(e,t,n,l,a,i){var c=Object(r["resolveComponent"])("EnrichedHeadline"),o=Object(r["resolveComponent"])("LicenseKey"),s=Object(r["resolveComponent"])("UploadPluginDialog"),u=Object(r["resolveComponent"])("Marketplace"),p=Object(r["resolveDirective"])("content-intro");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(c,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]})),_:1},8,["feature-name"])]),Object(r["createElementVNode"])("p",null,[e.isSuperUser?e.showThemes?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fe,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewThemeText)},null,8,He)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",$e,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewPluginText)},null,8,Re)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ie,Object(r["toDisplayString"])(e.showThemes?e.translate("Marketplace_NotAllowedToBrowseMarketplaceThemes"):e.translate("Marketplace_NotAllowedToBrowseMarketplacePlugins")),1)),e.isSuperUser&&e.inReportingMenu?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:3,ref:"noticeRemoveMarketplaceFromMenu",innerHTML:e.$sanitize(e.noticeRemoveMarketplaceFromMenuText)},null,8,Ge)):Object(r["createCommentVNode"])("",!0)]),Object(r["createVNode"])(o,{"is-valid-consumer":e.isValidConsumer,"is-super-user":e.isSuperUser,"is-auto-update-possible":e.isAutoUpdatePossible,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"has-license-key":e.hasLicenseKey,"paid-plugins-to-install-at-once":e.paidPluginsToInstallAtOnce,"install-nonce":e.installNonce},null,8,["is-valid-consumer","is-super-user","is-auto-update-possible","is-plugins-admin-enabled","has-license-key","paid-plugins-to-install-at-once","install-nonce"]),Object(r["createVNode"])(s,{"is-plugin-upload-enabled":e.isPluginUploadEnabled,"upload-limit":e.uploadLimit,"install-nonce":e.installNonce},null,8,["is-plugin-upload-enabled","upload-limit","install-nonce"]),Object(r["createVNode"])(u,{"plugin-type":e.pluginType,"plugin-type-options":e.pluginTypeOptions,sort:e.sort,"plugin-sort-options":e.pluginSortOptions,"plugins-to-show":e.pluginsToShow,query:e.query,"num-available-plugins":e.numAvailablePlugins},null,8,["plugin-type","plugin-type-options","sort","plugin-sort-options","plugins-to-show","query","num-available-plugins"])],512)),[[p]])}var Qe=Object(r["defineComponent"])({props:{showThemes:Boolean,inReportingMenu:Boolean,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0},isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{EnrichedHeadline:d["EnrichedHeadline"],UploadPluginDialog:m["UploadPluginDialog"],LicenseKey:Q,Marketplace:y},directives:{ContentIntro:d["ContentIntro"],PluginName:m["PluginName"]},mounted:function(){if(this.$refs.noticeRemoveMarketplaceFromMenu){var e=this.$refs.noticeRemoveMarketplaceFromMenu.querySelector("[matomo-plugin-name]");m["PluginName"].mounted(e,{dir:{},instance:null,modifiers:{},oldValue:null,value:{pluginName:"WhiteLabel"}})}},beforeUnmount:function(){if(this.$refs.noticeRemoveMarketplaceFromMenu){var e=this.$refs.noticeRemoveMarketplaceFromMenu.querySelector("[matomo-plugin-name]");m["PluginName"].unmounted(e,{dir:{},instance:null,modifiers:{},oldValue:null,value:{pluginName:"WhiteLabel"}})}},computed:{installingNewThemeText:function(){return Object(d["translate"])("Marketplace_InstallingNewThemesViaMarketplaceOrUpload",'',"")},installingNewPluginText:function(){return Object(d["translate"])("Marketplace_InstallingNewPluginsViaMarketplaceOrUpload",'',"")},noticeRemoveMarketplaceFromMenuText:function(){return Object(d["translate"])("Marketplace_NoticeRemoveMarketplaceFromReportingMenu",'',"")}}});Qe.render=ze;var We=Qe,Ye={key:0},Je=["href"],Xe=Object(r["createElementVNode"])("br",null,null,-1),Ze=Object(r["createElementVNode"])("br",null,null,-1),et=["innerHTML"],tt=Object(r["createElementVNode"])("br",null,null,-1),nt={class:"subscriptionName"},lt=["href"],at={key:1},rt={class:"subscriptionType"},it=["title"],ct={key:0,class:"icon-error"},ot={key:1,class:"icon-warning"},st={key:2,class:"icon-ok"},ut=["title"],pt=Object(r["createElementVNode"])("span",{class:"icon-error"},null,-1),dt={key:0},mt={colspan:"6"},bt={class:"tableActionBar"},Ot=["href"],jt=Object(r["createElementVNode"])("span",{class:"icon-table"},null,-1),gt={key:1},yt=["innerHTML"];function vt(e,t,n,l,a,i){var c=Object(r["resolveComponent"])("ContentBlock"),o=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(c,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(r["withCtx"])((function(){return[e.hasLicenseKey?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ye,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,Je)):Object(r["createCommentVNode"])("",!0),Xe,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),Ze,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers","".concat(e.numUsers,"")))},null,8,et)]),tt,Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.subscriptions||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",nt,[t.plugin.htmlUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(r["toDisplayString"])(t.plugin.displayName),9,lt)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",at,Object(r["toDisplayString"])(t.plugin.displayName),1))]),Object(r["createElementVNode"])("td",rt,Object(r["toDisplayString"])(t.productType),1),Object(r["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ot)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",st)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ct)),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:3,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[pt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,ut)):Object(r["createCommentVNode"])("",!0)],8,it),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.start),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.nextPayment),1)])})),128)),e.subscriptions.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",dt,[Object(r["createElementVNode"])("td",mt,Object(r["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])],512),[[o]]),Object(r["createElementVNode"])("div",bt,[Object(r["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[jt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,Ot)])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gt,[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,yt)]))]})),_:1},8,["content-title"])}var kt=Object(r["defineComponent"])({props:{loginUrl:{type:String,required:!0},numUsers:{type:Number,required:!0},hasLicenseKey:Boolean,subscriptions:{type:Array,required:!0}},components:{ContentBlock:d["ContentBlock"]},directives:{ContentTable:d["ContentTable"]},methods:{getSubscriptionStatusTitle:function(e){return e.isValid?e.isExpiredSoon?Object(d["translate"])("Marketplace_SubscriptionExpiresSoon"):void 0:Object(d["translate"])("Marketplace_SubscriptionInvalid")}},computed:{marketplaceOverviewLink:function(){return"?".concat(d["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}))},missingLicenseText:function(){return Object(d["translate"])("Marketplace_OverviewPluginSubscriptionsMissingLicense",''),"")}}});kt.render=vt;var ft=kt,ht={class:"richMarketplaceMenuButton"},Nt=Object(r["createElementVNode"])("hr",null,null,-1),Vt={class:"intro"},Et={class:"cta"},Mt=Object(r["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function St(e,t,n,l,a,i){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ht,[Nt,Object(r["createElementVNode"])("p",Vt,Object(r["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(r["createElementVNode"])("p",Et,[Object(r["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(r["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},[Mt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var Bt=Object(r["defineComponent"])({});Bt.render=St;var Pt=Bt; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},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 l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},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/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return j})),n.d(t,"LicenseKey",(function(){return G})),n.d(t,"GetNewPlugins",(function(){return re})),n.d(t,"GetNewPluginsAdmin",(function(){return ve})),n.d(t,"GetPremiumFeatures",(function(){return Ce})),n.d(t,"MissingReqsNotice",(function(){return xe})),n.d(t,"OverviewIntro",(function(){return ze})),n.d(t,"SubscriptionOverview",(function(){return kt})),n.d(t,"RichMenuButton",(function(){return St})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var r=n("8bbf"),c={class:"row marketplaceActions",ref:"root"},i={class:"col s12 m6 l4"},o={class:"col s12 m6 l4"},s={key:0,class:"col s12 m12 l4 "},u=["action"];function p(e,t,n,l,a,p){var d,b=Object(r["resolveComponent"])("Field");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",c,[Object(r["createElementVNode"])("div",i,[Object(r["createVNode"])(b,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(r["createElementVNode"])("div",o,[Object(r["createVNode"])(b,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),(null===(d=e.pluginsToShow)||void 0===d?void 0:d.length)>20||e.query?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",s,[Object(r["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(b,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(r["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,u)])):Object(r["createCommentVNode"])("",!0)],512)}var d=n("19dc"),b=n("a5a2"),m=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},O=Object(r["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:b["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},mounted:function(){d["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){d["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},methods:{changePluginSort:function(){d["MatomoUrl"].updateUrl(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},d["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){d["MatomoUrl"].updateUrl(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},d["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=m(Object(d["translate"])("General_Plugins"));return"".concat(Object(d["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});O.render=p;var j=O,g={class:"marketplace-max-width"},y={class:"marketplace-paid-intro"},k={key:0},v={key:0},f=Object(r["createElementVNode"])("br",null,null,-1),h={class:"licenseToolbar valign-wrapper"},N=["href"],V={key:0},E={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},M=Object(r["createElementVNode"])("br",null,null,-1),S=Object(r["createElementVNode"])("br",null,null,-1),B=["data-href","value"],P=["value"],w={key:1},T={key:0},L=["innerHTML"],_=Object(r["createElementVNode"])("br",null,null,-1),A={class:"licenseToolbar valign-wrapper"},C={key:1},D=["innerHTML"],U={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},x=["value"],q=["value"];function K(e,t,n,l,a,c){var i=Object(r["resolveComponent"])("DefaultLicenseKeyFields"),o=Object(r["resolveComponent"])("SaveButton"),s=Object(r["resolveComponent"])("ActivityIndicator");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",g,[Object(r["createElementVNode"])("div",y,[e.isValidConsumer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",k,[e.isSuperUser?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",v,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),f,Object(r["createElementVNode"])("div",h,[Object(r["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"]),Object(r["createVNode"])(o,{class:"valign",id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),value:e.translate("Marketplace_RemoveLicenseKey")},null,8,["value"]),Object(r["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(r["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,N),e.showInstallAllPaidPlugins?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",V,[Object(r["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(r["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(r["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(r["createElementVNode"])("div",E,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),M,S]),Object(r["createElementVNode"])("ul",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:e},Object(r["toDisplayString"])(e),1)})),128))]),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,B),Object(r["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,P)])],512)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])])):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",w,[e.isSuperUser?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",T,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,L),_,Object(r["createElementVNode"])("div",A,[Object(r["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[5]||(t[5]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"])]),Object(r["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",C,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,D)]))]))]),Object(r["createElementVNode"])("div",U,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,x),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,q)],512)])}var I={class:"valign licenseKeyText"};function F(e,t,n,l,a,c){var i=Object(r["resolveComponent"])("Field"),o=Object(r["resolveComponent"])("SaveButton");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createElementVNode"])("div",I,[Object(r["createVNode"])(i,{uicontrol:"text",name:"license_key","full-width":!0,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),placeholder:e.licenseKeyPlaceholder},null,8,["model-value","placeholder"])]),Object(r["createVNode"])(o,{class:"valign",onConfirm:t[1]||(t[1]=function(t){return e.$emit("confirm")}),disabled:!e.enableUpdate,value:e.saveButtonText,id:"submit_license_key"},null,8,["disabled","value"])],64)}var H=Object(r["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:b["Field"],SaveButton:b["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(d["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(d["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(d["translate"])("CoreUpdater_UpdateTitle"):Object(d["translate"])("Marketplace_ActivateLicenseKey")}}});H.render=F;var R=H,$=Object(r["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:b["SaveButton"],ActivityIndicator:d["ActivityIndicator"],DefaultLicenseKeyFields:R},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){d["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;d["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(d["NotificationsStore"].show({message:n,context:"success",type:"transient"}),d["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;d["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(d["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(d["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(d["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",Object(d["externalLink"])("https://matomo.org/recommends/premium-plugins/"),"")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(d["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",Object(d["externalLink"])("https://matomo.org/recommends/premium-plugins/"),"")},installAllPaidPluginsLink:function(){return"?".concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});$.render=K;var G=$,z={class:"getNewPlugins"},Q={class:"row"},W={class:"pluginName"},Y=Object(r["createElementVNode"])("br",null,null,-1),J={key:0},X=Object(r["createElementVNode"])("br",null,null,-1),Z=Object(r["createElementVNode"])("br",null,null,-1),ee=[X,Z],te={class:"widgetBody"},ne=["href"];function le(e,t,n,l,a,c){var i=Object(r["resolveDirective"])("plugin-name");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",z,[Object(r["createElementVNode"])("div",Q,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugins,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(r["withDirectives"])(Object(r["createElementVNode"])("h3",W,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.displayName),1)],512),[[i,{pluginName:t.name}]]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),Y,Object(r["withDirectives"])(Object(r["createElementVNode"])("a",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[i,{pluginName:t.name}]])]),n'),"")},pluginRows:function(){var e=[];return this.plugins.forEach((function(t,n){var l=Math.floor(n/3);e[l]=e[l]||[],e[l].push(t)})),e},overviewLink:function(){return"?".concat(d["MatomoUrl"].stringify({module:"Marketplace",action:"overview",show:"premium"}))}}});Ae.render=_e;var Ce=Ae;function De(e,t,n,l,a,c){return Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugin.missingRequirements||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1)})),128)}var Ue=Object(r["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement:function(e){return"php"===e?"PHP":"".concat(e[0].toUpperCase()).concat(e.substr(1))}}});Ue.render=De;var xe=Ue,qe={key:0},Ke={key:1},Ie=["innerHTML"],Fe={key:2},He=["innerHTML"],Re=["innerHTML"];function $e(e,t,n,l,a,c){var i=Object(r["resolveComponent"])("EnrichedHeadline"),o=Object(r["resolveComponent"])("LicenseKey"),s=Object(r["resolveComponent"])("UploadPluginDialog"),u=Object(r["resolveComponent"])("Marketplace"),p=Object(r["resolveDirective"])("content-intro");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(i,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]})),_:1},8,["feature-name"])]),Object(r["createElementVNode"])("p",null,[e.isSuperUser?e.showThemes?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ke,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewThemeText)},null,8,Ie)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fe,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewPluginText)},null,8,He)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",qe,Object(r["toDisplayString"])(e.showThemes?e.translate("Marketplace_NotAllowedToBrowseMarketplaceThemes"):e.translate("Marketplace_NotAllowedToBrowseMarketplacePlugins")),1)),e.isSuperUser&&e.inReportingMenu?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:3,ref:"noticeRemoveMarketplaceFromMenu",innerHTML:e.$sanitize(e.noticeRemoveMarketplaceFromMenuText)},null,8,Re)):Object(r["createCommentVNode"])("",!0)]),Object(r["createVNode"])(o,{"is-valid-consumer":e.isValidConsumer,"is-super-user":e.isSuperUser,"is-auto-update-possible":e.isAutoUpdatePossible,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"has-license-key":e.hasLicenseKey,"paid-plugins-to-install-at-once":e.paidPluginsToInstallAtOnce,"install-nonce":e.installNonce},null,8,["is-valid-consumer","is-super-user","is-auto-update-possible","is-plugins-admin-enabled","has-license-key","paid-plugins-to-install-at-once","install-nonce"]),Object(r["createVNode"])(s,{"is-plugin-upload-enabled":e.isPluginUploadEnabled,"upload-limit":e.uploadLimit,"install-nonce":e.installNonce},null,8,["is-plugin-upload-enabled","upload-limit","install-nonce"]),Object(r["createVNode"])(u,{"plugin-type":e.pluginType,"plugin-type-options":e.pluginTypeOptions,sort:e.sort,"plugin-sort-options":e.pluginSortOptions,"plugins-to-show":e.pluginsToShow,query:e.query,"num-available-plugins":e.numAvailablePlugins},null,8,["plugin-type","plugin-type-options","sort","plugin-sort-options","plugins-to-show","query","num-available-plugins"])],512)),[[p]])}var Ge=Object(r["defineComponent"])({props:{showThemes:Boolean,inReportingMenu:Boolean,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0},isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{EnrichedHeadline:d["EnrichedHeadline"],UploadPluginDialog:b["UploadPluginDialog"],LicenseKey:G,Marketplace:j},directives:{ContentIntro:d["ContentIntro"],PluginName:b["PluginName"]},mounted:function(){if(this.$refs.noticeRemoveMarketplaceFromMenu){var e=this.$refs.noticeRemoveMarketplaceFromMenu.querySelector("[matomo-plugin-name]");b["PluginName"].mounted(e,{dir:{},instance:null,modifiers:{},oldValue:null,value:{pluginName:"WhiteLabel"}})}},beforeUnmount:function(){if(this.$refs.noticeRemoveMarketplaceFromMenu){var e=this.$refs.noticeRemoveMarketplaceFromMenu.querySelector("[matomo-plugin-name]");b["PluginName"].unmounted(e,{dir:{},instance:null,modifiers:{},oldValue:null,value:{pluginName:"WhiteLabel"}})}},computed:{installingNewThemeText:function(){return Object(d["translate"])("Marketplace_InstallingNewThemesViaMarketplaceOrUpload",'',"")},installingNewPluginText:function(){return Object(d["translate"])("Marketplace_InstallingNewPluginsViaMarketplaceOrUpload",'',"")},noticeRemoveMarketplaceFromMenuText:function(){return Object(d["translate"])("Marketplace_NoticeRemoveMarketplaceFromReportingMenu",'',"")}}});Ge.render=$e;var ze=Ge,Qe={key:0},We=["href"],Ye=Object(r["createElementVNode"])("br",null,null,-1),Je=Object(r["createElementVNode"])("br",null,null,-1),Xe=["innerHTML"],Ze=Object(r["createElementVNode"])("br",null,null,-1),et={class:"subscriptionName"},tt=["href"],nt={key:1},lt={class:"subscriptionType"},at=["title"],rt={key:0,class:"icon-error"},ct={key:1,class:"icon-warning"},it={key:2,class:"icon-ok"},ot=["title"],st=Object(r["createElementVNode"])("span",{class:"icon-error"},null,-1),ut={key:0},pt={colspan:"6"},dt={class:"tableActionBar"},bt=["href"],mt=Object(r["createElementVNode"])("span",{class:"icon-table"},null,-1),Ot={key:1},jt=["innerHTML"];function gt(e,t,n,l,a,c){var i=Object(r["resolveComponent"])("ContentBlock"),o=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(i,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(r["withCtx"])((function(){return[e.hasLicenseKey?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Qe,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,We)):Object(r["createCommentVNode"])("",!0),Ye,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),Je,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers","".concat(e.numUsers,"")))},null,8,Xe)]),Ze,Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.subscriptions||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",et,[t.plugin.htmlUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(r["toDisplayString"])(t.plugin.displayName),9,tt)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",nt,Object(r["toDisplayString"])(t.plugin.displayName),1))]),Object(r["createElementVNode"])("td",lt,Object(r["toDisplayString"])(t.productType),1),Object(r["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ct)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",it)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",rt)),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:3,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[st,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,ot)):Object(r["createCommentVNode"])("",!0)],8,at),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.start),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.nextPayment),1)])})),128)),e.subscriptions.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",ut,[Object(r["createElementVNode"])("td",pt,Object(r["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])],512),[[o]]),Object(r["createElementVNode"])("div",dt,[Object(r["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[mt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,bt)])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ot,[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,jt)]))]})),_:1},8,["content-title"])}var yt=Object(r["defineComponent"])({props:{loginUrl:{type:String,required:!0},numUsers:{type:Number,required:!0},hasLicenseKey:Boolean,subscriptions:{type:Array,required:!0}},components:{ContentBlock:d["ContentBlock"]},directives:{ContentTable:d["ContentTable"]},methods:{getSubscriptionStatusTitle:function(e){return e.isValid?e.isExpiredSoon?Object(d["translate"])("Marketplace_SubscriptionExpiresSoon"):void 0:Object(d["translate"])("Marketplace_SubscriptionInvalid")}},computed:{marketplaceOverviewLink:function(){return"?".concat(d["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}))},missingLicenseText:function(){return Object(d["translate"])("Marketplace_OverviewPluginSubscriptionsMissingLicense",''),"")}}});yt.render=gt;var kt=yt,vt={class:"richMarketplaceMenuButton"},ft=Object(r["createElementVNode"])("hr",null,null,-1),ht={class:"intro"},Nt={class:"cta"},Vt=Object(r["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function Et(e,t,n,l,a,c){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",vt,[ft,Object(r["createElementVNode"])("p",ht,Object(r["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(r["createElementVNode"])("p",Nt,[Object(r["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(r["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},[Vt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var Mt=Object(r["defineComponent"])({});Mt.render=Et;var St=Mt; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue index de3b168ee94a..76eb22e5044d 100644 --- a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue +++ b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue @@ -58,7 +58,7 @@