Create custom reports from 163 metrics that span the entire visitor experience, from your pages to your forms, checkout, and content consumption.
+Slice your metrics with 94 dimensions to make your analysis as in-depth and granular as you wish.
+
diff --git a/Dockerfile b/Dockerfile
index df603e7..2ec3eb1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM matomo:5.3.2
+FROM matomo:5.4.0
# checkov:skip=CKV_DOCKER_2:Skipping HEALTHCHECK configuration for now
# checkov:skip=CKV_DOCKER_3:The container actually runs as www-data user
@@ -17,6 +17,9 @@ COPY ./files/plugin-UsersFlow-5.0.5/ /var/www/html/plugins/UsersFlow
# Add the SearchEngineKeywordsPerformance plugin
COPY ./files/plugin-SearchEngineKeywordsPerformance-5.0.22/ /var/www/html/plugins/SearchEngineKeywordsPerformance
+# Add the CustomReports plugin
+COPY ./files/plugin-CustomReports-5.4.3/ /var/www/html/plugins/CustomReports
+
# Our custom configuration settings.
COPY ./files/config.ini.php /var/www/html/config/config.ini.php
diff --git a/docs/HowTos/HOWTO-premium-plugins.md b/docs/HowTos/HOWTO-premium-plugins.md
index 5be77ac..5ea4d58 100644
--- a/docs/HowTos/HOWTO-premium-plugins.md
+++ b/docs/HowTos/HOWTO-premium-plugins.md
@@ -18,11 +18,11 @@ The `config.ini.php` file has two lists of plugins under two different headings.
In the end, the premium plugin installation is a two-pass process.
-## Process
+## Process to Install New Premium Plugin
### High level overview
-1. Install license key (via UI or CLI) so that it is in the database (this apparently only needs to be done once as all future premium plugins get linked to the same license key).
+1. Install license key (via UI or CLI) so that it is in the database (this only needs to be done once as all future premium plugins get linked to the same license key).
2. Go through a dev -> stage -> prod deployment cycle of the container to install the plugin folder(s) into the container
3. Activate the new plugin(s) (via UI or CLI) so that any database changes are properly executed.
4. Go through a dev -> stage -> prod deployment cycle of the container to match the updated `config.ini.php` file on the server.
@@ -41,8 +41,14 @@ According to the support team at Matomo, the premium license key can be installe
This needs to be done once on each of the stage & prod instances of Matomo.
+**Note**: It is possible to add the license key to the Dev1 instance of Matomo for a short period of time for testing a new premium plugin without breaking either the Stage or Prod instances of Matomo. This is useful for the initial test of a new premium plugin.
+
#### 2. Install the plugin files
+First, download the plugin source files from shop.matomo.org (use the username/password in the "Matomo Plugins" secret in LastPass to log in). Once the .zip files are downloaded, expand them and save them in the `files/` folder in this repository.
+
+Second, update the [Dockerfile](../../Dockerfile) with a new `COPY` command to copy the the plugin files to the correct directory in the image.
+
In this phase, the files are installed in the container **but** no changes are made to the `config.ini.php` file. This will **not** activate the plugins, it will just make them visible in the UI.
**Note**: It is possible to do this with the `/var/www/html/console` utility when logged in to the cli of the running conatiner. However, that method introduces potential file permission errors since the command is run as `root` and the content in the `/var/www/html` folder needs to be owned by `www-data`.
@@ -62,3 +68,7 @@ It's also important to note that this `plugin:activate` command very likely make
#### 4. Backfill this repo
Update the `config.ini.php` file in this repo and go through another dev -> stage -> prod deployment to ensure that the repo code matches the container running in AWS.
+
+## Process to Upgrade Existing Premium Plugin
+
+See the [HOWTO-matomo-upgrade](./HOWTO-matomo-upgrade.md) documentation. Premium plug updates are the same as regular plugin updates.
diff --git a/files/plugin-CustomReports-5.4.3/API.php b/files/plugin-CustomReports-5.4.3/API.php
new file mode 100644
index 0000000..059fc2a
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/API.php
@@ -0,0 +1,852 @@
+Custom Reports API lets you 1) create custom
+ * reports within Matomo and 2) view the created reports in the Matomo Reporting UI or consume them via the API.
+ *
+ * You can choose between different visualizations (eg table or evolution graph) and combine hundreds of dimensions
+ * and metrics to get the data you need.
+ *
+ * @method static \Piwik\Plugins\CustomReports\API getInstance()
+ */
+class API extends \Piwik\Plugin\API
+{
+ /**
+ * @var MetricsList
+ */
+ private $metricsList;
+
+ /**
+ * @var DimensionsProvider
+ */
+ private $columnsProvider;
+
+ /**
+ * @var CustomReportsModel
+ */
+ private $model;
+
+ /**
+ * @var Validator
+ */
+ private $validator;
+
+ /**
+ * @var LogTablesProvider
+ */
+ private $logTablesProvider;
+
+ /**
+ * @var Configuration
+ */
+ private $configuration;
+
+ /**
+ * @var ArchiveInvalidator
+ */
+ private $archiveInvalidator;
+
+ public function __construct(
+ CustomReportsModel $model,
+ Validator $validator,
+ DimensionsProvider $columnsProvider,
+ LogTablesProvider $logTablesProvider,
+ Configuration $configuration,
+ ArchiveInvalidator $archiveInvalidator
+ ) {
+ $this->metricsList = MetricsList::get();
+ $this->columnsProvider = $columnsProvider;
+ $this->model = $model;
+ $this->validator = $validator;
+ $this->logTablesProvider = $logTablesProvider;
+ $this->configuration = $configuration;
+ $this->archiveInvalidator = $archiveInvalidator;
+ }
+
+ /**
+ * Adds a new custom report
+ * @param int $idSite
+ * @param string $name The name of the report.
+ * @param string $reportType The type of report you want to create, for example 'table' or 'evolution'.
+ * For a list of available reports call 'CustomReports.getAvailableReportTypes'
+ * @param string[] $metricIds A list of metric IDs. For a list of available metrics call 'CustomReports.getAvailableMetrics'
+ * @param string $categoryId By default, the report will be put into a custom report category unless a specific
+ * categoryId is provided. For a list of available categories call 'CustomReports.getAvailableCategories'.
+ * @param string[] $dimensionIds A list of dimension IDs. For a list of available metrics call 'CustomReports.getAvailableDimensions'
+ * @param bool|string $subcategoryId By default, a new reporting page will be created for this report unless you
+ * specifiy a specific name or subcategoryID. For a list of available subcategories
+ * call 'CustomReports.getAvailableCategories'.
+ * @param string $description An optional description for the report, will be shown in the title help icon of the report.
+ * @param string $segmentFilter An optional segment to filter the report data. Needs to be sent urlencoded.
+ * @param string[] $multipleIdSites An optional list of idsites for which we need to execute the report
+ * @return int
+ */
+ public function addCustomReport($idSite, $name, $reportType, $metricIds, $categoryId = false, $dimensionIds = array(), $subcategoryId = false, $description = '', $segmentFilter = '', $multipleIdSites = [])
+ {
+ if (!empty($multipleIdSites) && $idSite != 'all' && $idSite != '0') {
+ $multipleIdSites = array_unique($multipleIdSites);
+ foreach ($multipleIdSites as $multipleIdSite) {
+ $this->validator->checkWritePermission($multipleIdSite);
+ }
+ if (!in_array($idSite, $multipleIdSites)) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorInvalidMultipleIdSite', [$idSite]));
+ }
+ } else {
+ $this->validator->checkWritePermission($idSite);
+ // prevent creating reports for sites that do not yet exist but might in the future
+ $this->validator->checkSiteExists($idSite);
+ }
+
+ if (empty($categoryId)) {
+ $categoryId = CustomReportsDao::DEFAULT_CATEGORY;
+ }
+
+ $createdDate = Date::now()->getDatetime();
+ if (!empty($segmentFilter)) {
+ $segmentFilter = Common::unsanitizeInputValue($segmentFilter);
+ $segmentFilter = urldecode($segmentFilter);
+ }
+
+ // If there's a Product Revenue metric without a Product Quantity metric, throw an exception
+ if (
+ (in_array('sum_product_revenue', $metricIds) || in_array('avg_product_revenue', $metricIds))
+ && !in_array('sum_ecommerce_productquantity', $metricIds)
+ && !in_array('avg_ecommerce_productquantity', $metricIds)
+ ) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorProductRevenueMetricDependency'));
+ }
+
+ $idReport = $this->model->createCustomReport($idSite, $name, $description, $reportType, $dimensionIds, $metricIds, $segmentFilter, $categoryId, $subcategoryId, $createdDate, $multipleIdSites);
+ $report = $this->model->getCustomReportById($idReport, $idSite);
+
+ $config = StaticContainer::get(Configuration::class);
+ $startDate = null;
+ $subMonth = $config->getReArchiveReportsInPastLastNMonths();
+ if (!empty($subMonth)) {
+ $startDate = Date::yesterday()->subMonth($subMonth)->setDay(1);
+ }
+
+ $this->archiveInvalidator->scheduleReArchiving(
+ $idSite === 0 || $idSite === '0' || $idSite == 'all' ? 'all' : (!empty($multipleIdSites) ? $multipleIdSites : [$idSite]),
+ 'CustomReports',
+ Archiver::makeRecordName($idReport, $report['revision'] ?? '0'),
+ $startDate
+ );
+
+ $this->clearCache();
+ return $idReport;
+ }
+
+ private function clearCache()
+ {
+ // we need to delete possibly cached values. especially ReportsProvider
+ try {
+ Cache::getLazyCache()->flushAll();
+ } catch (\Exception $e) {
+ }
+ // we need to delete possibly cached values. especially ReportsProvider
+ try {
+ Cache::getEagerCache()->flushAll();
+ } catch (\Exception $e) {
+ }
+ // we need to delete possibly cached values. especially ReportsProvider
+ try {
+ Cache::getTransientCache()->flushAll();
+ } catch (\Exception $e) {
+ }
+ }
+
+ /**
+ * Updates an existing custom report. Be aware that if you change metrics, dimensions, the report type or the segment filter,
+ * previously processed/archived reports may become unavailable and would need to be re-processed.
+ *
+ * @param int $idSite
+ * @param int $idCustomReport
+ * @param string $name The name of the report.
+ * @param string $reportType The type of report you want to create, for example 'table' or 'evolution'.
+ * For a list of available reports call 'CustomReports.getAvailableReportTypes'
+ * @param string[] $metricIds A list of metric IDs. For a list of available metrics call 'CustomReports.getAvailableMetrics'
+ * @param string $categoryId By default, the report will be put into a custom report category unless a specific
+ * categoryId is provided. For a list of available categories call 'CustomReports.getAvailableCategories'.
+ * @param string[] $dimensionIds A list of dimension IDs. For a list of available metrics call 'CustomReports.getAvailableDimensions'
+ * @param bool|string $subcategoryId By default, a new reporting page will be created for this report unless you
+ * specifiy a specific name or subcategoryID. For a list of available subcategories
+ * call 'CustomReports.getAvailableCategories'.
+ * @param string $description An optional description for the report, will be shown in the title help icon of the report.
+ * @param string $segmentFilter An optional segment to filter the report data. Needs to be sent urlencoded.
+ * @param int[] $subCategoryReportIds List of sub report ids mapped to this report
+ * @param string[] $multipleIdSites An optional list of idsites for which we need to execute the report
+ */
+ public function updateCustomReport(
+ $idSite,
+ $idCustomReport,
+ $name,
+ $reportType,
+ $metricIds,
+ $categoryId = false,
+ $dimensionIds = array(),
+ $subcategoryId = false,
+ $description = '',
+ $segmentFilter = '',
+ $subCategoryReportIds = [],
+ $multipleIdSites = []
+ ) {
+ if (!empty($multipleIdSites) && $idSite != 'all' && $idSite != '0') {
+ $multipleIdSites = array_unique($multipleIdSites);
+ foreach ($multipleIdSites as $multipleIdSite) {
+ $this->validator->checkWritePermission($multipleIdSite);
+ }
+ if (!in_array($idSite, $multipleIdSites)) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorInvalidMultipleIdSite', [$idSite]));
+ }
+ } else {
+ $this->validator->checkWritePermission($idSite);
+ // prevent creating reports for sites that do not yet exist but might in the future
+ $this->validator->checkSiteExists($idSite);
+ }
+
+ // we cannot get report by idSite, idCustomReport since the idSite may change!
+ $report = $this->model->getCustomReportById($idCustomReport, $idSite);
+
+ if (empty($report)) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorReportDoesNotExist'));
+ }
+
+ if ($report['idsite'] != $idSite && empty($multipleIdSites)) {
+ // if the site changes for a report, make sure the user write permission for the old and the new site
+ $this->validator->checkWritePermission($report['idsite']);
+ }
+
+ if (empty($categoryId)) {
+ $categoryId = CustomReportsDao::DEFAULT_CATEGORY;
+ }
+
+ if (!empty($segmentFilter)) {
+ $segmentFilter = Common::unsanitizeInputValue($segmentFilter);
+ $segmentFilter = urldecode($segmentFilter);
+ }
+
+ $updatedDate = Date::now()->getDatetime();
+
+ $shouldReArchive = false;
+ if (
+ (
+ isset($report['report_type']) &&
+ $report['report_type'] != $reportType
+ ) ||
+ (
+ isset($report['dimensions']) &&
+ $report['dimensions'] != $dimensionIds
+ ) ||
+ (
+ isset($report['metrics']) &&
+ $report['metrics'] != $metricIds
+ ) ||
+ (
+ isset($report['segment_filter']) &&
+ $report['segment_filter'] != $segmentFilter
+ )
+ ) {
+ $shouldReArchive = true;
+ }
+
+ // If there's a Product Revenue metric without a Product Quantity metric, throw an exception
+ if (
+ (in_array('sum_product_revenue', $metricIds) || in_array('avg_product_revenue', $metricIds))
+ && !in_array('sum_ecommerce_productquantity', $metricIds)
+ && !in_array('avg_ecommerce_productquantity', $metricIds)
+ ) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorProductRevenueMetricDependency'));
+ }
+
+ $this->model->updateCustomReport($idSite, $idCustomReport, $name, $description, $reportType, $dimensionIds, $metricIds, $segmentFilter, $categoryId, $subcategoryId, $updatedDate, $subCategoryReportIds, $multipleIdSites);
+
+ if ($shouldReArchive) {
+ $updatedReport = $this->model->getCustomReportById($idCustomReport, $idSite);
+ $config = StaticContainer::get(Configuration::class);
+ $startDate = null;
+ $subMonth = $config->getReArchiveReportsInPastLastNMonths();
+ if (!empty($subMonth)) {
+ $startDate = Date::yesterday()->subMonth($subMonth)->setDay(1);
+ }
+
+ $this->archiveInvalidator->scheduleReArchiving(
+ $idSite === 0 || $idSite === '0' || $idSite == 'all' ? 'all' : (!empty($multipleIdSites) ? $multipleIdSites : [$idSite]),
+ 'CustomReports',
+ Archiver::makeRecordName($idCustomReport, $updatedReport['revision']),
+ $startDate
+ );
+ }
+
+ $this->clearCache();
+ }
+
+ /**
+ * Get all custom report configurations for a specific site.
+ *
+ * @param int $idSite
+ * @param bool $skipCategoryMetadata
+ * @return array
+ */
+ public function getConfiguredReports($idSite, $skipCategoryMetadata = false)
+ {
+ $this->validator->checkReportViewPermission($idSite);
+ $this->validator->checkSiteExists($idSite);
+
+ if ($idSite === 'all') {
+ $idSite = 0;
+ }
+
+ $reports = $this->model->getAllCustomReportsForSite($idSite, $skipCategoryMetadata == '1');
+ usort($reports, function ($a, $b) {
+ if ($a['idcustomreport'] > $b['idcustomreport']) {
+ return 1; // no need to check for === because two reports won't have same ID
+ }
+ return -1;
+ });
+
+ foreach ($reports as &$report) {
+ $this->addAllowedToEditStatus($report);
+ }
+
+ return $reports;
+ }
+
+ /**
+ * Get a specific custom report configuration.
+ *
+ * @param int $idSite
+ * @param int $idCustomReport
+ * @return array
+ */
+ public function getConfiguredReport($idSite, $idCustomReport)
+ {
+ $this->validator->checkReportViewPermission($idSite);
+ $this->validator->checkSiteExists($idSite);
+
+ if ($idSite === 'all') {
+ $idSite = 0;
+ }
+
+ $this->model->checkReportExists($idSite, $idCustomReport);
+
+ $report = $this->model->getCustomReport($idSite, $idCustomReport);
+ $this->addAllowedToEditStatus($report);
+
+ return $report;
+ }
+
+ /**
+ * Deletes the given custom report.
+ *
+ * When a custom report is deleted, its report will be no longer available in the API and tracked data for this
+ * report might be removed at some point by the system.
+ *
+ * @param int $idSite
+ * @param int $idForm
+ */
+ public function deleteCustomReport($idSite, $idCustomReport)
+ {
+ $this->validator->checkWritePermission($idSite);
+
+ if ($idSite === 'all') {
+ $idSite = 0;
+ }
+
+ $report = $this->getCustomReportInfo($idSite, $idCustomReport, 'Delete');
+
+ $multipleIDSites = $report['multiple_idsites'] ? explode(',', $report['multiple_idsites']) : [];
+ if ($multipleIDSites) {
+ foreach ($multipleIDSites as $multipleIdSite) {
+ $this->validator->checkWritePermission($multipleIdSite);
+ }
+ }
+ $this->archiveInvalidator->removeInvalidationsSafely(
+ $multipleIDSites ? $multipleIDSites : [$idSite],
+ 'CustomReports',
+ Archiver::makeRecordName($idCustomReport, $report['revision'])
+ );
+
+ $this->model->deactivateReport($multipleIDSites ? -1 : $idSite, $idCustomReport, $report['name']);
+ Piwik::postEvent('CustomReports.deleteCustomReport.end', array($idSite, $idCustomReport));
+ $this->clearCache();
+ }
+
+ /**
+ * Pauses the given custom report.
+ *
+ * When a custom report is paused, its report will be no longer be archived
+ *
+ * @param int $idSite
+ * @param int $idForm
+ */
+ public function pauseCustomReport($idSite, $idCustomReport)
+ {
+ $this->validator->checkWritePermission($idSite);
+
+ if ($idSite === 'all') {
+ $idSite = 0;
+ }
+
+ $report = $this->getCustomReportInfo($idSite, $idCustomReport, 'Pause');
+
+ $multipleIDSites = $report['multiple_idsites'] ? explode(',', $report['multiple_idsites']) : [];
+ if ($multipleIDSites) {
+ foreach ($multipleIDSites as $multipleIdSite) {
+ $this->validator->checkWritePermission($multipleIdSite);
+ }
+ }
+ $this->archiveInvalidator->removeInvalidationsSafely(
+ $multipleIDSites ? $multipleIDSites : [$idSite],
+ 'CustomReports',
+ Archiver::makeRecordName($idCustomReport, $report['revision'])
+ );
+
+ $this->model->pauseReport($multipleIDSites ? -1 : $idSite, $idCustomReport, $report['name']);
+ $this->clearCache();
+ }
+
+ /**
+ * Resumes the given custom report.
+ *
+ * When a custom report is resumed, its report will start archiving again
+ *
+ * @param int $idSite
+ * @param int $idForm
+ */
+ public function resumeCustomReport($idSite, $idCustomReport)
+ {
+ $this->validator->checkWritePermission($idSite);
+
+ if ($idSite === 'all') {
+ $idSite = 0;
+ }
+
+ $report = $this->getCustomReportInfo($idSite, $idCustomReport, 'Resume');
+
+ $multipleIDSites = $report['multiple_idsites'] ? explode(',', $report['multiple_idsites']) : [];
+ if ($multipleIDSites) {
+ foreach ($multipleIDSites as $multipleIdSite) {
+ $this->validator->checkWritePermission($multipleIdSite);
+ }
+ }
+
+ $this->model->resumeReport($multipleIDSites ? -1 : $idSite, $idCustomReport, $report['name']);
+ $this->clearCache();
+ }
+
+ /**
+ * Get a list of available categories that can be used in custom reports.
+ *
+ * @param int $idSite
+ * @return array
+ */
+ public function getAvailableCategories($idSite)
+ {
+ $this->validator->checkReportViewPermission($idSite);
+
+ $reportPages = Request::processRequest('API.getReportPagesMetadata', array('idSite' => $idSite, 'filter_limit' => -1));
+
+ $categories = array();
+ foreach ($reportPages as $reportPage) {
+ if (!empty($reportPage['category']['id'])) {
+ $categoryId = $reportPage['category']['id'];
+
+ if ($categoryId === 'Dashboard_Dashboard') {
+ continue;
+ }
+
+ $subcategoryId = $reportPage['subcategory']['id'];
+ if (strpos($subcategoryId, '_Manage') !== false) {
+ continue; // we do not want to be able to add reports to manage pages
+ }
+
+ if (isset($categories[$categoryId])) {
+ $categories[$categoryId]['subcategories'][] = array(
+ 'uniqueId' => $reportPage['subcategory']['id'],
+ 'name' => $reportPage['subcategory']['name']
+ );
+ } else {
+ $categories[$categoryId] = array(
+ 'uniqueId' => $categoryId,
+ 'name' => $reportPage['category']['name'],
+ 'subcategories' => array(
+ array(
+ 'uniqueId' => $reportPage['subcategory']['id'],
+ 'name' => $reportPage['subcategory']['name']
+ )
+ ),
+ );
+ }
+ }
+ }
+
+ if (!isset($categories['CustomReports_CustomReports'])) {
+ $categories['CustomReports_CustomReports'] = array(
+ 'uniqueId' => 'CustomReports_CustomReports',
+ 'name' => Piwik::translate('CustomReports_CustomReports'),
+ 'subcategories' => array()
+ );
+ }
+
+ return array_values($categories);
+ }
+
+ /**
+ * Get a list of available reporty types that can be used in custom reports.
+ *
+ * @param int $idSite
+ * @return array
+ */
+ public function getAvailableReportTypes()
+ {
+ $this->validator->checkHasSomeWritePermission();
+
+ $rows = array();
+ foreach (ReportType::getAll() as $reportType) {
+ $rows[] = array('key' => $reportType::ID, 'value' => $reportType->getName());
+ }
+
+ return $rows;
+ }
+
+ private function isTableJoinable($tableName)
+ {
+ $logTable = $this->logTablesProvider->getLogTable($tableName);
+ if ($logTable && ($logTable->getColumnToJoinOnIdAction() || $logTable->getColumnToJoinOnIdVisit())) {
+ if ($logTable->getPrimaryKey()) {
+ // without primary key we would not group the data correctly
+ return true;
+ }
+ } elseif ($logTable && $logTable->getWaysToJoinToOtherLogTables()) {
+ $tables = new JoinTables($this->logTablesProvider, [$tableName]);
+ return $tables->isTableJoinableOnVisit($tableName) || $tables->isTableJoinableOnAction($tableName);
+ }
+
+ return false;
+ }
+
+ /**
+ * Get a list of available dimensions that can be used in custom reports.
+ *
+ * @param int $idSite
+ * @return array
+ */
+ public function getAvailableDimensions($idSite)
+ {
+ Piwik::checkUserIsNotAnonymous();
+ Piwik::checkUserHasSomeViewAccess();
+
+ $dimensions = $this->columnsProvider->getAllDimensions();
+
+ $rows = array();
+
+ $dimensionsToIgnore = array(
+ 'Actions.IdPageview', 'CoreHome.VisitId',
+ 'DevicesDetection.OsVersion', // only makes sense in combination with Os Family
+ 'CoreHome.LinkVisitActionId', 'CoreHome.LinkVisitActionIdPages', 'UserCountry.Provider'
+ );
+
+ $dimensionsToRename = [
+ 'CoreHome.IdSite' => Piwik::translate('CustomReports_WebsiteName')
+ ];
+
+ $config = StaticContainer::get(Configuration::class);
+ foreach ($config->getDisabledDimensions() as $dimensionDisabled) {
+ $dimensionsToIgnore[] = $dimensionDisabled;
+ }
+
+ /**
+ * Adds the possibility to other plugins to ignore more dimensions
+ */
+ Piwik::postEvent('CustomReports.addDimensionsToIgnore', array(&$dimensionsToIgnore));
+
+ $categoryList = CategoryList::get();
+
+ foreach ($dimensions as $dimension) {
+ $categoryId = $dimension->getCategoryId();
+ $dimensionName = $dimension->getName();
+ $table = $dimension->getDbTableName();
+ $dimensionId = $dimension->getId();
+
+ if (!$table) {
+ // without table we cannot join it
+ continue;
+ }
+
+ if (!$this->isTableJoinable($table)) {
+ // archiving this dimension would not work
+ continue;
+ }
+
+ if (in_array($dimensionId, $dimensionsToIgnore)) {
+ continue;
+ }
+
+ if (key_exists($dimensionId, $dimensionsToRename)) {
+ $dimensionName = $dimensionsToRename[$dimensionId];
+ }
+
+ if ($dimension->getColumnName() && $dimensionName) {
+ if (!isset($rows[$categoryId])) {
+ $category = $categoryList->getCategory($categoryId);
+ $orderId = 999;
+ if (!empty($category)) {
+ $orderId = $category->getOrder();
+ }
+
+ $categoryName = Piwik::translate($categoryId);
+ if (!is_null($category) && method_exists($category, 'getDisplayName')) {
+ $categoryName = $category->getDisplayName();
+ }
+
+ $rows[$categoryId] = array(
+ 'category' => $categoryName,
+ 'dimensions' => array(),
+ 'orderId' => $orderId
+ );
+ }
+ $rows[$categoryId]['dimensions'][] = array(
+ 'uniqueId' => $dimension->getId(),
+ 'name' => ucwords($dimensionName),
+ 'sqlSegment' => $dimension->getSqlSegment(),
+ );
+ }
+ }
+
+ usort($rows, function ($rowA, $rowB) {
+ if ((int)$rowA['orderId'] > (int)$rowB['orderId']) {
+ return 1;
+ }
+ if ((int)$rowA['orderId'] === (int)$rowB['orderId']) {
+ return 0;
+ }
+ return -1;
+ });
+
+ foreach ($rows as $categoryId => $row) {
+ $dimensions = $row['dimensions'];
+ usort($dimensions, function ($dimA, $dimB) {
+ return strcmp($dimA['name'], $dimB['name']);
+ });
+ $rows[$categoryId]['dimensions'] = $dimensions;
+ }
+
+ return array_values($rows);
+ }
+
+ /**
+ * Get a list of available metrics that can be used in custom reports.
+ *
+ * @param int $idSite
+ * @return array
+ */
+ public function getAvailableMetrics($idSite)
+ {
+ Piwik::checkUserIsNotAnonymous();
+ Piwik::checkUserHasSomeViewAccess();
+
+ $metrics = MetricsList::get();
+ $categoryList = CategoryList::get();
+
+ $rows = array();
+ $period = Common::getRequestVar('period', '', 'string');
+ foreach ($metrics->getMetrics() as $metric) {
+ if (!$metric) {
+ continue;
+ }
+ if ($metric instanceof ProcessedMetric && !$this->canGenerateMetricAutomatically($metric)) {
+ // we do not have all the dependent metrics to generate this processed metric automatically
+ continue;
+ }
+
+ $categoryId = $metric->getCategoryId();
+ $name = $metric->getName();
+ $translatedName = $metric->getTranslatedName();
+
+ if (($metric instanceof ProcessedMetric || $metric instanceof ArchivedMetric) && $name && $translatedName) {
+ if (method_exists($metric, 'getQuery') && !$metric->getQuery()) {
+ // archiving this metric would not work!
+ continue;
+ }
+
+ if (method_exists($metric, 'getDbTableName') && $metric->getDbTableName() && !$this->isTableJoinable($metric->getDbTableName())) {
+ // archiving this metric would not work!
+ continue;
+ }
+
+ if (method_exists($metric, 'getDimension') && $metric->getDimension()) {
+ $dimension = $metric->getDimension();
+ $dbDiscriminator = $dimension->getDbDiscriminator();
+ if ($dbDiscriminator) {
+ $dbDiscriminatorValue = $dbDiscriminator->getValue();
+ if (!isset($dbDiscriminatorValue) || !is_numeric($dbDiscriminatorValue)) {
+ continue;
+ }
+ }
+ }
+
+ if (!isset($rows[$categoryId])) {
+ $category = $categoryList->getCategory($categoryId);
+ $orderId = 999;
+ if (!empty($category)) {
+ $orderId = $category->getOrder();
+ }
+
+ $categoryName = Piwik::translate($categoryId);
+ if (!is_null($category) && method_exists($category, 'getDisplayName')) {
+ $categoryName = $category->getDisplayName();
+ }
+
+ $rows[$categoryId] = array(
+ 'category' => $categoryName,
+ 'metrics' => array(),
+ 'orderId' => $orderId
+ );
+ }
+
+ $description = $metric->getDocumentation();
+ if (stripos($translatedName, 'unique') === 0) {
+ $description = Piwik::translate('CustomReports_CommonUniqueMetricDescription', array($description, ucwords($translatedName), str_replace('Unique ', '', ucwords($translatedName))));
+ }
+
+ $rows[$categoryId]['metrics'][] = array(
+ 'uniqueId' => $name, 'name' => ucwords($translatedName), 'description' => $description
+ );
+ }
+ }
+
+ usort($rows, function ($rowA, $rowB) {
+ if ((int)$rowA['orderId'] > (int)$rowB['orderId']) {
+ return 1;
+ }
+ if ((int)$rowA['orderId'] === (int)$rowB['orderId']) {
+ return 0;
+ }
+ return -1;
+ });
+
+ foreach ($rows as $category => $row) {
+ $dimensions = $row['metrics'];
+ usort($dimensions, function ($dimA, $dimB) {
+ return strcasecmp($dimA['name'], $dimB['name']);
+ });
+ $rows[$category]['metrics'] = $dimensions;
+ }
+
+ return array_values($rows);
+ }
+
+ private function canGenerateMetricAutomatically(ProcessedMetric $metric)
+ {
+ foreach ($metric->getDependentMetrics() as $dependentMetric) {
+ $depMetric = $this->metricsList->getMetric($dependentMetric);
+ if (!$depMetric) {
+ // we cannot generate this metric directly
+ return false;
+ }
+
+ if ($depMetric instanceof ProcessedMetric && !$this->canGenerateMetricAutomatically($depMetric)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get report data for a previously created custom report.
+ *
+ * @param int $idSite
+ * @param string $period
+ * @param string $date
+ * @param int $idCustomReport
+ * @param bool|string $segment
+ * @param bool $expanded
+ * @param bool $flat
+ * @param int|bool $idSubtable
+ * @param string|bool $columns
+ * @return DataTable\DataTableInterface
+ */
+ public function getCustomReport($idSite, $period, $date, $idCustomReport, $segment = false, $expanded = false, $flat = false, $idSubtable = false, $columns = false)
+ {
+ $this->validator->checkReportViewPermission($idSite);
+ $this->validator->checkSiteExists($idSite); // lets not return any reports from eg deleted sites if for some reason report still exists
+ $this->model->checkReportExists($idSite, $idCustomReport);
+
+ $report = $this->model->getCustomReport($idSite, $idCustomReport);
+
+ $reportType = ReportType::factory($report['report_type']);
+
+ $table = $reportType->fetchApi($idSite, $idCustomReport, $period, $date, $segment, $expanded, $flat, $idSubtable, $columns);
+
+ return $table;
+ }
+
+ private function addAllowedToEditStatus(&$report)
+ {
+ $idSite = $report['idsite'];
+ $multipleIdSites = $report['multiple_idsites'] ? explode(',', $report['multiple_idsites']) : array();
+ if (Piwik::hasUserSuperUserAccess()) {
+ $allowedToEdit = true;
+ } elseif ($idSite == 'all' || $idSite == '0') {
+ $allowedToEdit = false;
+ } else {
+ $allowedToEdit = $multipleIdSites ? Piwik::isUserHasWriteAccess($multipleIdSites) : Piwik::isUserHasWriteAccess($idSite);
+ }
+
+ $report['allowedToEdit'] = $allowedToEdit;
+ }
+
+ private function getCustomReportInfo($idSite, $idCustomReport, $action)
+ {
+ $report = $this->model->getCustomReport($idSite, $idCustomReport);
+
+ if (empty($report)) {
+ throw new \Exception(Piwik::translate('CustomReports_ErrorCustomReportDoesNotExist'));
+ } elseif ($report['idsite'] != $idSite) {
+ // prevent a possible hack that someone passes a different site than the report has and then we accidentally
+ // still delete the report because we match with `idsite = 0 or idsite = ?`. We don't do this here right now
+ // and wouldn't need this code but it is to prevent any possible future security bugs.
+ throw new \Exception(Piwik::translate('CustomReports_' . $action . 'ExceptionMessage'));
+ }
+
+ return $report;
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/BaseActivity.php b/files/plugin-CustomReports-5.4.3/Activity/BaseActivity.php
new file mode 100644
index 0000000..75a03a6
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/BaseActivity.php
@@ -0,0 +1,113 @@
+ $this->getSiteData($idSite),
+ 'version' => 'v1',
+ 'report' => $this->getReportData($idSite, $idCustomReport),
+ );
+ }
+
+ private function getSiteData($idSite)
+ {
+ if ($idSite == 0) {
+ return array(
+ 'site_id' => 'all',
+ 'site_name' => 'all'
+ );
+ }
+
+ return array(
+ 'site_id' => $idSite,
+ 'site_name' => Site::getNameFor($idSite)
+ );
+ }
+
+ private function getReportData($idSite, $idCustomReport)
+ {
+ $report = $this->getDao()->getCustomReport($idSite, $idCustomReport);
+
+ if (!empty($report['name'])) {
+ $reportName = $report['name'];
+ } else {
+ // report name might not be set when we are handling ReportDeleted activity
+ $reportName = 'ID: ' . (int) $idCustomReport;
+ }
+
+ return array(
+ 'id' => $idCustomReport,
+ 'name' => $reportName
+ );
+ }
+
+ public function getPerformingUser($eventData = null)
+ {
+ $login = Piwik::getCurrentUserLogin();
+
+ if ($login === self::USER_ANONYMOUS || empty($login)) {
+ // anonymous cannot change a report, in this case the system changed it
+ return self::USER_SYSTEM;
+ }
+
+ return $login;
+ }
+
+ private function getDao()
+ {
+ return StaticContainer::get('Piwik\Plugins\CustomReports\Dao\CustomReportsDao');
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/ReportAdded.php b/files/plugin-CustomReports-5.4.3/Activity/ReportAdded.php
new file mode 100644
index 0000000..59db137
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/ReportAdded.php
@@ -0,0 +1,41 @@
+formatActivityData($idSite, $idCustomReport);
+ }
+
+ public function getTranslatedDescription($activityData, $performingUser)
+ {
+ $siteName = $this->getSiteNameFromActivityData($activityData);
+ $reportName = $this->getReportNameFromActivityData($activityData);
+
+ return Piwik::translate('CustomReports_ActivityReportAddedDescription', [$reportName, $siteName]);
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/ReportDeleted.php b/files/plugin-CustomReports-5.4.3/Activity/ReportDeleted.php
new file mode 100644
index 0000000..3a145af
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/ReportDeleted.php
@@ -0,0 +1,44 @@
+formatActivityData($idSite, $idCustomReport);
+ }
+
+ public function getTranslatedDescription($activityData, $performingUser)
+ {
+ $siteName = $this->getSiteNameFromActivityData($activityData);
+ $reportName = $this->getReportNameFromActivityData($activityData);
+
+ return Piwik::translate('CustomReports_ActivityReportDeletedDescription', [$reportName, $siteName]);
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/ReportPaused.php b/files/plugin-CustomReports-5.4.3/Activity/ReportPaused.php
new file mode 100644
index 0000000..3658592
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/ReportPaused.php
@@ -0,0 +1,42 @@
+formatActivityData($idSite, $idCustomReport);
+ }
+
+ public function getTranslatedDescription($activityData, $performingUser)
+ {
+ $siteName = $this->getSiteNameFromActivityData($activityData);
+ $reportName = $this->getReportNameFromActivityData($activityData);
+
+ return Piwik::translate('CustomReports_ActivityReportPausedDescription', [$reportName, $siteName]);
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/ReportResumed.php b/files/plugin-CustomReports-5.4.3/Activity/ReportResumed.php
new file mode 100644
index 0000000..b883659
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/ReportResumed.php
@@ -0,0 +1,42 @@
+formatActivityData($idSite, $idCustomReport);
+ }
+
+ public function getTranslatedDescription($activityData, $performingUser)
+ {
+ $siteName = $this->getSiteNameFromActivityData($activityData);
+ $reportName = $this->getReportNameFromActivityData($activityData);
+
+ return Piwik::translate('CustomReports_ActivityReportResumedDescription', [$reportName, $siteName]);
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Activity/ReportUpdated.php b/files/plugin-CustomReports-5.4.3/Activity/ReportUpdated.php
new file mode 100644
index 0000000..77b6b8b
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Activity/ReportUpdated.php
@@ -0,0 +1,42 @@
+formatActivityData($idSite, $idCustomReport);
+ }
+
+ public function getTranslatedDescription($activityData, $performingUser)
+ {
+ $siteName = $this->getSiteNameFromActivityData($activityData);
+ $reportName = $this->getReportNameFromActivityData($activityData);
+
+ return Piwik::translate('CustomReports_ActivityReportUpdatedDescription', [$reportName, $siteName]);
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Archiver.php b/files/plugin-CustomReports-5.4.3/Archiver.php
new file mode 100644
index 0000000..1db375c
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Archiver.php
@@ -0,0 +1,39 @@
+dimensions = array_values($dimensions);
+ $this->metrics = $metrics;
+ }
+
+ /**
+ * @return Dimension[][][]
+ */
+ public function getDimensionsPlan()
+ {
+ $numDimensions = count($this->dimensions);
+
+ $plan = array();
+
+ for ($i = 0; $i < $numDimensions; $i++) {
+ $dimension = $this->dimensions[$i];
+
+ $currentTable = $dimension->getDbTableName();
+
+ $group = array('left' => array(), 'right' => array());
+
+ if ($i >= 1) {
+ for ($j = 0; $j < $i; $j++) {
+ $group['left'][] = $this->dimensions[$j];
+ }
+ }
+
+ $group['left'][] = $dimension;
+
+ // No need for right join if there are 2 dimensions on left, as adding the right join can cause some data to be filtered out and there we be no data for second dimension, #PG-3138
+ if (isset($this->dimensions[$i + 1]) && count($group['left']) !== 2) {
+ $group['right'][] = $this->dimensions[$i + 1];
+ }
+
+ $plan[] = $group;
+ }
+
+ if (empty($plan)) {
+ // for evolution graph... we need to make sure to still iterate at least over one "fake group"
+ $plan[] = array('left' => array(), 'right' => array());
+ }
+
+ return $plan;
+ }
+
+ /**
+ * @return ArchivedMetric[][]
+ */
+ public function getMetricsPlanForGroup()
+ {
+ $metricsToResolve = $this->metrics;
+
+ $plan = array();
+
+ foreach ($metricsToResolve as $index => $metric) {
+ if (!$metric->getDimension()) {
+ continue;
+ }
+
+ $discriminator = $metric->getDimension()->getDbDiscriminator();
+ // create a separate run for each metric that has a discriminator
+ if (!empty($discriminator)) {
+ $id = $metric->getDbTableName() . '_' . $discriminator->getTable() . '_' . $discriminator->getColumn() . '_' . $discriminator->getValue();
+ if (!isset($plan[$id])) {
+ // improve performance by grouping metrics with the very same discriminator together!!
+ $plan[$id] = array();
+ }
+ $plan[$id][] = $metric;
+ unset($metricsToResolve[$index]);
+ } else {
+ if (!isset($plan[$metric->getDbTableName()])) {
+ $plan[$metric->getDbTableName()] = array();
+ }
+
+ // we try to put all metrics that go on same table in one run
+ $plan[$metric->getDbTableName()][] = $metric;
+ }
+ }
+
+ return $plan;
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Archiver/NotJoinableException.php b/files/plugin-CustomReports-5.4.3/Archiver/NotJoinableException.php
new file mode 100644
index 0000000..bbe7b9f
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Archiver/NotJoinableException.php
@@ -0,0 +1,21 @@
+reportQuery = StaticContainer::getContainer()->make('Piwik\Plugins\CustomReports\Archiver\ReportQuery');
+ $this->configuration = $configuration;
+
+ $this->rankingQuery = new RankingQuery(50000);
+ if (version_compare(Version::VERSION, '3.12.0-b2', '<')) {
+ $this->rankingQuery->setOthersLabel(DataTable::LABEL_SUMMARY_ROW);
+ }
+
+ $this->logTablesProvider = StaticContainer::get('Piwik\Plugin\LogTablesProvider');
+
+ $this->logAggregator = $logAggregator;
+ $this->parameters = $parameters;
+ Piwik::postEvent('Plugin.shouldLowerCampaignCase', [$pluginName = 'CustomReports', &$this->shouldLowerCampaignCase]);
+ }
+
+ public function isValid()
+ {
+ $selects = $this->reportQuery->getSelect();
+ return !empty($selects) && $this->hasMetric;
+ }
+
+ public function addDimension($dimension, $useRightJoin = false)
+ {
+ if (!$dimension instanceof Dimension) {
+ return;
+ }
+
+ $join = $dimension->getDbColumnJoin();
+ $dbTable = $dimension->getDbTableName();
+ $dbColumn = $dimension->getColumnName();
+
+ $dbDiscriminator = $dimension->getDbDiscriminator();
+
+ // if other ways to join the table are defined (and it's joinable to visit or action)
+ // ensure to add log_visit/log_action first, otherwise it might fail when a custom table is added first
+ $logTable = $this->logTablesProvider->getLogTable($dbTable);
+ $tables = new JoinTables($this->logTablesProvider, [$dbTable]);
+
+ if (
+ !$logTable->getColumnToJoinOnIdVisit() && !$logTable->getColumnToJoinOnIdAction() &&
+ !$logTable->getLinkTableToBeAbleToJoinOnVisit() && $logTable->getWaysToJoinToOtherLogTables()
+ ) {
+ if ($tables->isTableJoinableOnVisit($dbTable)) {
+ $this->reportQuery->addFrom('log_visit');
+ }
+ if ($tables->isTableJoinableOnAction($dbTable)) {
+ $this->reportQuery->addFrom('log_action');
+ }
+ }
+
+ // Special handling for ActionType dimension
+ if ($dimension instanceof ActionType) {
+ if (!$this->reportQuery->hasFrom('log_link_visit_action')) {
+ $this->reportQuery->addFrom('log_link_visit_action');
+ }
+ if (!$this->reportQuery->hasFrom('log_visit')) {
+ $this->reportQuery->addFrom('log_visit');
+ }
+ }
+
+ if ($useRightJoin) {
+ $tableArray = [
+ 'table' => $dbTable,
+ 'join' => 'RIGHT JOIN',
+ ];
+ $this->reportQuery->addFrom($tableArray);
+ } else {
+ $this->rankingQuery->addLabelColumn($dimension->getId());
+ $this->reportQuery->addFrom($dbTable);
+ }
+
+ if ($dbTable && $dbColumn) {
+ if (!empty($join)) {
+ $tableAlias = $join->getTable() . '_' . $dbColumn;
+
+
+ $this->reportQuery->addFrom([
+ 'table' => $join->getTable(),
+ 'tableAlias' => $tableAlias,
+ 'joinOn' => $dbTable . '.' . $dbColumn . ' = ' . $tableAlias . '.' . $join->getColumn() .
+ $this->addExtraJoinConditions($join, $tableAlias)
+ ]);
+
+ if (!$useRightJoin) {
+ $tableColumn = $tableAlias . '.' . $join->getTargetColumn();
+ $this->reportQuery->addSelect($tableColumn . " AS '" . $dimension->getId() . "'");
+ $this->reportQuery->addGroupBy($tableColumn);
+
+ // prevent "XYZ not defined"
+ // we cannot do something like " and $tableColumn != ''" as it could break dimension like visitor type
+ $this->reportQuery->addWhere($tableColumn . ' is not null');
+ }
+
+ if ($dbDiscriminator && $dbDiscriminator->isValid()) {
+ // we make sure discriminator is valid and has only allowed values to prevent injections
+
+ $dbDiscriminatorTable = $dbDiscriminator->getTable();
+
+ // table might be joined under an alias
+ $actualTableName = $this->reportQuery->getFromAlias($dbDiscriminatorTable);
+
+ if ($dbDiscriminatorTable === $join->getTable()) {
+ $actualTableName = $tableAlias; // we need to make sure to apply the where condition on this joined table
+ } elseif (empty($actualTableName)) {
+ // not joined yet
+ $actualTableName = $dbDiscriminatorTable;
+ $this->reportQuery->addFrom($dbDiscriminatorTable);
+ }
+
+ // we support for now only numeric values because we cannot use bind here as it would not be possible to position bind correctly
+ $this->reportQuery->addWhere(($actualTableName === $join->getTable() ? $tableAlias : $actualTableName) . '.' . $dbDiscriminator->getColumn() . ' = "' . $dbDiscriminator->getValue() . '"');
+ }
+ } else {
+ if (!$useRightJoin) {
+ if ($dimension->getSegmentName() === 'regionCode') {
+ $this->reportQuery->addSelect("CONCAT(log_visit.location_region, '|', log_visit.location_country) AS '" . $dimension->getId() . "'");
+ $this->reportQuery->addGroupBy($dimension->getSqlSegment());
+ $this->reportQuery->addGroupBy('log_visit.location_country');
+ } else {
+ $select = $dimension->getSqlSegment();
+ if ($this->shouldLowerCampaignCase && stripos($dimension->getSegmentName(), 'campaign') === 0) {
+ $select = 'LOWER(' . $select . ')';
+ }
+ $this->reportQuery->addSelect($select . " AS '" . $dimension->getId() . "'");
+ $this->reportQuery->addGroupBy($dimension->getSqlSegment());
+ }
+ }
+
+ if ($dbDiscriminator) {
+ $dbDiscriminatorTable = $dbDiscriminator->getTable();
+
+ if ($dbDiscriminator->isValid()) {
+ // we make sure discriminator is valid and has only allowed values to prevent injections
+
+ // table might be joined under an alias
+ $actualTableName = $this->reportQuery->getFromAlias($dbDiscriminatorTable);
+ if (empty($actualTableName)) {
+ // not joined yet
+ $actualTableName = $dbDiscriminatorTable;
+ $this->reportQuery->addFrom($dbDiscriminatorTable);
+ }
+
+ // we support for now only numeric values because we cannot use bind here as it would not be possible to position bind correctly
+ $where = $actualTableName . '.' . $dbDiscriminator->getColumn() . ' = "' . $dbDiscriminator->getValue() . '"';
+
+ $this->reportQuery->addWhere($where);
+ }
+ }
+
+ if (!$useRightJoin) {
+ $tableColumn = $dimension->getDbTableName() . '.' . $dimension->getColumnName();
+ if ($tableColumn === $dimension->getSqlSegment() && $dimension->getSegmentName() !== 'regionCode') {
+ // when the segment goes on the sql segment, we do not fetch any values with NULL otherwise we often see "XYZ is not defined"
+ // we cannot do something like " and $tableColumn != ''" as it could break dimension like visitor type
+ $this->reportQuery->addWhere($tableColumn . ' is not null');
+ }
+ }
+ }
+ }
+ }
+
+ private function addExtraJoinConditions(Join $join, $tableAlias)
+ {
+ if ($join->getTable() === 'goal') {
+ $idSites = $this->parameters->getIdSites();
+ if (!empty($idSites)) {
+ $idSites = array_map('intval', $idSites);
+ $idSites = implode(',', $idSites);
+ return ' AND ' . $tableAlias . '.idsite IN (' . $idSites . ')';
+ }
+ }
+ }
+
+ public function addMetric($metric)
+ {
+ if (!$metric instanceof ArchivedMetric || !$metric->getDimension() || !$metric->getQuery()) {
+ return;
+ }
+
+ $metricName = $metric->getName();
+ $dimension = $metric->getDimension();
+
+ $tableName = $dimension->getDbTableName();
+ $dbDiscriminator = $dimension->getDbDiscriminator();
+
+ $this->reportQuery->addFrom($tableName);
+
+ if ($dbDiscriminator) {
+ // we need to add a join for this table to make sure to calc correct results when eg a goal metric or action metric is selected (to be able to measure different values for eg clicked urls vs page urls)
+ $join = $dimension->getDbColumnJoin();
+ $dbDiscriminatorValue = $dbDiscriminator->getValue();
+ $dbDiscriminatorTable = $dbDiscriminator->getTable();
+
+ if (!$dbDiscriminator->isValid()) {
+ // we make sure discriminator is valid and has only allowed values to prevent injections
+ Log::debug(sprintf('Ignored metric %s because dbDiscriminator does not valid value', $metricName));
+ return;
+ }
+
+ if ($join && $join->getTable() === $dbDiscriminatorTable) {
+ // we need to use that join only when a discriminator is actually on the joined table, otherwise ignore it as not needed
+
+ $tableAlias = $join->getTable() . '_' . $metricName;
+ $dbColumn = $dimension->getColumnName();
+ $this->reportQuery->addFrom([
+ 'table' => $join->getTable(),
+ 'tableAlias' => $tableAlias,
+ 'joinOn' => $tableName . '.' . $dbColumn . ' = ' . $tableAlias . '.' . $join->getColumn() . $this->addExtraJoinConditions($join, $tableAlias)
+ ]);
+
+ // we need to make sure that the query uses the newly joined table and the correct column...
+ $metricQuery = str_replace($dbColumn, $join->getTargetColumn(), $metric->getQuery());
+ $select = str_replace($tableName . '.', $tableAlias . '.', $metricQuery) . " AS '" . $metricName . "'";
+ $this->reportQuery->addSelect($select);
+ $where = $tableAlias . '.' . $dbDiscriminator->getColumn() . ' = "' . $dbDiscriminatorValue . '"';
+ $this->reportQuery->addWhere($where);
+ } elseif ($tableName === $dbDiscriminatorTable || $this->reportQuery->hasFrom($dbDiscriminatorTable)) {
+ $actualTableName = $this->reportQuery->getFromAlias($dbDiscriminatorTable);
+
+ // we support for now only numeric values because we cannot use bind here as it would not be possible to position bind correctly
+ $where = $actualTableName . '.' . $dbDiscriminator->getColumn() . ' = "' . $dbDiscriminatorValue . '"';
+ $this->reportQuery->addWhere($where);
+ $this->reportQuery->addSelect($metric->getQuery() . " AS '" . $metricName . "'");
+ } elseif ($this->reportQuery->isTableJoinable($dbDiscriminatorTable)) {
+ $actualTableName = $this->reportQuery->getFromAlias($dbDiscriminatorTable);
+
+ if (empty($actualTableName)) {
+ $this->reportQuery->addFrom($dbDiscriminatorTable);
+ $actualTableName = $dbDiscriminatorTable;
+ }
+
+ // we support for now only numeric values because we cannot use bind here as it would not be possible to position bind correctly
+ $where = $actualTableName . '.' . $dbDiscriminator->getColumn() . ' = "' . $dbDiscriminatorValue . '"';
+ $this->reportQuery->addWhere($where);
+ $this->reportQuery->addSelect($metric->getQuery() . " AS '" . $metricName . "'");
+ } else {
+ Log::debug(sprintf('Cannot select metric %s because not supported discriminator table?!?', $metricName));
+ return;
+ }
+ } else {
+ $this->reportQuery->addSelect($metric->getQuery() . " AS '" . $metricName . "'");
+ }
+
+ $this->hasMetric = true;
+ $this->setMetricGroupBy($tableName, $tableName);
+ $this->rankingQuery->addColumn($metricName);
+ $this->reportQuery->setSortBy($metricName);
+ }
+
+ private function setMetricGroupBy($tableName, $tableAlias)
+ {
+ if (empty($this->metricGroupBy)) {
+ $this->metricGroupBy = str_replace($tableName, $tableAlias, $this->reportQuery->getTableColumnId($tableName));
+ }
+ }
+
+ public function addSegmentFilter($segmentFilter, $idSite)
+ {
+ if (empty($segmentFilter)) {
+ return;
+ }
+
+ $from = $this->reportQuery->getFrom();
+
+ $segment = new Segment($segmentFilter, [$idSite]);
+ $segmentExpression = $segment->getSegmentExpression();
+ $segmentExpression->parseSubExpressionsIntoSqlExpressions($from);
+ $sql = $segmentExpression->getSql();
+
+ $this->reportQuery->setFrom($from);
+ $this->reportQuery->addExtraWhere($sql['where']);
+ $this->reportQuery->addExtraBind($sql['bind']);
+ }
+
+ public function getOrderBy()
+ {
+ return $this->reportQuery->getSortBy();
+ }
+
+ public function getReportQuery()
+ {
+ return $this->reportQuery;
+ }
+
+ private function getMaxExecutionTimeMySQLHint()
+ {
+ $maxExecutionTime = $this->configuration->getMaxExecutionTime();
+ if (Piwik::getAction() == 'previewReport' && Piwik::getModule() == 'CustomReports') {
+ $maxExecutionTime = Config::getInstance()->General['live_query_max_execution_time'];
+ }
+ $maxExecutionTimeHint = '';
+ if (is_numeric($maxExecutionTime) && $maxExecutionTime > 0) {
+ $timeInMs = $maxExecutionTime * 1000;
+ $timeInMs = (int) $timeInMs;
+ $maxExecutionTimeHint = ' /*+ MAX_EXECUTION_TIME(' . $timeInMs . ') */ ';
+ }
+ return $maxExecutionTimeHint;
+ }
+
+ public function buildQuery()
+ {
+ // needed because we generate the where condition based on this
+ $this->reportQuery->addFrom('log_visit');
+ $condition = $this->logAggregator->getWhereStatement('log_visit', 'visit_last_action_time');
+
+ // If joining other log tables then if possible add extra default binds to limit the query scope
+ // These may be removed by LogAggregator later on if deemed unnecessary
+ $joinConditions = [];
+ $joinBinds = 0;
+ $logTablesProvider = StaticContainer::get(LogTablesProvider::class);
+ foreach ($logTablesProvider->getAllLogTables() as $logTable) {
+ foreach ($this->reportQuery->getFrom() as $table) {
+ if (!is_array($table) || !array_key_exists('join', $table) || strtolower($table['join']) != 'right join') {
+ continue;
+ }
+ $tableName = (array_key_exists('tableAlias', $table) ? $table['tableAlias'] : $table['table']);
+ if ($tableName !== 'log_visit' && $tableName === $logTable->getName()) {
+ $dateTimeColumn = $logTable->getDateTimeColumn();
+ if ($dateTimeColumn) {
+ $joinConditions[$tableName] = $this->logAggregator->getWhereStatement($tableName, $dateTimeColumn);
+ $joinBinds++;
+ }
+ }
+ }
+ }
+
+ $select = $this->reportQuery->getSelect();
+ $groupBy = $this->reportQuery->getGroupBy();
+ $where = $this->reportQuery->getWhere();
+ $from = $this->reportQuery->getFrom();
+ $orderBy = $this->reportQuery->getSortBy();
+
+ foreach ($joinConditions as $joinCondition) {
+ $condition .= ' AND ' . $joinCondition;
+ }
+
+ if (!empty($where)) {
+ $condition .= ' AND (' . $where . ') ';
+ }
+
+ /** @var \Piwik\DataAccess\LogQueryBuilder $segmentQueryBuilder */
+ $segmentQueryBuilder = StaticContainer::getContainer()->make('Piwik\DataAccess\LogQueryBuilder');
+
+ if ($this->metricGroupBy && !empty($groupBy)) {
+ // there is no groupBy eg for evolution reports
+ $segmentQueryBuilder->forceInnerGroupBySubselect($groupBy . ', ' . $this->metricGroupBy);
+ }
+
+ $defaultBindCount = count($this->logAggregator->getGeneralQueryBindParams());
+
+ try {
+ $query = $this->logAggregator->generateQuery($select, $from, $condition, $groupBy, $orderBy);
+ } catch (\Exception $e) {
+ $segmentQueryBuilder->forceInnerGroupBySubselect('');
+ throw $e;
+ }
+
+ // Add extra default bind parameters for any right join conditions
+ $bindCount = $defaultBindCount;
+ $defaultBinds = $this->logAggregator->getGeneralQueryBindParams();
+ for ($i = 0; $i < $joinBinds; $i++) {
+ $query['bind'] = array_merge($query['bind'], $defaultBinds);
+ $bindCount += $defaultBindCount;
+ }
+
+ $segmentQueryBuilder->forceInnerGroupBySubselect('');
+
+ $select = 'SELECT';
+ if (is_array($query) && 0 === strpos(trim($query['sql']), $select)) {
+ $query['sql'] = trim($query['sql']);
+ $query['sql'] = 'SELECT /* CustomReports */' . substr($query['sql'], strlen($select));
+ }
+
+ $bind = $this->reportQuery->getExtraBind();
+
+ if (!empty($bind)) {
+ // we need to add bind parameters from applied "report segment filter" at correct position right after the general
+ // query parameters but before any Matomo segment.
+ $newBind = $query['bind'];
+ array_splice($newBind, $bindCount, 0, $bind);
+ $bind = $newBind;
+ } else {
+ $bind = $query['bind'];
+ }
+
+ if (!empty($this->rankingQuery->getLabelColumns())) {
+ // we only do this when there are dimensions, not for evolution graph queries
+ $query['sql'] = $this->rankingQuery->generateRankingQuery($query['sql']);
+ }
+
+ $maxExecutionTimeHint = $this->getMaxExecutionTimeMySQLHint();
+ if ($maxExecutionTimeHint) {
+ $query['sql'] = trim($query['sql']);
+ $pos = stripos($query['sql'], 'SELECT');
+ if ($pos !== false) {
+ $query['sql'] = substr_replace($query['sql'], 'SELECT ' . $maxExecutionTimeHint, $pos, strlen('SELECT'));
+ }
+ }
+
+ return [
+ 'sql' => $query['sql'],
+ 'bind' => $bind
+ ];
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/Archiver/ReportQuery.php b/files/plugin-CustomReports-5.4.3/Archiver/ReportQuery.php
new file mode 100644
index 0000000..e9e48f1
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Archiver/ReportQuery.php
@@ -0,0 +1,284 @@
+logTablesProvider = $logTablesProvider;
+ }
+
+ public function addSelect($select)
+ {
+ $this->selects[] = $select;
+ }
+
+ public function hasFrom($table)
+ {
+ $has = in_array($table, $this->from, $strict = true);
+
+ if ($has) {
+ return true;
+ }
+
+ foreach ($this->from as $from) {
+ if (is_array($from)) {
+ if (!isset($from['tableAlias']) && $from['table'] === $table) {
+ return true;
+ } elseif (isset($from['tableAlias']) && $from['tableAlias'] === $table) {
+ return true;
+ }
+ }
+ }
+
+ if (is_array($table) && isset($table['table']) && !isset($table['tableAlias'])) {
+ return $this->hasFrom($table['table']);
+ }
+
+ if (is_array($table) && isset($table['table']) && isset($table['tableAlias'])) {
+ return $this->hasFrom($table['tableAlias']);
+ }
+
+ return false;
+ }
+
+ public function getFromAlias($table)
+ {
+ if (is_array($table) && isset($table['table']) && !isset($table['tableAlias'])) {
+ // todo... we might only be able to re-use that table if there is no custom "joinOn"... to be tested at some point
+ return $this->getFromAlias($table['table']);
+ }
+
+ if (is_array($table) && isset($table['table']) && isset($table['tableAlias'])) {
+ // todo... we might only be able to re-use that table if there is no custom "joinOn"... to be tested at some point
+ return $this->getFromAlias($table['tableAlias']);
+ }
+
+ if (is_string($table) && in_array($table, $this->from, $strict = true)) {
+ return $table;
+ }
+
+ foreach ($this->from as $from) {
+ if (is_array($from)) {
+ if (!isset($from['tableAlias']) && isset($from['table']) && $from['table'] === $table) {
+ return $table;
+ } elseif (isset($from['tableAlias']) && ($from['tableAlias'] === $table || ($from['table'] === $table && !isset($from['joinOn'])))) {
+ return $from['tableAlias'];
+ }
+ }
+ }
+ }
+
+ public function addFrom($table)
+ {
+ if (!$this->hasFrom($table)) {
+ if (is_string($table) && !$this->isTableJoinable($table)) {
+ throw new NotJoinableException("Table $table cannot be joined");
+ }
+
+ if (is_array($table) && isset($table['table']) && !isset($table['tableAlias']) && !isset($table['joinOn']) && !$this->isTableJoinable($table['table'])) {
+ throw new NotJoinableException("Table " . $table['table'] . " cannot be joined");
+ }
+
+ // if this table is being *explicitly joined* (ie, is an array instead of just a string table name), core
+ // Matomo code will not automatically take into account dependent tables when determining join ordering.
+ // in this case we have to make sure that information is present ourselves.
+ if (is_array($table) && empty($table['joinOn'])) {
+ $tableName = $table['table'];
+ $logTable = $this->logTablesProvider->getLogTable($tableName);
+
+ if ($logTable && !$logTable->getColumnToJoinOnIdVisit()) {
+ // if there is a preferred "link" table specified, use that one. otherwise we look for the
+ // first table that is joinable (directly or indirectly) to log_visit.
+ $preferTable = $logTable->getLinkTableToBeAbleToJoinOnVisit();
+
+ // if this is not directly joinable to log_visit, look for another way to join it to log_visit
+ $tables = new JoinTables($this->logTablesProvider, [$tableName]);
+ foreach ($logTable->getWaysToJoinToOtherLogTables() as $otherLogTable => $column) {
+ if (
+ $preferTable == $otherLogTable
+ || (!$preferTable && $tables->isTableJoinableOnVisit($otherLogTable))
+ ) {
+ $this->addFrom($otherLogTable); // make sure the other table is present in the from list
+ break;
+ }
+ }
+ }
+ }
+
+ $this->from[] = $table;
+ }
+ }
+
+ public function addWhere($where)
+ {
+ if (!in_array($where, $this->where, $strict = true)) {
+ // make sure we do not add it twice, happens eg if two metrics have same discriminator
+ $this->where[] = $where;
+ }
+ }
+
+ public function addGroupBy($groupBy)
+ {
+ if (!in_array($groupBy, $this->groupBy)) {
+ $this->groupBy[] = $groupBy;
+ }
+ }
+
+ public function setSortBy($sortBy)
+ {
+ if (empty($this->sortBy)) {
+ $this->sortBy = $sortBy;
+ }
+ }
+
+ public function addExtraWhere($where)
+ {
+ if (empty($this->extraWhere)) {
+ $this->extraWhere = $where;
+ } else {
+ $this->extraWhere = sprintf("( %s ) AND (%s)", $this->extraWhere, $where);
+ }
+ }
+
+ public function getExtraBind()
+ {
+ return $this->extraBind;
+ }
+
+ public function addExtraBind($bind)
+ {
+ if (empty($this->extraBind)) {
+ $this->extraBind = $bind;
+ } else {
+ foreach ($bind as $val) {
+ $this->extraBind[] = $val;
+ }
+ }
+ }
+
+ public function getTableColumnId($tableName)
+ {
+ $logTable = $this->logTablesProvider->getLogTable($tableName);
+
+ $primaryKey = $logTable->getPrimaryKey();
+
+ if (count($primaryKey) === 1) {
+ return '`' . $tableName . '`.`' . array_shift($primaryKey) . '`';
+ }
+
+ $glue = "`, '_', `" . $tableName . '`.`';
+ return sprintf("CONCAT(`%s`.`%s`)", $tableName, implode($glue, $primaryKey));
+ }
+
+ public function isTableJoinable($tableName)
+ {
+ try {
+ $logTable = $this->logTablesProvider->getLogTable($tableName);
+ $tables = new JoinTables($this->logTablesProvider, [$tableName]);
+ if ($logTable && ($tables->isTableJoinableOnAction($tableName) || $tables->isTableJoinableOnVisit($tableName))) {
+ if ($logTable->getPrimaryKey()) {
+ // without primary key we would not group the data correctly
+ return true;
+ }
+ }
+ } catch (\Exception $e) {
+ // intentionally left blank
+ }
+
+ return false;
+ }
+
+ public function getSelect()
+ {
+ return implode(', ', $this->selects);
+ }
+
+ public function getFrom()
+ {
+ return $this->from;
+ }
+
+ public function setFrom($from)
+ {
+ $this->from = $from;
+ }
+
+ public function getGroupBy()
+ {
+ if (empty($this->groupBy)) {
+ return false;
+ }
+
+ return implode(', ', $this->groupBy);
+ }
+
+ public function getWhere()
+ {
+ $where = implode(' AND ', $this->where);
+
+ if (!empty($this->extraWhere) && !empty($where)) {
+ $where = sprintf("( %s ) AND (%s)", $where, $this->extraWhere);
+ } elseif (!empty($this->extraWhere)) {
+ $where = $this->extraWhere;
+ }
+
+ return $where;
+ }
+
+ /**
+ * @return false|string
+ */
+ public function getSortBy()
+ {
+ return $this->sortBy;
+ }
+}
diff --git a/files/plugin-CustomReports-5.4.3/CHANGELOG.md b/files/plugin-CustomReports-5.4.3/CHANGELOG.md
new file mode 100644
index 0000000..c88875b
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/CHANGELOG.md
@@ -0,0 +1,315 @@
+## Changelog
+
+5.4.3 - 2025-07-21
+- Stopped filtering empty values for regionCode dimension
+
+5.4.2 - 2025-06-09
+- Added custom_reports_max_dimensions config setting if not present in config.ini.php
+
+5.4.1 - 2025-05-15
+- Fixed array reference error
+
+5.4.0 - 2025-05-12
+- Added the ability to use more than 3 dimensions
+- No longer show Insights visualization option when it's not available
+
+5.3.4 - 2025-04-15
+- Made preview report timeframes as a config value
+
+5.3.3 - 2025-03-17
+- Improved preview report performance to limit by timeframe
+
+5.3.2 - 2025-03-03
+- Added new `getNthLevelTableDimension` method to support new Matomo core changes
+- Added query validation check before add, update or preview of report
+
+5.3.1 - 2025-02-17
+- Improved paused state message
+
+5.3.0 - 2025-02-03
+- Added code to pause/resume a custom report
+
+5.2.3 - 2025-01-20
+- Fixes add and update report not working when rearchive_reports_in_past_last_n_months & custom_reports_rearchive_reports_in_past_last_n_months config is set as 0
+
+5.2.2 - 2025-01-15
+- Lower campaign values based on a event to honor keep campaign parameter capitalisation setting
+
+5.2.1 - 2025-01-06
+- Added code to allow admins to add/edit multiple websites if access to all websites in a report
+
+5.2.0 - 2024-12-09
+- Added option to assign multiple idSites to a single report
+- Added action type dimension
+- Updated region dimension query to group by country and show region name instead of region code
+
+5.1.1 - 2024-12-02
+- Added region and action type dimension
+
+5.1.0 - 2024-11-18
+- Added an option to sort subcategory reports
+
+5.0.19 - 2024-11-05
+- Updated README.md
+
+5.0.18 - 2024-10-21
+- Added config for setting custom reports historical archiving period
+
+5.0.17 - 2024-09-26
+- Added some new metrics specifically for this plugin:
+ - Average Product Quantity
+ - Average Product Price
+ - Product Revenue (Total & avg)
+ - Total Click Outlinks (Clicked Outlinks)
+ - Content Impressions
+ - Content Interactions
+ - Content Interaction Rate
+ - Product Category (Dimension)
+
+5.0.16 - 2024-08-26
+- Pricing updated
+
+5.0.15
+- Improved validation for dimensions being added to look for allowed dimensions
+
+5.0.14
+- Added cover image for marketplace
+
+5.0.13
+- Fixed error when changing number of rows in evolution report
+
+5.0.12
+- Added a fix to show 2nd dimension when 3rd dimension has no data
+
+5.0.11
+- Added missing translations for glossary
+
+5.0.10
+- Improved performance for reports that use dimensions accessed by a visit action via right join
+
+5.0.9
+- Updated README.md
+
+5.0.8
+- Fixed evolution graph refresh issue after metric selection
+
+5.0.7
+- Fixed regression in archiving when a new report is created
+
+5.0.6
+- Changes to hide the delete button when user doesn't have permission to delete report
+
+5.0.5
+- Fix archiving error due to labels not defined
+- Added code to allow creating report with same name.
+
+5.0.4
+- Fixed error when no metric to sort available in getMetricToSortMultiPeriod()
+
+5.0.3
+- Fixed warnings during archive process
+
+5.0.2
+- Fixed undefined key notice during previewReport
+
+5.0.1
+- Compatibility with Matomo 5.0.0-b4
+
+5.0.0
+- Compatibility with Matomo 5
+
+4.1.7
+- Fixes regression from previous version where Insights wouldn't load
+
+4.1.6
+- Fixes issue where report view preferences do not persist
+
+4.1.5
+- Fixes for PHP 8.1
+
+4.1.4
+- Fix report links not maintaining the selected date and/or segment
+
+4.1.3
+- Fix possible XSS if segment definition contains valid angularjs syntax
+
+4.1.2
+- Fixed Unsupported operand error for preview report.
+
+4.1.1
+- Fixed Unsupported operand error due to wrong dimension selection for subtable, #PG-1329
+
+4.1.0
+- Migrate AngularJS code to Vue.
+
+4.0.15
+- Added check to limit live queries for previewReport action if live_query_max_execution_time is set
+
+4.0.14
+- Fixed sub data table warning
+- Fixed code to show maximum of 3 metrics when type evolution graph for email report
+
+4.0.13
+- Changed dimension name to UTC time for Server Time dimensions
+
+4.0.12
+- Started supporting 3 dimensions in preview report
+
+4.0.11
+- Fixed namespace when previewing a report
+
+4.0.10
+- Started re-archiving only when reportType/dimensionIds/metricIds/segmentFilter are changed
+- Show empty datatable for no new rows found to avoid fatal error
+- Disabled segmented visitor log got download dimension
+
+4.0.9
+- Fixed preview report to work even if not metrics provided by other plugins.
+
+4.0.8
+- Updated README.md to highlight benefit of custom reports and mentioned simpler reports
+
+4.0.7
+- Add config to aggregate unique metrics instead of raw data for periods specified in config
+
+4.0.6
+- Fix archiving of unique metrics in evolution graphs for week, month and year periods
+
+4.0.5
+- Add category help text
+
+4.0.4
+- Tweak message when editing a custom report and browser archiving is disabled
+
+4.0.3
+- Add back the archive reports command
+
+4.0.2
+- Ability to rearchive reports on custom report creation/update
+
+4.0.1
+- Compatibility with Matomo 4.X
+
+4.0.0
+- Compatibility with Matomo 4.X
+
+3.1.27
+- Improve archive command
+
+3.1.26
+- List dimension IDs in glossary
+
+3.1.25
+- Add new config setting `custom_reports_disabled_dimensions` to disable dimensions
+
+3.1.24
+- Ignore new region dimension as it won't work
+
+3.1.23
+- Fix view link in manage custom reports may not work when report is configured for all websites
+- Fix goalId archiving
+
+3.1.22
+- Fix archiver
+
+3.1.21
+- Add possibility to set max execution time
+
+3.1.20
+- Better segment filter check
+
+3.1.19
+- Apply segment filter in segmented visitor log
+- Better support for Matomo 3.12
+
+3.1.18
+- Sort aggregated reports before generating the report (week, month, year, range)
+- Compatibility with Matomo 3.12
+
+3.1.17
+- Add more options to archive command
+
+3.1.16
+- Support new segmentation in Matomo 3.12
+
+3.1.15
+- Compatibility with Matomo 3.12
+
+3.1.14
+- Show search box for entities
+- Support usage of a reader DB when configured
+
+3.1.13
+- Enable more dimensions (visitorId, geolocation)
+
+3.1.12
+- Add more translations
+- Make sure a report can be moved to its own page after it was assigned to another page
+
+3.1.11
+- Add Turkish translation
+- Enable Order ID dimension
+
+3.1.10
+- Improve report generation for some combination of dimensions
+
+3.1.9
+- Fix report preview unter circumstances doesn't show column names when no report is configured yet
+
+3.1.8
+- Add config setting to always show unique visitors in all periods
+
+3.1.7
+- Improve handling of unique visitors and users
+
+3.1.6
+- Use correct category names
+- Calculate unique visitors and users from raw data for periods != day if enabled in config in evolution graphs when only these metrics are used
+
+3.1.5
+- Support more languages
+- Added command to archive reports in past
+
+3.1.4
+- Support new languages
+- Use new brand colors
+- Ensure segment definition is shown correctly
+
+3.1.3
+- Fix possible combination with event name and event value may not return a result
+
+3.1.2
+- Add dimensions and metrics information to glossary
+- Support new "Write" role
+
+3.1.1
+- Make sure pie and bar graphs show available columns
+
+3.1.0
+- Support [Roll-Up Reporting](https://plugins.matomo.org/RollUpReporting). Create custom reports across multiple sites.
+
+3.0.6
+- Prevent possible fatal error when opening manage screen for all websites
+- New config setting `custom_reports_validate_report_content_all_websites` which, when enabled under the `[CustomReports]` section, allows the creation of Custom Reports on "All websites", even those that contain "Custom dimensions" or other entities which may not be present on all websites. This is useful when you have many (or all) websites with the exact same dimensions Ids and/or Goals Ids across all websites.
+
+
+3.0.5
+- Renamed Piwik to Matomo
+
+3.0.4
+- Prevent possible error when putting a custom report to another custom report page
+
+3.0.3
+- Prevent possible problems with custom dimensions in custom reports when also using roll-ups.
+
+3.0.2
+- Added German translation
+- When generating report data and data needs to be truncated, make sure to sort the data by the first column of the report
+- Make number of rows within a datatable configurable
+- Make sure aggregated reports are truncated if needed
+
+3.0.1
+- Make sure custom reports category can be always selected when creating a new custom report
+
+3.0.0
+- Custom Reports for Piwik 3
diff --git a/files/plugin-CustomReports-5.4.3/Categories/CustomReportsCategory.php b/files/plugin-CustomReports-5.4.3/Categories/CustomReportsCategory.php
new file mode 100644
index 0000000..434fbd7
--- /dev/null
+++ b/files/plugin-CustomReports-5.4.3/Categories/CustomReportsCategory.php
@@ -0,0 +1,27 @@
+' . Piwik::translate('CustomReports_ManageReportsSubcategoryHelp') . '
Create custom reports from 163 metrics that span the entire visitor experience, from your pages to your forms, checkout, and content consumption.
+Slice your metrics with 94 dimensions to make your analysis as in-depth and granular as you wish.
+Send email and SMS notifications to your colleagues or clients so they can access your custom reports. Schedule your reports daily, weekly, or monthly for regular updates on your campaign’s or site's performance.
+Leverage the HTTP API to manage, fetch, and export your custom reports. You can even access the raw data via MySQL.
+Narrow your report's scope and learn how a subset of your audience performs for any given metric and dimension.
+Study how different segments behave so you can uncover unique insights into what moves them to convert.
+Take your analytics to new heights by using events to study every action on your site. Drill down your reports by any dimension and learn the most popular video content, the most highly visited product pages, or the form elements that make them bounce.
+The Custom Reports plugin gives you access to features not supported by most standard Matomo reports.
+Whether you want to detect trends with pivots, view the historical evolution of any dimension value, or study individual visits with visit logs, the Custom Reports plugin has you covered.
+\n ").concat(Object(external_CoreHome_["translate"])('CustomReports_MatchingSearchMatchedAdd', newSites.length, displaySearchTerm), ":\n
");
+ sitesToAdd += newSites.join('');
+
+ if (alreadyAddedSites.length) {
+ var _text = Object(external_CoreHome_["translate"])('CustomReports_MatchingSearchMatchedAlreadyAdded', alreadyAddedSites.length, displaySearchTerm);
+
+ sitesToAdd += "
".concat(_text, ":
").concat(alreadyAddedSites.join(''));
+ }
+
+ sitesToAdd += "
\n ").concat(Object(ot["translate"])("CustomReports_MatchingSearchMatchedAdd",r.length,o),":\n
");if(a+=r.join(""),i.length){var l=Object(ot["translate"])("CustomReports_MatchingSearchMatchedAlreadyAdded",i.length,o);a+="
".concat(l,":
").concat(i.join(""))}a+='
+
+ {{ translate('General_LoadingData') }}
+
+
+ {{ translate('CustomReports_UpdatingData') }}
+
{{ translate('CustomReports_CustomReportIntroduction') }}
+","
",''),"")},saveButtonText:function(){return this.edit?Object(I["translate"])("CoreUpdater_UpdateTitle"):Object(I["translate"])("HeatmapSessionRecording_CreateNewHeatmap")}}});In.render=Vn;var Ln=In,Fn={class:"heatmapList"},Wn={class:"filterStatus"},qn={class:"hsrSearchFilter",style:{"margin-left":"3.5px"}},zn={class:"index"},Gn={class:"name"},$n={class:"creationDate"},Jn={class:"sampleLimit"},Xn={class:"status"},Yn={class:"action"},Kn={colspan:"7"},Qn={class:"loadingPiwik"},Zn=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),ea={colspan:"7"},ta=["id"],na={class:"index"},aa={class:"name"},ia={class:"creationDate"},ra={class:"sampleLimit"},oa={key:0,class:"status status-paused"},sa=["title"],la={key:1,class:"status"},ca={class:"action"},da=["title","onClick"],ua=["title","onClick"],ma=["title","href"],pa=["title","onClick"],ha={class:"tableActionBar"},ga=Object(r["createElementVNode"])("span",{class:"icon-add"},null,-1),fa={class:"ui-confirm",id:"confirmDeleteHeatmap",ref:"confirmDeleteHeatmap"},ba=["value"],va=["value"],ya={class:"ui-confirm",id:"confirmEndHeatmap",ref:"confirmEndHeatmap"},Oa=["value"],ja=["value"];function Sa(e,t,n,a,i,o){var s=Object(r["resolveComponent"])("Field"),l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fn,[Object(r["createVNode"])(l,{"content-title":e.translate("HeatmapSessionRecording_ManageHeatmaps")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_HeatmapUsageBenefits")),1),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",Wn,[Object(r["createVNode"])(s,{uicontrol:"select",name:"filterStatus","model-value":e.filterStatus,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.setFilterStatus(t)}),title:e.translate("HeatmapSessionRecording_Filter"),"full-width":!0,options:e.statusOptions},null,8,["model-value","title","options"])]),Object(r["createElementVNode"])("div",qn,[Object(r["withDirectives"])(Object(r["createVNode"])(s,{uicontrol:"text",name:"hsrSearch",title:e.translate("General_Search"),modelValue:e.searchFilter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchFilter=t}),"full-width":!0},null,8,["title","modelValue"]),[[r["vShow"],e.hsrs.length>0]])])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",zn,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",Gn,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",$n,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_CreationDate")),1),Object(r["createElementVNode"])("th",Jn,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_SampleLimit")),1),Object(r["createElementVNode"])("th",Xn,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(r["createElementVNode"])("th",Yn,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Kn,[Object(r["createElementVNode"])("span",Qn,[Zn,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",ea,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_NoHeatmapsFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.hsrs.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedHsrs,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"hsr".concat(t.idsitehsr),class:"hsrs",key:t.idsitehsr},[Object(r["createElementVNode"])("td",na,Object(r["toDisplayString"])(t.idsitehsr),1),Object(r["createElementVNode"])("td",aa,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",ia,Object(r["toDisplayString"])(t.created_date_pretty),1),Object(r["createElementVNode"])("td",ra,Object(r["toDisplayString"])(t.sample_limit),1),"paused"===t.status?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",oa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.ucfirst(t.status))+" ",1),Object(r["createElementVNode"])("span",{class:"icon icon-help",title:e.pauseReason},null,8,sa)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",la,Object(r["toDisplayString"])(e.ucfirst(t.status)),1)),Object(r["createElementVNode"])("td",ca,[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",title:e.translate("HeatmapSessionRecording_EditX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:function(n){return e.editHsr(t.idsitehsr)}},null,8,da),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{a:"",class:"table-action stopRecording icon-drop-crossed",title:e.translate("HeatmapSessionRecording_StopX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:function(n){return e.completeHsr(t)}},null,8,ua),[[r["vShow"],"ended"!==t.status]]),Object(r["createElementVNode"])("a",{target:"_blank",class:"table-action icon-show",title:e.translate("HeatmapSessionRecording_ViewReport"),href:e.getViewReportLink(t)},null,8,ma),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",title:e.translate("HeatmapSessionRecording_DeleteX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:function(n){return e.deleteHsr(t)}},null,8,pa)])],8,ta)})),128))])],512),[[c]]),Object(r["createElementVNode"])("div",ha,[Object(r["createElementVNode"])("a",{class:"createNewHsr",value:"",onClick:t[2]||(t[2]=function(t){return e.createHsr()})},[ga,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_CreateNewHeatmap")),1)])])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",fa,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_DeleteHeatmapConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ba),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,va)],512),Object(r["createElementVNode"])("div",ya,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_EndHeatmapConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Oa),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ja)],512)])}function _a(e){return wa(e)||Na(e)||Va(e)||Ha()}function Ha(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Va(e,t){if(e){if("string"===typeof e)return Ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ea(e,t):void 0}}function Na(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function wa(e){if(Array.isArray(e))return Ea(e)}function Ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n","
",''),"")},saveButtonText:function(){return this.edit?Object(I["translate"])("CoreUpdater_UpdateTitle"):Object(I["translate"])("HeatmapSessionRecording_CreateNewSessionRecording")}}});bi.render=ci;var vi=bi,yi={class:"sessionRecordingList"},Oi={class:"filterStatus"},ji={class:"hsrSearchFilter",style:{"margin-left":"3.5px"}},Si={class:"index"},_i={class:"name"},Hi={class:"creationDate"},Vi={class:"sampleLimit"},Ni={class:"status"},wi={class:"action"},Ei={colspan:"7"},ki={class:"loadingPiwik"},Ri=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ci={colspan:"7"},xi=["id"],Ti={class:"index"},Di={class:"name"},Mi={class:"creationDate"},Pi={class:"sampleLimit"},Ai={key:0,class:"status status-paused"},Bi=["title"],Ui={key:1,class:"status"},Ii={class:"action"},Li=["title","onClick"],Fi=["title","onClick"],Wi=["title","href"],qi=["title","onClick"],zi={class:"tableActionBar"},Gi=Object(r["createElementVNode"])("span",{class:"icon-add"},null,-1),$i={class:"ui-confirm",ref:"confirmDeleteSessionRecording"},Ji=["value"],Xi=["value"],Yi={class:"ui-confirm",ref:"confirmEndSessionRecording"},Ki=["value"],Qi=["value"];function Zi(e,t,n,a,i,o){var s=Object(r["resolveComponent"])("Field"),l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",yi,[Object(r["createVNode"])(l,{"content-title":e.translate("HeatmapSessionRecording_ManageSessionRecordings")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_SessionRecordingsUsageBenefits")),1),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",Oi,[Object(r["createVNode"])(s,{uicontrol:"select",name:"filterStatus","model-value":e.filterStatus,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.setFilterStatus(t)}),title:e.translate("HeatmapSessionRecording_Filter"),"full-width":!0,options:e.statusOptions},null,8,["model-value","title","options"])]),Object(r["createElementVNode"])("div",ji,[Object(r["withDirectives"])(Object(r["createVNode"])(s,{uicontrol:"text",name:"hsrSearch",title:e.translate("General_Search"),modelValue:e.searchFilter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchFilter=t}),"full-width":!0},null,8,["title","modelValue"]),[[r["vShow"],e.hsrs.length>0]])])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",Si,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",_i,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",Hi,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_CreationDate")),1),Object(r["createElementVNode"])("th",Vi,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_SampleLimit")),1),Object(r["createElementVNode"])("th",Ni,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(r["createElementVNode"])("th",wi,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ei,[Object(r["createElementVNode"])("span",ki,[Ri,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ci,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_NoSessionRecordingsFound")),1)],512),[[r["vShow"],!e.isLoading&&0==e.hsrs.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedHsrs,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"hsr".concat(t.idsitehsr),class:"hsrs",key:t.idsitehsr},[Object(r["createElementVNode"])("td",Ti,Object(r["toDisplayString"])(t.idsitehsr),1),Object(r["createElementVNode"])("td",Di,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",Mi,Object(r["toDisplayString"])(t.created_date_pretty),1),Object(r["createElementVNode"])("td",Pi,Object(r["toDisplayString"])(t.sample_limit),1),"paused"===t.status?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",Ai,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.ucfirst(t.status))+" ",1),Object(r["createElementVNode"])("span",{class:"icon icon-help",title:e.pauseReason},null,8,Bi)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",Ui,Object(r["toDisplayString"])(e.ucfirst(t.status)),1)),Object(r["createElementVNode"])("td",Ii,[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",title:e.translate("HeatmapSessionRecording_EditX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:function(n){return e.editHsr(t.idsitehsr)}},null,8,Li),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action stopRecording icon-drop-crossed",title:e.translate("HeatmapSessionRecording_StopX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:function(n){return e.completeHsr(t)}},null,8,Fi),[[r["vShow"],"ended"!==t.status]]),Object(r["createElementVNode"])("a",{class:"table-action icon-show",title:e.translate("HeatmapSessionRecording_ViewReport"),href:e.getViewReportLink(t),target:"_blank"},null,8,Wi),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",title:e.translate("HeatmapSessionRecording_DeleteX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:function(n){return e.deleteHsr(t)}},null,8,qi)])],8,xi)})),128))])],512),[[c]]),Object(r["createElementVNode"])("div",zi,[Object(r["createElementVNode"])("a",{class:"createNewHsr",value:"",onClick:t[2]||(t[2]=function(t){return e.createHsr()})},[Gi,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_CreateNewSessionRecording")),1)])])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",$i,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_DeleteSessionRecordingConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Ji),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Xi)],512),Object(r["createElementVNode"])("div",Yi,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("HeatmapSessionRecording_EndSessionRecordingConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Ki),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Qi)],512)])}function er(e){return ir(e)||ar(e)||nr(e)||tr()}function tr(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nr(e,t){if(e){if("string"===typeof e)return rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rr(e,t):void 0}}function ar(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ir(e){if(Array.isArray(e))return rr(e)}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n', '
', ""), '');
+ personalInformationNote() {
+ const url = 'https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-content-on-your-website';
+ return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_PersonalInformationNote', Object(external_CoreHome_["translate"])('HeatmapSessionRecording_Heatmap'), '', '
', ``, '');
},
- saveButtonText: function saveButtonText() {
+ saveButtonText() {
return this.edit ? Object(external_CoreHome_["translate"])('CoreUpdater_UpdateTitle') : Object(external_CoreHome_["translate"])('HeatmapSessionRecording_CreateNewHeatmap');
}
}
@@ -4525,268 +3968,285 @@ var notificationId = 'hsrmanagement';
Editvue_type_script_lang_ts.render = Editvue_type_template_id_635b8e28_render
/* harmony default export */ var Edit = (Editvue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=template&id=669edce3
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=template&id=886570ca
-var Listvue_type_template_id_669edce3_hoisted_1 = {
+const Listvue_type_template_id_886570ca_hoisted_1 = {
class: "heatmapList"
};
-var Listvue_type_template_id_669edce3_hoisted_2 = {
+const Listvue_type_template_id_886570ca_hoisted_2 = {
class: "filterStatus"
};
-var Listvue_type_template_id_669edce3_hoisted_3 = {
+const Listvue_type_template_id_886570ca_hoisted_3 = {
class: "hsrSearchFilter",
style: {
"margin-left": "3.5px"
}
};
-var Listvue_type_template_id_669edce3_hoisted_4 = {
+const Listvue_type_template_id_886570ca_hoisted_4 = {
class: "index"
};
-var Listvue_type_template_id_669edce3_hoisted_5 = {
+const Listvue_type_template_id_886570ca_hoisted_5 = {
class: "name"
};
-var Listvue_type_template_id_669edce3_hoisted_6 = {
+const Listvue_type_template_id_886570ca_hoisted_6 = {
class: "creationDate"
};
-var Listvue_type_template_id_669edce3_hoisted_7 = {
+const Listvue_type_template_id_886570ca_hoisted_7 = {
class: "sampleLimit"
};
-var Listvue_type_template_id_669edce3_hoisted_8 = {
+const Listvue_type_template_id_886570ca_hoisted_8 = {
class: "status"
};
-var Listvue_type_template_id_669edce3_hoisted_9 = {
+const Listvue_type_template_id_886570ca_hoisted_9 = {
class: "action"
};
-var Listvue_type_template_id_669edce3_hoisted_10 = {
+const Listvue_type_template_id_886570ca_hoisted_10 = {
colspan: "7"
};
-var Listvue_type_template_id_669edce3_hoisted_11 = {
+const Listvue_type_template_id_886570ca_hoisted_11 = {
class: "loadingPiwik"
};
-
-var Listvue_type_template_id_669edce3_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+const Listvue_type_template_id_886570ca_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
src: "plugins/Morpheus/images/loading-blue.gif"
}, null, -1);
-
-var Listvue_type_template_id_669edce3_hoisted_13 = {
+const Listvue_type_template_id_886570ca_hoisted_13 = {
colspan: "7"
};
-var Listvue_type_template_id_669edce3_hoisted_14 = ["id"];
-var Listvue_type_template_id_669edce3_hoisted_15 = {
+const Listvue_type_template_id_886570ca_hoisted_14 = ["id"];
+const Listvue_type_template_id_886570ca_hoisted_15 = {
class: "index"
};
-var Listvue_type_template_id_669edce3_hoisted_16 = {
+const Listvue_type_template_id_886570ca_hoisted_16 = {
class: "name"
};
-var Listvue_type_template_id_669edce3_hoisted_17 = {
+const Listvue_type_template_id_886570ca_hoisted_17 = {
class: "creationDate"
};
-var Listvue_type_template_id_669edce3_hoisted_18 = {
+const Listvue_type_template_id_886570ca_hoisted_18 = {
class: "sampleLimit"
};
-var Listvue_type_template_id_669edce3_hoisted_19 = {
+const Listvue_type_template_id_886570ca_hoisted_19 = {
key: 0,
class: "status status-paused"
};
-var Listvue_type_template_id_669edce3_hoisted_20 = ["title"];
-var Listvue_type_template_id_669edce3_hoisted_21 = {
+const Listvue_type_template_id_886570ca_hoisted_20 = ["title"];
+const Listvue_type_template_id_886570ca_hoisted_21 = {
key: 1,
class: "status"
};
-var Listvue_type_template_id_669edce3_hoisted_22 = {
- class: "action"
-};
-var Listvue_type_template_id_669edce3_hoisted_23 = ["title", "onClick"];
-var Listvue_type_template_id_669edce3_hoisted_24 = ["title", "onClick"];
-var Listvue_type_template_id_669edce3_hoisted_25 = ["title", "href"];
-var Listvue_type_template_id_669edce3_hoisted_26 = ["title", "onClick"];
-var Listvue_type_template_id_669edce3_hoisted_27 = {
+const Listvue_type_template_id_886570ca_hoisted_22 = ["title", "onClick"];
+const Listvue_type_template_id_886570ca_hoisted_23 = ["title", "onClick"];
+const Listvue_type_template_id_886570ca_hoisted_24 = ["title", "href"];
+const Listvue_type_template_id_886570ca_hoisted_25 = ["title", "onClick"];
+const Listvue_type_template_id_886570ca_hoisted_26 = {
class: "tableActionBar"
};
-
-var Listvue_type_template_id_669edce3_hoisted_28 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+const Listvue_type_template_id_886570ca_hoisted_27 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
class: "icon-add"
}, null, -1);
-
-var Listvue_type_template_id_669edce3_hoisted_29 = {
+const Listvue_type_template_id_886570ca_hoisted_28 = {
class: "ui-confirm",
id: "confirmDeleteHeatmap",
ref: "confirmDeleteHeatmap"
};
-var Listvue_type_template_id_669edce3_hoisted_30 = ["value"];
-var Listvue_type_template_id_669edce3_hoisted_31 = ["value"];
-var Listvue_type_template_id_669edce3_hoisted_32 = {
+const Listvue_type_template_id_886570ca_hoisted_29 = ["value"];
+const Listvue_type_template_id_886570ca_hoisted_30 = ["value"];
+const Listvue_type_template_id_886570ca_hoisted_31 = {
class: "ui-confirm",
id: "confirmEndHeatmap",
ref: "confirmEndHeatmap"
};
-var Listvue_type_template_id_669edce3_hoisted_33 = ["value"];
-var Listvue_type_template_id_669edce3_hoisted_34 = ["value"];
-function Listvue_type_template_id_669edce3_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
-
- var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
-
- var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
-
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Listvue_type_template_id_669edce3_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, {
+const Listvue_type_template_id_886570ca_hoisted_32 = ["value"];
+const Listvue_type_template_id_886570ca_hoisted_33 = ["value"];
+function Listvue_type_template_id_886570ca_render(_ctx, _cache, $props, $setup, $data, $options) {
+ const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
+ const _component_EntityDuplicatorAction = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EntityDuplicatorAction");
+ const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
+ const _component_EntityDuplicatorModal = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EntityDuplicatorModal");
+ const _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, {
"content-title": _ctx.translate('HeatmapSessionRecording_ManageHeatmaps')
}, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_669edce3_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "select",
- name: "filterStatus",
- "model-value": _ctx.filterStatus,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
- _ctx.setFilterStatus($event);
- }),
- title: _ctx.translate('HeatmapSessionRecording_Filter'),
- "full-width": true,
- options: _ctx.statusOptions
- }, null, 8, ["model-value", "title", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_669edce3_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "text",
- name: "hsrSearch",
- title: _ctx.translate('General_Search'),
- modelValue: _ctx.searchFilter,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
- return _ctx.searchFilter = $event;
- }),
- "full-width": true
- }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hsrs.length > 0]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SampleLimit')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Status')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_669edce3_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_669edce3_hoisted_11, [Listvue_type_template_id_669edce3_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_NoHeatmapsFound')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading && _ctx.hsrs.length === 0]]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sortedHsrs, function (hsr) {
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", {
- id: "hsr".concat(hsr.idsitehsr),
- class: "hsrs",
- key: hsr.idsitehsr
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.idsitehsr), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.created_date_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.sample_limit), 1), hsr.status === 'paused' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_669edce3_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
- class: "icon icon-help",
- title: _ctx.pauseReason
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_20)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_669edce3_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)), 1)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_669edce3_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action icon-edit",
- title: _ctx.translate('HeatmapSessionRecording_EditX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
- onClick: function onClick($event) {
- return _ctx.editHsr(hsr.idsitehsr);
- }
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_23), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- a: "",
- class: "table-action stopRecording icon-drop-crossed",
- title: _ctx.translate('HeatmapSessionRecording_StopX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
- onClick: function onClick($event) {
- return _ctx.completeHsr(hsr);
- }
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], hsr.status !== 'ended']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- target: "_blank",
- class: "table-action icon-show",
- title: _ctx.translate('HeatmapSessionRecording_ViewReport'),
- href: _ctx.getViewReportLink(hsr)
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action icon-delete",
- title: _ctx.translate('HeatmapSessionRecording_DeleteX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
- onClick: function onClick($event) {
- return _ctx.deleteHsr(hsr);
- }
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_26)])], 8, Listvue_type_template_id_669edce3_hoisted_14);
- }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_669edce3_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "createNewHsr",
- value: "",
- onClick: _cache[2] || (_cache[2] = function ($event) {
- return _ctx.createHsr();
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "select",
+ name: "filterStatus",
+ "model-value": _ctx.filterStatus,
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => {
+ _ctx.setFilterStatus($event);
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_Filter'),
+ "full-width": true,
+ options: _ctx.statusOptions
+ }, null, 8, ["model-value", "title", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "text",
+ name: "hsrSearch",
+ title: _ctx.translate('General_Search'),
+ modelValue: _ctx.searchFilter,
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.searchFilter = $event),
+ "full-width": true
+ }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hsrs.length > 0]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SampleLimit')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Status')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_886570ca_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_886570ca_hoisted_11, [Listvue_type_template_id_886570ca_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_NoHeatmapsFound')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading && _ctx.hsrs.length === 0]]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sortedHsrs, hsr => {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", {
+ id: `hsr${hsr.idsitehsr}`,
+ class: "hsrs",
+ key: hsr.idsitehsr
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.idsitehsr), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.created_date_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_886570ca_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.sample_limit), 1), hsr.status === 'paused' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_886570ca_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+ class: "icon icon-help",
+ title: _ctx.pauseReason
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_20)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_886570ca_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)), 1)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", {
+ class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({
+ 'action': true,
+ 'duplicate-available': _ctx.isEntityDuplicatorAvailable
})
- }, [Listvue_type_template_id_669edce3_hoisted_28, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreateNewHeatmap')), 1)])])];
- }),
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action icon-edit",
+ title: _ctx.translate('HeatmapSessionRecording_EditX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
+ onClick: $event => _ctx.editHsr(hsr.idsitehsr)
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_22), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action stopRecording icon-drop-crossed",
+ title: _ctx.translate('HeatmapSessionRecording_StopX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
+ onClick: $event => _ctx.completeHsr(hsr)
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_23), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], hsr.status !== 'ended']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ target: "_blank",
+ class: "table-action icon-show",
+ title: _ctx.translate('HeatmapSessionRecording_ViewReport'),
+ href: _ctx.getViewReportLink(hsr)
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_24), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action icon-delete",
+ title: _ctx.translate('HeatmapSessionRecording_DeleteX', _ctx.translate('HeatmapSessionRecording_Heatmap')),
+ onClick: $event => _ctx.deleteHsr(hsr)
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EntityDuplicatorAction, {
+ actionFormData: {
+ idSiteHsr: hsr.idsitehsr
+ },
+ modalStore: _ctx.entityDuplicatorStore,
+ isActionVisible: _ctx.showDuplicatorAction,
+ isActionEnabled: _ctx.enableDuplicatorAction,
+ tooltipTextOverrideDisabled: _ctx.translate('HeatmapSessionRecording_QuotaReachedForX', _ctx.translate('HeatmapSessionRecording_Heatmap'), _ctx.translate('HeatmapSessionRecording_Heatmaps')),
+ extraClasses: ['heatmap-duplicate-action', `hsr-${hsr.idsitehsr}`]
+ }, null, 8, ["actionFormData", "modalStore", "isActionVisible", "isActionEnabled", "tooltipTextOverrideDisabled", "extraClasses"])], 2)], 8, Listvue_type_template_id_886570ca_hoisted_14);
+ }), 128))])])), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_26, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "createNewHsr",
+ value: "",
+ onClick: _cache[2] || (_cache[2] = $event => _ctx.createHsr())
+ }, [Listvue_type_template_id_886570ca_hoisted_27, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreateNewHeatmap')), 1)])])]),
_: 1
- }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_669edce3_hoisted_29, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_DeleteHeatmapConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_DeleteHeatmapConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "yes",
type: "button",
value: _ctx.translate('General_Yes')
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_30), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_29), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "no",
type: "button",
value: _ctx.translate('General_No')
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_31)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_669edce3_hoisted_32, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_EndHeatmapConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_30)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_886570ca_hoisted_31, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_EndHeatmapConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "yes",
type: "button",
value: _ctx.translate('General_Yes')
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_33), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_32), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "no",
type: "button",
value: _ctx.translate('General_No')
- }, null, 8, Listvue_type_template_id_669edce3_hoisted_34)], 512)]);
+ }, null, 8, Listvue_type_template_id_886570ca_hoisted_33)], 512)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EntityDuplicatorModal, {
+ modalStore: _ctx.entityDuplicatorStore
+ }, null, 8, ["modalStore"])], 64);
}
-// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=template&id=669edce3
-
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=script&lang=ts
-function Listvue_type_script_lang_ts_toConsumableArray(arr) { return Listvue_type_script_lang_ts_arrayWithoutHoles(arr) || Listvue_type_script_lang_ts_iterableToArray(arr) || Listvue_type_script_lang_ts_unsupportedIterableToArray(arr) || Listvue_type_script_lang_ts_nonIterableSpread(); }
-
-function Listvue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-
-function Listvue_type_script_lang_ts_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Listvue_type_script_lang_ts_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Listvue_type_script_lang_ts_arrayLikeToArray(o, minLen); }
-
-function Listvue_type_script_lang_ts_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-
-function Listvue_type_script_lang_ts_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Listvue_type_script_lang_ts_arrayLikeToArray(arr); }
-
-function Listvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=template&id=886570ca
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/List.vue?vue&type=script&lang=ts
+// Load these separately in case the version of core doesn't have the components yet
+const EntityDuplicatorModal = Object(external_CoreHome_["useExternalPluginComponent"])('CoreHome', 'EntityDuplicatorModal');
+const EntityDuplicatorAction = Object(external_CoreHome_["useExternalPluginComponent"])('CoreHome', 'EntityDuplicatorAction');
+// Load the class similar to useExternalPluginComponent, but for something other than a component
+let EntityDuplicatorStore = undefined;
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+Object(external_CoreHome_["importPluginUmd"])('CoreHome').then(module => {
+ EntityDuplicatorStore = module === null || module === void 0 ? void 0 : module.EntityDuplicatorStore;
+});
/* harmony default export */ var Listvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
props: {
pauseReason: String
},
components: {
ContentBlock: external_CoreHome_["ContentBlock"],
- Field: external_CorePluginsAdmin_["Field"]
+ Field: external_CorePluginsAdmin_["Field"],
+ EntityDuplicatorModal,
+ EntityDuplicatorAction
},
directives: {
ContentTable: external_CoreHome_["ContentTable"]
},
- data: function data() {
+ data() {
return {
- searchFilter: ''
+ searchFilter: '',
+ showDuplicatorAction: true,
+ enableDuplicatorAction: false,
+ entityDuplicatorStore: typeof EntityDuplicatorStore !== 'undefined' ? EntityDuplicatorStore.buildStoreInstance('HeatmapSessionRecording_Heatmap', {
+ method: 'HeatmapSessionRecording.duplicateHeatmap',
+ requiredFields: ['idSite', 'idDestinationSites', 'idSiteHsr']
+ }) : undefined
};
},
- created: function created() {
+ created() {
HeatmapStore.setFilterStatus('');
HeatmapStore.fetchHsrs();
},
+ mounted() {
+ // Check whether adding heatmaps is allowed. It will disable the action if it isn't
+ this.checkIsAddingHeatmapAllowed();
+ // If the adapter is defined, cast it to the expected type and override any necessary methods.
+ if (this.entityDuplicatorStore) {
+ const adapter = this.entityDuplicatorStore.adapter;
+ adapter.onSuccessCallback = response => new Promise(resolve => {
+ var _response$additionalD, _response$additionalD2, _response$additionalD3;
+ // Check if reloading is even necessary. If the current site isn't a destination skip reload
+ const idSite = (_response$additionalD = response.additionalData) === null || _response$additionalD === void 0 ? void 0 : _response$additionalD.idSite;
+ if ((_response$additionalD2 = response.additionalData) !== null && _response$additionalD2 !== void 0 && _response$additionalD2.idSite && Array.isArray((_response$additionalD3 = response.additionalData) === null || _response$additionalD3 === void 0 ? void 0 : _response$additionalD3.idDestinationSites) && !response.additionalData.idDestinationSites.some(id => +id === +idSite)) {
+ return resolve();
+ }
+ return HeatmapStore.reload().then(() => resolve());
+ });
+ }
+ },
methods: {
- createHsr: function createHsr() {
+ createHsr() {
this.editHsr(0);
},
- editHsr: function editHsr(idSiteHsr) {
+ editHsr(idSiteHsr) {
external_CoreHome_["MatomoUrl"].updateHash(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, {
- idSiteHsr: idSiteHsr
+ idSiteHsr
}));
},
- deleteHsr: function deleteHsr(hsr) {
+ deleteHsr(hsr) {
external_CoreHome_["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteHeatmap, {
- yes: function yes() {
- HeatmapStore.deleteHsr(hsr.idsitehsr).then(function () {
+ yes: () => {
+ HeatmapStore.deleteHsr(hsr.idsitehsr).then(() => {
HeatmapStore.reload();
external_CoreHome_["Matomo"].postEvent('updateReportingMenu');
});
}
});
},
- completeHsr: function completeHsr(hsr) {
+ completeHsr(hsr) {
external_CoreHome_["Matomo"].helper.modalConfirm(this.$refs.confirmEndHeatmap, {
- yes: function yes() {
- HeatmapStore.completeHsr(hsr.idsitehsr).then(function () {
+ yes: () => {
+ HeatmapStore.completeHsr(hsr.idsitehsr).then(() => {
HeatmapStore.reload();
});
}
});
},
- setFilterStatus: function setFilterStatus(filter) {
+ setFilterStatus(filter) {
HeatmapStore.setFilterStatus(filter);
},
- ucfirst: function ucfirst(s) {
- return "".concat(s[0].toUpperCase()).concat(s.substr(1));
+ ucfirst(s) {
+ return `${s[0].toUpperCase()}${s.substr(1)}`;
},
- getViewReportLink: function getViewReportLink(hsr) {
- return "?".concat(external_CoreHome_["MatomoUrl"].stringify({
+ getViewReportLink(hsr) {
+ return `?${external_CoreHome_["MatomoUrl"].stringify({
module: 'Widgetize',
action: 'iframe',
moduleToWidgetize: 'HeatmapSessionRecording',
@@ -4795,41 +4255,46 @@ function Listvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == nul
idSite: hsr.idsite,
period: 'day',
date: 'yesterday'
- }));
+ })}`;
+ },
+ checkIsAddingHeatmapAllowed() {
+ // Post event so that Billing, etc. can indicate whether adding another heatmap is allowed
+ const parameters = {
+ isAllowed: true
+ };
+ external_CoreHome_["Matomo"].postEvent('HeatmapSessionRecording.initAddHeatmap', parameters);
+ this.enableDuplicatorAction = parameters && parameters.isAllowed === true;
+ return !this.enableDuplicatorAction;
}
},
computed: {
- filterStatus: function filterStatus() {
+ filterStatus() {
return HeatmapStore.state.value.filterStatus;
},
- statusOptions: function statusOptions() {
+ statusOptions() {
return HeatmapStore.statusOptions;
},
- hsrs: function hsrs() {
+ hsrs() {
return HeatmapStore.hsrs.value;
},
- isLoading: function isLoading() {
+ isLoading() {
return HeatmapStore.state.value.isLoading;
},
- isUpdating: function isUpdating() {
+ isUpdating() {
return HeatmapStore.state.value.isUpdating;
},
- sortedHsrs: function sortedHsrs() {
- var _this = this;
-
+ sortedHsrs() {
// look through string properties of heatmaps for values that have searchFilter in them
// (mimics angularjs filter() filter)
- var result = Listvue_type_script_lang_ts_toConsumableArray(this.hsrs).filter(function (h) {
- return Object.keys(h).some(function (propName) {
- var entity = h;
- return typeof entity[propName] === 'string' && entity[propName].indexOf(_this.searchFilter) !== -1;
- });
- });
-
- result.sort(function (lhs, rhs) {
- return rhs.idsitehsr - lhs.idsitehsr;
- });
+ const result = [...this.hsrs].filter(h => Object.keys(h).some(propName => {
+ const entity = h;
+ return typeof entity[propName] === 'string' && entity[propName].indexOf(this.searchFilter) !== -1;
+ }));
+ result.sort((lhs, rhs) => rhs.idsitehsr - lhs.idsitehsr);
return result;
+ },
+ isEntityDuplicatorAvailable() {
+ return typeof EntityDuplicatorStore !== 'undefined';
}
}
}));
@@ -4839,28 +4304,25 @@ function Listvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == nul
-Listvue_type_script_lang_ts.render = Listvue_type_template_id_669edce3_render
+Listvue_type_script_lang_ts.render = Listvue_type_template_id_886570ca_render
/* harmony default export */ var List = (Listvue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ManageHeatmap/Manage.vue?vue&type=template&id=56c7eaa3
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/Manage.vue?vue&type=template&id=56c7eaa3
-var Managevue_type_template_id_56c7eaa3_hoisted_1 = {
+const Managevue_type_template_id_56c7eaa3_hoisted_1 = {
class: "manageHsr",
ref: "root"
};
-var Managevue_type_template_id_56c7eaa3_hoisted_2 = {
+const Managevue_type_template_id_56c7eaa3_hoisted_2 = {
key: 0
};
-var Managevue_type_template_id_56c7eaa3_hoisted_3 = {
+const Managevue_type_template_id_56c7eaa3_hoisted_3 = {
key: 1
};
function Managevue_type_template_id_56c7eaa3_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
-
- var _component_HeatmapList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapList");
-
- var _component_HeatmapEdit = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapEdit");
-
+ const _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
+ const _component_HeatmapList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapList");
+ const _component_HeatmapEdit = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapEdit");
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [!_ctx.editMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_MatomoJsNotWritableAlert, {
key: 0,
"is-matomo-js-writable": _ctx.isMatomoJsWritable,
@@ -4875,9 +4337,9 @@ function Managevue_type_template_id_56c7eaa3_render(_ctx, _cache, $props, $setup
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/Manage.vue?vue&type=template&id=56c7eaa3
-// 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/HeatmapSessionRecording/vue/src/MatomoJsNotWritable/MatomoJsNotWritableAlert.vue?vue&type=template&id=3eefb154
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/MatomoJsNotWritable/MatomoJsNotWritableAlert.vue?vue&type=template&id=3eefb154
-var MatomoJsNotWritableAlertvue_type_template_id_3eefb154_hoisted_1 = ["innerHTML"];
+const MatomoJsNotWritableAlertvue_type_template_id_3eefb154_hoisted_1 = ["innerHTML"];
function MatomoJsNotWritableAlertvue_type_template_id_3eefb154_render(_ctx, _cache, $props, $setup, $data, $options) {
return !_ctx.isMatomoJsWritable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
key: 0,
@@ -4887,7 +4349,7 @@ function MatomoJsNotWritableAlertvue_type_template_id_3eefb154_render(_ctx, _cac
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/MatomoJsNotWritable/MatomoJsNotWritableAlert.vue?vue&type=template&id=3eefb154
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/MatomoJsNotWritable/MatomoJsNotWritableAlert.vue?vue&type=script&lang=ts
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/MatomoJsNotWritable/MatomoJsNotWritableAlert.vue?vue&type=script&lang=ts
/* harmony default export */ var MatomoJsNotWritableAlertvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
@@ -4902,7 +4364,7 @@ function MatomoJsNotWritableAlertvue_type_template_id_3eefb154_render(_ctx, _cac
}
},
methods: {
- getJsNotWritableErrorMessage: function getJsNotWritableErrorMessage() {
+ getJsNotWritableErrorMessage() {
return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_MatomoJSNotWritableErrorMessage', this.recordingType, '', '');
}
}
@@ -4916,14 +4378,15 @@ function MatomoJsNotWritableAlertvue_type_template_id_3eefb154_render(_ctx, _cac
MatomoJsNotWritableAlertvue_type_script_lang_ts.render = MatomoJsNotWritableAlertvue_type_template_id_3eefb154_render
/* harmony default export */ var MatomoJsNotWritableAlert = (MatomoJsNotWritableAlertvue_type_script_lang_ts);
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/Manage.vue?vue&type=script&lang=ts
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageHeatmap/Manage.vue?vue&type=script&lang=ts
-var Managevue_type_script_lang_ts_window = window,
- Managevue_type_script_lang_ts_$ = Managevue_type_script_lang_ts_window.$;
+const {
+ $: Managevue_type_script_lang_ts_$
+} = window;
/* harmony default export */ var Managevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
props: {
breakpointMobile: Number,
@@ -4934,7 +4397,7 @@ var Managevue_type_script_lang_ts_window = window,
required: true
}
},
- data: function data() {
+ data() {
return {
editMode: false,
idSiteHsr: null
@@ -4946,48 +4409,41 @@ var Managevue_type_script_lang_ts_window = window,
HeatmapEdit: Edit
},
watch: {
- editMode: function editMode() {
+ editMode() {
// when changing edit modes, the tooltip can sometimes get stuck on the screen
Managevue_type_script_lang_ts_$('.ui-tooltip').remove();
}
},
- created: function created() {
- var _this = this;
-
+ created() {
// doing this in a watch because we don't want to post an event in a computed property
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
- return external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr;
- }, function (idSiteHsr) {
- _this.initState(idSiteHsr);
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr, idSiteHsr => {
+ this.initState(idSiteHsr);
});
this.initState(external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr);
},
methods: {
- removeAnyHsrNotification: function removeAnyHsrNotification() {
+ removeAnyHsrNotification() {
external_CoreHome_["NotificationsStore"].remove('hsrmanagement');
},
- initState: function initState(idSiteHsr) {
+ initState(idSiteHsr) {
if (idSiteHsr) {
if (idSiteHsr === '0') {
- var parameters = {
+ const parameters = {
isAllowed: true
};
external_CoreHome_["Matomo"].postEvent('HeatmapSessionRecording.initAddHeatmap', parameters);
-
if (parameters && !parameters.isAllowed) {
this.editMode = false;
this.idSiteHsr = null;
return;
}
}
-
this.editMode = true;
this.idSiteHsr = parseInt(idSiteHsr, 10);
} else {
this.editMode = false;
this.idSiteHsr = null;
}
-
this.removeAnyHsrNotification();
}
}
@@ -5001,235 +4457,188 @@ var Managevue_type_script_lang_ts_window = window,
Managevue_type_script_lang_ts.render = Managevue_type_template_id_56c7eaa3_render
/* harmony default export */ var Manage = (Managevue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ManageSessionRecording/Edit.vue?vue&type=template&id=56c3e386
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Edit.vue?vue&type=template&id=56c3e386
-var Editvue_type_template_id_56c3e386_hoisted_1 = {
+const Editvue_type_template_id_56c3e386_hoisted_1 = {
class: "loadingPiwik"
};
-
-var Editvue_type_template_id_56c3e386_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+const Editvue_type_template_id_56c3e386_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
src: "plugins/Morpheus/images/loading-blue.gif"
}, null, -1);
-
-var Editvue_type_template_id_56c3e386_hoisted_3 = {
+const Editvue_type_template_id_56c3e386_hoisted_3 = {
class: "loadingPiwik"
};
-
-var Editvue_type_template_id_56c3e386_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+const Editvue_type_template_id_56c3e386_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
src: "plugins/Morpheus/images/loading-blue.gif"
}, null, -1);
-
-var Editvue_type_template_id_56c3e386_hoisted_5 = {
+const Editvue_type_template_id_56c3e386_hoisted_5 = {
name: "name"
};
-var Editvue_type_template_id_56c3e386_hoisted_6 = {
+const Editvue_type_template_id_56c3e386_hoisted_6 = {
name: "sampleLimit"
};
-var Editvue_type_template_id_56c3e386_hoisted_7 = {
+const Editvue_type_template_id_56c3e386_hoisted_7 = {
class: "form-group row"
};
-var Editvue_type_template_id_56c3e386_hoisted_8 = {
+const Editvue_type_template_id_56c3e386_hoisted_8 = {
class: "col s12"
};
-var Editvue_type_template_id_56c3e386_hoisted_9 = {
+const Editvue_type_template_id_56c3e386_hoisted_9 = {
class: "col s12 m6",
style: {
"padding-left": "0"
}
};
-
-var Editvue_type_template_id_56c3e386_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("hr", null, null, -1);
-
-var Editvue_type_template_id_56c3e386_hoisted_11 = {
+const Editvue_type_template_id_56c3e386_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("hr", null, null, -1);
+const Editvue_type_template_id_56c3e386_hoisted_11 = {
class: "col s12 m6"
};
-var Editvue_type_template_id_56c3e386_hoisted_12 = {
+const Editvue_type_template_id_56c3e386_hoisted_12 = {
class: "form-help"
};
-var Editvue_type_template_id_56c3e386_hoisted_13 = {
+const Editvue_type_template_id_56c3e386_hoisted_13 = {
class: "inline-help"
};
-var Editvue_type_template_id_56c3e386_hoisted_14 = {
+const Editvue_type_template_id_56c3e386_hoisted_14 = {
name: "sampleRate"
};
-var Editvue_type_template_id_56c3e386_hoisted_15 = {
+const Editvue_type_template_id_56c3e386_hoisted_15 = {
name: "minSessionTime"
};
-var Editvue_type_template_id_56c3e386_hoisted_16 = {
+const Editvue_type_template_id_56c3e386_hoisted_16 = {
name: "requiresActivity"
};
-var Editvue_type_template_id_56c3e386_hoisted_17 = {
+const Editvue_type_template_id_56c3e386_hoisted_17 = {
class: "inline-help-node"
};
-var Editvue_type_template_id_56c3e386_hoisted_18 = ["innerHTML"];
-var Editvue_type_template_id_56c3e386_hoisted_19 = ["innerHTML"];
-var Editvue_type_template_id_56c3e386_hoisted_20 = {
+const Editvue_type_template_id_56c3e386_hoisted_18 = ["innerHTML"];
+const Editvue_type_template_id_56c3e386_hoisted_19 = ["innerHTML"];
+const Editvue_type_template_id_56c3e386_hoisted_20 = {
class: "entityCancel"
};
function Editvue_type_template_id_56c3e386_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
-
- var _component_HsrUrlTarget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HsrUrlTarget");
-
- var _component_HsrTargetTest = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HsrTargetTest");
-
- var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton");
-
- var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
-
+ const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
+ const _component_HsrUrlTarget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HsrUrlTarget");
+ const _component_HsrTargetTest = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HsrTargetTest");
+ const _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton");
+ const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_ContentBlock, {
class: "editHsr",
"content-title": _ctx.contentTitle
}, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_1, [Editvue_type_template_id_56c3e386_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_3, [Editvue_type_template_id_56c3e386_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_UpdatingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", {
- onSubmit: _cache[10] || (_cache[10] = function ($event) {
- return _ctx.edit ? _ctx.updateHsr() : _ctx.createHsr();
- })
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "text",
- name: "name",
- "model-value": _ctx.siteHsr.name,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
- _ctx.siteHsr.name = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('General_Name'),
- maxlength: 50,
- placeholder: _ctx.translate('HeatmapSessionRecording_FieldNamePlaceholder'),
- "inline-help": _ctx.translate('HeatmapSessionRecording_SessionNameHelp')
- }, null, 8, ["model-value", "title", "placeholder", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "select",
- name: "sampleLimit",
- "model-value": _ctx.siteHsr.sample_limit,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
- _ctx.siteHsr.sample_limit = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('HeatmapSessionRecording_SessionSampleLimit'),
- options: _ctx.sampleLimits,
- "inline-help": _ctx.translate('HeatmapSessionRecording_SessionSampleLimitHelp')
- }, null, 8, ["model-value", "title", "options", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_TargetPages')) + ":", 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_9, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.siteHsr.match_page_rules, function (url, index) {
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
- class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("matchPageRules ".concat(index, " multiple")),
- key: index
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HsrUrlTarget, {
- "model-value": url,
- "onUpdate:modelValue": function onUpdateModelValue($event) {
- return _ctx.setMatchPageRule($event, index);
- },
- onAddUrl: _cache[2] || (_cache[2] = function ($event) {
- return _ctx.addMatchPageRule();
- }),
- onRemoveUrl: function onRemoveUrl($event) {
- return _ctx.removeMatchPageRule(index);
- },
- onAnyChange: _cache[3] || (_cache[3] = function ($event) {
- return _ctx.setValueHasChanged();
- }),
- "allow-any": true,
- "disable-if-no-value": index > 0,
- "can-be-removed": index > 0,
- "show-add-url": true
- }, null, 8, ["model-value", "onUpdate:modelValue", "onRemoveUrl", "disable-if-no-value", "can-be-removed"])]), Editvue_type_template_id_56c3e386_hoisted_10], 2);
- }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_FieldIncludedTargetsHelpSessions')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HsrTargetTest, {
- "included-targets": _ctx.siteHsr.match_page_rules
- }, null, 8, ["included-targets"])])])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "select",
- name: "sampleRate",
- "model-value": _ctx.siteHsr.sample_rate,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
- _ctx.siteHsr.sample_rate = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('HeatmapSessionRecording_SampleRate'),
- options: _ctx.sampleRates,
- introduction: _ctx.translate('HeatmapSessionRecording_AdvancedOptions'),
- "inline-help": _ctx.translate('HeatmapSessionRecording_SessionSampleRateHelp')
- }, null, 8, ["model-value", "title", "options", "introduction", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "select",
- name: "minSessionTime",
- "model-value": _ctx.siteHsr.min_session_time,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
- _ctx.siteHsr.min_session_time = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('HeatmapSessionRecording_MinSessionTime'),
- options: _ctx.minSessionTimes,
- "inline-help": _ctx.translate('HeatmapSessionRecording_MinSessionTimeHelp')
- }, null, 8, ["model-value", "title", "options", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "checkbox",
- name: "requiresActivity",
- "model-value": _ctx.siteHsr.requires_activity,
- "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
- _ctx.siteHsr.requires_activity = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('HeatmapSessionRecording_RequiresActivity'),
- "inline-help": _ctx.translate('HeatmapSessionRecording_RequiresActivityHelp')
- }, null, 8, ["model-value", "title", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "checkbox",
- name: "captureKeystrokes",
- "model-value": _ctx.siteHsr.capture_keystrokes,
- "onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) {
- _ctx.siteHsr.capture_keystrokes = $event;
-
- _ctx.setValueHasChanged();
- }),
- title: _ctx.translate('HeatmapSessionRecording_CaptureKeystrokes')
- }, {
- "inline-help": Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
- innerHTML: _ctx.$sanitize(_ctx.captureKeystrokesHelp)
- }, null, 8, Editvue_type_template_id_56c3e386_hoisted_18)])];
- }),
- _: 1
- }, 8, ["model-value", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", {
- innerHTML: _ctx.$sanitize(_ctx.personalInformationNote)
- }, null, 8, Editvue_type_template_id_56c3e386_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SaveButton, {
- class: "createButton",
- onConfirm: _cache[8] || (_cache[8] = function ($event) {
- return _ctx.edit ? _ctx.updateHsr() : _ctx.createHsr();
- }),
- disabled: _ctx.isUpdating || !_ctx.isDirty,
- saving: _ctx.isUpdating,
- value: _ctx.saveButtonText
- }, null, 8, ["disabled", "saving", "value"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- onClick: _cache[9] || (_cache[9] = function ($event) {
- return _ctx.cancel();
- })
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Cancel')), 1)])])], 32)];
- }),
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_1, [Editvue_type_template_id_56c3e386_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_3, [Editvue_type_template_id_56c3e386_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_UpdatingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", {
+ onSubmit: _cache[10] || (_cache[10] = $event => _ctx.edit ? _ctx.updateHsr() : _ctx.createHsr())
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "text",
+ name: "name",
+ "model-value": _ctx.siteHsr.name,
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => {
+ _ctx.siteHsr.name = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('General_Name'),
+ maxlength: 50,
+ placeholder: _ctx.translate('HeatmapSessionRecording_FieldNamePlaceholder'),
+ "inline-help": _ctx.translate('HeatmapSessionRecording_SessionNameHelp')
+ }, null, 8, ["model-value", "title", "placeholder", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "select",
+ name: "sampleLimit",
+ "model-value": _ctx.siteHsr.sample_limit,
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => {
+ _ctx.siteHsr.sample_limit = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_SessionSampleLimit'),
+ options: _ctx.sampleLimits,
+ "inline-help": _ctx.translate('HeatmapSessionRecording_SessionSampleLimitHelp')
+ }, null, 8, ["model-value", "title", "options", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_TargetPages')) + ":", 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_9, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.siteHsr.match_page_rules, (url, index) => {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
+ class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`matchPageRules ${index} multiple`),
+ key: index
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HsrUrlTarget, {
+ "model-value": url,
+ "onUpdate:modelValue": $event => _ctx.setMatchPageRule($event, index),
+ onAddUrl: _cache[2] || (_cache[2] = $event => _ctx.addMatchPageRule()),
+ onRemoveUrl: $event => _ctx.removeMatchPageRule(index),
+ onAnyChange: _cache[3] || (_cache[3] = $event => _ctx.setValueHasChanged()),
+ "allow-any": true,
+ "disable-if-no-value": index > 0,
+ "can-be-removed": index > 0,
+ "show-add-url": true
+ }, null, 8, ["model-value", "onUpdate:modelValue", "onRemoveUrl", "disable-if-no-value", "can-be-removed"])]), Editvue_type_template_id_56c3e386_hoisted_10], 2);
+ }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_56c3e386_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_FieldIncludedTargetsHelpSessions')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HsrTargetTest, {
+ "included-targets": _ctx.siteHsr.match_page_rules
+ }, null, 8, ["included-targets"])])])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "select",
+ name: "sampleRate",
+ "model-value": _ctx.siteHsr.sample_rate,
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => {
+ _ctx.siteHsr.sample_rate = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_SampleRate'),
+ options: _ctx.sampleRates,
+ introduction: _ctx.translate('HeatmapSessionRecording_AdvancedOptions'),
+ "inline-help": _ctx.translate('HeatmapSessionRecording_SessionSampleRateHelp')
+ }, null, 8, ["model-value", "title", "options", "introduction", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "select",
+ name: "minSessionTime",
+ "model-value": _ctx.siteHsr.min_session_time,
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => {
+ _ctx.siteHsr.min_session_time = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_MinSessionTime'),
+ options: _ctx.minSessionTimes,
+ "inline-help": _ctx.translate('HeatmapSessionRecording_MinSessionTimeHelp')
+ }, null, 8, ["model-value", "title", "options", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "checkbox",
+ name: "requiresActivity",
+ "model-value": _ctx.siteHsr.requires_activity,
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => {
+ _ctx.siteHsr.requires_activity = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_RequiresActivity'),
+ "inline-help": _ctx.translate('HeatmapSessionRecording_RequiresActivityHelp')
+ }, null, 8, ["model-value", "title", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "checkbox",
+ name: "captureKeystrokes",
+ "model-value": _ctx.siteHsr.capture_keystrokes,
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => {
+ _ctx.siteHsr.capture_keystrokes = $event;
+ _ctx.setValueHasChanged();
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_CaptureKeystrokes')
+ }, {
+ "inline-help": Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+ innerHTML: _ctx.$sanitize(_ctx.captureKeystrokesHelp)
+ }, null, 8, Editvue_type_template_id_56c3e386_hoisted_18)])]),
+ _: 1
+ }, 8, ["model-value", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", {
+ innerHTML: _ctx.$sanitize(_ctx.personalInformationNote)
+ }, null, 8, Editvue_type_template_id_56c3e386_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SaveButton, {
+ class: "createButton",
+ onConfirm: _cache[8] || (_cache[8] = $event => _ctx.edit ? _ctx.updateHsr() : _ctx.createHsr()),
+ disabled: _ctx.isUpdating || !_ctx.isDirty,
+ saving: _ctx.isUpdating,
+ value: _ctx.saveButtonText
+ }, null, 8, ["disabled", "saving", "value"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_56c3e386_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ onClick: _cache[9] || (_cache[9] = $event => _ctx.cancel())
+ }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Cancel')), 1)])])], 32)]),
_: 1
}, 8, ["content-title"]);
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Edit.vue?vue&type=template&id=56c3e386
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Edit.vue?vue&type=script&lang=ts
-function Editvue_type_script_lang_ts_toConsumableArray(arr) { return Editvue_type_script_lang_ts_arrayWithoutHoles(arr) || Editvue_type_script_lang_ts_iterableToArray(arr) || ManageSessionRecording_Editvue_type_script_lang_ts_unsupportedIterableToArray(arr) || Editvue_type_script_lang_ts_nonIterableSpread(); }
-
-function Editvue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-
-function ManageSessionRecording_Editvue_type_script_lang_ts_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ManageSessionRecording_Editvue_type_script_lang_ts_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ManageSessionRecording_Editvue_type_script_lang_ts_arrayLikeToArray(o, minLen); }
-
-function Editvue_type_script_lang_ts_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-
-function Editvue_type_script_lang_ts_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ManageSessionRecording_Editvue_type_script_lang_ts_arrayLikeToArray(arr); }
-
-function ManageSessionRecording_Editvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
-
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Edit.vue?vue&type=script&lang=ts
-var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
+const Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
/* harmony default export */ var ManageSessionRecording_Editvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
props: {
idSiteHsr: Number
@@ -5241,7 +4650,7 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
HsrTargetTest: HsrTargetTest,
SaveButton: external_CorePluginsAdmin_["SaveButton"]
},
- data: function data() {
+ data() {
return {
isDirty: false,
showAdvancedView: false,
@@ -5249,74 +4658,64 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
siteHsr: {}
};
},
- created: function created() {
- var _this = this;
-
+ created() {
external_CoreHome_["AjaxHelper"].fetch({
method: 'HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits'
- }).then(function (sampleLimits) {
- _this.sampleLimits = (sampleLimits || []).map(function (l) {
- return {
- key: "".concat(l),
- value: l
- };
- });
+ }).then(sampleLimits => {
+ this.sampleLimits = (sampleLimits || []).map(l => ({
+ key: `${l}`,
+ value: l
+ }));
});
this.init();
},
watch: {
- idSiteHsr: function idSiteHsr(newValue) {
+ idSiteHsr(newValue) {
if (newValue === null) {
return;
}
-
this.init();
}
},
methods: {
- removeAnyHsrNotification: function removeAnyHsrNotification() {
+ removeAnyHsrNotification() {
external_CoreHome_["NotificationsStore"].remove(Editvue_type_script_lang_ts_notificationId);
external_CoreHome_["NotificationsStore"].remove('ajaxHelper');
},
- showNotification: function showNotification(message, context) {
- var instanceId = external_CoreHome_["NotificationsStore"].show({
- message: message,
- context: context,
+ showNotification(message, context) {
+ const instanceId = external_CoreHome_["NotificationsStore"].show({
+ message,
+ context,
id: Editvue_type_script_lang_ts_notificationId,
type: 'transient'
});
- setTimeout(function () {
+ setTimeout(() => {
external_CoreHome_["NotificationsStore"].scrollToNotification(instanceId);
}, 200);
},
- showErrorFieldNotProvidedNotification: function showErrorFieldNotProvidedNotification(title) {
- var message = Object(external_CoreHome_["translate"])('HeatmapSessionRecording_ErrorXNotProvided', [title]);
+ showErrorFieldNotProvidedNotification(title) {
+ const message = Object(external_CoreHome_["translate"])('HeatmapSessionRecording_ErrorXNotProvided', [title]);
this.showNotification(message, 'error');
},
- init: function init() {
- var _this2 = this;
-
- var idSiteHsr = this.idSiteHsr;
+ init() {
+ const {
+ idSiteHsr
+ } = this;
this.siteHsr = {};
this.showAdvancedView = false;
external_CoreHome_["Matomo"].helper.lazyScrollToContent();
-
if (this.edit && idSiteHsr) {
- SessionRecordingStore.findHsr(idSiteHsr).then(function (siteHsr) {
+ SessionRecordingStore.findHsr(idSiteHsr).then(siteHsr => {
if (!siteHsr) {
return;
}
-
- _this2.siteHsr = Object(external_CoreHome_["clone"])(siteHsr);
- _this2.siteHsr.sample_rate = "".concat(_this2.siteHsr.sample_rate);
-
- _this2.addInitialMatchPageRule();
-
- _this2.isDirty = false;
+ this.siteHsr = Object(external_CoreHome_["clone"])(siteHsr);
+ this.siteHsr.sample_rate = `${this.siteHsr.sample_rate}`;
+ this.addInitialMatchPageRule();
+ this.isDirty = false;
});
return;
}
-
if (this.create) {
this.siteHsr = {
idSite: external_CoreHome_["Matomo"].idSite,
@@ -5331,17 +4730,14 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
this.isDirty = false;
}
},
- addInitialMatchPageRule: function addInitialMatchPageRule() {
+ addInitialMatchPageRule() {
var _this$siteHsr$match_p;
-
if (!this.siteHsr) {
return;
}
-
if ((_this$siteHsr$match_p = this.siteHsr.match_page_rules) !== null && _this$siteHsr$match_p !== void 0 && _this$siteHsr$match_p.length) {
return;
}
-
this.siteHsr.match_page_rules = [{
attribute: 'url',
type: 'any',
@@ -5349,17 +4745,14 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
inverted: 0
}];
},
- addMatchPageRule: function addMatchPageRule() {
+ addMatchPageRule() {
var _this$siteHsr$match_p2;
-
if (!this.siteHsr) {
return;
}
-
if (!((_this$siteHsr$match_p2 = this.siteHsr.match_page_rules) !== null && _this$siteHsr$match_p2 !== void 0 && _this$siteHsr$match_p2.length)) {
this.siteHsr.match_page_rules = [];
}
-
this.siteHsr.match_page_rules.push({
attribute: 'url',
type: 'equals_simple',
@@ -5368,143 +4761,123 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
});
this.isDirty = true;
},
- removeMatchPageRule: function removeMatchPageRule(index) {
+ removeMatchPageRule(index) {
if (this.siteHsr && index > -1) {
- this.siteHsr.match_page_rules = Editvue_type_script_lang_ts_toConsumableArray(this.siteHsr.match_page_rules);
+ this.siteHsr.match_page_rules = [...this.siteHsr.match_page_rules];
this.siteHsr.match_page_rules.splice(index, 1);
this.isDirty = true;
}
},
- cancel: function cancel() {
- var newParams = Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value);
+ cancel() {
+ const newParams = Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value);
delete newParams.idSiteHsr;
external_CoreHome_["MatomoUrl"].updateHash(newParams);
},
- createHsr: function createHsr() {
- var _this3 = this;
-
+ createHsr() {
this.removeAnyHsrNotification();
-
if (!this.checkRequiredFieldsAreSet()) {
return;
}
-
- SessionRecordingStore.createOrUpdateHsr(this.siteHsr, 'HeatmapSessionRecording.addSessionRecording').then(function (response) {
+ SessionRecordingStore.createOrUpdateHsr(this.siteHsr, 'HeatmapSessionRecording.addSessionRecording').then(response => {
if (!response || response.type === 'error' || !response.response) {
return;
}
-
- _this3.isDirty = false;
- var idSiteHsr = response.response.value;
- SessionRecordingStore.reload().then(function () {
+ this.isDirty = false;
+ const idSiteHsr = response.response.value;
+ SessionRecordingStore.reload().then(() => {
if (external_CoreHome_["Matomo"].helper.isReportingPage()) {
external_CoreHome_["Matomo"].postEvent('updateReportingMenu');
}
-
external_CoreHome_["MatomoUrl"].updateHash(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, {
- idSiteHsr: idSiteHsr
+ idSiteHsr
}));
- setTimeout(function () {
- _this3.showNotification(Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecordingCreated'), response.type);
+ setTimeout(() => {
+ this.showNotification(Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecordingCreated'), response.type);
}, 200);
});
});
},
- setValueHasChanged: function setValueHasChanged() {
+ setValueHasChanged() {
this.isDirty = true;
},
- updateHsr: function updateHsr() {
- var _this4 = this;
-
+ updateHsr() {
this.removeAnyHsrNotification();
-
if (!this.checkRequiredFieldsAreSet()) {
return;
}
-
- SessionRecordingStore.createOrUpdateHsr(this.siteHsr, 'HeatmapSessionRecording.updateSessionRecording').then(function (response) {
+ SessionRecordingStore.createOrUpdateHsr(this.siteHsr, 'HeatmapSessionRecording.updateSessionRecording').then(response => {
if (response.type === 'error') {
return;
}
-
- _this4.isDirty = false;
- _this4.siteHsr = {};
- SessionRecordingStore.reload().then(function () {
- _this4.init();
+ this.isDirty = false;
+ this.siteHsr = {};
+ SessionRecordingStore.reload().then(() => {
+ this.init();
});
-
- _this4.showNotification(Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecordingUpdated'), response.type);
+ this.showNotification(Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecordingUpdated'), response.type);
});
},
- checkRequiredFieldsAreSet: function checkRequiredFieldsAreSet() {
+ checkRequiredFieldsAreSet() {
var _this$siteHsr$match_p3;
-
if (!this.siteHsr.name) {
- var title = this.translate('General_Name');
+ const title = this.translate('General_Name');
this.showErrorFieldNotProvidedNotification(title);
return false;
}
-
if (!((_this$siteHsr$match_p3 = this.siteHsr.match_page_rules) !== null && _this$siteHsr$match_p3 !== void 0 && _this$siteHsr$match_p3.length) || !SessionRecordingStore.filterRules(this.siteHsr.match_page_rules).length) {
- var _title = this.translate('HeatmapSessionRecording_ErrorPageRuleRequired');
-
- this.showNotification(_title, 'error');
+ const title = this.translate('HeatmapSessionRecording_ErrorPageRuleRequired');
+ this.showNotification(title, 'error');
return false;
}
-
return true;
},
- setMatchPageRule: function setMatchPageRule(rule, index) {
- this.siteHsr.match_page_rules = Editvue_type_script_lang_ts_toConsumableArray(this.siteHsr.match_page_rules);
+ setMatchPageRule(rule, index) {
+ this.siteHsr.match_page_rules = [...this.siteHsr.match_page_rules];
this.siteHsr.match_page_rules[index] = rule;
}
},
computed: {
- minSessionTimes: function minSessionTimes() {
- return [0, 5, 10, 15, 20, 30, 45, 60, 90, 120].map(function (v) {
- return {
- key: "".concat(v),
- value: "".concat(v, " seconds")
- };
- });
+ minSessionTimes() {
+ return [0, 5, 10, 15, 20, 30, 45, 60, 90, 120].map(v => ({
+ key: `${v}`,
+ value: `${v} seconds`
+ }));
},
- sampleRates: function sampleRates() {
- var rates = [0.1, 0.5, 1, 2, 3, 4, 5, 6, 8, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100];
- return rates.map(function (v) {
- return {
- key: "".concat(v.toFixed(1)),
- value: "".concat(v, "%")
- };
- });
+ sampleRates() {
+ const rates = [0.1, 0.5, 1, 2, 3, 4, 5, 6, 8, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100];
+ return rates.map(v => ({
+ key: `${v.toFixed(1)}`,
+ value: `${v}%`
+ }));
},
- create: function create() {
+ create() {
return !this.idSiteHsr;
},
- edit: function edit() {
+ edit() {
return !this.create;
},
- editTitle: function editTitle() {
- var token = this.create ? 'HeatmapSessionRecording_CreateNewSessionRecording' : 'HeatmapSessionRecording_EditSessionRecordingX';
+ editTitle() {
+ const token = this.create ? 'HeatmapSessionRecording_CreateNewSessionRecording' : 'HeatmapSessionRecording_EditSessionRecordingX';
return token;
},
- contentTitle: function contentTitle() {
- return Object(external_CoreHome_["translate"])(this.editTitle, this.siteHsr.name ? "\"".concat(this.siteHsr.name, "\"") : '');
+ contentTitle() {
+ return Object(external_CoreHome_["translate"])(this.editTitle, this.siteHsr.name ? `"${this.siteHsr.name}"` : '');
},
- isLoading: function isLoading() {
+ isLoading() {
return HeatmapStore.state.value.isLoading;
},
- isUpdating: function isUpdating() {
+ isUpdating() {
return HeatmapStore.state.value.isUpdating;
},
- captureKeystrokesHelp: function captureKeystrokesHelp() {
- var link = 'https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-keystrokes-in-form-fields';
- return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_CaptureKeystrokesHelp', ""), '');
+ captureKeystrokesHelp() {
+ const link = 'https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-keystrokes-in-form-fields';
+ return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_CaptureKeystrokesHelp', ``, '');
},
- personalInformationNote: function personalInformationNote() {
- var link = 'https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-content-on-your-website';
- return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_PersonalInformationNote', Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecording'), '', '
', ""), '');
+ personalInformationNote() {
+ const link = 'https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-content-on-your-website';
+ return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_PersonalInformationNote', Object(external_CoreHome_["translate"])('HeatmapSessionRecording_SessionRecording'), '', '
', ``, '');
},
- saveButtonText: function saveButtonText() {
+ saveButtonText() {
return this.edit ? Object(external_CoreHome_["translate"])('CoreUpdater_UpdateTitle') : Object(external_CoreHome_["translate"])('HeatmapSessionRecording_CreateNewSessionRecording');
}
}
@@ -5518,171 +4891,152 @@ var Editvue_type_script_lang_ts_notificationId = 'hsrmanagement';
ManageSessionRecording_Editvue_type_script_lang_ts.render = Editvue_type_template_id_56c3e386_render
/* harmony default export */ var ManageSessionRecording_Edit = (ManageSessionRecording_Editvue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ManageSessionRecording/List.vue?vue&type=template&id=09d6f8c4
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/List.vue?vue&type=template&id=09d6f8c4
-var Listvue_type_template_id_09d6f8c4_hoisted_1 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_1 = {
class: "sessionRecordingList"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_2 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_2 = {
class: "filterStatus"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_3 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_3 = {
class: "hsrSearchFilter",
style: {
"margin-left": "3.5px"
}
};
-var Listvue_type_template_id_09d6f8c4_hoisted_4 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_4 = {
class: "index"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_5 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_5 = {
class: "name"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_6 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_6 = {
class: "creationDate"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_7 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_7 = {
class: "sampleLimit"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_8 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_8 = {
class: "status"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_9 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_9 = {
class: "action"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_10 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_10 = {
colspan: "7"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_11 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_11 = {
class: "loadingPiwik"
};
-
-var Listvue_type_template_id_09d6f8c4_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+const Listvue_type_template_id_09d6f8c4_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
src: "plugins/Morpheus/images/loading-blue.gif"
}, null, -1);
-
-var Listvue_type_template_id_09d6f8c4_hoisted_13 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_13 = {
colspan: "7"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_14 = ["id"];
-var Listvue_type_template_id_09d6f8c4_hoisted_15 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_14 = ["id"];
+const Listvue_type_template_id_09d6f8c4_hoisted_15 = {
class: "index"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_16 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_16 = {
class: "name"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_17 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_17 = {
class: "creationDate"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_18 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_18 = {
class: "sampleLimit"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_19 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_19 = {
key: 0,
class: "status status-paused"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_20 = ["title"];
-var Listvue_type_template_id_09d6f8c4_hoisted_21 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_20 = ["title"];
+const Listvue_type_template_id_09d6f8c4_hoisted_21 = {
key: 1,
class: "status"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_22 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_22 = {
class: "action"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_23 = ["title", "onClick"];
-var Listvue_type_template_id_09d6f8c4_hoisted_24 = ["title", "onClick"];
-var Listvue_type_template_id_09d6f8c4_hoisted_25 = ["title", "href"];
-var Listvue_type_template_id_09d6f8c4_hoisted_26 = ["title", "onClick"];
-var Listvue_type_template_id_09d6f8c4_hoisted_27 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_23 = ["title", "onClick"];
+const Listvue_type_template_id_09d6f8c4_hoisted_24 = ["title", "onClick"];
+const Listvue_type_template_id_09d6f8c4_hoisted_25 = ["title", "href"];
+const Listvue_type_template_id_09d6f8c4_hoisted_26 = ["title", "onClick"];
+const Listvue_type_template_id_09d6f8c4_hoisted_27 = {
class: "tableActionBar"
};
-
-var Listvue_type_template_id_09d6f8c4_hoisted_28 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+const Listvue_type_template_id_09d6f8c4_hoisted_28 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
class: "icon-add"
}, null, -1);
-
-var Listvue_type_template_id_09d6f8c4_hoisted_29 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_29 = {
class: "ui-confirm",
ref: "confirmDeleteSessionRecording"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_30 = ["value"];
-var Listvue_type_template_id_09d6f8c4_hoisted_31 = ["value"];
-var Listvue_type_template_id_09d6f8c4_hoisted_32 = {
+const Listvue_type_template_id_09d6f8c4_hoisted_30 = ["value"];
+const Listvue_type_template_id_09d6f8c4_hoisted_31 = ["value"];
+const Listvue_type_template_id_09d6f8c4_hoisted_32 = {
class: "ui-confirm",
ref: "confirmEndSessionRecording"
};
-var Listvue_type_template_id_09d6f8c4_hoisted_33 = ["value"];
-var Listvue_type_template_id_09d6f8c4_hoisted_34 = ["value"];
+const Listvue_type_template_id_09d6f8c4_hoisted_33 = ["value"];
+const Listvue_type_template_id_09d6f8c4_hoisted_34 = ["value"];
function Listvue_type_template_id_09d6f8c4_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
-
- var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
-
- var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
-
+ const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
+ const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
+ const _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Listvue_type_template_id_09d6f8c4_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, {
"content-title": _ctx.translate('HeatmapSessionRecording_ManageSessionRecordings')
}, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SessionRecordingsUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "select",
- name: "filterStatus",
- "model-value": _ctx.filterStatus,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
- _ctx.setFilterStatus($event);
- }),
- title: _ctx.translate('HeatmapSessionRecording_Filter'),
- "full-width": true,
- options: _ctx.statusOptions
- }, null, 8, ["model-value", "title", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
- uicontrol: "text",
- name: "hsrSearch",
- title: _ctx.translate('General_Search'),
- modelValue: _ctx.searchFilter,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
- return _ctx.searchFilter = $event;
- }),
- "full-width": true
- }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hsrs.length > 0]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SampleLimit')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Status')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_09d6f8c4_hoisted_11, [Listvue_type_template_id_09d6f8c4_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_NoSessionRecordingsFound')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading && _ctx.hsrs.length == 0]]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sortedHsrs, function (hsr) {
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", {
- id: "hsr".concat(hsr.idsitehsr),
- class: "hsrs",
- key: hsr.idsitehsr
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.idsitehsr), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.created_date_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.sample_limit), 1), hsr.status === 'paused' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_09d6f8c4_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
- class: "icon icon-help",
- title: _ctx.pauseReason
- }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_20)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_09d6f8c4_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)), 1)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action icon-edit",
- title: _ctx.translate('HeatmapSessionRecording_EditX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
- onClick: function onClick($event) {
- return _ctx.editHsr(hsr.idsitehsr);
- }
- }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_23), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action stopRecording icon-drop-crossed",
- title: _ctx.translate('HeatmapSessionRecording_StopX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
- onClick: function onClick($event) {
- return _ctx.completeHsr(hsr);
- }
- }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], hsr.status !== 'ended']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action icon-show",
- title: _ctx.translate('HeatmapSessionRecording_ViewReport'),
- href: _ctx.getViewReportLink(hsr),
- target: "_blank"
- }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "table-action icon-delete",
- title: _ctx.translate('HeatmapSessionRecording_DeleteX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
- onClick: function onClick($event) {
- return _ctx.deleteHsr(hsr);
- }
- }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_26)])], 8, Listvue_type_template_id_09d6f8c4_hoisted_14);
- }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
- class: "createNewHsr",
- value: "",
- onClick: _cache[2] || (_cache[2] = function ($event) {
- return _ctx.createHsr();
- })
- }, [Listvue_type_template_id_09d6f8c4_hoisted_28, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreateNewSessionRecording')), 1)])])];
- }),
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SessionRecordingsUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "select",
+ name: "filterStatus",
+ "model-value": _ctx.filterStatus,
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => {
+ _ctx.setFilterStatus($event);
+ }),
+ title: _ctx.translate('HeatmapSessionRecording_Filter'),
+ "full-width": true,
+ options: _ctx.statusOptions
+ }, null, 8, ["model-value", "title", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ uicontrol: "text",
+ name: "hsrSearch",
+ title: _ctx.translate('General_Search'),
+ modelValue: _ctx.searchFilter,
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.searchFilter = $event),
+ "full-width": true
+ }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hsrs.length > 0]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_SampleLimit')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Status')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_09d6f8c4_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_09d6f8c4_hoisted_11, [Listvue_type_template_id_09d6f8c4_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_NoSessionRecordingsFound')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading && _ctx.hsrs.length == 0]]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sortedHsrs, hsr => {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", {
+ id: `hsr${hsr.idsitehsr}`,
+ class: "hsrs",
+ key: hsr.idsitehsr
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.idsitehsr), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.created_date_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(hsr.sample_limit), 1), hsr.status === 'paused' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_09d6f8c4_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+ class: "icon icon-help",
+ title: _ctx.pauseReason
+ }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_20)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", Listvue_type_template_id_09d6f8c4_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.ucfirst(hsr.status)), 1)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_09d6f8c4_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action icon-edit",
+ title: _ctx.translate('HeatmapSessionRecording_EditX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
+ onClick: $event => _ctx.editHsr(hsr.idsitehsr)
+ }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_23), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action stopRecording icon-drop-crossed",
+ title: _ctx.translate('HeatmapSessionRecording_StopX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
+ onClick: $event => _ctx.completeHsr(hsr)
+ }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], hsr.status !== 'ended']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action icon-show",
+ title: _ctx.translate('HeatmapSessionRecording_ViewReport'),
+ href: _ctx.getViewReportLink(hsr),
+ target: "_blank"
+ }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "table-action icon-delete",
+ title: _ctx.translate('HeatmapSessionRecording_DeleteX', _ctx.translate('HeatmapSessionRecording_SessionRecording')),
+ onClick: $event => _ctx.deleteHsr(hsr)
+ }, null, 8, Listvue_type_template_id_09d6f8c4_hoisted_26)])], 8, Listvue_type_template_id_09d6f8c4_hoisted_14);
+ }), 128))])])), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ class: "createNewHsr",
+ value: "",
+ onClick: _cache[2] || (_cache[2] = $event => _ctx.createHsr())
+ }, [Listvue_type_template_id_09d6f8c4_hoisted_28, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_CreateNewSessionRecording')), 1)])])]),
_: 1
}, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_09d6f8c4_hoisted_29, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_DeleteSessionRecordingConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "yes",
@@ -5704,19 +5058,7 @@ function Listvue_type_template_id_09d6f8c4_render(_ctx, _cache, $props, $setup,
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/List.vue?vue&type=template&id=09d6f8c4
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/List.vue?vue&type=script&lang=ts
-function ManageSessionRecording_Listvue_type_script_lang_ts_toConsumableArray(arr) { return ManageSessionRecording_Listvue_type_script_lang_ts_arrayWithoutHoles(arr) || ManageSessionRecording_Listvue_type_script_lang_ts_iterableToArray(arr) || ManageSessionRecording_Listvue_type_script_lang_ts_unsupportedIterableToArray(arr) || ManageSessionRecording_Listvue_type_script_lang_ts_nonIterableSpread(); }
-
-function ManageSessionRecording_Listvue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-
-function ManageSessionRecording_Listvue_type_script_lang_ts_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(o, minLen); }
-
-function ManageSessionRecording_Listvue_type_script_lang_ts_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-
-function ManageSessionRecording_Listvue_type_script_lang_ts_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(arr); }
-
-function ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
-
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/List.vue?vue&type=script&lang=ts
@@ -5732,96 +5074,89 @@ function ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(arr
directives: {
ContentTable: external_CoreHome_["ContentTable"]
},
- data: function data() {
+ data() {
return {
searchFilter: ''
};
},
- created: function created() {
+ created() {
SessionRecordingStore.setFilterStatus('');
SessionRecordingStore.fetchHsrs();
},
methods: {
- createHsr: function createHsr() {
+ createHsr() {
this.editHsr(0);
},
- editHsr: function editHsr(idSiteHsr) {
+ editHsr(idSiteHsr) {
external_CoreHome_["MatomoUrl"].updateHash(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, {
- idSiteHsr: idSiteHsr
+ idSiteHsr
}));
},
- deleteHsr: function deleteHsr(hsr) {
+ deleteHsr(hsr) {
external_CoreHome_["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteSessionRecording, {
- yes: function yes() {
- SessionRecordingStore.deleteHsr(hsr.idsitehsr).then(function () {
+ yes: () => {
+ SessionRecordingStore.deleteHsr(hsr.idsitehsr).then(() => {
SessionRecordingStore.reload();
external_CoreHome_["Matomo"].postEvent('updateReportingMenu');
});
}
});
},
- completeHsr: function completeHsr(hsr) {
+ completeHsr(hsr) {
external_CoreHome_["Matomo"].helper.modalConfirm(this.$refs.confirmEndSessionRecording, {
- yes: function yes() {
- SessionRecordingStore.completeHsr(hsr.idsitehsr).then(function () {
+ yes: () => {
+ SessionRecordingStore.completeHsr(hsr.idsitehsr).then(() => {
SessionRecordingStore.reload();
});
}
});
},
- setFilterStatus: function setFilterStatus(filter) {
+ setFilterStatus(filter) {
SessionRecordingStore.setFilterStatus(filter);
},
- ucfirst: function ucfirst(s) {
- return "".concat(s[0].toUpperCase()).concat(s.substr(1));
+ ucfirst(s) {
+ return `${s[0].toUpperCase()}${s.substr(1)}`;
},
- getViewReportLink: function getViewReportLink(hsr) {
- return "?".concat(external_CoreHome_["MatomoUrl"].stringify({
+ getViewReportLink(hsr) {
+ return `?${external_CoreHome_["MatomoUrl"].stringify({
module: 'CoreHome',
action: 'index',
idSite: hsr.idsite,
period: 'day',
date: 'yesterday'
- }), "#?").concat(external_CoreHome_["MatomoUrl"].stringify({
+ })}#?${external_CoreHome_["MatomoUrl"].stringify({
category: 'HeatmapSessionRecording_SessionRecordings',
idSite: hsr.idsite,
period: 'day',
date: 'yesterday',
subcategory: hsr.idsitehsr
- }));
+ })}`;
}
},
computed: {
- filterStatus: function filterStatus() {
+ filterStatus() {
return SessionRecordingStore.state.value.filterStatus;
},
- statusOptions: function statusOptions() {
+ statusOptions() {
return SessionRecordingStore.statusOptions;
},
- hsrs: function hsrs() {
+ hsrs() {
return SessionRecordingStore.hsrs.value;
},
- isLoading: function isLoading() {
+ isLoading() {
return SessionRecordingStore.state.value.isLoading;
},
- isUpdating: function isUpdating() {
+ isUpdating() {
return SessionRecordingStore.state.value.isUpdating;
},
- sortedHsrs: function sortedHsrs() {
- var _this = this;
-
+ sortedHsrs() {
// look through string properties of heatmaps for values that have searchFilter in them
// (mimics angularjs filter() filter)
- var result = ManageSessionRecording_Listvue_type_script_lang_ts_toConsumableArray(this.hsrs).filter(function (h) {
- return Object.keys(h).some(function (propName) {
- var entity = h;
- return typeof entity[propName] === 'string' && entity[propName].indexOf(_this.searchFilter) !== -1;
- });
- });
-
- result.sort(function (lhs, rhs) {
- return rhs.idsitehsr - lhs.idsitehsr;
- });
+ const result = [...this.hsrs].filter(h => Object.keys(h).some(propName => {
+ const entity = h;
+ return typeof entity[propName] === 'string' && entity[propName].indexOf(this.searchFilter) !== -1;
+ }));
+ result.sort((lhs, rhs) => rhs.idsitehsr - lhs.idsitehsr);
return result;
}
}
@@ -5835,18 +5170,15 @@ function ManageSessionRecording_Listvue_type_script_lang_ts_arrayLikeToArray(arr
ManageSessionRecording_Listvue_type_script_lang_ts.render = Listvue_type_template_id_09d6f8c4_render
/* harmony default export */ var ManageSessionRecording_List = (ManageSessionRecording_Listvue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ManageSessionRecording/Manage.vue?vue&type=template&id=4a6cf182
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Manage.vue?vue&type=template&id=4a6cf182
-var Managevue_type_template_id_4a6cf182_hoisted_1 = {
+const Managevue_type_template_id_4a6cf182_hoisted_1 = {
class: "manageHsr"
};
function Managevue_type_template_id_4a6cf182_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
-
- var _component_SessionRecordingList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SessionRecordingList");
-
- var _component_SessionRecordingEdit = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SessionRecordingEdit");
-
+ const _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
+ const _component_SessionRecordingList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SessionRecordingList");
+ const _component_SessionRecordingEdit = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SessionRecordingEdit");
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [!_ctx.editMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_MatomoJsNotWritableAlert, {
key: 0,
"is-matomo-js-writable": _ctx.isMatomoJsWritable,
@@ -5859,7 +5191,7 @@ function Managevue_type_template_id_4a6cf182_render(_ctx, _cache, $props, $setup
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Manage.vue?vue&type=template&id=4a6cf182
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Manage.vue?vue&type=script&lang=ts
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ManageSessionRecording/Manage.vue?vue&type=script&lang=ts
@@ -5873,7 +5205,7 @@ function Managevue_type_template_id_4a6cf182_render(_ctx, _cache, $props, $setup
required: true
}
},
- data: function data() {
+ data() {
return {
editMode: false,
idSiteHsr: null
@@ -5884,43 +5216,36 @@ function Managevue_type_template_id_4a6cf182_render(_ctx, _cache, $props, $setup
SessionRecordingEdit: ManageSessionRecording_Edit,
SessionRecordingList: ManageSessionRecording_List
},
- created: function created() {
- var _this = this;
-
+ created() {
// doing this in a watch because we don't want to post an event in a computed property
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
- return external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr;
- }, function (idSiteHsr) {
- _this.initState(idSiteHsr);
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr, idSiteHsr => {
+ this.initState(idSiteHsr);
});
this.initState(external_CoreHome_["MatomoUrl"].hashParsed.value.idSiteHsr);
},
methods: {
- removeAnyHsrNotification: function removeAnyHsrNotification() {
+ removeAnyHsrNotification() {
external_CoreHome_["NotificationsStore"].remove('hsrmanagement');
},
- initState: function initState(idSiteHsr) {
+ initState(idSiteHsr) {
if (idSiteHsr) {
if (idSiteHsr === '0') {
- var parameters = {
+ const parameters = {
isAllowed: true
};
external_CoreHome_["Matomo"].postEvent('HeatmapSessionRecording.initAddSessionRecording', parameters);
-
if (parameters && !parameters.isAllowed) {
this.editMode = false;
this.idSiteHsr = null;
return;
}
}
-
this.editMode = true;
this.idSiteHsr = parseInt(idSiteHsr, 10);
} else {
this.editMode = false;
this.idSiteHsr = null;
}
-
this.removeAnyHsrNotification();
}
}
@@ -5934,36 +5259,30 @@ function Managevue_type_template_id_4a6cf182_render(_ctx, _cache, $props, $setup
ManageSessionRecording_Managevue_type_script_lang_ts.render = Managevue_type_template_id_4a6cf182_render
/* harmony default export */ var ManageSessionRecording_Manage = (ManageSessionRecording_Managevue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/ListOfPageviews/ListOfPageviews.vue?vue&type=template&id=fe86de22
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ListOfPageviews/ListOfPageviews.vue?vue&type=template&id=fe86de22
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_1 = {
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_1 = {
class: "ui-confirm",
id: "listOfPageviews"
};
-
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1);
-
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1);
-
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_4 = ["onClick"];
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_5 = ["title"];
-var ListOfPageviewsvue_type_template_id_fe86de22_hoisted_6 = ["value"];
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1);
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1);
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_4 = ["onClick"];
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_5 = ["title"];
+const ListOfPageviewsvue_type_template_id_fe86de22_hoisted_6 = ["value"];
function ListOfPageviewsvue_type_template_id_fe86de22_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
-
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ListOfPageviewsvue_type_template_id_fe86de22_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_PageviewsInVisit')), 1), ListOfPageviewsvue_type_template_id_fe86de22_hoisted_2, ListOfPageviewsvue_type_template_id_fe86de22_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_ColumnTime')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_TimeOnPage')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Goals_URL')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.pageviews, function (pageview) {
+ const _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table");
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ListOfPageviewsvue_type_template_id_fe86de22_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_PageviewsInVisit')), 1), ListOfPageviewsvue_type_template_id_fe86de22_hoisted_2, ListOfPageviewsvue_type_template_id_fe86de22_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_ColumnTime')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_TimeOnPage')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Goals_URL')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.pageviews, pageview => {
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", {
key: pageview.idloghsr,
class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({
inactive: pageview.idloghsr !== _ctx.idLogHsr
}),
- onClick: function onClick($event) {
- return _ctx.onClickPageView(pageview);
- }
+ onClick: $event => _ctx.onClickPageView(pageview)
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pageview.server_time_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pageview.time_on_page_pretty), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", {
title: pageview.label
}, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])((pageview.label || '').substr(0, 50)), 9, ListOfPageviewsvue_type_template_id_fe86de22_hoisted_5)], 10, ListOfPageviewsvue_type_template_id_fe86de22_hoisted_4);
- }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }), 128))])])), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
role: "close",
type: "button",
value: _ctx.translate('General_Close')
@@ -5971,7 +5290,7 @@ function ListOfPageviewsvue_type_template_id_fe86de22_render(_ctx, _cache, $prop
}
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/ListOfPageviews/ListOfPageviews.vue?vue&type=template&id=fe86de22
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/ListOfPageviews/ListOfPageviews.vue?vue&type=script&lang=ts
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/ListOfPageviews/ListOfPageviews.vue?vue&type=script&lang=ts
/* harmony default export */ var ListOfPageviewsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
@@ -5989,11 +5308,10 @@ function ListOfPageviewsvue_type_template_id_fe86de22_render(_ctx, _cache, $prop
ContentTable: external_CoreHome_["ContentTable"]
},
methods: {
- onClickPageView: function onClickPageView(pageview) {
+ onClickPageView(pageview) {
if (pageview.idloghsr === this.idLogHsr) {
return;
}
-
external_CoreHome_["MatomoUrl"].updateUrl(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].urlParsed.value), {}, {
idLogHsr: pageview.idloghsr
}), external_CoreHome_["MatomoUrl"].hashParsed.value.length ? Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, {
@@ -6011,53 +5329,47 @@ function ListOfPageviewsvue_type_template_id_fe86de22_render(_ctx, _cache, $prop
ListOfPageviewsvue_type_script_lang_ts.render = ListOfPageviewsvue_type_template_id_fe86de22_render
/* harmony default export */ var ListOfPageviews = (ListOfPageviewsvue_type_script_lang_ts);
-// 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/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=template&id=84a1572c
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-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--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=template&id=7f5f8230
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_1 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_1 = {
class: "heatmap-vis-title"
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_2 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_2 = {
key: 0,
class: "alert alert-info heatmap-country-alert"
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_3 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_3 = {
key: 1
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_4 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_4 = {
key: 2
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_5 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_5 = ["innerHTML"];
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_6 = {
class: "alert alert-info"
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_6 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_7 = {
key: 3
};
-var HeatmapVisPagevue_type_template_id_84a1572c_hoisted_7 = {
+const HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_8 = {
class: "alert alert-info"
};
-function HeatmapVisPagevue_type_template_id_84a1572c_render(_ctx, _cache, $props, $setup, $data, $options) {
+function HeatmapVisPagevue_type_template_id_7f5f8230_render(_ctx, _cache, $props, $setup, $data, $options) {
var _ctx$heatmapMetadata;
-
- var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline");
-
- var _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
-
- var _component_HeatmapVis = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapVis");
-
- var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
-
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, {
+ const _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline");
+ const _component_MatomoJsNotWritableAlert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoJsNotWritableAlert");
+ const _component_HeatmapVis = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("HeatmapVis");
+ const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock");
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, {
"edit-url": _ctx.editUrl,
"inline-help": _ctx.inlineHelp
}, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapX', "\"".concat(_ctx.heatmap.name, "\""))), 1)];
- }),
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapX', `"${_ctx.heatmap.name}"`)), 1)]),
_: 1
}, 8, ["edit-url", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoJsNotWritableAlert, {
"is-matomo-js-writable": _ctx.isMatomoJsWritable,
"recording-type": _ctx.translate('HeatmapSessionRecording_Heatmaps')
- }, null, 8, ["is-matomo-js-writable", "recording-type"]), _ctx.includedCountries ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapInfoTrackVisitsFromCountries', _ctx.includedCountries)), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.heatmap.page_treemirror ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HeatmapVis, {
+ }, null, 8, ["is-matomo-js-writable", "recording-type"]), _ctx.includedCountries ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('HeatmapSessionRecording_HeatmapInfoTrackVisitsFromCountries', _ctx.includedCountries)), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.heatmap.page_treemirror ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_HeatmapVis, {
"created-date": _ctx.createdDate,
"excluded-elements": _ctx.heatmap.excluded_elements,
"num-samples": _ctx.heatmapMetadata,
@@ -6073,21 +5385,19 @@ function HeatmapVisPagevue_type_template_id_84a1572c_render(_ctx, _cache, $props
"is-active": _ctx.isActive,
"desktop-preview-size": _ctx.desktopPreviewSize,
"iframe-resolutions-values": _ctx.iframeResolutions
- }, null, 8, ["created-date", "excluded-elements", "num-samples", "url", "heatmap-date", "heatmap-period", "offset-accuracy", "breakpoint-tablet", "breakpoint-mobile", "heatmap-types", "device-types", "id-site-hsr", "is-active", "desktop-preview-size", "iframe-resolutions-values"])])) : !((_ctx$heatmapMetadata = _ctx.heatmapMetadata) !== null && _ctx$heatmapMetadata !== void 0 && _ctx$heatmapMetadata.nb_samples_device_all) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, null, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.noDataMessageKey)), 1)];
- }),
+ }, null, 8, ["created-date", "excluded-elements", "num-samples", "url", "heatmap-date", "heatmap-period", "offset-accuracy", "breakpoint-tablet", "breakpoint-mobile", "heatmap-types", "device-types", "id-site-hsr", "is-active", "desktop-preview-size", "iframe-resolutions-values"])])) : !((_ctx$heatmapMetadata = _ctx.heatmapMetadata) !== null && _ctx$heatmapMetadata !== void 0 && _ctx$heatmapMetadata.nb_samples_device_all) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", {
+ innerHTML: _ctx.$sanitize(_ctx.recordedSamplesTroubleShoot)
+ }, null, 8, HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, null, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.noDataMessageKey)), 1)]),
_: 1
- })])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, null, {
- default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
- return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", HeatmapVisPagevue_type_template_id_84a1572c_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.noHeatmapScreenshotRecordedYetText), 1)];
- }),
+ })])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, null, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", HeatmapVisPagevue_type_template_id_7f5f8230_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.noHeatmapScreenshotRecordedYetText), 1)]),
_: 1
})]))]);
}
-// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=template&id=84a1572c
+// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=template&id=7f5f8230
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=script&lang=ts
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/HeatmapSessionRecording/vue/src/HeatmapVis/HeatmapVisPage.vue?vue&type=script&lang=ts
@@ -6167,11 +5477,15 @@ function HeatmapVisPagevue_type_template_id_84a1572c_render(_ctx, _cache, $props
EnrichedHeadline: external_CoreHome_["EnrichedHeadline"]
},
computed: {
- noHeatmapScreenshotRecordedYetText: function noHeatmapScreenshotRecordedYetText() {
+ noHeatmapScreenshotRecordedYetText() {
return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_NoHeatmapScreenshotRecordedYet', this.heatmapMetadata.nb_samples_device_all, Object(external_CoreHome_["translate"])('HeatmapSessionRecording_ScreenshotUrl'));
+ },
+ recordedSamplesTroubleShoot() {
+ const linkString = Object(external_CoreHome_["externalLink"])('https://matomo.org/faq/heatmap-session-recording/troubleshooting-heatmaps/');
+ return Object(external_CoreHome_["translate"])('HeatmapSessionRecording_HeatmapTroubleshoot', linkString, '');
}
},
- created: function created() {
+ created() {
// We want the selector hidden for heatmaps.
external_CoreHome_["Matomo"].postEvent('hidePeriodSelector');
}
@@ -6182,7 +5496,7 @@ function HeatmapVisPagevue_type_template_id_84a1572c_render(_ctx, _cache, $props
-HeatmapVisPagevue_type_script_lang_ts.render = HeatmapVisPagevue_type_template_id_84a1572c_render
+HeatmapVisPagevue_type_script_lang_ts.render = HeatmapVisPagevue_type_template_id_7f5f8230_render
/* harmony default export */ var HeatmapVisPage = (HeatmapVisPagevue_type_script_lang_ts);
// CONCATENATED MODULE: ./plugins/HeatmapSessionRecording/vue/src/index.ts
diff --git a/files/plugin-HeatmapSessionRecording-5.2.6/vue/dist/HeatmapSessionRecording.umd.min.js b/files/plugin-HeatmapSessionRecording-5.2.6/vue/dist/HeatmapSessionRecording.umd.min.js
new file mode 100644
index 0000000..33940dc
--- /dev/null
+++ b/files/plugin-HeatmapSessionRecording-5.2.6/vue/dist/HeatmapSessionRecording.umd.min.js
@@ -0,0 +1,73 @@
+(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["HeatmapSessionRecording"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["HeatmapSessionRecording"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,a){return function(e){var t={};function a(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/HeatmapSessionRecording/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"246e":function(e,t,a){var i,n;(function(s,r,o){e.exports?e.exports=o():(i=o,n="function"===typeof i?i.call(t,a,t,e):i,void 0===n||(e.exports=n))})(0,0,(function(){var e={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},t=function(){var t=function(e){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=e["xField"]||e.defaultXField,this._yField=e["yField"]||e.defaultYField,this._valueField=e["valueField"]||e.defaultValueField,e["radius"]&&(this._cfgRadius=e["radius"])},a=e.defaultRadius;return t.prototype={_organiseData:function(e,t){var i=e[this._xField],n=e[this._yField],s=this._radi,r=this._data,o=this._max,l=this._min,c=e[this._valueField]||1,d=e.radius||this._cfgRadius||a;r[i]||(r[i]=[],s[i]=[]),r[i][n]?r[i][n]+=c:(r[i][n]=c,s[i][n]=d);var m=r[i][n];return m>o?(t?this.setDataMax(m):this._max=m,!1):m0?r:b
","
",``,"")},saveButtonText(){return this.edit?Object(B["translate"])("CoreUpdater_UpdateTitle"):Object(B["translate"])("HeatmapSessionRecording_CreateNewHeatmap")}}});ua.render=oa;var ha=ua;const ga={class:"heatmapList"},ba={class:"filterStatus"},va={class:"hsrSearchFilter",style:{"margin-left":"3.5px"}},Oa={class:"index"},ja={class:"name"},fa={class:"creationDate"},ya={class:"sampleLimit"},Sa={class:"status"},Ha={class:"action"},_a={colspan:"7"},Ea={class:"loadingPiwik"},Va=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Na={colspan:"7"},Ra=["id"],wa={class:"index"},ka={class:"name"},xa={class:"creationDate"},Ca={class:"sampleLimit"},Da={key:0,class:"status status-paused"},Ta=["title"],Ma={key:1,class:"status"},Pa=["title","onClick"],Aa=["title","onClick"],Ba=["title","href"],Ua=["title","onClick"],Fa={class:"tableActionBar"},La=Object(s["createElementVNode"])("span",{class:"icon-add"},null,-1),Ia={class:"ui-confirm",id:"confirmDeleteHeatmap",ref:"confirmDeleteHeatmap"},Wa=["value"],qa=["value"],za={class:"ui-confirm",id:"confirmEndHeatmap",ref:"confirmEndHeatmap"},$a=["value"],Ga=["value"];function Ja(e,t,a,i,n,r){const o=Object(s["resolveComponent"])("Field"),l=Object(s["resolveComponent"])("EntityDuplicatorAction"),c=Object(s["resolveComponent"])("ContentBlock"),d=Object(s["resolveComponent"])("EntityDuplicatorModal"),m=Object(s["resolveDirective"])("content-table");return Object(s["openBlock"])(),Object(s["createElementBlock"])(s["Fragment"],null,[Object(s["createElementVNode"])("div",ga,[Object(s["createVNode"])(c,{"content-title":e.translate("HeatmapSessionRecording_ManageHeatmaps")},{default:Object(s["withCtx"])(()=>[Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_HeatmapUsageBenefits")),1),Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("div",ba,[Object(s["createVNode"])(o,{uicontrol:"select",name:"filterStatus","model-value":e.filterStatus,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.setFilterStatus(t)}),title:e.translate("HeatmapSessionRecording_Filter"),"full-width":!0,options:e.statusOptions},null,8,["model-value","title","options"])]),Object(s["createElementVNode"])("div",va,[Object(s["withDirectives"])(Object(s["createVNode"])(o,{uicontrol:"text",name:"hsrSearch",title:e.translate("General_Search"),modelValue:e.searchFilter,"onUpdate:modelValue":t[1]||(t[1]=t=>e.searchFilter=t),"full-width":!0},null,8,["title","modelValue"]),[[s["vShow"],e.hsrs.length>0]])])]),Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("table",null,[Object(s["createElementVNode"])("thead",null,[Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("th",Oa,Object(s["toDisplayString"])(e.translate("General_Id")),1),Object(s["createElementVNode"])("th",ja,Object(s["toDisplayString"])(e.translate("General_Name")),1),Object(s["createElementVNode"])("th",fa,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_CreationDate")),1),Object(s["createElementVNode"])("th",ya,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_SampleLimit")),1),Object(s["createElementVNode"])("th",Sa,Object(s["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(s["createElementVNode"])("th",Ha,Object(s["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(s["createElementVNode"])("tbody",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("td",_a,[Object(s["createElementVNode"])("span",Ea,[Va,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[s["vShow"],e.isLoading||e.isUpdating]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("td",Na,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_NoHeatmapsFound")),1)],512),[[s["vShow"],!e.isLoading&&0===e.hsrs.length]]),(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.sortedHsrs,t=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("tr",{id:"hsr"+t.idsitehsr,class:"hsrs",key:t.idsitehsr},[Object(s["createElementVNode"])("td",wa,Object(s["toDisplayString"])(t.idsitehsr),1),Object(s["createElementVNode"])("td",ka,Object(s["toDisplayString"])(t.name),1),Object(s["createElementVNode"])("td",xa,Object(s["toDisplayString"])(t.created_date_pretty),1),Object(s["createElementVNode"])("td",Ca,Object(s["toDisplayString"])(t.sample_limit),1),"paused"===t.status?(Object(s["openBlock"])(),Object(s["createElementBlock"])("td",Da,[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.ucfirst(t.status))+" ",1),Object(s["createElementVNode"])("span",{class:"icon icon-help",title:e.pauseReason},null,8,Ta)])):(Object(s["openBlock"])(),Object(s["createElementBlock"])("td",Ma,Object(s["toDisplayString"])(e.ucfirst(t.status)),1)),Object(s["createElementVNode"])("td",{class:Object(s["normalizeClass"])({action:!0,"duplicate-available":e.isEntityDuplicatorAvailable})},[Object(s["createElementVNode"])("a",{class:"table-action icon-edit",title:e.translate("HeatmapSessionRecording_EditX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:a=>e.editHsr(t.idsitehsr)},null,8,Pa),Object(s["withDirectives"])(Object(s["createElementVNode"])("a",{class:"table-action stopRecording icon-drop-crossed",title:e.translate("HeatmapSessionRecording_StopX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:a=>e.completeHsr(t)},null,8,Aa),[[s["vShow"],"ended"!==t.status]]),Object(s["createElementVNode"])("a",{target:"_blank",class:"table-action icon-show",title:e.translate("HeatmapSessionRecording_ViewReport"),href:e.getViewReportLink(t)},null,8,Ba),Object(s["createElementVNode"])("a",{class:"table-action icon-delete",title:e.translate("HeatmapSessionRecording_DeleteX",e.translate("HeatmapSessionRecording_Heatmap")),onClick:a=>e.deleteHsr(t)},null,8,Ua),Object(s["createVNode"])(l,{actionFormData:{idSiteHsr:t.idsitehsr},modalStore:e.entityDuplicatorStore,isActionVisible:e.showDuplicatorAction,isActionEnabled:e.enableDuplicatorAction,tooltipTextOverrideDisabled:e.translate("HeatmapSessionRecording_QuotaReachedForX",e.translate("HeatmapSessionRecording_Heatmap"),e.translate("HeatmapSessionRecording_Heatmaps")),extraClasses:["heatmap-duplicate-action","hsr-"+t.idsitehsr]},null,8,["actionFormData","modalStore","isActionVisible","isActionEnabled","tooltipTextOverrideDisabled","extraClasses"])],2)],8,Ra))),128))])])),[[m]]),Object(s["createElementVNode"])("div",Fa,[Object(s["createElementVNode"])("a",{class:"createNewHsr",value:"",onClick:t[2]||(t[2]=t=>e.createHsr())},[La,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_CreateNewHeatmap")),1)])])]),_:1},8,["content-title"]),Object(s["createElementVNode"])("div",Ia,[Object(s["createElementVNode"])("h2",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_DeleteHeatmapConfirm")),1),Object(s["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Wa),Object(s["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,qa)],512),Object(s["createElementVNode"])("div",za,[Object(s["createElementVNode"])("h2",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_EndHeatmapConfirm")),1),Object(s["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,$a),Object(s["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Ga)],512)]),Object(s["createVNode"])(d,{modalStore:e.entityDuplicatorStore},null,8,["modalStore"])],64)}const Xa=Object(B["useExternalPluginComponent"])("CoreHome","EntityDuplicatorModal"),Ya=Object(B["useExternalPluginComponent"])("CoreHome","EntityDuplicatorAction");let Ka=void 0;Object(B["importPluginUmd"])("CoreHome").then(e=>{Ka=null===e||void 0===e?void 0:e.EntityDuplicatorStore});var Qa=Object(s["defineComponent"])({props:{pauseReason:String},components:{ContentBlock:B["ContentBlock"],Field:U["Field"],EntityDuplicatorModal:Xa,EntityDuplicatorAction:Ya},directives:{ContentTable:B["ContentTable"]},data(){return{searchFilter:"",showDuplicatorAction:!0,enableDuplicatorAction:!1,entityDuplicatorStore:"undefined"!==typeof Ka?Ka.buildStoreInstance("HeatmapSessionRecording_Heatmap",{method:"HeatmapSessionRecording.duplicateHeatmap",requiredFields:["idSite","idDestinationSites","idSiteHsr"]}):void 0}},created(){da.setFilterStatus(""),da.fetchHsrs()},mounted(){if(this.checkIsAddingHeatmapAllowed(),this.entityDuplicatorStore){const e=this.entityDuplicatorStore.adapter;e.onSuccessCallback=e=>new Promise(t=>{var a,i,n;const s=null===(a=e.additionalData)||void 0===a?void 0:a.idSite;return null!==(i=e.additionalData)&&void 0!==i&&i.idSite&&Array.isArray(null===(n=e.additionalData)||void 0===n?void 0:n.idDestinationSites)&&!e.additionalData.idDestinationSites.some(e=>+e===+s)?t():da.reload().then(()=>t())})}},methods:{createHsr(){this.editHsr(0)},editHsr(e){B["MatomoUrl"].updateHash(Object.assign(Object.assign({},B["MatomoUrl"].hashParsed.value),{},{idSiteHsr:e}))},deleteHsr(e){B["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteHeatmap,{yes:()=>{da.deleteHsr(e.idsitehsr).then(()=>{da.reload(),B["Matomo"].postEvent("updateReportingMenu")})}})},completeHsr(e){B["Matomo"].helper.modalConfirm(this.$refs.confirmEndHeatmap,{yes:()=>{da.completeHsr(e.idsitehsr).then(()=>{da.reload()})}})},setFilterStatus(e){da.setFilterStatus(e)},ucfirst(e){return`${e[0].toUpperCase()}${e.substr(1)}`},getViewReportLink(e){return"?"+B["MatomoUrl"].stringify({module:"Widgetize",action:"iframe",moduleToWidgetize:"HeatmapSessionRecording",actionToWidgetize:"showHeatmap",idSiteHsr:e.idsitehsr,idSite:e.idsite,period:"day",date:"yesterday"})},checkIsAddingHeatmapAllowed(){const e={isAllowed:!0};return B["Matomo"].postEvent("HeatmapSessionRecording.initAddHeatmap",e),this.enableDuplicatorAction=e&&!0===e.isAllowed,!this.enableDuplicatorAction}},computed:{filterStatus(){return da.state.value.filterStatus},statusOptions(){return da.statusOptions},hsrs(){return da.hsrs.value},isLoading(){return da.state.value.isLoading},isUpdating(){return da.state.value.isUpdating},sortedHsrs(){const e=[...this.hsrs].filter(e=>Object.keys(e).some(t=>{const a=e;return"string"===typeof a[t]&&-1!==a[t].indexOf(this.searchFilter)}));return e.sort((e,t)=>t.idsitehsr-e.idsitehsr),e},isEntityDuplicatorAvailable(){return"undefined"!==typeof Ka}}});Qa.render=Ja;var Za=Qa;const ei={class:"manageHsr",ref:"root"},ti={key:0},ai={key:1};function ii(e,t,a,i,n,r){const o=Object(s["resolveComponent"])("MatomoJsNotWritableAlert"),l=Object(s["resolveComponent"])("HeatmapList"),c=Object(s["resolveComponent"])("HeatmapEdit");return Object(s["openBlock"])(),Object(s["createElementBlock"])(s["Fragment"],null,[e.editMode?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createBlock"])(o,{key:0,"is-matomo-js-writable":e.isMatomoJsWritable,"recording-type":e.translate("HeatmapSessionRecording_Heatmaps")},null,8,["is-matomo-js-writable","recording-type"])),Object(s["createElementVNode"])("div",ei,[e.editMode?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",ti,[Object(s["createVNode"])(l,{"pause-reason":e.pauseReason},null,8,["pause-reason"])])),e.editMode?(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",ai,[Object(s["createVNode"])(c,{"breakpoint-mobile":e.breakpointMobile,"breakpoint-tablet":e.breakpointTablet,"id-site-hsr":e.idSiteHsr},null,8,["breakpoint-mobile","breakpoint-tablet","id-site-hsr"])])):Object(s["createCommentVNode"])("",!0)],512)],64)}const ni=["innerHTML"];function si(e,t,a,i,n,r){return e.isMatomoJsWritable?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",{key:0,class:"alert alert-warning",innerHTML:e.getJsNotWritableErrorMessage()},null,8,ni))}var ri=Object(s["defineComponent"])({props:{recordingType:{type:String,required:!0},isMatomoJsWritable:{type:Boolean,required:!0}},methods:{getJsNotWritableErrorMessage(){return Object(B["translate"])("HeatmapSessionRecording_MatomoJSNotWritableErrorMessage",this.recordingType,'',"")}}});ri.render=si;var oi=ri;const{$:li}=window;var ci=Object(s["defineComponent"])({props:{breakpointMobile:Number,breakpointTablet:Number,pauseReason:String,isMatomoJsWritable:{type:Boolean,required:!0}},data(){return{editMode:!1,idSiteHsr:null}},components:{MatomoJsNotWritableAlert:oi,HeatmapList:Za,HeatmapEdit:ha},watch:{editMode(){li(".ui-tooltip").remove()}},created(){Object(s["watch"])(()=>B["MatomoUrl"].hashParsed.value.idSiteHsr,e=>{this.initState(e)}),this.initState(B["MatomoUrl"].hashParsed.value.idSiteHsr)},methods:{removeAnyHsrNotification(){B["NotificationsStore"].remove("hsrmanagement")},initState(e){if(e){if("0"===e){const e={isAllowed:!0};if(B["Matomo"].postEvent("HeatmapSessionRecording.initAddHeatmap",e),e&&!e.isAllowed)return this.editMode=!1,void(this.idSiteHsr=null)}this.editMode=!0,this.idSiteHsr=parseInt(e,10)}else this.editMode=!1,this.idSiteHsr=null;this.removeAnyHsrNotification()}}});ci.render=ii;var di=ci;const mi={class:"loadingPiwik"},pi=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),ui={class:"loadingPiwik"},hi=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),gi={name:"name"},bi={name:"sampleLimit"},vi={class:"form-group row"},Oi={class:"col s12"},ji={class:"col s12 m6",style:{"padding-left":"0"}},fi=Object(s["createElementVNode"])("hr",null,null,-1),yi={class:"col s12 m6"},Si={class:"form-help"},Hi={class:"inline-help"},_i={name:"sampleRate"},Ei={name:"minSessionTime"},Vi={name:"requiresActivity"},Ni={class:"inline-help-node"},Ri=["innerHTML"],wi=["innerHTML"],ki={class:"entityCancel"};function xi(e,t,a,i,n,r){const o=Object(s["resolveComponent"])("Field"),l=Object(s["resolveComponent"])("HsrUrlTarget"),c=Object(s["resolveComponent"])("HsrTargetTest"),d=Object(s["resolveComponent"])("SaveButton"),m=Object(s["resolveComponent"])("ContentBlock");return Object(s["openBlock"])(),Object(s["createBlock"])(m,{class:"editHsr","content-title":e.contentTitle},{default:Object(s["withCtx"])(()=>[Object(s["withDirectives"])(Object(s["createElementVNode"])("p",null,[Object(s["createElementVNode"])("span",mi,[pi,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[s["vShow"],e.isLoading]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("p",null,[Object(s["createElementVNode"])("span",ui,[hi,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_UpdatingData")),1)])],512),[[s["vShow"],e.isUpdating]]),Object(s["createElementVNode"])("form",{onSubmit:t[10]||(t[10]=t=>e.edit?e.updateHsr():e.createHsr())},[Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("div",gi,[Object(s["createVNode"])(o,{uicontrol:"text",name:"name","model-value":e.siteHsr.name,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.siteHsr.name=t,e.setValueHasChanged()}),title:e.translate("General_Name"),maxlength:50,placeholder:e.translate("HeatmapSessionRecording_FieldNamePlaceholder"),"inline-help":e.translate("HeatmapSessionRecording_SessionNameHelp")},null,8,["model-value","title","placeholder","inline-help"])]),Object(s["createElementVNode"])("div",bi,[Object(s["createVNode"])(o,{uicontrol:"select",name:"sampleLimit","model-value":e.siteHsr.sample_limit,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.siteHsr.sample_limit=t,e.setValueHasChanged()}),title:e.translate("HeatmapSessionRecording_SessionSampleLimit"),options:e.sampleLimits,"inline-help":e.translate("HeatmapSessionRecording_SessionSampleLimitHelp")},null,8,["model-value","title","options","inline-help"])]),Object(s["createElementVNode"])("div",vi,[Object(s["createElementVNode"])("div",Oi,[Object(s["createElementVNode"])("h3",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_TargetPages"))+":",1)]),Object(s["createElementVNode"])("div",ji,[(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.siteHsr.match_page_rules,(a,i)=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",{class:Object(s["normalizeClass"])(`matchPageRules ${i} multiple`),key:i},[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(l,{"model-value":a,"onUpdate:modelValue":t=>e.setMatchPageRule(t,i),onAddUrl:t[2]||(t[2]=t=>e.addMatchPageRule()),onRemoveUrl:t=>e.removeMatchPageRule(i),onAnyChange:t[3]||(t[3]=t=>e.setValueHasChanged()),"allow-any":!0,"disable-if-no-value":i>0,"can-be-removed":i>0,"show-add-url":!0},null,8,["model-value","onUpdate:modelValue","onRemoveUrl","disable-if-no-value","can-be-removed"])]),fi],2))),128))]),Object(s["createElementVNode"])("div",yi,[Object(s["createElementVNode"])("div",Si,[Object(s["createElementVNode"])("span",Hi,[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_FieldIncludedTargetsHelpSessions"))+" ",1),Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{"included-targets":e.siteHsr.match_page_rules},null,8,["included-targets"])])])])])]),Object(s["createElementVNode"])("div",_i,[Object(s["createVNode"])(o,{uicontrol:"select",name:"sampleRate","model-value":e.siteHsr.sample_rate,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.siteHsr.sample_rate=t,e.setValueHasChanged()}),title:e.translate("HeatmapSessionRecording_SampleRate"),options:e.sampleRates,introduction:e.translate("HeatmapSessionRecording_AdvancedOptions"),"inline-help":e.translate("HeatmapSessionRecording_SessionSampleRateHelp")},null,8,["model-value","title","options","introduction","inline-help"])]),Object(s["createElementVNode"])("div",Ei,[Object(s["createVNode"])(o,{uicontrol:"select",name:"minSessionTime","model-value":e.siteHsr.min_session_time,"onUpdate:modelValue":t[5]||(t[5]=t=>{e.siteHsr.min_session_time=t,e.setValueHasChanged()}),title:e.translate("HeatmapSessionRecording_MinSessionTime"),options:e.minSessionTimes,"inline-help":e.translate("HeatmapSessionRecording_MinSessionTimeHelp")},null,8,["model-value","title","options","inline-help"])]),Object(s["createElementVNode"])("div",Vi,[Object(s["createVNode"])(o,{uicontrol:"checkbox",name:"requiresActivity","model-value":e.siteHsr.requires_activity,"onUpdate:modelValue":t[6]||(t[6]=t=>{e.siteHsr.requires_activity=t,e.setValueHasChanged()}),title:e.translate("HeatmapSessionRecording_RequiresActivity"),"inline-help":e.translate("HeatmapSessionRecording_RequiresActivityHelp")},null,8,["model-value","title","inline-help"])]),Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(o,{uicontrol:"checkbox",name:"captureKeystrokes","model-value":e.siteHsr.capture_keystrokes,"onUpdate:modelValue":t[7]||(t[7]=t=>{e.siteHsr.capture_keystrokes=t,e.setValueHasChanged()}),title:e.translate("HeatmapSessionRecording_CaptureKeystrokes")},{"inline-help":Object(s["withCtx"])(()=>[Object(s["createElementVNode"])("div",Ni,[Object(s["createElementVNode"])("span",{innerHTML:e.$sanitize(e.captureKeystrokesHelp)},null,8,Ri)])]),_:1},8,["model-value","title"])]),Object(s["createElementVNode"])("p",{innerHTML:e.$sanitize(e.personalInformationNote)},null,8,wi),Object(s["createVNode"])(d,{class:"createButton",onConfirm:t[8]||(t[8]=t=>e.edit?e.updateHsr():e.createHsr()),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.saveButtonText},null,8,["disabled","saving","value"]),Object(s["createElementVNode"])("div",ki,[Object(s["createElementVNode"])("a",{onClick:t[9]||(t[9]=t=>e.cancel())},Object(s["toDisplayString"])(e.translate("General_Cancel")),1)])])],32)]),_:1},8,["content-title"])}const Ci="hsrmanagement";var Di=Object(s["defineComponent"])({props:{idSiteHsr:Number},components:{ContentBlock:B["ContentBlock"],Field:U["Field"],HsrUrlTarget:Ut,HsrTargetTest:Vt,SaveButton:U["SaveButton"]},data(){return{isDirty:!1,showAdvancedView:!1,sampleLimits:[],siteHsr:{}}},created(){B["AjaxHelper"].fetch({method:"HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits"}).then(e=>{this.sampleLimits=(e||[]).map(e=>({key:""+e,value:e}))}),this.init()},watch:{idSiteHsr(e){null!==e&&this.init()}},methods:{removeAnyHsrNotification(){B["NotificationsStore"].remove(Ci),B["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t){const a=B["NotificationsStore"].show({message:e,context:t,id:Ci,type:"transient"});setTimeout(()=>{B["NotificationsStore"].scrollToNotification(a)},200)},showErrorFieldNotProvidedNotification(e){const t=Object(B["translate"])("HeatmapSessionRecording_ErrorXNotProvided",[e]);this.showNotification(t,"error")},init(){const{idSiteHsr:e}=this;this.siteHsr={},this.showAdvancedView=!1,B["Matomo"].helper.lazyScrollToContent(),this.edit&&e?ma.findHsr(e).then(e=>{e&&(this.siteHsr=Object(B["clone"])(e),this.siteHsr.sample_rate=""+this.siteHsr.sample_rate,this.addInitialMatchPageRule(),this.isDirty=!1)}):this.create&&(this.siteHsr={idSite:B["Matomo"].idSite,name:"",sample_rate:"10.0",sample_limit:250,min_session_time:0,requires_activity:!0,capture_keystrokes:!1},this.addInitialMatchPageRule(),this.isDirty=!1)},addInitialMatchPageRule(){var e;this.siteHsr&&(null!==(e=this.siteHsr.match_page_rules)&&void 0!==e&&e.length||(this.siteHsr.match_page_rules=[{attribute:"url",type:"any",value:"",inverted:0}]))},addMatchPageRule(){var e;this.siteHsr&&(null!==(e=this.siteHsr.match_page_rules)&&void 0!==e&&e.length||(this.siteHsr.match_page_rules=[]),this.siteHsr.match_page_rules.push({attribute:"url",type:"equals_simple",value:"",inverted:0}),this.isDirty=!0)},removeMatchPageRule(e){this.siteHsr&&e>-1&&(this.siteHsr.match_page_rules=[...this.siteHsr.match_page_rules],this.siteHsr.match_page_rules.splice(e,1),this.isDirty=!0)},cancel(){const e=Object.assign({},B["MatomoUrl"].hashParsed.value);delete e.idSiteHsr,B["MatomoUrl"].updateHash(e)},createHsr(){this.removeAnyHsrNotification(),this.checkRequiredFieldsAreSet()&&ma.createOrUpdateHsr(this.siteHsr,"HeatmapSessionRecording.addSessionRecording").then(e=>{if(!e||"error"===e.type||!e.response)return;this.isDirty=!1;const t=e.response.value;ma.reload().then(()=>{B["Matomo"].helper.isReportingPage()&&B["Matomo"].postEvent("updateReportingMenu"),B["MatomoUrl"].updateHash(Object.assign(Object.assign({},B["MatomoUrl"].hashParsed.value),{},{idSiteHsr:t})),setTimeout(()=>{this.showNotification(Object(B["translate"])("HeatmapSessionRecording_SessionRecordingCreated"),e.type)},200)})})},setValueHasChanged(){this.isDirty=!0},updateHsr(){this.removeAnyHsrNotification(),this.checkRequiredFieldsAreSet()&&ma.createOrUpdateHsr(this.siteHsr,"HeatmapSessionRecording.updateSessionRecording").then(e=>{"error"!==e.type&&(this.isDirty=!1,this.siteHsr={},ma.reload().then(()=>{this.init()}),this.showNotification(Object(B["translate"])("HeatmapSessionRecording_SessionRecordingUpdated"),e.type))})},checkRequiredFieldsAreSet(){var e;if(!this.siteHsr.name){const e=this.translate("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}if(null===(e=this.siteHsr.match_page_rules)||void 0===e||!e.length||!ma.filterRules(this.siteHsr.match_page_rules).length){const e=this.translate("HeatmapSessionRecording_ErrorPageRuleRequired");return this.showNotification(e,"error"),!1}return!0},setMatchPageRule(e,t){this.siteHsr.match_page_rules=[...this.siteHsr.match_page_rules],this.siteHsr.match_page_rules[t]=e}},computed:{minSessionTimes(){return[0,5,10,15,20,30,45,60,90,120].map(e=>({key:""+e,value:e+" seconds"}))},sampleRates(){const e=[.1,.5,1,2,3,4,5,6,8,10,15,20,30,40,50,60,70,80,90,100];return e.map(e=>({key:""+e.toFixed(1),value:e+"%"}))},create(){return!this.idSiteHsr},edit(){return!this.create},editTitle(){const e=this.create?"HeatmapSessionRecording_CreateNewSessionRecording":"HeatmapSessionRecording_EditSessionRecordingX";return e},contentTitle(){return Object(B["translate"])(this.editTitle,this.siteHsr.name?`"${this.siteHsr.name}"`:"")},isLoading(){return da.state.value.isLoading},isUpdating(){return da.state.value.isUpdating},captureKeystrokesHelp(){const e="https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-keystrokes-in-form-fields";return Object(B["translate"])("HeatmapSessionRecording_CaptureKeystrokesHelp",``,"")},personalInformationNote(){const e="https://developer.matomo.org/guides/heatmap-session-recording/setup#masking-content-on-your-website";return Object(B["translate"])("HeatmapSessionRecording_PersonalInformationNote",Object(B["translate"])("HeatmapSessionRecording_SessionRecording"),"","
",``,"")},saveButtonText(){return this.edit?Object(B["translate"])("CoreUpdater_UpdateTitle"):Object(B["translate"])("HeatmapSessionRecording_CreateNewSessionRecording")}}});Di.render=xi;var Ti=Di;const Mi={class:"sessionRecordingList"},Pi={class:"filterStatus"},Ai={class:"hsrSearchFilter",style:{"margin-left":"3.5px"}},Bi={class:"index"},Ui={class:"name"},Fi={class:"creationDate"},Li={class:"sampleLimit"},Ii={class:"status"},Wi={class:"action"},qi={colspan:"7"},zi={class:"loadingPiwik"},$i=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Gi={colspan:"7"},Ji=["id"],Xi={class:"index"},Yi={class:"name"},Ki={class:"creationDate"},Qi={class:"sampleLimit"},Zi={key:0,class:"status status-paused"},en=["title"],tn={key:1,class:"status"},an={class:"action"},nn=["title","onClick"],sn=["title","onClick"],rn=["title","href"],on=["title","onClick"],ln={class:"tableActionBar"},cn=Object(s["createElementVNode"])("span",{class:"icon-add"},null,-1),dn={class:"ui-confirm",ref:"confirmDeleteSessionRecording"},mn=["value"],pn=["value"],un={class:"ui-confirm",ref:"confirmEndSessionRecording"},hn=["value"],gn=["value"];function bn(e,t,a,i,n,r){const o=Object(s["resolveComponent"])("Field"),l=Object(s["resolveComponent"])("ContentBlock"),c=Object(s["resolveDirective"])("content-table");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Mi,[Object(s["createVNode"])(l,{"content-title":e.translate("HeatmapSessionRecording_ManageSessionRecordings")},{default:Object(s["withCtx"])(()=>[Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_SessionRecordingsUsageBenefits")),1),Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("div",Pi,[Object(s["createVNode"])(o,{uicontrol:"select",name:"filterStatus","model-value":e.filterStatus,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.setFilterStatus(t)}),title:e.translate("HeatmapSessionRecording_Filter"),"full-width":!0,options:e.statusOptions},null,8,["model-value","title","options"])]),Object(s["createElementVNode"])("div",Ai,[Object(s["withDirectives"])(Object(s["createVNode"])(o,{uicontrol:"text",name:"hsrSearch",title:e.translate("General_Search"),modelValue:e.searchFilter,"onUpdate:modelValue":t[1]||(t[1]=t=>e.searchFilter=t),"full-width":!0},null,8,["title","modelValue"]),[[s["vShow"],e.hsrs.length>0]])])]),Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("table",null,[Object(s["createElementVNode"])("thead",null,[Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("th",Bi,Object(s["toDisplayString"])(e.translate("General_Id")),1),Object(s["createElementVNode"])("th",Ui,Object(s["toDisplayString"])(e.translate("General_Name")),1),Object(s["createElementVNode"])("th",Fi,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_CreationDate")),1),Object(s["createElementVNode"])("th",Li,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_SampleLimit")),1),Object(s["createElementVNode"])("th",Ii,Object(s["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(s["createElementVNode"])("th",Wi,Object(s["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(s["createElementVNode"])("tbody",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("td",qi,[Object(s["createElementVNode"])("span",zi,[$i,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[s["vShow"],e.isLoading||e.isUpdating]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("td",Gi,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_NoSessionRecordingsFound")),1)],512),[[s["vShow"],!e.isLoading&&0==e.hsrs.length]]),(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.sortedHsrs,t=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("tr",{id:"hsr"+t.idsitehsr,class:"hsrs",key:t.idsitehsr},[Object(s["createElementVNode"])("td",Xi,Object(s["toDisplayString"])(t.idsitehsr),1),Object(s["createElementVNode"])("td",Yi,Object(s["toDisplayString"])(t.name),1),Object(s["createElementVNode"])("td",Ki,Object(s["toDisplayString"])(t.created_date_pretty),1),Object(s["createElementVNode"])("td",Qi,Object(s["toDisplayString"])(t.sample_limit),1),"paused"===t.status?(Object(s["openBlock"])(),Object(s["createElementBlock"])("td",Zi,[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.ucfirst(t.status))+" ",1),Object(s["createElementVNode"])("span",{class:"icon icon-help",title:e.pauseReason},null,8,en)])):(Object(s["openBlock"])(),Object(s["createElementBlock"])("td",tn,Object(s["toDisplayString"])(e.ucfirst(t.status)),1)),Object(s["createElementVNode"])("td",an,[Object(s["createElementVNode"])("a",{class:"table-action icon-edit",title:e.translate("HeatmapSessionRecording_EditX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:a=>e.editHsr(t.idsitehsr)},null,8,nn),Object(s["withDirectives"])(Object(s["createElementVNode"])("a",{class:"table-action stopRecording icon-drop-crossed",title:e.translate("HeatmapSessionRecording_StopX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:a=>e.completeHsr(t)},null,8,sn),[[s["vShow"],"ended"!==t.status]]),Object(s["createElementVNode"])("a",{class:"table-action icon-show",title:e.translate("HeatmapSessionRecording_ViewReport"),href:e.getViewReportLink(t),target:"_blank"},null,8,rn),Object(s["createElementVNode"])("a",{class:"table-action icon-delete",title:e.translate("HeatmapSessionRecording_DeleteX",e.translate("HeatmapSessionRecording_SessionRecording")),onClick:a=>e.deleteHsr(t)},null,8,on)])],8,Ji))),128))])])),[[c]]),Object(s["createElementVNode"])("div",ln,[Object(s["createElementVNode"])("a",{class:"createNewHsr",value:"",onClick:t[2]||(t[2]=t=>e.createHsr())},[cn,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_CreateNewSessionRecording")),1)])])]),_:1},8,["content-title"]),Object(s["createElementVNode"])("div",dn,[Object(s["createElementVNode"])("h2",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_DeleteSessionRecordingConfirm")),1),Object(s["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,mn),Object(s["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,pn)],512),Object(s["createElementVNode"])("div",un,[Object(s["createElementVNode"])("h2",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_EndSessionRecordingConfirm")),1),Object(s["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,hn),Object(s["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,gn)],512)])}var vn=Object(s["defineComponent"])({props:{pauseReason:String},components:{ContentBlock:B["ContentBlock"],Field:U["Field"]},directives:{ContentTable:B["ContentTable"]},data(){return{searchFilter:""}},created(){ma.setFilterStatus(""),ma.fetchHsrs()},methods:{createHsr(){this.editHsr(0)},editHsr(e){B["MatomoUrl"].updateHash(Object.assign(Object.assign({},B["MatomoUrl"].hashParsed.value),{},{idSiteHsr:e}))},deleteHsr(e){B["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteSessionRecording,{yes:()=>{ma.deleteHsr(e.idsitehsr).then(()=>{ma.reload(),B["Matomo"].postEvent("updateReportingMenu")})}})},completeHsr(e){B["Matomo"].helper.modalConfirm(this.$refs.confirmEndSessionRecording,{yes:()=>{ma.completeHsr(e.idsitehsr).then(()=>{ma.reload()})}})},setFilterStatus(e){ma.setFilterStatus(e)},ucfirst(e){return`${e[0].toUpperCase()}${e.substr(1)}`},getViewReportLink(e){return`?${B["MatomoUrl"].stringify({module:"CoreHome",action:"index",idSite:e.idsite,period:"day",date:"yesterday"})}#?${B["MatomoUrl"].stringify({category:"HeatmapSessionRecording_SessionRecordings",idSite:e.idsite,period:"day",date:"yesterday",subcategory:e.idsitehsr})}`}},computed:{filterStatus(){return ma.state.value.filterStatus},statusOptions(){return ma.statusOptions},hsrs(){return ma.hsrs.value},isLoading(){return ma.state.value.isLoading},isUpdating(){return ma.state.value.isUpdating},sortedHsrs(){const e=[...this.hsrs].filter(e=>Object.keys(e).some(t=>{const a=e;return"string"===typeof a[t]&&-1!==a[t].indexOf(this.searchFilter)}));return e.sort((e,t)=>t.idsitehsr-e.idsitehsr),e}}});vn.render=bn;var On=vn;const jn={class:"manageHsr"};function fn(e,t,a,i,n,r){const o=Object(s["resolveComponent"])("MatomoJsNotWritableAlert"),l=Object(s["resolveComponent"])("SessionRecordingList"),c=Object(s["resolveComponent"])("SessionRecordingEdit");return Object(s["openBlock"])(),Object(s["createElementBlock"])(s["Fragment"],null,[e.editMode?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createBlock"])(o,{key:0,"is-matomo-js-writable":e.isMatomoJsWritable,"recording-type":e.translate("HeatmapSessionRecording_SessionRecordings")},null,8,["is-matomo-js-writable","recording-type"])),Object(s["createElementVNode"])("div",jn,[Object(s["withDirectives"])(Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(l,{"pause-reason":e.pauseReason},null,8,["pause-reason"])],512),[[s["vShow"],!e.editMode]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{"id-site-hsr":e.idSiteHsr},null,8,["id-site-hsr"])],512),[[s["vShow"],e.editMode]])])],64)}var yn=Object(s["defineComponent"])({props:{pauseReason:String,isMatomoJsWritable:{type:Boolean,required:!0}},data(){return{editMode:!1,idSiteHsr:null}},components:{MatomoJsNotWritableAlert:oi,SessionRecordingEdit:Ti,SessionRecordingList:On},created(){Object(s["watch"])(()=>B["MatomoUrl"].hashParsed.value.idSiteHsr,e=>{this.initState(e)}),this.initState(B["MatomoUrl"].hashParsed.value.idSiteHsr)},methods:{removeAnyHsrNotification(){B["NotificationsStore"].remove("hsrmanagement")},initState(e){if(e){if("0"===e){const e={isAllowed:!0};if(B["Matomo"].postEvent("HeatmapSessionRecording.initAddSessionRecording",e),e&&!e.isAllowed)return this.editMode=!1,void(this.idSiteHsr=null)}this.editMode=!0,this.idSiteHsr=parseInt(e,10)}else this.editMode=!1,this.idSiteHsr=null;this.removeAnyHsrNotification()}}});yn.render=fn;var Sn=yn;const Hn={class:"ui-confirm",id:"listOfPageviews"},_n=Object(s["createElementVNode"])("br",null,null,-1),En=Object(s["createElementVNode"])("br",null,null,-1),Vn=["onClick"],Nn=["title"],Rn=["value"];function wn(e,t,a,i,n,r){const o=Object(s["resolveDirective"])("content-table");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Hn,[Object(s["createElementVNode"])("h2",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_PageviewsInVisit")),1),_n,En,Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("table",null,[Object(s["createElementVNode"])("thead",null,[Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("th",null,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_ColumnTime")),1),Object(s["createElementVNode"])("th",null,Object(s["toDisplayString"])(e.translate("General_TimeOnPage")),1),Object(s["createElementVNode"])("th",null,Object(s["toDisplayString"])(e.translate("Goals_URL")),1)])]),Object(s["createElementVNode"])("tbody",null,[(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.pageviews,t=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("tr",{key:t.idloghsr,class:Object(s["normalizeClass"])({inactive:t.idloghsr!==e.idLogHsr}),onClick:a=>e.onClickPageView(t)},[Object(s["createElementVNode"])("td",null,Object(s["toDisplayString"])(t.server_time_pretty),1),Object(s["createElementVNode"])("td",null,Object(s["toDisplayString"])(t.time_on_page_pretty),1),Object(s["createElementVNode"])("td",{title:t.label},Object(s["toDisplayString"])((t.label||"").substr(0,50)),9,Nn)],10,Vn))),128))])])),[[o]]),Object(s["createElementVNode"])("input",{role:"close",type:"button",value:e.translate("General_Close")},null,8,Rn)])}var kn=Object(s["defineComponent"])({props:{pageviews:{type:Array,required:!0},idLogHsr:{type:Number,required:!0}},directives:{ContentTable:B["ContentTable"]},methods:{onClickPageView(e){e.idloghsr!==this.idLogHsr&&B["MatomoUrl"].updateUrl(Object.assign(Object.assign({},B["MatomoUrl"].urlParsed.value),{},{idLogHsr:e.idloghsr}),B["MatomoUrl"].hashParsed.value.length?Object.assign(Object.assign({},B["MatomoUrl"].hashParsed.value),{},{idLogHsr:e.idloghsr}):void 0)}}});kn.render=wn;var xn=kn;const Cn={class:"heatmap-vis-title"},Dn={key:0,class:"alert alert-info heatmap-country-alert"},Tn={key:1},Mn={key:2},Pn=["innerHTML"],An={class:"alert alert-info"},Bn={key:3},Un={class:"alert alert-info"};function Fn(e,t,a,i,n,r){var o;const l=Object(s["resolveComponent"])("EnrichedHeadline"),c=Object(s["resolveComponent"])("MatomoJsNotWritableAlert"),d=Object(s["resolveComponent"])("HeatmapVis"),m=Object(s["resolveComponent"])("ContentBlock");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",null,[Object(s["createElementVNode"])("h2",Cn,[Object(s["createVNode"])(l,{"edit-url":e.editUrl,"inline-help":e.inlineHelp},{default:Object(s["withCtx"])(()=>[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_HeatmapX",`"${e.heatmap.name}"`)),1)]),_:1},8,["edit-url","inline-help"])]),Object(s["createVNode"])(c,{"is-matomo-js-writable":e.isMatomoJsWritable,"recording-type":e.translate("HeatmapSessionRecording_Heatmaps")},null,8,["is-matomo-js-writable","recording-type"]),e.includedCountries?(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Dn,Object(s["toDisplayString"])(e.translate("HeatmapSessionRecording_HeatmapInfoTrackVisitsFromCountries",e.includedCountries)),1)):Object(s["createCommentVNode"])("",!0),e.heatmap.page_treemirror?(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Tn,[Object(s["createVNode"])(d,{"created-date":e.createdDate,"excluded-elements":e.heatmap.excluded_elements,"num-samples":e.heatmapMetadata,url:e.heatmap.screenshot_url,"heatmap-date":e.heatmapDate,"heatmap-period":e.heatmapPeriod,"offset-accuracy":e.offsetAccuracy,"breakpoint-tablet":e.heatmap.breakpoint_tablet,"breakpoint-mobile":e.heatmap.breakpoint_mobile,"heatmap-types":e.heatmapTypes,"device-types":e.deviceTypes,"id-site-hsr":e.idSiteHsr,"is-active":e.isActive,"desktop-preview-size":e.desktopPreviewSize,"iframe-resolutions-values":e.iframeResolutions},null,8,["created-date","excluded-elements","num-samples","url","heatmap-date","heatmap-period","offset-accuracy","breakpoint-tablet","breakpoint-mobile","heatmap-types","device-types","id-site-hsr","is-active","desktop-preview-size","iframe-resolutions-values"])])):null!==(o=e.heatmapMetadata)&&void 0!==o&&o.nb_samples_device_all?(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Bn,[Object(s["createVNode"])(m,null,{default:Object(s["withCtx"])(()=>[Object(s["createElementVNode"])("div",Un,Object(s["toDisplayString"])(e.noHeatmapScreenshotRecordedYetText),1)]),_:1})])):(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",Mn,[Object(s["createElementVNode"])("p",{innerHTML:e.$sanitize(e.recordedSamplesTroubleShoot)},null,8,Pn),Object(s["createVNode"])(m,null,{default:Object(s["withCtx"])(()=>[Object(s["createElementVNode"])("div",An,Object(s["toDisplayString"])(e.translate(e.noDataMessageKey)),1)]),_:1})]))])}var Ln=Object(s["defineComponent"])({props:{idSiteHsr:{type:Number,required:!0},heatmap:{type:Object,required:!0},heatmapMetadata:{type:Object,required:!0},deviceTypes:{type:Array,required:!0},heatmapTypes:{type:Array,required:!0},offsetAccuracy:{type:Number,required:!0},heatmapPeriod:{type:String,required:!0},heatmapDate:{type:String,required:!0},isActive:Boolean,createdDate:{type:String,required:!0},editUrl:{type:String,required:!0},inlineHelp:{type:String,required:!0},includedCountries:{type:String,required:!0},desktopPreviewSize:{type:Number,required:!0},iframeResolutions:{type:Object,required:!0},noDataMessageKey:{type:String,required:!0},isMatomoJsWritable:{type:Boolean,required:!0}},components:{MatomoJsNotWritableAlert:oi,ContentBlock:B["ContentBlock"],HeatmapVis:oe,EnrichedHeadline:B["EnrichedHeadline"]},computed:{noHeatmapScreenshotRecordedYetText(){return Object(B["translate"])("HeatmapSessionRecording_NoHeatmapScreenshotRecordedYet",this.heatmapMetadata.nb_samples_device_all,Object(B["translate"])("HeatmapSessionRecording_ScreenshotUrl"))},recordedSamplesTroubleShoot(){const e=Object(B["externalLink"])("https://matomo.org/faq/heatmap-session-recording/troubleshooting-heatmaps/");return Object(B["translate"])("HeatmapSessionRecording_HeatmapTroubleshoot",e,"")}},created(){B["Matomo"].postEvent("hidePeriodSelector")}});Ln.render=Fn;var In=Ln;
+/**
+ * Copyright (C) InnoCraft Ltd - All rights reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the property of InnoCraft Ltd.
+ * The intellectual and technical concepts contained herein are protected by trade secret
+ * or copyright law. Redistribution of this information or reproduction of this material is
+ * strictly forbidden unless prior written permission is obtained from InnoCraft Ltd.
+ *
+ * You shall use this code only in accordance with the license agreement obtained from
+ * InnoCraft Ltd.
+ *
+ * @link https://www.innocraft.com/
+ * @license For license details see https://www.innocraft.com/license
+ */}})}));
+//# sourceMappingURL=HeatmapSessionRecording.umd.min.js.map
\ No newline at end of file
diff --git a/files/plugin-HeatmapSessionRecording-5.2.3/vue/dist/umd.metadata.json b/files/plugin-HeatmapSessionRecording-5.2.6/vue/dist/umd.metadata.json
similarity index 100%
rename from files/plugin-HeatmapSessionRecording-5.2.3/vue/dist/umd.metadata.json
rename to files/plugin-HeatmapSessionRecording-5.2.6/vue/dist/umd.metadata.json
diff --git a/files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVis.less b/files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVis.less
similarity index 100%
rename from files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVis.less
rename to files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVis.less
diff --git a/files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVis.vue b/files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVis.vue
similarity index 99%
rename from files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVis.vue
rename to files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVis.vue
index 37682f9..c184f59 100644
--- a/files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVis.vue
+++ b/files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVis.vue
@@ -1058,7 +1058,7 @@ export default defineComponent({
`${this.actualNumSamples.nb_samples_device_all}`,
this.createdDate,
);
- const linkString = externalLink('https://matomo.org/subcategory/troubleshoot-7/');
+ const linkString = externalLink('https://matomo.org/faq/heatmap-session-recording/troubleshooting-heatmaps/');
const string2 = translate(
'HeatmapSessionRecording_HeatmapTroubleshoot',
linkString,
diff --git a/files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVisPage.vue b/files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVisPage.vue
similarity index 92%
rename from files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVisPage.vue
rename to files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVisPage.vue
index 6df2287..b22ddb6 100644
--- a/files/plugin-HeatmapSessionRecording-5.2.3/vue/src/HeatmapVis/HeatmapVisPage.vue
+++ b/files/plugin-HeatmapSessionRecording-5.2.6/vue/src/HeatmapVis/HeatmapVisPage.vue
@@ -54,6 +54,8 @@
>
+
Google, Yahoo, and Bing may not want you to see what keywords get you traffic, but we do. How? By leveraging their APIs.
+Slice the keywords data with one of the 90+ dimensions and mix them with metrics like impressions, clicks, CTR, and the average position in the SERPs.
+No matter how well you optimise your site, without proper crawling, your SEO efforts will be in vain.
+Discover the number of pages crawled and indexed, 404 pages found, and other issues that could affect your crawling performance in Yahoo and Bing.
+The page crawling error reports will show you what pages could not be crawled by a search engine with a detailed reason, so you can fix them right away.
+Considering that YouTube and Google Images are the second and third largest search engines, your videos and images can drive significant organic traffic to your site.
+With the Search Engine Keywords Performance plugin, you can uncover every keyword they rank for and how many visitors they attract, among other metrics.
+Track your top keywords and see how your metrics and KPIs unfold. Monitor, identify, and optimise your SEO strategy for opportunities to get the highest return from your efforts.
+' . Piwik::translate('SearchEngineKeywordsPerformance_NoSegmentation') . '
'; + } + } + public function isGoogleEnabledForType($type) + { + $idSite = Common::getRequestVar('idSite', $this->idSite, 'int'); + if (empty($idSite)) { + return \false; + } + if (SearchEngineKeywordsPerformance::isGoogleForceEnabled($idSite)) { + return \true; + } + $setting = new MeasurableSettings($idSite); + $searchConsoleSetting = $setting->googleSearchConsoleUrl; + $typeSetting = $setting->getSetting('google' . $type . 'keywords'); + return $searchConsoleSetting && $searchConsoleSetting->getValue() && $typeSetting && $typeSetting->getValue() && (strpos($searchConsoleSetting->getValue(), 'android-app') === \false || $type == 'web'); + } + public function isAnyGoogleTypeEnabled() + { + return $this->isGoogleEnabledForType('web') || $this->isGoogleEnabledForType('image') || $this->isGoogleEnabledForType('video') || $this->isGoogleEnabledForType('news'); + } + public function isBingEnabled() + { + $idSite = Common::getRequestVar('idSite', $this->idSite, 'int'); + if (empty($idSite)) { + return \false; + } + if (SearchEngineKeywordsPerformance::isBingForceEnabled($idSite)) { + return \true; + } + $setting = new MeasurableSettings($idSite); + return !empty($setting->bingSiteUrl) && $setting->bingSiteUrl->getValue(); + } + public function isYandexEnabled() + { + $idSite = Common::getRequestVar('idSite', \false, 'int'); + if (empty($idSite)) { + return \false; + } + if (SearchEngineKeywordsPerformance::isYandexForceEnabled($idSite)) { + return \true; + } + $setting = new MeasurableSettings($idSite); + return !empty($setting->yandexAccountAndHostId) && $setting->yandexAccountAndHostId->getValue(); + } + public function getMetricNamesToProcessReportTotals() + { + return Metrics::getMetricIdsToProcessReportTotal(); + } + /** + * @param ViewDataTable $view + * @param $type + * @throws \Exception + */ + public function configureViewMessagesGoogle($view, $type) + { + $period = Common::getRequestVar('period', \false, 'string'); + $date = Common::getRequestVar('date', \false, 'string'); + $idSite = Common::getRequestVar('idSite', \false, 'string'); + // Append a footer message if data was not yet reported as final + $view->config->filters[] = function ($table) use ($view) { + if ($table->getMetadata(Google::DATATABLE_METADATA_TEMPORARY) === \true && \false === strpos($view->config->show_footer_message, Piwik::translate('SearchEngineKeywordsPerformance_GoogleDataNotFinal'))) { + $view->config->show_footer_message .= '' . Piwik::translate('SearchEngineKeywordsPerformance_GoogleDataNotFinal') . '
'; + } + }; + if (SearchEngineKeywordsPerformance::isGoogleForceEnabled($idSite)) { + return; + } + $measurableSetting = new MeasurableSettings($idSite); + [$account, $url] = explode('##', $measurableSetting->googleSearchConsoleUrl->getValue()); + $model = new ModelGoogle(); + $message = ''; + $periodObj = Period\Factory::build($period, $date); + $lastDate = $model->getLatestDateKeywordDataIsAvailableFor($url); + $lastDateForType = $model->getLatestDateKeywordDataIsAvailableFor($url, $type); + if ($lastDate && !Date::factory($lastDate)->isEarlier($periodObj->getDateStart())) { + return; + } + $lastDateMessage = ''; + if ($lastDateForType && $period != 'range') { + $periodObjType = Period\Factory::build($period, Date::factory($lastDateForType)); + $lastDateMessage = Piwik::translate('SearchEngineKeywordsPerformance_LatestAvailableDate', '' . $periodObjType->getLocalizedShortString() . ''); + } + if ($periodObj->getDateEnd()->isLater(Date::now()->subDay(5))) { + $message .= ''
+ . Piwik::translate('CoreHome_ThereIsNoDataForThisReport')
+ . '
' . Piwik::translate('SearchEngineKeywordsPerformance_GoogleDataProvidedWithDelay')
+ . '
' . $lastDateMessage . '
' . $lastDateMessage . '
'; + } + } + protected function formatColumnsAsNumbers($view, $columns) + { + $numberFormatter = NumberFormatter::getInstance(); + $view->config->filters[] = function (DataTable $table) use ($columns, $numberFormatter) { + $firstRow = $table->getFirstRow(); + if (empty($firstRow)) { + return; + } + foreach ($columns as $metric) { + $value = $firstRow->getColumn($metric); + if (\false !== $value) { + $firstRow->setColumn($metric, $numberFormatter->formatNumber($value)); + } + } + }; + } + /** + * @param ViewDataTable $view + */ + protected function formatCtrAndPositionColumns($view) + { + $settings = new SystemSettings(); + $numberFormatter = NumberFormatter::getInstance(); + $view->config->filters[] = ['ColumnCallbackReplace', [Metrics::CTR, function ($value) use ($numberFormatter) { + return $numberFormatter->formatPercent($value * 100, 0, 0); + }]]; + $precision = $settings->roundKeywordPosition->getValue() ? 0 : 1; + $view->config->filters[] = ['ColumnCallbackReplace', [Metrics::POSITION, function ($value) use ($precision, $numberFormatter) { + if ($precision) { + return $numberFormatter->formatNumber($value, $precision, $precision); + } + return round($value, $precision); + }]]; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingErrorExamplesBing.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingErrorExamplesBing.php new file mode 100644 index 0000000..427007d --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingErrorExamplesBing.php @@ -0,0 +1,100 @@ +getLocalized(Date::DATETIME_FORMAT_SHORT) : Piwik::translate('General_Never'); + $this->categoryId = 'General_Actions'; + $this->subcategoryId = 'SearchEngineKeywordsPerformance_CrawlingErrors'; + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlErrors'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlErrorsFromDateX', $dateOfLastImport); + $this->defaultSortColumn = 'label'; + $this->metrics = []; + $this->order = 2; + } + public function configureView(ViewDataTable $view) + { + $view->config->show_all_views_icons = \false; + $view->config->show_table_all_columns = \false; + $view->config->disable_row_evolution = \true; + $view->config->addTranslations([ + 'label' => Piwik::translate('Actions_ColumnPageURL'), + 'category' => Piwik::translate('SearchEngineKeywordsPerformance_Category'), + 'inLinks' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlInboundLink'), + 'responseCode' => Piwik::translate('SearchEngineKeywordsPerformance_ResponseCode') + ]); + $translations = [ + 'Code301' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus301'), + 'Code302' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus302'), + 'Code4xx' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus4xx'), + 'Code5xx' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus5xx'), + 'BlockedByRobotsTxt' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlBlockedByRobotsTxt'), + 'ContainsMalware' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlMalwareInfected'), + 'ImportantUrlBlockedByRobotsTxt' => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlImportantBlockedByRobotsTxt') + ]; + $view->config->filters[] = ['ColumnCallbackReplace', ['category', function ($val) use ($translations) { + $codes = explode(',', $val); + $result = []; + foreach ($codes as $code) { + $result[] = array_key_exists($code, $translations) ? $translations[$code] : $code; + } + return implode(', ', $result); + }]]; + $this->configureSegmentNotSupported($view); + } + public function getSecondarySortColumnCallback() + { + return null; + } + public function configureReportMetadata(&$availableReports, $infos) + { + } + public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory) + { + $widget = $factory->createWidget(); + $widget->setIsWide(); + $widgetsList->addWidgetConfig($widget); + } + public function isEnabled() + { + $idSite = Common::getRequestVar('idSite', \false, 'int'); + if (empty($idSite)) { + return \false; + } + if (SearchEngineKeywordsPerformance::isBingForceEnabled($idSite)) { + return \true; + } + $setting = new MeasurableSettings($idSite); + return !empty($setting->bingSiteUrl) && $setting->bingSiteUrl->getValue(); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewBing.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewBing.php new file mode 100644 index 0000000..9f61693 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewBing.php @@ -0,0 +1,132 @@ +subcategoryId = 'SearchEngineKeywordsPerformance_CrawlingStats'; + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlingStats'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlingStatsDocumentation'); + $this->defaultSortColumn = null; + $this->metrics = []; + $this->order = 10; + } + public function configureView(ViewDataTable $view) + { + $period = Common::getRequestVar('period', \false, 'string'); + $viewDataTable = Common::getRequestVar('viewDataTable', \false, 'string'); + if ($period != 'day' && $viewDataTable != 'graphEvolution') { + $view->config->show_footer_message .= '' . Piwik::translate('SearchEngineKeywordsPerformance_ReportShowMaximumValues') . '
'; + } + $view->config->show_limit_control = \false; + $view->config->show_all_views_icons = \false; + $view->config->show_table_all_columns = \false; + $view->config->setDefaultColumnsToDisplay([BingRecordBuilder::CRAWLSTATS_CRAWLED_PAGES_RECORD_NAME], \false, \false); + $view->config->addTranslations([ + BingRecordBuilder::CRAWLSTATS_OTHER_CODES_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlStatsOtherCodes'), + BingRecordBuilder::CRAWLSTATS_BLOCKED_ROBOTS_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlBlockedByRobotsTxt'), + BingRecordBuilder::CRAWLSTATS_CODE_2XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus2xx'), + BingRecordBuilder::CRAWLSTATS_CODE_301_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus301'), + BingRecordBuilder::CRAWLSTATS_CODE_302_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus302'), + BingRecordBuilder::CRAWLSTATS_CODE_4XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus4xx'), + BingRecordBuilder::CRAWLSTATS_CODE_5XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlHttpStatus5xx'), + BingRecordBuilder::CRAWLSTATS_TIMEOUT_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlConnectionTimeout'), + BingRecordBuilder::CRAWLSTATS_MALWARE_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlMalwareInfected'), + BingRecordBuilder::CRAWLSTATS_ERRORS_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_CrawlingErrors'), + BingRecordBuilder::CRAWLSTATS_CRAWLED_PAGES_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlCrawledPages'), + BingRecordBuilder::CRAWLSTATS_DNS_FAILURE_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlDNSFailures'), + BingRecordBuilder::CRAWLSTATS_IN_INDEX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlPagesInIndex'), + BingRecordBuilder::CRAWLSTATS_IN_LINKS_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_BingCrawlInboundLink') + ]); + $view->config->selectable_columns = [ + BingRecordBuilder::CRAWLSTATS_OTHER_CODES_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_BLOCKED_ROBOTS_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CODE_2XX_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CODE_301_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CODE_302_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CODE_4XX_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CODE_5XX_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_TIMEOUT_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_MALWARE_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_ERRORS_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_CRAWLED_PAGES_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_DNS_FAILURE_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_IN_INDEX_RECORD_NAME, + BingRecordBuilder::CRAWLSTATS_IN_LINKS_RECORD_NAME + ]; + $this->configureSegmentNotSupported($view); + $this->formatColumnsAsNumbers($view, $view->config->selectable_columns); + } + public function getSecondarySortColumnCallback() + { + return null; + } + public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory) + { + $idSite = Common::getRequestVar('idSite', 0, 'int'); + if (empty($idSite)) { + return; + } + $subcategory = 'SearchEngineKeywordsPerformance_CrawlingStats'; + $widgets = []; + $config = $factory->createWidget(); + $config->forceViewDataTable(Evolution::ID); + $config->setSubcategoryId($subcategory); + $config->setIsNotWidgetizable(); + $widgets[] = $config; + $config = $factory->createWidget(); + $config->forceViewDataTable(Sparklines::ID); + $config->setSubcategoryId($subcategory); + $config->setName(''); + $config->setIsNotWidgetizable(); + $widgets[] = $config; + $config = $factory->createContainerWidget('CrawlingStatsBing'); + $config->setCategoryId($widgets[0]->getCategoryId()); + $config->setSubcategoryId($subcategory); + $config->setIsWidgetizable(); + foreach ($widgets as $widget) { + $config->addWidgetConfig($widget); + } + $widgetsList->addWidgetConfigs([$config]); + } + public function isEnabled() + { + $idSite = Common::getRequestVar('idSite', \false, 'int'); + if (empty($idSite)) { + return \false; + } + if (SearchEngineKeywordsPerformance::isBingForceEnabled($idSite)) { + return \true; + } + $setting = new MeasurableSettings($idSite); + return !empty($setting->bingSiteUrl) && $setting->bingSiteUrl->getValue(); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewYandex.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewYandex.php new file mode 100644 index 0000000..058aabe --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetCrawlingOverviewYandex.php @@ -0,0 +1,107 @@ +subcategoryId = 'SearchEngineKeywordsPerformance_CrawlingStats'; + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlingStats'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlingStatsDocumentation'); + $this->defaultSortColumn = null; + $this->metrics = []; + $this->order = 10; + } + public function configureView(ViewDataTable $view) + { + $period = Common::getRequestVar('period', \false, 'string'); + $viewDataTable = Common::getRequestVar('viewDataTable', \false, 'string'); + if ($period != 'day' && $viewDataTable != 'graphEvolution') { + $view->config->show_footer_message .= '' . Piwik::translate('SearchEngineKeywordsPerformance_ReportShowMaximumValues') . '
'; + } + $view->config->show_limit_control = \false; + $view->config->show_all_views_icons = \false; + $view->config->show_table_all_columns = \false; + $view->config->setDefaultColumnsToDisplay([YandexRecordBuilder::CRAWLSTATS_IN_INDEX_RECORD_NAME], \false, \false); + $view->config->addTranslations([ + YandexRecordBuilder::CRAWLSTATS_IN_INDEX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlInIndex'), + YandexRecordBuilder::CRAWLSTATS_APPEARED_PAGES_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlAppearedPages'), + YandexRecordBuilder::CRAWLSTATS_REMOVED_PAGES_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlRemovedPages'), + YandexRecordBuilder::CRAWLSTATS_CRAWLED_PAGES_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlCrawledPages'), + YandexRecordBuilder::CRAWLSTATS_CODE_2XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlHttpStatus2xx'), + YandexRecordBuilder::CRAWLSTATS_CODE_3XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlHttpStatus3xx'), + YandexRecordBuilder::CRAWLSTATS_CODE_4XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlHttpStatus4xx'), + YandexRecordBuilder::CRAWLSTATS_CODE_5XX_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlHttpStatus5xx'), + YandexRecordBuilder::CRAWLSTATS_ERRORS_RECORD_NAME => Piwik::translate('SearchEngineKeywordsPerformance_YandexCrawlErrors') + ]); + $view->config->selectable_columns = [ + YandexRecordBuilder::CRAWLSTATS_IN_INDEX_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_APPEARED_PAGES_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_REMOVED_PAGES_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_CRAWLED_PAGES_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_CODE_2XX_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_CODE_3XX_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_CODE_4XX_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_CODE_5XX_RECORD_NAME, + YandexRecordBuilder::CRAWLSTATS_ERRORS_RECORD_NAME + ]; + $this->configureSegmentNotSupported($view); + } + public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory) + { + $idSite = Common::getRequestVar('idSite', 0, 'int'); + if (empty($idSite)) { + return; + } + $subcategory = 'SearchEngineKeywordsPerformance_CrawlingStats'; + $widgets = []; + $config = $factory->createWidget(); + $config->forceViewDataTable(Evolution::ID); + $config->setSubcategoryId($subcategory); + $config->setIsNotWidgetizable(); + $widgets[] = $config; + $config = $factory->createWidget(); + $config->forceViewDataTable(Sparklines::ID); + $config->setSubcategoryId($subcategory); + $config->setName(''); + $config->setIsNotWidgetizable(); + $widgets[] = $config; + $config = $factory->createContainerWidget('CrawlingStatsYandex'); + $config->setCategoryId($widgets[0]->getCategoryId()); + $config->setSubcategoryId($subcategory); + $config->setIsWidgetizable(); + foreach ($widgets as $widget) { + $config->addWidgetConfig($widget); + } + $widgetsList->addWidgetConfigs([$config]); + } + public function isEnabled() + { + return parent::isYandexEnabled(); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywords.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywords.php new file mode 100644 index 0000000..c5be0de --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywords.php @@ -0,0 +1,53 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_KeywordsCombined'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_KeywordsCombinedDocumentation'); + $this->metrics = ['nb_visits']; + $this->order = 1; + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $view->config->columns_to_display = ['label', 'nb_visits']; + } + public function getRelatedReports() + { + $getKeywordsImported = new GetKeywordsImported(); + if ($getKeywordsImported->isEnabled()) { + return [ReportsProvider::factory('SearchEngineKeywordsPerformance', 'getKeywordsImported'), ReportsProvider::factory('Referrers', 'getKeywords')]; + } + + return [ReportsProvider::factory('Referrers', 'getKeywords')]; + } + public function alwaysUseDefaultViewDataTable() + { + return \true; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsBing.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsBing.php new file mode 100644 index 0000000..520852a --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsBing.php @@ -0,0 +1,90 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_BingKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_BingKeywordsDocumentation'); + $this->order = 15; + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $period = Common::getRequestVar('period', \false, 'string'); + $idSite = Common::getRequestVar('idSite', \false, 'string'); + $model = new ModelBing(); + $measurableSetting = new MeasurableSettings($idSite); + $dateLastData = null; + if (!SearchEngineKeywordsPerformance::isBingForceEnabled($idSite)) { + list($apiKey, $url) = explode('##', $measurableSetting->bingSiteUrl->getValue()); + $dateLastData = $model->getLatestDateKeywordDataIsAvailableFor($url); + } + $lastDateMessage = ''; + if ($dateLastData && $period != 'range') { + $reportPeriod = $period != 'day' ? $period : 'week'; + $periodObj = Period\Factory::build($reportPeriod, Date::factory($dateLastData)); + $lastDateMessage = Piwik::translate( + 'SearchEngineKeywordsPerformance_LatestAvailableDate', + '' . $periodObj->getLocalizedShortString() . '' + ); + } + if ($period == 'day') { + $message = ''
+ . Piwik::translate('CoreHome_ThereIsNoDataForThisReport') . '
'
+ . Piwik::translate('SearchEngineKeywordsPerformance_BingKeywordsNotDaily')
+ . '
' . $lastDateMessage . '
' . Piwik::translate('CoreHome_ThereIsNoDataForThisReport') . '
' . $lastDateMessage . '
' . Piwik::translate('SearchEngineKeywordsPerformance_BingKeywordsNoRangeReports') . '
'; + break; + } + } + } + if (!empty($message)) { + $view->config->no_data_message = $message; + } + $this->formatCtrAndPositionColumns($view); + } + public function isEnabled() + { + return parent::isBingEnabled(); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleImage.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleImage.php new file mode 100644 index 0000000..90c9a00 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleImage.php @@ -0,0 +1,44 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_ImageKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_ImageKeywordsDocumentation'); + $this->order = 20; + } + public function isEnabled() + { + return parent::isGoogleEnabledForType('image'); + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $this->configureViewMessagesGoogle($view, 'image'); + $this->formatCtrAndPositionColumns($view); + $view->requestConfig->filter_limit = 5; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleNews.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleNews.php new file mode 100644 index 0000000..0187f46 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleNews.php @@ -0,0 +1,44 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_NewsKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_NewsKeywordsDocumentation'); + $this->order = 25; + } + public function isEnabled() + { + return parent::isGoogleEnabledForType('news'); + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $this->configureViewMessagesGoogle($view, 'news'); + $this->formatCtrAndPositionColumns($view); + $view->requestConfig->filter_limit = 5; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleVideo.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleVideo.php new file mode 100644 index 0000000..6422ce7 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleVideo.php @@ -0,0 +1,44 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_VideoKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_VideoKeywordsDocumentation'); + $this->order = 25; + } + public function isEnabled() + { + return parent::isGoogleEnabledForType('video'); + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $this->configureViewMessagesGoogle($view, 'video'); + $this->formatCtrAndPositionColumns($view); + $view->requestConfig->filter_limit = 5; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleWeb.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleWeb.php new file mode 100644 index 0000000..3234ed6 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsGoogleWeb.php @@ -0,0 +1,43 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_WebKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_WebKeywordsDocumentation'); + $this->order = 10; + } + public function isEnabled() + { + return parent::isGoogleEnabledForType('web'); + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $this->configureViewMessagesGoogle($view, 'web'); + $this->formatCtrAndPositionColumns($view); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsImported.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsImported.php new file mode 100644 index 0000000..d11996f --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsImported.php @@ -0,0 +1,58 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_KeywordsCombinedImported'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_KeywordsCombinedImportedDocumentation'); + $this->subcategoryId = null; + // hide report + } + public function isEnabled() + { + $reportsEnabled = 0; + $reportsEnabled += (int) parent::isGoogleEnabledForType('image'); + $reportsEnabled += (int) parent::isGoogleEnabledForType('web'); + $reportsEnabled += (int) parent::isGoogleEnabledForType('video'); + $reportsEnabled += (int) parent::isGoogleEnabledForType('news'); + $reportsEnabled += (int) parent::isBingEnabled(); + return $reportsEnabled > 1; + } + public function getRelatedReports() + { + return [ReportsProvider::factory('SearchEngineKeywordsPerformance', 'getKeywords'), ReportsProvider::factory('Referrers', 'getKeywords')]; + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $this->formatCtrAndPositionColumns($view); + } + public function alwaysUseDefaultViewDataTable() + { + return \true; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsReferrers.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsReferrers.php new file mode 100644 index 0000000..27472f0 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsReferrers.php @@ -0,0 +1,46 @@ +name = Piwik::translate('SearchEngineKeywordsPerformance_KeywordsReferrers'); + $this->module = 'Referrers'; + $this->action = 'getKeywords'; + $this->subcategoryId = 'Referrers_SubmenuSearchEngines'; + $this->order = 10; + } + public function getRelatedReports() + { + // don't show related reports when viewing the goals page, as related reports don't contain goal data + if (Common::getRequestVar('viewDataTable', '') === 'tableGoals' && Common::getRequestVar('idGoal', '') !== '') { + return []; + } + $getKeywordsImported = new GetKeywordsImported(); + if ($getKeywordsImported->isEnabled()) { + return [ReportsProvider::factory('SearchEngineKeywordsPerformance', 'getKeywordsImported'), ReportsProvider::factory('SearchEngineKeywordsPerformance', 'getKeywords')]; + } + return [ReportsProvider::factory('SearchEngineKeywordsPerformance', 'getKeywords')]; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsYandex.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsYandex.php new file mode 100644 index 0000000..de52173 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/Reports/GetKeywordsYandex.php @@ -0,0 +1,62 @@ +dimension = new Keyword(); + $this->name = Piwik::translate('SearchEngineKeywordsPerformance_YandexKeywords'); + $this->documentation = Piwik::translate('SearchEngineKeywordsPerformance_YandexKeywordsDocumentation'); + $this->order = 17; + } + public function configureView(ViewDataTable $view) + { + parent::configureView($view); + $period = Common::getRequestVar('period', \false, 'string'); + $idSite = Common::getRequestVar('idSite', \false, 'string'); + $model = new ModelYandex(); + $measurableSetting = new MeasurableSettings($idSite); + if (!SearchEngineKeywordsPerformance::isYandexForceEnabled($idSite)) { + [$account, $url] = explode('##', $measurableSetting->yandexAccountAndHostId->getValue()); + $dateLastData = $model->getLatestDateKeywordDataIsAvailableFor($url); + } + if ($dateLastData && $period != 'range') { + $periodObjType = Period\Factory::build($period, Date::factory($dateLastData)); + $lastDateMessage = Piwik::translate('SearchEngineKeywordsPerformance_LatestAvailableDate', '' . $periodObjType->getLocalizedShortString() . ''); + $message = '' . Piwik::translate('CoreHome_ThereIsNoDataForThisReport') . '
' . $lastDateMessage . '
' . Piwik::translate('SearchEngineKeywordsPerformance_NoSegmentation') . '
'; + if (property_exists($view->config, 'show_header_message')) { + $view->config->show_header_message = $message; + } else { + $view->config->show_footer_message .= $message; + } + } + public function getStylesheetFiles(&$stylesheets) + { + $stylesheets[] = "plugins/SearchEngineKeywordsPerformance/stylesheets/styles.less"; + $stylesheets[] = "plugins/SearchEngineKeywordsPerformance/vue/src/Configure/ConfigureConnection.less"; + } + public function addDefaultMetricSemanticTypes(&$types): void + { + $types = array_merge($types, \Piwik\Plugins\SearchEngineKeywordsPerformance\Metrics::getMetricSemanticTypes()); + } + public function addMetricTranslations(&$translations) + { + $translations = array_merge($translations, \Piwik\Plugins\SearchEngineKeywordsPerformance\Metrics::getMetricsTranslations()); + } + public function addMetricDocumentationTranslations(&$translations) + { + $translations = array_merge($translations, \Piwik\Plugins\SearchEngineKeywordsPerformance\Metrics::getMetricsDocumentation()); + } + public function checkIsLowerMetricValueBetter(&$isLowerBetter, $metric) + { + if ($metric === \Piwik\Plugins\SearchEngineKeywordsPerformance\Metrics::POSITION) { + $isLowerBetter = \true; + } + } + public function getClientSideTranslationKeys(&$translationKeys) + { + $translationKeys[] = "SearchEngineKeywordsPerformance_LinksToUrl"; + $translationKeys[] = "SearchEngineKeywordsPerformance_SitemapsContainingUrl"; + $translationKeys[] = 'SearchEngineKeywordsPerformance_SearchEngineKeywordsPerformance'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConfigurationDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ProviderListDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ChangeConfiguration'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_SetupConfiguration'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_BingConfigurationTitle'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_BingConfigurationDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConfigureMeasurables'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConfigureMeasurableBelow'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConfigRemovalConfirm'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_DomainProperty'; + $translationKeys[] = 'General_Measurable'; + $translationKeys[] = 'Mobile_Account'; + $translationKeys[] = 'Goals_URL'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_LastImport'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_NoWebsiteConfigured'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AddConfiguration'; + $translationKeys[] = 'CoreHome_ChooseX'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_UrlOfAccount'; + $translationKeys[] = 'General_Save'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ManageAPIKeys'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AccountRemovalConfirm'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AccountAddedBy'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_BingAccountError'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AccountNoAccess'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AvailableSites'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_UnverifiedSites'; + $translationKeys[] = 'General_Remove'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AddAPIKey'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_BingAPIKeyInstruction'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_APIKey'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleConfigurationTitle'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleConfigurationDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_EnabledSearchTypes'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_KeywordTypeWeb'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_KeywordTypeImage'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_KeywordTypeVideo'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_KeywordTypeNews'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_DomainPropertyInfo'; + $translationKeys[] = 'General_Delete'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectGoogleAccounts'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_CurrentlyConnectedAccounts'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectFirstAccount'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_OAuthError'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_AccountConnectionValidationError'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ReAddAccountIfPermanentError'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectAccount'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectAccountDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_RequiredAccessTypes'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleAccountAccessTypeSearchConsoleData'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleAccountAccessTypeProfileInfo'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleAccountAccessTypeOfflineAccess'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_StartOAuth'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_OAuthClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ClientId'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ClientSecret'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_HowToGetOAuthClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_VisitOAuthHowTo'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_UploadOAuthClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GoogleUploadOrPasteClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConfigurationFile'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_Configuration'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_CreatedBy'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_YandexConfigurationTitle'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_YandexConfigurationDescription'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectYandexAccounts'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ReAuthenticateIfPermanentError'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_OAuthAccessTimedOut'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_OAuthAccessWillTimeOutSoon'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_OAuthAccessWillTimeOut'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_Reauthenticate'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ConnectAccountYandex'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_SetUpOAuthClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_ProvideYandexClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_URLPrefixProperty'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_URLPrefixPropertyInfo'; + $translationKeys[] = "SearchEngineKeywordsPerformance_OAuthExampleText"; + $translationKeys[] = "SearchEngineKeywordsPerformance_GoogleAuthorizedJavaScriptOrigin"; + $translationKeys[] = "SearchEngineKeywordsPerformance_GoogleAuthorizedRedirectUri"; + $translationKeys[] = "SearchEngineKeywordsPerformance_YandexFieldUrlToAppSite"; + $translationKeys[] = "SearchEngineKeywordsPerformance_YandexFieldCallbackUri"; + $translationKeys[] = "SearchEngineKeywordsPerformance_RecentApiErrorsWarning"; + $translationKeys[] = "SearchEngineKeywordsPerformance_ConfigureTheImporterLabel1"; + $translationKeys[] = "SearchEngineKeywordsPerformance_ConfigureTheImporterLabel2"; + $translationKeys[] = "SearchEngineKeywordsPerformance_ConfigureTheImporterLabel3"; + $translationKeys[] = "SearchEngineKeywordsPerformance_OauthFailedMessage"; + $translationKeys[] = "General_Upload"; + $translationKeys[] = 'SearchEngineKeywordsPerformance_Uploading'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_DeleteUploadedClientConfig'; + $translationKeys[] = 'SearchEngineKeywordsPerformance_GooglePendingConfigurationErrorMessage'; + if (Manager::getInstance()->isPluginActivated('ConnectAccounts')) { + $translationKeys[] = "ConnectAccounts_ConfigureGoogleAuthHelp1"; + $translationKeys[] = "ConnectAccounts_ConfigureGoogleAuthHelp2"; + $translationKeys[] = "ConnectAccounts_OptionQuickConnectWithGa"; + $translationKeys[] = "ConnectAccounts_OptionAdvancedConnectWithGa"; + $translationKeys[] = "ConnectAccounts_ConnectedWithBody"; + $translationKeys[] = "ConnectAccounts_ReAuthorizeBody"; + $translationKeys[] = "ConnectAccounts_ReAuthorizeBtnText"; + $translationKeys[] = "ConnectAccounts_ConnectedWithHeader"; + $translationKeys[] = "ConnectAccounts_ConnectedWithBody[beforeLink]"; + $translationKeys[] = "ConnectAccounts_ConnectedWithBody[linkText]"; + $translationKeys[] = "ConnectAccounts_GaImportBtn"; + } + } + /** + * Installation + */ + public function install() + { + GoogleModel::install(); + BingModel::install(); + YandexModel::install(); + } + public static function isGoogleForceEnabled($idSite) + { + return self::isSearchEngineForceEnabled('google', $idSite); + } + public static function isBingForceEnabled($idSite) + { + return self::isSearchEngineForceEnabled('bing', $idSite); + } + public static function isYandexForceEnabled($idSite) + { + return self::isSearchEngineForceEnabled('yandex', $idSite); + } + public static function isSearchEngineForceEnabled($searchEngine, $idSite) + { + if (!is_numeric($idSite) || $idSite <= 0) { + return \false; + } + $cache = Cache::getTransientCache(); + $cacheKey = 'SearchEngineKeywordsPerformance.isSearchEngineForceEnabled.' . $searchEngine . '.' . $idSite; + if ($cache->contains($cacheKey)) { + return $cache->fetch($cacheKey); + } + $result = \false; + /** + * @ignore + */ + Piwik::postEvent('SearchEngineKeywordsPerformance.isSearchEngineForceEnabled', [&$result, $searchEngine, $idSite]); + // force enable reports for rollups where child pages are configured + if (class_exists('\\Piwik\\Plugins\\RollUpReporting\\Type') && \Piwik\Plugins\RollUpReporting\Type::ID === Site::getTypeFor($idSite)) { + //Need to execute this as a superuser, since a user can have access to a rollup site but not all the child sites + Access::doAsSuperUser(function () use ($searchEngine, $idSite, &$result) { + $rollUpModel = new \Piwik\Plugins\RollUpReporting\Model(); + $childIdSites = $rollUpModel->getChildIdSites($idSite); + foreach ($childIdSites as $childIdSite) { + $measurableSettings = new \Piwik\Plugins\SearchEngineKeywordsPerformance\MeasurableSettings($childIdSite); + if ($searchEngine === 'google' && $measurableSettings->googleSearchConsoleUrl && $measurableSettings->googleSearchConsoleUrl->getValue()) { + $result = \true; + break; + } + if ($searchEngine === 'yandex' && $measurableSettings->yandexAccountAndHostId && $measurableSettings->yandexAccountAndHostId->getValue()) { + $result = \true; + break; + } + if ($searchEngine === 'bing' && $measurableSettings->bingSiteUrl && $measurableSettings->bingSiteUrl->getValue()) { + $result = \true; + break; + } + } + }); + } + $cache->save($cacheKey, $result); + return $result; + } + /** + * Take the list of providers and determine if any of them have had any recent API errors that need to be surfaced + * to the customer as a notification. If there are any, it generates the notification message and displays it. + * + * @param array $providers Collection of providers (like Google, Bing, ...) that extend the ProviderAbstract class. + * @return void + * @throws \Exception + */ + public static function displayNotificationIfRecentApiErrorsExist(array $providers): void + { + $recentErrorMessages = []; + foreach ($providers as $provider) { + $message = ''; + if ($provider->hasApiErrorWithinWeek()) { + $message = $provider->getRecentApiErrorMessage(); + } + if (!empty($message)) { + $recentErrorMessages[] = $message; + } + } + // Show notification if there have been errors + if (count($recentErrorMessages) > 0) { + $providerNameString = implode('
+ {% if not hasAdminPriviliges %}
+ Did you know?
+ An Admin or Super User can Configure Search Performance to import all your search keywords into Matomo.
+ {% else %}
+ Did you know?
+ You can Configure
+ Search Performance to import all your search keywords into Matomo.
+ {% endif %}
+
+ * For more information about this service, see the API + * Documentation + *
+ * + * @author Google, Inc. + */ +class Oauth2 extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service +{ + /** View your email address. */ + const USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email"; + /** See your personal info, including any personal info you've made publicly available. */ + const USERINFO_PROFILE = "https://www.googleapis.com/auth/userinfo.profile"; + /** Associate you with your personal info on Google. */ + const OPENID = "openid"; + public $userinfo; + public $userinfo_v2_me; + private $base_methods; + /** + * Constructs the internal representation of the Oauth2 service. + * + * @param Client|array $clientOrConfig The client used to deliver requests, or a + * config array to pass to a new Client instance. + * @param string $rootUrl The root URL used for requests to the service. + */ + public function __construct($clientOrConfig = [], $rootUrl = null) + { + parent::__construct($clientOrConfig); + $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/'; + $this->servicePath = ''; + $this->batchPath = 'batch/oauth2/v2'; + $this->version = 'v2'; + $this->serviceName = 'oauth2'; + $this->userinfo = new Oauth2\Resource\Userinfo($this, $this->serviceName, 'userinfo', ['methods' => ['get' => ['path' => 'oauth2/v2/userinfo', 'httpMethod' => 'GET', 'parameters' => []]]]); + $this->userinfo_v2_me = new Oauth2\Resource\UserinfoV2Me($this, $this->serviceName, 'me', ['methods' => ['get' => ['path' => 'userinfo/v2/me', 'httpMethod' => 'GET', 'parameters' => []]]]); + $this->base_methods = new Resource($this, $this->serviceName, '', ['methods' => ['tokeninfo' => ['path' => 'oauth2/v2/tokeninfo', 'httpMethod' => 'POST', 'parameters' => ['access_token' => ['location' => 'query', 'type' => 'string'], 'id_token' => ['location' => 'query', 'type' => 'string']]]]]); + } + /** + * (tokeninfo) + * + * @param array $optParams Optional parameters. + * + * @opt_param string access_token + * @opt_param string id_token + * @return Tokeninfo + */ + public function tokeninfo($optParams = []) + { + $params = []; + $params = array_merge($params, $optParams); + return $this->base_methods->call('tokeninfo', [$params], Tokeninfo::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Oauth2::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/Userinfo.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/Userinfo.php new file mode 100644 index 0000000..1c22318 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/Userinfo.php @@ -0,0 +1,45 @@ + + * $oauth2Service = new Google\Service\Oauth2(...); + * $userinfo = $oauth2Service->userinfo; + * + */ +class Userinfo extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * (userinfo.get) + * + * @param array $optParams Optional parameters. + * @return UserinfoModel + */ + public function get($optParams = []) + { + $params = []; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], UserinfoModel::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Userinfo::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2_Resource_Userinfo'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2.php new file mode 100644 index 0000000..7d62bf2 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2.php @@ -0,0 +1,32 @@ + + * $oauth2Service = new Google\Service\Oauth2(...); + * $v2 = $oauth2Service->v2; + * + */ +class UserinfoV2 extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserinfoV2::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2_Resource_UserinfoV2'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2Me.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2Me.php new file mode 100644 index 0000000..40cf84c --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Resource/UserinfoV2Me.php @@ -0,0 +1,45 @@ + + * $oauth2Service = new Google\Service\Oauth2(...); + * $me = $oauth2Service->me; + * + */ +class UserinfoV2Me extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * (me.get) + * + * @param array $optParams Optional parameters. + * @return Userinfo + */ + public function get($optParams = []) + { + $params = []; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], UserinfoModel::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserinfoV2Me::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2_Resource_UserinfoV2Me'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Tokeninfo.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Tokeninfo.php new file mode 100644 index 0000000..0e1383c --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Tokeninfo.php @@ -0,0 +1,88 @@ + "expires_in", "issuedTo" => "issued_to", "userId" => "user_id", "verifiedEmail" => "verified_email"]; + public $audience; + public $email; + public $expiresIn; + public $issuedTo; + public $scope; + public $userId; + public $verifiedEmail; + public function setAudience($audience) + { + $this->audience = $audience; + } + public function getAudience() + { + return $this->audience; + } + public function setEmail($email) + { + $this->email = $email; + } + public function getEmail() + { + return $this->email; + } + public function setExpiresIn($expiresIn) + { + $this->expiresIn = $expiresIn; + } + public function getExpiresIn() + { + return $this->expiresIn; + } + public function setIssuedTo($issuedTo) + { + $this->issuedTo = $issuedTo; + } + public function getIssuedTo() + { + return $this->issuedTo; + } + public function setScope($scope) + { + $this->scope = $scope; + } + public function getScope() + { + return $this->scope; + } + public function setUserId($userId) + { + $this->userId = $userId; + } + public function getUserId() + { + return $this->userId; + } + public function setVerifiedEmail($verifiedEmail) + { + $this->verifiedEmail = $verifiedEmail; + } + public function getVerifiedEmail() + { + return $this->verifiedEmail; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tokeninfo::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2_Tokeninfo'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Userinfo.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Userinfo.php new file mode 100644 index 0000000..49f82aa --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/Oauth2/Userinfo.php @@ -0,0 +1,124 @@ + "family_name", "givenName" => "given_name", "verifiedEmail" => "verified_email"]; + public $email; + public $familyName; + public $gender; + public $givenName; + public $hd; + public $id; + public $link; + public $locale; + public $name; + public $picture; + public $verifiedEmail; + public function setEmail($email) + { + $this->email = $email; + } + public function getEmail() + { + return $this->email; + } + public function setFamilyName($familyName) + { + $this->familyName = $familyName; + } + public function getFamilyName() + { + return $this->familyName; + } + public function setGender($gender) + { + $this->gender = $gender; + } + public function getGender() + { + return $this->gender; + } + public function setGivenName($givenName) + { + $this->givenName = $givenName; + } + public function getGivenName() + { + return $this->givenName; + } + public function setHd($hd) + { + $this->hd = $hd; + } + public function getHd() + { + return $this->hd; + } + public function setId($id) + { + $this->id = $id; + } + public function getId() + { + return $this->id; + } + public function setLink($link) + { + $this->link = $link; + } + public function getLink() + { + return $this->link; + } + public function setLocale($locale) + { + $this->locale = $locale; + } + public function getLocale() + { + return $this->locale; + } + public function setName($name) + { + $this->name = $name; + } + public function getName() + { + return $this->name; + } + public function setPicture($picture) + { + $this->picture = $picture; + } + public function getPicture() + { + return $this->picture; + } + public function setVerifiedEmail($verifiedEmail) + { + $this->verifiedEmail = $verifiedEmail; + } + public function getVerifiedEmail() + { + return $this->verifiedEmail; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Userinfo::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_Oauth2_Userinfo'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole.php new file mode 100644 index 0000000..076b9af --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole.php @@ -0,0 +1,67 @@ + + * The Search Console API provides access to both Search Console data (verified + * users only) and to public information on an URL basis (anyone) + * + *+ * For more information about this service, see the API + * Documentation + *
+ * + * @author Google, Inc. + */ +class SearchConsole extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service +{ + /** View and manage Search Console data for your verified sites. */ + const WEBMASTERS = "https://www.googleapis.com/auth/webmasters"; + /** View Search Console data for your verified sites. */ + const WEBMASTERS_READONLY = "https://www.googleapis.com/auth/webmasters.readonly"; + public $searchanalytics; + public $sitemaps; + public $sites; + public $urlTestingTools_mobileFriendlyTest; + /** + * Constructs the internal representation of the SearchConsole service. + * + * @param Client|array $clientOrConfig The client used to deliver requests, or a + * config array to pass to a new Client instance. + * @param string $rootUrl The root URL used for requests to the service. + */ + public function __construct($clientOrConfig = [], $rootUrl = null) + { + parent::__construct($clientOrConfig); + $this->rootUrl = $rootUrl ?: 'https://searchconsole.googleapis.com/'; + $this->servicePath = ''; + $this->batchPath = 'batch'; + $this->version = 'v1'; + $this->serviceName = 'searchconsole'; + $this->searchanalytics = new SearchConsole\Resource\Searchanalytics($this, $this->serviceName, 'searchanalytics', ['methods' => ['query' => ['path' => 'webmasters/v3/sites/{siteUrl}/searchAnalytics/query', 'httpMethod' => 'POST', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); + $this->sitemaps = new SearchConsole\Resource\Sitemaps($this, $this->serviceName, 'sitemaps', ['methods' => ['delete' => ['path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}', 'httpMethod' => 'DELETE', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'feedpath' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}', 'httpMethod' => 'GET', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'feedpath' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'webmasters/v3/sites/{siteUrl}/sitemaps', 'httpMethod' => 'GET', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sitemapIndex' => ['location' => 'query', 'type' => 'string']]], 'submit' => ['path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}', 'httpMethod' => 'PUT', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'feedpath' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); + $this->sites = new SearchConsole\Resource\Sites($this, $this->serviceName, 'sites', ['methods' => ['add' => ['path' => 'webmasters/v3/sites/{siteUrl}', 'httpMethod' => 'PUT', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'webmasters/v3/sites/{siteUrl}', 'httpMethod' => 'DELETE', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'webmasters/v3/sites/{siteUrl}', 'httpMethod' => 'GET', 'parameters' => ['siteUrl' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'webmasters/v3/sites', 'httpMethod' => 'GET', 'parameters' => []]]]); + $this->urlTestingTools_mobileFriendlyTest = new SearchConsole\Resource\UrlTestingToolsMobileFriendlyTest($this, $this->serviceName, 'mobileFriendlyTest', ['methods' => ['run' => ['path' => 'v1/urlTestingTools/mobileFriendlyTest:run', 'httpMethod' => 'POST', 'parameters' => []]]]); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchConsole::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDataRow.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDataRow.php new file mode 100644 index 0000000..fc941c9 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDataRow.php @@ -0,0 +1,70 @@ +clicks = $clicks; + } + public function getClicks() + { + return $this->clicks; + } + public function setCtr($ctr) + { + $this->ctr = $ctr; + } + public function getCtr() + { + return $this->ctr; + } + public function setImpressions($impressions) + { + $this->impressions = $impressions; + } + public function getImpressions() + { + return $this->impressions; + } + public function setKeys($keys) + { + $this->keys = $keys; + } + public function getKeys() + { + return $this->keys; + } + public function setPosition($position) + { + $this->position = $position; + } + public function getPosition() + { + return $this->position; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiDataRow::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_ApiDataRow'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilter.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilter.php new file mode 100644 index 0000000..f5c1305 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilter.php @@ -0,0 +1,51 @@ +dimension = $dimension; + } + public function getDimension() + { + return $this->dimension; + } + public function setExpression($expression) + { + $this->expression = $expression; + } + public function getExpression() + { + return $this->expression; + } + public function setOperator($operator) + { + $this->operator = $operator; + } + public function getOperator() + { + return $this->operator; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiDimensionFilter::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_ApiDimensionFilter'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilterGroup.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilterGroup.php new file mode 100644 index 0000000..42b8c14 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ApiDimensionFilterGroup.php @@ -0,0 +1,50 @@ +filters = $filters; + } + /** + * @return ApiDimensionFilter[] + */ + public function getFilters() + { + return $this->filters; + } + public function setGroupType($groupType) + { + $this->groupType = $groupType; + } + public function getGroupType() + { + return $this->groupType; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiDimensionFilterGroup::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_ApiDimensionFilterGroup'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/BlockedResource.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/BlockedResource.php new file mode 100644 index 0000000..b974ae0 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/BlockedResource.php @@ -0,0 +1,33 @@ +url = $url; + } + public function getUrl() + { + return $this->url; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BlockedResource::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_BlockedResource'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Image.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Image.php new file mode 100644 index 0000000..b8ec4e4 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Image.php @@ -0,0 +1,42 @@ +data = $data; + } + public function getData() + { + return $this->data; + } + public function setMimeType($mimeType) + { + $this->mimeType = $mimeType; + } + public function getMimeType() + { + return $this->mimeType; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Image::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Image'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/MobileFriendlyIssue.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/MobileFriendlyIssue.php new file mode 100644 index 0000000..e187f3c --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/MobileFriendlyIssue.php @@ -0,0 +1,33 @@ +rule = $rule; + } + public function getRule() + { + return $this->rule; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MobileFriendlyIssue::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_MobileFriendlyIssue'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Searchanalytics.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Searchanalytics.php new file mode 100644 index 0000000..8be08f1 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Searchanalytics.php @@ -0,0 +1,54 @@ + + * $searchconsoleService = new Google\Service\SearchConsole(...); + * $searchanalytics = $searchconsoleService->searchanalytics; + * + */ +class Searchanalytics extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * Query your data with filters and parameters that you define. Returns zero or + * more rows grouped by the row keys that you define. You must define a date + * range of one or more days. When date is one of the group by values, any days + * without data are omitted from the result list. If you need to know which days + * have data, issue a broad date range query grouped by date for any metric, and + * see which day rows are returned. (searchanalytics.query) + * + * @param string $siteUrl The site's URL, including protocol. For example: + * `http://www.example.com/`. + * @param SearchAnalyticsQueryRequest $postBody + * @param array $optParams Optional parameters. + * @return SearchAnalyticsQueryResponse + */ + public function query($siteUrl, SearchAnalyticsQueryRequest $postBody, $optParams = []) + { + $params = ['siteUrl' => $siteUrl, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('query', [$params], SearchAnalyticsQueryResponse::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Searchanalytics::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Resource_Searchanalytics'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sitemaps.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sitemaps.php new file mode 100644 index 0000000..5708dc8 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sitemaps.php @@ -0,0 +1,99 @@ + + * $searchconsoleService = new Google\Service\SearchConsole(...); + * $sitemaps = $searchconsoleService->sitemaps; + * + */ +class Sitemaps extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * Deletes a sitemap from this site. (sitemaps.delete) + * + * @param string $siteUrl The site's URL, including protocol. For example: + * `http://www.example.com/`. + * @param string $feedpath The URL of the actual sitemap. For example: + * `http://www.example.com/sitemap.xml`. + * @param array $optParams Optional parameters. + */ + public function delete($siteUrl, $feedpath, $optParams = []) + { + $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath]; + $params = array_merge($params, $optParams); + return $this->call('delete', [$params]); + } + /** + * Retrieves information about a specific sitemap. (sitemaps.get) + * + * @param string $siteUrl The site's URL, including protocol. For example: + * `http://www.example.com/`. + * @param string $feedpath The URL of the actual sitemap. For example: + * `http://www.example.com/sitemap.xml`. + * @param array $optParams Optional parameters. + * @return WmxSitemap + */ + public function get($siteUrl, $feedpath, $optParams = []) + { + $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath]; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], WmxSitemap::class); + } + /** + * Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this + * site, or included in the sitemap index file (if `sitemapIndex` is specified + * in the request). (sitemaps.listSitemaps) + * + * @param string $siteUrl The site's URL, including protocol. For example: + * `http://www.example.com/`. + * @param array $optParams Optional parameters. + * + * @opt_param string sitemapIndex A URL of a site's sitemap index. For example: + * `http://www.example.com/sitemapindex.xml`. + * @return SitemapsListResponse + */ + public function listSitemaps($siteUrl, $optParams = []) + { + $params = ['siteUrl' => $siteUrl]; + $params = array_merge($params, $optParams); + return $this->call('list', [$params], SitemapsListResponse::class); + } + /** + * Submits a sitemap for a site. (sitemaps.submit) + * + * @param string $siteUrl The site's URL, including protocol. For example: + * `http://www.example.com/`. + * @param string $feedpath The URL of the actual sitemap. For example: + * `http://www.example.com/sitemap.xml`. + * @param array $optParams Optional parameters. + */ + public function submit($siteUrl, $feedpath, $optParams = []) + { + $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath]; + $params = array_merge($params, $optParams); + return $this->call('submit', [$params]); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sitemaps::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Resource_Sitemaps'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sites.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sites.php new file mode 100644 index 0000000..24b5934 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/Sites.php @@ -0,0 +1,86 @@ + + * $searchconsoleService = new Google\Service\SearchConsole(...); + * $sites = $searchconsoleService->sites; + * + */ +class Sites extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * Adds a site to the set of the user's sites in Search Console. (sites.add) + * + * @param string $siteUrl The URL of the site to add. + * @param array $optParams Optional parameters. + */ + public function add($siteUrl, $optParams = []) + { + $params = ['siteUrl' => $siteUrl]; + $params = array_merge($params, $optParams); + return $this->call('add', [$params]); + } + /** + * Removes a site from the set of the user's Search Console sites. + * (sites.delete) + * + * @param string $siteUrl The URI of the property as defined in Search Console. + * **Examples:** `http://www.example.com/` or `sc-domain:example.com`. + * @param array $optParams Optional parameters. + */ + public function delete($siteUrl, $optParams = []) + { + $params = ['siteUrl' => $siteUrl]; + $params = array_merge($params, $optParams); + return $this->call('delete', [$params]); + } + /** + * Retrieves information about specific site. (sites.get) + * + * @param string $siteUrl The URI of the property as defined in Search Console. + * **Examples:** `http://www.example.com/` or `sc-domain:example.com`. + * @param array $optParams Optional parameters. + * @return WmxSite + */ + public function get($siteUrl, $optParams = []) + { + $params = ['siteUrl' => $siteUrl]; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], WmxSite::class); + } + /** + * Lists the user's Search Console sites. (sites.listSites) + * + * @param array $optParams Optional parameters. + * @return SitesListResponse + */ + public function listSites($optParams = []) + { + $params = []; + $params = array_merge($params, $optParams); + return $this->call('list', [$params], SitesListResponse::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sites::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Resource_Sites'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingTools.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingTools.php new file mode 100644 index 0000000..9e022ce --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingTools.php @@ -0,0 +1,32 @@ + + * $searchconsoleService = new Google\Service\SearchConsole(...); + * $urlTestingTools = $searchconsoleService->urlTestingTools; + * + */ +class UrlTestingTools extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UrlTestingTools::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Resource_UrlTestingTools'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingToolsMobileFriendlyTest.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingToolsMobileFriendlyTest.php new file mode 100644 index 0000000..0d43a14 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/Resource/UrlTestingToolsMobileFriendlyTest.php @@ -0,0 +1,47 @@ + + * $searchconsoleService = new Google\Service\SearchConsole(...); + * $mobileFriendlyTest = $searchconsoleService->mobileFriendlyTest; + * + */ +class UrlTestingToolsMobileFriendlyTest extends \Matomo\Dependencies\SearchEngineKeywordsPerformance\Google\Service\Resource +{ + /** + * Runs Mobile-Friendly Test for a given URL. (mobileFriendlyTest.run) + * + * @param RunMobileFriendlyTestRequest $postBody + * @param array $optParams Optional parameters. + * @return RunMobileFriendlyTestResponse + */ + public function run(RunMobileFriendlyTestRequest $postBody, $optParams = []) + { + $params = ['postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('run', [$params], RunMobileFriendlyTestResponse::class); + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UrlTestingToolsMobileFriendlyTest::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_Resource_UrlTestingToolsMobileFriendlyTest'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ResourceIssue.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ResourceIssue.php new file mode 100644 index 0000000..1484a00 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/ResourceIssue.php @@ -0,0 +1,40 @@ +blockedResource = $blockedResource; + } + /** + * @return BlockedResource + */ + public function getBlockedResource() + { + return $this->blockedResource; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceIssue::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_ResourceIssue'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestRequest.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestRequest.php new file mode 100644 index 0000000..bec92cc --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestRequest.php @@ -0,0 +1,42 @@ +requestScreenshot = $requestScreenshot; + } + public function getRequestScreenshot() + { + return $this->requestScreenshot; + } + public function setUrl($url) + { + $this->url = $url; + } + public function getUrl() + { + return $this->url; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RunMobileFriendlyTestRequest::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_RunMobileFriendlyTestRequest'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestResponse.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestResponse.php new file mode 100644 index 0000000..6f16f10 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/RunMobileFriendlyTestResponse.php @@ -0,0 +1,98 @@ +mobileFriendliness = $mobileFriendliness; + } + public function getMobileFriendliness() + { + return $this->mobileFriendliness; + } + /** + * @param MobileFriendlyIssue[] + */ + public function setMobileFriendlyIssues($mobileFriendlyIssues) + { + $this->mobileFriendlyIssues = $mobileFriendlyIssues; + } + /** + * @return MobileFriendlyIssue[] + */ + public function getMobileFriendlyIssues() + { + return $this->mobileFriendlyIssues; + } + /** + * @param ResourceIssue[] + */ + public function setResourceIssues($resourceIssues) + { + $this->resourceIssues = $resourceIssues; + } + /** + * @return ResourceIssue[] + */ + public function getResourceIssues() + { + return $this->resourceIssues; + } + /** + * @param Image + */ + public function setScreenshot(Image $screenshot) + { + $this->screenshot = $screenshot; + } + /** + * @return Image + */ + public function getScreenshot() + { + return $this->screenshot; + } + /** + * @param TestStatus + */ + public function setTestStatus(TestStatus $testStatus) + { + $this->testStatus = $testStatus; + } + /** + * @return TestStatus + */ + public function getTestStatus() + { + return $this->testStatus; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RunMobileFriendlyTestResponse::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_RunMobileFriendlyTestResponse'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryRequest.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryRequest.php new file mode 100644 index 0000000..ad7a15e --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryRequest.php @@ -0,0 +1,122 @@ +aggregationType = $aggregationType; + } + public function getAggregationType() + { + return $this->aggregationType; + } + public function setDataState($dataState) + { + $this->dataState = $dataState; + } + public function getDataState() + { + return $this->dataState; + } + /** + * @param ApiDimensionFilterGroup[] + */ + public function setDimensionFilterGroups($dimensionFilterGroups) + { + $this->dimensionFilterGroups = $dimensionFilterGroups; + } + /** + * @return ApiDimensionFilterGroup[] + */ + public function getDimensionFilterGroups() + { + return $this->dimensionFilterGroups; + } + public function setDimensions($dimensions) + { + $this->dimensions = $dimensions; + } + public function getDimensions() + { + return $this->dimensions; + } + public function setEndDate($endDate) + { + $this->endDate = $endDate; + } + public function getEndDate() + { + return $this->endDate; + } + public function setRowLimit($rowLimit) + { + $this->rowLimit = $rowLimit; + } + public function getRowLimit() + { + return $this->rowLimit; + } + public function setSearchType($searchType) + { + $this->searchType = $searchType; + } + public function getSearchType() + { + return $this->searchType; + } + public function setStartDate($startDate) + { + $this->startDate = $startDate; + } + public function getStartDate() + { + return $this->startDate; + } + public function setStartRow($startRow) + { + $this->startRow = $startRow; + } + public function getStartRow() + { + return $this->startRow; + } + public function setType($type) + { + $this->type = $type; + } + public function getType() + { + return $this->type; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchAnalyticsQueryRequest::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_SearchAnalyticsQueryRequest'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryResponse.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryResponse.php new file mode 100644 index 0000000..40f4dbd --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SearchAnalyticsQueryResponse.php @@ -0,0 +1,50 @@ +responseAggregationType = $responseAggregationType; + } + public function getResponseAggregationType() + { + return $this->responseAggregationType; + } + /** + * @param ApiDataRow[] + */ + public function setRows($rows) + { + $this->rows = $rows; + } + /** + * @return ApiDataRow[] + */ + public function getRows() + { + return $this->rows; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchAnalyticsQueryResponse::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_SearchAnalyticsQueryResponse'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitemapsListResponse.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitemapsListResponse.php new file mode 100644 index 0000000..3a8e4f8 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitemapsListResponse.php @@ -0,0 +1,41 @@ +sitemap = $sitemap; + } + /** + * @return WmxSitemap[] + */ + public function getSitemap() + { + return $this->sitemap; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SitemapsListResponse::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_SitemapsListResponse'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitesListResponse.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitesListResponse.php new file mode 100644 index 0000000..794bac0 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/SitesListResponse.php @@ -0,0 +1,41 @@ +siteEntry = $siteEntry; + } + /** + * @return WmxSite[] + */ + public function getSiteEntry() + { + return $this->siteEntry; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SitesListResponse::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_SitesListResponse'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/TestStatus.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/TestStatus.php new file mode 100644 index 0000000..f542027 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/TestStatus.php @@ -0,0 +1,42 @@ +details = $details; + } + public function getDetails() + { + return $this->details; + } + public function setStatus($status) + { + $this->status = $status; + } + public function getStatus() + { + return $this->status; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TestStatus::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_TestStatus'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSite.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSite.php new file mode 100644 index 0000000..40b9f4d --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSite.php @@ -0,0 +1,42 @@ +permissionLevel = $permissionLevel; + } + public function getPermissionLevel() + { + return $this->permissionLevel; + } + public function setSiteUrl($siteUrl) + { + $this->siteUrl = $siteUrl; + } + public function getSiteUrl() + { + return $this->siteUrl; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WmxSite::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_WmxSite'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemap.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemap.php new file mode 100644 index 0000000..babe038 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemap.php @@ -0,0 +1,113 @@ +contents = $contents; + } + /** + * @return WmxSitemapContent[] + */ + public function getContents() + { + return $this->contents; + } + public function setErrors($errors) + { + $this->errors = $errors; + } + public function getErrors() + { + return $this->errors; + } + public function setIsPending($isPending) + { + $this->isPending = $isPending; + } + public function getIsPending() + { + return $this->isPending; + } + public function setIsSitemapsIndex($isSitemapsIndex) + { + $this->isSitemapsIndex = $isSitemapsIndex; + } + public function getIsSitemapsIndex() + { + return $this->isSitemapsIndex; + } + public function setLastDownloaded($lastDownloaded) + { + $this->lastDownloaded = $lastDownloaded; + } + public function getLastDownloaded() + { + return $this->lastDownloaded; + } + public function setLastSubmitted($lastSubmitted) + { + $this->lastSubmitted = $lastSubmitted; + } + public function getLastSubmitted() + { + return $this->lastSubmitted; + } + public function setPath($path) + { + $this->path = $path; + } + public function getPath() + { + return $this->path; + } + public function setType($type) + { + $this->type = $type; + } + public function getType() + { + return $this->type; + } + public function setWarnings($warnings) + { + $this->warnings = $warnings; + } + public function getWarnings() + { + return $this->warnings; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WmxSitemap::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_WmxSitemap'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemapContent.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemapContent.php new file mode 100644 index 0000000..cb500e8 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/src/SearchConsole/WmxSitemapContent.php @@ -0,0 +1,51 @@ +indexed = $indexed; + } + public function getIndexed() + { + return $this->indexed; + } + public function setSubmitted($submitted) + { + $this->submitted = $submitted; + } + public function getSubmitted() + { + return $this->submitted; + } + public function setType($type) + { + $this->type = $type; + } + public function getType() + { + return $this->type; + } +} +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WmxSitemapContent::class, 'Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\Google_Service_SearchConsole_WmxSitemapContent'); diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.metadata b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.metadata new file mode 100644 index 0000000..ccae829 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.metadata @@ -0,0 +1,18 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/google-api-php-client-services.git", + "sha": "6056867755775c54a179bc49f29028c76b7ae0c2" + } + }, + { + "git": { + "name": "discovery-artifact-manager", + "remote": "https://github.com/googleapis/discovery-artifact-manager.git", + "sha": "4052db7ca555cbaf48bfaf93f32e575d7a3ff1d5" + } + } + ] +} \ No newline at end of file diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.py b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.py new file mode 100644 index 0000000..5dd63e2 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient-services/synth.py @@ -0,0 +1,119 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +from synthtool.__main__ import extra_args +from synthtool import log, shell +from synthtool.sources import git +import logging +from os import path, remove +from pathlib import Path +import glob +import json +import re +import sys +from packaging import version + +logging.basicConfig(level=logging.DEBUG) + +VERSION_REGEX = r"([^\.]*)\.(.+)\.json$" + +TEMPLATE_VERSIONS = [ + "default", +] +discovery_url = "https://github.com/googleapis/discovery-artifact-manager.git" + +repository = Path('.') + +log.debug(f"Cloning {discovery_url}.") +discovery = git.clone(discovery_url) + +log.debug("Cleaning output directory.") +shell.run("rm -rf .cache".split(), cwd=repository) + +log.debug("Installing dependencies.") +shell.run( + "python2 -m pip install -e generator/ --user".split(), + cwd=repository +) + +def generate_service(disco: str): + m = re.search(VERSION_REGEX, disco) + name = m.group(1) + version = m.group(2) + template = TEMPLATE_VERSIONS[-1] # Generate for latest version + + log.info(f"Generating {name} {version} ({template}).") + + output_dir = repository / ".cache" / name / version + input_file = discovery / "discoveries" / disco + + command = ( + f"python2 -m googleapis.codegen --output_dir={output_dir}" + + f" --input={input_file} --language=php --language_variant={template}" + + f" --package_path=api/services" + ) + + shell.run(f"mkdir -p {output_dir}".split(), cwd=repository / "generator") + shell.run(command.split(), cwd=repository, hide_output=False) + + s.copy(output_dir, f"src") + +def all_discoveries(skip=None, prefer=None): + """Returns a map of API IDs to Discovery document filenames. + + Args: + skip (list, optional): a list of API IDs to skip. + prefer (list, optional): a list of API IDs to include. + + Returns: + list(string): A list of Discovery document filenames. + """ + discos = {} + for file in sorted(glob.glob(str(discovery / 'discoveries/*.*.json'))): + api_id = None + with open(file) as api_file: + api_id = json.load(api_file)['id'] + # If an API has already been visited, skip it. + if api_id in discos: + continue + # Skip APIs explicitly listed in "skip" arg + if skip and api_id in skip: + continue + discos[api_id] = path.basename(file) + + # Skip APIs not preferred in index.json and not listed in "prefer" arg + index = {} + with open(str(discovery / 'discoveries/index.json')) as file: + index = json.load(file) + for api in index['items']: + api_id = api['id'] + if prefer and api_id in prefer: + continue + if api['preferred']: + continue + discos.pop(api_id, None) + + return discos.values() + +def generate_services(services): + for service in services: + generate_service(service) + +skip = ['discovery:v1', 'websecurityscanner:v1'] +prefer = ['admin:directory_v1', 'admin:datatransfer_v1'] +discoveries = all_discoveries(skip, prefer) +generate_services(discoveries) diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/LICENSE b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/LICENSE new file mode 100644 index 0000000..a148ba5 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/LICENSE @@ -0,0 +1,203 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, "submitted" +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions: + +(a) You must give any other recipients of the Work or +Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices +stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works +that You distribute, all copyright, patent, trademark, and +attribution notices from the Source form of the Work, +excluding those notices that do not pertain to any part of +the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained +within such NOTICE file, excluding those notices that do not +pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or +documentation, if provided along with the Derivative Works; or, +within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and +do not modify the License. You may add Your own attribution +notices within Derivative Works that You distribute, alongside +or as an addendum to the NOTICE text from the Work, provided +that such additional attribution notices cannot be construed +as modifying the License. + +You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Revoke.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Revoke.php new file mode 100644 index 0000000..9ac4da2 --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Revoke.php @@ -0,0 +1,65 @@ +http = $http; + } + /** + * Revoke an OAuth2 access token or refresh token. This method will revoke the current access + * token, if a token isn't provided. + * + * @param string|array $token The token (access token or a refresh token) that should be revoked. + * @return boolean Returns True if the revocation was successful, otherwise False. + */ + public function revokeToken($token) + { + if (is_array($token)) { + if (isset($token['refresh_token'])) { + $token = $token['refresh_token']; + } else { + $token = $token['access_token']; + } + } + $body = Psr7\Utils::streamFor(http_build_query(['token' => $token])); + $request = new Request('POST', Client::OAUTH2_REVOKE_URI, ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'], $body); + $httpHandler = HttpHandlerFactory::build($this->http); + $response = $httpHandler($request); + return $response->getStatusCode() == 200; + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Verify.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Verify.php new file mode 100644 index 0000000..7793e4d --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AccessToken/Verify.php @@ -0,0 +1,217 @@ +http = $http; + $this->cache = $cache; + $this->jwt = $jwt ?: $this->getJwtService(); + } + /** + * Verifies an id token and returns the authenticated apiLoginTicket. + * Throws an exception if the id token is not valid. + * The audience parameter can be used to control which id tokens are + * accepted. By default, the id token must have been issued to this OAuth2 client. + * + * @param string $idToken the ID token in JWT format + * @param string $audience Optional. The audience to verify against JWt "aud" + * @return array|false the token payload, if successful + */ + public function verifyIdToken($idToken, $audience = null) + { + if (empty($idToken)) { + throw new LogicException('id_token cannot be null'); + } + // set phpseclib constants if applicable + $this->setPhpsecConstants(); + // Check signature + $certs = $this->getFederatedSignOnCerts(); + foreach ($certs as $cert) { + try { + $args = [$idToken]; + $publicKey = $this->getPublicKey($cert); + if (class_exists(Key::class)) { + $args[] = new Key($publicKey, 'RS256'); + } else { + $args[] = $publicKey; + $args[] = ['RS256']; + } + $payload = \call_user_func_array([$this->jwt, 'decode'], $args); + if (property_exists($payload, 'aud')) { + if ($audience && $payload->aud != $audience) { + return \false; + } + } + // support HTTP and HTTPS issuers + // @see https://developers.google.com/identity/sign-in/web/backend-auth + $issuers = [self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS]; + if (!isset($payload->iss) || !in_array($payload->iss, $issuers)) { + return \false; + } + return (array) $payload; + } catch (ExpiredException $e) { + // @phpstan-ignore-line + return \false; + } catch (ExpiredExceptionV3 $e) { + return \false; + } catch (SignatureInvalidException $e) { + // continue + } catch (DomainException $e) { + // continue + } + } + return \false; + } + private function getCache() + { + return $this->cache; + } + /** + * Retrieve and cache a certificates file. + * + * @param string $url location + * @throws \Google\Exception + * @return array certificates + */ + private function retrieveCertsFromLocation($url) + { + // If we're retrieving a local file, just grab it. + if (0 !== strpos($url, 'http')) { + if (!($file = file_get_contents($url))) { + throw new GoogleException("Failed to retrieve verification certificates: '" . $url . "'."); + } + return json_decode($file, \true); + } + // @phpstan-ignore-next-line + $response = $this->http->get($url); + if ($response->getStatusCode() == 200) { + return json_decode((string) $response->getBody(), \true); + } + throw new GoogleException(sprintf('Failed to retrieve verification certificates: "%s".', $response->getBody()->getContents()), $response->getStatusCode()); + } + // Gets federated sign-on certificates to use for verifying identity tokens. + // Returns certs as array structure, where keys are key ids, and values + // are PEM encoded certificates. + private function getFederatedSignOnCerts() + { + $certs = null; + if ($cache = $this->getCache()) { + $cacheItem = $cache->getItem('federated_signon_certs_v3'); + $certs = $cacheItem->get(); + } + if (!$certs) { + $certs = $this->retrieveCertsFromLocation(self::FEDERATED_SIGNON_CERT_URL); + if ($cache) { + $cacheItem->expiresAt(new DateTime('+1 hour')); + $cacheItem->set($certs); + $cache->save($cacheItem); + } + } + if (!isset($certs['keys'])) { + throw new InvalidArgumentException('federated sign-on certs expects "keys" to be set'); + } + return $certs['keys']; + } + private function getJwtService() + { + $jwt = new JWT(); + if ($jwt::$leeway < 1) { + // Ensures JWT leeway is at least 1 + // @see https://github.com/google/google-api-php-client/issues/827 + $jwt::$leeway = 1; + } + return $jwt; + } + private function getPublicKey($cert) + { + $modulus = new BigInteger($this->jwt->urlsafeB64Decode($cert['n']), 256); + $exponent = new BigInteger($this->jwt->urlsafeB64Decode($cert['e']), 256); + $component = ['n' => $modulus, 'e' => $exponent]; + $loader = PublicKeyLoader::load($component); + return $loader->toString('PKCS8'); + } + /** + * phpseclib calls "phpinfo" by default, which requires special + * whitelisting in the AppEngine VM environment. This function + * sets constants to bypass the need for phpseclib to check phpinfo + * + * @see phpseclib/Math/BigInteger + * @see https://github.com/GoogleCloudPlatform/getting-started-php/issues/85 + */ + private function setPhpsecConstants() + { + if (filter_var(getenv('GAE_VM'), \FILTER_VALIDATE_BOOLEAN)) { + if (!defined('Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\MATH_BIGINTEGER_OPENSSL_ENABLED')) { + define('Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\MATH_BIGINTEGER_OPENSSL_ENABLED', \true); + } + if (!defined('Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\CRYPT_RSA_MODE')) { + define('Matomo\\Dependencies\\SearchEngineKeywordsPerformance\\CRYPT_RSA_MODE', AES::ENGINE_OPENSSL); + } + } + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php new file mode 100644 index 0000000..efd004f --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php @@ -0,0 +1,47 @@ +cache = $cache; + $this->cacheConfig = $cacheConfig; + } + public function attachCredentials(ClientInterface $http, CredentialsLoader $credentials, callable $tokenCallback = null) + { + // use the provided cache + if ($this->cache) { + $credentials = new FetchAuthTokenCache($credentials, $this->cacheConfig, $this->cache); + } + return $this->attachCredentialsCache($http, $credentials, $tokenCallback); + } + public function attachCredentialsCache(ClientInterface $http, FetchAuthTokenCache $credentials, callable $tokenCallback = null) + { + // if we end up needing to make an HTTP request to retrieve credentials, we + // can use our existing one, but we need to throw exceptions so the error + // bubbles up. + $authHttp = $this->createAuthHttp($http); + $authHttpHandler = HttpHandlerFactory::build($authHttp); + $middleware = new AuthTokenMiddleware($credentials, $authHttpHandler, $tokenCallback); + $config = $http->getConfig(); + $config['handler']->remove('google_auth'); + $config['handler']->push($middleware, 'google_auth'); + $config['auth'] = 'google_auth'; + $http = new Client($config); + return $http; + } + public function attachToken(ClientInterface $http, array $token, array $scopes) + { + $tokenFunc = function ($scopes) use($token) { + return $token['access_token']; + }; + $middleware = new ScopedAccessTokenMiddleware($tokenFunc, $scopes, $this->cacheConfig, $this->cache); + $config = $http->getConfig(); + $config['handler']->remove('google_auth'); + $config['handler']->push($middleware, 'google_auth'); + $config['auth'] = 'scoped'; + $http = new Client($config); + return $http; + } + public function attachKey(ClientInterface $http, $key) + { + $middleware = new SimpleMiddleware(['key' => $key]); + $config = $http->getConfig(); + $config['handler']->remove('google_auth'); + $config['handler']->push($middleware, 'google_auth'); + $config['auth'] = 'simple'; + $http = new Client($config); + return $http; + } + private function createAuthHttp(ClientInterface $http) + { + return new Client(['http_errors' => \true] + $http->getConfig()); + } +} diff --git a/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php new file mode 100644 index 0000000..967861a --- /dev/null +++ b/files/plugin-SearchEngineKeywordsPerformance-5.0.23/vendor/prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php @@ -0,0 +1,25 @@ +config = array_merge([ + 'application_name' => '', + // Don't change these unless you're working against a special development + // or testing environment. + 'base_path' => self::API_BASE_PATH, + // https://developers.google.com/console + 'client_id' => '', + 'client_secret' => '', + // Can be a path to JSON credentials or an array representing those + // credentials (@see Google\Client::setAuthConfig), or an instance of + // Google\Auth\CredentialsLoader. + 'credentials' => null, + // @see Google\Client::setScopes + 'scopes' => null, + // Sets X-Goog-User-Project, which specifies a user project to bill + // for access charges associated with the request + 'quota_project' => null, + 'redirect_uri' => null, + 'state' => null, + // Simple API access key, also from the API console. Ensure you get + // a Server key, and not a Browser key. + 'developer_key' => '', + // For use with Google Cloud Platform + // fetch the ApplicationDefaultCredentials, if applicable + // @see https://developers.google.com/identity/protocols/application-default-credentials + 'use_application_default_credentials' => \false, + 'signing_key' => null, + 'signing_algorithm' => null, + 'subject' => null, + // Other OAuth2 parameters. + 'hd' => '', + 'prompt' => '', + 'openid.realm' => '', + 'include_granted_scopes' => null, + 'login_hint' => '', + 'request_visible_actions' => '', + 'access_type' => 'online', + 'approval_prompt' => 'auto', + // Task Runner retry configuration + // @see Google\Task\Runner + 'retry' => [], + 'retry_map' => null, + // Cache class implementing Psr\Cache\CacheItemPoolInterface. + // Defaults to Google\Auth\Cache\MemoryCacheItemPool. + 'cache' => null, + // cache config for downstream auth caching + 'cache_config' => [], + // function to be called when an access token is fetched + // follows the signature function ($cacheKey, $accessToken) + 'token_callback' => null, + // Service class used in Google\Client::verifyIdToken. + // Explicitly pass this in to avoid setting JWT::$leeway + 'jwt' => null, + // Setting api_format_v2 will return more detailed error messages + // from certain APIs. + 'api_format_v2' => \false, + ], $config); + if (!is_null($this->config['credentials'])) { + if ($this->config['credentials'] instanceof CredentialsLoader) { + $this->credentials = $this->config['credentials']; + } else { + $this->setAuthConfig($this->config['credentials']); + } + unset($this->config['credentials']); + } + if (!is_null($this->config['scopes'])) { + $this->setScopes($this->config['scopes']); + unset($this->config['scopes']); + } + // Set a default token callback to update the in-memory access token + if (is_null($this->config['token_callback'])) { + $this->config['token_callback'] = function ($cacheKey, $newAccessToken) { + $this->setAccessToken([ + 'access_token' => $newAccessToken, + 'expires_in' => 3600, + // Google default + 'created' => time(), + ]); + }; + } + if (!is_null($this->config['cache'])) { + $this->setCache($this->config['cache']); + unset($this->config['cache']); + } + } + /** + * Get a string containing the version of the library. + * + * @return string + */ + public function getLibraryVersion() + { + return self::LIBVER; + } + /** + * For backwards compatibility + * alias for fetchAccessTokenWithAuthCode + * + * @param string $code string code from accounts.google.com + * @return array access token + * @deprecated + */ + public function authenticate($code) + { + return $this->fetchAccessTokenWithAuthCode($code); + } + /** + * Attempt to exchange a code for an valid authentication token. + * Helper wrapped around the OAuth 2.0 implementation. + * + * @param string $code code from accounts.google.com + * @param string $codeVerifier the code verifier used for PKCE (if applicable) + * @return array access token + */ + public function fetchAccessTokenWithAuthCode($code, $codeVerifier = null) + { + if (strlen($code) == 0) { + throw new InvalidArgumentException("Invalid code"); + } + $auth = $this->getOAuth2Service(); + $auth->setCode($code); + $auth->setRedirectUri($this->getRedirectUri()); + if ($codeVerifier) { + $auth->setCodeVerifier($codeVerifier); + } + $httpHandler = HttpHandlerFactory::build($this->getHttpClient()); + $creds = $auth->fetchAuthToken($httpHandler); + if ($creds && isset($creds['access_token'])) { + $creds['created'] = time(); + $this->setAccessToken($creds); + } + return $creds; + } + /** + * For backwards compatibility + * alias for fetchAccessTokenWithAssertion + * + * @return array access token + * @deprecated + */ + public function refreshTokenWithAssertion() + { + return $this->fetchAccessTokenWithAssertion(); + } + /** + * Fetches a fresh access token with a given assertion token. + * @param ClientInterface $authHttp optional. + * @return array access token + */ + public function fetchAccessTokenWithAssertion(ClientInterface $authHttp = null) + { + if (!$this->isUsingApplicationDefaultCredentials()) { + throw new DomainException('set the JSON service account credentials using' . ' Google\\Client::setAuthConfig or set the path to your JSON file' . ' with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable' . ' and call Google\\Client::useApplicationDefaultCredentials to' . ' refresh a token with assertion.'); + } + $this->getLogger()->log('info', 'OAuth2 access token refresh with Signed JWT assertion grants.'); + $credentials = $this->createApplicationDefaultCredentials(); + $httpHandler = HttpHandlerFactory::build($authHttp); + $creds = $credentials->fetchAuthToken($httpHandler); + if ($creds && isset($creds['access_token'])) { + $creds['created'] = time(); + $this->setAccessToken($creds); + } + return $creds; + } + /** + * For backwards compatibility + * alias for fetchAccessTokenWithRefreshToken + * + * @param string $refreshToken + * @return array access token + */ + public function refreshToken($refreshToken) + { + return $this->fetchAccessTokenWithRefreshToken($refreshToken); + } + /** + * Fetches a fresh OAuth 2.0 access token with the given refresh token. + * @param string $refreshToken + * @return array access token + */ + public function fetchAccessTokenWithRefreshToken($refreshToken = null) + { + if (null === $refreshToken) { + if (!isset($this->token['refresh_token'])) { + throw new LogicException('refresh token must be passed in or set as part of setAccessToken'); + } + $refreshToken = $this->token['refresh_token']; + } + $this->getLogger()->info('OAuth2 access token refresh'); + $auth = $this->getOAuth2Service(); + $auth->setRefreshToken($refreshToken); + $httpHandler = HttpHandlerFactory::build($this->getHttpClient()); + $creds = $auth->fetchAuthToken($httpHandler); + if ($creds && isset($creds['access_token'])) { + $creds['created'] = time(); + if (!isset($creds['refresh_token'])) { + $creds['refresh_token'] = $refreshToken; + } + $this->setAccessToken($creds); + } + return $creds; + } + /** + * Create a URL to obtain user authorization. + * The authorization endpoint allows the user to first + * authenticate, and then grant/deny the access request. + * @param string|array $scope The scope is expressed as an array or list of space-delimited strings. + * @param array $queryParams Querystring params to add to the authorization URL. + * @return string + */ + public function createAuthUrl($scope = null, array $queryParams = []) + { + if (empty($scope)) { + $scope = $this->prepareScopes(); + } + if (is_array($scope)) { + $scope = implode(' ', $scope); + } + // only accept one of prompt or approval_prompt + $approvalPrompt = $this->config['prompt'] ? null : $this->config['approval_prompt']; + // include_granted_scopes should be string "true", string "false", or null + $includeGrantedScopes = $this->config['include_granted_scopes'] === null ? null : var_export($this->config['include_granted_scopes'], \true); + $params = array_filter(['access_type' => $this->config['access_type'], 'approval_prompt' => $approvalPrompt, 'hd' => $this->config['hd'], 'include_granted_scopes' => $includeGrantedScopes, 'login_hint' => $this->config['login_hint'], 'openid.realm' => $this->config['openid.realm'], 'prompt' => $this->config['prompt'], 'redirect_uri' => $this->config['redirect_uri'], 'response_type' => 'code', 'scope' => $scope, 'state' => $this->config['state']]) + $queryParams; + // If the list of scopes contains plus.login, add request_visible_actions + // to auth URL. + $rva = $this->config['request_visible_actions']; + if (strlen($rva) > 0 && \false !== strpos($scope, 'plus.login')) { + $params['request_visible_actions'] = $rva; + } + $auth = $this->getOAuth2Service(); + return (string) $auth->buildFullAuthorizationUri($params); + } + /** + * Adds auth listeners to the HTTP client based on the credentials + * set in the Google API Client object + * + * @param ClientInterface $http the http client object. + * @return ClientInterface the http client object + */ + public function authorize(ClientInterface $http = null) + { + $http = $http ?: $this->getHttpClient(); + $authHandler = $this->getAuthHandler(); + // These conditionals represent the decision tree for authentication + // 1. Check if a Google\Auth\CredentialsLoader instance has been supplied via the "credentials" option + // 2. Check for Application Default Credentials + // 3a. Check for an Access Token + // 3b. If access token exists but is expired, try to refresh it + // 4. Check for API Key + if ($this->credentials) { + return $authHandler->attachCredentials($http, $this->credentials, $this->config['token_callback']); + } + if ($this->isUsingApplicationDefaultCredentials()) { + $credentials = $this->createApplicationDefaultCredentials(); + return $authHandler->attachCredentialsCache($http, $credentials, $this->config['token_callback']); + } + if ($token = $this->getAccessToken()) { + $scopes = $this->prepareScopes(); + // add refresh subscriber to request a new token + if (isset($token['refresh_token']) && $this->isAccessTokenExpired()) { + $credentials = $this->createUserRefreshCredentials($scopes, $token['refresh_token']); + return $authHandler->attachCredentials($http, $credentials, $this->config['token_callback']); + } + return $authHandler->attachToken($http, $token, (array) $scopes); + } + if ($key = $this->config['developer_key']) { + return $authHandler->attachKey($http, $key); + } + return $http; + } + /** + * Set the configuration to use application default credentials for + * authentication + * + * @see https://developers.google.com/identity/protocols/application-default-credentials + * @param boolean $useAppCreds + */ + public function useApplicationDefaultCredentials($useAppCreds = \true) + { + $this->config['use_application_default_credentials'] = $useAppCreds; + } + /** + * To prevent useApplicationDefaultCredentials from inappropriately being + * called in a conditional + * + * @see https://developers.google.com/identity/protocols/application-default-credentials + */ + public function isUsingApplicationDefaultCredentials() + { + return $this->config['use_application_default_credentials']; + } + /** + * Set the access token used for requests. + * + * Note that at the time requests are sent, tokens are cached. A token will be + * cached for each combination of service and authentication scopes. If a + * cache pool is not provided, creating a new instance of the client will + * allow modification of access tokens. If a persistent cache pool is + * provided, in order to change the access token, you must clear the cached + * token by calling `$client->getCache()->clear()`. (Use caution in this case, + * as calling `clear()` will remove all cache items, including any items not + * related to Google API PHP Client.) + * + * @param string|array $token + * @throws InvalidArgumentException + */ + public function setAccessToken($token) + { + if (is_string($token)) { + if ($json = json_decode($token, \true)) { + $token = $json; + } else { + // assume $token is just the token string + $token = ['access_token' => $token]; + } + } + if ($token == null) { + throw new InvalidArgumentException('invalid json token'); + } + if (!isset($token['access_token'])) { + throw new InvalidArgumentException("Invalid token format"); + } + $this->token = $token; + } + public function getAccessToken() + { + return $this->token; + } + /** + * @return string|null + */ + public function getRefreshToken() + { + if (isset($this->token['refresh_token'])) { + return $this->token['refresh_token']; + } + return null; + } + /** + * Returns if the access_token is expired. + * @return bool Returns True if the access_token is expired. + */ + public function isAccessTokenExpired() + { + if (!$this->token) { + return \true; + } + $created = 0; + if (isset($this->token['created'])) { + $created = $this->token['created']; + } elseif (isset($this->token['id_token'])) { + // check the ID token for "iat" + // signature verification is not required here, as we are just + // using this for convenience to save a round trip request + // to the Google API server + $idToken = $this->token['id_token']; + if (substr_count($idToken, '.') == 2) { + $parts = explode('.', $idToken); + $payload = json_decode(base64_decode($parts[1]), \true); + if ($payload && isset($payload['iat'])) { + $created = $payload['iat']; + } + } + } + if (!isset($this->token['expires_in'])) { + // if the token does not have an "expires_in", then it's considered expired + return \true; + } + // If the token is set to expire in the next 30 seconds. + return $created + ($this->token['expires_in'] - 30) < time(); + } + /** + * @deprecated See UPGRADING.md for more information + */ + public function getAuth() + { + throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information'); + } + /** + * @deprecated See UPGRADING.md for more information + */ + public function setAuth($auth) + { + throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information'); + } + /** + * Set the OAuth 2.0 Client ID. + * @param string $clientId + */ + public function setClientId($clientId) + { + $this->config['client_id'] = $clientId; + } + public function getClientId() + { + return $this->config['client_id']; + } + /** + * Set the OAuth 2.0 Client Secret. + * @param string $clientSecret + */ + public function setClientSecret($clientSecret) + { + $this->config['client_secret'] = $clientSecret; + } + public function getClientSecret() + { + return $this->config['client_secret']; + } + /** + * Set the OAuth 2.0 Redirect URI. + * @param string $redirectUri + */ + public function setRedirectUri($redirectUri) + { + $this->config['redirect_uri'] = $redirectUri; + } + public function getRedirectUri() + { + return $this->config['redirect_uri']; + } + /** + * Set OAuth 2.0 "state" parameter to achieve per-request customization. + * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2 + * @param string $state + */ + public function setState($state) + { + $this->config['state'] = $state; + } + /** + * @param string $accessType Possible values for access_type include: + * {@code "offline"} to request offline access from the user. + * {@code "online"} to request online access from the user. + */ + public function setAccessType($accessType) + { + $this->config['access_type'] = $accessType; + } + /** + * @param string $approvalPrompt Possible values for approval_prompt include: + * {@code "force"} to force the approval UI to appear. + * {@code "auto"} to request auto-approval when possible. (This is the default value) + */ + public function setApprovalPrompt($approvalPrompt) + { + $this->config['approval_prompt'] = $approvalPrompt; + } + /** + * Set the login hint, email address or sub id. + * @param string $loginHint + */ + public function setLoginHint($loginHint) + { + $this->config['login_hint'] = $loginHint; + } + /** + * Set the application name, this is included in the User-Agent HTTP header. + * @param string $applicationName + */ + public function setApplicationName($applicationName) + { + $this->config['application_name'] = $applicationName; + } + /** + * If 'plus.login' is included in the list of requested scopes, you can use + * this method to define types of app activities that your app will write. + * You can find a list of available types here: + * @link https://developers.google.com/+/api/moment-types + * + * @param array $requestVisibleActions Array of app activity types + */ + public function setRequestVisibleActions($requestVisibleActions) + { + if (is_array($requestVisibleActions)) { + $requestVisibleActions = implode(" ", $requestVisibleActions); + } + $this->config['request_visible_actions'] = $requestVisibleActions; + } + /** + * Set the developer key to use, these are obtained through the API Console. + * @see http://code.google.com/apis/console-help/#generatingdevkeys + * @param string $developerKey + */ + public function setDeveloperKey($developerKey) + { + $this->config['developer_key'] = $developerKey; + } + /** + * Set the hd (hosted domain) parameter streamlines the login process for + * Google Apps hosted accounts. By including the domain of the user, you + * restrict sign-in to accounts at that domain. + * @param string $hd the domain to use. + */ + public function setHostedDomain($hd) + { + $this->config['hd'] = $hd; + } + /** + * Set the prompt hint. Valid values are none, consent and select_account. + * If no value is specified and the user has not previously authorized + * access, then the user is shown a consent screen. + * @param string $prompt + * {@code "none"} Do not display any authentication or consent screens. Must not be specified with other values. + * {@code "consent"} Prompt the user for consent. + * {@code "select_account"} Prompt the user to select an account. + */ + public function setPrompt($prompt) + { + $this->config['prompt'] = $prompt; + } + /** + * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth + * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which + * an authentication request is valid. + * @param string $realm the URL-space to use. + */ + public function setOpenidRealm($realm) + { + $this->config['openid.realm'] = $realm; + } + /** + * If this is provided with the value true, and the authorization request is + * granted, the authorization will include any previous authorizations + * granted to this user/application combination for other scopes. + * @param bool $include the URL-space to use. + */ + public function setIncludeGrantedScopes($include) + { + $this->config['include_granted_scopes'] = $include; + } + /** + * sets function to be called when an access token is fetched + * @param callable $tokenCallback - function ($cacheKey, $accessToken) + */ + public function setTokenCallback(callable $tokenCallback) + { + $this->config['token_callback'] = $tokenCallback; + } + /** + * Revoke an OAuth2 access token or refresh token. This method will revoke the current access + * token, if a token isn't provided. + * + * @param string|array|null $token The token (access token or a refresh token) that should be revoked. + * @return boolean Returns True if the revocation was successful, otherwise False. + */ + public function revokeToken($token = null) + { + $tokenRevoker = new Revoke($this->getHttpClient()); + return $tokenRevoker->revokeToken($token ?: $this->getAccessToken()); + } + /** + * Verify an id_token. This method will verify the current id_token, if one + * isn't provided. + * + * @throws LogicException If no token was provided and no token was set using `setAccessToken`. + * @throws UnexpectedValueException If the token is not a valid JWT. + * @param string|null $idToken The token (id_token) that should be verified. + * @return array|false Returns the token payload as an array if the verification was + * successful, false otherwise. + */ + public function verifyIdToken($idToken = null) + { + $tokenVerifier = new Verify($this->getHttpClient(), $this->getCache(), $this->config['jwt']); + if (null === $idToken) { + $token = $this->getAccessToken(); + if (!isset($token['id_token'])) { + throw new LogicException('id_token must be passed in or set as part of setAccessToken'); + } + $idToken = $token['id_token']; + } + return $tokenVerifier->verifyIdToken($idToken, $this->getClientId()); + } + /** + * Set the scopes to be requested. Must be called before createAuthUrl(). + * Will remove any previously configured scopes. + * @param string|array $scope_or_scopes, ie: + * array( + * 'https://www.googleapis.com/auth/plus.login', + * 'https://www.googleapis.com/auth/moderator' + * ); + */ + public function setScopes($scope_or_scopes) + { + $this->requestedScopes = []; + $this->addScope($scope_or_scopes); + } + /** + * This functions adds a scope to be requested as part of the OAuth2.0 flow. + * Will append any scopes not previously requested to the scope parameter. + * A single string will be treated as a scope to request. An array of strings + * will each be appended. + * @param string|string[] $scope_or_scopes e.g. "profile" + */ + public function addScope($scope_or_scopes) + { + if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) { + $this->requestedScopes[] = $scope_or_scopes; + } elseif (is_array($scope_or_scopes)) { + foreach ($scope_or_scopes as $scope) { + $this->addScope($scope); + } + } + } + /** + * Returns the list of scopes requested by the client + * @return array the list of scopes + * + */ + public function getScopes() + { + return $this->requestedScopes; + } + /** + * @return string|null + * @visible For Testing + */ + public function prepareScopes() + { + if (empty($this->requestedScopes)) { + return null; + } + return implode(' ', $this->requestedScopes); + } + /** + * Helper method to execute deferred HTTP requests. + * + * @template T + * @param RequestInterface $request + * @param class-string