From 764a38e32d4dd841ce65396323997a6897afc412 Mon Sep 17 00:00:00 2001 From: Michal Kleiner Date: Mon, 22 Jan 2024 01:17:45 +1300 Subject: [PATCH] Implement visual changes for marketplace plugin cards (#21629) Co-authored-by: Stefan Giehl --- config/environment/ui-test.php | 6 +- plugins/CorePluginsAdmin/Controller.php | 7 +- .../CorePluginsAdmin/templates/macros.twig | 4 +- plugins/Marketplace/Marketplace.php | 2 + plugins/Marketplace/Plugins.php | 86 ++++- plugins/Marketplace/images/matomo-badge.png | Bin 0 -> 1576 bytes .../images/previews/generic-plugin.png | Bin 0 -> 17335 bytes .../images/previews/matomo-plugin.png | Bin 0 -> 16851 bytes plugins/Marketplace/lang/en.json | 2 + .../Marketplace/stylesheets/marketplace.less | 312 ++++++++++++++---- plugins/Marketplace/templates/macros.twig | 18 + .../Marketplace/templates/plugin-list.twig | 238 ++++++------- .../tests/Integration/PluginsTest.php | 6 +- .../Marketplace/tests/UI/Marketplace_spec.js | 1 + ...lugins_no_license_multiUserEnvironment.png | 4 +- ...lace_paid_plugins_no_license_superuser.png | 4 +- ...rketplace_paid_plugins_no_license_user.png | 4 +- ..._exceeded_license_multiUserEnvironment.png | 4 +- ...lugins_with_exceeded_license_superuser.png | 4 +- ...aid_plugins_with_exceeded_license_user.png | 4 +- ...gins_with_license_multiUserEnvironment.png | 4 +- ...ce_paid_plugins_with_license_superuser.png | 4 +- ...etplace_paid_plugins_with_license_user.png | 4 +- ...etplace_superuser_enable_plugins_admin.png | 4 +- ...plugins_admin_with_multiserver_enabled.png | 4 +- ..._superuser_invalid_license_key_entered.png | 4 +- ...superuser_remove_license_key_confirmed.png | 4 +- ...ce_superuser_valid_license_key_entered.png | 4 +- ...ith_valid_license_multiUserEnvironment.png | 4 +- ...ce_themes_with_valid_license_superuser.png | 4 +- ...etplace_themes_with_valid_license_user.png | 4 +- .../Marketplace/vue/dist/Marketplace.umd.js | 138 +++++--- .../vue/dist/Marketplace.umd.min.js | 2 +- .../vue/src/Marketplace/Marketplace.vue | 136 ++++---- .../Integration/ReleaseCheckListTest.php | 2 +- 35 files changed, 668 insertions(+), 360 deletions(-) create mode 100644 plugins/Marketplace/images/matomo-badge.png create mode 100644 plugins/Marketplace/images/previews/generic-plugin.png create mode 100644 plugins/Marketplace/images/previews/matomo-plugin.png diff --git a/config/environment/ui-test.php b/config/environment/ui-test.php index 24700e06733..cc9e47d6630 100644 --- a/config/environment/ui-test.php +++ b/config/environment/ui-test.php @@ -16,8 +16,10 @@ 'tests.ui.url_normalizer_blacklist.api' => [], 'tests.ui.url_normalizer_blacklist.controller' => [], - // disable check for plugin updates during UI tests - 'dev.disable_plugin_update_checks' => true, + // disable check for plugin updates during UI tests, allow for override + 'dev.disable_plugin_update_checks' => Piwik\DI::decorate(function ($previous, Container $c) { + return !$c->get('test.vars.forceEnablePluginUpdateChecks'); + }), 'twig.cache' => function (\Piwik\Container\Container $container) { $templatesPath = $container->get('path.tmp.templates'); diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php index 2285cdcf756..681525fdbc9 100644 --- a/plugins/CorePluginsAdmin/Controller.php +++ b/plugins/CorePluginsAdmin/Controller.php @@ -222,15 +222,14 @@ private function createPluginsOrThemesView($template, $themesOnly) $view->isMarketplaceEnabled = Marketplace::isMarketplaceEnabled(); $view->isPluginsAdminEnabled = CorePluginsAdmin::isPluginsAdminEnabled(); - $view->pluginsHavingUpdate = []; $view->marketplacePluginNames = []; + $view->pluginsHavingUpdate = []; + $view->pluginUpdateNonces = []; if (Marketplace::isMarketplaceEnabled() && $this->marketplacePlugins) { try { $view->marketplacePluginNames = $this->marketplacePlugins->getAvailablePluginNames($themesOnly); - $view->pluginsHavingUpdate = $this->marketplacePlugins->getPluginsHavingUpdate(); - - $view->pluginUpdateNonces = []; + $view->pluginsHavingUpdate = $this->marketplacePlugins->getPluginsHavingUpdate(); foreach ($view->pluginsHavingUpdate as $name => $plugin) { $view->pluginUpdateNonces[$name] = Nonce::getNonce($plugin['name']); } diff --git a/plugins/CorePluginsAdmin/templates/macros.twig b/plugins/CorePluginsAdmin/templates/macros.twig index 809abc6107f..174ced057b3 100644 --- a/plugins/CorePluginsAdmin/templates/macros.twig +++ b/plugins/CorePluginsAdmin/templates/macros.twig @@ -1,10 +1,10 @@ {% macro pluginActivateDeactivateAction(name, isActivated, missingRequirements, deactivateNonce, activateNonce) -%} {%- if isActivated -%} - {{ 'CorePluginsAdmin_Deactivate'|translate }} + {{ 'CorePluginsAdmin_Deactivate'|translate }} {%- elseif missingRequirements %} - {% else -%} - {{ 'CorePluginsAdmin_Activate'|translate }} + {{ 'CorePluginsAdmin_Activate'|translate }} {%- endif -%} {%- endmacro %} diff --git a/plugins/Marketplace/Marketplace.php b/plugins/Marketplace/Marketplace.php index 372de1ad79b..b3b17415438 100644 --- a/plugins/Marketplace/Marketplace.php +++ b/plugins/Marketplace/Marketplace.php @@ -123,6 +123,8 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'Marketplace_Marketplace'; $translationKeys[] = 'Marketplace_RichMenuIntro'; $translationKeys[] = 'Marketplace_ManageLicenseKeyIntro'; + $translationKeys[] = 'Marketplace_Free'; + $translationKeys[] = 'Marketplace_StartFreeTrial'; } /** diff --git a/plugins/Marketplace/Plugins.php b/plugins/Marketplace/Plugins.php index 2abbe049097..03ea6d1659f 100644 --- a/plugins/Marketplace/Plugins.php +++ b/plugins/Marketplace/Plugins.php @@ -8,6 +8,7 @@ */ namespace Piwik\Plugins\Marketplace; +use Piwik\Container\StaticContainer; use Piwik\Date; use Piwik\ProfessionalServices\Advertising; use Piwik\Plugin\Dependency as PluginDependency; @@ -176,6 +177,11 @@ private function hasPluginUpdate($plugin) */ public function getPluginsHavingUpdate(): array { + $skipPluginUpdateCheck = StaticContainer::get('dev.disable_plugin_update_checks'); + if ($skipPluginUpdateCheck) { + return []; + } + $this->pluginManager->loadAllPluginsAndGetTheirInfo(); $loadedPlugins = $this->pluginManager->getLoadedPlugins(); @@ -247,7 +253,8 @@ private function enrichPluginInformation($plugin) $plugin['isActivated'] = $this->isPluginActivated($plugin['name']); $plugin['isInvalid'] = $this->pluginManager->isPluginThirdPartyAndBogus($plugin['name']); $plugin['canBeUpdated'] = $plugin['isInstalled'] && $this->hasPluginUpdate($plugin); - $plugin['lastUpdated'] = $this->toShortDate($plugin['lastUpdated']); + $plugin['lastUpdated'] = $this->toShortDate($plugin['lastUpdated']); + $plugin['canBePurchased'] = !$plugin['isDownloadable'] && !empty($plugin['shop']['url']); if ($plugin['isInstalled']) { $plugin = $this->enrichLicenseInformation($plugin); @@ -285,6 +292,10 @@ private function enrichPluginInformation($plugin) $plugin = $this->addMissingRequirements($plugin); + $this->addPriceFrom($plugin); + $this->addPluginPreviewImage($plugin); + $this->prettifyNumberOfDownloads($plugin); + return $plugin; } @@ -320,11 +331,14 @@ private function toShortDate($date) } /** + * Determine if there are any missing requirements/dependencies for the plugin + * * @param $plugin + * @return array */ - private function addMissingRequirements($plugin) + private function addMissingRequirements($plugin): array { - $plugin['missingRequirements'] = array(); + $plugin['missingRequirements'] = []; if (empty($plugin['versions']) || !is_array($plugin['versions'])) { return $plugin; @@ -343,4 +357,70 @@ private function addMissingRequirements($plugin) return $plugin; } + + /** + * Find the cheapest shop variant, and if none is found specified, return the first variant. + * + * @param $plugin + * @return void + */ + private function addPriceFrom(&$plugin): void + { + $variations = $plugin['shop']['variations'] ?? []; + + if (!count($variations)) { + $plugin['priceFrom'] = null; + return; + } + + $plugin['priceFrom'] = array_shift($variations); // use first as the default + + foreach ($variations as $variation) { + if ($variation['cheapest'] ?? false) { + $plugin['priceFrom'] = $variation; + return; + } + } + } + + /** + * If plugin is by Matomo, use a Matomo image, until plugins can provide their preview image via the marketplace. + * If plugin is not by Matomo, use generic preview image for now (until plugin categories are introduced). + * + * @param $plugin + * @return void + */ + private function addPluginPreviewImage(&$plugin): void + { + $previewImage = 'generic-plugin'; + + if (in_array(strtolower($plugin['owner']), ['piwik', 'matomo-org'])) { + $previewImage = 'matomo-plugin'; + } + + $plugin['previewImage'] = 'plugins/Marketplace/images/previews/' . $previewImage . '.png'; + } + + /** + * Add prettified number of downloads to plugin info to shorten large numbers to 1k or 1m format. + * + * @param $plugin + * @return void + */ + private function prettifyNumberOfDownloads(&$plugin): void + { + $num = $nice = $plugin['numDownloads'] ?? 0; + + if (($num >= 1000) && ($num < 100000)) { + $nice = round($num / 1000, 1, PHP_ROUND_HALF_DOWN) . 'k'; + } + elseif (($num >= 100000) && ($num < 1000000)) { + $nice = floor($num / 100000) . 'k'; + } + elseif ($num >= 1000000) { + $nice = floor($num / 1000000) . 'm'; + } + + $plugin['numDownloadsPretty'] = $nice; + } } diff --git a/plugins/Marketplace/images/matomo-badge.png b/plugins/Marketplace/images/matomo-badge.png new file mode 100644 index 0000000000000000000000000000000000000000..82fdc15bce131cefd358704091279d0b8ca9e978 GIT binary patch literal 1576 zcmV+@2G{wCP)~87K-sZAz?(dRtj=}-+hx^A(hT(c`7}%_# z1V*|Ke5b<)z62-+pQgj8vn$w?_R-#b^;*mw>7V2r2{`Hwx+w?aengPq2Uo!hctRaI zIbQ4A`LX__hY)vq~IE^{xjB}f=4_F zU|FB>6uiROr1~QDu?$(sCE=a@uTO4^!UNtMP_VuqqR3ej=MtQBg?A!r|1Iy&DXsd^6fGd<^i1i-4C6no?N1H*2wb0vUp>)T-%S6?{cEASE_gF%*9^3BiOrGh&L z__ux~CZACUW+HTyg%55@h7dGDMUtyja4bL*t#5~Fi96#=RE$2jsu-d;g2WI@eYM?j zDmW6L>DI4+C*HaGWCR{LuPk6eF(D}&5-A|bQu6I{YShWK&Kw|nn_=B>>c-CKwZ)b2 z!WV6K5eP|80ul+ptyIY8a*pn~p#bW0C-$RJo!=ZH2d_Mf+eXOMMV|)lV7`qb&_)6T zY4jCVs_$cm&o)klx@&<#t)Ksint8UTTeh@c$C2Jour@f?uyRM_NB}0n;-X1b2?Y8MJfZ2e`l#;!*-To&uMPm)!{Co~f$!)9*1H=eH(b8E1|ye; z@cGT{HQQ*nH&|`XuKo?db_t=dgkX^DFPFxXmzp+Ag_;haSwF!yw@pF>Ed;Q$z`-uv z2K#=_I&LP60$@Ck74ibq6@OxL_%G}H^@UCfem$-&cHzEt=dkIaFVWGhAl#)OL_)}l zRE)@eKhof#UBAp$|E($r>+`2qruo)z6pffOAkE&e{x=f_lSHWAXE2n-gFD|v*Qz|i z5xHP}a)59?t3ISz!wB@I;#x(mQ8fklYipB^f){kj^vU#l+a#=Bt{k=+ny3d!s6>zpgi9jeLlLw;p>|@J>7A z6|t2Gpr+GeVG@N$%vj_CtQVop!(8Tqo=q8acF$AJD~0DiO?nb57pVcUqv?ms7GGro zm_7?0)}icxArF$&z7{riL@IQX^?Np6pploXN1qsdChoqW^=-&fZ2<^h1rOauM4P48 z-;6nW`|G@4rr*EuoAZ|SDfa`Rg7v+;(lzh6tGby0F9syAF$=u8~GG`_E+q6iuMzx-W$Ghy*(_AS_>XA`rM`U zm%1xoc9#i2Px1_WxPU6S>C&+_yDv*K)FAw!i(RGChojH@J|QbC<8Iz7$1vo~^3P=g zXz_T~t96T`pDF9_!@U}PF#@lU_3c|~CJ%^>6;Fdi_c&#*1}o|SIx)dKSeKJgo~`u4LFfKK=4dXlAwg)SRL#dQ?|2p5o*g>_x1%twEY$0urjZRA9MI-FBx zeLHXMx;P=+0jF@5WhMp>#4qXguc{W@B!VV^_cd|?vqa(}6nv^)J8M2La(#3-jfSve zFgp4g?Is`E{cFmR2ppPX=KBuDFIFwk8crpuSQ|iWdqWk^`9jdp$?|7Jx)kOO=M=Zm z6ZFeF=;n$=3DfD%8QM0R)lR>XfeTXUZBbd0hUvk$o3rBH0*yF5B{Q_1oUXMDZqcGe a3&DRK+}PE@WYIDJ00001 literal 0 HcmV?d00001 diff --git a/plugins/Marketplace/images/previews/generic-plugin.png b/plugins/Marketplace/images/previews/generic-plugin.png new file mode 100644 index 0000000000000000000000000000000000000000..22ec6d0eb83a5c5aef778d40ebbb91dbff62218d GIT binary patch literal 17335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yjD7dLZ_0B;9EFh}Z5Z|tQQO%1EfwzW^h#Y0x|L#3Q21B_WwNi N)6nc}-f8>0{|gw$>@5HQ literal 0 HcmV?d00001 diff --git a/plugins/Marketplace/lang/en.json b/plugins/Marketplace/lang/en.json index c92c251d7e6..2ab538ac004 100644 --- a/plugins/Marketplace/lang/en.json +++ b/plugins/Marketplace/lang/en.json @@ -9,6 +9,7 @@ "Authors": "Authors", "Browse": "Browse", "TryFreeTrialTitle": "Try 30 days for free, then", + "Free": "Free", "FreeTrialLabel" : "Free Trial", "SpecialOffer": "Special Offer", "TrialHints": "All premium features come with a %1$sfree 30-day trial%2$s. It is risk-free and there are no strings attached.", @@ -92,6 +93,7 @@ "SortByAlpha": "Alphabetically", "SortByLastUpdated": "Last updated", "SortByPopular": "Popular", + "StartFreeTrial": "Start free trial", "StepDownloadingPluginFromMarketplace": "Downloading plugin from Marketplace", "StepDownloadingThemeFromMarketplace": "Downloading theme from Marketplace", "StepUnzippingPlugin": "Unzipping plugin", diff --git a/plugins/Marketplace/stylesheets/marketplace.less b/plugins/Marketplace/stylesheets/marketplace.less index 3f91c2a725a..05d754a07e2 100644 --- a/plugins/Marketplace/stylesheets/marketplace.less +++ b/plugins/Marketplace/stylesheets/marketplace.less @@ -20,14 +20,21 @@ .marketplace-paid-intro { .licenseKeyText { min-width: 210px; - .form-group { + .form-group, + .form-group > .input-field { margin-top: 0; + margin-bottom: 0; } } .licenseToolbar { + flex-wrap: wrap; + margin-top: 1rem; + margin-bottom: 1rem; + > a, > div { margin-right: 16px; + margin-bottom: 1rem; } > a, > div:not(.licenseKeyText) { @@ -75,91 +82,268 @@ font-size: 16px; cursor: pointer; } - } - .plugin { - h3 { - word-wrap: break-word; + .card-holder { + text-decoration: none; + display: block; + border-radius: 4px; - a { - text-decoration: none; + &:hover { + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); + cursor: pointer; - &:hover { - text-decoration: none; + .card { + .card-title-link { + .card-title { + color: #1976d2 !important; + } + + .card-title-chevron { + visibility: visible; + } } } } - text-align: center; - .description { - @line-height: 18px; - line-height: @line-height; - height: @line-height * 3; // 3 lines of text - padding-bottom: 0; - margin-bottom: 10px; - .more { - color: @theme-color-link; - white-space: nowrap; + + .card { + display: flex; + flex-direction: column; + flex-grow: 0; + position: relative; + height: 550px; + border: 1px solid #ccc; + border-radius: 4px; + overflow: visible; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + transition: box-shadow 0.3s ease; + text-decoration: none; + color: #000; + + @media (max-width: 480px) { + height: 380px; // as there's no image } - } - img.preview { - max-width: 250px; - width: 100%; - } - .metadata { - color: @color-silver-l50; - font-size: 95%; - margin: 15px 15px 10px; - list-style: none; - a { - color: @theme-color-link; - text-decoration: underline; - cursor: pointer; + @media (min-width: 601px) and (max-width: 767px), (min-width: 992px) and (max-width: 1200px) { + height: 520px; + } + @media (min-width: 1700px) { + height: 580px; } - li { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - line-height: 18px; - font-size: 13px; + @media (min-width: 1900px) { + height: 610px; } - .update-available { - // Code taken from Bootstrap's labels - font-weight: bold; - background-color: #f0ad4e; - display: inline; - padding: .2em .6em .3em; - font-size: 76%; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: 0.25em; - text-decoration: none; + + .preview-image { + width: 100%; + max-width: 550px; + height: auto; + margin: 0 auto 16px; + + @media (max-width: 480px) { + display: none; + } + } + + .card-content { + padding: 24px; + display: flex; + flex-direction: column; + flex-grow: 1; + + .content-container { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + .card-content-bottom { + position: relative; + } + + .card-description { + margin: 0; + + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; /* 150% */ + letter-spacing: 0.08px; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 4; + + @media (max-width: 480px) { + -webkit-line-clamp: 5; + } + + @media (max-width: 600px) { + -webkit-line-clamp: 2; + } + + &[data-clamp="2"] { + -webkit-line-clamp: 2; + + @media (max-width: 480px) { + -webkit-line-clamp: 4; + } + } + + &[data-clamp="1"] { + -webkit-line-clamp: 1; + + @media (max-width: 480px) { + -webkit-line-clamp: 3; + } + } + } + + .card-title-link { + text-decoration: none; + + &:focus { + .card-title { + color: #1976d2 !important; + } + .card-title-chevron, + .card-focus { + visibility: visible; + cursor: pointer; + } + } + } + + .card-title { + margin: 20px 0 16px; + font-size: 24px; + font-style: normal; + font-weight: 700; + line-height: 32px; + } + + .card-focus { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + outline: thin dashed; + outline-offset: 1px; + border-radius: 4px; + visibility: hidden; + content: ""; + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); + } + + .card-title-chevron { + visibility: hidden; + } + + .price { + color: #f18332; + + font-size: 14px; + font-style: normal; + font-weight: 700; + line-height: 21px; /* 150% */ + } + + .downloads { + color: #686868; + + font-size: 16px; + font-style: normal; + font-weight: 700; + line-height: 24px; /* 150% */ + + margin-bottom: 16px; + } } } - .footer { - padding: 12px 40px; + } + + .matomo-badge { + position: absolute; + width: 64px; + height: 40px; - .download.plugin-details { - padding-left: 0; - padding-right: 0; + @media (max-width: 480px), (min-width: 601px) and (max-width: 767px), (min-width: 992px) and (max-width: 1200px) { + width: 48px; + height: 32px; + } + } + + .matomo-badge-bottom { + display: block; + right: -5px; + bottom: -1px; + + @media (max-width: 480px) { + display: none; + } + } + + .matomo-badge-top { + display: none; + + @media (max-width: 480px) { + display: block; + top: 20px; + right: 20px; + } + } + + .cta-container { + width: 70%; + margin: 0; + position: relative; + + @media (max-width: 480px) { + width: auto; + } + + .btn.btn-block { + &:hover, + &:focus { + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); } - .btn-link.plugin-details { - padding-left: 0; - padding-right: 0; + &:focus { + outline: thin dotted; } + } + + .btn.purchaseable { + background: #3E7ECF; + } - .purchaseable { - background-color: #1e93d1; + .alert { + a:hover, + a:focus { + text-decoration: underline; + text-decoration-thickness: 2px; + color: #1976d2 !important; + } + + &.alert-no-background { + margin: 0; + border: 0; + background: none; + padding: 8px 0 8px 30px; + font-size: 14px; + line-height: 20px; + + &:before { + left: 0; + } } } } .footer-message { - margin-top:30px; + margin-top: 30px; } } diff --git a/plugins/Marketplace/templates/macros.twig b/plugins/Marketplace/templates/macros.twig index 216a3ad046f..35ca5dd194f 100644 --- a/plugins/Marketplace/templates/macros.twig +++ b/plugins/Marketplace/templates/macros.twig @@ -3,6 +3,24 @@ {% if 'piwik' == owner or 'matomo-org' == owner %}Matomo{% else %}{{ owner }}{% endif %} {% endmacro %} +{% macro matomoPluginBadge(owner, extraClass='') %} + {% if 'piwik' == owner or 'matomo-org' == owner %}{% endif %} +{% endmacro %} + +{% macro helpLink(plugin) %} + {{ 'General_Help'|translate }} +{% endmacro %} + +{% macro pluginActionButton(plugin) %} + + {% if plugin.priceFrom %} + {{ 'Marketplace_StartFreeTrial'|translate }} + {% else %} + {{ 'General_MoreDetails'|translate }} + {% endif %} + +{% endmacro %} + {% macro featuredIcon(align='') %} {% for plugin in pluginsToShow %}
- {% embed 'contentBlock.twig' with {'title': ''} %} - {% block content %} - {% import '@Marketplace/macros.twig' as marketplaceMacro %} - {% import '@CorePluginsAdmin/macros.twig' as pluginsMacro %} -
-

- {{ plugin.displayName }} -

- -

- {{ plugin.description }} - - › {{ 'General_MoreLowerCase'|translate }} -

- - {% if showThemes %} - {# Screenshot for themes #} - - - {% endif %} - - - - {% macro moreDetailsLink(plugin) %} - {% set canBePurchased = not plugin.isDownloadable and plugin.shop is defined and plugin.shop and plugin.shop.url %} - - - {% if canBePurchased and plugin.shop.variations %} - {% set foundCheapest = 0 %} - {% for variation in plugin.shop.variations %} - {% if not foundCheapest and variation.cheapest is defined and variation.cheapest %} - {% set foundCheapest = 1 %} - {{ 'Marketplace_PriceFromPerPeriod'|translate(variation.prettyPrice, variation.period) }} +
+ {% embed 'contentBlock.twig' with {'title': ''} %} + {% block content %} + {% import '@Marketplace/macros.twig' as marketplaceMacro %} + {% import '@CorePluginsAdmin/macros.twig' as pluginsMacro %} + + +
+
+ {{ marketplaceMacro.matomoPluginBadge(plugin.owner, 'matomo-badge-top') }} +
+ {% if plugin.priceFrom %} + {{ 'Marketplace_PriceFromPerPeriod'|translate(plugin.priceFrom.prettyPrice, plugin.priceFrom.period) }} + {% elseif plugin.isFree %} + {{ 'Marketplace_Free'|translate }} {% endif %} - {% endfor %} - {% if not foundCheapest %} - {{ 'Marketplace_PriceFromPerPeriod'|translate(plugin.shop.variations.0.prettyPrice, plugin.shop.variations.0.period) }} - {% endif %} - {% else %} - {{ 'General_MoreDetails'|translate }} - {% endif %} - ({{ 'Marketplace_FreeTrialLabel'|translate }}) - - {% endmacro %} - - - {% if isSuperUser %} - +
+ {% if plugin.numDownloads is defined and plugin.numDownloads > 0 %} +
{{ plugin.numDownloadsPretty }} {{ 'General_Downloads'|translate|lower }}
{% endif %} +
+ + {% if isSuperUser %} + {% if plugin.isMissingLicense is defined and plugin.isMissingLicense %} + +
+ {{ 'Marketplace_LicenseMissing'|translate }} + ({{ marketplaceMacro.helpLink(plugin)|trim|raw }}) +
+ + {% elseif plugin.hasExceededLicense is defined and plugin.hasExceededLicense %} + +
+ {{ 'Marketplace_LicenseExceeded'|translate }} + ({{ marketplaceMacro.helpLink(plugin)|trim|raw }}) +
+ + {% elseif plugin.canBeUpdated and 0 == plugin.missingRequirements|length and isAutoUpdatePossible %} + + + {{ 'CoreUpdater_UpdateTitle'|translate }} + + + {% elseif plugin.missingRequirements|length > 0 or not isAutoUpdatePossible %} + + {% macro downloadButton(showOr, plugin, isAutoUpdatePossible, showBrackets = false) -%} + {%- if plugin.missingRequirements|length == 0 and plugin.isDownloadable and not isAutoUpdatePossible -%} + {% if showBrackets %}({% endif %} + {%- if showOr %} {{ 'General_Or'|translate }} {% endif -%} + {{ 'General_Download'|translate }}{% if showBrackets %}){% endif %} + {%- endif -%} + {%- endmacro %} + + {% if plugin.canBeUpdated and 0 == plugin.missingRequirements|length %} +
+ {{ 'Marketplace_CannotUpdate'|translate }} + ({{ marketplaceMacro.helpLink(plugin)|trim|raw }}{{ _self.downloadButton(true, plugin, isAutoUpdatePossible)|raw }}) +
+ {% elseif plugin.isInstalled %} +
+ {{ 'General_Installed'|translate }} + {{ _self.downloadButton(false, plugin, isAutoUpdatePossible, true)|raw }} +
+ {% elseif not plugin.isDownloadable %} + {{ marketplaceMacro.pluginActionButton(plugin)|raw }} + {% else %} +
+ {{ 'Marketplace_CannotInstall'|translate }} + ({{ marketplaceMacro.helpLink(plugin)|trim|raw }}{{ _self.downloadButton(true, plugin, isAutoUpdatePossible)|raw }}) +
+ {% endif %} + + {% elseif plugin.isInstalled %} + +
+ {{ 'General_Installed'|translate }} + + {% if not plugin.isInvalid and not isMultiServerEnvironment and isPluginsAdminEnabled %} + ({{ pluginsMacro.pluginActivateDeactivateAction(plugin.name, plugin.isActivated, plugin.missingRequirements, deactivateNonce, activateNonce) }}) + {% endif %} +
+ + {% elseif plugin.isPaid and not plugin.isDownloadable %} + {{ marketplaceMacro.pluginActionButton(plugin)|raw }} + {% else %} + + {{ 'Marketplace_ActionInstall'|translate }} + + {% endif %} - {% elseif plugin.isInstalled %} - {{ 'General_Installed'|translate }} + {% else %} + {{ marketplaceMacro.pluginActionButton(plugin)|raw }} + {% endif %} - {% if not plugin.isInvalid and not isMultiServerEnvironment and isPluginsAdminEnabled %} - ({{ pluginsMacro.pluginActivateDeactivateAction(plugin.name, plugin.isActivated, plugin.missingRequirements, deactivateNonce, activateNonce) }}) - {% endif %} - {% elseif plugin.isPaid and not plugin.isDownloadable %} - {{ _self.moreDetailsLink(plugin)|raw }} - {% else %} - - {{ 'Marketplace_ActionInstall'|translate }} - - {% endif %} -
- {% else %} - + {{ marketplaceMacro.matomoPluginBadge(plugin.owner, 'matomo-badge-bottom') }} +
- {% endif %} - -
- {% endblock %} - {% endembed %} + {% endblock %} + {% endembed %} +
{% endfor %}
diff --git a/plugins/Marketplace/tests/Integration/PluginsTest.php b/plugins/Marketplace/tests/Integration/PluginsTest.php index 24e54a4ed2c..d3f89118423 100644 --- a/plugins/Marketplace/tests/Integration/PluginsTest.php +++ b/plugins/Marketplace/tests/Integration/PluginsTest.php @@ -305,7 +305,11 @@ public function testGetPluginInfoNotInstalledPluginShouldEnrichPluginInformation 'isMissingLicense' => false, 'changelog' => [ 'url' => 'http://plugins.piwik.org/Barometer/changelog' - ] + ], + 'canBePurchased' => false, + 'priceFrom' => null, + 'previewImage' => 'plugins/Marketplace/images/previews/generic-plugin.png', + 'numDownloadsPretty' => 0, ]; $this->assertEquals($expected, $plugin); } diff --git a/plugins/Marketplace/tests/UI/Marketplace_spec.js b/plugins/Marketplace/tests/UI/Marketplace_spec.js index ed8720abc80..dc3f35cf17f 100644 --- a/plugins/Marketplace/tests/UI/Marketplace_spec.js +++ b/plugins/Marketplace/tests/UI/Marketplace_spec.js @@ -97,6 +97,7 @@ describe("Marketplace", function () { testEnvironment.consumer = consumer; testEnvironment.mockMarketplaceApiService = 1; + testEnvironment.forceEnablePluginUpdateChecks = 1; testEnvironment.save(); } diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png index dac751d31bc..1827365afaa 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:324471203751e4681e4ed2f31dd0c9e6c674f64d64bf4d2ec440ba6d2f60c131 -size 57163 +oid sha256:2b0810e5fdb158b2c5865de1944de709b0f48687bb615db629d2f83f6f219535 +size 61894 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png index dac751d31bc..1827365afaa 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:324471203751e4681e4ed2f31dd0c9e6c674f64d64bf4d2ec440ba6d2f60c131 -size 57163 +oid sha256:2b0810e5fdb158b2c5865de1944de709b0f48687bb615db629d2f83f6f219535 +size 61894 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png index 52ac9a687fb..9c0cbb27f95 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:219f043ce0bcb5de770597b2e6457420b3a537eff22b89f22007c81fb4bb9870 -size 57604 +oid sha256:ca99d5d929cf16bfcf1dc663644b037e93036665e9c383bb9e72e763a4806c2e +size 59835 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png index 4d5f43407a5..feb1dacef49 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cd5792c4477ec0a5f0e475252b3df7f24c9c5a7ea60ab605f8ba1bbd1c4318c -size 66675 +oid sha256:f5e3f52d8cc71e3a4afa162dd24a0f45f6023479e8bf9f8d9f0eebe3a31c7d54 +size 70263 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png index 4d5f43407a5..feb1dacef49 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cd5792c4477ec0a5f0e475252b3df7f24c9c5a7ea60ab605f8ba1bbd1c4318c -size 66675 +oid sha256:f5e3f52d8cc71e3a4afa162dd24a0f45f6023479e8bf9f8d9f0eebe3a31c7d54 +size 70263 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png index 93a7b7c1ab0..ff149e17993 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6216a8c46f8c4d515e9302b94cea84b2ef5c08c660411cd368a7debf5851f5b9 -size 46649 +oid sha256:39afd1a903daef811cf27d9e30a89e3a64fdd7a5ba85ba28331406c961f1f948 +size 51292 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png index f377800c8f5..af0caa543e2 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ef2284f4dff4336188b59198309f8efac10c7fb20ede7b67797adaf75a29a9e -size 67951 +oid sha256:14e27ad31c5db426918134a9dbaee04d6f8afbcdd9f7735c36a28e1be48f05ea +size 71877 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png index 46656033dc8..dedc2519e77 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e71ec3cb06c4e0d7da07dbfaa76534e60a0e214d43f76072f361f083b536a927 -size 67856 +oid sha256:bf87d4049f53c0291015ffed567a4b52fe21c97f1abe3062fa4e836e1d96576b +size 69898 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png index 3a8e0bfef11..a5542eca8b5 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fa409517bd8770e5be2adc6113d0ef94b5d6720bd1da22bcd5726faf049508a -size 49092 +oid sha256:1353b26538622cc2b870dfa587c77305321f4e94ace08f78b00b6582a0ec7820 +size 51266 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png index 276f68297a7..283338a0ad8 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8f7e7d58498e6d63dcb86d778e47f15f47f76a678581dde1904c2b9db7c6454 -size 836611 +oid sha256:d9700780f18f633a5965d1fa400c04919ecc441e964def82520c5cbd372f9ba7 +size 918203 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png index d1c2ed01110..da3160245bb 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fd8fa9e35f4a6a12e9ff67cd0c64eb44219942a416d8c73acbca3df32243033 -size 863459 +oid sha256:e4a5b14332dc74973d98db5f5460bb8e383af49516124b5f332e44c9b78171e7 +size 988713 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png index 33ca682879b..e65bcd77e03 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56b3db3d5b0c8a70c274c96b3eb783737d72c95c997b4b763b8e7ab01a15efc5 -size 854436 +oid sha256:f19ac5b01a02e566ca260dc9a09f73ed19fe435050be1a1545a2d8c2c62243fa +size 934484 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png index 18f0b8d13fc..4e49f0b545b 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f208f05ae1aa3e1f0f6c8469ec793a3ba94c7b63a9899c33dd07e89a163c42eb -size 849149 +oid sha256:986160964c1945d56eaa52c7cf8e614cd3823605a9e1a813f344abf3aebe2c64 +size 930660 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png index 877d1ac0161..95862fbc796 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01535c7bcd38962813fd5a729259ebeccee16ca927218b2733c065b822f7c257 -size 859377 +oid sha256:7606667dab60048c88e5f5143b080bc5b5c873f028261a7409d6ede584b4ee8a +size 940334 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png index e38677df509..426c56d8ab6 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb6c43987ac002ff26aed6f8e93b188a762b07fad4f980640ed921771aba8e8d -size 166306 +oid sha256:d531faa4da78b756b6fceef10a8c2d89a125f5207acc001632540ede867b1de9 +size 166207 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png index ae4216f35d8..b06d3cc3076 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51ed084c52283df0f46b1781196a2ce2bd4ffe25af19a923d309fdbd6b8ef088 -size 163012 +oid sha256:1e2f9ee9bf97ee67acd1e3375fd9f51f33b7cd87cc2b285232df34cf2199c03c +size 156024 diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png index 2b10e521d17..0fe184e64d1 100644 --- a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png +++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7aab13341fdc75a3328ae2f6be2fc033e412c3f7211d1575751759401884a331 -size 141440 +oid sha256:37a31ad63d7cfc5a46dfa9f2a016219965f2ed2c13d1191250b645d9adb2cb7e +size 134587 diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.js b/plugins/Marketplace/vue/dist/Marketplace.umd.js index fb648094477..27933e97125 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.js @@ -155,7 +155,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=5776cc38 var _hoisted_1 = { class: "row marketplaceActions", @@ -222,7 +222,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=5776cc38 // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); @@ -293,85 +293,113 @@ var _window = window, }); }, created: function created() { - function syncMaxHeight2(selector) { - if (!selector) { + var addCardClickHandler = function addCardClickHandler(selector) { + var $nodes = $(selector); + + if (!$nodes || !$nodes.length) { return; } + $nodes.each(function (index, node) { + var $card = $(node); + $card.off('click.cardClick'); + $card.on('click.cardClick', function (event) { + // check if the target is a link or is a descendant of a link + // to skip direct clicks on links within the card, we want those honoured + if ($(event.target).closest('a').length) { + return; + } + + var $titleLink = $card.find('a.card-title-link'); + + if ($titleLink) { + event.stopPropagation(); + $titleLink.trigger('click'); + } + }); + }); + }; + + var shrinkDescriptionIfMultilineTitle = Object(external_CoreHome_["debounce"])(function (selector) { 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 $card = $(node); + var $titleText = $card.find('.card-title'); + var $alertText = $card.find('.card-content-bottom .alert'); + var hasDownloads = $card.hasClass('card-with-downloads'); + var titleLines = 1; - var _$node$offset = $node.offset(), - top = _$node$offset.top; + if ($titleText.length) { + var elHeight = +$titleText.height(); + var lineHeight = +$titleText.css('line-height').replace('px', ''); - if (lastTop !== top) { - nodesToUpdate = []; - lastTop = top; - maxh3 = undefined; - maxMeta = undefined; - maxFooter = undefined; + if (lineHeight) { + var _Math$ceil; + + titleLines = (_Math$ceil = Math.ceil(elHeight / lineHeight)) !== null && _Math$ceil !== void 0 ? _Math$ceil : 1; + } } - nodesToUpdate.push($node); - var heightH3 = $node.find('h3').height(); - var heightMeta = $node.find('.metadata').height(); - var heightFooter = $node.find('.footer').height(); + var alertLines = 0; - if (!maxh3) { - maxh3 = heightH3; - } else if (maxh3 < heightH3) { - maxh3 = heightH3; - } + if ($alertText.length) { + var _elHeight = +$alertText.height(); - if (!maxMeta) { - maxMeta = heightMeta; - } else if (maxMeta < heightMeta) { - maxMeta = heightMeta; - } + var _lineHeight = +$alertText.css('line-height').replace('px', ''); - if (!maxFooter) { - maxFooter = heightFooter; - } else if (maxFooter < heightFooter) { - maxFooter = heightFooter; - } + if (_lineHeight) { + var _Math$ceil2; - $.each(nodesToUpdate, function (i, $nodeToUpdate) { - if (maxh3) { - $nodeToUpdate.find('h3').height("".concat(maxh3, "px")); + alertLines = (_Math$ceil2 = Math.ceil(_elHeight / _lineHeight)) !== null && _Math$ceil2 !== void 0 ? _Math$ceil2 : 1; } + } - if (maxMeta) { - $nodeToUpdate.find('.metadata').height("".concat(maxMeta, "px")); + var $cardDescription = $card.find('.card-description'); + + if ($cardDescription.length) { + var cardDescription = $cardDescription[0]; + var clampedLines = 0; // a bit convoluted logic, but this is what's been arrived at with a designer + // and via testing in browser + // + // a) visible downloads count + // -> clamp to 2 lines if title is 2 lines or more or alert is 2 lines or more + // or together are more than 3 lines + // -> clamp to 1 line if title is over 2 lines and alert is over 2 lines simultaneously + // b) no downloads count (i.e. a premium plugin) + // -> clamp to 2 lines if sum of lines for title and notification is over 4 + + if (hasDownloads) { + if (titleLines >= 2 || alertLines > 2 || titleLines + alertLines >= 4) { + clampedLines = 2; + } + + if (titleLines + alertLines >= 5) { + clampedLines = 1; + } + } else if (titleLines + alertLines >= 5) { + clampedLines = 2; } - if (maxFooter) { - $nodeToUpdate.find('.footer').height("".concat(maxFooter, "px")); + if (clampedLines) { + cardDescription.setAttribute('data-clamp', "".concat(clampedLines)); + } else { + cardDescription.removeAttribute('data-clamp'); } - }); + } }); - } - + }, 100); 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' + var cardSelector = '.marketplace .card-holder'; + addCardClickHandler(cardSelector); + shrinkDescriptionIfMultilineTitle(cardSelector); + $(window).resize(function () { + shrinkDescriptionIfMultilineTitle(cardSelector); }); - external_CoreHome_["Matomo"].helper.compileVueDirectives(descriptions); // have to recompile any vue directives - - syncMaxHeight2('.marketplace .plugin'); }); }, methods: { diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js index 8640a68b551..e5acd5ce1ff 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,"ManageLicenseKey",(function(){return ne})),n.d(t,"GetNewPlugins",(function(){return Oe})),n.d(t,"GetNewPluginsAdmin",(function(){return Le})),n.d(t,"GetPremiumFeatures",(function(){return $e})),n.d(t,"MissingReqsNotice",(function(){return Qe})),n.d(t,"OverviewIntro",(function(){return lt})),n.d(t,"SubscriptionOverview",(function(){return Pt})),n.d(t,"RichMenuButton",(function(){return xt})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var i=n("8bbf"),c={class:"row marketplaceActions",ref:"root"},r={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(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",c,[Object(i["createElementVNode"])("div",r,[Object(i["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(i["createElementVNode"])("div",o,[Object(i["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(i["openBlock"])(),Object(i["createElementBlock"])("div",s,[Object(i["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(i["createElementVNode"])("div",null,[Object(i["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(i["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,u)])):Object(i["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(i["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,i=[],c=0;t.each((function(e,t){var r=j(t),o=r.offset(),s=o.top;c!==s&&(i=[],c=s,n=void 0,l=void 0,a=void 0),i.push(r);var u=r.find("h3").height(),p=r.find(".metadata").height(),d=r.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=["innerHTML"],Y={class:"manage-license-key-input"},J={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},X=["value"],Z=["value"];function ee(e,t,n,l,a,c){var r=Object(i["resolveComponent"])("Field"),o=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveComponent"])("ActivityIndicator"),u=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createVNode"])(u,{"content-title":e.translate("Marketplace_LicenseKey"),class:"manage-license-key"},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",{class:"manage-license-key-intro",innerHTML:e.$sanitize(e.manageLicenseKeyIntro)},null,8,W),Object(i["createElementVNode"])("div",Y,[Object(i["createVNode"])(r,{uicontrol:"text",name:"license_key",modelValue:e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.licenseKey=t}),placeholder:e.licenseKeyPlaceholder,"full-width":!0},null,8,["modelValue","placeholder"])]),Object(i["createVNode"])(o,{onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),value:e.saveButtonText,disabled:!e.licenseKey||e.isUpdating,id:"submit_license_key"},null,8,["value","disabled"]),e.hasValidLicense?(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:0,id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),disabled:e.isUpdating,value:e.translate("General_Remove")},null,8,["disabled","value"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])]})),_:1},8,["content-title"]),Object(i["createElementVNode"])("div",J,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,X),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Z)],512)],64)}var te=Object(i["defineComponent"])({props:{hasValidLicenseKey:Boolean},components:{Field:m["Field"],ContentBlock:d["ContentBlock"],SaveButton:m["SaveButton"],ActivityIndicator:d["ActivityIndicator"]},data:function(){return{licenseKey:"",hasValidLicense:this.hasValidLicenseKey,isUpdating:!1}},methods:{updateLicenseKey:function(e,t,n){var l=this;d["NotificationsStore"].remove("ManageLicenseKeySuccess"),d["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(t){l.isUpdating=!1,t&&t.value&&(d["NotificationsStore"].show({id:"ManageLicenseKeySuccess",message:n,context:"success",type:"toast"}),l.hasValidLicense="deleteLicenseKey"!==e,l.licenseKey="")}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;d["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(d["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updateLicense:function(){this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(d["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{manageLicenseKeyIntro:function(){var e="?".concat(d["MatomoUrl"].stringify(Object.assign(Object.assign({},d["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"})));return Object(d["translate"])("Marketplace_ManageLicenseKeyIntro",''),"",Object(d["externalLink"])("https://shop.matomo.org/my-account"),"")},licenseKeyPlaceholder:function(){return this.hasValidLicense?Object(d["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(d["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasValidLicense?Object(d["translate"])("CoreUpdater_UpdateTitle"):Object(d["translate"])("Marketplace_ActivateLicenseKey")}}});te.render=ee;var ne=te,le={class:"getNewPlugins"},ae={class:"row"},ie={class:"pluginName"},ce=Object(i["createElementVNode"])("br",null,null,-1),re={key:0},oe=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),ue=[oe,se],pe={class:"widgetBody"},de=["href"];function me(e,t,n,l,a,c){var r=Object(i["resolveDirective"])("plugin-name");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",le,[Object(i["createElementVNode"])("div",ae,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugins,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(i["withDirectives"])(Object(i["createElementVNode"])("h3",ie,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.displayName),1)],512),[[r,{pluginName:t.name}]]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),ce,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[r,{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"}))}}});Re.render=He;var $e=Re;function Ge(e,t,n,l,a,c){return Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugin.missingRequirements||[],(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1)})),128)}var ze=Object(i["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement:function(e){return"php"===e?"PHP":"".concat(e[0].toUpperCase()).concat(e.substr(1))}}});ze.render=Ge;var Qe=ze,We={key:0},Ye={key:1},Je=["innerHTML"],Xe={key:2},Ze=["innerHTML"],et=["innerHTML"];function tt(e,t,n,l,a,c){var r=Object(i["resolveComponent"])("EnrichedHeadline"),o=Object(i["resolveComponent"])("LicenseKey"),s=Object(i["resolveComponent"])("UploadPluginDialog"),u=Object(i["resolveComponent"])("Marketplace"),p=Object(i["resolveDirective"])("content-intro");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(r,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]})),_:1},8,["feature-name"])]),Object(i["createElementVNode"])("p",null,[e.isSuperUser?e.showThemes?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ye,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewThemeText)},null,8,Je)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Xe,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewPluginText)},null,8,Ze)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",We,Object(i["toDisplayString"])(e.showThemes?e.translate("Marketplace_NotAllowedToBrowseMarketplaceThemes"):e.translate("Marketplace_NotAllowedToBrowseMarketplacePlugins")),1)),e.isSuperUser&&e.inReportingMenu?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:3,ref:"noticeRemoveMarketplaceFromMenu",innerHTML:e.$sanitize(e.noticeRemoveMarketplaceFromMenuText)},null,8,et)):Object(i["createCommentVNode"])("",!0)]),Object(i["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(i["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(i["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 nt=Object(i["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",'',"")}}});nt.render=tt;var lt=nt,at={key:0},it=["href"],ct=Object(i["createElementVNode"])("br",null,null,-1),rt=Object(i["createElementVNode"])("br",null,null,-1),ot=["innerHTML"],st=Object(i["createElementVNode"])("br",null,null,-1),ut={class:"subscriptionName"},pt=["href"],dt={key:1},mt={class:"subscriptionType"},bt=["title"],Ot={key:0,class:"icon-error"},jt={key:1,class:"icon-warning"},gt={key:2,class:"icon-ok"},yt=["title"],vt=Object(i["createElementVNode"])("span",{class:"icon-error"},null,-1),ft={key:0},kt={colspan:"6"},ht={class:"tableActionBar"},Nt=["href"],Vt=Object(i["createElementVNode"])("span",{class:"icon-table"},null,-1),Mt={key:1},Et=["innerHTML"];function St(e,t,n,l,a,c){var r=Object(i["resolveComponent"])("ContentBlock"),o=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createBlock"])(r,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(i["withCtx"])((function(){return[e.hasLicenseKey?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",at,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(i["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,it)):Object(i["createCommentVNode"])("",!0),ct,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),rt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers","".concat(e.numUsers,"")))},null,8,ot)]),st,Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.subscriptions||[],(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",ut,[t.plugin.htmlUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(i["toDisplayString"])(t.plugin.displayName),9,pt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",dt,Object(i["toDisplayString"])(t.plugin.displayName),1))]),Object(i["createElementVNode"])("td",mt,Object(i["toDisplayString"])(t.productType),1),Object(i["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",jt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",gt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ot)),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:3,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[vt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,yt)):Object(i["createCommentVNode"])("",!0)],8,bt),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.start),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.nextPayment),1)])})),128)),e.subscriptions.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",ft,[Object(i["createElementVNode"])("td",kt,Object(i["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])],512),[[o]]),Object(i["createElementVNode"])("div",ht,[Object(i["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[Vt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,Nt)])])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Mt,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,Et)]))]})),_:1},8,["content-title"])}var Bt=Object(i["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",''),"")}}});Bt.render=St;var Pt=Bt,Lt={class:"richMarketplaceMenuButton"},wt=Object(i["createElementVNode"])("hr",null,null,-1),Tt={class:"intro"},_t={class:"cta"},Ct=Object(i["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function Ut(e,t,n,l,a,c){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Lt,[wt,Object(i["createElementVNode"])("p",Tt,Object(i["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(i["createElementVNode"])("p",_t,[Object(i["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(i["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(i["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},[Ct,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var At=Object(i["defineComponent"])({});At.render=Ut;var xt=At; +(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,"ManageLicenseKey",(function(){return ne})),n.d(t,"GetNewPlugins",(function(){return Oe})),n.d(t,"GetNewPluginsAdmin",(function(){return Le})),n.d(t,"GetPremiumFeatures",(function(){return $e})),n.d(t,"MissingReqsNotice",(function(){return Qe})),n.d(t,"OverviewIntro",(function(){return lt})),n.d(t,"SubscriptionOverview",(function(){return Pt})),n.d(t,"RichMenuButton",(function(){return xt})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var c=n("8bbf"),i={class:"row marketplaceActions",ref:"root"},r={class:"col s12 m6 l4"},o={class:"col s12 m6 l4"},s={key:0,class:"col s12 m12 l4 "},u=["action"];function d(e,t,n,l,a,d){var p,m=Object(c["resolveComponent"])("Field");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",i,[Object(c["createElementVNode"])("div",r,[Object(c["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(c["createElementVNode"])("div",o,[Object(c["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===(p=e.pluginsToShow)||void 0===p?void 0:p.length)>20||e.query?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",s,[Object(c["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(c["createElementVNode"])("div",null,[Object(c["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(c["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,u)])):Object(c["createCommentVNode"])("",!0)],512)}var p=n("19dc"),m=n("a5a2"),b=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},O=window,j=O.$,g=Object(c["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(){p["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){p["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},created:function(){var e=function(e){var t=j(e);t&&t.length&&t.each((function(e,t){var n=j(t);n.off("click.cardClick"),n.on("click.cardClick",(function(e){if(!j(e.target).closest("a").length){var t=n.find("a.card-title-link");t&&(e.stopPropagation(),t.trigger("click"))}}))}))},t=Object(p["debounce"])((function(e){var t=j(e);t&&t.length&&t.each((function(e,t){var n=j(t),l=n.find(".card-title"),a=n.find(".card-content-bottom .alert"),c=n.hasClass("card-with-downloads"),i=1;if(l.length){var r,o=+l.height(),s=+l.css("line-height").replace("px","");if(s)i=null!==(r=Math.ceil(o/s))&&void 0!==r?r:1}var u=0;if(a.length){var d,p=+a.height(),m=+a.css("line-height").replace("px","");if(m)u=null!==(d=Math.ceil(p/m))&&void 0!==d?d:1}var b=n.find(".card-description");if(b.length){var O=b[0],g=0;c?((i>=2||u>2||i+u>=4)&&(g=2),i+u>=5&&(g=1)):i+u>=5&&(g=2),g?O.setAttribute("data-clamp","".concat(g)):O.removeAttribute("data-clamp")}}))}),100);Object(c["nextTick"])((function(){var n=".marketplace .card-holder";e(n),t(n),j(window).resize((function(){t(n)}))}))},methods:{changePluginSort:function(){p["MatomoUrl"].updateUrl(Object.assign(Object.assign({},p["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},p["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){p["MatomoUrl"].updateUrl(Object.assign(Object.assign({},p["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},p["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(p["MatomoUrl"].stringify(Object.assign(Object.assign({},p["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(p["MatomoUrl"].stringify(Object.assign(Object.assign({},p["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=b(Object(p["translate"])("General_Plugins"));return"".concat(Object(p["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});g.render=d;var y=g,v={class:"marketplace-max-width"},f={class:"marketplace-paid-intro"},k={key:0},h={key:0},N=Object(c["createElementVNode"])("br",null,null,-1),V={class:"licenseToolbar valign-wrapper"},M=["href"],E={key:0},S={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},B=Object(c["createElementVNode"])("br",null,null,-1),P=Object(c["createElementVNode"])("br",null,null,-1),L=["data-href","value"],w=["value"],T={key:1},_={key:0},C=["innerHTML"],U=Object(c["createElementVNode"])("br",null,null,-1),A={class:"licenseToolbar valign-wrapper"},x={key:1},D=["innerHTML"],K={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},q=["value"],I=["value"];function F(e,t,n,l,a,i){var r=Object(c["resolveComponent"])("DefaultLicenseKeyFields"),o=Object(c["resolveComponent"])("SaveButton"),s=Object(c["resolveComponent"])("ActivityIndicator");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",v,[Object(c["createElementVNode"])("div",f,[e.isValidConsumer?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",k,[e.isSuperUser?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",h,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),N,Object(c["createElementVNode"])("div",V,[Object(c["createVNode"])(r,{"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(c["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(c["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(c["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,M),e.showInstallAllPaidPlugins?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",E,[Object(c["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(c["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(c["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(c["createElementVNode"])("div",S,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),B,P]),Object(c["createElementVNode"])("ul",null,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(c["openBlock"])(),Object(c["createElementBlock"])("li",{key:e},Object(c["toDisplayString"])(e),1)})),128))]),Object(c["createElementVNode"])("p",null,[Object(c["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,L),Object(c["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,w)])],512)])):Object(c["createCommentVNode"])("",!0)]),Object(c["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])])):Object(c["createCommentVNode"])("",!0)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",T,[e.isSuperUser?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",_,[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,C),U,Object(c["createElementVNode"])("div",A,[Object(c["createVNode"])(r,{"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(c["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",x,[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,D)]))]))]),Object(c["createElementVNode"])("div",K,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(c["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,q),Object(c["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,I)],512)])}var H={class:"valign licenseKeyText"};function R(e,t,n,l,a,i){var r=Object(c["resolveComponent"])("Field"),o=Object(c["resolveComponent"])("SaveButton");return Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],null,[Object(c["createElementVNode"])("div",H,[Object(c["createVNode"])(r,{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(c["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 $=Object(c["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:m["Field"],SaveButton:m["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(p["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(p["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(p["translate"])("CoreUpdater_UpdateTitle"):Object(p["translate"])("Marketplace_ActivateLicenseKey")}}});$.render=R;var G=$,z=Object(c["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:m["SaveButton"],ActivityIndicator:p["ActivityIndicator"],DefaultLicenseKeyFields:G},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){p["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;p["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(p["NotificationsStore"].show({message:n,context:"success",type:"transient"}),p["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;p["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(p["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(p["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(p["MatomoUrl"].stringify(Object.assign(Object.assign({},p["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(p["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",Object(p["externalLink"])("https://matomo.org/recommends/premium-plugins/"),"")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(p["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",Object(p["externalLink"])("https://matomo.org/recommends/premium-plugins/"),"")},installAllPaidPluginsLink:function(){return"?".concat(p["MatomoUrl"].stringify(Object.assign(Object.assign({},p["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=["innerHTML"],Y={class:"manage-license-key-input"},J={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},X=["value"],Z=["value"];function ee(e,t,n,l,a,i){var r=Object(c["resolveComponent"])("Field"),o=Object(c["resolveComponent"])("SaveButton"),s=Object(c["resolveComponent"])("ActivityIndicator"),u=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],null,[Object(c["createVNode"])(u,{"content-title":e.translate("Marketplace_LicenseKey"),class:"manage-license-key"},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",{class:"manage-license-key-intro",innerHTML:e.$sanitize(e.manageLicenseKeyIntro)},null,8,W),Object(c["createElementVNode"])("div",Y,[Object(c["createVNode"])(r,{uicontrol:"text",name:"license_key",modelValue:e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.licenseKey=t}),placeholder:e.licenseKeyPlaceholder,"full-width":!0},null,8,["modelValue","placeholder"])]),Object(c["createVNode"])(o,{onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),value:e.saveButtonText,disabled:!e.licenseKey||e.isUpdating,id:"submit_license_key"},null,8,["value","disabled"]),e.hasValidLicense?(Object(c["openBlock"])(),Object(c["createBlock"])(o,{key:0,id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),disabled:e.isUpdating,value:e.translate("General_Remove")},null,8,["disabled","value"])):Object(c["createCommentVNode"])("",!0),Object(c["createVNode"])(s,{loading:e.isUpdating},null,8,["loading"])]})),_:1},8,["content-title"]),Object(c["createElementVNode"])("div",J,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(c["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,X),Object(c["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Z)],512)],64)}var te=Object(c["defineComponent"])({props:{hasValidLicenseKey:Boolean},components:{Field:m["Field"],ContentBlock:p["ContentBlock"],SaveButton:m["SaveButton"],ActivityIndicator:p["ActivityIndicator"]},data:function(){return{licenseKey:"",hasValidLicense:this.hasValidLicenseKey,isUpdating:!1}},methods:{updateLicenseKey:function(e,t,n){var l=this;p["NotificationsStore"].remove("ManageLicenseKeySuccess"),p["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(t){l.isUpdating=!1,t&&t.value&&(p["NotificationsStore"].show({id:"ManageLicenseKeySuccess",message:n,context:"success",type:"toast"}),l.hasValidLicense="deleteLicenseKey"!==e,l.licenseKey="")}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;p["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(p["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updateLicense:function(){this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(p["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{manageLicenseKeyIntro:function(){var e="?".concat(p["MatomoUrl"].stringify(Object.assign(Object.assign({},p["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"})));return Object(p["translate"])("Marketplace_ManageLicenseKeyIntro",''),"",Object(p["externalLink"])("https://shop.matomo.org/my-account"),"")},licenseKeyPlaceholder:function(){return this.hasValidLicense?Object(p["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(p["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasValidLicense?Object(p["translate"])("CoreUpdater_UpdateTitle"):Object(p["translate"])("Marketplace_ActivateLicenseKey")}}});te.render=ee;var ne=te,le={class:"getNewPlugins"},ae={class:"row"},ce={class:"pluginName"},ie=Object(c["createElementVNode"])("br",null,null,-1),re={key:0},oe=Object(c["createElementVNode"])("br",null,null,-1),se=Object(c["createElementVNode"])("br",null,null,-1),ue=[oe,se],de={class:"widgetBody"},pe=["href"];function me(e,t,n,l,a,i){var r=Object(c["resolveDirective"])("plugin-name");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",le,[Object(c["createElementVNode"])("div",ae,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.plugins,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(c["withDirectives"])(Object(c["createElementVNode"])("h3",ce,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(t.displayName),1)],512),[[r,{pluginName:t.name}]]),Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(t.description)+" ",1),ie,Object(c["withDirectives"])(Object(c["createElementVNode"])("a",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[r,{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(p["MatomoUrl"].stringify({module:"Marketplace",action:"overview",show:"premium"}))}}});Re.render=He;var $e=Re;function Ge(e,t,n,l,a,i){return Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.plugin.missingRequirements||[],(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(c["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1)})),128)}var ze=Object(c["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement:function(e){return"php"===e?"PHP":"".concat(e[0].toUpperCase()).concat(e.substr(1))}}});ze.render=Ge;var Qe=ze,We={key:0},Ye={key:1},Je=["innerHTML"],Xe={key:2},Ze=["innerHTML"],et=["innerHTML"];function tt(e,t,n,l,a,i){var r=Object(c["resolveComponent"])("EnrichedHeadline"),o=Object(c["resolveComponent"])("LicenseKey"),s=Object(c["resolveComponent"])("UploadPluginDialog"),u=Object(c["resolveComponent"])("Marketplace"),d=Object(c["resolveDirective"])("content-intro");return Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[Object(c["createElementVNode"])("h2",null,[Object(c["createVNode"])(r,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(c["withCtx"])((function(){return[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]})),_:1},8,["feature-name"])]),Object(c["createElementVNode"])("p",null,[e.isSuperUser?e.showThemes?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",Ye,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewThemeText)},null,8,Je)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",Xe,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.installingNewPluginText)},null,8,Ze)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",We,Object(c["toDisplayString"])(e.showThemes?e.translate("Marketplace_NotAllowedToBrowseMarketplaceThemes"):e.translate("Marketplace_NotAllowedToBrowseMarketplacePlugins")),1)),e.isSuperUser&&e.inReportingMenu?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",{key:3,ref:"noticeRemoveMarketplaceFromMenu",innerHTML:e.$sanitize(e.noticeRemoveMarketplaceFromMenuText)},null,8,et)):Object(c["createCommentVNode"])("",!0)]),Object(c["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(c["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(c["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)),[[d]])}var nt=Object(c["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:p["EnrichedHeadline"],UploadPluginDialog:m["UploadPluginDialog"],LicenseKey:Q,Marketplace:y},directives:{ContentIntro:p["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(p["translate"])("Marketplace_InstallingNewThemesViaMarketplaceOrUpload",'',"")},installingNewPluginText:function(){return Object(p["translate"])("Marketplace_InstallingNewPluginsViaMarketplaceOrUpload",'',"")},noticeRemoveMarketplaceFromMenuText:function(){return Object(p["translate"])("Marketplace_NoticeRemoveMarketplaceFromReportingMenu",'',"")}}});nt.render=tt;var lt=nt,at={key:0},ct=["href"],it=Object(c["createElementVNode"])("br",null,null,-1),rt=Object(c["createElementVNode"])("br",null,null,-1),ot=["innerHTML"],st=Object(c["createElementVNode"])("br",null,null,-1),ut={class:"subscriptionName"},dt=["href"],pt={key:1},mt={class:"subscriptionType"},bt=["title"],Ot={key:0,class:"icon-error"},jt={key:1,class:"icon-warning"},gt={key:2,class:"icon-ok"},yt=["title"],vt=Object(c["createElementVNode"])("span",{class:"icon-error"},null,-1),ft={key:0},kt={colspan:"6"},ht={class:"tableActionBar"},Nt=["href"],Vt=Object(c["createElementVNode"])("span",{class:"icon-table"},null,-1),Mt={key:1},Et=["innerHTML"];function St(e,t,n,l,a,i){var r=Object(c["resolveComponent"])("ContentBlock"),o=Object(c["resolveDirective"])("content-table");return Object(c["openBlock"])(),Object(c["createBlock"])(r,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(c["withCtx"])((function(){return[e.hasLicenseKey?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",at,[Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(c["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,ct)):Object(c["createCommentVNode"])("",!0),it,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),rt,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers","".concat(e.numUsers,"")))},null,8,ot)]),st,Object(c["withDirectives"])(Object(c["createElementVNode"])("table",null,[Object(c["createElementVNode"])("thead",null,[Object(c["createElementVNode"])("tr",null,[Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("General_Name")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(c["createElementVNode"])("tbody",null,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.subscriptions||[],(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("tr",{key:n},[Object(c["createElementVNode"])("td",ut,[t.plugin.htmlUrl?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(c["toDisplayString"])(t.plugin.displayName),9,dt)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",pt,Object(c["toDisplayString"])(t.plugin.displayName),1))]),Object(c["createElementVNode"])("td",mt,Object(c["toDisplayString"])(t.productType),1),Object(c["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",jt)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",gt)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",Ot)),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",{key:3,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[vt,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,yt)):Object(c["createCommentVNode"])("",!0)],8,bt),Object(c["createElementVNode"])("td",null,Object(c["toDisplayString"])(t.start),1),Object(c["createElementVNode"])("td",null,Object(c["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(c["createElementVNode"])("td",null,Object(c["toDisplayString"])(t.nextPayment),1)])})),128)),e.subscriptions.length?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("tr",ft,[Object(c["createElementVNode"])("td",kt,Object(c["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])],512),[[o]]),Object(c["createElementVNode"])("div",ht,[Object(c["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[Vt,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,Nt)])])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Mt,[Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,Et)]))]})),_:1},8,["content-title"])}var Bt=Object(c["defineComponent"])({props:{loginUrl:{type:String,required:!0},numUsers:{type:Number,required:!0},hasLicenseKey:Boolean,subscriptions:{type:Array,required:!0}},components:{ContentBlock:p["ContentBlock"]},directives:{ContentTable:p["ContentTable"]},methods:{getSubscriptionStatusTitle:function(e){return e.isValid?e.isExpiredSoon?Object(p["translate"])("Marketplace_SubscriptionExpiresSoon"):void 0:Object(p["translate"])("Marketplace_SubscriptionInvalid")}},computed:{marketplaceOverviewLink:function(){return"?".concat(p["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}))},missingLicenseText:function(){return Object(p["translate"])("Marketplace_OverviewPluginSubscriptionsMissingLicense",''),"")}}});Bt.render=St;var Pt=Bt,Lt={class:"richMarketplaceMenuButton"},wt=Object(c["createElementVNode"])("hr",null,null,-1),Tt={class:"intro"},_t={class:"cta"},Ct=Object(c["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function Ut(e,t,n,l,a,i){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Lt,[wt,Object(c["createElementVNode"])("p",Tt,Object(c["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(c["createElementVNode"])("p",_t,[Object(c["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(c["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(c["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},[Ct,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var At=Object(c["defineComponent"])({});At.render=Ut;var xt=At; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue index de3b168ee94..4ad89d1e87c 100644 --- a/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue +++ b/plugins/Marketplace/vue/src/Marketplace/Marketplace.vue @@ -59,7 +59,9 @@