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 00000000000..82fdc15bce1
Binary files /dev/null and b/plugins/Marketplace/images/matomo-badge.png differ
diff --git a/plugins/Marketplace/images/previews/generic-plugin.png b/plugins/Marketplace/images/previews/generic-plugin.png
new file mode 100644
index 00000000000..22ec6d0eb83
Binary files /dev/null and b/plugins/Marketplace/images/previews/generic-plugin.png differ
diff --git a/plugins/Marketplace/images/previews/matomo-plugin.png b/plugins/Marketplace/images/previews/matomo-plugin.png
new file mode 100644
index 00000000000..f723b131b73
Binary files /dev/null and b/plugins/Marketplace/images/previews/matomo-plugin.png differ
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 %}{% 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.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 @@