diff --git a/plugins/CoreConsole/Commands/GenerateController.php b/plugins/CoreConsole/Commands/GenerateController.php deleted file mode 100644 index fb82b2d4518125d77720b1d7c024f985a7f2c690..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateController.php +++ /dev/null @@ -1,54 +0,0 @@ -setName('generate:controller') - ->setDescription('Adds a Controller to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have a Controller yet'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('ExamplePlugin' => $pluginName); - $whitelistFiles = array('/Controller.php', '/templates', '/templates/index.twig'); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('Controller for %s generated.', $pluginName), - 'You can now start adding Controller actions', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNamesHavingNotSpecificFile('Controller.php'); - $invalidName = 'You have to enter the name of an existing plugin which does not already have a Controller'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateDimension.php b/plugins/CoreConsole/Commands/GenerateDimension.php deleted file mode 100644 index 72cff88261a18142927a8c5588ebee62d35debd0..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateDimension.php +++ /dev/null @@ -1,265 +0,0 @@ -setName('generate:dimension') - ->setDescription('Adds a new dimension to an existing plugin. This allows you to persist new values during tracking.') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have a menu defined yet') - ->addRequiredValueOption('type', null, 'Whether you want to create a "Visit", an "Action" or a "Conversion" dimension') - ->addRequiredValueOption('dimensionname', null, 'A human readable name of the dimension which will be for instance visible in the UI') - ->addRequiredValueOption('columnname', null, 'The name of the column in the MySQL database the dimension will be stored under') - ->addRequiredValueOption('columntype', null, 'The MySQL type for your dimension, for instance "VARCHAR(255) NOT NULL".'); - } - - /** - * @throws \InvalidArgumentException - */ - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $type = $this->getDimensionType(); - $dimensionName = $this->getDimensionName(); - - if ('non-tracking-dimension' === $type) { - $columnName = ''; - $columType = ''; - } else { - $columnName = $this->getColumnName($type); - $columType = $this->getColumnType(); - } - - $dimensionClassName = $this->getDimensionClassName($dimensionName); - $translatedDimensionName = $this->makeTranslationIfPossible($pluginName, ucfirst($dimensionName)); - - $exampleFolder = Manager::getPluginDirectory('ExampleTracker'); - $replace = array('example_action_dimension' => strtolower($columnName), - 'example_visit_dimension' => strtolower($columnName), - 'example_conversion_dimension' => strtolower($columnName), - 'INTEGER(11) DEFAULT 0 NULL' => strtoupper($columType), - 'VARCHAR(255) DEFAULT NULL' => strtoupper($columType), - 'ExampleDimension' => $dimensionClassName, - 'ExampleVisitDimension' => $dimensionClassName, - 'ExampleActionDimension' => $dimensionClassName, - 'ExampleConversionDimension' => $dimensionClassName, - 'ExampleTracker_DimensionName' => $translatedDimensionName, - 'ExampleTracker' => $pluginName, - ); - - $whitelistFiles = array('/Columns'); - - if ('visit' == $type) { - $whitelistFiles[] = '/Columns/ExampleVisitDimension.php'; - } elseif ('action' == $type) { - $whitelistFiles[] = '/Columns/ExampleActionDimension.php'; - } elseif ('conversion' == $type) { - $whitelistFiles[] = '/Columns/ExampleConversionDimension.php'; - } elseif ('non-tracking-dimension' == $type) { - $whitelistFiles[] = '/Columns/ExampleDimension.php'; - } else { - throw new \InvalidArgumentException('This dimension type is not available'); - } - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('Columns/%s.php for %s generated.', ucfirst($dimensionClassName), $pluginName), - 'You should now implement the events within this file', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - private function getDimensionClassName($dimensionName) - { - $dimensionName = trim($dimensionName); - $dimensionName = str_replace(' ', '', $dimensionName); - $dimensionName = preg_replace("/[^A-Za-z0-9]/", '', $dimensionName); - - $dimensionName = ucfirst($dimensionName); - - return $dimensionName; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getDimensionName() - { - $input = $this->getInput(); - - $validate = function ($dimensionName) { - if (empty($dimensionName)) { - throw new \InvalidArgumentException('Please enter the name of your dimension'); - } - - if (preg_match("/[^A-Za-z0-9 ]/", $dimensionName)) { - throw new \InvalidArgumentException('Only alpha numerical characters and whitespaces are allowed'); - } - - return $dimensionName; - }; - - $dimensionName = $input->getOption('dimensionname'); - - if (empty($dimensionName)) { - $dimensionName = $this->askAndValidate( - 'Enter a human readable name of your dimension, for instance "Browser": ', - $validate - ); - } else { - $validate($dimensionName); - } - - $dimensionName = ucfirst($dimensionName); - - return $dimensionName; - } - - /** - * @param string $type - * @return string - * @throws \RuntimeException - */ - protected function getColumnName($type) - { - $input = $this->getInput(); - - $validate = function ($columnName) use ($type) { - if (empty($columnName)) { - throw new \InvalidArgumentException('Please enter the name of the dimension column'); - } - - if (preg_match("/[^A-Za-z0-9_ ]/", $columnName)) { - throw new \InvalidArgumentException('Only alpha numerical characters, underscores and whitespaces are allowed'); - } - - if ('visit' == $type) { - $columns = array_keys(DbHelper::getTableColumns(Common::prefixTable('log_visit'))); - } elseif ('action' == $type) { - $columns = array_keys(DbHelper::getTableColumns(Common::prefixTable('log_link_visit_action'))); - } elseif ('conversion' == $type) { - $columns = array_keys(DbHelper::getTableColumns(Common::prefixTable('log_conversion'))); - } else { - $columns = array(); - } - - foreach ($columns as $column) { - if (strtolower($column) === strtolower($columnName)) { - throw new \InvalidArgumentException('This column name is already in use.'); - } - } - - return $columnName; - }; - - $columnName = $input->getOption('columnname'); - - if (empty($columnName)) { - $columnName = $this->askAndValidate( - 'Enter the name of the column under which it should be stored in the MySQL database, for instance "visit_total_time": ', - $validate - ); - } else { - $validate($columnName); - } - - return $columnName; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getColumnType() - { - $input = $this->getInput(); - - $validate = function ($columnType) { - if (empty($columnType)) { - throw new \InvalidArgumentException('Please enter the type of the dimension column'); - } - - return $columnType; - }; - - $columnType = $input->getOption('columntype'); - - if (empty($columnType)) { - $columnType = $this->askAndValidate( - 'Enter the type of the column under which it should be stored in the MySQL database, for instance "VARCHAR(255) NOT NULL": ', - $validate - ); - } else { - $validate($columnType); - } - - return $columnType; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getDimensionType() - { - $input = $this->getInput(); - $acceptedValues = array('visit', 'action', 'conversion', 'non-tracking-dimension'); - - $validate = function ($type) use ($acceptedValues) { - if (empty($type) || !in_array($type, $acceptedValues)) { - throw new \InvalidArgumentException('Please enter a valid dimension type (' . implode(', ', $acceptedValues) . '). Choose "non-tracking-dimension" if you only need a blank dimension having a name: '); - } - - return $type; - }; - - $type = $input->getOption('type'); - - if (empty($type)) { - $type = $this->askAndValidate( - 'Please choose the type of dimension you want to create (' . implode( - ', ', - $acceptedValues - ) . '). Choose "non-tracking-dimension" if you only need a blank dimension having a name: ', - $validate, - null, - $acceptedValues - ); - } else { - $validate($type); - } - - return $type; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter a name of an existing plugin.'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateMenu.php b/plugins/CoreConsole/Commands/GenerateMenu.php deleted file mode 100644 index 8effe738c8556055029968e4b06a1b997f60f2e2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateMenu.php +++ /dev/null @@ -1,54 +0,0 @@ -setName('generate:menu') - ->setDescription('Adds a plugin menu class to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have a menu defined yet'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('ExamplePlugin' => $pluginName); - $whitelistFiles = array('/Menu.php'); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('Menu.php for %s generated.', $pluginName), - 'You can now start defining your plugin menu', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNamesHavingNotSpecificFile('Menu.php'); - $invalidName = 'You have to enter the name of an existing plugin which does not already have a menu defined'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php deleted file mode 100644 index 4d5dde035cb80b03f6d503c95b8b244cf7a36543..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GeneratePlugin.php +++ /dev/null @@ -1,198 +0,0 @@ -setName('generate:plugin') - ->setAliases(array('generate:theme')) - ->setDescription('Generates a new plugin/theme including all needed files') - ->addRequiredValueOption('name', null, 'Plugin name ([a-Z0-9_-])') - ->addRequiredValueOption('description', null, 'Plugin description, max 150 characters') - ->addOptionalValueOption('pluginversion', null, 'Plugin version') - ->addNoValueOption('overwrite', null, 'Generate even if plugin directory already exists.'); - } - - protected function doExecute(): int - { - $isTheme = $this->isTheme(); - $pluginName = $this->getPluginName(); - $description = $this->getPluginDescription(); - $version = $this->getPluginVersion(); - - $this->generatePluginFolder($pluginName); - - $plugin = new ExamplePlugin(); - $info = $plugin->getInformation(); - $exampleDescription = $info['description']; - - if ($isTheme) { - $exampleFolder = Plugin\Manager::getPluginDirectory('ExampleTheme'); - $replace = array( - 'ExampleTheme' => $pluginName, - $exampleDescription => $description, - '0.1.0' => $version, - '3.0.0-b1' => Version::VERSION, - ); - $whitelistFiles = array(); - } else { - $exampleFolder = Plugin\Manager::getPluginDirectory('ExamplePlugin'); - $replace = array( - 'ExamplePlugin' => $pluginName, - $exampleDescription => $description, - '0.1.0' => $version, - '3.0.0-b1' => Version::VERSION, - ); - $whitelistFiles = array( - '/ExamplePlugin.php', - '/plugin.json', - '/README.md', - '/CHANGELOG.md', - '/screenshots', - '/screenshots/.gitkeep', - '/docs', - '/docs/faq.md', - '/docs/index.md', - '/config', - '/config/config.php', - '/config/tracker.php', - ); - } - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - if ($isTheme) { - $this->writeSuccessMessage(array( - sprintf('Theme %s %s generated.', $pluginName, $version), - 'If you have not done yet check out our Theming guide https://developer.matomo.org/guides/theming', - 'Enjoy!', - )); - } else { - $this->writeSuccessMessage(array( - sprintf('Plugin %s %s generated.', $pluginName, $version), - 'Our developer guides will help you developing this plugin, check out https://developer.matomo.org/guides', - 'To see a list of available generators execute ./console list generate', - 'Enjoy!', - )); - } - - return self::SUCCESS; - } - - /** - * @return bool - */ - private function isTheme() - { - $commandName = $this->getInput()->getFirstArgument(); - - return false !== strpos($commandName, 'theme'); - } - - protected function generatePluginFolder($pluginName) - { - $pluginPath = $this->getPluginPath($pluginName); - Filesystem::mkdir($pluginPath); - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $overwrite = $this->getInput()->getOption('overwrite'); - - $self = $this; - - $validate = function ($pluginName) use ($self, $overwrite) { - if (empty($pluginName)) { - throw new \RuntimeException('You have to enter a plugin name'); - } - - if (!Plugin\Manager::getInstance()->isValidPluginName($pluginName)) { - throw new \RuntimeException(sprintf('The plugin name %s is not valid. The name must be no longer than 60 characters and start with a letter and is only allowed to contain numbers and letters.', $pluginName)); - } - - $pluginPath = $self->getPluginPath($pluginName); - - if ( - file_exists($pluginPath) - && !$overwrite - ) { - throw new \RuntimeException('A plugin with this name already exists'); - } - - return $pluginName; - }; - - $pluginName = $this->getInput()->getOption('name'); - - if (empty($pluginName)) { - $pluginName = $this->askAndValidate('Enter a plugin name: ', $validate); - } else { - $validate($pluginName); - } - - $pluginName = ucfirst($pluginName); - - return $pluginName; - } - - /** - * @return mixed - * @throws \RuntimeException - */ - protected function getPluginDescription() - { - $validate = function ($description) { - if (empty($description)) { - throw new \RuntimeException('You have to enter a description'); - } - if (150 < strlen($description)) { - throw new \RuntimeException('Description is too long, max 150 characters allowed.'); - } - - return $description; - }; - - $description = $this->getInput()->getOption('description'); - - if (empty($description)) { - $description = $this->askAndValidate('Enter a plugin description: ', $validate); - } else { - $validate($description); - } - - return $description; - } - - /** - * @return string - */ - protected function getPluginVersion() - { - $version = $this->getInput()->getOption('pluginversion'); - - if (is_null($version)) { - $version = $this->ask('Enter a plugin version number (default to 0.1.0): ', '0.1.0'); - } - - return $version; - } -} diff --git a/plugins/CoreConsole/Commands/GeneratePluginBase.php b/plugins/CoreConsole/Commands/GeneratePluginBase.php deleted file mode 100644 index 681207e749d5c837e1301816c7b00452196df38a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GeneratePluginBase.php +++ /dev/null @@ -1,431 +0,0 @@ -throwErrorIfNotGitInstalled(); - } - - public function isEnabled() - { - return Development::isEnabled(); - } - - public function getPluginPath($pluginName) - { - return Manager::getPluginDirectory($pluginName); - } - - private function createFolderWithinPluginIfNotExists($pluginNameOrCore, $folder) - { - if ($pluginNameOrCore === 'core') { - $pluginPath = $this->getPathToCore(); - } else { - $pluginPath = $this->getPluginPath($pluginNameOrCore); - } - - if (!file_exists($pluginPath . $folder)) { - Filesystem::mkdir($pluginPath . $folder); - } - } - - protected function createFileWithinPluginIfNotExists($pluginNameOrCore, $fileName, $content) - { - if ($pluginNameOrCore === 'core') { - $pluginPath = $this->getPathToCore(); - } else { - $pluginPath = $this->getPluginPath($pluginNameOrCore); - } - - if (!file_exists($pluginPath . $fileName)) { - file_put_contents($pluginPath . $fileName, $content); - } - } - - /** - * Creates a lang/en.json within the plugin in case it does not exist yet and adds a translation for the given - * text. - * - * @param $pluginName - * @param $translatedText - * @param string $translationKey Optional, by default the key will be generated automatically - * @return string Either the generated translation key or the original text if a different translation for this - * generated translation key already exists. - */ - protected function makeTranslationIfPossible($pluginName, $translatedText, $translationKey = '') - { - $defaultLang = array($pluginName => array()); - - $this->createFolderWithinPluginIfNotExists($pluginName, '/lang'); - $this->createFileWithinPluginIfNotExists($pluginName, '/lang/en.json', $this->toJson($defaultLang)); - - $langJsonPath = $this->getPluginPath($pluginName) . '/lang/en.json'; - $translations = file_get_contents($langJsonPath); - $translations = json_decode($translations, true); - - if (empty($translations[$pluginName])) { - $translations[$pluginName] = array(); - } - - if (!empty($translationKey)) { - $key = $translationKey; - } else { - $key = $this->buildTranslationKey($translatedText); - } - - if (array_key_exists($key, $translations[$pluginName])) { - // we do not want to overwrite any existing translations - if ($translations[$pluginName][$key] === $translatedText) { - return $pluginName . '_' . $key; - } - - return $translatedText; - } - - $translations[$pluginName][$key] = $this->removeNonJsonCompatibleCharacters($translatedText); - - file_put_contents($langJsonPath, $this->toJson($translations)); - - return $pluginName . '_' . $key; - } - - protected function checkAndUpdateRequiredPiwikVersion($pluginName) - { - $output = $this->getOutput(); - $pluginJsonPath = $this->getPluginPath($pluginName) . '/plugin.json'; - $relativePluginJson = Manager::getPluginDirectory($pluginName) . '/plugin.json'; - - if (!file_exists($pluginJsonPath) || !is_writable($pluginJsonPath)) { - return; - } - - $pluginJson = file_get_contents($pluginJsonPath); - $pluginJson = json_decode($pluginJson, true); - - if (empty($pluginJson)) { - return; - } - - if (empty($pluginJson['require'])) { - $pluginJson['require'] = array(); - } - - $piwikVersion = Version::VERSION; - $nextMajorVersion = (int) substr($piwikVersion, 0, strpos($piwikVersion, '.')) + 1; - $secondPartPiwikVersionRequire = ',<' . $nextMajorVersion . '.0.0-b1'; - if (false === strpos($piwikVersion, '-')) { - // see https://github.com/composer/composer/issues/4080 we need to specify -stable otherwise it would match - // $piwikVersion-dev meaning it would also match all pre-released. However, we only want to match a stable - // release - $piwikVersion .= '-stable'; - } - - $newRequiredVersion = sprintf('>=%s,<%d.0.0-b1', $piwikVersion, $nextMajorVersion); - - if (!empty($pluginJson['require']['piwik'])) { - $pluginJson['require']['matomo'] = $pluginJson['require']['piwik']; - unset($pluginJson['require']['piwik']); - } - - if (!empty($pluginJson['require']['matomo'])) { - $requiredVersion = trim($pluginJson['require']['matomo']); - - if ($requiredVersion === $newRequiredVersion) { - // there is nothing to updated - return; - } - - // our generated versions look like ">=2.25.4,<3.0.0-b1". - // We only updated the Piwik version in the first part if the piwik version looks like that or if it has only - // one piwik version defined. In all other cases, eg user uses || etc we do not update it as user has customized - // the piwik version. - - foreach (['<>','!=', '<=','==', '^'] as $comparison) { - if (strpos($requiredVersion, $comparison) === 0) { - // user is using custom piwik version require, we do not overwrite anything. - return; - } - } - - if (strpos($requiredVersion, '||') !== false || strpos($requiredVersion, ' ') !== false) { - // user is using custom piwik version require, we do not overwrite anything. - return; - } - - $requiredPiwikVersions = explode(',', (string) $requiredVersion); - $numRequiredPiwikVersions = count($requiredPiwikVersions); - - if ($numRequiredPiwikVersions > 2) { - // user is using custom piwik version require, we do not overwrite anything. - return; - } - - if ( - $numRequiredPiwikVersions === 2 && - !Common::stringEndsWith($requiredVersion, $secondPartPiwikVersionRequire) - ) { - // user is using custom piwik version require, we do not overwrite anything - return; - } - - // if only one piwik version is defined we update it to make sure it does now specify an upper version limit - - $dependency = new Dependency(); - $missingVersion = $dependency->getMissingVersions($piwikVersion, $requiredVersion); - - if (!empty($missingVersion)) { - $msg = sprintf( - 'We cannot generate this component as the plugin "%s" requires the Piwik version "%s" in the ' . - 'file "%s". Generating this component requires "%s". If you know your plugin is compatible with your ' . - 'Piwik version remove the required Piwik version in "%s" and try to execute this command again.', - $pluginName, - $requiredVersion, - $relativePluginJson, - $newRequiredVersion, - $relativePluginJson - ); - - throw new \Exception($msg); - } - - $output->writeln(''); - $output->writeln(sprintf( - 'We have updated the required Piwik version from "%s" to "%s" in "%s".', - $requiredVersion, - $newRequiredVersion, - $relativePluginJson - )); - } else { - $output->writeln(''); - $output->writeln(sprintf( - 'We have updated your "%s" to require the Piwik version "%s".', - $relativePluginJson, - $newRequiredVersion - )); - } - - $pluginJson['require']['matomo'] = $newRequiredVersion; - file_put_contents($pluginJsonPath, $this->toJson($pluginJson)); - } - - private function toJson($value) - { - if (defined('JSON_PRETTY_PRINT')) { - return json_encode($value, JSON_PRETTY_PRINT); - } - - return json_encode($value); - } - - private function buildTranslationKey($translatedText) - { - $translatedText = preg_replace('/(\s+)/', '', $translatedText); - $translatedText = preg_replace("/[^A-Za-z0-9]/", '', $translatedText); - $translatedText = trim($translatedText); - - return $this->removeNonJsonCompatibleCharacters($translatedText); - } - - private function removeNonJsonCompatibleCharacters($text) - { - return preg_replace('/[^(\x00-\x7F)]*/', '', $text); - } - - /** - * Copies the given method and all needed use statements into an existing class. The target class name will be - * built based on the given $replace argument. - * @param string $sourceClassName - * @param string $methodName - * @param array $replace - */ - protected function copyTemplateMethodToExisitingClass($sourceClassName, $methodName, $replace) - { - $targetClassName = $this->replaceContent($replace, $sourceClassName); - - if (Development::methodExists($targetClassName, $methodName)) { - // we do not want to add the same method twice - return; - } - - Development::checkMethodExists($sourceClassName, $methodName, 'Cannot copy template method: '); - - $targetClass = new \ReflectionClass($targetClassName); - $file = new \SplFileObject($targetClass->getFileName()); - - $methodCode = Development::getMethodSourceCode($sourceClassName, $methodName); - $methodCode = $this->replaceContent($replace, $methodCode); - $methodLine = $targetClass->getEndLine() - 1; - - $sourceUses = Development::getUseStatements($sourceClassName); - $targetUses = Development::getUseStatements($targetClassName); - $usesToAdd = array_diff($sourceUses, $targetUses); - if (empty($usesToAdd)) { - $useCode = ''; - } else { - $useCode = "\nuse " . implode("\nuse ", $usesToAdd) . "\n"; - } - - // search for namespace line before the class starts - $useLine = 0; - foreach (new \LimitIterator($file, 0, $targetClass->getStartLine()) as $index => $line) { - if (0 === strpos(trim($line), 'namespace ')) { - $useLine = $index + 1; - break; - } - } - - $newClassCode = ''; - foreach (new \LimitIterator($file) as $index => $line) { - if ($index == $methodLine) { - $newClassCode .= $methodCode; - } - - if (0 !== $useLine && $index == $useLine) { - $newClassCode .= $useCode; - } - - $newClassCode .= $line; - } - - file_put_contents($targetClass->getFileName(), $newClassCode); - } - - /** - * @param string $templateFolder full path like /home/... - * @param string $pluginName - * @param array $replace array(key => value) $key will be replaced by $value in all templates - * @param array $whitelistFiles If not empty, only given files/directories will be copied. - * For instance array('/Controller.php', '/templates', '/templates/index.twig') - */ - protected function copyTemplateToPlugin($templateFolder, $pluginName, array $replace = [], $whitelistFiles = []) - { - $replace['PLUGINNAME'] = $pluginName; - - $files = array_merge( - Filesystem::globr($templateFolder, '*'), - // Also copy files starting with . such as .gitignore - Filesystem::globr($templateFolder, '.*') - ); - - foreach ($files as $file) { - $fileNamePlugin = str_replace($templateFolder, '', $file); - - if (!empty($whitelistFiles) && !in_array($fileNamePlugin, $whitelistFiles)) { - continue; - } - - if (is_dir($file)) { - $fileNamePlugin = $this->replaceContent($replace, $fileNamePlugin); - $this->createFolderWithinPluginIfNotExists($pluginName, $fileNamePlugin); - } else { - $template = file_get_contents($file); - $template = $this->replaceContent($replace, $template); - - $fileNamePlugin = $this->replaceContent($replace, $fileNamePlugin); - - $this->createFileWithinPluginIfNotExists($pluginName, $fileNamePlugin, $template); - } - } - } - - protected function getPluginNames() - { - $pluginNames = array(); - foreach (Manager::getPluginsDirectories() as $pluginsDir) { - $pluginDirs = \_glob($pluginsDir . '*', GLOB_ONLYDIR); - - foreach ($pluginDirs as $pluginDir) { - $pluginNames[] = basename($pluginDir); - } - } - - return $pluginNames; - } - - protected function getPluginNamesHavingNotSpecificFile($filename) - { - $pluginNames = array(); - foreach (Manager::getPluginsDirectories() as $pluginsDir) { - $pluginDirs = \_glob($pluginsDir . '*', GLOB_ONLYDIR); - - foreach ($pluginDirs as $pluginDir) { - if (!file_exists($pluginDir . '/' . $filename)) { - $pluginNames[] = basename($pluginDir); - } - } - } - return $pluginNames; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function askPluginNameAndValidate($pluginNames, $invalidArgumentException) - { - $input = $this->getInput(); - - $validate = function ($pluginName) use ($pluginNames, $invalidArgumentException) { - if (!in_array($pluginName, $pluginNames)) { - throw new \InvalidArgumentException($invalidArgumentException); - } - - return $pluginName; - }; - - $pluginName = $input->getOption('pluginname'); - - if (empty($pluginName)) { - $pluginName = $this->askAndValidate('Enter the name of your plugin: ', $validate, false, $pluginNames); - } else { - $validate($pluginName); - } - - return $pluginName; - } - - private function getPathToCore() - { - $path = PIWIK_INCLUDE_PATH . '/core'; - return $path; - } - - private function replaceContent($replace, $contentToReplace) - { - foreach ((array) $replace as $key => $value) { - $contentToReplace = str_replace($key, $value, $contentToReplace); - } - - return $contentToReplace; - } - - protected function throwErrorIfNotGitInstalled() - { - if (!SettingsPiwik::isGitDeployment()) { - $url = 'https://developer.matomo.org/guides/getting-started-part-1'; - throw new NotGitInstalledException( - "This development feature requires Matomo to be checked out from git. For more information please visit {$url}." - ); - } - } -} diff --git a/plugins/CoreConsole/Commands/GenerateReport.php b/plugins/CoreConsole/Commands/GenerateReport.php deleted file mode 100644 index dba0f9c258040cf3d2506ab4ac6495f0d6a9d62b..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateReport.php +++ /dev/null @@ -1,311 +0,0 @@ -setName('generate:report') - ->setDescription('Adds a new report to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have a menu defined yet') - ->addRequiredValueOption('reportname', null, 'The name of the report you want to create') - ->addRequiredValueOption('category', null, 'The name of the category the report belongs to') - ->addOptionalValueOption('dimension', null, 'The name of the dimension in case your report has a dimension') - ->addRequiredValueOption('documentation', null, 'A documentation that explains what your report is about'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $reportName = $this->getReportName(); - $category = $this->getCategory($pluginName); - $documentation = $this->getDocumentation(); - [$dimension, $dimensionClass] = $this->getDimension($pluginName); - - $order = $this->getOrder($category); - $apiName = $this->getApiName($reportName); - - $exampleFolder = Manager::getPluginDirectory('ExampleReport'); - $replace = array('GetExampleReport' => ucfirst($apiName), - 'getExampleReport' => lcfirst($apiName), - 'getApiReport' => lcfirst($apiName), - 'ExampleCategory' => $category, - 'ExampleReportName' => $this->makeTranslationIfPossible($pluginName, $reportName), - 'ExampleReportDocumentation' => $documentation, - '999' => $order, - 'new ExitPageUrl()' => $dimension, - 'use Piwik\Plugins\Actions\Columns\ExitPageUrl;' => $dimensionClass, - 'ExampleReport' => $pluginName, - ); - - $whitelistFiles = array('/Reports', '/Reports/Base.php', '/Reports/GetExampleReport.php'); - - if (file_exists($this->getPluginPath($pluginName) . '/API.php')) { - $this->copyTemplateMethodToExisitingClass('Piwik\Plugins\ExampleReport\API', 'getExampleReport', $replace); - } else { - $whitelistFiles[] = '/API.php'; - } - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('plugins/%s/Reports/%s.php for %s generated.', $pluginName, ucfirst($apiName), $pluginName), - 'You should now implement the method called "' . lcfirst($apiName) . '()" in API.php', - // 'Read more about this here: link to developer guide', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - private function getOrder($category) - { - $order = 1; - - $reports = new ReportsProvider(); - - foreach ($reports->getAllReports() as $report) { - if ($report->getCategoryId() === $category) { - if ($report->getOrder() > $order) { - $order = $report->getOrder() + 1; - } - } - } - - return $order; - } - - private function getApiName($reportName) - { - $reportName = trim($reportName); - $reportName = str_replace(' ', '', $reportName); - $reportName = preg_replace("/[^A-Za-z0-9]/", '', $reportName); - - $apiName = 'get' . ucfirst($reportName); - - return $apiName; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getReportName() - { - $input = $this->getInput(); - $validate = function ($reportName) { - if (empty($reportName)) { - throw new \InvalidArgumentException('Please enter the name of your report'); - } - - if (preg_match("/[^A-Za-z0-9 ]/", $reportName)) { - throw new \InvalidArgumentException('Only alpha numerical characters and whitespaces are allowed'); - } - - return $reportName; - }; - - $reportName = $input->getOption('reportname'); - - if (empty($reportName)) { - $reportName = $this->askAndValidate( - 'Enter the name of your report, for instance "Browser Families": ', - $validate - ); - } else { - $validate($reportName); - } - - $reportName = ucfirst($reportName); - - return $reportName; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getDocumentation() - { - $input = $this->getInput(); - $validate = function ($documentation) { - if (empty($documentation)) { - return ''; - } - - return $documentation; - }; - - $documentation = $input->getOption('documentation'); - - if (empty($documentation)) { - $documentation = $this->askAndValidate( - 'Enter a documentation that describes the data of your report (you can leave it empty and define it later): ', - $validate - ); - } else { - $validate($documentation); - } - - $documentation = ucfirst($documentation); - - return $documentation; - } - - /** - * @param string $pluginName - * @return string - * @throws \RuntimeException - */ - protected function getCategory($pluginName) - { - $input = $this->getInput(); - $path = $this->getPluginPath($pluginName) . '/Reports/Base.php'; - if (file_exists($path)) { - // category is already defined in base.php - return ''; - } - - $validate = function ($category) { - if (empty($category)) { - throw new \InvalidArgumentException('Please enter the name of the category your report belongs to'); - } - - return $category; - }; - - $category = $input->getOption('category'); - - $reports = new ReportsProvider(); - - $categories = array(); - foreach ($reports->getAllReports() as $report) { - if ($report->getCategoryId()) { - $categories[] = Piwik::translate($report->getCategoryId()); - } - } - $categories = array_values(array_unique($categories)); - - if (empty($category)) { - $category = $this->askAndValidate( - 'Enter the report category, for instance "Visitor" (you can reuse any existing category or define a new one): ', - $validate, - false, - $categories - ); - } else { - $validate($category); - } - - $translationKey = StaticContainer::get('Piwik\Translation\Translator')->findTranslationKeyForTranslation($category); - if (!empty($translationKey)) { - return $translationKey; - } - - $category = ucfirst($category); - - return $category; - } - - /** - * @param string $pluginName - * @return array - * @throws \RuntimeException - */ - protected function getDimension($pluginName) - { - $input = $this->getInput(); - $dimensions = array(); - $dimensionNames = array(); - - $reports = new ReportsProvider(); - - foreach ($reports->getAllReports() as $report) { - $dimension = $report->getDimension(); - if (is_object($dimension)) { - $name = $dimension->getName(); - if (!empty($name)) { - $dimensions[$name] = get_class($dimension); - $dimensionNames[] = $name; - } - } - } - - $plugin = Manager::getInstance()->loadPlugin($pluginName); - $dimensions = Dimension::getAllDimensions(); - $dimensions = array_merge($dimensions, Dimension::getDimensions($plugin)); - - foreach ($dimensions as $dimension) { - $name = $dimension->getName(); - if (!empty($name)) { - $dimensions[$name] = get_class($dimension); - $dimensionNames[] = $name; - } - } - - $dimensionNames = array_values(array_unique($dimensionNames)); - - $validate = function ($dimension) use ($dimensions) { - if (empty($dimension)) { - return ''; - } - - if (!empty($dimension) && !array_key_exists($dimension, $dimensions)) { - throw new \InvalidArgumentException('Leave dimension either empty or use an existing one. You can also create a new dimension by calling .console generate:dimension before generating this report.'); - } - - return $dimension; - }; - - $actualDimension = $input->getOption('dimension'); - - if (null === $actualDimension) { - $actualDimension = $this->askAndValidate( - 'Enter the report dimension, for instance "Browser" (you can leave it either empty or use an existing one): ', - $validate, - null, - $dimensionNames - ); - } else { - $validate($actualDimension); - } - - if (empty($actualDimension)) { - return array('null', ''); - } - - $className = $dimensions[$actualDimension]; - $parts = explode('\\', $className); - $name = end($parts); - - return array('new ' . $name . '()', 'use ' . $className . ';'); - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter a name of an existing plugin.'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateScheduledTask.php b/plugins/CoreConsole/Commands/GenerateScheduledTask.php deleted file mode 100644 index f7b119bca0dc99dcf8760af9b833c9fe6f2b8171..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateScheduledTask.php +++ /dev/null @@ -1,54 +0,0 @@ -setName('generate:scheduledtask') - ->setDescription('Adds a tasks class to an existing plugin which allows you to specify scheduled tasks') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have any tasks defined yet'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('ExamplePlugin' => $pluginName); - $whitelistFiles = array('/Tasks.php'); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('Tasks.php for %s generated.', $pluginName), - 'You can now start specifying your scheduled tasks', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNamesHavingNotSpecificFile('Tasks.php'); - $invalidName = 'You have to enter the name of an existing plugin which does not already have any tasks defined'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateSettings.php b/plugins/CoreConsole/Commands/GenerateSettings.php deleted file mode 100644 index 70ec1773eeb9f264aff602e8c0bd97292942a810..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateSettings.php +++ /dev/null @@ -1,93 +0,0 @@ -setName('generate:settings') - ->setDescription('Adds a SystemSetting, UserSetting or MeasurableSetting class to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have settings yet') - ->addRequiredValueOption('settingstype', null, 'The type of settings you want to create. Should be one of these values: ' . implode(', ', $this->getSettingTypes())); - } - - protected function doExecute(): int - { - $settingsType = $this->getSettingsType(); - $settingsFilename = $settingsType . '.php'; - - $pluginName = $this->getPluginName($settingsType, $settingsFilename); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $exampleFolder = Manager::getPluginDirectory('ExampleSettingsPlugin'); - $replace = array('ExampleSettingsPlugin' => $pluginName); - $whitelistFiles = array('/' . $settingsFilename); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('%s for %s generated.', $settingsFilename, $pluginName), - 'You can now start defining your ' . $settingsType, - 'Enjoy!', - )); - - return self::SUCCESS; - } - - private function getSettingTypes() - { - return array('system', 'user', 'measurable'); - } - - private function getSettingsType() - { - $input = $this->getInput(); - $availableTypes = $this->getSettingTypes(); - - $validate = function ($type) use ($availableTypes) { - if (empty($type) || !in_array($type, $availableTypes)) { - throw new \InvalidArgumentException('Please enter a valid settings type (' . implode(', ', $availableTypes) . '). '); - } - - return $type; - }; - - $settingsType = $input->getOption('settingstype'); - - if (empty($settingsType)) { - $settingsType = $this->askAndValidate( - 'Please choose the type of settings you want to create (' . implode(', ', $availableTypes) . '): ', - $validate, - null, - $availableTypes - ); - } else { - $validate($settingsType); - } - - return ucfirst($settingsType) . 'Settings'; - } - - /** - * @param string $settingsType - * @return string - * @throws \RuntimeException - */ - protected function getPluginName($settingsType, $settingsFile) - { - $pluginNames = $this->getPluginNamesHavingNotSpecificFile($settingsFile); - $invalidName = 'You have to enter the name of an existing plugin which does not already have ' . $settingsType; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateSystemCheck.php b/plugins/CoreConsole/Commands/GenerateSystemCheck.php deleted file mode 100644 index 964396668847d26fb53eeec2fb9b69a8b8546f28..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateSystemCheck.php +++ /dev/null @@ -1,103 +0,0 @@ -setName('generate:system-check') - ->setDescription('Adds a new system check to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have a menu defined yet') - ->addRequiredValueOption('checkname', null, 'The name of the system check you want to create'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $checkName = $this->getSystemCheckName(); - $className = ucfirst(str_replace(' ', '', $checkName)); - if (!Common::stringEndsWith($className, 'check') && !Common::stringEndsWith($className, 'Check')) { - $className .= 'Check'; - } - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('ExampleCheck' => $className, - 'Example Check' => $checkName, - 'ExamplePlugin' => $pluginName, - ); - - $whitelistFiles = array('/Diagnostic', '/Diagnostic/ExampleCheck.php'); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('plugins/%s/Diagnostic/%s.php for %s generated.', $pluginName, $className, $pluginName), - sprintf('You should now implement the method called execute in %s.php', $className), - 'You also need to make the diagnostic check known to Matomo in your "plugins/' . $pluginName . '/config/config.php".', - 'Read more about this here: https://developer.matomo.org/guides/system-check', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getSystemCheckName() - { - $input = $this->getInput(); - $validate = function ($checkName) { - if (empty($checkName)) { - throw new \InvalidArgumentException('Please enter the name of your system check'); - } - - if (preg_match("/[^A-Za-z0-9 ]/", $checkName)) { - throw new \InvalidArgumentException('Only alpha numerical characters and whitespaces are allowed'); - } - - return $checkName; - }; - - $checkName = $input->getOption('checkname'); - - if (empty($checkName)) { - $checkName = $this->askAndValidate( - 'Enter the name of your system check, for example "PDF PHP Extension Check": ', - $validate - ); - } else { - $validate($checkName); - } - - $checkName = ucfirst($checkName); - - return $checkName; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter a name of an existing plugin.'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateTest.php b/plugins/CoreConsole/Commands/GenerateTest.php deleted file mode 100644 index 2d4194228bc48b2b1ace1403c299fae817c009ef..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateTest.php +++ /dev/null @@ -1,190 +0,0 @@ -setName('generate:test') - ->setDescription('Adds a test to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin') - ->addRequiredValueOption('testname', null, 'The name of the test to create') - ->addRequiredValueOption('testtype', null, 'Whether you want to create a "unit", "integration", "system", or "ui" test'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $testType = $this->getTestType(); - $testName = $this->getTestName($testType); - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array( - 'ExamplePlugin' => $pluginName, - 'SimpleTest' => $testName, - 'SimpleSystemTest' => $testName, - 'SimpleUITest_spec.js' => $testName . '_spec.js', - 'SimpleUITest' => $testName, - ); - - $whitelistFiles = $this->getTestFilesWhitelist($testType); - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $messages = array( - sprintf('Test %s for plugin %s generated.', $testName, $pluginName), - ); - - if (strtolower($testType) === 'ui') { - $messages[] = 'To run this test execute the command: '; - $messages[] = '' . sprintf('./console tests:run-ui %s', $testName) . ''; - } else { - $messages[] = 'To run all your plugin tests, execute the command: '; - $messages[] = '' . sprintf('./console tests:run %s', $pluginName) . ''; - $messages[] = 'To run only this test: '; - $messages[] = '' . sprintf('./console tests:run %s', $testName) . ''; - } - - $messages[] = 'Enjoy!'; - - $this->writeSuccessMessage($messages); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - private function getTestName($testType) - { - $testname = $this->getInput()->getOption('testname'); - - $validate = function ($testname) { - if (empty($testname)) { - throw new \InvalidArgumentException('You have to enter a valid test name '); - } - - return $testname; - }; - - if (empty($testname)) { - $testname = $this->askAndValidate('Enter the name of the test: ', $validate); - } else { - $validate($testname); - } - - if (strtolower($testType) !== 'ui' && !Common::stringEndsWith(strtolower($testname), 'test')) { - $testname = $testname . 'Test'; - } - - $testname = ucfirst($testname); - - return $testname; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter the name of an existing plugin'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } - - public function getValidTypes() - { - return array('unit', 'integration', 'system', 'ui'); - } - - /** - * @return string Unit, Integration, System - */ - private function getTestType() - { - $testtype = $this->getInput()->getOption('testtype'); - - $self = $this; - - $validate = function ($testtype) use ($self) { - if (empty($testtype) || !in_array($testtype, $self->getValidTypes())) { - throw new \InvalidArgumentException('You have to enter a valid test type: ' . implode(" or ", $self->getValidTypes())); - } - return $testtype; - }; - - if (empty($testtype)) { - $testtype = $this->askAndValidate( - 'Enter the type of the test to generate (' . implode(", ", $this->getValidTypes()) . '): ', - $validate, - null, - $this->getValidTypes() - ); - } else { - $validate($testtype); - } - - $testtype = ucfirst($testtype); - return $testtype; - } - - /** - * @return array - */ - protected function getTestFilesWhitelist($testType) - { - if ('Ui' == $testType) { - return array( - '/tests', - '/tests/UI', - '/tests/UI/.gitignore', - '/tests/UI/expected-screenshots', - '/tests/UI/expected-screenshots/.gitkeep', - '/tests/UI/SimpleUITest_spec.js', - ); - } - - if ('System' == $testType) { - return array( - '/.gitignore', - '/tests', - '/tests/System', - '/tests/System/SimpleSystemTest.php', - '/tests/System/expected', - '/tests/System/expected/test___API.get_day.xml', - '/tests/System/expected/test___Goals.getItemsSku_day.xml', - '/tests/System/processed', - '/tests/System/processed/.gitignore', - '/tests/Fixtures', - '/tests/Fixtures/SimpleFixtureTrackFewVisits.php', - ); - } - - if ('Integration' == $testType) { - return array( - '/tests', - '/tests/Integration', - '/tests/Integration/SimpleTest.php', - ); - } - - return array( - '/tests', - '/tests/Unit', - '/tests/Unit/SimpleTest.php', - ); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateUpdate.php b/plugins/CoreConsole/Commands/GenerateUpdate.php deleted file mode 100644 index 2bbc03a132b0406fe580b57ff292480682d6a87e..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateUpdate.php +++ /dev/null @@ -1,120 +0,0 @@ -setName('generate:update') - ->setDescription('Adds a new update to an existing plugin or "core"') - ->addRequiredValueOption('component', null, 'The name of an existing plugin or "core"'); - } - - protected function doExecute(): int - { - $component = $this->getComponent(); - - $version = $this->getVersion($component); - $namespace = $this->getNamespace($component); - $className = $this->getUpdateClassName($component, $version); - - $exampleFolder = Plugin\Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('Piwik\Plugins\ExamplePlugin\Updates' => $namespace, - 'ExamplePlugin' => $component, - 'Updates_0_0_2' => $className, - '0.0.2' => $version); - $whitelistFiles = array('/Updates', '/Updates/0.0.2.php'); - - $this->copyTemplateToPlugin($exampleFolder, $component, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('Updates/%s.php for %s generated.', $version, $component), - 'You should have a look at the method update() or getSql() now.', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - private function getUpdateClassName($component, $version) - { - $updater = new Updater(); - $className = $updater->getUpdateClassName($component, $version); - $parts = explode('\\', $className); - - return end($parts); - } - - private function getVersion($component) - { - if ($component === 'core') { - return Version::VERSION; - } - - $pluginManager = Plugin\Manager::getInstance(); - - if ($pluginManager->isPluginLoaded($component)) { - $plugin = $pluginManager->getLoadedPlugin($component); - } else { - $plugin = new Plugin($component); - } - - return $plugin->getVersion(); - } - - private function getNamespace($component) - { - $updater = new Updater(); - $className = $updater->getUpdateClassName($component, 'xx'); - $className = str_replace('Updates_xx', '', $className); - $className = trim($className, '\\'); - - return $className; - } - - /** - * @return string - * @throws \RuntimeException - */ - private function getComponent() - { - $input = $this->getInput(); - $components = $this->getPluginNames(); - $components[] = 'core'; - - $validate = function ($component) use ($components) { - if (!in_array($component, $components)) { - throw new \InvalidArgumentException('You have to enter a name of an existing plugin or "core".'); - } - - return $component; - }; - - $component = $input->getOption('component'); - - if (empty($component)) { - $component = $this->askAndValidate( - 'Enter the name of your plugin or "core": ', - $validate, - null, - $components - ); - } else { - $validate($component); - } - - return $component; - } -} diff --git a/plugins/CoreConsole/Commands/GenerateVisualizationPlugin.php b/plugins/CoreConsole/Commands/GenerateVisualizationPlugin.php deleted file mode 100644 index 32b42cfe96b5462e3a3d32b321abf0fe3daedc11..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateVisualizationPlugin.php +++ /dev/null @@ -1,88 +0,0 @@ -setName('generate:visualizationplugin') - ->setDescription('Generates a new visualization plugin including all needed files') - ->addRequiredValueOption('name', null, 'Plugin name ([a-Z0-9_-])') - ->addRequiredValueOption('visualizationname', null, 'Visualization name ([a-Z0-9])') - ->addRequiredValueOption('description', null, 'Plugin description, max 150 characters') - ->addOptionalValueOption('pluginversion', null, 'Plugin version') - ->addNoValueOption('overwrite', null, 'Generate even if plugin directory already exists.') - ->addOptionalValueOption('full', null, 'If a value is set, an API and a Controller will be created as well. Option is only available for creating plugins, not for creating themes.'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - $description = $this->getPluginDescription(); - $version = $this->getPluginVersion(); - $visualizationName = $this->getVisualizationName(); - - $this->generatePluginFolder($pluginName); - - $exampleFolder = Manager::getPluginDirectory('ExampleVisualization'); - $replace = array( - 'SimpleTable' => $visualizationName, - 'simpleTable' => lcfirst($visualizationName), - 'Simple Table' => $this->makeTranslationIfPossible($pluginName, $visualizationName), - 'ExampleVisualization' => $pluginName, - 'ExampleVisualizationDescription' => $description, - ); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $allowListFiles = array()); - - $this->writeSuccessMessage(array( - sprintf('Visualization plugin %s %s generated.', $pluginName, $version), - 'Enjoy!', - )); - - return self::SUCCESS; - } - - /** - * @return string - * @throws \RuntimeException - */ - private function getVisualizationName() - { - $input = $this->getInput(); - $validate = function ($visualizationName) { - if (empty($visualizationName)) { - throw new \RuntimeException('You have to enter a visualization name'); - } - - if (!ctype_alnum($visualizationName)) { - throw new \RuntimeException(sprintf('The visualization name %s is not valid (only AlNum allowed)', $visualizationName)); - } - - return $visualizationName; - }; - - $visualizationName = $input->getOption('visualizationname'); - - if (empty($visualizationName)) { - $visualizationName = $this->askAndValidate('Enter a visualization name (only AlNum allowed): ', $validate); - } else { - $validate($visualizationName); - } - - $visualizationName = ucfirst($visualizationName); - - return $visualizationName; - } -} diff --git a/plugins/CoreConsole/Commands/GenerateVueConstructBase.php b/plugins/CoreConsole/Commands/GenerateVueConstructBase.php deleted file mode 100644 index 03a76f3b71a4b65bd4b77a65b40be9afa51377ab..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateVueConstructBase.php +++ /dev/null @@ -1,58 +0,0 @@ -getInput()->getOption($optionName); - - $validate = function ($testname) use ($constructType) { - if (empty($testname)) { - throw new \InvalidArgumentException("You have to enter a name for the $constructType"); - } - - if (!ctype_alnum($testname)) { - throw new \InvalidArgumentException("Only alphanumeric characters are allowed as a $constructType " - . "name. Use CamelCase if the name of your $constructType contains multiple words."); - } - - return $testname; - }; - - if (empty($testname)) { - $testname = $this->askAndValidate( - "Enter the name of the $constructType you want to create: ", - $validate - ); - } else { - $validate($testname); - } - - $testname = ucfirst($testname); - - return $testname; - } - - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter the name of an existing plugin'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GenerateWidget.php b/plugins/CoreConsole/Commands/GenerateWidget.php deleted file mode 100644 index 213134ffee752dea53a7ba4a5aa2c197c0899795..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GenerateWidget.php +++ /dev/null @@ -1,172 +0,0 @@ -setName('generate:widget') - ->setDescription('Adds a plugin widget class to an existing plugin') - ->addRequiredValueOption('pluginname', null, 'The name of an existing plugin which does not have any widgets defined yet') - ->addRequiredValueOption('widgetname', null, 'The name of the widget you want to create') - ->addRequiredValueOption('category', null, 'The name of the category the widget should belong to'); - } - - protected function doExecute(): int - { - $pluginName = $this->getPluginName(); - $this->checkAndUpdateRequiredPiwikVersion($pluginName); - - $widgetName = $this->getWidgetName(); - $category = $this->getCategory(); - - if ($category === Piwik::translate($category)) { - // no translation found... - $category = $this->makeTranslationIfPossible($pluginName, $category); - } - - $widgetMethod = $this->getWidgetMethodName($widgetName); - $widgetClass = ucfirst($widgetMethod); - - $exampleFolder = Manager::getPluginDirectory('ExamplePlugin'); - $replace = array('ExamplePlugin' => $pluginName, - 'MyExampleWidget' => $widgetClass, - 'Example Widget Name' => $this->makeTranslationIfPossible($pluginName, $widgetName), - 'About Matomo' => $category); - $whitelistFiles = array('/Widgets', '/Widgets/MyExampleWidget.php'); - - $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); - - $this->writeSuccessMessage(array( - sprintf('plugins/%s/Widgets/%s.php generated.', $pluginName, $widgetClass), - 'You can now start implementing the render() method.', - 'Enjoy!', - )); - - return self::SUCCESS; - } - - private function getWidgetMethodName($methodName) - { - $methodName = trim($methodName); - $methodName = str_replace(' ', '', $methodName); - $methodName = preg_replace("/[^A-Za-z0-9]/", '', $methodName); - - if (0 !== strpos(strtolower($methodName), 'get')) { - $methodName = 'get' . ucfirst($methodName); - } - - return lcfirst($methodName); - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getWidgetName() - { - $validate = function ($widgetName) { - if (empty($widgetName)) { - throw new \InvalidArgumentException('Please enter the name of your widget'); - } - - if (preg_match("/[^A-Za-z0-9 ]/", $widgetName)) { - throw new \InvalidArgumentException('Only alpha numerical characters and whitespaces are allowed'); - } - - return $widgetName; - }; - - $widgetName = $this->getInput()->getOption('widgetname'); - - if (empty($widgetName)) { - $widgetName = $this->askAndValidate( - 'Enter the name of your Widget, for instance "Browser Families": ', - $validate - ); - } else { - $validate($widgetName); - } - - $widgetName = ucfirst($widgetName); - - return $widgetName; - } - - protected function getExistingCategories() - { - $categories = array(); - foreach (WidgetsList::get()->getWidgetConfigs() as $widget) { - if ($widget->getCategoryId()) { - $categories[] = Piwik::translate($widget->getCategoryId()); - } - } - $categories = array_values(array_unique($categories)); - - return $categories; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getCategory() - { - $input = $this->getInput(); - $validate = function ($category) { - if (empty($category)) { - throw new \InvalidArgumentException('Please enter the name of the category your widget should belong to'); - } - - return $category; - }; - - $category = $input->getOption('category'); - $categories = $this->getExistingCategories(); - - if (empty($category)) { - $category = $this->askAndValidate( - 'Enter the widget category, for instance "Visitor" (you can reuse any existing category or define a new one): ', - $validate, - null, - $categories - ); - } else { - $validate($category); - } - - $translationKey = StaticContainer::get('Piwik\Translation\Translator')->findTranslationKeyForTranslation($category); - if (!empty($translationKey)) { - return $translationKey; - } - - $category = ucfirst($category); - - return $category; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function getPluginName() - { - $pluginNames = $this->getPluginNames(); - $invalidName = 'You have to enter a name of an existing plugin.'; - - return $this->askPluginNameAndValidate($pluginNames, $invalidName); - } -} diff --git a/plugins/CoreConsole/Commands/GetSegmentSql.php b/plugins/CoreConsole/Commands/GetSegmentSql.php deleted file mode 100644 index 2f7372de26182338fffb3ab0c812441559224879..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GetSegmentSql.php +++ /dev/null @@ -1,108 +0,0 @@ -setName('development:get-segment-sql'); - $this->setDescription('Print out the SQL used to query for a segment. Used for debugging or diagnosing segment issues. The site ID and dates are hardcoded in the query.'); - $this->addRequiredValueOption('segment', null, 'The segment, correctly encoded.'); - $this->addRequiredValueOption('idSites', null, 'Comma separated list of site IDs for the segment. (optional)'); - $this->addRequiredValueOption('queryType', null, 'The query type to generate: visit, action or conversion'); - } - - protected function doExecute(): int - { - $input = $this->getInput(); - $output = $this->getOutput(); - $idSites = $input->getOption('idSites') ?: ''; - $idSites = explode(',', $idSites); - $idSites = array_map('intval', $idSites); - $idSites = array_filter($idSites); - - $queryType = $input->getOption('queryType'); - - $segment = $input->getOption('segment'); - $segment = new Segment($segment, $idSites); - - $model = new Model(); - $allIdSites = $model->getSitesId(); - $idSiteInQuery = reset($allIdSites); - - $params = new Parameters(new Site($idSiteInQuery), Factory::build('day', 'today'), $segment); - - $logAggregator = new LogAggregator($params); - switch ($queryType) { - case 'visit': - $query = $logAggregator->generateQuery( - implode(LogAggregator::FIELDS_SEPARATOR, [ - Metrics::INDEX_NB_UNIQ_VISITORS => "count(distinct " . LogAggregator::LOG_VISIT_TABLE . ".idvisitor)", - Metrics::INDEX_NB_VISITS => "count(*)", - ]), - [LogAggregator::LOG_VISIT_TABLE], - $logAggregator->getWhereStatement(LogAggregator::LOG_VISIT_TABLE, LogAggregator::VISIT_DATETIME_FIELD), - '', - '' - ); - break; - case 'action': - $query = $logAggregator->generateQuery( - implode(LogAggregator::FIELDS_SEPARATOR, [ - Metrics::INDEX_NB_VISITS => "count(distinct " . LogAggregator::LOG_ACTIONS_TABLE . ".idvisit)", - Metrics::INDEX_NB_UNIQ_VISITORS => "count(distinct " . LogAggregator::LOG_ACTIONS_TABLE . ".idvisitor)", - Metrics::INDEX_NB_ACTIONS => "count(*)", - ]), - [LogAggregator::LOG_ACTIONS_TABLE], - $logAggregator->getWhereStatement(LogAggregator::LOG_ACTIONS_TABLE, LogAggregator::ACTION_DATETIME_FIELD), - '', - '' - ); - break; - case 'conversion': - $query = $logAggregator->generateQuery( - implode(LogAggregator::FIELDS_SEPARATOR, [ - Metrics::INDEX_GOAL_NB_CONVERSIONS => "count(*)", - Metrics::INDEX_GOAL_NB_VISITS_CONVERTED => "count(distinct " . LogAggregator::LOG_CONVERSION_TABLE . ".idvisit)", - ]), - [LogAggregator::LOG_CONVERSION_TABLE], - $logAggregator->getWhereStatement(LogAggregator::LOG_CONVERSION_TABLE, LogAggregator::CONVERSION_DATETIME_FIELD), - '', - '' - ); - break; - default: - throw new \InvalidArgumentException('Invalid value for --queryType, must be one of the following: visit, action, conversion'); - } - - $output->writeln("QUERY: " . $query['sql']); - foreach ($query['bind'] as $key => $value) { - $output->writeln(' BIND #' . $key . ': ' . $value); - } - - return self::SUCCESS; - } -} diff --git a/plugins/CoreConsole/Commands/GitCommit.php b/plugins/CoreConsole/Commands/GitCommit.php deleted file mode 100644 index dcac773f3477bb4f3a448a8818ade0448639e6d8..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GitCommit.php +++ /dev/null @@ -1,146 +0,0 @@ -setName('git:commit') - ->setDescription('Commit') - ->addRequiredValueOption('message', 'm', 'Commit Message'); - } - - protected function doExecute(): int - { - $input = $this->getInput(); - $output = $this->getOutput(); - $submodules = $this->getSubmodulePaths(); - - foreach ($submodules as $submodule) { - if (empty($submodule)) { - continue; - } - - $status = $this->getStatusOfSubmodule($submodule); - if (false !== strpos($status, '?? ')) { - $output->writeln(sprintf('%s has untracked files or folders. Delete or add them and try again.', $submodule)); - $output->writeln('Status:'); - $output->writeln(sprintf('%s', $status)); - return self::FAILURE; - } - } - - $commitMessage = $input->getOption('message'); - - if (empty($commitMessage)) { - $output->writeln('No message specified. Use option -m or --message.'); - return self::FAILURE; - } - - if (!$this->hasChangesToBeCommitted()) { - $question = 'There are no changes to be committed in the super repo, do you just want to commit and converge submodules?'; - if (!$this->askForConfirmation($question, false)) { - $output->writeln('Cool, nothing done. Stage files using "git add" and try again.'); - return self::SUCCESS; - } - } - - foreach ($submodules as $submodule) { - if (empty($submodule)) { - continue; - } - - $status = $this->getStatusOfSubmodule($submodule); - if (empty($status)) { - $output->writeln(sprintf('%s has no changes, will ignore', $submodule)); - continue; - } - - $cmd = sprintf('cd %s/%s && git pull && git add . && git commit -am "%s"', PIWIK_DOCUMENT_ROOT, $submodule, $commitMessage); - $this->passthru($cmd); - } - - if ($this->hasChangesToBeCommitted()) { - $cmd = sprintf('cd %s && git commit -m "%s"', PIWIK_DOCUMENT_ROOT, $commitMessage); - $this->passthru($cmd); - } - - foreach ($submodules as $submodule) { - if (empty($submodule)) { - continue; - } - - $cmd = sprintf('cd %s && git add %s', PIWIK_DOCUMENT_ROOT, $submodule); - $this->passthru($cmd); - } - - if ($this->hasChangesToBeCommitted()) { - $cmd = sprintf('cd %s && git commit -m "Updating submodules"', PIWIK_DOCUMENT_ROOT); - $this->passthru($cmd); - } - - return self::SUCCESS; - } - - private function passthru($cmd) - { - $this->getOutput()->writeln('Executing command: ' . $cmd); - passthru($cmd); - } - - private function hasChangesToBeCommitted() - { - $cmd = sprintf('cd %s && git status --porcelain', PIWIK_DOCUMENT_ROOT); - $result = shell_exec($cmd); - $result = trim($result); - - if (false !== strpos($result, 'M ')) { - // stages - return true; - } - - if (false !== strpos($result, 'MM ')) { - // staged and modified - return true; - } - - return false; - } - - /** - * @return array - */ - private function getSubmodulePaths() - { - $cmd = sprintf("grep path .gitmodules | sed 's/.*= //'"); - $submodules = shell_exec($cmd); - $submodules = explode("\n", $submodules); - - return $submodules; - } - - protected function getStatusOfSubmodule($submodule) - { - $cmd = sprintf('cd %s/%s && git status --porcelain', PIWIK_DOCUMENT_ROOT, $submodule); - $status = trim(shell_exec($cmd) ?? ''); - - return $status; - } -} diff --git a/plugins/CoreConsole/Commands/GitPull.php b/plugins/CoreConsole/Commands/GitPull.php deleted file mode 100644 index c1167c68731326a8ac60abf057571d37fd1f355e..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GitPull.php +++ /dev/null @@ -1,57 +0,0 @@ -setName('git:pull'); - $this->setDescription('Pull Piwik repo and all submodules'); - } - - protected function getBranchName() - { - $cmd = sprintf('cd %s && git rev-parse --abbrev-ref HEAD', PIWIK_DOCUMENT_ROOT); - $branch = shell_exec($cmd); - - return trim($branch); - } - - protected function doExecute(): int - { - if ('master' != $this->getBranchName()) { - $this->getOutput()->writeln('Doing nothing because you are not on the master branch in super repo.'); - return self::SUCCESS; - } - - $cmd = sprintf('cd %s && git checkout master && git pull && git submodule update --init --recursive --remote', PIWIK_DOCUMENT_ROOT); - $this->passthru($cmd); - - $cmd = 'git submodule foreach "(git checkout master; git pull)&"'; - $this->passthru($cmd); - - return self::SUCCESS; - } - - private function passthru($cmd) - { - $this->getOutput()->writeln('Executing command: ' . $cmd); - passthru($cmd); - } -} diff --git a/plugins/CoreConsole/Commands/GitPush.php b/plugins/CoreConsole/Commands/GitPush.php deleted file mode 100644 index b71f012bc07ca34ebba7eb02ac7d4106b7ce65ef..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/GitPush.php +++ /dev/null @@ -1,37 +0,0 @@ -setName('git:push'); - $this->setDescription('Push Piwik repo and all submodules'); - } - - protected function doExecute(): int - { - $cmd = sprintf('cd %s && git push --recurse-submodules=on-demand', PIWIK_DOCUMENT_ROOT); - $this->getOutput()->writeln('Executing command: ' . $cmd); - passthru($cmd); - - return self::SUCCESS; - } -} diff --git a/plugins/CoreConsole/Commands/TestEmail.php b/plugins/CoreConsole/Commands/TestEmail.php deleted file mode 100644 index 43d08a46b1e6c72ff6472cf85be1c92210bfdd70..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/TestEmail.php +++ /dev/null @@ -1,46 +0,0 @@ -setName('core:test-email'); - $this->setDescription('Send a test email'); - $this->addRequiredArgument('emailAddress', 'The destination email address'); - } - - protected function doExecute(): int - { - $config = Config::getInstance(); - - $email = $this->getInput()->getArgument('emailAddress'); - $matomoUrl = SettingsPiwik::getPiwikUrl(); - $body = "Hello, world!
This is a test email sent from $matomoUrl"; - $subject = "This is a test email sent from $matomoUrl"; - - $mail = new Mail(); - $mail->setSmtpDebug(true); - $mail->addTo($email, 'Matomo User'); - $mail->setFrom($config->General['noreply_email_address'], $config->General['noreply_email_name']); - $mail->setSubject($subject); - $mail->setWrappedHtmlBody($body); - $mail->send(); - $this->getOutput()->writeln('Message sent to ' . $email); - - return self::SUCCESS; - } -} diff --git a/plugins/CoreConsole/Commands/WatchLog.php b/plugins/CoreConsole/Commands/WatchLog.php deleted file mode 100644 index 72ad20b6be7a903cf9c5a8c7549d06d615e850c1..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/Commands/WatchLog.php +++ /dev/null @@ -1,33 +0,0 @@ -setName('log:watch'); - $this->setDescription('Outputs the last parts of the log files and follows as the log file grows. Does not work on Windows'); - } - - protected function doExecute(): int - { - $path = StaticContainer::get('path.tmp') . '/logs/'; - $cmd = sprintf('tail -f %s*.log', $path); - - $this->getOutput()->writeln('Executing command: ' . $cmd); - passthru($cmd); - - return self::SUCCESS; - } -} diff --git a/plugins/CoreConsole/CoreConsole.php b/plugins/CoreConsole/CoreConsole.php deleted file mode 100644 index 7d22ee01fb4f29d2c08beede26bde6cc38938bca..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/CoreConsole.php +++ /dev/null @@ -1,14 +0,0 @@ -idSite, '2012-08-09 16:00:00'); - if ($ip) { - $t->setIp($ip); - } - $t->setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'); - $t->setUrl('http://pastwebsite.com/here/we/go'); - Fixture::checkResponse($t->doTrackPageView('a page title')); - - // update ts_archived for archives in 2012_08 so they will be invalidated and rearchived - $sql = "UPDATE " . ArchiveTableCreator::getNumericTable(Date::factory('2012-08-01'), true) . " SET ts_archived = ?"; - Db::query($sql, [Date::now()->subHour(2)->getDatetime()]); - } - - private static function addNewSegmentToPast() - { - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - self::$fixture->getTestEnvironment()->save(); - - Rules::setBrowserTriggerArchiving(false); - - // add one segment and set it's created/updated time to some time in the past so we don't re-archive for it - $idSegment = API::getInstance()->add(self::NEW_SEGMENT_NAME, self::NEW_SEGMENT, self::$fixture->idSite, $autoArchive = 1, $enabledAllUsers = 1); - - // add another segment w/ special encoded value (but do it through the API which will use a definition query param which is not - // encoded the same as Request::getRawSegmentFromRequest() - $url = Fixture::getTestRootUrl() . '?' . http_build_query([ - 'module' => 'API', - 'method' => 'SegmentEditor.add', - 'name' => self::ENCODED_SEGMENT_NAME, - 'definition' => self::ENCODED_SEGMENT, - 'idSite' => self::$fixture->idSite, - 'autoArchive' => 1, - 'enabledAllUsers' => 1, - 'format' => 'json', - 'token_auth' => Fixture::getTokenAuth(), - ]); - self::assertStringContainsString(urlencode(self::ENCODED_SEGMENT), $url); - - $idSegment2 = Http::sendHttpRequest($url, 10); - $idSegment2 = json_decode($idSegment2, $isAssoc = true); - $idSegment2 = $idSegment2['value']; - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 1; - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 1); - self::$fixture->getTestEnvironment()->save(); - - Rules::setBrowserTriggerArchiving(true); - - Db::exec("UPDATE " . Common::prefixTable('segment') . ' SET ts_created = \'2015-01-02 00:00:00\', ts_last_edit = \'2015-01-02 00:00:00\' WHERE idsegment IN (' . $idSegment . ", " . $idSegment2 . ")"); - } - - private static function trackVisitsForToday() - { - $startTime = Date::today()->addHour(12)->getDatetime(); - - $t = Fixture::getTracker(self::$fixture->idSite, $startTime); - $t->setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'); - $t->setUrl('http://awebsite.com/here/we/go'); - Fixture::checkResponse($t->doTrackPageView('a page title')); - - $t->setUrl('http://awebsite.com/another/page'); - $t->setForceVisitDateTime(Date::factory($startTime)->addHour(1)); - Fixture::checkResponse($t->doTrackPageView('a second page title')); - } - - public function getApiForTesting() - { - $apiRequiringSegments = ['Goals.get', 'VisitFrequency.get']; - - $results = array(); - - foreach (self::$fixture->getDefaultSegments() as $segmentName => $info) { - $results[] = array('VisitsSummary.get', array('idSite' => 'all', - 'date' => '2012-08-09', - 'periods' => array('day', 'week', 'month', 'year'), - 'segment' => $info['definition'], - 'testSuffix' => '_' . $segmentName)); - } - - $results[] = array('VisitsSummary.get', array('idSite' => 'all', - 'date' => 'today', - 'periods' => ['day', 'week', 'month', 'year'], - 'segment' => self::NEW_SEGMENT, - 'testSuffix' => '_' . self::NEW_SEGMENT_NAME)); - - $results[] = array('VisitsSummary.get', array('idSite' => 'all', - 'date' => 'today', - 'periods' => ['day', 'week', 'month', 'year'], - 'segment' => self::ENCODED_SEGMENT, - 'testSuffix' => '_' . self::ENCODED_SEGMENT_NAME)); - - // ExamplePlugin metric - $results[] = ['ExamplePlugin.getExampleArchivedMetric', [ - 'idSite' => 'all', - 'date' => '2007-04-05', - 'periods' => ['day', 'week'], - ]]; - $results[] = ['Actions.get', [ - 'idSite' => 'all', - 'date' => '2007-04-05', - 'periods' => ['day', 'week'], - 'testSuffix' => '_examplePluginNoMetricsBecauseNoOtherPluginsArchived', - ]]; - - // API Call Without segments - $results[] = array('VisitsSummary.get', array('idSite' => 'all', - 'date' => '2012-08-09', - 'periods' => array('day', 'month', 'year', 'week'))); - - $results[] = array($apiRequiringSegments, array('idSite' => 'all', - 'date' => '2012-08-09', - 'periods' => array('month'))); - - $results[] = array('VisitsSummary.get', array('idSite' => 'all', - 'date' => '2012-08-09', - 'periods' => array('day', 'week', 'month', 'year'), - 'segment' => 'browserCode==EP', - 'testSuffix' => '_nonPreArchivedSegment')); - - $segments = array(ManySitesImportedLogs::SEGMENT_PRE_ARCHIVED, - ManySitesImportedLogs::SEGMENT_PRE_ARCHIVED_CONTAINS_ENCODED, - ); - foreach ($segments as $index => $segment) { - // Test with a pre-processed segment - $results[] = array(array('VisitsSummary.get', 'Live.getLastVisitsDetails', 'VisitFrequency.get'), - array('idSite' => '1', - 'date' => '2012-08-09', - 'periods' => array('day', 'year'), - 'segment' => $segment, - 'testSuffix' => '_preArchivedSegment' . $index, - 'otherRequestParameters' => array( - 'hideColumns' => 'latitude,longitude', - ), - 'xmlFieldsToRemove' => array( - 'fingerprint', - ), - ), - ); - } - - return $results; - } - - public function testArchivePhpCron() - { - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - self::$fixture->getTestEnvironment()->overrideConfig('General', 'browser_archiving_disabled_enforce', 1); - self::$fixture->getTestEnvironment()->save(); - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - Config::getInstance()->General['browser_archiving_disabled_enforce'] = 1; - - Rules::setBrowserTriggerArchiving(false); - - $dateToTest = '2007-04-05'; - - // invalidate exampleplugin only archives in past - $invalidator = StaticContainer::get(ArchiveInvalidator::class); - $invalidator->markArchivesAsInvalidated( - [1], - [$dateToTest], - 'day', - new Segment('', [1]), - false, - false, - 'ExamplePlugin' - ); - - // track a visit in 2007-04-05 so it will fully archive (ExamplePlugin wouldn't archive without visit) - $tracker = Fixture::getTracker(1, $dateToTest); - $tracker->setUrl('http://example.com/test/url'); - Fixture::checkResponse($tracker->doTrackPageView('abcdefg')); - - $invalidationEntries = $this->getInvalidatedArchiveTableEntries(); - // there should be 4 invalidations (day, week, month, year) for ExamplePlugin - self::assertCount(4, $invalidationEntries); - self::assertEquals(['done.ExamplePlugin'], array_unique(array_column($invalidationEntries, 'name'))); - - // empty the list so nothing is invalidated during core:archive (so we only archive ExamplePlugin and not all plugins) - $invalidator->forgetRememberedArchivedReportsToInvalidate(1, Date::factory($dateToTest)); - - $this->runArchivePhpCron(); - - $table = ArchiveTableCreator::getNumericTable(Date::factory($dateToTest), true); - $doneFlags = Db::fetchAll("SELECT `period`, `date1`, `date2`, `value` FROM `$table` WHERE name LIKE 'done.ExamplePlugin%' ORDER BY `period` ASC , `date1` ASC, `date2` ASC"); - $expectedDoneFlags = [ - ['period' => Day::PERIOD_ID, 'date1' => '2007-04-05', 'date2' => '2007-04-05', 'value' => ArchiveWriter::DONE_OK], - ['period' => Week::PERIOD_ID, 'date1' => '2007-04-02', 'date2' => '2007-04-08', 'value' => ArchiveWriter::DONE_OK], - ['period' => Month::PERIOD_ID, 'date1' => '2007-04-01', 'date2' => '2007-04-30', 'value' => ArchiveWriter::DONE_OK], - // Year flag is stored in other table - ]; - self::assertEquals($expectedDoneFlags, $doneFlags); - - // add new segment w/ edited created/edit time so it will not trigger segment re-archiving, then track a visit - // so the segments will be archived w/ other invalidation. this also runs core:archive forcing CURL requests. - try { - self::forceCurlCliMulti(); - self::addNewSegmentToPast(); - self::trackVisitsForToday(); - self::trackVisitInPast(); // tracks visit on 2012-08-09, so we end up invalidating and rearchiving a past month - $output = $this->runArchivePhpCron(); - } finally { - self::undoForceCurlCliMulti(); - } - - // re archiving should not produce any ExamplePlugin specific archives, but 382 done flags for certain periods and segments - $table = ArchiveTableCreator::getNumericTable(Date::factory('2012-08-09'), true); - self::assertEquals(0, Db::fetchOne("SELECT count(*) FROM `$table` WHERE name LIKE 'done.ExamplePlugin%'")); - self::assertEquals(382, Db::fetchOne("SELECT count(*) FROM `$table` WHERE name LIKE 'done%'")); - - foreach ($this->getApiForTesting() as $testInfo) { - [$api, $params] = $testInfo; - - if (!isset($params['testSuffix'])) { - $params['testSuffix'] = ''; - } - $params['testSuffix'] .= '_noOptions'; - $params['disableArchiving'] = true; - - $success = $this->runApiTests($api, $params); - - if (!$success) { - var_dump($output); - } - } - } - - /** - * @depends testArchivePhpCron - */ - public function testArchivePhpCronWithSingleReportRearchive() - { - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - self::$fixture->getTestEnvironment()->overrideConfig('General', 'browser_archiving_disabled_enforce', 1); - self::$fixture->getTestEnvironment()->save(); - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - Config::getInstance()->General['browser_archiving_disabled_enforce'] = 1; - - Rules::setBrowserTriggerArchiving(false); - - // request a different date than other tests so we can test that only the single requested metric is archived - $dateToRequest = '2007-04-04'; - - // track a visit so archiving will go through - $tracker = Fixture::getTracker(1, $dateToRequest); - $tracker->setUrl('http://example.com/test/url2'); - Fixture::checkResponse($tracker->doTrackPageView('jkl')); - - $invalidator = StaticContainer::get(ArchiveInvalidator::class); - $invalidator->forgetRememberedArchivedReportsToInvalidate(1, Date::factory($dateToRequest)); - - $table = ArchiveTableCreator::getNumericTable(Date::factory($dateToRequest), true); - - // three whole plugin archives from previous tests - $doneFlags = Db::fetchAll("SELECT `period`, `date1`, `date2`, `value` FROM `$table` WHERE name LIKE 'done.ExamplePlugin%' ORDER BY `period` ASC , `date1` ASC, `date2` ASC, `value` ASC"); - $expectedDoneFlags = [ - ['period' => Day::PERIOD_ID, 'date1' => '2007-04-05', 'date2' => '2007-04-05', 'value' => ArchiveWriter::DONE_OK], - ['period' => Week::PERIOD_ID, 'date1' => '2007-04-02', 'date2' => '2007-04-08', 'value' => ArchiveWriter::DONE_OK], - ['period' => Month::PERIOD_ID, 'date1' => '2007-04-01', 'date2' => '2007-04-30', 'value' => ArchiveWriter::DONE_OK], - // Year flag is stored in other table - ]; - self::assertEquals($expectedDoneFlags, $doneFlags); - - // invalidate a report so we get a partial archive (using the metric that gets incremented each time it is archived) - // (do it after the last run so we don't end up just re-using the ExamplePlugin archive) - $invalidator->markArchivesAsInvalidated([1], [$dateToRequest], 'day', new Segment('', [1]), false, false, 'ExamplePlugin.ExamplePlugin_example_metric'); - - $output = $this->runArchivePhpCron(['-vvv' => null]); - - $this->runApiTests('ExamplePlugin.getExampleArchivedMetric', [ - 'idSite' => 'all', - 'date' => $dateToRequest, - 'periods' => ['day', 'week'], - 'testSuffix' => '_singleMetric', - ]); - - // test that latest archives for ExamplePlugin are partial - $doneFlags = Db::fetchAll("SELECT `period`, `date1`, `date2`, `value` FROM `$table` WHERE name LIKE 'done.ExamplePlugin%' ORDER BY `period` ASC , `date1` ASC, `date2` ASC, `value` ASC"); - $expectedDoneFlags = [ - ['period' => Day::PERIOD_ID, 'date1' => '2007-04-04', 'date2' => '2007-04-04', 'value' => ArchiveWriter::DONE_PARTIAL], - ['period' => Day::PERIOD_ID, 'date1' => '2007-04-05', 'date2' => '2007-04-05', 'value' => ArchiveWriter::DONE_OK], - ['period' => Week::PERIOD_ID, 'date1' => '2007-04-02', 'date2' => '2007-04-08', 'value' => ArchiveWriter::DONE_OK], - ['period' => Week::PERIOD_ID, 'date1' => '2007-04-02', 'date2' => '2007-04-08', 'value' => ArchiveWriter::DONE_PARTIAL], - ['period' => Month::PERIOD_ID, 'date1' => '2007-04-01', 'date2' => '2007-04-30', 'value' => ArchiveWriter::DONE_OK], - ['period' => Month::PERIOD_ID, 'date1' => '2007-04-01', 'date2' => '2007-04-30', 'value' => ArchiveWriter::DONE_PARTIAL], - ]; - self::assertEquals($expectedDoneFlags, $doneFlags); - } - - /** - * @depends testArchivePhpCronWithSingleReportRearchive - */ - public function testArchivePhpCronArchivesFullRanges() - { - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - self::$fixture->getTestEnvironment()->overrideConfig('General', 'archiving_range_force_on_browser_request', 0); - self::$fixture->getTestEnvironment()->overrideConfig('General', 'archiving_custom_ranges', ['2012-08-09,2012-08-13']); - self::$fixture->getTestEnvironment()->save(); - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - Config::getInstance()->General['archiving_range_force_on_browser_request'] = 0; - Config::getInstance()->General['archiving_custom_ranges'][] = ''; - - Rules::setBrowserTriggerArchiving(false); - - $output = $this->runArchivePhpCron(['--force-periods' => 'range', '--force-idsites' => 1]); - - $expectedInvalidations = []; - $invalidationEntries = $this->getInvalidatedArchiveTableEntries(); - - $invalidationEntries = array_filter($invalidationEntries, function ($entry) { - return $entry['period'] == 5; - }); - - $this->assertEquals($expectedInvalidations, $invalidationEntries); - - $this->runApiTests( - array( - 'VisitsSummary.get', 'Actions.get', 'DevicesDetection.getType'), - array('idSite' => '1', - 'date' => '2012-08-09,2012-08-13', - 'periods' => array('range'), - 'testSuffix' => '_range_archive') - ); - } - - /** - * @depends testArchivePhpCronArchivesFullRanges - */ - public function testRangeBrowserArchivingWorksWhenInvalidatedByVisit() - { - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - // remove the value, since the default is to always force archiving on browser request - self::$fixture->getTestEnvironment()->removeOverriddenConfig('General', 'archiving_range_force_on_browser_request'); - self::$fixture->getTestEnvironment()->save(); - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - unset(Config::getInstance()->General['archiving_range_force_on_browser_request']); - - $table = ArchiveTableCreator::getNumericTable(Date::factory('2012-08-09'), true); - $blobTable = ArchiveTableCreator::getBlobTable(Date::factory('2012-08-09'), true); - - // remove existing range archives - $idArchives = Db::fetchAll("SELECT DISTINCT idarchive FROM `$table` WHERE period = 5"); - $idArchives = array_column($idArchives, 'idarchive'); - - $model = new Model(); - $model->deleteArchiveIds($table, $blobTable, $idArchives); - - // process archives once - $this->runApiTests( - array( - 'VisitsSummary.get', 'Actions.get', 'DevicesDetection.getType'), - array('idSite' => '1', - 'date' => '2012-08-09,2012-08-13', - 'periods' => array('range'), - 'testSuffix' => '_range_archive_before_invalidate') - ); - - $this->trackVisitInPast($ip = '124.56.23.23'); - - $cronArchive = new CronArchive(); - $cronArchive->init(); - $cronArchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(1); - - // process day archive so range archive will process below (if we don't, then we'll skip processing the range archive, - // since it wouldn't trigger the child day archive. then later the day archive would be updated, and not the range, resulting - // in inaccurate data) - Rules::setBrowserTriggerArchiving(true); - \Piwik\Plugins\VisitsSummary\API::getInstance()->get(1, 'day', '2012-08-09'); - Rules::setBrowserTriggerArchiving(false); - - $rangeArchivesInvalid = Db::fetchAll("SELECT idarchive, name, date1, date2 FROM " . $table . " WHERE period = 5 and name LIKE 'done.%' and value = " . ArchiveWriter::DONE_INVALIDATED); - $this->assertNotEmpty($rangeArchivesInvalid); - - // cron archive not run, but ranges should still be rearchived - $this->runApiTests( - array( - 'VisitsSummary.get', 'Actions.get', 'DevicesDetection.getType'), - array('idSite' => '1', - 'date' => '2012-08-09,2012-08-13', - 'periods' => array('range'), - 'testSuffix' => '_range_archive_rearchived') - ); - - $archivePurger = StaticContainer::get(ArchivePurger::class); - $archivePurger->purgeInvalidatedArchivesFrom(Date::factory('2020-08-09')); - - $rangeArchivesStillInvalid = Db::fetchAll("SELECT idarchive, name, date1, date2 FROM " . $table . " WHERE period = 5 and name = 'done.%' and value = " . ArchiveWriter::DONE_INVALIDATED); - $this->assertEmpty($rangeArchivesStillInvalid); - } - - public function testArchivePhpScriptDoesNotFailWhenCommandHelpRequested() - { - $output = $this->runArchivePhpCron(array('--help' => null), PIWIK_INCLUDE_PATH . '/misc/cron/archive.php'); - - $this->assertRegExp('/Usage:\s*core:archive/', $output); - self::assertStringNotContainsString("Starting Piwik reports archiving...", $output); - } - - public function testArchivePhpCronWithTimeLimit() - { - self::$fixture->getTestEnvironment()->overrideConfig('General', 'enable_browser_archiving_triggering', 0); - self::$fixture->getTestEnvironment()->overrideConfig('General', 'browser_archiving_disabled_enforce', 1); - self::$fixture->getTestEnvironment()->save(); - - Config::getInstance()->General['enable_browser_archiving_triggering'] = 0; - Config::getInstance()->General['browser_archiving_disabled_enforce'] = 1; - - Rules::setBrowserTriggerArchiving(false); - - // track a visit so archiving will go through - $tracker = Fixture::getTracker(1, '2005-09-04'); - $tracker->setUrl('http://example.com/test/url2'); - Fixture::checkResponse($tracker->doTrackPageView('jkl')); - - $output = $this->runArchivePhpCron(['-vvv --stop-processing-after=1' => null]); - - self::assertStringContainsString('Maximum time limit per execution has been reached.', $output); - - // Ensure work has stopped and some invalidations are left over - self::assertNotEmpty($this->getInvalidatedArchiveTableEntries()); - } - - private function runArchivePhpCron($options = array(), $archivePhpScript = false) - { - $archivePhpScript = $archivePhpScript ?: PIWIK_INCLUDE_PATH . '/tests/PHPUnit/proxy/archive.php'; - $urlToProxy = Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php'; - - // create the command - $cmd = "php \"$archivePhpScript\" --url=\"$urlToProxy\""; - foreach ($options as $name => $value) { - $cmd .= " $name"; - if ($value !== null) { - $cmd .= "=" . escapeshellarg($value); - } - } - $cmd .= " 2>&1"; - - // run the command - exec($cmd, $output, $result); - $output = implode("\n", $output); - - if ($result !== 0 || strpos($output, "ERROR") || strpos($output, "Error")) { - $this->fail("archive cron failed (result = $result): " . $output . "\n\ncommand used: $cmd"); - } - - return $output; - } - - public static function provideContainerConfigBeforeClass() - { - Date::$now = strtotime('2015-01-01 00:00:00'); - - return array( - LoggerInterface::class => \Piwik\DI::get(Logger::class), - - // for some reason, w/o real translations archiving segments in CronArchive fails. the data returned by CliMulti - // is a translation token, and nothing else. - 'Piwik\Translation\Translator' => function (Container $c) { - return new \Piwik\Translation\Translator($c->get('Piwik\Translation\Loader\LoaderInterface')); - }, - - 'Tests.log.allowAllHandlers' => true, - - CronArchive\SegmentArchiving::class => \Piwik\DI::autowire() - // Oldest reports are for 2012, so ensure segments are processed for that year - ->constructorParameter('beginningOfTimeLastNInYears', date('Y') - 2012), - ); - } - - public static function getPathToTestDirectory() - { - return dirname(__FILE__); - } - - private function getInvalidatedArchiveTableEntries() - { - return Db::fetchAll("SELECT idinvalidation, idarchive, idsite, date1, date2, period, name, status FROM " . Common::prefixTable('archive_invalidations')); - } - - private static function undoForceCurlCliMulti() - { - $testVars = new TestingEnvironmentVariables(); - $testVars->forceCliMultiViaCurl = 0; - $testVars->save(); - } - - private static function forceCurlCliMulti() - { - $testVars = new TestingEnvironmentVariables(); - $testVars->forceCliMultiViaCurl = 1; - $testVars->save(); - } -} - -ArchiveCronTest::$fixture = new ManySitesImportedLogs(); -ArchiveCronTest::$fixture->addSegments = true; diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest__ExamplePlugin.getExampleArchivedMetric_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest__ExamplePlugin.getExampleArchivedMetric_day.xml deleted file mode 100644 index 2e1a657b1f3614a845f12ffc5e45dcd6068a9dc8..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest__ExamplePlugin.getExampleArchivedMetric_day.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 3382 - 51 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt deleted file mode 100644 index c592c19adbfc50bcb5432027453335e88f5be824..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt +++ /dev/null @@ -1,107 +0,0 @@ - -------------------------------------------------------- -Using this 'archive.php' script is no longer recommended. -Please use '/path/to/php /home/travis/build/matomo-org/matomo/tests/PHPUnit/proxy/../../..//console core:archive --url=http://localhost/tests/PHPUnit/proxy/index.php --force-date-last-n=10' instead. -To get help use '/path/to/php /home/travis/build/matomo-org/matomo/tests/PHPUnit/proxy/../../..//console core:archive --help' -See also: https://matomo.org/docs/setup-auto-archiving/ - -If you cannot use the console because it requires CLI -try 'php archive.php --url=http://your.piwik/path' -------------------------------------------------------- - - -INFO [2020-09-19 17:11:11] 10540 --------------------------- -INFO [2020-09-19 17:11:11] 10540 INIT -INFO [2020-09-19 17:11:11] 10540 Running Matomo 4.0.0-b2 as Super User -INFO [2020-09-19 17:11:11] 10540 --------------------------- -INFO [2020-09-19 17:11:11] 10540 NOTES -INFO [2020-09-19 17:11:11] 10540 - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings. -INFO [2020-09-19 17:11:11] 10540 See the doc at: https://matomo.org/docs/setup-auto-archiving/ -INFO [2020-09-19 17:11:11] 10540 - Async process archiving supported, using CliMulti. -INFO [2020-09-19 17:11:11] 10540 - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. -INFO [2020-09-19 17:11:12] 10540 --------------------------- -INFO [2020-09-19 17:11:12] 10540 START -INFO [2020-09-19 17:11:12] 10540 Starting Matomo reports archiving... -INFO [2020-09-19 17:11:12] 10540 Start processing archives for site 1. -INFO [2020-09-19 17:11:12] 10540 Archived website id 1, period = day, date = 2007-04-05, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.524s -INFO [2020-09-19 17:11:13] 10540 Archived website id 1, period = week, date = 2007-04-02, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.536s -INFO [2020-09-19 17:11:13] 10540 Archived website id 1, period = month, date = 2007-04-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.537s -INFO [2020-09-19 17:11:14] 10540 Archived website id 1, period = year, date = 2007-01-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.533s -INFO [2020-09-19 17:11:14] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2014-03-13 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2014-03-12 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-09-30 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-19 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-11 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-10 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-09 for following websites ids: 1 -INFO [2020-09-19 17:11:14] 10540 Segment "browserCode==IE" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-09-19 17:11:14] 10540 Segment "visitCount<=5;pageUrl=@/blog/;countryCode==jp" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-09-19 17:11:14] 10540 Segment "visitCount<=5;pageUrl=@%2Fblog%2F;countryCode==jp" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-09-19 17:11:14] 10540 Done invalidating -INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 1.033s -INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 1.033s -INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2012-09-30, segment = '', 1 visits found. Time elapsed: 1.033s -INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.610s -INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = week, date = 2012-09-24, segment = '', 1 visits found. Time elapsed: 1.610s -INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = day, date = 2012-08-19, segment = '', 1 visits found. Time elapsed: 1.610s -INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.613s -INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = month, date = 2012-09-01, segment = '', 1 visits found. Time elapsed: 1.613s -INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = day, date = 2012-08-15, segment = '', 2 visits found. Time elapsed: 1.613s -INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 2.161s -INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 2.161s -INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = day, date = 2012-08-11, segment = '', 11 visits found. Time elapsed: 2.161s -INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = 'visitCount%3C%3D5%3BpageUrl%3D%40%2Fblog%2F%3BcountryCode%3D%3Djp', 0 visits found. Time elapsed: 0.759s -INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = day, date = 2012-08-10, segment = '', 8 visits found. Time elapsed: 1.053s -INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = day, date = 2012-08-09, segment = '', 11 visits found. Time elapsed: 1.053s -INFO [2020-09-19 17:11:26] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = 'browserCode%3D%3DIE', 1 visits found. Time elapsed: 2.475s -INFO [2020-09-19 17:11:26] 10540 Archived website id 1, period = week, date = 2012-08-06, segment = '', 30 visits found. Time elapsed: 2.475s -INFO [2020-09-19 17:11:27] 10540 Archived website id 1, period = month, date = 2012-08-01, segment = '', 33 visits found. Time elapsed: 1.073s -INFO [2020-09-19 17:11:28] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = '', 34 visits found. Time elapsed: 1.056s -INFO [2020-09-19 17:11:32] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = 'visitCount%3C%3D5%3BpageUrl%3D%40%2Fblog%2F%3BcountryCode%3D%3Djp', 7 visits found. Time elapsed: 3.689s -INFO [2020-09-19 17:11:35] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = 'browserCode%3D%3DIE', 6 visits found. Time elapsed: 3.181s -INFO [2020-09-19 17:11:35] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:35] 10540 Done invalidating -INFO [2020-09-19 17:11:35] 10540 Finished archiving for site 1, 25 API requests, Time elapsed: 23.792s [1 / 3 done] -INFO [2020-09-19 17:11:35] 10540 Start processing archives for site 2. -INFO [2020-09-19 17:11:35] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:35] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 2 -INFO [2020-09-19 17:11:35] 10540 Done invalidating -INFO [2020-09-19 17:11:36] 10540 Archived website id 2, period = day, date = 2012-08-15, segment = '', 1 visits found. Time elapsed: 0.542s -INFO [2020-09-19 17:11:37] 10540 Archived website id 2, period = week, date = 2012-08-13, segment = '', 1 visits found. Time elapsed: 0.795s -INFO [2020-09-19 17:11:38] 10540 Archived website id 2, period = month, date = 2012-08-01, segment = '', 1 visits found. Time elapsed: 1.064s -INFO [2020-09-19 17:11:39] 10540 Archived website id 2, period = year, date = 2012-01-01, segment = '', 1 visits found. Time elapsed: 1.067s -INFO [2020-09-19 17:11:39] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:39] 10540 Done invalidating -INFO [2020-09-19 17:11:39] 10540 Finished archiving for site 2, 4 API requests, Time elapsed: 3.619s [2 / 3 done] -INFO [2020-09-19 17:11:39] 10540 Start processing archives for site 3. -INFO [2020-09-19 17:11:39] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2014-03-13 for following websites ids: 3 -INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2014-03-12 for following websites ids: 3 -INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 3 -INFO [2020-09-19 17:11:39] 10540 Done invalidating -INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 1.027s -INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 1.027s -INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2012-08-15, segment = '', 3 visits found. Time elapsed: 1.027s -INFO [2020-09-19 17:11:42] 10540 Archived website id 3, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.449s -INFO [2020-09-19 17:11:42] 10540 Archived website id 3, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 1.449s -INFO [2020-09-19 17:11:44] 10540 Archived website id 3, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.411s -INFO [2020-09-19 17:11:44] 10540 Archived website id 3, period = month, date = 2012-08-01, segment = '', 3 visits found. Time elapsed: 1.952s -INFO [2020-09-19 17:11:46] 10540 Archived website id 3, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 2.012s -INFO [2020-09-19 17:11:46] 10540 Archived website id 3, period = year, date = 2012-01-01, segment = '', 3 visits found. Time elapsed: 2.012s -INFO [2020-09-19 17:11:46] 10540 Checking for queued invalidations... -INFO [2020-09-19 17:11:46] 10540 Done invalidating -INFO [2020-09-19 17:11:46] 10540 Finished archiving for site 3, 9 API requests, Time elapsed: 6.651s [3 / 3 done] -INFO [2020-09-19 17:11:46] 10540 Done archiving! -INFO [2020-09-19 17:11:46] 10540 --------------------------- -INFO [2020-09-19 17:11:46] 10540 SUMMARY -INFO [2020-09-19 17:11:46] 10540 Processed 38 archives. -INFO [2020-09-19 17:11:46] 10540 Total API requests: 38 -INFO [2020-09-19 17:11:46] 10540 done: 38 req, 34209 ms, no error -INFO [2020-09-19 17:11:46] 10540 Time elapsed: 34.209s -INFO [2020-09-19 17:11:46] 10540 --------------------------- -INFO [2020-09-19 17:11:46] 10540 SCHEDULED TASKS -INFO [2020-09-19 17:11:46] 10540 Starting Scheduled tasks... -INFO [2020-09-19 17:11:46] 10540 done -INFO [2020-09-19 17:11:46] 10540 --------------------------- \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_day.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_day.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_week.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_examplePluginNoMetricsBecauseNoOtherPluginsArchived_noOptions__Actions.get_week.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml deleted file mode 100644 index 74f98a20a26b12751cb8cc909e9a8607cea99233..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 3382 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml deleted file mode 100644 index 74f98a20a26b12751cb8cc909e9a8607cea99233..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 3382 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__Goals.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__Goals.get_month.xml deleted file mode 100644 index c21c0db930c0af8726209f605a22ef4e18c46ed1..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__Goals.get_month.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 32 - 32 - 160 - 94.12% - 32 - 32 - 160 - 94.12% - 0 - 0 - 0 - 0% - - - 0 - 0 - 0 - 0% - 0 - 0 - 0 - 0% - 0 - 0 - 0 - 0% - - - 0 - 0 - 0 - 0% - 0 - 0 - 0 - 0% - 0 - 0 - 0 - 0% - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitFrequency.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitFrequency.get_month.xml deleted file mode 100644 index ca128fdd1cc692ba9297b977efde70fd8d796d44..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitFrequency.get_month.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 34 - 1 - 34 - 37 - 32 - 32 - 305 - 3 - 94% - 1.1 - 9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - - - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - - - 2 - 0 - 2 - 4 - 0 - 1 - 1 - 3 - 50% - 2 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 358388e453c95b97fe11a0ce35437f479d1e3edc..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 12 - 0 - 12 - 12 - 12 - 12 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 972ae44a475ffd13a16c0219313ed5e5c1424e9f..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 34 - 1 - 34 - 37 - 32 - 32 - 305 - 3 - 94% - 1.1 - 9 - - - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - - - 2 - 0 - 3 - 5 - 0 - 2 - 1 - 3 - 67% - 1.7 - 0 - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 4d2cc269e2da3b42721d55aa7002ecf7139f9858..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 31 - 1 - 31 - 34 - 29 - 29 - 305 - 3 - 94% - 1.1 - 10 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index b503a2241000e80be35b0b7ea1912761bb4ec1bb..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 35 - 47 - 33 - 32 - 359 - 10 - 91% - 1.3 - 10 - - - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - - - 3 - 5 - 0 - 2 - 1 - 3 - 67% - 1.7 - 0 - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index dd52dc4ff40444a272c35ecbb3f94665561db11a..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_nonPreArchivedSegment_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_day.xml deleted file mode 100644 index f7ca7b07d0150dd1dd19e2713890ffdfccea7c70..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_day.xml +++ /dev/null @@ -1,417 +0,0 @@ - - - - 1 - 3 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/community/ - - 3 - - - 3 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>3</goalPageId> - - <url>http://piwik.net/blog/category/community/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Unknown - Generic Desktop - GNU/Linux - GNU/Linux - plugins/Morpheus/icons/dist/os/LIN.png - LIN - - WebKit - WebKit (Safari) - GNOME Web 2.30 - GNOME Web - plugins/Morpheus/icons/dist/browsers/EP.png - EP - 2.30 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:11:56 - 8 - 0 - 0 - unknown - - - - - - - 1 - 59 - 175.41.193.46 - - - - - action - http://www.included4.com/blog/category/meta/ - - 61 - - - 81 - 3574 - 0 - 0s - 1 - - <subtitle>http://www.included4.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>81</goalPageId> - - <url>http://www.included4.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:39 - 8 - 0 - 0 - unknown - - - - - - - 1 - 1 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 1 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>1</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_year.xml deleted file mode 100644 index d92e4086cc9cb9be81aaab9c554714387cbe9937..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__Live.getLastVisitsDetails_year.xml +++ /dev/null @@ -1,1202 +0,0 @@ - - - - 1 - 57 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 70 - - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>70</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 74 - - 0 - 0s - 5 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/meta/</url> - <pageTitle /> - <pageIdAction>1</pageIdAction> - - - <pageId>78</pageId> - <bandwidth /> - <timeSpent>52</timeSpent> - <timeSpentPretty>52s</timeSpentPretty> - <pageviewPosition>9</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>71</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>2</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>75</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>6</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>79</pageId> - <bandwidth /> - <timeSpent>26</timeSpent> - <timeSpentPretty>26s</timeSpentPretty> - <pageviewPosition>10</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/community/</url> - <pageTitle /> - <pageIdAction>3</pageIdAction> - - - <pageId>72</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>3</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/community/</url> - <pageTitle /> - <pageIdAction>3</pageIdAction> - - - <pageId>76</pageId> - <bandwidth /> - <timeSpent>7</timeSpent> - <timeSpentPretty>7s</timeSpentPretty> - <pageviewPosition>7</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/docs/manage-websites/</url> - <pageTitle /> - <pageIdAction>4</pageIdAction> - - - <pageId>73</pageId> - <bandwidth /> - <timeSpent>1</timeSpent> - <timeSpentPretty>1s</timeSpentPretty> - <pageviewPosition>4</pageviewPosition> - <title /> - <subtitle>http://piwik.net/docs/manage-websites/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/docs/manage-websites/</url> - <pageTitle /> - <pageIdAction>4</pageIdAction> - - - <pageId>77</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>8</pageviewPosition> - <title /> - <subtitle>http://piwik.net/docs/manage-websites/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - </actionDetails> - <goalConversions>1</goalConversions> - <siteCurrency>USD</siteCurrency> - <siteCurrencySymbol>$</siteCurrencySymbol> - - - - - <siteName>Piwik test</siteName> - - - - - - - <userId /> - <visitorType>new</visitorType> - <visitorTypeIcon /> - <visitConverted>1</visitConverted> - <visitConvertedIcon>plugins/Morpheus/images/goal.svg</visitConvertedIcon> - <visitCount>1</visitCount> - <visitEcommerceStatus>none</visitEcommerceStatus> - <visitEcommerceStatusIcon /> - <daysSinceFirstVisit>0</daysSinceFirstVisit> - <secondsSinceFirstVisit>0</secondsSinceFirstVisit> - <daysSinceLastEcommerceOrder>0</daysSinceLastEcommerceOrder> - <secondsSinceLastEcommerceOrder /> - <visitDuration>54</visitDuration> - <visitDurationPretty>54s</visitDurationPretty> - <searches>0</searches> - <actions>10</actions> - <interactions>10</interactions> - <referrerType>direct</referrerType> - <referrerTypeName>Direct Entry</referrerTypeName> - <referrerName /> - <referrerKeyword /> - <referrerKeywordPosition /> - <referrerUrl /> - <referrerSearchEngineUrl /> - <referrerSearchEngineIcon /> - <referrerSocialNetworkUrl /> - <referrerSocialNetworkIcon /> - <referrerAIAssistantUrl /> - <referrerAIAssistantIcon /> - <languageCode /> - <language>Unknown</language> - <deviceType>Unknown</deviceType> - <deviceTypeIcon>plugins/Morpheus/icons/dist/devices/unknown.png</deviceTypeIcon> - <deviceBrand>Unknown</deviceBrand> - <deviceModel>Unknown</deviceModel> - <operatingSystem>Unknown</operatingSystem> - <operatingSystemName>Unknown</operatingSystemName> - <operatingSystemIcon>plugins/Morpheus/icons/dist/os/UNK.png</operatingSystemIcon> - <operatingSystemCode>UNK</operatingSystemCode> - <operatingSystemVersion>UNK</operatingSystemVersion> - <browserFamily /> - <browserFamilyDescription>Unknown</browserFamilyDescription> - <browser>Unknown</browser> - <browserName>Unknown</browserName> - <browserIcon>plugins/Morpheus/icons/dist/browsers/UNK.png</browserIcon> - <browserCode>UNK</browserCode> - <browserVersion /> - <totalEcommerceRevenue>0</totalEcommerceRevenue> - <totalEcommerceConversions>0</totalEcommerceConversions> - <totalEcommerceItems>0</totalEcommerceItems> - <totalAbandonedCartsRevenue>0</totalAbandonedCartsRevenue> - <totalAbandonedCarts>0</totalAbandonedCarts> - <totalAbandonedCartsItems>0</totalAbandonedCartsItems> - <events>0</events> - <continent>Asia</continent> - <continentCode>asi</continentCode> - <country>Japan</country> - <countryCode>jp</countryCode> - <countryFlag>plugins/Morpheus/icons/dist/flags/jp.png</countryFlag> - <region /> - <regionCode /> - <city /> - <location>Japan</location> - <visitLocalTime>08:10:38</visitLocalTime> - <visitLocalHour>8</visitLocalHour> - <daysSinceLastVisit>0</daysSinceLastVisit> - <secondsSinceLastVisit>0</secondsSinceLastVisit> - <resolution>unknown</resolution> - <plugins /> - <pluginsIcons /> - <customVariables> - </customVariables> - </row> - <row> - <idSite>1</idSite> - <idVisit>25</idVisit> - <visitIp>175.41.192.41</visitIp> - - - <actionDetails> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/meta/</url> - <pageTitle /> - <pageIdAction>1</pageIdAction> - - - <pageId>28</pageId> - <bandwidth>3574</bandwidth> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>1</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>28</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 20:15:41 - 20 - 0 - 0 - unknown - - - - - Not-Bot - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24 - - - - - 1 - 19 - 175.41.192.41 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 19 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>19</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 16:10:38 - 16 - 0 - 0 - unknown - - - - - Not-Bot - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24 - - - - - 1 - 58 - 175.41.193.45 - - - - - action - http://included3.com/blog/category/meta/ - - 60 - - - 80 - 3574 - 0 - 0s - 1 - - <subtitle>http://included3.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>80</goalPageId> - - <url>http://included3.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - - 1 - 3 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/community/ - - 3 - - - 3 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>3</goalPageId> - - <url>http://piwik.net/blog/category/community/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Unknown - Generic Desktop - GNU/Linux - GNU/Linux - plugins/Morpheus/icons/dist/os/LIN.png - LIN - - WebKit - WebKit (Safari) - GNOME Web 2.30 - GNOME Web - plugins/Morpheus/icons/dist/browsers/EP.png - EP - 2.30 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:11:56 - 8 - 0 - 0 - unknown - - - - - - - 1 - 59 - 175.41.193.46 - - - - - action - http://www.included4.com/blog/category/meta/ - - 61 - - - 81 - 3574 - 0 - 0s - 1 - - <subtitle>http://www.included4.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>81</goalPageId> - - <url>http://www.included4.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:39 - 8 - 0 - 0 - unknown - - - - - - - 1 - 1 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 1 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>1</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_day.xml deleted file mode 100644 index de5c1efe17802589e42e430382f3c4be3cab6df4..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_day.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_year.xml deleted file mode 100644 index 3a683d01fde306bde73128fc4edb4493f8354f5c..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitFrequency.get_year.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 964d9c948f40c27971e0b4cd026eb3733fb45d02..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 1c7f9fdb5912672b549aacace2bc97a45ca3a45d..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment0_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_day.xml deleted file mode 100644 index f7ca7b07d0150dd1dd19e2713890ffdfccea7c70..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_day.xml +++ /dev/null @@ -1,417 +0,0 @@ - - - - 1 - 3 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/community/ - - 3 - - - 3 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>3</goalPageId> - - <url>http://piwik.net/blog/category/community/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Unknown - Generic Desktop - GNU/Linux - GNU/Linux - plugins/Morpheus/icons/dist/os/LIN.png - LIN - - WebKit - WebKit (Safari) - GNOME Web 2.30 - GNOME Web - plugins/Morpheus/icons/dist/browsers/EP.png - EP - 2.30 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:11:56 - 8 - 0 - 0 - unknown - - - - - - - 1 - 59 - 175.41.193.46 - - - - - action - http://www.included4.com/blog/category/meta/ - - 61 - - - 81 - 3574 - 0 - 0s - 1 - - <subtitle>http://www.included4.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>81</goalPageId> - - <url>http://www.included4.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:39 - 8 - 0 - 0 - unknown - - - - - - - 1 - 1 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 1 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>1</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_year.xml deleted file mode 100644 index d92e4086cc9cb9be81aaab9c554714387cbe9937..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__Live.getLastVisitsDetails_year.xml +++ /dev/null @@ -1,1202 +0,0 @@ - - - - 1 - 57 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 70 - - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>70</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 74 - - 0 - 0s - 5 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/meta/</url> - <pageTitle /> - <pageIdAction>1</pageIdAction> - - - <pageId>78</pageId> - <bandwidth /> - <timeSpent>52</timeSpent> - <timeSpentPretty>52s</timeSpentPretty> - <pageviewPosition>9</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>71</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>2</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>75</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>6</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/faq/</url> - <pageTitle /> - <pageIdAction>2</pageIdAction> - - - <pageId>79</pageId> - <bandwidth /> - <timeSpent>26</timeSpent> - <timeSpentPretty>26s</timeSpentPretty> - <pageviewPosition>10</pageviewPosition> - <title /> - <subtitle>http://piwik.net/faq/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/community/</url> - <pageTitle /> - <pageIdAction>3</pageIdAction> - - - <pageId>72</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>3</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/community/</url> - <pageTitle /> - <pageIdAction>3</pageIdAction> - - - <pageId>76</pageId> - <bandwidth /> - <timeSpent>7</timeSpent> - <timeSpentPretty>7s</timeSpentPretty> - <pageviewPosition>7</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/docs/manage-websites/</url> - <pageTitle /> - <pageIdAction>4</pageIdAction> - - - <pageId>73</pageId> - <bandwidth /> - <timeSpent>1</timeSpent> - <timeSpentPretty>1s</timeSpentPretty> - <pageviewPosition>4</pageviewPosition> - <title /> - <subtitle>http://piwik.net/docs/manage-websites/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>action</type> - <url>http://piwik.net/docs/manage-websites/</url> - <pageTitle /> - <pageIdAction>4</pageIdAction> - - - <pageId>77</pageId> - <bandwidth /> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>8</pageviewPosition> - <title /> - <subtitle>http://piwik.net/docs/manage-websites/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>0 M</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - </actionDetails> - <goalConversions>1</goalConversions> - <siteCurrency>USD</siteCurrency> - <siteCurrencySymbol>$</siteCurrencySymbol> - - - - - <siteName>Piwik test</siteName> - - - - - - - <userId /> - <visitorType>new</visitorType> - <visitorTypeIcon /> - <visitConverted>1</visitConverted> - <visitConvertedIcon>plugins/Morpheus/images/goal.svg</visitConvertedIcon> - <visitCount>1</visitCount> - <visitEcommerceStatus>none</visitEcommerceStatus> - <visitEcommerceStatusIcon /> - <daysSinceFirstVisit>0</daysSinceFirstVisit> - <secondsSinceFirstVisit>0</secondsSinceFirstVisit> - <daysSinceLastEcommerceOrder>0</daysSinceLastEcommerceOrder> - <secondsSinceLastEcommerceOrder /> - <visitDuration>54</visitDuration> - <visitDurationPretty>54s</visitDurationPretty> - <searches>0</searches> - <actions>10</actions> - <interactions>10</interactions> - <referrerType>direct</referrerType> - <referrerTypeName>Direct Entry</referrerTypeName> - <referrerName /> - <referrerKeyword /> - <referrerKeywordPosition /> - <referrerUrl /> - <referrerSearchEngineUrl /> - <referrerSearchEngineIcon /> - <referrerSocialNetworkUrl /> - <referrerSocialNetworkIcon /> - <referrerAIAssistantUrl /> - <referrerAIAssistantIcon /> - <languageCode /> - <language>Unknown</language> - <deviceType>Unknown</deviceType> - <deviceTypeIcon>plugins/Morpheus/icons/dist/devices/unknown.png</deviceTypeIcon> - <deviceBrand>Unknown</deviceBrand> - <deviceModel>Unknown</deviceModel> - <operatingSystem>Unknown</operatingSystem> - <operatingSystemName>Unknown</operatingSystemName> - <operatingSystemIcon>plugins/Morpheus/icons/dist/os/UNK.png</operatingSystemIcon> - <operatingSystemCode>UNK</operatingSystemCode> - <operatingSystemVersion>UNK</operatingSystemVersion> - <browserFamily /> - <browserFamilyDescription>Unknown</browserFamilyDescription> - <browser>Unknown</browser> - <browserName>Unknown</browserName> - <browserIcon>plugins/Morpheus/icons/dist/browsers/UNK.png</browserIcon> - <browserCode>UNK</browserCode> - <browserVersion /> - <totalEcommerceRevenue>0</totalEcommerceRevenue> - <totalEcommerceConversions>0</totalEcommerceConversions> - <totalEcommerceItems>0</totalEcommerceItems> - <totalAbandonedCartsRevenue>0</totalAbandonedCartsRevenue> - <totalAbandonedCarts>0</totalAbandonedCarts> - <totalAbandonedCartsItems>0</totalAbandonedCartsItems> - <events>0</events> - <continent>Asia</continent> - <continentCode>asi</continentCode> - <country>Japan</country> - <countryCode>jp</countryCode> - <countryFlag>plugins/Morpheus/icons/dist/flags/jp.png</countryFlag> - <region /> - <regionCode /> - <city /> - <location>Japan</location> - <visitLocalTime>08:10:38</visitLocalTime> - <visitLocalHour>8</visitLocalHour> - <daysSinceLastVisit>0</daysSinceLastVisit> - <secondsSinceLastVisit>0</secondsSinceLastVisit> - <resolution>unknown</resolution> - <plugins /> - <pluginsIcons /> - <customVariables> - </customVariables> - </row> - <row> - <idSite>1</idSite> - <idVisit>25</idVisit> - <visitIp>175.41.192.41</visitIp> - - - <actionDetails> - <row> - <type>action</type> - <url>http://piwik.net/blog/category/meta/</url> - <pageTitle /> - <pageIdAction>1</pageIdAction> - - - <pageId>28</pageId> - <bandwidth>3574</bandwidth> - <timeSpent>0</timeSpent> - <timeSpentPretty>0s</timeSpentPretty> - <pageviewPosition>1</pageviewPosition> - <title /> - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>28</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 20:15:41 - 20 - 0 - 0 - unknown - - - - - Not-Bot - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24 - - - - - 1 - 19 - 175.41.192.41 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 19 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>19</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 16:10:38 - 16 - 0 - 0 - unknown - - - - - Not-Bot - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24 - - - - - 1 - 58 - 175.41.193.45 - - - - - action - http://included3.com/blog/category/meta/ - - 60 - - - 80 - 3574 - 0 - 0s - 1 - - <subtitle>http://included3.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>80</goalPageId> - - <url>http://included3.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - - 1 - 3 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/community/ - - 3 - - - 3 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/community/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>3</goalPageId> - - <url>http://piwik.net/blog/category/community/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Unknown - Generic Desktop - GNU/Linux - GNU/Linux - plugins/Morpheus/icons/dist/os/LIN.png - LIN - - WebKit - WebKit (Safari) - GNOME Web 2.30 - GNOME Web - plugins/Morpheus/icons/dist/browsers/EP.png - EP - 2.30 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:11:56 - 8 - 0 - 0 - unknown - - - - - - - 1 - 59 - 175.41.193.46 - - - - - action - http://www.included4.com/blog/category/meta/ - - 61 - - - 81 - 3574 - 0 - 0s - 1 - - <subtitle>http://www.included4.com/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>81</goalPageId> - - <url>http://www.included4.com/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:39 - 8 - 0 - 0 - unknown - - - - - - - 1 - 1 - 175.41.192.40 - - - - - action - http://piwik.net/blog/category/meta/ - - 1 - - - 1 - 3574 - 0 - 0s - 1 - - <subtitle>http://piwik.net/blog/category/meta/</subtitle> - <icon /> - <iconSVG>plugins/Morpheus/images/action.svg</iconSVG> - - <bandwidth_pretty>3.5 K</bandwidth_pretty> - <customVariables> - <row> - <customVariablePageName1>HTTP-code</customVariablePageName1> - <customVariablePageValue1>200</customVariablePageValue1> - </row> - </customVariables> - </row> - <row> - <type>goal</type> - <goalName>all</goalName> - <goalId>1</goalId> - - <revenue>5</revenue> - <goalPageId>1</goalPageId> - - <url>http://piwik.net/blog/category/meta/</url> - <referrerType>direct</referrerType> - <referrerName /> - <referrerKeyword /> - <icon>plugins/Morpheus/images/goal.png</icon> - <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> - <title>Goal conversion - all ($5 revenue) - - - - 1 - USD - $ - - - - - Piwik test - - - - - - - - new - - 1 - plugins/Morpheus/images/goal.svg - 1 - none - - 0 - 0 - 0 - - 0 - 0s - 0 - 1 - 1 - direct - Direct Entry - - - - - - - - - - - - Unknown - Desktop - plugins/Morpheus/icons/dist/devices/desktop.png - Apple - Generic Desktop - Mac 10.6 - Mac - plugins/Morpheus/icons/dist/os/MAC.png - MAC - 10.6 - WebKit - WebKit (Safari) - RockMelt 0.9 - RockMelt - plugins/Morpheus/icons/dist/browsers/RM.png - RM - 0.9 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - Asia - asi - Japan - jp - plugins/Morpheus/icons/dist/flags/jp.png - - - - Japan - 08:10:38 - 8 - 0 - 0 - unknown - - - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_day.xml deleted file mode 100644 index de5c1efe17802589e42e430382f3c4be3cab6df4..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_day.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_year.xml deleted file mode 100644 index 3a683d01fde306bde73128fc4edb4493f8354f5c..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitFrequency.get_year.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - 0 - 0 - 0 - 0 - 0 - 0 - 0% - 0 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 964d9c948f40c27971e0b4cd026eb3733fb45d02..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 1c7f9fdb5912672b549aacace2bc97a45ca3a45d..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_preArchivedSegment1_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__Actions.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__Actions.get_range.xml deleted file mode 100644 index 6d0fc6f0649efe168bbf5d3d37dbca6648a2aabe..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__Actions.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 30 - 30 - 4 - 4 - 0 - 0 - 0 - 0 - 34 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__DevicesDetection.getType_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__DevicesDetection.getType_range.xml deleted file mode 100644 index 98df5eb1773f3232770c1497a3b3dc8aeea6afa7..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__DevicesDetection.getType_range.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - 26 - 29 - 3 - 305 - 24 - 25 - - - 25 - 25 - 125 - - - 25 - 125 - 26 - 1 - deviceType==desktop - plugins/Morpheus/icons/dist/devices/desktop.png - - - - 3 - 3 - 1 - 0 - 3 - 3 - - - 3 - 3 - 15 - - - 3 - 15 - 3 - 0 - deviceType==smartphone - plugins/Morpheus/icons/dist/devices/smartphone.png - - - - 2 - 2 - 1 - 0 - 2 - 1 - - - 1 - 1 - 5 - - - 1 - 5 - 2 - 0 - plugins/Morpheus/icons/dist/devices/unknown.png - - - - 0 - deviceType==camera - plugins/Morpheus/icons/dist/devices/camera.png - - - - 0 - deviceType==car+browser - plugins/Morpheus/icons/dist/devices/car_browser.png - - - - 0 - deviceType==console - plugins/Morpheus/icons/dist/devices/console.png - - - - 0 - deviceType==feature+phone - plugins/Morpheus/icons/dist/devices/feature_phone.png - - - - 0 - deviceType==peripheral - plugins/Morpheus/icons/dist/devices/peripheral.png - - - - 0 - deviceType==phablet - plugins/Morpheus/icons/dist/devices/phablet.png - - - - 0 - deviceType==portable+media+player - plugins/Morpheus/icons/dist/devices/portable_media_player.png - - - - 0 - deviceType==smart+display - plugins/Morpheus/icons/dist/devices/smart_display.png - - - - 0 - deviceType==smart+speaker - plugins/Morpheus/icons/dist/devices/smart_speaker.png - - - - 0 - deviceType==tablet - plugins/Morpheus/icons/dist/devices/tablet.png - - - - 0 - deviceType==tv - plugins/Morpheus/icons/dist/devices/tv.png - - - - 0 - deviceType==wearable - plugins/Morpheus/icons/dist/devices/wearable.png - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__VisitsSummary.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__VisitsSummary.get_range.xml deleted file mode 100644 index af0d9b8c737fe9dc91e3f8035aabd6e722bde321..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive__VisitsSummary.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 31 - 34 - 29 - 29 - 305 - 3 - 94% - 1.1 - 10 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__Actions.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__Actions.get_range.xml deleted file mode 100644 index 6d0fc6f0649efe168bbf5d3d37dbca6648a2aabe..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__Actions.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 30 - 30 - 4 - 4 - 0 - 0 - 0 - 0 - 34 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__DevicesDetection.getType_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__DevicesDetection.getType_range.xml deleted file mode 100644 index 98df5eb1773f3232770c1497a3b3dc8aeea6afa7..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__DevicesDetection.getType_range.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - 26 - 29 - 3 - 305 - 24 - 25 - - - 25 - 25 - 125 - - - 25 - 125 - 26 - 1 - deviceType==desktop - plugins/Morpheus/icons/dist/devices/desktop.png - - - - 3 - 3 - 1 - 0 - 3 - 3 - - - 3 - 3 - 15 - - - 3 - 15 - 3 - 0 - deviceType==smartphone - plugins/Morpheus/icons/dist/devices/smartphone.png - - - - 2 - 2 - 1 - 0 - 2 - 1 - - - 1 - 1 - 5 - - - 1 - 5 - 2 - 0 - plugins/Morpheus/icons/dist/devices/unknown.png - - - - 0 - deviceType==camera - plugins/Morpheus/icons/dist/devices/camera.png - - - - 0 - deviceType==car+browser - plugins/Morpheus/icons/dist/devices/car_browser.png - - - - 0 - deviceType==console - plugins/Morpheus/icons/dist/devices/console.png - - - - 0 - deviceType==feature+phone - plugins/Morpheus/icons/dist/devices/feature_phone.png - - - - 0 - deviceType==peripheral - plugins/Morpheus/icons/dist/devices/peripheral.png - - - - 0 - deviceType==phablet - plugins/Morpheus/icons/dist/devices/phablet.png - - - - 0 - deviceType==portable+media+player - plugins/Morpheus/icons/dist/devices/portable_media_player.png - - - - 0 - deviceType==smart+display - plugins/Morpheus/icons/dist/devices/smart_display.png - - - - 0 - deviceType==smart+speaker - plugins/Morpheus/icons/dist/devices/smart_speaker.png - - - - 0 - deviceType==tablet - plugins/Morpheus/icons/dist/devices/tablet.png - - - - 0 - deviceType==tv - plugins/Morpheus/icons/dist/devices/tv.png - - - - 0 - deviceType==wearable - plugins/Morpheus/icons/dist/devices/wearable.png - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__VisitsSummary.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__VisitsSummary.get_range.xml deleted file mode 100644 index af0d9b8c737fe9dc91e3f8035aabd6e722bde321..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_before_invalidate__VisitsSummary.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 31 - 34 - 29 - 29 - 305 - 3 - 94% - 1.1 - 10 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__Actions.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__Actions.get_range.xml deleted file mode 100644 index f766c8bfc8d66794e7dcfebe06b43ba988f6841e..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__Actions.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 31 - 31 - 4 - 4 - 0 - 0 - 0 - 0 - 35 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__DevicesDetection.getType_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__DevicesDetection.getType_range.xml deleted file mode 100644 index a8f2821894dd6c85a2d52c362a17730f6cb3da0b..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__DevicesDetection.getType_range.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - 26 - 29 - 3 - 305 - 24 - 25 - - - 25 - 25 - 125 - - - 25 - 125 - 26 - 1 - deviceType==desktop - plugins/Morpheus/icons/dist/devices/desktop.png - - - - 4 - 4 - 1 - 0 - 4 - 4 - - - 4 - 4 - 20 - - - 4 - 20 - 4 - 0 - deviceType==smartphone - plugins/Morpheus/icons/dist/devices/smartphone.png - - - - 2 - 2 - 1 - 0 - 2 - 1 - - - 1 - 1 - 5 - - - 1 - 5 - 2 - 0 - plugins/Morpheus/icons/dist/devices/unknown.png - - - - 0 - deviceType==camera - plugins/Morpheus/icons/dist/devices/camera.png - - - - 0 - deviceType==car+browser - plugins/Morpheus/icons/dist/devices/car_browser.png - - - - 0 - deviceType==console - plugins/Morpheus/icons/dist/devices/console.png - - - - 0 - deviceType==feature+phone - plugins/Morpheus/icons/dist/devices/feature_phone.png - - - - 0 - deviceType==peripheral - plugins/Morpheus/icons/dist/devices/peripheral.png - - - - 0 - deviceType==phablet - plugins/Morpheus/icons/dist/devices/phablet.png - - - - 0 - deviceType==portable+media+player - plugins/Morpheus/icons/dist/devices/portable_media_player.png - - - - 0 - deviceType==smart+display - plugins/Morpheus/icons/dist/devices/smart_display.png - - - - 0 - deviceType==smart+speaker - plugins/Morpheus/icons/dist/devices/smart_speaker.png - - - - 0 - deviceType==tablet - plugins/Morpheus/icons/dist/devices/tablet.png - - - - 0 - deviceType==tv - plugins/Morpheus/icons/dist/devices/tv.png - - - - 0 - deviceType==wearable - plugins/Morpheus/icons/dist/devices/wearable.png - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__VisitsSummary.get_range.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__VisitsSummary.get_range.xml deleted file mode 100644 index 9af550f04de0a0b71914f92e7b2616dc3ba399a9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_range_archive_rearchived__VisitsSummary.get_range.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 32 - 35 - 30 - 30 - 305 - 3 - 94% - 1.1 - 10 - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 079f977d9b58104ba0d6e319595cbebf927f2350..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentForToday_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 63b6e48e2d7c49ffc01bdf0f40586aa8ab2f18b1..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 4 - 0 - 4 - 4 - 4 - 4 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index c545ab2bc595ea073b0cd176b6ed346d2eff7603..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 12 - 0 - 12 - 15 - 11 - 10 - 305 - 3 - 83% - 1.3 - 25 - - - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - - - 1 - 0 - 1 - 3 - 0 - 0 - 1 - 3 - 0% - 3 - 1 - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 6a3bd088d67511eac114db7ed7c7eb69c3a1e69c..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 11 - 0 - 11 - 14 - 10 - 9 - 305 - 3 - 82% - 1.3 - 28 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index d778df9708e9d473da3d21c8d9b2ed993689685b..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentNoAutoArchive_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 12 - 15 - 11 - 10 - 305 - 3 - 83% - 1.3 - 25 - - - 1 - 1 - 0 - 1 - 0 - 1 - 100% - 1 - 0 - - - 1 - 3 - 0 - 0 - 1 - 3 - 0% - 3 - 1 - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 2f05440facac8906468304047a1f4adb81f6eefe..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 69cfb8ea524d1e59f26da40fd37dfdaa0816e6b2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 6 - 0 - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 3b8ee5ce75023dd11319e5e1ac81344b81197616..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 5 - 0 - 5 - 5 - 5 - 5 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 127cfeba900b3fa95b8ff36a9b22b19e5ddee0d9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentOnlyOneSite_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 57d322baebbb2fb8102283be92718f15c6dc6e9c..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 69cfb8ea524d1e59f26da40fd37dfdaa0816e6b2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 6 - 0 - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 69cfb8ea524d1e59f26da40fd37dfdaa0816e6b2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 6 - 0 - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 25bde1bf62c326aa3de5ca24e7fbeb4866d28761..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchivedWithUrlEncoding_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 57d322baebbb2fb8102283be92718f15c6dc6e9c..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 3 - 0 - 3 - 3 - 3 - 3 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 69cfb8ea524d1e59f26da40fd37dfdaa0816e6b2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 6 - 0 - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 69cfb8ea524d1e59f26da40fd37dfdaa0816e6b2..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 6 - 0 - 6 - 6 - 6 - 6 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 25bde1bf62c326aa3de5ca24e7fbeb4866d28761..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentPreArchived_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 7 - 16 - 7 - 6 - 54 - 10 - 86% - 2.3 - 8 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_day.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_day.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_month.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_month.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_month.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_week.xml deleted file mode 100644 index 907663817a20a47151a561925a2bff42b88f96f9..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_week.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 0 - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_year.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_year.xml deleted file mode 100644 index 079f977d9b58104ba0d6e319595cbebf927f2350..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_segmentWithEncoding_noOptions__VisitsSummary.get_year.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 2 - 2 - 2 - 2 - 0 - 1 - 100% - 1 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml deleted file mode 100644 index 049680a34c3dc105d2b88ab396840388ba2d0f13..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 3383 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml deleted file mode 100644 index 14aaf18648a5ddbc490e79006139ae01a99db642..0000000000000000000000000000000000000000 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 6765 - 0 - - - - \ No newline at end of file diff --git a/plugins/CoreHome/Categories/AIAssistantsCategory.php b/plugins/CoreHome/Categories/AIAssistantsCategory.php deleted file mode 100644 index ae589b2bd119e95f4721e43064b97368ec48a991..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Categories/AIAssistantsCategory.php +++ /dev/null @@ -1,30 +0,0 @@ -' . Piwik::translate('CoreHome_DevicesSubcategoryHelp') . '

'; - } -} diff --git a/plugins/CoreHome/Categories/EngagementSubcategory.php b/plugins/CoreHome/Categories/EngagementSubcategory.php deleted file mode 100644 index ac7f25bdd67cabe6ee47b1f4f4d36fc22687c176..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Categories/EngagementSubcategory.php +++ /dev/null @@ -1,26 +0,0 @@ -' . Piwik::translate('CoreHome_EngagementSubcategoryHelp1') . '

' - . '

' . Piwik::translate('CoreHome_EngagementSubcategoryHelp2') . '

'; - } -} diff --git a/plugins/CoreHome/Categories/GenericCategory.php b/plugins/CoreHome/Categories/GenericCategory.php deleted file mode 100644 index 82ef278278d65d62825c4d2802193b9895a96a78..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Categories/GenericCategory.php +++ /dev/null @@ -1,18 +0,0 @@ -' . Piwik::translate('CoreHome_SoftwareSubcategoryHelp') . '

'; - } -} diff --git a/plugins/CoreHome/Categories/VisitorsCategory.php b/plugins/CoreHome/Categories/VisitorsCategory.php deleted file mode 100644 index cdb41617d859a673a4ba31e7ff82de9a2e79107e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Categories/VisitorsCategory.php +++ /dev/null @@ -1,30 +0,0 @@ -'; - - $helpText = '

' . Piwik::translate('CoreHome_VisitorsCategoryHelp1') . '

'; - $helpText .= '

' . Piwik::translate('CoreHome_VisitorsCategoryHelp2', [$visitsLogUrl, '']) . '

'; - - return $helpText; - } -} diff --git a/plugins/CoreHome/Categories/VisitorsOverviewSubcategory.php b/plugins/CoreHome/Categories/VisitorsOverviewSubcategory.php deleted file mode 100644 index 62fcf1984cb0597c5d854ae00e92a7a99f228abe..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Categories/VisitorsOverviewSubcategory.php +++ /dev/null @@ -1,25 +0,0 @@ -' . Piwik::translate('CoreHome_VisitorsOverviewHelp') . '

'; - } -} diff --git a/plugins/CoreHome/Columns/IdSite.php b/plugins/CoreHome/Columns/IdSite.php deleted file mode 100644 index e5a2af0d0fa77d82be0f0edb72ae49780019148b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/IdSite.php +++ /dev/null @@ -1,60 +0,0 @@ -getIdSite(); - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onAnyGoalConversion(Request $request, Visitor $visitor, $action) - { - return $request->getIdSite(); - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - try { - return Site::getNameFor($value); - } catch (\Exception $ex) { - $formatted = parent::formatValue($value, $idSite, $formatter); - return Piwik::translate('General_MeasurableId') . ': ' . $formatted; - } - } -} diff --git a/plugins/CoreHome/Columns/LinkVisitActionId.php b/plugins/CoreHome/Columns/LinkVisitActionId.php deleted file mode 100644 index 147aac77d36b59c1423fd5053d17187de1348295..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/LinkVisitActionId.php +++ /dev/null @@ -1,34 +0,0 @@ -createMetric(ArchivedMetric::AGGREGATION_UNIQUE); - $metric->setTranslatedName(Piwik::translate('General_ColumnHits')); - $metric->setName('hits'); - $metricsList->addMetric($metric); - } -} diff --git a/plugins/CoreHome/Columns/LinkVisitActionIdPages.php b/plugins/CoreHome/Columns/LinkVisitActionIdPages.php deleted file mode 100644 index e8abad06f35bc7b29075a965451e054001da7f9b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/LinkVisitActionIdPages.php +++ /dev/null @@ -1,47 +0,0 @@ -createMetric(ArchivedMetric::AGGREGATION_UNIQUE); - $metric->setTranslatedName(Piwik::translate('General_ColumnPageviews')); - $metric->setDocumentation(Piwik::translate('General_ColumnPageviewsDocumentation')); - $metric->setName('pageviews'); - $metricsList->addMetric($metric); - } -} diff --git a/plugins/CoreHome/Columns/Metrics/ActionsPerVisit.php b/plugins/CoreHome/Columns/Metrics/ActionsPerVisit.php deleted file mode 100644 index eb38e4368c6b5ff2c5933950697210c512da27ef..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/ActionsPerVisit.php +++ /dev/null @@ -1,53 +0,0 @@ -getMetric($row, 'nb_actions'); - $visits = $this->getMetric($row, 'nb_visits'); - - return Piwik::getQuotientSafe($actions, $visits, $precision = 1); - } - - public function getTranslatedName() - { - return Piwik::translate('General_ColumnActionsPerVisit'); - } - - public function getDependentMetrics() - { - return array('nb_actions', 'nb_visits'); - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_NUMBER; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/AverageTimeOnSite.php b/plugins/CoreHome/Columns/Metrics/AverageTimeOnSite.php deleted file mode 100644 index 88c502f9302b51b1aee65b8ae2687659475d45f5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/AverageTimeOnSite.php +++ /dev/null @@ -1,61 +0,0 @@ -getMetric($row, 'sum_visit_length'); - $nbVisits = $this->getMetric($row, 'nb_visits'); - - return Piwik::getQuotientSafe($sumVisitLength, $nbVisits, $precision = 0); - } - - public function format($value, Formatter $formatter) - { - return $formatter->getPrettyTimeFromSeconds($value, true); - } - - public function getTranslatedName() - { - return Piwik::translate('General_ColumnAvgTimeOnSite'); - } - - public function getDependentMetrics() - { - return array('sum_visit_length', 'nb_visits'); - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_DURATION_S; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/BounceRate.php b/plugins/CoreHome/Columns/Metrics/BounceRate.php deleted file mode 100644 index 210f95a699b2f702a689d3d9ce4d70848e9f01b4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/BounceRate.php +++ /dev/null @@ -1,60 +0,0 @@ -getPrettyPercentFromQuotient($value); - } - - public function compute(Row $row) - { - $bounceCount = $this->getMetric($row, 'bounce_count'); - $visits = $this->getMetric($row, 'nb_visits'); - - return Piwik::getQuotientSafe($bounceCount, $visits, $precision = 2); - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_PERCENT; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/CallableProcessedMetric.php b/plugins/CoreHome/Columns/Metrics/CallableProcessedMetric.php deleted file mode 100644 index 1a3566ee1a0551cff967beb2da07bf74d40d559b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/CallableProcessedMetric.php +++ /dev/null @@ -1,56 +0,0 @@ -name = $name; - $this->callback = $callback; - $this->dependentMetrics = $dependentMetrics; - $this->semanticType = $semanticType; - } - - public function getName() - { - return $this->name; - } - - public function compute(Row $row) - { - if ($this->callback) { - return call_user_func($this->callback, $row); - } - } - - public function getTranslatedName() - { - return ''; - } - - public function getDependentMetrics() - { - return $this->dependentMetrics; - } - - public function getSemanticType(): ?string - { - return $this->semanticType; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/ConversionRate.php b/plugins/CoreHome/Columns/Metrics/ConversionRate.php deleted file mode 100644 index 9d893f5f2531a3efd9ee58600793ddf7c69d9b2f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/ConversionRate.php +++ /dev/null @@ -1,65 +0,0 @@ -getPrettyPercentFromQuotient($value); - } - - public function compute(Row $row) - { - $nbVisitsConverted = $this->getMetric($row, 'nb_visits_converted'); - $nbVisits = $this->getMetric($row, 'nb_visits'); - return Piwik::getQuotientSafe($nbVisitsConverted, $nbVisits, $precision = 4); - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_PERCENT; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/EvolutionMetric.php b/plugins/CoreHome/Columns/Metrics/EvolutionMetric.php deleted file mode 100644 index fa866c1f18b64211d690e2940f47775446de9f85..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/EvolutionMetric.php +++ /dev/null @@ -1,288 +0,0 @@ -wrapped = $wrapped; - $this->isLowerBetter = Metrics::isLowerValueBetter($this->wrapped); - $this->pastData = $pastData; - $this->currentData = $currentData; - - if (empty($evolutionMetricName)) { - $wrappedName = $this->getWrappedName(); - $evolutionMetricName = $wrappedName . '_evolution'; - } - - $this->evolutionMetricTrendName = $evolutionMetricName . '_trend'; - $this->evolutionMetricName = $evolutionMetricName; - $this->quotientPrecision = $quotientPrecision; - } - - public function getName() - { - return $this->evolutionMetricName; - } - - public function getTrendName() - { - return $this->evolutionMetricTrendName; - } - - public function getTranslatedName() - { - if ($this->wrapped instanceof Metric) { - $metricName = $this->wrapped->getTranslatedName(); - } else { - $defaultMetricTranslations = Metrics::getDefaultMetricTranslations(); - $metricName = isset($defaultMetricTranslations[$this->wrapped]) ? $defaultMetricTranslations[$this->wrapped] : $this->wrapped; - } - return Piwik::translate('CoreHome_EvolutionMetricName', [$metricName]); - } - - public function getTrendValue($computedValue = 0) - { - if ($this->isLowerBetter) { - return ($computedValue < 0 ? 1 : ($computedValue > 0 ? -1 : 0)); - } - - return ($computedValue < 0 ? -1 : ($computedValue > 0 ? 1 : 0)); - } - - public function compute(Row $row) - { - $columnName = $this->getWrappedName(); - $pastRow = $this->getPastRowFromCurrent($row); - - $currentValue = $this->getMetric($row, $columnName); - $pastValue = $pastRow ? $this->getMetric($pastRow, $columnName) : 0; - - if ($row->getMetadata('ratio') === false) { - // Reduce past value proportionally to match the percent of the current period which is complete, if applicable - $ratio = self::getRatio($this->currentData, $this->pastData, $row); - $row->setMetadata('ratio', $ratio); - } - - if ($row->getMetadata('currencySymbol') === false) { - $row->setMetadata( - 'currencySymbol', - $row['label'] !== DataTable::ID_SUMMARY_ROW && $row['label'] !== DataTable::LABEL_TOTALS_ROW ? Site::getCurrencySymbolFor($row['label']) : API::getInstance()->getDefaultCurrency() - ); - } - - $row->setMetadata('previous_' . $columnName, $pastValue); - - if ($row->getMetadata('previousRange') === false || $row->getMetadata('periodName') === false) { - $period = $this->pastData->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX); - $row->setMetadata('periodName', $period->getLabel()); - $row->setMetadata('previousRange', $period->getLocalizedShortString()); - } - - $pastValue = ($pastValue * $row->getMetadata('ratio')); - - $dividend = $currentValue - $pastValue; - $divisor = $pastValue; - - if ($dividend == 0) { - return 0; - } elseif ($divisor == 0) { - return 1; - } else { - return Piwik::getQuotientSafe($dividend, $divisor, $this->quotientPrecision + 2); - } - } - - public function format($value, Formatter $formatter) - { - return $formatter->getPrettyPercentFromQuotient($value); - } - - public function getDependentMetrics() - { - return array($this->getWrappedName()); - } - - public function beforeComputeSubtable(Row $row) - { - $this->labelPath[] = $row->getColumn('label'); - } - - public function afterComputeSubtable(Row $row) - { - array_pop($this->labelPath); - } - - protected function getWrappedName() - { - return $this->wrapped instanceof Metric ? $this->wrapped->getName() : $this->wrapped; - } - - /** - * public for Insights use. - */ - public function getPastRowFromCurrent(Row $row) - { - $pastData = $this->getPastDataTable(); - if (empty($pastData)) { - return null; - } - - $label = $row->getColumn('label'); - return $label ? $pastData->getRowFromLabel($label) : $pastData->getFirstRow(); - } - - private function getPastDataTable() - { - $result = $this->pastData; - foreach ($this->labelPath as $label) { - $row = $result->getRowFromLabel($label); - if (empty($row)) { - return null; - } - - $subtable = $row->getSubtable(); - if (empty($subtable)) { - return null; - } - - $result = $subtable; - } - return $result; - } - - /** - * Calculate the ratio of time between a past period and current incomplete period - * - * eg. if today is Thursday at 12:00pm and the past period is a week then the ratio is 0.5, exactly half of the - * current incomplete period has passed - * - * If the current period end is in the past then the ratio will always be 1, since the current period is complete. - * - * @return float|int - * @throws \Exception - */ - public static function getRatio(?DataTable $currentData, ?DataTable $pastData, Row $row) - { - $ratio = 1; - - if ($currentData != null && $pastData != null) { - $p = $pastData->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX); - - $pStart = $p->getDateStart()->setTime('00:00:00'); - $pEnd = $p->getDateEnd()->setTime('23:59:59'); - - $c = $currentData->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX); - $cStart = $c->getDateStart()->setTime('00:00:00'); - $cEnd = $c->getDateEnd()->setTime('23:59:59'); - - $nowTS = Date::getNowTimestamp(); - - // If we know the date the the datatable data was generated then use that instead of now - $archivedDateStr = $row->getMetadata(DataTable::ARCHIVED_DATE_METADATA_NAME); - - if ($archivedDateStr) { - $archivedDate = Date::factory($archivedDateStr); - if ($archivedDate) { - $nowTS = Date::factory($archivedDate)->getTimestamp(); - } - } - - if ($cStart->getTimestamp() <= $nowTS && $cEnd->getTimestamp() >= $nowTS) { - $secsInPastPeriod = $pEnd->getTimestamp() - $pStart->getTimestamp(); - $secsInCurrentPeriod = $nowTS - $cStart->getTimestamp(); - $ratio = $secsInCurrentPeriod / $secsInPastPeriod; - } - } - - return round($ratio, 3); - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_PERCENT; - } -} diff --git a/plugins/CoreHome/Columns/Metrics/VisitsPercent.php b/plugins/CoreHome/Columns/Metrics/VisitsPercent.php deleted file mode 100644 index 60c838650b6a0630c090dc8a7354ac0a99b718f1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Metrics/VisitsPercent.php +++ /dev/null @@ -1,86 +0,0 @@ -forceTotalVisits = $totalVisits; - } - - public function getName() - { - return 'nb_visits_percentage'; - } - - public function getTranslatedName() - { - return Piwik::translate('General_ColumnPercentageVisits'); - } - - public function getDocumentation() - { - return Piwik::translate('General_ColumnPercentageVisitsDocumentation'); - } - - public function compute(Row $row) - { - $visits = $this->getMetric($row, 'nb_visits'); - - return Piwik::getQuotientSafe($visits, $this->cachedTotalVisits, $precision = 2); - } - - public function format($value, Formatter $formatter) - { - return $formatter->getPrettyPercentFromQuotient($value); - } - - public function getDependentMetrics() - { - return array('nb_visits'); - } - - public function beforeCompute($report, DataTable $table) - { - if ($this->forceTotalVisits === null) { - $this->cachedTotalVisits = array_sum($this->getMetricValues($table, 'nb_visits')); - } else { - $this->cachedTotalVisits = $this->forceTotalVisits; - } - - return true; // always compute - } - - public function getSemanticType(): ?string - { - return Dimension::TYPE_PERCENT; - } -} diff --git a/plugins/CoreHome/Columns/Profilable.php b/plugins/CoreHome/Columns/Profilable.php deleted file mode 100644 index a3f1958d3ee52237bb15686e4768a8caf58ee152..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/Profilable.php +++ /dev/null @@ -1,54 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return ['0', '1']; - }; - } - - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - $value = $request->getVisitorId(); - - if (empty($value)) { - return 0; - } - - return 1; - } - - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - if ($visitor->getVisitorColumn($this->columnName)) { - // once it is 1, we don't set it back to 0 if user disables cookies later cause user would be still idenfied - // for this same visit with the fingerprint - return 1; - } - - return $this->onNewVisit($request, $visitor, $action); - } -} diff --git a/plugins/CoreHome/Columns/ServerMinute.php b/plugins/CoreHome/Columns/ServerMinute.php deleted file mode 100644 index 892c3891e78077847e075c0f426baa7fd1f0fb82..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/ServerMinute.php +++ /dev/null @@ -1,35 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(59, $maxValuesToReturn)); - }; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/ServerTime.php b/plugins/CoreHome/Columns/ServerTime.php deleted file mode 100644 index 6c73d0d0177370e5162e5460fbea5b304e50dd28..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/ServerTime.php +++ /dev/null @@ -1,57 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(23, $maxValuesToReturn)); - }; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - $hourInTz = VisitLastActionTime::convertHourToHourInSiteTimezone($value, $idSite); - return \Piwik\Plugins\VisitTime\getTimeLabel($hourInTz); - } - - public function install() - { - $changes = parent::install(); - $changes['log_link_visit_action'][] = "ADD INDEX index_idsite_servertime ( idsite, server_time )"; - - return $changes; - } - - public function onNewAction(Request $request, Visitor $visitor, Action $action) - { - $timestamp = $request->getCurrentTimestamp(); - - return Date::getDatetimeFromTimestamp($timestamp); - } -} diff --git a/plugins/CoreHome/Columns/UserId.php b/plugins/CoreHome/Columns/UserId.php deleted file mode 100644 index 510ec8027ca7dea790b6a0be7ca4bc52197e9ab9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/UserId.php +++ /dev/null @@ -1,156 +0,0 @@ -columnType = 'VARCHAR(' . self::MAXLENGTH . ') NULL'; - - if (Plugin\Manager::getInstance()->isPluginActivated('UserId')) { - $this->suggestedValuesApi = 'UserId.getUsers'; - } - } - - public function configureSegments(SegmentsList $segmentsList, DimensionSegmentFactory $dimensionSegmentFactory) - { - // Configure userId segment only if visitor profile is available - if (Live::isVisitorProfileEnabled()) { - parent::configureSegments($segmentsList, $dimensionSegmentFactory); - } - } - - /** - * @param Action|null $action - * @return mixed|false - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - $value = $request->getForcedUserId(); - if (!empty($value)) { - return mb_substr($value, 0, self::MAXLENGTH); - } - return $value; - } - - /** - * @param Action|null $action - * - * @return mixed|false - */ - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - return $this->onNewVisit($request, $visitor, $action); - } - - public function isUsedInAtLeastOneSite($idSites, $period, $date) - { - if ($period === 'day' || $period === 'week') { - $period = 'month'; - } - - if ($period === 'range') { - $period = 'day'; - } - - if (!empty($idSites)) { - foreach ($idSites as $idSite) { - if ($this->isUsedInSiteCached($idSite, $period, $date)) { - return true; - } - } - } - - return false; - } - - private function isUsedInSiteCached($idSite, $period, $date) - { - $cache = Cache::getTransientCache(); - $key = sprintf('%d.%s.%s', $idSite, $period, $date); - - if (!$cache->contains($key)) { - $result = $this->isUsedInSite($idSite, $period, $date); - $cache->save($key, $result); - } - - return $cache->fetch($key); - } - - private function isUsedInSite($idSite, $period, $date) - { - $result = \Piwik\API\Request::processRequest('VisitsSummary.get', [ - 'columns' => 'nb_users', - 'idSite' => $idSite, - 'period' => $period, - 'date' => $date, - 'segment' => false, - ], $default = []); - - return $this->hasDataTableUsers($result); - } - - public function hasDataTableUsers(DataTable\DataTableInterface $result) - { - if ($result instanceof Map) { - foreach ($result->getDataTables() as $table) { - if ($this->hasDataTableUsers($table)) { - return true; - } - } - } - - if (!$result->getRowsCount()) { - return false; - } - - $firstRow = $result->getFirstRow(); - if ($firstRow instanceof DataTable\Row && $firstRow->hasColumn(Metrics::INDEX_NB_USERS)) { - $metric = Metrics::INDEX_NB_USERS; - } else { - $metric = 'nb_users'; - } - - $numUsers = $result->getColumn($metric); - $numUsers = array_sum($numUsers); - - return !empty($numUsers); - } -} diff --git a/plugins/CoreHome/Columns/VisitFirstActionMinute.php b/plugins/CoreHome/Columns/VisitFirstActionMinute.php deleted file mode 100644 index a3f7cd205bd66f1f708e51f18075497318a2f31c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitFirstActionMinute.php +++ /dev/null @@ -1,45 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(59, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics to be generated - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitFirstActionTime.php b/plugins/CoreHome/Columns/VisitFirstActionTime.php deleted file mode 100644 index d0eb65f2eb174b5da7f252a2609263696bec1c8a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitFirstActionTime.php +++ /dev/null @@ -1,53 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(23, $maxValuesToReturn)); - }; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - $hourInTz = VisitLastActionTime::convertHourToHourInSiteTimezone($value, $idSite); - return \Piwik\Plugins\VisitTime\getTimeLabel($hourInTz); - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - return Date::getDatetimeFromTimestamp($request->getCurrentTimestamp()); - } -} diff --git a/plugins/CoreHome/Columns/VisitGoalBuyer.php b/plugins/CoreHome/Columns/VisitGoalBuyer.php deleted file mode 100644 index b4fe3fe7f6d152016b6268a40602bb6e71561fb7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitGoalBuyer.php +++ /dev/null @@ -1,140 +0,0 @@ - 'none', - self::TYPE_BUYER_ORDERED => 'ordered', - self::TYPE_BUYER_OPEN_CART => 'abandonedCart', - self::TYPE_BUYER_ORDERED_AND_OPEN_CART => 'orderedThenAbandonedCart', - ); - - protected $columnName = 'visit_goal_buyer'; - protected $columnType = 'TINYINT(1) NULL'; - protected $segmentName = 'visitEcommerceStatus'; - protected $nameSingular = 'General_EcommerceVisitStatusDesc'; - protected $type = self::TYPE_ENUM; - - public function __construct() - { - $example = Piwik::translate('General_EcommerceVisitStatusEg', '"&segment=visitEcommerceStatus==ordered,visitEcommerceStatus==orderedThenAbandonedCart"'); - $this->acceptValues = implode(", ", self::$visitEcommerceStatus) . '. ' . $example; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - switch ($value) { - case 'none': - case '0': - case self::TYPE_BUYER_NONE: - return Piwik::translate('UserCountryMap_None'); - case 'ordered': - case '1': - case self::TYPE_BUYER_ORDERED: - return Piwik::translate('CoreHome_VisitStatusOrdered'); - case 'abandonedCart': - case self::TYPE_BUYER_OPEN_CART: - return Piwik::translate('Goals_AbandonedCart'); - case 'orderedThenAbandonedCart': - case self::TYPE_BUYER_ORDERED_AND_OPEN_CART: - return Piwik::translate('CoreHome_VisitStatusOrderedThenAbandoned'); - } - - return $value; - } - - public function getEnumColumnValues() - { - return self::$visitEcommerceStatus; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - return $this->getBuyerType($request); - } - - /** - * @param Action|null $action - * @return int|false - */ - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - $goalBuyer = $visitor->getVisitorColumn($this->columnName); - - // Ecommerce buyer status - $visitEcommerceStatus = $this->getBuyerType($request, $goalBuyer); - - if ( - $visitEcommerceStatus != self::TYPE_BUYER_NONE - // only update if the value has changed (prevents overwriting the value in case a request has - // updated it in the meantime) - && $visitEcommerceStatus != $goalBuyer - ) { - return $visitEcommerceStatus; - } - - return false; - } - - /** - * @ignore - */ - public static function getVisitEcommerceStatusFromId($id) - { - if (!isset(self::$visitEcommerceStatus[$id])) { - throw new \Exception("Unexpected ECommerce status value "); - } - - return self::$visitEcommerceStatus[$id]; - } - - private function getBuyerType(Request $request, $existingType = self::TYPE_BUYER_NONE) - { - $isRequestEcommerce = $request->getMetadata('Ecommerce', 'isRequestEcommerce'); - if (!$isRequestEcommerce) { - return $existingType; - } - - $isGoalAnOrder = $request->getMetadata('Ecommerce', 'isGoalAnOrder'); - if ($isGoalAnOrder) { - return self::TYPE_BUYER_ORDERED; - } - - // request is Add to Cart - if ( - $existingType == self::TYPE_BUYER_ORDERED - || $existingType == self::TYPE_BUYER_ORDERED_AND_OPEN_CART - ) { - return self::TYPE_BUYER_ORDERED_AND_OPEN_CART; - } - - return self::TYPE_BUYER_OPEN_CART; - } -} diff --git a/plugins/CoreHome/Columns/VisitGoalConverted.php b/plugins/CoreHome/Columns/VisitGoalConverted.php deleted file mode 100644 index 95484672f81254ec252587b819af879b26f500b1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitGoalConverted.php +++ /dev/null @@ -1,61 +0,0 @@ -createCustomMetric('nb_visits_converted', Piwik::translate('General_ColumnVisitsWithConversions'), 'sum(case %s when 1 then 1 else 0 end)'); - $metric1->setType(Dimension::TYPE_NUMBER); - $metricsList->addMetric($metric1); - - $metric = $dimensionMetricFactory->createComputedMetric($metric1->getName(), 'nb_visits', ComputedMetric::AGGREGATION_RATE); - $metric->setTranslatedName(Piwik::translate('General_ColumnConversionRate')); - $metric->setDocumentation(Piwik::translate('General_ColumnConversionRateDocumentation')); - $metric->setName('visits_conversion_rate'); - $metricsList->addMetric($metric); - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - return 0; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onConvertedVisit(Request $request, Visitor $visitor, $action) - { - return 1; - } -} diff --git a/plugins/CoreHome/Columns/VisitId.php b/plugins/CoreHome/Columns/VisitId.php deleted file mode 100644 index a79384d2fef807cfb3c5d351a2f377e53c0d0855..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitId.php +++ /dev/null @@ -1,51 +0,0 @@ -setName('General_VisitId'); - $segmentsList->addSegment($dimensionSegmentFactory->createSegment($segment)); - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_UNIQUE); - $metric->setTranslatedName(Piwik::translate('General_ColumnNbVisits')); - $metric->setDocumentation(Piwik::translate('General_ColumnNbVisitsDocumentation')); - $metric->setName('nb_visits'); - $metricsList->addMetric($metric); - } -} diff --git a/plugins/CoreHome/Columns/VisitIp.php b/plugins/CoreHome/Columns/VisitIp.php deleted file mode 100644 index 8fca51c2ce9230e3b2a8bf83cdd648a282b0533c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitIp.php +++ /dev/null @@ -1,53 +0,0 @@ -visitIp>13.54.122.0;visitIp<13.54.122.255']); - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - $value = Common::hex2bin($value); - $value = IPUtils::binaryToStringIP($value); - return $value; - } - - public function configureSegments(SegmentsList $segmentsList, DimensionSegmentFactory $dimensionSegmentFactory) - { - $segment = new Segment(); - $segment->setType(Segment::TYPE_METRIC); // we cannot remove this for now as it would assign dimension based on text type - $segmentsList->addSegment($dimensionSegmentFactory->createSegment($segment)); - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionDate.php b/plugins/CoreHome/Columns/VisitLastActionDate.php deleted file mode 100644 index ae948835f95c76e75824211c3baf3ed70163063b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionDate.php +++ /dev/null @@ -1,53 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - if (defined('PIWIK_TEST_MODE') && PIWIK_TEST_MODE) { - $date = Date::factory('2018-02-02'); - } else { - $date = Date::now(); - } - $return = array($date->toString()); - for ($i = 0; $i < $maxValuesToReturn; $i++) { - $date = $date->subDay(1); - $return[] = $date->toString(); - } - return $return; - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionDayOfMonth.php b/plugins/CoreHome/Columns/VisitLastActionDayOfMonth.php deleted file mode 100644 index ff54857b455824569033070ce7799e7e3168123a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionDayOfMonth.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(31, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionDayOfWeek.php b/plugins/CoreHome/Columns/VisitLastActionDayOfWeek.php deleted file mode 100644 index 1c98079145f00f09b8d59f95dd5a8db690a65281..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionDayOfWeek.php +++ /dev/null @@ -1,44 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(1, min(7, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return \Piwik\Plugins\VisitTime\translateDayOfWeek($value); - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionDayOfYear.php b/plugins/CoreHome/Columns/VisitLastActionDayOfYear.php deleted file mode 100644 index 26051033cbbd7acb7a6a7234581c7c50f850cec6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionDayOfYear.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(1, min(366, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionMinute.php b/plugins/CoreHome/Columns/VisitLastActionMinute.php deleted file mode 100644 index 96e510317f68db09a185eb0cf156e5580ca44659..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionMinute.php +++ /dev/null @@ -1,49 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(59, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionMonth.php b/plugins/CoreHome/Columns/VisitLastActionMonth.php deleted file mode 100644 index 3216deb8fa240b21c076813aab023bfe2d112f3c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionMonth.php +++ /dev/null @@ -1,44 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(1, min(12, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return \Piwik\Plugins\VisitTime\translateMonth($value); - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionQuarter.php b/plugins/CoreHome/Columns/VisitLastActionQuarter.php deleted file mode 100644 index 6bc0be0dd8fa7b38c72d5d3ce7d34d1edf3dcd07..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionQuarter.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(1, min(4, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionSecond.php b/plugins/CoreHome/Columns/VisitLastActionSecond.php deleted file mode 100644 index e241da64f87dcf0424c1d4d8a3c28c749ffdc3bb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionSecond.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(0, min(59, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionTime.php b/plugins/CoreHome/Columns/VisitLastActionTime.php deleted file mode 100644 index 57533c607d8f39af10f9acfa17e7bc845a21749f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionTime.php +++ /dev/null @@ -1,114 +0,0 @@ -getDateStart(); - } catch (\Exception $e) { - // ignore any error eg if values are wrong... - } - } - $timezone = Site::getTimezoneFor($idSite); - $datetime = $date->toString() . ' ' . $hour . ':00:00'; - $hourInTz = (int)Date::factory($datetime, $timezone)->toString('H'); - return $hourInTz; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - $hourInTz = self::convertHourToHourInSiteTimezone($value, $idSite); - - return \Piwik\Plugins\VisitTime\getTimeLabel($hourInTz); - } - - // we do not install or define column definition here as we need to create this column when installing as there is - // an index on it. Currently we do not define the index here... although we could overwrite the install() method - // and add column 'visit_last_action_time' and add index. Problem is there is also an index - // INDEX(idsite, config_id, visit_last_action_time) and we maybe not be sure whether idsite already exists at - // installing point (we do not know whether idsite column will be added first). - - /** - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - return Date::getDatetimeFromTimestamp($request->getCurrentTimestamp()); - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - if ($request->getParam('ping') == 1) { - return false; - } - - $originalVisitLastActionTime = $visitor->getPreviousVisitColumn('visit_last_action_time'); - - if ( - !empty($originalVisitLastActionTime) - && Date::factory($originalVisitLastActionTime)->getTimestamp() > $request->getCurrentTimestamp() - ) { - // make sure to not set visit_last_action_time to an earlier time eg if tracking requests aren't sent in order - return $originalVisitLastActionTime; - } - - return $this->onNewVisit($request, $visitor, $action); - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionWeekOfYear.php b/plugins/CoreHome/Columns/VisitLastActionWeekOfYear.php deleted file mode 100644 index 5b0d22c9f4efc6fcf3d92cf48e117247d7a62dfe..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionWeekOfYear.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(1, min(53, $maxValuesToReturn)); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitLastActionYear.php b/plugins/CoreHome/Columns/VisitLastActionYear.php deleted file mode 100644 index 48816bd8c4e3890c6823b089edff179c766934fd..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitLastActionYear.php +++ /dev/null @@ -1,42 +0,0 @@ -suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { - return range(2016, 2016 + $maxValuesToReturn); - }; - } - - public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory) - { - // no metrics for this dimension - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - return $value; - } -} diff --git a/plugins/CoreHome/Columns/VisitTotalTime.php b/plugins/CoreHome/Columns/VisitTotalTime.php deleted file mode 100644 index 7a013ee67ebf3818973236755c509258f1c45424..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitTotalTime.php +++ /dev/null @@ -1,89 +0,0 @@ -Tracker['default_time_one_page_visit']; - $totalTime = $this->cleanupVisitTotalTime($totalTime); - - return $totalTime; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - $firstActionTime = $visitor->getVisitorColumn('visit_first_action_time'); - - $totalTime = 1 + $request->getCurrentTimestamp() - $firstActionTime; - $totalTime = $this->cleanupVisitTotalTime($totalTime); - - return $totalTime; - } - - /** - * @param Action|null $action - * @return int|false - */ - public function onConvertedVisit(Request $request, Visitor $visitor, $action) - { - if (!$visitor->isVisitorKnown()) { - return false; - } - - $totalTime = $visitor->getVisitorColumn('visit_total_time'); - - // If a pageview and goal conversion in the same second, with previously a goal conversion recorded - // the request would not "update" the row since all values are the same as previous - // therefore the request below throws exception, instead we make sure the UPDATE will affect the row - $totalTime = $totalTime + $request->getParam('idgoal'); - // +2 to offset idgoal=-1 and idgoal=0 - $totalTime = $totalTime + 2; - - return $this->cleanupVisitTotalTime($totalTime); - } - - public function getRequiredVisitFields() - { - return array('visit_first_action_time'); - } - - private function cleanupVisitTotalTime($t) - { - $t = (int)$t; - - if ($t < 0) { - $t = 0; - } - - return $t; - } -} diff --git a/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php b/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php deleted file mode 100644 index 4842b0afb460e9f3c2a3f1384cb597c49da76d8f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php +++ /dev/null @@ -1,37 +0,0 @@ -setSegment('daysSinceFirstVisit'); - $segment->setName('General_DaysSinceFirstVisit'); - $segment->setCategory('General_Visitors'); - $segment->setSqlSegment('log_visit.visitor_seconds_since_first'); - $segment->setSqlFilterValue(function ($value) { - return (int)$value * 86400; - }); - $segmentsList->addSegment($dimensionSegmentFactory->createSegment($segment)); - } -} diff --git a/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php b/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php deleted file mode 100644 index 079cdd91613de51a25a6c42ee6f2a85d5a5c932c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php +++ /dev/null @@ -1,22 +0,0 @@ -createMetric(ArchivedMetric::AGGREGATION_UNIQUE); - $metric->setTranslatedName(Piwik::translate('General_VisitorFingerprint')); - $metricsList->addMetric($metric); - } -} diff --git a/plugins/CoreHome/Columns/VisitorId.php b/plugins/CoreHome/Columns/VisitorId.php deleted file mode 100644 index e0f96fe3254c555cc57afbd2f51c2ba25e3ee562..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorId.php +++ /dev/null @@ -1,65 +0,0 @@ -createMetric(ArchivedMetric::AGGREGATION_UNIQUE); - $metric->setTranslatedName(Piwik::translate('General_ColumnNbUniqVisitors')); - $metric->setName('nb_uniq_visitors'); - $metricsList->addMetric($metric); - } - - public function configureSegments(SegmentsList $segmentsList, DimensionSegmentFactory $dimensionSegmentFactory) - { - try { - $visitorProfileEnabled = Live::isVisitorProfileEnabled(); - } catch (\Zend_Db_Exception $e) { - // when running tests the db might not yet be set up when fetching available segments - if (!defined('PIWIK_TEST_MODE') || !PIWIK_TEST_MODE) { - throw $e; - } - $visitorProfileEnabled = true; - } - - if ($visitorProfileEnabled) { - parent::configureSegments($segmentsList, $dimensionSegmentFactory); - } - } -} diff --git a/plugins/CoreHome/Columns/VisitorReturning.php b/plugins/CoreHome/Columns/VisitorReturning.php deleted file mode 100644 index 9ce37affe14b8f1bfd6942bab6d18714a7826ef7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorReturning.php +++ /dev/null @@ -1,97 +0,0 @@ -acceptValues = 'new, returning, returningCustomer. '; - $this->acceptValues .= Piwik::translate('General_VisitTypeExample', '"&segment=visitorType==returning,visitorType==returningCustomer"'); - $this->sqlFilterValue = function ($type) { - if (is_numeric($type)) { - return $type; - } - return $type == "new" ? 0 : ($type == "returning" ? 1 : 2); - }; - } - - public function formatValue($value, $idSite, Formatter $formatter) - { - if ($value === 1 || $value === '1' || $value === 'returning') { - return Piwik::translate('CoreHome_VisitTypeReturning'); - } elseif ($value === 2 || $value === '2' || $value === 'returningCustomer') { - return Piwik::translate('CoreHome_VisitTypeReturningCustomer'); - } elseif ($value === 0 || $value === '0' || $value === 'new') { - return Piwik::translate('General_New'); - } - - return $value; - } - - public function getEnumColumnValues() - { - return array( - self::IS_RETURNING_CUSTOMER => 'returningCustomer', - self::IS_RETURNING => 'returning', - self::IS_NEW => 'new', - ); - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - $hasOrder = $visitor->getVisitorColumn('visitor_seconds_since_order') - ?: $visitor->getPreviousVisitColumn('visitor_seconds_since_order') - ?: $request->getParam('ec_id'); - $isReturningCustomer = (bool) $hasOrder; - - if ($isReturningCustomer) { - return self::IS_RETURNING_CUSTOMER; - } - - if ($visitor->isVisitorKnown()) { - return self::IS_RETURNING; - } - - return self::IS_NEW; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onAnyGoalConversion(Request $request, Visitor $visitor, $action) - { - return $visitor->getVisitorColumn($this->columnName); - } -} diff --git a/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php b/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php deleted file mode 100644 index 2c4f454514fdbfa48fbfa10b03a75bbaa837a818..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php +++ /dev/null @@ -1,84 +0,0 @@ -isVisitorKnown()) { - return 0; - } - - $prevSecondsSinceFirst = $visitor->getPreviousVisitColumn('visitor_seconds_since_first'); - - // no data for previous visit, we can't calculate for this one - if ( - $prevSecondsSinceFirst === null - || $prevSecondsSinceFirst === false - || $prevSecondsSinceFirst === '' - ) { - return null; - } - - $prevVisitStart = $visitor->getPreviousVisitColumn('visit_first_action_time'); - $currentVisitStart = $visitor->getVisitorColumn('visit_first_action_time'); - if ( - empty($prevVisitStart) - || empty($currentVisitStart) - ) { - Common::printDebug("Unexpected: found empty visit first action time for either previous or current visit (previous = $prevVisitStart, current = $currentVisitStart)"); - return null; - } - - try { - $timeBetweenVisitStarts = Date::factory($currentVisitStart)->getTimestamp() - Date::factory($prevVisitStart)->getTimestamp(); - } catch (\Exception $ex) { - Common::printDebug("Error in parsing current/previous visit start datetime values: " . $ex->getMessage()); - return null; - } - - $newVisitorSecondsSinceFirst = $prevSecondsSinceFirst + $timeBetweenVisitStarts; - - if ($newVisitorSecondsSinceFirst < 0) { // visit in the past - return null; - } - - return $newVisitorSecondsSinceFirst; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onAnyGoalConversion(Request $request, Visitor $visitor, $action) - { - return $visitor->getVisitorColumn($this->columnName); - } -} diff --git a/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php b/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php deleted file mode 100644 index c96444010ed166aef1e2ab1969a70d41b8efd482..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php +++ /dev/null @@ -1,76 +0,0 @@ -onExistingVisit($request, $visitor, $action); - } - - public function onExistingVisit(Request $request, Visitor $visitor, $action) - { - $idorder = $request->getParam('ec_id'); - $isOrder = !empty($idorder); - if ($isOrder) { - return 0; - } - - $existingValue = $visitor->getVisitorColumn($this->columnName); - if ($existingValue !== null && $existingValue !== false) { // already set - return $existingValue; - } - - $prevSecondsSinceLastOrder = $visitor->getPreviousVisitColumn($this->columnName); - if ($prevSecondsSinceLastOrder === null || $prevSecondsSinceLastOrder === false) { // no order at all for visitor - return null; - } - - $visitFirstActionTime = $visitor->getPreviousVisitColumn('visit_first_action_time'); - if ($visitFirstActionTime === null || $visitFirstActionTime === false) { // no previous visit - return null; - } - - $visitFirstActionTime = Date::factory($visitFirstActionTime)->getTimestamp(); - $secondsSinceLastAction = $request->getCurrentTimestamp() - $visitFirstActionTime; - - $secondsSinceLastOrder = $prevSecondsSinceLastOrder + $secondsSinceLastAction; - return $secondsSinceLastOrder; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onAnyGoalConversion(Request $request, Visitor $visitor, $action) - { - return $visitor->getVisitorColumn($this->columnName); - } -} diff --git a/plugins/CoreHome/Columns/VisitsCount.php b/plugins/CoreHome/Columns/VisitsCount.php deleted file mode 100644 index ea67871694e3e0fca72bef2b881a1de8fb7f6095..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Columns/VisitsCount.php +++ /dev/null @@ -1,54 +0,0 @@ -getPreviousVisitColumn($this->columnName); - if ($previousVisitCount === false || $previousVisitCount === null || $previousVisitCount === '') { - return 1; - } - $result = $previousVisitCount + 1; - return $result; - } - - /** - * @param Action|null $action - * @return mixed - */ - public function onAnyGoalConversion(Request $request, Visitor $visitor, $action) - { - return $visitor->getVisitorColumn($this->columnName); - } -} diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php deleted file mode 100644 index 7bea4fa96cb16014983ae2d810936b4345d6897d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Controller.php +++ /dev/null @@ -1,356 +0,0 @@ -translator = $translator; - - parent::__construct(); - - $this->featureFlagManager = new FeatureFlagManager( - [new ConfigFeatureFlagStorage(Config::getInstance())], - StaticContainer::get(LoggerInterface::class) - ); - } - - public function getDefaultAction() - { - return 'redirectToCoreHomeIndex'; - } - - public function renderReportWidget(Report $report) - { - Piwik::checkUserHasSomeViewAccess(); - $this->checkSitePermission(); - - $report->checkIsEnabled(); - - return $report->render(); - } - - /** - * Renders a widget container (used for dashboard/tab widget containers as well as - * widgetized/exported embeds). - * @return string - */ - public function renderWidgetContainer() - { - Piwik::checkUserHasSomeViewAccess(); - $this->checkSitePermission(); - - $view = new View('@CoreHome/widgetContainer'); - $view->isWidgetized = (bool) Common::getRequestVar('widget', 0, 'int'); - $view->containerId = Common::getRequestVar('containerId', null, 'string'); - - return $view->render(); - } - - /** - * @param Widget $widget - * @return mixed - * @throws Exception - */ - public function renderWidget($widget) - { - Piwik::checkUserHasSomeViewAccess(); - - $config = new WidgetConfig(); - $widget::configure($config); - - $content = $widget->render(); - - if ($config->getName() && Common::getRequestVar('showtitle', '', 'string') === '1') { - if ( - strpos($content, '') === false - && strpos($content, 'class="card"') === false - && strpos($content, "class='card'") === false - && strpos($content, 'class="card-content"') === false - && strpos($content, "class='card-content'") === false - ) { - $view = new View('@CoreHome/_singleWidget'); - $view->title = $config->getName(); - $view->content = $content; - return $view->render(); - } - } - - return $content; - } - - public function redirectToCoreHomeIndex() - { - $defaultReport = API::getInstance()->getUserPreference( - API::PREFERENCE_DEFAULT_REPORT, - Piwik::getCurrentUserLogin() - ); - $module = 'CoreHome'; - $action = 'index'; - - // User preference: default report to load is the All Websites dashboard - if ( - $defaultReport == 'MultiSites' - && \Piwik\Plugin\Manager::getInstance()->isPluginActivated('MultiSites') - ) { - $module = 'MultiSites'; - } - - if ($defaultReport == Piwik::getLoginPluginName()) { - $module = Piwik::getLoginPluginName(); - } - - parent::redirectToIndex($module, $action, $this->idSite); - } - - public function showInContext() - { - $controllerName = Common::getRequestVar('moduleToLoad'); - $actionName = Common::getRequestVar('actionToLoad', 'index'); - - if ($controllerName == 'API') { - throw new Exception("Showing API requests in context is not supported for security reasons. Please change query parameter 'moduleToLoad'."); - } - if ($actionName == 'showInContext') { - throw new Exception("Preventing infinite recursion..."); - } - - $view = $this->getDefaultIndexView(); - $view->content = FrontController::getInstance()->fetchDispatch($controllerName, $actionName); - return $view->render(); - } - - public function markNotificationAsRead() - { - Piwik::checkUserHasSomeViewAccess(); - $this->checkTokenInUrl(); - - $notificationId = Common::getRequestVar('notificationId'); - NotificationManager::cancel($notificationId); - - Json::sendHeaderJSON(); - return json_encode(true); - } - - protected function getDefaultIndexView() - { - if (SettingsPiwik::isInternetEnabled() && Marketplace::isMarketplaceEnabled()) { - $this->securityPolicy->addPolicy('img-src', '*.matomo.org'); - $this->securityPolicy->addPolicy('default-src', '*.matomo.org'); - } - - $view = new View('@CoreHome/getDefaultIndexView'); - $this->setGeneralVariablesView($view); - $view->showMenu = true; - $view->content = ''; - $view->exampleFeatureEnabled = $this->featureFlagManager->isFeatureActive(Example::class); - $view->groupsWithoutTrackingRequirement = CategoryList::get()->getGroupsWithoutTrackingRequirement(); - return $view; - } - - protected function setDateTodayIfWebsiteCreatedToday() - { - $date = Common::getRequestVar('date', false); - if ( - $date == 'today' - || Common::getRequestVar('period', false) == 'range' - ) { - return; - } - - if ($this->site) { - $datetimeCreationDate = $this->site->getCreationDate()->getDatetime(); - $creationDateLocalTimezone = Date::factory($datetimeCreationDate, $this->site->getTimezone())->toString('Y-m-d'); - $todayLocalTimezone = Date::factory('now', $this->site->getTimezone())->toString('Y-m-d'); - - if ($creationDateLocalTimezone == $todayLocalTimezone) { - Piwik::redirectToModule( - 'CoreHome', - 'index', - array('date' => 'today', - 'idSite' => $this->idSite, - 'period' => Common::getRequestVar('period')) - ); - } - } - } - - public function index() - { - $this->setDateTodayIfWebsiteCreatedToday(); - $view = $this->getDefaultIndexView(); - return $view->render(); - } - - // -------------------------------------------------------- - // ROW EVOLUTION - // The following methods render the popover that shows the - // evolution of a single or multiple rows in a data table - // -------------------------------------------------------- - - /** Render the entire row evolution popover for a single row */ - public function getRowEvolutionPopover() - { - $rowEvolution = $this->makeRowEvolution($isMulti = false); - $view = new View('@CoreHome/getRowEvolutionPopover'); - return $rowEvolution->renderPopover($this, $view); - } - - /** Render the entire row evolution popover for multiple rows */ - public function getMultiRowEvolutionPopover() - { - $rowEvolution = $this->makeRowEvolution($isMulti = true); - $view = new View('@CoreHome/getMultiRowEvolutionPopover'); - return $rowEvolution->renderPopover($this, $view); - } - - /** Generic method to get an evolution graph or a sparkline for the row evolution popover */ - public function getRowEvolutionGraph($fetch = false, $rowEvolution = null) - { - if (empty($rowEvolution)) { - $label = Common::getRequestVar('label', '', 'string'); - $isMultiRowEvolution = strpos($label, ',') !== false; - - $rowEvolution = $this->makeRowEvolution($isMultiRowEvolution, $graphType = 'graphEvolution'); - $rowEvolution->useAvailableMetrics(); - } - - $view = $rowEvolution->getRowEvolutionGraph(); - return $this->renderView($view); - } - - /** Utility function. Creates a RowEvolution instance. */ - private function makeRowEvolution($isMultiRowEvolution, $graphType = null) - { - if ($isMultiRowEvolution) { - return new MultiRowEvolution($this->idSite, $this->date, $graphType); - } else { - return new RowEvolution($this->idSite, $this->date, $graphType); - } - } - - /** - * Forces a check for updates and re-renders the header message. - * - * This will check piwik.org at most once per 10s. - */ - public function checkForUpdates() - { - Piwik::checkUserHasSomeAdminAccess(); - $this->checkTokenInUrl(); - - // perform check (but only once every 10s) - UpdateCheck::check($force = false, UpdateCheck::UI_CLICK_CHECK_INTERVAL); - - $view = new View('@CoreHome/checkForUpdates'); - $view->isManualUpdateCheck = true; - $view->lastUpdateCheckFailed = UpdateCheck::hasLastCheckFailed(); - $this->setGeneralVariablesView($view); - return $view->render(); - } - - /** - * Redirects the user to a paypal so they can donate to Piwik. - */ - public function redirectToPaypal() - { - $parameters = Request::getRequestArrayFromString($request = null); - foreach ($parameters as $name => $param) { - if ( - $name == 'idSite' - || $name == 'module' - || $name == 'action' - ) { - unset($parameters[$name]); - } - } - $paypalParameters = [ - "cmd" => "_s-xclick", - ]; - if (empty($parameters["onetime"]) || $parameters["onetime"] != "true") { - $paypalParameters["hosted_button_id"] = "DVKLY73RS7JTE"; - $paypalParameters["currency_code"] = "USD"; - $paypalParameters["on0"] = "Piwik Supporter"; - if (!empty($parameters["os0"])) { - $paypalParameters["os0"] = $parameters["os0"]; - } - } else { - $paypalParameters["hosted_button_id"] = "RPL23NJURMTFA"; - } - - $url = "https://www.paypal.com/cgi-bin/webscr?" . Url::getQueryStringFromParameters($paypalParameters); - - Url::redirectToUrl($url); - exit; - } - - public function saveViewDataTableParameters() - { - Piwik::checkUserIsNotAnonymous(); - $this->checkTokenInUrl(); - - $reportId = Common::getRequestVar('report_id', null, 'string'); - $parameters = (array) Common::getRequestVar('parameters', null, 'json'); - $login = Piwik::getCurrentUserLogin(); - $containerId = Common::getRequestVar('containerId', '', 'string'); - - ViewDataTableManager::saveViewDataTableParameters($login, $reportId, $parameters, $containerId); - } -} diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php deleted file mode 100644 index 4b26004014985ae1be6c8718f878757b67452c9b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/CoreHome.php +++ /dev/null @@ -1,498 +0,0 @@ - 'getStylesheetFiles', - 'AssetManager.getJavaScriptFiles' => 'getJsFiles', - 'AssetManager.filterMergedJavaScripts' => 'filterMergedJavaScripts', - 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys', - 'Metric.addComputedMetrics' => 'addComputedMetrics', - 'Request.initAuthenticationObject' => ['function' => 'checkAllowedIpsOnAuthentication', 'before' => true], - 'AssetManager.addStylesheets' => 'addStylesheets', - 'Request.dispatchCoreAndPluginUpdatesScreen' => ['function' => 'checkAllowedIpsOnAuthentication', 'before' => true], - 'Tracker.setTrackerCacheGeneral' => 'setTrackerCacheGeneral', - 'Segment.filterSegments' => 'filterSegments', - 'Template.bodyClass' => 'addBodyClass', - ); - } - - public function addBodyClass(&$out, $type) - { - $featureFlagManager = StaticContainer::get(FeatureFlagManager::class); - - // The report header redesign moves widget controls and report actions to a shared - // top-right header. It is gated app-wide by this flag so later tickets can scope - // CSS/JS with `body.report-header-redesign-enabled` across every report surface. - if ($featureFlagManager->isFeatureActive(ReportHeaderRedesign::class)) { - $out .= ' report-header-redesign-enabled'; - } - } - - public function isTrackerPlugin() - { - return true; - } - - public function setTrackerCacheGeneral(&$cacheGeneral) - { - /** @var ArchiveInvalidator $archiveInvalidator */ - $archiveInvalidator = StaticContainer::get(ArchiveInvalidator::class); - $cacheGeneral[ArchiveInvalidator::TRACKER_CACHE_KEY] = $archiveInvalidator->getAllRememberToInvalidateArchivedReportsLater(); - - $hasIndex = DbHelper::tableHasIndex(Common::prefixTable('log_visit'), 'index_idsite_idvisitor_time'); - $cacheGeneral[TrackerModel::CACHE_KEY_INDEX_IDSITE_IDVISITOR_TIME] = $hasIndex; - } - - public function addStylesheets(&$mergedContent) - { - $themeStyles = ThemeStyles::get(); - $mergedContent = $themeStyles->toLessCode() . "\n" . $mergedContent; - } - - public function checkAllowedIpsOnAuthentication() - { - if (SettingsServer::isTrackerApiRequest()) { - // authenticated tracking requests should always work - return; - } - - $isApi = Piwik::getModule() === 'API' && (Piwik::getAction() == '' || Piwik::getAction() == 'index'); - - if ($isApi) { - // will be checked in API itself to make sure we return an API response in the proper format. - return; - } - - $list = new LoginAllowlist(); - if ($list->shouldCheckAllowlist()) { - $ip = IP::getIpFromHeader(); - $list->checkIsAllowed($ip); - } - } - - public function addComputedMetrics(MetricsList $list, ComputedMetricFactory $computedMetricFactory) - { - $metrics = $list->getMetrics(); - foreach ($metrics as $metric) { - if ($metric instanceof ArchivedMetric && $metric->getDimension()) { - $metricName = $metric->getName(); - if ( - $metric->getDbTableName() === 'log_visit' - && $metricName !== 'nb_uniq_visitors' - && $metricName !== 'nb_visits' - && strpos($metricName, ArchivedMetric::AGGREGATION_SUM_PREFIX) === 0 - ) { - $metric = $computedMetricFactory->createComputedMetric($metric->getName(), 'nb_visits', ComputedMetric::AGGREGATION_AVG); - $list->addMetric($metric); - } - } - } - } - - public function filterMergedJavaScripts(&$mergedContent) - { - $mergedContent = preg_replace('/(sourceMappingURL=(.*?).map)/', '', $mergedContent); - } - - public function getStylesheetFiles(&$stylesheets) - { - $stylesheets[] = "node_modules/jquery-ui-dist/jquery-ui.min.css"; - $stylesheets[] = "node_modules/jquery-ui-dist/jquery-ui.theme.min.css"; - $stylesheets[] = "node_modules/@materializecss/materialize/dist/css/materialize.min.css"; - $stylesheets[] = "plugins/Morpheus/stylesheets/base/bootstrap.css"; - $stylesheets[] = "plugins/Morpheus/stylesheets/base/icons.css"; - $stylesheets[] = "plugins/Morpheus/stylesheets/base.less"; - $stylesheets[] = "plugins/Morpheus/stylesheets/main.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css"; - $stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/promo.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/color_manager.css"; - $stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/notification.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/zen-mode.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/layout.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/matomo-loader.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/Notification/Notification.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/QuickAccess/QuickAccess.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/SearchInput/SearchInput.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/selector.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/ReportingPage/ReportingPage.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/ReportExport/ReportExport.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/Progressbar/Progressbar.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/MultiPairField/MultiPairField.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/DraggableList/DraggableList.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/Sparkline/Sparkline.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/FieldArray/FieldArray.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/Comparisons/Comparisons.less"; - $stylesheets[] = "plugins/CoreHome/stylesheets/vue-transitions.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.less"; - $stylesheets[] = "plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.less"; - } - - public function getJsFiles(&$jsFiles) - { - $jsFiles[] = "node_modules/jquery/dist/jquery.min.js"; - $jsFiles[] = "node_modules/jquery-ui-dist/jquery-ui.min.js"; - $jsFiles[] = "node_modules/@materializecss/materialize/dist/js/materialize.min.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/materialize-bc.js"; - $jsFiles[] = "node_modules/jquery.scrollto/jquery.scrollTo.min.js"; - $jsFiles[] = "node_modules/sprintf-js/dist/sprintf.min.js"; - $jsFiles[] = "node_modules/mousetrap/mousetrap.min.js"; - - $jsFiles[] = "plugins/Morpheus/javascripts/piwikHelper.js"; - $jsFiles[] = "plugins/Morpheus/javascripts/layout.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/require.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/uiControl.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/dataTable.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/dataTable_rowactions.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/popover.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/broadcast.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/calendar.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/sparkline.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/corehome.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/top_controls.js"; - $jsFiles[] = "libs/jqplot/jqplot-custom.min.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/themes.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/color_manager.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/notification.js"; - $jsFiles[] = "plugins/CoreHome/javascripts/listingFormatter.js"; - - // we have to load these CorePluginsAdmin files here. If we loaded them in CorePluginsAdmin, - // there would be JS errors as CorePluginsAdmin is loaded first. Meaning it is loaded before - // any Vue UMD file is loaded etc. - $jsFiles[] = "node_modules/iframe-resizer/js/iframeResizer.min.js"; - $jsFiles[] = "node_modules/iframe-resizer/js/iframeResizer.contentWindow.min.js"; - } - - public function getClientSideTranslationKeys(&$translationKeys) - { - $translationKeys[] = 'General_Export'; - $translationKeys[] = 'General_InvalidDateRange'; - $translationKeys[] = 'General_Loading'; - $translationKeys[] = 'General_Show'; - $translationKeys[] = 'General_Remove'; - $translationKeys[] = 'General_Hide'; - $translationKeys[] = 'General_Save'; - $translationKeys[] = 'General_Website'; - $translationKeys[] = 'General_Pagination'; - $translationKeys[] = 'General_RowsToDisplay'; - $translationKeys[] = 'Intl_Year_Short'; - $translationKeys[] = 'General_MultiSitesSummary'; - $translationKeys[] = 'General_SearchNoResults'; - $translationKeys[] = 'CoreHome_ChooseX'; - $translationKeys[] = 'CoreHome_ClickToSeeFullInformation'; - $translationKeys[] = 'CoreHome_YouAreUsingTheLatestVersion'; - $translationKeys[] = 'CoreHome_IncludeRowsWithLowPopulation'; - $translationKeys[] = 'CoreHome_ExcludeRowsWithLowPopulation'; - $translationKeys[] = 'CoreHome_DataTableIncludeAggregateRows'; - $translationKeys[] = 'CoreHome_DataTableExcludeAggregateRows'; - $translationKeys[] = 'CoreHome_DataTableCombineDimensions'; - $translationKeys[] = 'CoreHome_DataTableShowDimensions'; - $translationKeys[] = 'CoreHome_Default'; - $translationKeys[] = 'CoreHome_FormatMetrics'; - $translationKeys[] = 'CoreHome_ShowExportUrl'; - $translationKeys[] = 'CoreHome_HideExportUrl'; - $translationKeys[] = 'CoreHome_FlattenDataTable'; - $translationKeys[] = 'CoreHome_UnFlattenDataTable'; - $translationKeys[] = 'CoreHome_ExternalHelp'; - $translationKeys[] = 'CoreHome_ClickToEditX'; - $translationKeys[] = 'CoreHome_Menu'; - $translationKeys[] = 'CoreHome_AddTotalsRowDataTable'; - $translationKeys[] = 'CoreHome_RemoveTotalsRowDataTable'; - $translationKeys[] = 'CoreHome_PeriodHasOnlyRawData'; - $translationKeys[] = 'CoreHome_PeriodHasOnlyRawDataNoVisitsLog'; - $translationKeys[] = 'SitesManager_NotFound'; - $translationKeys[] = 'Annotations_ViewAndAddAnnotations'; - $translationKeys[] = 'General_RowEvolutionRowActionTooltipTitle'; - $translationKeys[] = 'General_RowEvolutionRowActionTooltip'; - $translationKeys[] = 'Annotations_IconDesc'; - $translationKeys[] = 'Annotations_IconDescHideNotes'; - $translationKeys[] = 'Annotations_HideAnnotationsFor'; - $translationKeys[] = 'General_LoadingPopover'; - $translationKeys[] = 'General_LoadingPopoverFor'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_1'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_2'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_3'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_4'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_5'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_6'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_7'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_8'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_9'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_10'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_11'; - $translationKeys[] = 'Intl_Month_Short_StandAlone_12'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_1'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_2'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_3'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_4'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_5'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_6'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_7'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_8'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_9'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_10'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_11'; - $translationKeys[] = 'Intl_Month_Long_StandAlone_12'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_1'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_2'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_3'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_4'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_5'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_6'; - $translationKeys[] = 'Intl_Day_Short_StandAlone_7'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_1'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_2'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_3'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_4'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_5'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_6'; - $translationKeys[] = 'Intl_Day_Long_StandAlone_7'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_1'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_2'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_3'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_4'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_5'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_6'; - $translationKeys[] = 'Intl_Day_Min_StandAlone_7'; - $translationKeys[] = 'Intl_PeriodDay'; - $translationKeys[] = 'Intl_PeriodWeek'; - $translationKeys[] = 'Intl_PeriodMonth'; - $translationKeys[] = 'Intl_PeriodYear'; - $translationKeys[] = 'Intl_ListPatternAnd2'; - $translationKeys[] = 'Intl_ListPatternAndEnd'; - $translationKeys[] = 'Intl_ListPatternAndMiddle'; - $translationKeys[] = 'Intl_ListPatternAndStart'; - $translationKeys[] = 'Intl_ListPatternOr2'; - $translationKeys[] = 'Intl_ListPatternOrEnd'; - $translationKeys[] = 'Intl_ListPatternOrMiddle'; - $translationKeys[] = 'Intl_ListPatternOrStart'; - $translationKeys[] = 'General_DateRangeInPeriodList'; - $translationKeys[] = 'General_And'; - $translationKeys[] = 'General_All'; - $translationKeys[] = 'General_Search'; - $translationKeys[] = 'General_Clear'; - $translationKeys[] = 'General_MoreDetails'; - $translationKeys[] = 'General_Help'; - $translationKeys[] = 'General_MoreDetails'; - $translationKeys[] = 'General_HelpReport'; - $translationKeys[] = 'General_Id'; - $translationKeys[] = 'General_Name'; - $translationKeys[] = 'General_JsTrackingTag'; - $translationKeys[] = 'General_Yes'; - $translationKeys[] = 'General_No'; - $translationKeys[] = 'General_Edit'; - $translationKeys[] = 'General_Delete'; - $translationKeys[] = 'General_Default'; - $translationKeys[] = 'General_LoadingData'; - $translationKeys[] = 'General_Error'; - $translationKeys[] = 'General_ErrorRequest'; - $translationKeys[] = 'General_ErrorRateLimit'; - $translationKeys[] = 'General_ErrorRequestFaqLink'; - $translationKeys[] = 'General_Warning'; - $translationKeys[] = 'General_YourChangesHaveBeenSaved'; - $translationKeys[] = 'General_LearnMore'; - $translationKeys[] = 'General_ChooseDate'; - $translationKeys[] = 'General_ReadThisToLearnMore'; - $translationKeys[] = 'CoreHome_UndoPivotBySubtable'; - $translationKeys[] = 'CoreHome_PivotBySubtable'; - $translationKeys[] = 'General_LearnMore'; - $translationKeys[] = 'CoreHome_NoSuchPage'; - $translationKeys[] = 'CoreHome_QuickAccessTitle'; - $translationKeys[] = 'CoreHome_Segments'; - $translationKeys[] = 'CoreHome_MenuEntries'; - $translationKeys[] = 'SitesManager_Sites'; - $translationKeys[] = 'CoreHome_MainNavigation'; - $translationKeys[] = 'CoreHome_ChangeCurrentWebsite'; - $translationKeys[] = 'General_CreatedByUser'; - $translationKeys[] = 'General_DateRangeFromTo'; - $translationKeys[] = 'General_DateRangeFrom'; - $translationKeys[] = 'General_DateRangeTo'; - $translationKeys[] = 'General_DoubleClickToChangePeriod'; - $translationKeys[] = 'General_Apply'; - $translationKeys[] = 'General_ChoosePeriod'; - $translationKeys[] = 'General_Period'; - $translationKeys[] = 'General_CompareTo'; - $translationKeys[] = 'CoreHome_PresetDateToday'; - $translationKeys[] = 'CoreHome_PresetDateYesterday'; - $translationKeys[] = 'CoreHome_PresetDateLast7Days'; - $translationKeys[] = 'CoreHome_PresetDateLast30Days'; - $translationKeys[] = 'CoreHome_PresetDateLast90Days'; - $translationKeys[] = 'CoreHome_PresetDateLastWeekMonSun'; - $translationKeys[] = 'CoreHome_PresetDateLastMonth'; - $translationKeys[] = 'CoreHome_PresetDateLastQuarter'; - $translationKeys[] = 'CoreHome_PresetDateLastYear'; - $translationKeys[] = 'CoreHome_PresetDateThisWeekMonToday'; - $translationKeys[] = 'CoreHome_PresetDateThisMonth'; - $translationKeys[] = 'CoreHome_PresetDateThisQuarter'; - $translationKeys[] = 'CoreHome_PresetDateThisYear'; - $translationKeys[] = 'CoreHome_DateInvalid'; - $translationKeys[] = 'CoreHome_EnterZenMode'; - $translationKeys[] = 'CoreHome_ExitZenMode'; - $translationKeys[] = 'CoreHome_ShortcutZenMode'; - $translationKeys[] = 'CoreHome_ShortcutSegmentSelector'; - $translationKeys[] = 'CoreHome_ShortcutWebsiteSelector'; - $translationKeys[] = 'CoreHome_ShortcutCalendar'; - $translationKeys[] = 'CoreHome_ShortcutSearch'; - $translationKeys[] = 'CoreHome_ShortcutHelp'; - $translationKeys[] = 'CoreHome_ShortcutRefresh'; - $translationKeys[] = 'CoreHome_StandardReport'; - $translationKeys[] = 'CoreHome_ReportWithMetadata'; - $translationKeys[] = 'CoreHome_ReportType'; - $translationKeys[] = 'CoreHome_RowLimit'; - $translationKeys[] = 'CoreHome_ExportFormat'; - $translationKeys[] = 'CoreHome_ExportTooltip'; - $translationKeys[] = 'CoreHome_ExportTooltipWithLink'; - $translationKeys[] = 'CoreHome_FlattenReport'; - $translationKeys[] = 'CoreHome_IncludeDimensionsSeparately'; - $translationKeys[] = 'CoreHome_CustomLimit'; - $translationKeys[] = 'CoreHome_ExpandSubtables'; - $translationKeys[] = 'CoreHome_HomeShortcut'; - $translationKeys[] = 'CoreHome_PageUpShortcutDescription'; - $translationKeys[] = 'CoreHome_EndShortcut'; - $translationKeys[] = 'CoreHome_PageDownShortcutDescription'; - $translationKeys[] = 'CoreHome_MacPageUp'; - $translationKeys[] = 'CoreHome_MacPageDown'; - $translationKeys[] = 'CoreHome_SearchOnMatomo'; - $translationKeys[] = 'General_ComputedMetricMax'; - $translationKeys[] = 'General_XComparedToY'; - $translationKeys[] = 'General_ComparisonCardTooltip1'; - $translationKeys[] = 'General_ComparisonCardTooltip2'; - $translationKeys[] = 'General_Comparisons'; - $translationKeys[] = 'General_ClickToRemoveComp'; - $translationKeys[] = 'General_Custom'; - $translationKeys[] = 'General_PreviousPeriod'; - $translationKeys[] = 'General_PreviousYear'; - $translationKeys[] = 'CoreHome_ReportingCategoryHelpPrefix'; - $translationKeys[] = 'CoreHome_TechDeprecationWarning'; - $translationKeys[] = 'CoreHome_StartDate'; - $translationKeys[] = 'CoreHome_EndDate'; - $translationKeys[] = 'CoreHome_InvalidComparisonDateRange'; - $translationKeys[] = 'CoreHome_DataForThisReportHasBeenDisabled'; - $translationKeys[] = 'CoreHome_ChangeVisualization'; - $translationKeys[] = 'CoreHome_ReportConfigure'; - $translationKeys[] = 'General_ExportThisReport'; - $translationKeys[] = 'Annotations_Annotations'; - $translationKeys[] = 'CoreHome_CloseSearch'; - $translationKeys[] = 'CoreHome_DataTableHowToSearch'; - $translationKeys[] = 'CoreHome_ChangePeriod'; - $translationKeys[] = 'General_NewUpdatePiwikX'; - $translationKeys[] = 'CoreHome_SeeAvailableVersions'; - $translationKeys[] = 'CoreHome_OneClickUpdateNotPossibleAsMultiServerEnvironment'; - $translationKeys[] = 'General_PiwikXIsAvailablePleaseUpdateNow'; - $translationKeys[] = 'General_PiwikXIsAvailablePleaseNotifyPiwikAdmin'; - $translationKeys[] = 'General_YouAreCurrentlyUsing'; - $translationKeys[] = 'General_Copy'; - $translationKeys[] = 'General_CopiedToClipboard'; - $translationKeys[] = 'CoreHome_ReportLowercase'; - $translationKeys[] = 'CoreHome_LearnMoreFullStop'; - $translationKeys[] = 'CoreHome_ChooseWebsite'; - $translationKeys[] = 'CoreHome_CopyModalNote'; - $translationKeys[] = 'CoreHome_CopyX'; - $translationKeys[] = 'CoreHome_CopyXDescription'; - $translationKeys[] = 'CoreHome_WebAnalyticsReports'; - - // add admin menu translations - if ( - SettingsPiwik::isMatomoInstalled() - && Common::getRequestVar('module', '') != 'CoreUpdater' - && Piwik::isUserHasSomeViewAccess() - ) { - /* - * Executed as super user to ensure we are able to add translations for all menu entries that might be displayed. - */ - Access::doAsSuperUser(function () use (&$translationKeys) { - $menu = MenuAdmin::getInstance()->getMenu(); - foreach ($menu as $level1 => $level2) { - if (strpos($level1, '_') !== false) { - $translationKeys[] = $level1; - } - foreach ($level2 as $name => $params) { - if (strpos($name, '_') !== false) { - $translationKeys[] = $name; - } - } - } - }); - } - } - - public function filterSegments(SegmentsList &$list, array $idSites) - { - $limitSegmentsSettingEnabled = false; - if (empty($idSites)) { - $limitSegmentsSettingEnabled = LimitSegments::getInstance()->getValue(); - } else { - foreach ($idSites as $idsite) { - $limitSegmentsSettingEnabled |= LimitSegments::getInstance($idsite)->getValue(); - } - } - if ($limitSegmentsSettingEnabled) { - $list->remove('General_Visitors', 'userId'); - $list->remove('General_Visitors', 'visitIp'); - $list->remove('General_Visitors', 'visitId'); - $list->remove('General_Visitors', 'visitorId'); - $list->remove('General_Visitors', 'fingerprint'); - $list->remove('Referrers_Referrers', 'campaignId'); - $list->remove('General_Actions', 'actionServerHour'); - $list->remove('General_Actions', 'actionServerMinute'); - $list->remove('General_Visitors', 'visitServerHour'); - $list->remove('General_Visitors', 'visitEndServerMinute'); - $list->remove('General_Visitors', 'visitEndServerSecond'); - $list->remove('General_Visitors', 'visitStartServerHour'); - $list->remove('General_Visitors', 'visitStartServerMinute'); - } - } -} diff --git a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php deleted file mode 100644 index 6bad435e99b6917d9d9f6c44c3364d3ae7c80b85..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php +++ /dev/null @@ -1,109 +0,0 @@ -date from controller) - * @param string $graphType - */ - public function __construct($idSite, $date, $graphType = 'graphEvolution') - { - $this->metric = Common::sanitizeInputValue(Request::fromRequest()->getStringParameter('column', '')); - parent::__construct($idSite, $date, $graphType); - } - - protected function loadEvolutionReport($column = false) - { - // set the "column" parameter for the API.getRowEvolution call - parent::loadEvolutionReport($this->metric); - } - - protected function extractEvolutionReport($report) - { - $this->metric = $report['column']; - $this->dataTable = $report['reportData']; - $this->availableMetrics = $report['metadata']['metrics']; - $this->metricsForSelect = $report['metadata']['columns']; - $this->dimension = $report['metadata']['dimension']; - } - - /** - * Render the popover - * @param \Piwik\Plugins\CoreHome\Controller $controller - * @param \Piwik\View $view the popover_rowevolution template - * @return string - */ - public function renderPopover($controller, $view) - { - // add data for metric select box - $view->availableMetrics = $this->metricsForSelect; - $view->selectedMetric = $this->metric; - - $view->availableRecordsText = $this->dimension . ': ' - . Piwik::translate('RowEvolution_ComparingRecords', array(count($this->availableMetrics))); - - return parent::renderPopover($controller, $view); - } - - protected function getRowEvolutionGraphFromController(\Piwik\Plugins\CoreHome\Controller $controller) - { - // the row evolution graphs should not compare serieses - return Context::executeWithQueryParameters(['compareSegments' => [], 'comparePeriods' => [], 'compareDates' => []], function () use ($controller) { - return parent::getRowEvolutionGraphFromController($controller); - }); - } - - public function getRowEvolutionGraph($graphType = false, $metrics = false) - { - // the row evolution graphs should not compare serieses - return Context::executeWithQueryParameters(['compareSegments' => [], 'comparePeriods' => [], 'compareDates' => []], function () use ($graphType, $metrics) { - return parent::getRowEvolutionGraph($graphType, $metrics); - }); - } - - protected function getSparkline($metric) - { - // the row evolution graphs should not compare serieses - return Context::executeWithQueryParameters(['compareSegments' => [], 'comparePeriods' => [], 'compareDates' => []], function () use ($metric) { - return parent::getSparkline($metric); - }); - } -} diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php deleted file mode 100644 index 42ded45fe24a2fb0c9d7bceccec1a8675c300cff..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ /dev/null @@ -1,524 +0,0 @@ - - */ - protected $availableMetrics; - - /** - * The name of the dimension of the current report - * @var string - */ - protected $dimension; - - /** - * The data - * @var Map - */ - protected $dataTable; - - /** - * The label of the current record - * @var string - */ - protected $rowLabel; - - /** - * The icon of the current record - * @var string|false - */ - protected $rowIcon; - - /** - * The type of graph that has been requested last - * @var string - */ - protected $graphType; - - /** - * The metrics for the graph that has been requested last - * @var array - */ - protected $graphMetrics; - - /** - * Whether or not to show all metrics in the evolution graph when to popover opens - * @var bool - */ - protected $initiallyShowAllMetrics = false; - - /** - * The constructor - * Initialize some local variables from the request - * @param int $idSite - * @param Date $date ($this->date from controller) - * @param string $graphType - * @throws Exception - */ - public function __construct($idSite, $date, $graphType = 'graphEvolution') - { - $this->apiMethod = Common::getRequestVar('apiMethod', '', 'string'); - if (empty($this->apiMethod)) { - throw new Exception("Parameter apiMethod not set."); - } - - $label = DataTablePostProcessor::getLabelFromRequest($_GET); - if (!is_array($label)) { - throw new Exception("Expected label to be an array, got instead: " . $label); - } - $this->label = Common::unsanitizeInputValue($label[0]); - - if ($this->label === '') { - throw new Exception("Parameter label not set."); - } - - $this->period = Common::getRequestVar('period', '', 'string'); - PeriodFactory::checkPeriodIsEnabled($this->period); - - if ($this->period != 'range' && !($date instanceof Date)) { - throw new Exception("Expected date to be an instance of \\Piwik\\Date"); - } - - $this->idSite = $idSite; - $this->graphType = $graphType; - - if ($this->period != 'range') { - // handle day, week, month and year: display last X periods - //handle cache if exist - $cache = ViewDataTableManager::getViewDataTableParameters( - Piwik::getCurrentUserLogin(), - 'CoreHome.getRowEvolutionGraph' - ); - $lastDay = (isset($cache['evolution_' . $this->period . '_last_n']) ? $cache['evolution_' . $this->period . '_last_n'] : null); - $end = $date->toString(); - [$this->date, $lastN] = EvolutionViz::getDateRangeAndLastN($this->period, $end, $lastDay); - } - $this->segment = \Piwik\API\Request::getRawSegmentFromRequest(); - - $this->loadEvolutionReport(); - } - - /** - * Render the popover - * @param \Piwik\Plugins\CoreHome\Controller $controller - * @param \Piwik\View $view the popover_rowevolution template - * @return string - */ - public function renderPopover($controller, $view) - { - // render main evolution graph - $this->graphType = 'graphEvolution'; - $this->graphMetrics = $this->availableMetrics; - $view->graph = $this->getRowEvolutionGraphFromController($controller); - - // render metrics overview - $view->metrics = $this->getMetricsToggles(); - - // available metrics text - $metricsText = Piwik::translate('RowEvolution_AvailableMetrics'); - $popoverTitle = ''; - if ($this->rowLabel) { - $icon = $this->rowIcon ? '' : ''; - $rowLabel = str_replace('/', '/', str_replace('&', '&', $this->rowLabel)); - $metricsText = sprintf(Piwik::translate('RowEvolution_MetricsFor'), $this->dimension . ': ' . $icon . ' ' . $rowLabel); - $popoverTitle = $icon . ' ' . $this->rowLabel; - } - - $view->availableMetricsText = $metricsText; - $view->popoverTitle = $popoverTitle; - - return $view->render(); - } - - /** - * @param string|false|null $column - * @return void - */ - protected function loadEvolutionReport($column = false) - { - [$apiModule, $apiAction] = explode('.', $this->apiMethod); - - // getQueryStringFromParameters expects sanitised query parameter values - $parameters = array( - 'method' => 'API.getRowEvolution', - 'label' => $this->label, - 'apiModule' => $apiModule, - 'apiAction' => $apiAction, - 'idSite' => $this->idSite, - 'period' => $this->period, - 'date' => $this->date, - 'format' => 'original', - 'serialize' => '0', - ); - - if (!empty($this->segment)) { - $parameters['segment'] = $this->segment; - } - - if ($column !== false) { - $parameters['column'] = $column; - } - - $unmodifiedSeriesLabels = []; - $isComparing = DataComparisonFilter::isCompareParamsPresent(); - if ($isComparing) { - $compareDates = Common::getRequestVar('compareDates', [], 'array'); - $comparePeriods = Common::getRequestVar('comparePeriods', [], 'array'); - $compareSegments = Common::getRequestVar('compareSegments', [], 'array'); - - $totalSeriesCount = (count($compareSegments) + 1) * (count($comparePeriods) + 1); - - for ($i = 0; $i < $totalSeriesCount; ++$i) { - $unmodifiedSeriesLabels[] = DataComparisonFilter::getPrettyComparisonLabelFromSeriesIndex($i); - } - - $parameters['compare'] = 1; - - foreach ($comparePeriods as $index => $period) { - $date = $compareDates[$index]; - - if ($period == 'range') { - $comparePeriods[$index] = 'day'; - } else { - [$newDate, $lastN] = EvolutionViz::getDateRangeAndLastN($period, $date); - $compareDates[$index] = $newDate; - } - } - - $parameters['compareDates'] = $compareDates; - $parameters['comparePeriods'] = $comparePeriods; - } - - $parameters = array_filter($parameters, function ($value) { - return $value !== null && $value !== false; - }); - - /** @var array{label: string, reportData: Map, metadata: array{metrics: array, dimension: string, columns: array}} $report */ - $report = Request::processRequest('API.getRowEvolution', $parameters); - - // at this point the report data will reference the comparison series labels for the changed compare periods/dates. We don't - // want to show this to users because they will not recognize the changed periods, so we have to replace them. - if ($isComparing) { - $dataTables = $report['reportData']->getDataTables(); - $modifiedSeriesLabels = reset($dataTables)->getMetadata('comparisonSeries'); - $seriesMap = array_combine($modifiedSeriesLabels, $unmodifiedSeriesLabels); - - foreach ($report['metadata']['metrics'] as $key => $metricInfo) { - foreach ($seriesMap as $modified => $unmodified) { - $report['metadata']['metrics'][$key]['name'] = str_replace($modified, $unmodified, $report['metadata']['metrics'][$key]['name']); - } - } - } - - $this->extractEvolutionReport($report); - } - - /** - * @param array $report - * @return void - */ - protected function extractEvolutionReport($report) - { - $this->dataTable = $report['reportData']; - $this->rowLabel = $this->extractPrettyLabel($report); - $this->rowIcon = !empty($report['logo']) ? $report['logo'] : false; - $this->availableMetrics = $report['metadata']['metrics']; - $this->dimension = $report['metadata']['dimension']; - } - - /** - * Generic method to get an evolution graph or a sparkline for the row evolution popover. - * Do as much as possible from outside the controller. - * @param string|bool $graphType - * @param array|bool $metrics - * @return ViewDataTable - */ - public function getRowEvolutionGraph($graphType = false, $metrics = false) - { - // set up the view data table - $view = Factory::build( - $graphType ? : $this->graphType, - $this->apiMethod, - $controllerAction = 'CoreHome.getRowEvolutionGraph', - $forceDefault = true - ); - $view->setDataTable($this->dataTable); - - if (!empty($this->graphMetrics)) { // In row Evolution popover, this is empty - $view->config->columns_to_display = array_keys($metrics ? : $this->graphMetrics); - } - - $view->requestConfig->request_parameters_to_modify['label'] = ''; - $view->config->export_parameters_to_modify['label'] = $this->label; - $view->config->show_flatten_table_export = false; - $view->config->show_goals = false; - $view->config->show_search = false; - $view->config->show_all_views_icons = false; - $view->config->show_related_reports = false; - $view->config->show_footer_message = false; - - foreach ($this->availableMetrics as $metric => $metadata) { - $view->config->translations[$metric] = $metadata['name']; - } - - if ($view->config instanceof GraphConfig) { - $view->config->show_series_picker = false; - } - - if ($view->config instanceof JqplotGraphConfig) { - $view->config->external_series_toggle = 'RowEvolutionSeriesToggle'; - $view->config->external_series_toggle_show_all = $this->initiallyShowAllMetrics; - } - - return $view; - } - - /** - * Prepare metrics toggles with spark lines - * @return array - */ - protected function getMetricsToggles() - { - $i = 0; - $metrics = array(); - foreach ($this->availableMetrics as $metric => $metricData) { - $unit = Metrics::getUnit($metric, $this->idSite); - $change = isset($metricData['change']) ? $metricData['change'] : false; - - [$first, $last] = $this->getFirstAndLastDataPointsForMetric($metric); - $fractionDigits = max($this->getFractionDigits($first), $this->getFractionDigits($last)); - - $details = Piwik::translate('RowEvolution_MetricBetweenText', array( - NumberFormatter::getInstance()->format($first, $fractionDigits) . $unit, - NumberFormatter::getInstance()->format($last, $fractionDigits) . $unit, - )); - - if ($change !== false) { - $lowerIsBetter = Metrics::isLowerValueBetter($metric); - if (substr($change, 0, 1) == '+') { - $changeClass = $lowerIsBetter ? 'bad' : 'good'; - $changeImage = $lowerIsBetter ? 'arrow_up_red' : 'arrow_up'; - } elseif (substr($change, 0, 1) == '-') { - $changeClass = $lowerIsBetter ? 'good' : 'bad'; - $changeImage = $lowerIsBetter ? 'arrow_down_green' : 'arrow_down'; - } else { - $changeClass = 'neutral'; - $changeImage = false; - } - - $change = '' - . ($changeImage ? ' ' : '') - . $change . ''; - - $details .= ', ' . Piwik::translate('RowEvolution_MetricChangeText', $change); - } - - // set metric min/max text (used as tooltip for details) - $max = isset($metricData['max']) ? $metricData['max'] : 0; - $min = isset($metricData['min']) ? $metricData['min'] : 0; - $minmax = Piwik::translate('RowEvolution_MetricMinMax', array( - $metricData['name'], - NumberFormatter::getInstance()->formatNumber($min, $fractionDigits, $fractionDigits) . $unit, - NumberFormatter::getInstance()->formatNumber($max, $fractionDigits, $fractionDigits) . $unit, - )); - - $newMetric = array( - 'label' => $metricData['name'], - 'details' => $details, - 'minmax' => $minmax, - 'sparkline' => $this->getSparkline($metric), - ); - // Multi Rows, each metric can be for a particular row and display an icon - if (!empty($metricData['logo'])) { - $newMetric['logo'] = $metricData['logo']; - } - - // TODO: this check should be determined by metric metadata, not hardcoded here - if ( - $metric == 'nb_users' - && $first == 0 - && $last == 0 - ) { - $newMetric['hide'] = true; - } - - $metrics[] = $newMetric; - $i++; - } - - return $metrics; - } - - /** - * Get the img tag for a sparkline showing a single metric - * - * @param string $metric - * @return string - */ - protected function getSparkline($metric) - { - // sparkline is always echoed, so we need to buffer the output - $view = $this->getRowEvolutionGraph($graphType = 'sparkline', $metrics = array($metric => $metric)); - - ob_start(); - $view->render(); - $spark = ob_get_contents(); - ob_end_clean(); - - // undo header change by sparkline renderer - Common::sendHeader('Content-type: text/html'); - - // base64 encode the image and put it in an img tag - $spark = base64_encode($spark); - return ''; - } - - /** - * Use the available metrics for the metrics of the last requested graph. - * @return void - */ - public function useAvailableMetrics() - { - $this->graphMetrics = $this->availableMetrics; - } - - /** - * @param string|int $metric - * @return array - */ - private function getFirstAndLastDataPointsForMetric($metric) - { - $first = 0; - $firstTable = $this->dataTable->getFirstRow(); - if (!empty($firstTable)) { - $row = $firstTable->getFirstRow(); - if (!empty($row)) { - $first = floatval($row->getColumn($metric)); - } - } - - $last = 0; - $lastTable = $this->dataTable->getLastRow(); - if (!empty($lastTable)) { - $row = $lastTable->getFirstRow(); - if (!empty($row)) { - $last = floatval($row->getColumn($metric)); - } - } - - return array($first, $last); - } - - /** - * @param array $report - * @return string - */ - protected function extractPrettyLabel($report) - { - // By default, use the specified label - $rowLabel = Common::sanitizeInputValue($report['label']); - - /** @var \Piwik\DataTable\Map $dataTableMap */ - $dataTableMap = $report['reportData']; - - // If the dataTable specifies a label_html, use this instead - if ($dataTableMap instanceof DataTableInterface) { - $labelPretty = $dataTableMap->getColumn('label_html'); - $labelPretty = array_filter($labelPretty, 'strlen'); - $labelPretty = current($labelPretty); - if (!empty($labelPretty)) { - return $labelPretty; - } - } - return $rowLabel; - } - - /** - * @param string|int|float $value - */ - private function getFractionDigits($value): int - { - $value = (string) $value; - $fraction = substr(strrchr($value, ".") ?: '', 1); - return strlen($fraction); - } - - /** - * @return string|null - */ - protected function getRowEvolutionGraphFromController(\Piwik\Plugins\CoreHome\Controller $controller) - { - return $controller->getRowEvolutionGraph($fetch = true, $rowEvolution = $this); - } -} diff --git a/plugins/CoreHome/EntityDuplicator/DuplicateRequestResponse.php b/plugins/CoreHome/EntityDuplicator/DuplicateRequestResponse.php deleted file mode 100644 index 1b39c411e8314d53d19475a0298d03f9fd13672d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/EntityDuplicator/DuplicateRequestResponse.php +++ /dev/null @@ -1,185 +0,0 @@ -initialState = $this->getCurrentState(); - } - - public function isSuccess(): bool - { - return $this->success ?? false; - } - - public function setSuccess(bool $success): void - { - $this->success = $success; - } - - public function getMessage(): string - { - return $this->message ?? ''; - } - - public function setMessage(string $message): void - { - $this->message = $message; - } - - /** - * @return array - */ - public function getAdditionalData(): array - { - return $this->additionalData ?? []; - } - - /** - * @param array $additionalData - */ - public function setAdditionalData(array $additionalData): void - { - $this->additionalData = $additionalData; - } - - public function hasResponseBeenModified(): bool - { - return $this->initialState !== $this->getCurrentState(); - } - - /** - * Checks which property values have changed from the initial state and only includes them in the JSON string. - * - * @return string JSON of the response object - * @throws \Exception If none of the properties have been set - */ - public function getJsonResponse(): string - { - return json_encode($this->getResponseArray()); - } - - /** - * Checks which property values have changed from the initial state and only includes them in the array. - * - * @return array response object properties - * @throws \Exception If none of the properties have been set - */ - public function getResponseArray(): array - { - $responseArray = []; - $currentState = $this->getCurrentState(); - foreach ($this->initialState as $propertyName => $value) { - if ($currentState[$propertyName] !== $value) { - $responseArray[$propertyName] = $currentState[$propertyName]; - } - } - - if (count($responseArray) === 0) { - throw new \Exception('No duplicate request response properties were set.'); - } - - // If the flag is set to post the event and the request was successful, post the event for the duplication - if ($this->success && $this->eventDataToPost !== null) { - Piwik::postEvent('EntityDuplicator.DuplicationSuccessful', $this->eventDataToPost); - } - - return $responseArray; - } - - /** - * @return array - */ - private function getCurrentState(): array - { - // Get an array of all the property values - $state = get_object_vars($this); - // Exclude the state property and eventDataToPost - unset($state['initialState']); - unset($state['eventDataToPost']); - - return $state; - } - - /** - * Set the arguments to be used while posting the event when the response array is built. This is used by plugins - * which use this class while generating the response to a duplication request. - * - * @param string $entityTypeTranslation Translation key for the name of the type of entity. E.g. Goals_Goal, - * Heatmaps_Heatmap, etc. - * @param string $entityName The name of the entity being copied. E.g. 'Goal that does thing' or'Home page heatmap'. - * @param int|null $idEntity The ID of the entity being copied. E.g. 2 or 900. It's optional since some entities - * might only have a string identifier which should be provided as the entityName. - * @param int|null $idSite ID of the source site. It's optional in case the entity being copied is not site scoped, - * like a system-wide configuration. - * @param array|null $idDestinationSites IDs of the destination sites. This is optional for the same reason as - * idSite but also since it doesn't need to be provided if the only destination site is the source site (idSite). - * @param array|null $additionalData Optional array of additional data relating to the entity being copied. - */ - public function setRequestDataForEvent( - string $entityTypeTranslation, - string $entityName, - ?int $idEntity = null, - ?int $idSite = null, - ?array $idDestinationSites = null, - ?array $additionalData = null - ): void { - $this->eventDataToPost = [ - $entityTypeTranslation, - $entityName, - $idEntity, - $idSite, - $idDestinationSites, - $additionalData, - ]; - } -} diff --git a/plugins/CoreHome/EntityDuplicator/EntityDuplicatorHelper.php b/plugins/CoreHome/EntityDuplicator/EntityDuplicatorHelper.php deleted file mode 100644 index 9e805a04a85c553184a5cfd6de11d399d85b52c4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/EntityDuplicator/EntityDuplicatorHelper.php +++ /dev/null @@ -1,93 +0,0 @@ - $maxLength) { - $modifiedName = substr($modifiedName, 0, ($maxLength - 3) - strlen((string) $number)); - } - - $modifiedName .= " ($number)"; - - return $modifiedName; - } - - /** - * Takes a list of existing names and updates the provided name with a numerical suffix until it's unique. It also - * truncates the name to make sure that it doesn't exceed the maximum length. - * - * @param string $name The name that needs to be updated with a number suffix. If no suffix exists, one will be - * added. If one already exists, the number in the suffix will be incremented. - * @param string[] $names List of existing names to compare against in order to provide a unique name. - * @param int $maxLength Optional number indicates the maximum allowed length. If adding the suffix exceeds the max, - * the string will be truncated just enough to allow the suffix. Default is -1 allowing infinite length. - * @return string - * @throws \Exception If the maximum length is too small". - */ - public static function getUniqueNameComparedToList(string $name, array $names, int $maxLength = -1) - { - // Make sure that the name is at least one character long - if ($maxLength !== -1 && $maxLength < 1) { - throw new \Exception('The maximum name length cannot be less than 1 character.'); - } - - $newName = $name; - // Make sure that the string is no more than the max length - if ($maxLength !== -1 && strlen($newName) > $maxLength) { - $newName = substr($newName, 0, $maxLength); - } - - // Logically, the name should at most need to be adjusted once per listed name. - for ($i = 0; $i < count($names); $i++) { - if (!in_array($newName, $names)) { - break; - } - $newName = self::incrementNameWithNumericalSuffix($newName, $maxLength); - } - - return $newName; - } -} diff --git a/plugins/CoreHome/FeatureFlags/ReportHeaderRedesign.php b/plugins/CoreHome/FeatureFlags/ReportHeaderRedesign.php deleted file mode 100644 index b46cb1ea0b76edbefdd701d8788b1630329a5713..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/FeatureFlags/ReportHeaderRedesign.php +++ /dev/null @@ -1,22 +0,0 @@ -getGeneralConfig(); - return !empty($general['login_allowlist_apply_to_reporting_api_requests']) || !empty($general['login_whitelist_apply_to_reporting_api_requests']); - } - - public function shouldCheckAllowlist() - { - if (Common::isPhpCliMode()) { - return false; - } - - // ignore whitelist checks for opt out iframe or opt out JS - if ( - !SettingsServer::isTrackerApiRequest() - && (('CoreAdminHome' === Piwik::getModule() && ('optOut' === Piwik::getAction() || 'optOutJS' === Piwik::getAction()))) - ) { - return false; - } - - $ips = $this->getAllowlistedLoginIps(); - return !empty($ips); - } - - public function checkIsAllowed($ipString) - { - if (!$this->isIpAllowed($ipString)) { - throw new NoAccessException(Piwik::translate('CoreHome_ExceptionNotAllowlistedIP', $ipString)); - } - } - - public function isIpAllowed($userIpString) - { - $userIp = NetworkIp::fromStringIP($userIpString); - $ipsAllowed = $this->getAllowlistedLoginIps(); - - if (empty($ipsAllowed)) { - return false; - } - - return $userIp->isInRanges($ipsAllowed); - } - - /** - * @return array - */ - protected function getAllowlistedLoginIps() - { - $ips = StaticContainer::get('login.allowlist.ips'); - - if (!empty($ips) && is_array($ips)) { - $ips = array_map(function ($ip) { - return trim($ip); - }, $ips); - $ips = array_filter($ips, function ($ip) { - return !empty($ip); - }); - return array_unique(array_values($ips)); - } - - return array(); - } - - private function getGeneralConfig() - { - $config = Config::getInstance(); - $general = $config->General; - return $general; - } -} diff --git a/plugins/CoreHome/Menu.php b/plugins/CoreHome/Menu.php deleted file mode 100644 index 73a8d4efad35b3d99d397c4579fd77bf9fedcd92..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Menu.php +++ /dev/null @@ -1,126 +0,0 @@ -configureReportingGroupMenuItems($menu); - - $module = $this->getLoginModule(); - if (Piwik::isUserIsAnonymous()) { - $menu->registerMenuIcon('Login_LogIn', 'icon-sign-in'); - $menu->addItem('Login_LogIn', null, array('module' => $module, 'action' => false), 1000, Piwik::translate('Login_LogIn')); - } else { - $menu->registerMenuIcon('General_Logout', 'icon-sign-out'); - $menu->addItem('General_Logout', null, array('module' => $module, 'action' => 'logout', 'idSite' => null), 1000, Piwik::translate('General_Logout')); - } - } - - /** - * Adds a top menu entry for each non-default reporting menu group (e.g. "AI Insights"). Each entry - * leads into the regular reporting single-page-app, which filters the reporting menu to the active - * group. This keeps every reporting section within the same SPA (no full page reloads when navigating - * within a section) and lets categories opt into sections via Category::setGroups() instead of any - * plugin scraping another plugin's reports. - * - * The reporting SPA reads the section from the hash, filters the menu to it and selects its first - * page. The `data-reporting-group` attribute lets the active top-menu highlight be kept in sync - * client-side (the server cannot read the hash). - */ - private function configureReportingGroupMenuItems(MenuTop $menu): void - { - $idSite = $this->getMenuIdSite(); - if (null === $idSite) { - return; - } - - foreach ($this->getReportingMenuGroups() as $group => $order) { - $params = $this->urlForModuleActionWithDefaultUserParams('CoreHome', 'index', ['idSite' => $idSite]); - if (empty($params)) { - continue; - } - - $url = $this->urlForReportingSection($params, $group); - - $menu->addItem($group, null, $url, $order, false, false, false, 'data-reporting-group="' . $group . '"'); - } - } - - /** - * Resolves the site id to use for the reporting group menu entries. Mirrors the Analytics top-menu - * entry: the entry stays visible (linking to the user's default site) even on pages without an idSite - * in the URL, such as the All Websites page or admin pages. - */ - private function getMenuIdSite(): ?int - { - $userPreferences = new UserPreferences(); - $idSite = (int) $userPreferences->getDefaultWebsiteId(); - $idSite = Request::fromRequest()->getIntegerParameter('idSite', $idSite); - - if (!$idSite || !Piwik::isUserHasViewAccess($idSite)) { - return null; - } - - return $idSite; - } - - /** - * Returns the reporting menu groups (excluding the default Analytics group) that have at least one - * category with reporting pages, mapped to the order of the resulting top-menu entry. Sections are - * ordered by their lowest category order and placed right after the Analytics entry. - * - * @return array map of group id => top-menu order - */ - private function getReportingMenuGroups(): array - { - $categoryOrderByGroup = []; - - foreach (CategoryList::get()->getCategories() as $category) { - if (!$category->hasSubCategories()) { - continue; - } - - foreach ($category->getGroups() as $group) { - if (Category::DEFAULT_GROUP === $group) { - continue; - } - - $order = (int) $category->getOrder(); - if (!isset($categoryOrderByGroup[$group]) || $order < $categoryOrderByGroup[$group]) { - $categoryOrderByGroup[$group] = $order; - } - } - } - - asort($categoryOrderByGroup); - - $groups = []; - $order = 2; // right after the Analytics entry (order 1) - foreach (array_keys($categoryOrderByGroup) as $group) { - $groups[$group] = $order++; - } - - return $groups; - } - - private function getLoginModule() - { - return Piwik::getLoginPluginName(); - } -} diff --git a/plugins/CoreHome/Segment.php b/plugins/CoreHome/Segment.php deleted file mode 100644 index 02aa7aa758bbd8ba4fdaec64049af4c9121a23cb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Segment.php +++ /dev/null @@ -1,21 +0,0 @@ -setCategory('General_Visit'); - } -} diff --git a/plugins/CoreHome/SystemSummary/Item.php b/plugins/CoreHome/SystemSummary/Item.php deleted file mode 100644 index 34cfcdbcb354e28c1ba46106856cd91406569719..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/SystemSummary/Item.php +++ /dev/null @@ -1,94 +0,0 @@ -key = $key; - $this->label = $label; - $this->value = $value; - $this->urlParams = $urlParams; - $this->icon = $icon; - $this->order = $order; - } - - /** - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * @return array|null - */ - public function getUrlParams() - { - return $this->urlParams; - } - - /** - * @return string - */ - public function getIcon() - { - return $this->icon; - } - - /** - * @return int - */ - public function getOrder() - { - return $this->order; - } -} diff --git a/plugins/CoreHome/Tracker/LogTable/Action.php b/plugins/CoreHome/Tracker/LogTable/Action.php deleted file mode 100644 index 5571be61487d78795b78b52fece132481a0ac76b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Tracker/LogTable/Action.php +++ /dev/null @@ -1,40 +0,0 @@ -eventDispatcher = $eventDispatcher; - $this->visitorRecognizer = $visitorRecognizer; - $this->userSettings = $userSettings; - $this->visitStandardLength = $visitStandardLength; - $this->trackerAlwaysNewVisitor = $trackerAlwaysNewVisitor; - } - - public function processRequestParams(VisitProperties $visitProperties, Request $request) - { - // the IP is needed by isExcluded() and GoalManager->recordGoals() - $visitProperties->setProperty('location_ip', $request->getIp()); - - $excluded = new VisitExcluded($request); - $isExcluded = $excluded->isExcluded(); - $request->setMetadata('CoreHome', 'isVisitExcluded', $isExcluded); - - if ($isExcluded) { - return true; - } - - $privacyConfig = new PrivacyManagerConfig($request->getIdSiteIfExists()); - - if ($privacyConfig->randomizeConfigId) { - // always new visit when randomising config id - $request->setMetadata('CoreHome', 'visitorId', $this->userSettings->getRandomConfigId()); - $request->setMetadata('CoreHome', 'isVisitorKnown', false); - $request->setMetadata('CoreHome', 'isNewVisit', true); - $request->setMetadata('CoreHome', 'lastKnownVisit', false); - - return false; - } - - $ip = $request->getIpString(); - if ($privacyConfig->useAnonymizedIpForVisitEnrichment) { - $ip = $visitProperties->getProperty('location_ip'); - } - - // visitor recognition - $visitorId = $this->userSettings->getConfigId($request, $ip); - $request->setMetadata('CoreHome', 'visitorId', $visitorId); - - $isKnown = $this->visitorRecognizer->findKnownVisitor($visitorId, $visitProperties, $request); - $request->setMetadata('CoreHome', 'isVisitorKnown', $isKnown); - - $isNewVisit = $this->isVisitNew($visitProperties, $request, $this->visitorRecognizer->getLastKnownVisit()); - $request->setMetadata('CoreHome', 'isNewVisit', $isNewVisit); - - $request->setMetadata('CoreHome', 'lastKnownVisit', $this->visitorRecognizer->getLastKnownVisit()); - - if (!$isNewVisit) { // only copy over known visitor's information, if this is for an ongoing visit - $this->visitorRecognizer->updateVisitPropertiesFromLastVisitRow($visitProperties); - } - - return false; - } - - public function afterRequestProcessed(VisitProperties $visitProperties, Request $request) - { - $ip = $visitProperties->getProperty('location_ip'); - - /** - * Triggered after visits are tested for exclusion so plugins can modify the IP address - * persisted with a visit. - * - * This event is primarily used by the **PrivacyManager** plugin to anonymize IP addresses. - * - * @param string &$ip The visitor's IP address. - * @param int $idSite The site ID we're tracking the visit for. - */ - $this->eventDispatcher->postEvent('Tracker.setVisitorIp', [&$ip, (int) $request->getIdSiteIfExists()]); - - $visitProperties->setProperty('location_ip', $ip); - - return false; - } - - /** - * Determines if the current action should be treated as the start of a new visit or - * an action in an existing visit. - * - * Note: public only for tests. - * - * @param VisitProperties $visitProperties The current visit/visitor information. - * @return bool - */ - public function isVisitNew(VisitProperties $visitProperties, Request $request, $lastKnownVisit) - { - $isKnown = $request->getMetadata('CoreHome', 'isVisitorKnown'); - if (!$isKnown) { - return true; - } - - $isNewVisitForced = $request->getParam('new_visit'); - $isNewVisitForced = !empty($isNewVisitForced); - if ($isNewVisitForced) { - Common::printDebug("-> New visit forced: &new_visit=1 in request"); - return true; - } - - if ($this->trackerAlwaysNewVisitor) { - Common::printDebug("-> New visit forced: Debug.tracker_always_new_visitor = 1 in config.ini.php"); - return true; - } - - $isLastActionInTheSameVisit = $this->isLastActionInTheSameVisit($visitProperties, $request, $lastKnownVisit); - if (!$isLastActionInTheSameVisit) { - Common::printDebug("Visitor detected, but last action was more than 30 minutes ago..."); - - return true; - } - - $wasLastActionYesterday = $this->wasLastActionNotToday($visitProperties, $request, $lastKnownVisit); - $forceNewVisitAtMidnight = TrackerConfig::getBoolConfigValue('create_new_visit_after_midnight', false, $request->getIdSiteIfExists()); - - if ($wasLastActionYesterday && $forceNewVisitAtMidnight) { - Common::printDebug("Visitor detected, but last action was yesterday..."); - - return true; - } - - if (!$this->lastUserIdWasSetAndDoesMatch($visitProperties, $request)) { - Common::printDebug("Visitor detected, but last user_id does not match..."); - return true; - } - - return false; - } - - /** - * Returns true if the last action was done within the standard visit length. - * @return bool - */ - protected function isLastActionInTheSameVisit(VisitProperties $visitProperties, Request $request, $lastKnownVisit) - { - $lastActionTime = $this->getLastKnownActionTime($visitProperties, $lastKnownVisit); - - return isset($lastActionTime) - && false !== $lastActionTime - && ($lastActionTime > ($request->getCurrentTimestamp() - $this->visitStandardLength)); - } - - /** - * Returns true if the last action was not today. - * @return bool - */ - private function wasLastActionNotToday(VisitProperties $visitProperties, Request $request, $lastKnownVisit) - { - $lastActionTime = $this->getLastKnownActionTime($visitProperties, $lastKnownVisit); - - if (empty($lastActionTime)) { - return false; - } - - $idSite = $request->getIdSite(); - $timezone = $this->getTimezoneForSite($idSite); - - if (empty($timezone)) { - throw new UnexpectedWebsiteFoundException('An unexpected website was found, check idSite in the request'); - } - - $date = Date::factory((int)$lastActionTime, $timezone); - $now = $request->getCurrentTimestamp(); - $now = Date::factory((int)$now, $timezone); - - return $date->toString() !== $now->toString(); - } - - private function getTimezoneForSite($idSite) // TODO: duplicate function in Visit - { - try { - $site = Cache::getCacheWebsiteAttributes($idSite); - } catch (UnexpectedWebsiteFoundException $e) { - return null; - } - - if (!empty($site['timezone'])) { - return $site['timezone']; - } - - return null; - } - - /** - * Returns the last action time for the last recorded visit of this visitor, or if the visitor is new, - * the current request's timestamp. - * - * @param $lastKnownVisit - * @return false|int|mixed - */ - private function getLastKnownActionTime(VisitProperties $visitProperties, $lastKnownVisit) - { - if (isset($lastKnownVisit['visit_last_action_time'])) { - return strtotime($lastKnownVisit['visit_last_action_time']); - } - - return $visitProperties->getProperty('visit_last_action_time'); - } - - /** - * Returns true if the last user_id did not change. - * @return bool - */ - protected function lastUserIdWasSetAndDoesMatch(VisitProperties $visitProperties, Request $request) - { - $lastUserId = $visitProperties->getProperty('user_id'); - - if (empty($lastUserId)) { - return true; - } - - $currentUserId = $request->getForcedUserId(); - - if (empty($currentUserId)) { - return true; - } - - return $lastUserId === $currentUserId; - } -} diff --git a/plugins/CoreHome/VisitorDetails.php b/plugins/CoreHome/VisitorDetails.php deleted file mode 100644 index 03a4c9524bf7ec0e162992682b86264b02a13081..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/VisitorDetails.php +++ /dev/null @@ -1,134 +0,0 @@ -getUserId(); - $visitor['visitorType'] = $this->getVisitorReturning(); - $visitor['visitorTypeIcon'] = $this->getVisitorReturningIcon(); - $visitor['visitConverted'] = $this->isVisitorGoalConverted(); - $visitor['visitConvertedIcon'] = $this->getVisitorGoalConvertedIcon(); - $visitor['visitCount'] = $this->getVisitCount(); - $visitor['visitEcommerceStatus'] = $this->getVisitEcommerceStatus(); - $visitor['visitEcommerceStatusIcon'] = $this->getVisitEcommerceStatusIcon(); - $visitor['daysSinceFirstVisit'] = $this->getDaysSinceFirstVisit(); - $visitor['secondsSinceFirstVisit'] = $this->getSecondsSinceFirstVisit(); - $visitor['daysSinceLastEcommerceOrder'] = $this->getDaysSinceLastEcommerceOrder(); - $visitor['secondsSinceLastEcommerceOrder'] = $this->getSecondsSinceLastEcommerceOrder(); - $visitor['visitDuration'] = $this->getVisitLength(); - $visitor['visitDurationPretty'] = $this->getVisitLengthPretty(); - } - - protected function getVisitEcommerceStatusIcon() - { - $status = $this->getVisitEcommerceStatus(); - - if (in_array($status, array('ordered', 'orderedThenAbandonedCart'))) { - return "plugins/Morpheus/images/ecommerceOrder.svg"; - } elseif ($status == 'abandonedCart') { - return "plugins/Morpheus/images/ecommerceAbandonedCart.svg"; - } - // Note: it is important that there is no icon when there was no ecommerce conversion - return null; - } - - protected function getVisitEcommerceStatus() - { - return VisitGoalBuyer::getVisitEcommerceStatusFromId($this->details['visit_goal_buyer']); - } - - protected function isVisitorGoalConverted() - { - return $this->details['visit_goal_converted']; - } - - protected function getVisitorGoalConvertedIcon() - { - return $this->isVisitorGoalConverted() - ? "plugins/Morpheus/images/goal.svg" - : null; - } - - protected function getDaysSinceFirstVisit() - { - return floor($this->details['visitor_seconds_since_first'] / 86400); - } - - protected function getSecondsSinceFirstVisit() - { - return $this->details['visitor_seconds_since_first']; - } - - protected function getDaysSinceLastEcommerceOrder() - { - return floor($this->details['visitor_seconds_since_order'] / 86400); - } - - protected function getSecondsSinceLastEcommerceOrder() - { - return $this->details['visitor_seconds_since_order']; - } - - protected function getVisitorReturning() - { - $type = $this->details['visitor_returning']; - return $type == 2 - ? 'returningCustomer' - : ($type == 1 - ? 'returning' - : 'new'); - } - - protected function getVisitorReturningIcon() - { - $type = $this->getVisitorReturning(); - if ( - $type == 'returning' - || $type == 'returningCustomer' - ) { - return "plugins/Live/images/returningVisitor.png"; - } - return null; - } - - protected function getVisitCount() - { - return $this->details['visitor_count_visits']; - } - - protected function getVisitLength() - { - return $this->details['visit_total_time']; - } - - protected function getVisitLengthPretty() - { - $formatter = new Formatter(); - return $formatter->getPrettyTimeFromSeconds($this->details['visit_total_time'], true); - } - - protected function getUserId() - { - if ( - isset($this->details['user_id']) - && strlen($this->details['user_id']) > 0 - ) { - return $this->details['user_id']; - } - return null; - } -} diff --git a/plugins/CoreHome/Widgets/GetDonateForm.php b/plugins/CoreHome/Widgets/GetDonateForm.php deleted file mode 100644 index bf0f0be1e5cc7a002d1107a2adc77b02b0aee54c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Widgets/GetDonateForm.php +++ /dev/null @@ -1,51 +0,0 @@ -translator = $translator; - } - - public static function configure(WidgetConfig $config) - { - $config->setCategoryId('About Matomo'); - $config->setName('CoreHome_SupportPiwik'); - $config->setOrder(5); - } - - public function render() - { - $footerMessage = null; - if ( - Common::getRequestVar('widget', false) - && Piwik::hasUserSuperUserAccess() - ) { - $footerMessage = $this->translator->translate('CoreHome_OnlyForSuperUserAccess'); - } - - return $this->renderTemplate('getDonateForm', array( - 'footerMessage' => $footerMessage, - )); - } -} diff --git a/plugins/CoreHome/Widgets/GetPromoVideo.php b/plugins/CoreHome/Widgets/GetPromoVideo.php deleted file mode 100644 index 0054ec70b0e913aa2ab49dff79ec098ff2e88b49..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Widgets/GetPromoVideo.php +++ /dev/null @@ -1,46 +0,0 @@ -translator = $translator; - } - - public static function configure(WidgetConfig $config) - { - $config->setCategoryId('About Matomo'); - $config->setName('Installation_Welcome'); - $config->setOrder(10); - } - - public function render() - { - $view = new View('@CoreHome/getPromoVideo'); - $view->shareText = $this->translator->translate('CoreHome_SharePiwikShort'); - $view->shareTextLong = $this->translator->translate('CoreHome_SharePiwikLong'); - $view->promoVideoUrl = Url::addCampaignParametersToMatomoLink('https://matomo.org/docs/videos/'); - - return $view->render(); - } -} diff --git a/plugins/CoreHome/Widgets/GetSystemSummary.php b/plugins/CoreHome/Widgets/GetSystemSummary.php deleted file mode 100644 index a8b0e68b94a8e7712a8bb428bf03fe4d37d279eb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Widgets/GetSystemSummary.php +++ /dev/null @@ -1,130 +0,0 @@ -storedSegmentService = $storedSegmentService; - $this->pluginManager = $pluginManager; - } - - public static function configure(WidgetConfig $config) - { - $config->setCategoryId('About Matomo'); - $config->setName('CoreHome_SystemSummaryWidget'); - $config->setOrder(15); - $config->setIsEnabled(Piwik::hasUserSuperUserAccess()); - } - - public function render() - { - $mysqlVersion = $this->getMySqlVersion(); - $phpVersion = $this->getPHPVersion(); - - $systemSummary = array(); - - /** - * Triggered to add system summary items that are shown in the System Summary widget. - * - * **Example** - * - * public function addSystemSummaryItem(&$systemSummary) - * { - * $numUsers = 5; - * $systemSummary[] = new SystemSummary\Item($key = 'users', Piwik::translate('General_NUsers', $numUsers), $value = null, array('module' => 'UsersManager', 'action' => 'index'), $icon = 'icon-user'); - * } - * - * @param Item[] &$systemSummary An array containing system summary items. - */ - Piwik::postEvent('System.addSystemSummaryItems', array(&$systemSummary)); - - $systemSummary[] = new Item($key = 'piwik-version', Piwik::translate('CoreHome_SystemSummaryPiwikVersion'), Version::VERSION, $url = null, $icon = '', $order = 21); - $systemSummary[] = new Item($key = 'mysql-version', Piwik::translate('CoreHome_SystemSummaryMysqlVersion'), $mysqlVersion, $url = null, $icon = '', $order = 22); - $systemSummary[] = new Item($key = 'php-version', Piwik::translate('CoreHome_SystemSummaryPhpVersion'), $phpVersion, $url = null, $icon = '', $order = 23); - - $systemSummary = array_filter($systemSummary); - usort($systemSummary, function ($itemA, $itemB) { - if ($itemA->getOrder() == $itemB->getOrder()) { - return 0; - } - if ($itemA->getOrder() > $itemB->getOrder()) { - return 1; - } - return -1; - }); - - /** - * Triggered to filter system summary items that are shown in the System Summary widget. A plugin might also - * sort the system summary items differently. - * - * **Example** - * - * public function filterSystemSummaryItems(&$systemSummary) - * { - * foreach ($systemSummaryItems as $index => $item) { - * if ($item && $item->getKey() === 'users') { - * $systemSummaryItems[$index] = null; - * } - * } - * } - * - * @param Item[] &$systemSummary An array containing system summary items. - */ - Piwik::postEvent('System.filterSystemSummaryItems', array(&$systemSummary)); - - $systemSummary = array_filter($systemSummary); - - return $this->renderTemplate('getSystemSummary', array( - 'items' => $systemSummary, - )); - } - - private function getMySqlVersion() - { - if (defined('PIWIK_TEST_MODE')) { - return self::TEST_MYSQL_VERSION; - } - - $db = Db::get(); - return $db->getServerVersion(); - } - - private function getPHPVersion() - { - if (defined('PIWIK_TEST_MODE')) { - return self::TEST_PHP_VERSION; - } - - return phpversion(); - } -} diff --git a/plugins/CoreHome/Widgets/QuickLinks.php b/plugins/CoreHome/Widgets/QuickLinks.php deleted file mode 100644 index 7f49a34a7e4885e92145ce725565ce51a15e54cf..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/Widgets/QuickLinks.php +++ /dev/null @@ -1,31 +0,0 @@ -setCategoryId('About Matomo'); - $config->setName('CoreHome_QuickLinks'); - $config->setOrder(16); - $config->setIsEnabled(Piwik::hasUserSuperUserAccess()); - } - - public function render() - { - $hasUsersAdmin = UsersManager::isUsersAdminEnabled(); - $hasSitesAdmin = SitesManager::isSitesAdminEnabled(); - - return $this->renderTemplate('quickLinks', array( - 'hasUsersAdmin' => $hasUsersAdmin, - 'hasSitesAdmin' => $hasSitesAdmin, - )); - } -} diff --git a/plugins/CoreHome/config/config.php b/plugins/CoreHome/config/config.php deleted file mode 100644 index 432c4eadd42c5720afcfb7814c18a463b7ecab80..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/config/config.php +++ /dev/null @@ -1,9 +0,0 @@ - Piwik\DI::autowire() - ->constructorParameter('visitStandardLength', Piwik\DI::get('ini.Tracker.visit_standard_length')) - ->constructorParameter('trackerAlwaysNewVisitor', Piwik\DI::get('ini.Debug.tracker_always_new_visitor')), - -); diff --git a/plugins/CoreHome/config/test.php b/plugins/CoreHome/config/test.php deleted file mode 100644 index d799ac36653e0c46f2475ce402eb60accf23e8b6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/config/test.php +++ /dev/null @@ -1,38 +0,0 @@ - Piwik\DI::add([ - [ - 'Request.dispatch', - Piwik\DI::value( - function () { - if (!empty($_GET['setNotifications']) && $_GET['setNotifications'] == 1) { - // trigger some notification - $notification = new Notification('This is a persistent test notification'); - $notification->title = 'Warning:'; - $notification->context = Notification::CONTEXT_WARNING; - $notification->type = Notification::TYPE_PERSISTENT; - $notification->flags = Notification::FLAG_CLEAR; - Notification\Manager::notify('NotificationFixture_persistent_warning', $notification); - - $notification = new Notification('This is another persistent test notification'); - $notification->title = 'Error:'; - $notification->context = Notification::CONTEXT_ERROR; - $notification->type = Notification::TYPE_PERSISTENT; - $notification->flags = Notification::FLAG_CLEAR; - Notification\Manager::notify('NotificationFixture_persistent_error', $notification); - - $notification = new Notification('This is transient test notification'); - $notification->title = 'Error:'; - $notification->context = Notification::CONTEXT_ERROR; - $notification->type = Notification::TYPE_TRANSIENT; - $notification->flags = Notification::FLAG_CLEAR; - Notification\Manager::notify('NotificationFixture_transient_error', $notification); - } - } - ), - ], - ]), -]; diff --git a/plugins/CoreHome/config/tracker.php b/plugins/CoreHome/config/tracker.php deleted file mode 100644 index d5be5de26f92a935f318ed4c0a04fe01434bfe66..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/config/tracker.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/CoreHome/images/applogo_128.png b/plugins/CoreHome/images/applogo_128.png deleted file mode 100644 index 3292a95602b5fffce82b369a5e90cc6922e7969b..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_128.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_144.png b/plugins/CoreHome/images/applogo_144.png deleted file mode 100644 index ced97022498ea962ce1e83e985c2257b45148240..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_144.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_192.png b/plugins/CoreHome/images/applogo_192.png deleted file mode 100644 index 5002de513ba80f7d251081fc55d94edcd7d807c9..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_192.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_256.png b/plugins/CoreHome/images/applogo_256.png deleted file mode 100644 index 3592d7feb271c9628023a83207b637a844fecb43..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_256.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_32.png b/plugins/CoreHome/images/applogo_32.png deleted file mode 100644 index f9f29f49193636e43cf1b18ed2df70b4102d30b9..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_32.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_72.png b/plugins/CoreHome/images/applogo_72.png deleted file mode 100644 index 95190d3935a8336a03a1c0d64ef94294b1b82a2d..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_72.png and /dev/null differ diff --git a/plugins/CoreHome/images/applogo_732.png b/plugins/CoreHome/images/applogo_732.png deleted file mode 100644 index 40447fdae13dbde4e9d5897644bf65d427ed6e09..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/applogo_732.png and /dev/null differ diff --git a/plugins/CoreHome/images/bg_header.png b/plugins/CoreHome/images/bg_header.png deleted file mode 100644 index f0fc545f9f2f66cd2a8aa59830a4a9c8c29a2270..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/bg_header.png and /dev/null differ diff --git a/plugins/CoreHome/images/bullet1.png b/plugins/CoreHome/images/bullet1.png deleted file mode 100644 index 6a4bc2a467ea4d156c242ca68f69324f7c4ad2bd..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/bullet1.png and /dev/null differ diff --git a/plugins/CoreHome/images/bullet2.png b/plugins/CoreHome/images/bullet2.png deleted file mode 100644 index 2e00eda5ec845ccbab38ecf250cc4d7c7b13b5cb..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/bullet2.png and /dev/null differ diff --git a/plugins/CoreHome/images/favicon.ico b/plugins/CoreHome/images/favicon.ico deleted file mode 100644 index 6944bc33a6ebfe027363704718d04ff718a80181..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/favicon.ico and /dev/null differ diff --git a/plugins/CoreHome/images/favicon.png b/plugins/CoreHome/images/favicon.png deleted file mode 100644 index d5f4828bc823b912d6679032245a3ed632994d7f..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/favicon.png and /dev/null differ diff --git a/plugins/CoreHome/images/more.png b/plugins/CoreHome/images/more.png deleted file mode 100644 index cba03a05f5c372f4c8eb247d718f7060957ee648..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/more.png and /dev/null differ diff --git a/plugins/CoreHome/images/more_date.png b/plugins/CoreHome/images/more_date.png deleted file mode 100644 index 17983a7e4a22cdbe80e7c7b1cfd51a5fe3f0464f..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/more_date.png and /dev/null differ diff --git a/plugins/CoreHome/images/more_period.png b/plugins/CoreHome/images/more_period.png deleted file mode 100644 index 92b10dd7824e553b218cee1c4693c9edc8c65938..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/more_period.png and /dev/null differ diff --git a/plugins/CoreHome/images/navigation_collapse.png b/plugins/CoreHome/images/navigation_collapse.png deleted file mode 100644 index cbbab2b464610be6891d5eeb460df77722cf3206..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/navigation_collapse.png and /dev/null differ diff --git a/plugins/CoreHome/images/navigation_expand.png b/plugins/CoreHome/images/navigation_expand.png deleted file mode 100644 index 7d8dad34b0a1389d743c7aeca976c806f72226e7..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/navigation_expand.png and /dev/null differ diff --git a/plugins/CoreHome/images/promo_video_splash.jpg b/plugins/CoreHome/images/promo_video_splash.jpg deleted file mode 100644 index a2bf76a0c0310738dad55f0f1f794e542a6cb82c..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/promo_video_splash.jpg and /dev/null differ diff --git a/plugins/CoreHome/images/reset_search.png b/plugins/CoreHome/images/reset_search.png deleted file mode 100644 index cb1d9e80a2a21f8a15a416a405e5746afeb803fd..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/reset_search.png and /dev/null differ diff --git a/plugins/CoreHome/images/search.png b/plugins/CoreHome/images/search.png deleted file mode 100644 index 6d1f037c69979be5721874cf0e0a9f35bd827ab8..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/images/search.png and /dev/null differ diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js deleted file mode 100644 index 764cbb3df419830c3a871ee9de7e2fc4ab918e89..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/broadcast.js +++ /dev/null @@ -1,662 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * broadcast object is to help maintain a hash for link clicks and ajax calls - * so we can have back button and refresh button working. - * - * @type {object} - */ -var broadcast = { - - /** - * Last known hash url without popover parameter - */ - currentHashUrl: false, - - /** - * Last known popover parameter - */ - currentPopoverParameter: false, - - /** - * Callbacks for popover parameter change - */ - popoverHandlers: [], - - /** - * Holds the stack of popovers opened in sequence. When closing a popover, the last popover in the stack - * is opened (if any). - */ - popoverParamStack: [], - - /** - * Force reload once - */ - forceReload: false, - - /** - * Suppress content update on hash changing - */ - updateHashOnly: false, - - isWidgetizedDashboard: function() { - return broadcast.getValueFromUrl('module') == 'Widgetize' && broadcast.getValueFromUrl('moduleToWidgetize') == 'Dashboard'; - }, - - isWidgetizeRequestWithoutSession: function() { - // whenever a token_auth is set in the URL, we assume a widget or page is tried to be shown widgetized. - return broadcast.getValueFromUrl('token_auth') != '' && broadcast.getValueFromUrl('force_api_session') != '1'; - }, - - /** - * Returns if the current page is the login page - * @return {boolean} - */ - isLoginPage: function() { - return !!$('body#loginPage').length; - }, - - /** - * Returns if the current page is the no data page - * @return {boolean} - */ - isNoDataPage: function() { - return !!$('body#site-without-data').length; - }, - - /** - * Returns the current hash with updated parameters that were provided in ajaxUrl - * - * Parameters like idGoal and idDashboard will be automatically reset if the won't be relevant anymore - * - * NOTE: this method does not issue any ajax call, but returns the hash instead - * - * @param {string} ajaxUrl querystring with parameters to be updated - * @return {string} current hash with updated parameters - */ - buildReportingUrl: function (ajaxUrl) { - - // available in global scope - var currentHashStr = broadcast.getHash(); - - ajaxUrl = ajaxUrl.replace(/^\?|&#/, ''); - - var params_vals = ajaxUrl.split("&"); - for (var i = 0; i < params_vals.length; i++) { - currentHashStr = broadcast.updateParamValue(params_vals[i], currentHashStr); - } - - // if the module is not 'Goals', we specifically unset the 'idGoal' parameter - // this is to ensure that the URLs are clean (and that clicks on graphs work as expected - they are broken with the extra parameter) - var action = broadcast.getParamValue('action', currentHashStr); - if (action != 'goalReport' && action != 'ecommerceReport' && action != 'products' && action != 'sales') { - currentHashStr = broadcast.updateParamValue('idGoal=', currentHashStr); - } - // unset idDashboard if use doesn't display a dashboard - var module = broadcast.getParamValue('module', currentHashStr); - if (module != 'Dashboard') { - currentHashStr = broadcast.updateParamValue('idDashboard=', currentHashStr); - } - - return '#' + currentHashStr; - }, - - /** - * propagateNewPage() -- update url value and load new page, - * Example: - * 1) We want to update idSite to both search query and hash then reload the page, - * 2) update period to both search query and hash then reload page. - * - * Expecting: - * str = "param1=newVal1¶m2=newVal2"; - * - * NOTE: This method will refresh the page with new values. - * - * @param {string} str url with parameters to be updated - * @param {boolean} [showAjaxLoading] whether to show the ajax loading gif or not. - * @param {string} strHash additional parameters that should be updated on the hash - * @param {array} paramsToRemove Optional parameters to remove from the URL. - * @return {void} - */ - propagateNewPage: function (str, showAjaxLoading, strHash, paramsToRemove, wholeNewUrl) { - // abort all existing ajax requests - globalAjaxQueue.abort(); - - paramsToRemove = paramsToRemove || []; - - if (typeof showAjaxLoading === 'undefined' || showAjaxLoading) { - piwikHelper.showAjaxLoading(); - } - - var params_vals = str.split("&"); - - // available in global scope - var currentSearchStr = window.location.search; - var currentHashStr = broadcast.getHashFromUrl(); - - if (!currentSearchStr) { - currentSearchStr = '?'; - } - - var oldUrl = currentSearchStr + currentHashStr; - var newUrl; - - if (!wholeNewUrl) { - // remove all array query params that are currently set. if we don't do this the array parameters we add - // just get added to the existing parameters. - params_vals.forEach(function (param) { - if (/\[]=/.test(decodeURIComponent(param))) { - var paramName = decodeURIComponent(param).split('[]=')[0]; - removeParam(paramName); - } - }); - - // remove parameters if needed - paramsToRemove.forEach(function (paramName) { - removeParam(paramName); - }); - - // update/add parameters based on whether the parameter is an array param or not - params_vals.forEach(function (param) { - if (!param.length) { - return; // updating with empty string would destroy some values - } - - if (/\[]=/.test(decodeURIComponent(param))) { // array param value - currentSearchStr = broadcast.addArrayParamValue(param, currentSearchStr); - - if (currentHashStr.length !== 0) { - currentHashStr = broadcast.addArrayParamValue(param, currentHashStr); - } - } else { - // update both the current search query and hash string - currentSearchStr = broadcast.updateParamValue(param, currentSearchStr); - - if (currentHashStr.length !== 0) { - currentHashStr = broadcast.updateParamValue(param, currentHashStr); - } - } - }); - - var updatedUrl = new RegExp('&updated=([0-9]+)'); - var updatedCounter = updatedUrl.exec(currentSearchStr); - if (!updatedCounter) { - currentSearchStr += '&updated=1'; - } else { - updatedCounter = 1 + parseInt(updatedCounter[1]); - currentSearchStr = currentSearchStr.replace(new RegExp('(&updated=[0-9]+)'), '&updated=' + updatedCounter); - } - - if (strHash && currentHashStr.length != 0) { - var params_hash_vals = strHash.split("&"); - for (var i = 0; i < params_hash_vals.length; i++) { - currentHashStr = broadcast.updateParamValue(params_hash_vals[i], currentHashStr); - } - } - - // Now load the new page. - newUrl = currentSearchStr + currentHashStr; - } else { - newUrl = wholeNewUrl; - } - - if (oldUrl == newUrl) { - window.location.reload(); - } else { - this.forceReload = true; - window.location.href = newUrl; - } - return false; - - function removeParam(paramName) { - var paramRegex = new RegExp(paramName + '(\\[]|%5B%5D)?=[^&?#]*&?', 'gi'); - currentSearchStr = currentSearchStr.replace(paramRegex, ''); - currentHashStr = currentHashStr.replace(paramRegex, ''); - } - }, - - /************************************************* - * - * Broadcast Supporter Methods: - * - *************************************************/ - - /** - * updateParamValue(newParamValue,urlStr) -- Helping propagate functions to update value to url string. - * eg. I want to update date value to search query or hash query - * - * Expecting: - * urlStr : A Hash or search query string. e.g: module=whatever&action=index=date=yesterday - * newParamValue : A param value pair: e.g: date=2009-05-02 - * - * Return module=whatever&action=index&date=2009-05-02 - * - * @param {string} newParamValue param to be updated - * @param {string} urlStr url to be updated - * @return {string} urlStr with updated param - */ - updateParamValue: function (newParamValue, urlStr) { - var p_v = newParamValue.split("="); - - var paramName = p_v[0]; - var valFromUrl = broadcast.getParamValue(paramName, urlStr) || broadcast.getParamValue(encodeURIComponent(paramName), urlStr); - // if set 'idGoal=' then we remove the parameter from the URL automatically (rather than passing an empty value) - var paramValue = p_v[1]; - if (paramValue == '') { - newParamValue = ''; - } - var getQuotedRegex = function(str) { - return (str+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); - }; - - if (valFromUrl != '' || urlStr.indexOf(paramName + '=') !== -1) { - // replacing current param=value to newParamValue; - valFromUrl = getQuotedRegex(valFromUrl); - var regToBeReplace = new RegExp(paramName + '=' + valFromUrl, 'ig'); - if (newParamValue == '') { - // if new value is empty remove leading &, as well - regToBeReplace = new RegExp('[\&]?(' + paramName + '|' + encodeURIComponent(paramName) + ')=' + valFromUrl, 'ig'); - } - urlStr = urlStr.replace(regToBeReplace, newParamValue); - } else if (newParamValue != '') { - urlStr += (urlStr == '') ? newParamValue : '&' + newParamValue; - } - - return urlStr; - }, - - /** - * Adds a query param value. Use it to add an array parameter value where you don't want to remove an existing value first. - * - * @param newParamValue - * @param urlStr - */ - addArrayParamValue: function (newParamValue, urlStr) { - if (urlStr.indexOf('?') === -1) { - urlStr += '?'; - } else { - urlStr += '&'; - } - return urlStr + newParamValue; - }, - - /** - * Loads a popover by adding a 'popover' query parameter to the current URL and - * indirectly executing the popover handler. - * - * This function should be called to open popovers that can be opened by URL alone. - * That is, if you want users to be able to copy-paste the URL displayed when a popover - * is open into a new browser window/tab and have the same popover open, you should - * call this function. - * - * In order for this function to open a popover, there must be a popover handler - * associated with handlerName. To associate one, call broadcast.addPopoverHandler. - * - * @param {String} handlerName The name of the popover handler. - * @param {String} value The String value that should be passed to the popover - * handler. - */ - propagateNewPopoverParameter: function (handlerName, value) { - var popover = ''; - if (handlerName && '' != value && 'undefined' != typeof value) { - popover = handlerName + ':' + value; - - // between jquery.history and different browser bugs, it's impossible to ensure - // that the parameter is en- and decoded the same number of times. in order to - // make sure it doesn't change, we have to manipulate the url encoding a bit. - popover = encodeURIComponent(popover); - popover = popover.replace(/%/g, '\$'); - - broadcast.popoverParamStack.push(popover); - } else { - broadcast.popoverParamStack.pop(); - if (broadcast.popoverParamStack.length) { - popover = broadcast.popoverParamStack[broadcast.popoverParamStack.length - 1]; - } - } - - var MatomoUrl = window.CoreHome.MatomoUrl; - MatomoUrl.updateHash( - Object.assign({}, MatomoUrl.hashParsed.value, { popover }), - ); - }, - - /** - * Resets the popover param stack ensuring when a popover is closed, no new popover will - * be loaded. - */ - resetPopoverStack: function () { - broadcast.popoverParamStack = []; - }, - - /** - * Adds a handler for the 'popover' query parameter. - * - * @see broadcast#propagateNewPopoverParameter - * - * @param {String} handlerName The handler name, eg, 'visitorProfile'. Should identify - * the popover that the callback will open up. - * @param {Function} callback This function should open the popover. It should take - * one string parameter. - */ - addPopoverHandler: function (handlerName, callback) { - broadcast.popoverHandlers[handlerName] = callback; - }, - - /** - * Loads the given url with ajax and replaces the content - * - * Note: the method is replaced in Overlay/javascripts/Piwik_Overlay.js - keep this in mind when making changes. - * - * @param {string} urlAjax url to load - * @return {Boolean} - */ - loadAjaxContent: function (urlAjax) { - if(broadcast.getParamValue('module', urlAjax) == 'API') { - broadcast.lastUrlRequested = null; - $('#content').html("Loading content from the API and displaying it within Matomo is not allowed."); - piwikHelper.hideAjaxLoading(); - return false; - } - - piwikHelper.hideAjaxError('loadingError'); - piwikHelper.showAjaxLoading(); - $('#content').empty(); - $("object").remove(); - - urlAjax = urlAjax.match(/^\?/) ? urlAjax : "?" + urlAjax; - broadcast.lastUrlRequested = urlAjax; - - function sectionLoaded(content, status, request) { - if (request) { - var responseHeader = request.getResponseHeader('Content-Type'); - if (responseHeader && 0 <= responseHeader.toLowerCase().indexOf('json')) { - var message = 'JSON cannot be displayed for'; - if (this.getParams && this.getParams['module']) { - message += ' module=' + this.getParams['module']; - } - if (this.getParams && this.getParams['action']) { - message += ' action=' + this.getParams['action']; - } - $('#content').text(message); - piwikHelper.hideAjaxLoading(); - return; - } - } - - // if content is whole HTML document, do not show it, otherwise recursive page load could occur - var htmlDocType = '= 0) { - url = url.slice(url.indexOf('?')+1); - } - - var urlPieces = url.split('&'); - - // look for the latest occurrence of the parameter if available - for (var i=urlPieces.length-1; i>=0; i--) { - if (urlPieces[i].indexOf(lookFor) === 0) { - return getSingleValue(urlPieces[i]); - } - } - - // gather parameter array if available - lookFor = param + '[]='; - var result = []; - for (var j=0; j!@\$\.()=,;0-9a-zA-Z]/gi, ''); - } - return value; - } - }, - - /** - * Returns the hash without the starting # - * @return {string} hash part of the current url - */ - getHash: function () { - return broadcast.getHashFromUrl().replace(/^#/, '').split('#')[0]; - }, - - /** - * Removes the hash portion of a URL and returns the rest. - * - * @param {string} url - * @return {string} url w/o hash - */ - _removeHashFromUrl: function (url) { - var searchString = ''; - if (url) { - var urlParts = url.split('#'); - searchString = urlParts[0]; - } else { - searchString = window.location.search; - } - return searchString; - } -}; - -window.broadcast = broadcast; // hack to get broadcast to work in vue (jest) tests diff --git a/plugins/CoreHome/javascripts/broadcast.spec.js b/plugins/CoreHome/javascripts/broadcast.spec.js deleted file mode 100644 index 139850a741cf58ae243deea68f0070cc4615955b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/broadcast.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function () { - describe('broadcast', function () { - - var tests = [ - { url: 'http://matomo.org/index.php?param=val', param: 'param', expectedValue: 'val' }, - { url: 'http://matomo.org/index.php?param=val', param: 'custom', expectedValue: '' }, - { url: 'http://matomo.org/index.php?myparam=test¶m=val', param: 'param', expectedValue: 'val' }, - { url: 'http://matomo.org/index.php?param=val&myparam=test', param: 'param', expectedValue: 'val' }, - { url: 'http://matomo.org/index.php?param=val¶m=val2', param: 'param', expectedValue: 'val2' }, - { url: 'http://matomo.org/index.php?param[]=val&myparam[]=x¶m[]=val2', param: 'param', expectedValue: ['val', 'val2'] }, - ]; - - tests.forEach(function(test,index) { - it('should return correct parameters with getParamValue ' + (index+1), function () { - expect(broadcast.getParamValue(test.param, test.url)).to.deep.equal(test.expectedValue); - }); - }); - }); -})(); diff --git a/plugins/CoreHome/javascripts/calendar.js b/plugins/CoreHome/javascripts/calendar.js deleted file mode 100644 index 8921f1eab63e8e256741a5b7d7e4cd4efada5b3a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/calendar.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -(function ($) { - // min/max date for picker - var piwikMinDate = new Date(piwik.minDateYear, piwik.minDateMonth - 1, piwik.minDateDay), - piwikMaxDate = new Date(piwik.maxDateYear, piwik.maxDateMonth - 1, piwik.maxDateDay); - - piwik.getBaseDatePickerOptions = function (defaultDate) { - return { - showOtherMonths: false, - dateFormat: 'yy-mm-dd', - firstDay: 1, - minDate: piwikMinDate, - maxDate: piwikMaxDate, - prevText: "", - nextText: "", - currentText: "", - defaultDate: defaultDate, - changeMonth: true, - changeYear: true, - stepMonths: 1, - // jquery-ui-i18n 1.7.2 lacks some translations, so we use our own - dayNamesMin: [ - _pk_translate('Intl_Day_Min_StandAlone_7'), - _pk_translate('Intl_Day_Min_StandAlone_1'), - _pk_translate('Intl_Day_Min_StandAlone_2'), - _pk_translate('Intl_Day_Min_StandAlone_3'), - _pk_translate('Intl_Day_Min_StandAlone_4'), - _pk_translate('Intl_Day_Min_StandAlone_5'), - _pk_translate('Intl_Day_Min_StandAlone_6')], - dayNamesShort: [ - _pk_translate('Intl_Day_Short_StandAlone_7'), // start with sunday - _pk_translate('Intl_Day_Short_StandAlone_1'), - _pk_translate('Intl_Day_Short_StandAlone_2'), - _pk_translate('Intl_Day_Short_StandAlone_3'), - _pk_translate('Intl_Day_Short_StandAlone_4'), - _pk_translate('Intl_Day_Short_StandAlone_5'), - _pk_translate('Intl_Day_Short_StandAlone_6')], - dayNames: [ - _pk_translate('Intl_Day_Long_StandAlone_7'), // start with sunday - _pk_translate('Intl_Day_Long_StandAlone_1'), - _pk_translate('Intl_Day_Long_StandAlone_2'), - _pk_translate('Intl_Day_Long_StandAlone_3'), - _pk_translate('Intl_Day_Long_StandAlone_4'), - _pk_translate('Intl_Day_Long_StandAlone_5'), - _pk_translate('Intl_Day_Long_StandAlone_6')], - monthNamesShort: [ - _pk_translate('Intl_Month_Short_StandAlone_1'), - _pk_translate('Intl_Month_Short_StandAlone_2'), - _pk_translate('Intl_Month_Short_StandAlone_3'), - _pk_translate('Intl_Month_Short_StandAlone_4'), - _pk_translate('Intl_Month_Short_StandAlone_5'), - _pk_translate('Intl_Month_Short_StandAlone_6'), - _pk_translate('Intl_Month_Short_StandAlone_7'), - _pk_translate('Intl_Month_Short_StandAlone_8'), - _pk_translate('Intl_Month_Short_StandAlone_9'), - _pk_translate('Intl_Month_Short_StandAlone_10'), - _pk_translate('Intl_Month_Short_StandAlone_11'), - _pk_translate('Intl_Month_Short_StandAlone_12')], - monthNames: [ - _pk_translate('Intl_Month_Long_StandAlone_1'), - _pk_translate('Intl_Month_Long_StandAlone_2'), - _pk_translate('Intl_Month_Long_StandAlone_3'), - _pk_translate('Intl_Month_Long_StandAlone_4'), - _pk_translate('Intl_Month_Long_StandAlone_5'), - _pk_translate('Intl_Month_Long_StandAlone_6'), - _pk_translate('Intl_Month_Long_StandAlone_7'), - _pk_translate('Intl_Month_Long_StandAlone_8'), - _pk_translate('Intl_Month_Long_StandAlone_9'), - _pk_translate('Intl_Month_Long_StandAlone_10'), - _pk_translate('Intl_Month_Long_StandAlone_11'), - _pk_translate('Intl_Month_Long_StandAlone_12')] - }; - }; - - piwikHelper.registerShortcut('d', _pk_translate('CoreHome_ShortcutCalendar'), function(event) { - if (event.altKey) { - return; - } - if (event.preventDefault) { - event.preventDefault(); - } else { - event.returnValue = false; // IE - } - $('#periodString .title').trigger('click').focus(); - }); - -}(jQuery)); diff --git a/plugins/CoreHome/javascripts/color_manager.js b/plugins/CoreHome/javascripts/color_manager.js deleted file mode 100644 index 1fde9dfe4c07123a97bbe9a6f2ebf2d895c31821..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/color_manager.js +++ /dev/null @@ -1,225 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function ($) { - - var colorNames = {"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff","aquamarine":"#7fffd4","azure":"#f0ffff", - "beige":"#f5f5dc","bisque":"#ffe4c4","black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887", - "cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff", - "darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f", - "darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkturquoise":"#00ced1", - "darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dodgerblue":"#1e90ff", - "firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff","gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","gold":"#ffd700","goldenrod":"#daa520","gray":"#808080","green":"#43a047","greenyellow":"#adff2f", - "honeydew":"#f0fff0","hotpink":"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c", - "lavender":"#e6e6fa","lavenderblush":"#fff0f5","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2", - "lightgrey":"#d3d3d3","lightgreen":"#90ee90","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightsteelblue":"#b0c4de", - "lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6","magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370d8","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee", - "mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5", - "navajowhite":"#ffdead","navy":"#000080","oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6", - "palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#d87093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080", - "red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1","saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4", - "tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0","violet":"#ee82ee","wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5","yellow":"#ffff00","yellowgreen":"#9acd32"}; - - /** - * The ColorManager class allows JS code to grab colors defined in CSS for - * components that don't manage HTML (like jqPlot or sparklines). Such components - * can't use CSS colors directly since the colors are used to generate images - * or by elements. - * - * Colors obtained via ColorManager are defined in CSS like this: - * - * .my-color-namespace[data-name=color-name] { - * color: #fff - * } - * - * and can be accessed in JavaScript like this: - * - * piwik.ColorManager.getColor("my-color-namespace", "color-name"); - * - * The singleton instance of this class can be accessed via piwik.ColorManager. - */ - var ColorManager = function () { - // empty - }; - - ColorManager.prototype = { - - /** - * Returns the color for a namespace and name. - * - * @param {String} namespace The string identifier that groups related colors - * together. For example, 'sparkline-colors'. - * @param {String} name The name of the color to retrieve. For example, 'lineColor'. - * @return {String} A hex color, eg, '#fff'. - */ - getColor: function (namespace, name) { - var element = this._getElement(); - - element.attr('class', 'color-manager ' + namespace).attr('data-name', name); - - return this._normalizeColor(element.css('color')); - }, - - /** - * Returns the colors for a namespace and a list of names. - * - * @param {String} namespace The string identifier that groups related colors - * together. For example, 'sparkline-colors'. - * @param {Array} names An array of color names to retrieve. - * @param {Boolean} asArray Whether the result should be an array or an object. - * @return {Object|Array} An object mapping color names with color values or an - * array of colors. - */ - getColors: function (namespace, names, asArray) { - var colors = asArray ? [] : {}; - for (var i = 0; i != names.length; ++i) { - var name = names[i], - color = this.getColor(namespace, name); - if (color) { - if (asArray) { - colors.push(color); - } else { - colors[name] = color; - } - } - } - return colors; - }, - - /** - * Returns a color that is N % between two other colors. - * - * @param {String|Array} spectrumStart The start color. If percentFromStart is 0, this color will - * be returned. Can be either a hex color or RGB array. - * It will be converted to an RGB array if a hex color is supplied. - * @param {String|Array} spectrumEnd The end color. If percentFromStart is 1, this color will be - * returned. Can be either a hex color or RGB array. It will be - * converted to an RGB array if a hex color is supplied. - * @param {Number} percentFromStart The percent from spectrumStart and twoard spectrumEnd that the - * result color should be. Must be a value between 0.0 & 1.0. - * @return {String} A hex color. - */ - getSingleColorFromGradient: function (spectrumStart, spectrumEnd, percentFromStart) { - if (!(spectrumStart instanceof Array)) { - spectrumStart = this.getRgb(spectrumStart); - } - - if (!(spectrumEnd instanceof Array)) { - spectrumEnd = this.getRgb(spectrumEnd); - } - - var result = []; - for (var channel = 0; channel != spectrumStart.length; ++channel) { - var delta = (spectrumEnd[channel] - spectrumStart[channel]) * percentFromStart; - - result[channel] = Math.floor(spectrumStart[channel] + delta); - } - - return this.getHexColor(result); - }, - - /** - * Utility function that converts a hex color (ie, #fff or #1a1a1a) to an array of - * RGB values. - * - * @param {String} hexColor The color to convert. - * @return {Array} An array with three integers between 0 and 255. - */ - getRgb: function (hexColor) { - if (hexColor[0] == '#') { - hexColor = hexColor.substring(1); - } - - if (hexColor.length == 3) { - return [ - parseInt(hexColor[0], 16), - parseInt(hexColor[1], 16), - parseInt(hexColor[2], 16) - ]; - } else { - return [ - parseInt(hexColor.substring(0,2), 16), - parseInt(hexColor.substring(2,4), 16), - parseInt(hexColor.substring(4,6), 16) - ]; - } - }, - - /** - * Utility function that converts an RGB array to a hex color. - * - * @param {Array} rgbColor An array with three integers between 0 and 255. - * @return {String} The hex color, eg, #1a1a1a. - */ - getHexColor: function (rgbColor) { - // convert channels to hex with one leading 0 - for (var i = 0; i != rgbColor.length; ++i) { - rgbColor[i] = ("00" + rgbColor[i].toString(16)).slice(-2); - } - - // create hex string - return '#' + rgbColor.join(''); - }, - - /** - * Turns a color string that might be an rgb value rgb(12, 34, 56) into - * a hex color string. - */ - _normalizeColor: function (color) { - if (color == this._getTransparentColor()) { - return null; - } - - if (color && colorNames[color]) { - return colorNames[color]; - } - - if (color - && color[0] != '#' - ) { - // parse rgb(#, #, #) and get rgb numbers - var parts = color.split(/[()rgb,\s]+/); - parts = [+parts[1], +parts[2], +parts[3]]; - - // convert to hex - color = this.getHexColor(parts); - } - return color; - }, - - /** - * Returns the manufactured
element used to obtain color data. When - * getting color data the class and data-name attribute of this element are - * changed. - */ - _getElement: function () { - if (!this.$element) { - $('body').append('
'); - this.$element = $('#color-manager'); - } - - return this.$element; - }, - - /** - * Returns this browser's representation of the 'transparent' color. Used to - * compare against colors obtained in getColor. If a color is 'transparent' - * it means there's no color for that namespace/name combination. - */ - _getTransparentColor: function () { - if (!this.transparentColor) { - this.transparentColor = - $('
').appendTo($('body')).css('color'); - } - - return this.transparentColor; - } - }; - - piwik.ColorManager = new ColorManager(); - -}(jQuery)); diff --git a/plugins/CoreHome/javascripts/corehome.js b/plugins/CoreHome/javascripts/corehome.js deleted file mode 100644 index 17f7dece5d3b30ccefbc2d2d12b328c36a377191..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/corehome.js +++ /dev/null @@ -1,129 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function ($) { - // - // 'check for updates' behavior - // - $(function () { - var initUpdateCheck = function() { - var COMPONENT_SELECTOR = 'div[vue-entry="CoreHome.VersionInfoHeaderMessage"]'; - - var headerComponentParent = $(COMPONENT_SELECTOR).parent(); - - // when 'check for updates...' link is clicked, force a check & display the result - headerComponentParent.one('click', '#header_message a.title:not([href])', function (e) { - var headerComponent = $(this) - .closest(COMPONENT_SELECTOR); - var headerMessage = headerComponent.find('#header_message'); - - var $titleElement = headerMessage.find('.title'); - if ($titleElement.attr('target')) { // if this is an external link, internet access is not available on the server - return; - } - - e.preventDefault(); - - var ajaxRequest = new ajaxHelper(); - ajaxRequest.setLoadingElement('#header_message .loadingPiwik'); - ajaxRequest.addParams({ - module: 'CoreHome', - action: 'checkForUpdates' - }, 'get'); - - ajaxRequest.withTokenInUrl(); - - $titleElement.addClass('activityIndicator'); - - ajaxRequest.setCallback(function (response) { - headerMessage.fadeOut('slow', function () { - response = $(COMPONENT_SELECTOR, $('
' + response + '
')); - - $titleElement.removeClass('activityIndicator'); - - if (response.length) { - headerComponent.replaceWith(response); - piwikHelper.compileVueDirectives(response); - piwikHelper.compileVueEntryComponents(response); - - initUpdateCheck(); - } else { - headerMessage.find('.title') - .html(_pk_translate('CoreHome_YouAreUsingTheLatestVersion')); - headerMessage.show(); - setTimeout(function () { - headerMessage.fadeOut('slow', function () { - headerComponent.remove(); - }); - }, 4000); - } - }); - }); - ajaxRequest.setFormat('html'); - ajaxRequest.send(); - - return false; - }); - }; - - initTopControls(); - initUpdateCheck(); - }); -}(jQuery)); - - -$( document ).ready(function() { - $('.accessibility-skip-to-content').click(function(e){ - $('a[name="main"]').attr('tabindex', -1).focus(); - $(window).scrollTo($('a[name="main"]')); - }); - - $("#mobile-top-menu").sideNav({ - closeOnClick: true, - edge: 'right' - }); - - $('.navbar.collapsible').collapsible(); - - $('select').not('.ui-datepicker select').material_select(); - - piwikHelper.registerShortcut('?', _pk_translate('CoreHome_ShortcutHelp') , function (event) { - // don't open if an modal is already shown - if (event.altKey || $('.modal.open').length) { - return; - } - if (event.preventDefault) { - event.preventDefault(); - } else { - event.returnValue = false; // IE - } - - var list = $('#shortcuthelp dl'); - list.empty(); - - var keys = Object.keys(piwikHelper.shortcuts).sort(); - - jQuery.each(keys, function(i, key) { - if (piwikHelper.shortcuts.hasOwnProperty(key)) { - list.append($('
').append($('').text(key))); - list.append($('
').text(piwikHelper.shortcuts[key])); - } - }); - - var isMac = navigator.userAgent.indexOf('Mac OS X') != -1; - - list.append($('
').append($('').text(_pk_translate(isMac ? "CoreHome_MacPageUp" : "CoreHome_HomeShortcut")))); - - list.append($('
').text(_pk_translate('CoreHome_PageUpShortcutDescription'))); - - list.append($('
').append($('').text(_pk_translate(isMac ? "CoreHome_MacPageDown" : "CoreHome_EndShortcut")))); - - list.append($('
').text(_pk_translate('CoreHome_PageDownShortcutDescription'))); - - piwikHelper.modalConfirm('#shortcuthelp'); - }); -}); diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js deleted file mode 100644 index 0923d40af9f6a73f4336041478e3c8d0bd3eab8f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/dataTable.js +++ /dev/null @@ -1,2096 +0,0 @@ - -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -//----------------------------------------------------------------------------- -// DataTable -//----------------------------------------------------------------------------- - -(function ($, require) { - -var exports = require('piwik/UI'), - UIControl = exports.UIControl; - -/** - * This class contains the client side logic for viewing and interacting with - * Matomo datatables. - * - * The id attribute for DataTables is set dynamically by the initNewDataTables - * method, and this class instance is stored using the jQuery $.data function - * with the 'uiControlObject' key. - * - * To find a datatable element by report (ie, 'DevicesDetection.getBrowsers'), - * use piwik.DataTable.getDataTableByReport. - * - * To get the dataTable JS instance (an instance of this class) for a - * datatable HTML element, use $(element).data('uiControlObject'). - * - * @constructor - */ -function DataTable(element) { - UIControl.call(this, element); - - this.init(); -} - -DataTable._footerIconHandlers = {}; - -DataTable.initNewDataTables = function (reportId) { - var selector = typeof reportId === 'string' ? '[data-report='+JSON.stringify(reportId)+']' : 'div.dataTable'; - $(selector).each(function () { - if (!$(this).attr('id')) { - var tableType = $(this).attr('data-table-type') || 'DataTable', - klass = require('piwik/UI')[tableType] || require(tableType); - - if (klass && $.isFunction(klass)) { - var table = new klass(this); - } - } - }); -}; - -DataTable.registerFooterIconHandler = function (id, handler) { - var handlers = DataTable._footerIconHandlers; - - if (handlers[id]) { - setTimeout(function () { // fail gracefully - throw new Exception("DataTable footer icon handler '" + id + "' is already being used.") - }, 1); - return; - } - - handlers[id] = handler; -}; - -/** - * Returns the first datatable div displaying a specific report. - * - * @param {string} report The report, eg, UserLanguage.getLanguage - * @return {Element} The datatable div displaying the report, or undefined if - * it cannot be found. - */ -DataTable.getDataTableByReport = function (report) { - var result = undefined; - $('div.dataTable').each(function () { - if ($(this).attr('data-report') == report) { - result = this; - return false; - } - }); - return result; -}; - -$.extend(DataTable.prototype, UIControl.prototype, { - - _init: function (domElem) { - // initialize your dataTable in your plugin - }, - - _destroy: function() { - UIControl.prototype._destroy.call(this); - // remove handlers to avoid memory leaks - if (this.windowResizeTableAttached) { - $(window).off('resize', this._resizeDataTable); - } - if (this._bodyMouseUp) { - $('body').off('mouseup', this._bodyMouseUp); - } - }, - - //initialisation function - init: function () { - var domElem = this.$element; - - this.workingDivId = this._createDivId(); - domElem.attr('id', this.workingDivId); - - this.loadedSubDataTable = {}; - this.isEmpty = $('.pk-emptyDataTable', domElem).length > 0; - window.Vue.nextTick().then(() => { - this.bindEventsAndApplyStyle(domElem); - this._init(domElem); - this.enableStickHead(domElem); - this.initialized = true; - }); - }, - - enableStickHead: function (domElem) { - var resizeTimeout = null; - var resize = function(domElem) { - var tableScroller = $(domElem).find('.dataTableScroller'); - var tableScrollerWidth = tableScroller.width(); - var tableWidth = $(domElem).find('table').width(); - if (tableScrollerWidth < tableWidth) { - tableScroller.css('overflow-x', 'scroll'); - } else { - tableScroller.css('overflow-x', ''); - } - }; - // Bind to the resize event of the window object - $(window).on('resize', function () { - resize(domElem); - // trigger another check after a certain delay as during fast resizing - // the width is sometimes reported incorrectly - if (resizeTimeout) { - window.clearTimeout(resizeTimeout); - } - resizeTimeout = window.setTimeout(function(){ - resize(domElem); - }, 500); - // Invoke the resize event immediately - }).resize(); - }, - //function triggered when user click on column sort - onClickSort: function (domElem) { - var self = this; - var newColumnToSort = $(domElem).attr('id'); - // we lookup if the column to sort was already this one, if it is the case then we switch from desc <-> asc - if (self.param.filter_sort_column == newColumnToSort) { - // toggle the sorted order - if (this.param.filter_sort_order == 'asc') { - self.param.filter_sort_order = 'desc'; - } - else { - self.param.filter_sort_order = 'asc'; - } - } - self.param.filter_offset = 0; - self.param.filter_sort_column = newColumnToSort; - - if (!self.isDashboard()) { - self.notifyWidgetParametersChange(domElem, { - filter_sort_column: newColumnToSort, - filter_sort_order: self.param.filter_sort_order - }); - } - - self.reloadAjaxDataTable(); - }, - - setGraphedColumn: function (columnName) { - this.param.columns = columnName; - }, - - isWithinDialog: function (domElem) { - return !!$(domElem).parents('.ui-dialog').length; - }, - - isDashboard: function () { - return !!$('#dashboardWidgetsArea').length; - }, - - getReportMetadata: function () { - return JSON.parse(this.$element.attr('data-report-metadata') || '{}'); - }, - - //Reset DataTable filters (used before a reload or view change) - resetAllFilters: function () { - var self = this; - var FiltersToRestore = {}; - var filters = [ - 'filter_column', - 'filter_pattern', - 'filter_column_recursive', - 'filter_pattern_recursive', - 'enable_filter_excludelowpop', - 'filter_offset', - 'filter_limit', - 'filter_sort_column', - 'filter_sort_order', - 'disable_generic_filters', - 'columns', - 'flat', - 'totals', - 'include_aggregate_rows', - 'totalRows', - 'pivotBy', - 'pivotByColumn', - 'filter_trigger_id' - ]; - - for (var key = 0; key < filters.length; key++) { - var value = filters[key]; - FiltersToRestore[value] = self.param[value]; - delete self.param[value]; - } - - return FiltersToRestore; - }, - - //Restores the filters to the values given in the array in parameters - restoreAllFilters: function (FiltersToRestore) { - var self = this; - - for (var key in FiltersToRestore) { - self.param[key] = FiltersToRestore[key]; - } - }, - - //Translate string parameters to javascript builtins - //'true' -> true, 'false' -> false - //it simplifies condition tests in the code - cleanParams: function () { - var self = this; - for (var key in self.param) { - if (self.param[key] == 'true') self.param[key] = true; - if (self.param[key] == 'false') self.param[key] = false; - } - }, - - // Function called to trigger the AJAX request - // The ajax request contains the function callback to trigger if the request is successful or failed - // displayLoading = false When we don't want to display the Loading... DIV .loadingPiwik - // for example when the script add a Loading... it self and doesn't want to display the generic Loading - reloadAjaxDataTable: function (displayLoading, callbackSuccess, extraParams) { - var self = this; - - if (typeof displayLoading == "undefined") { - displayLoading = true; - } - if (typeof callbackSuccess == "undefined") { - callbackSuccess = function (response) { - self.dataTableLoaded(response, self.workingDivId); - }; - } - - if (displayLoading) { - $('#' + self.workingDivId + ' .loadingPiwik').last().css('display', 'block'); - } - - $('#loadingError').hide(); - - // when switching to display graphs, reset limit - if (self && self.param && self.param.viewDataTable && String(self.param.viewDataTable).indexOf('graph') === 0) { - delete self.param.filter_offset; - delete self.param.filter_limit; - } - - delete self.param.showtitle; - - var container = $('#' + self.workingDivId + ' .piwik-graph'); - - var ajaxRequest = new ajaxHelper(); - - if (self.param.totalRows) { - ajaxRequest.addParams({'totalRows': self.param.totalRows}, 'post'); - delete self.param.totalRows; - } - - var params = {}; - for (var key in self.param) { - if (typeof self.param[key] != "undefined" && self.param[key] !== null && self.param[key] !== '') { - if (key == 'filter_column' || key == 'filter_column_recursive' ) { - // search in (metadata) `combinedLabel` when dimensions are shown separately in flattened tables - // needs to be overwritten for each request as switching a searched table might return no results - // otherwise, as search column doesn't fit anymore - if (self.param.flat == "1" && self.param.show_dimensions == "1") { - params[key] = 'combinedLabel'; - } else { - params[key] = 'label'; - } - continue; - } - - params[key] = self.param[key]; - } - } - - ajaxRequest.addParams(params, 'get'); - if (extraParams) { - ajaxRequest.addParams(extraParams, 'post'); - } - ajaxRequest.withTokenInUrl(); - - // store filtering parameters for given widget id - var widgetId = this.findUniqueWidgetId(this.$element); - if (widgetId) { - var filterParams = this.getFilterParams(Object.assign({}, params, extraParams)); - window.CoreHome.SearchFiltersPersistenceStore.setSearchFilters(widgetId, filterParams); - } - - ajaxRequest.setCallback( - function (response) { - container.trigger('piwikDestroyPlot'); - container.off('piwikDestroyPlot'); - callbackSuccess(response); - } - ); - ajaxRequest.setErrorCallback(function (deferred, status) { - if (status == 'abort' || !deferred || deferred.status < 400 || deferred.status >= 600) { - return; - } - - $('#' + self.workingDivId + ' .loadingPiwik').last().css('display', 'none'); - $('#loadingError').show(); - }); - ajaxRequest.setFormat('html'); - - ajaxRequest.send(); - }, - - // Function called when the AJAX request is successful - // it looks for the ID of the response and replace the very same ID - // in the current page with the AJAX response - dataTableLoaded: function (response, workingDivId, doScroll) { - var content = $(response); - - if ($.trim($('.dataTableControls', content).html()) === '') { - $('.dataTableControls', content).append(' '); - // fix table controls are not visible because there is no content. prevents limit selection being displayed - // in the middle - } - - var idToReplace = workingDivId || $(content).attr('id'); - var dataTableSel = $('#' + idToReplace); - - // if the current dataTable is located inside another datatable - table = $(content).parents('table.dataTable'); - if (dataTableSel.parents('.dataTable').is('table')) { - // we add class to the table so that we can give a different style to the subtable - $(content).find('table.dataTable').addClass('subDataTable'); - $(content).find('.dataTableFeatures').addClass('subDataTable'); - - //we force the initialisation of subdatatables - dataTableSel.replaceWith(content); - } - else { - dataTableSel.find('object').remove(); - dataTableSel.replaceWith(content); - } - - content.trigger('piwik:dataTableLoaded'); - - if (doScroll || 'undefined' === typeof doScroll) { - piwikHelper.lazyScrollTo(content[0], 400); - } - - piwikHelper.compileVueEntryComponents(content); - - return content; - }, - - /* This method is triggered when a new DIV is loaded, which happens - - at the first loading of the page - - after any AJAX loading of a DataTable - - This method basically add features to the DataTable, - - such as column sorting, searching in the rows, displaying Next / Previous links, etc. - - add styles to the cells and rows (odd / even styles) - - modify some rows to add images if a span img is found, or add a link if a span urlLink is found - - bind new events onclick / hover / etc. to trigger AJAX requests, - nice hovertip boxes for truncated cells - */ - bindEventsAndApplyStyle: function (domElem) { - var self = this; - self.cleanParams(); - self.preBindEventsAndApplyStyleHook(domElem); - self.handleSort(domElem); - self.handleLimit(domElem); - self.handlePeriod(domElem); - self.handleOffsetInformation(domElem); - self.handleAnnotationsButton(domElem); - self.handleEvolutionAnnotations(domElem); - self.handleExportBox(domElem); - self.applyCosmetics(domElem); - self.handleSubDataTable(domElem); - self.handleConfigurationBox(domElem); - self.handleSearchBox(domElem); - self.handleColumnDocumentation(domElem); - self.handleRowActions(domElem); - self.handleCellTooltips(domElem); - self.handleRelatedReports(domElem); - self.handleTriggeredEvents(domElem); - self.handleColumnHighlighting(domElem); - self.setFixWidthToMakeEllipsisWork(domElem); - self.handleSummaryRow(domElem); - self.postBindEventsAndApplyStyleHook(domElem); - }, - - preBindEventsAndApplyStyleHook: function (domElem) { - - }, - postBindEventsAndApplyStyleHook: function (domElem) { - - }, - - isWidgetized: function () { - return -1 !== location.search.indexOf('module=Widgetize'); - }, - - setFixWidthToMakeEllipsisWork: function (domElem) { - var self = this; - - function getTableWidth(domElem) - { - var totalWidth = $(domElem).width(); - var totalWidthTable = $('table.dataTable', domElem).width(); // fixes tables in dbstats, referrers, ... - - if (totalWidthTable < totalWidth) { - totalWidth = totalWidthTable; - } - - if (!totalWidth) { - totalWidth = 0; - } - - return parseInt(totalWidth, 10); - } - - function getLabelWidth(domElem, tableWidth, minLabelWidth, maxLabelWidth) - { - var labelWidth = minLabelWidth; - - var columnsInFirstRow = $('tbody tr:not(.parentComparisonRow):not(.comparePeriod):eq(0) td:not(.label)', domElem); - - var widthOfAllColumns = 0; - columnsInFirstRow.each(function (index, column) { - // Round each measurement so the sum is a stable integer; raw sub-pixel widths - // made the label width (and where labels get truncated) jitter between runs. - widthOfAllColumns += Math.round($(column).outerWidth()); - }); - - if (tableWidth - widthOfAllColumns >= minLabelWidth) { - labelWidth = tableWidth - widthOfAllColumns; - } else if (widthOfAllColumns >= tableWidth) { - labelWidth = tableWidth * 0.5; - } - - var innerWidth = 0; - var innerWrapper = domElem.find('.dataTableWrapper'); - if (innerWrapper && innerWrapper.length) { - innerWidth = innerWrapper.width(); - } - - if (labelWidth > maxLabelWidth - && !self.isWidgetized() - && innerWidth !== domElem.width() - && !self.isDashboard() - ) { - labelWidth = maxLabelWidth; // prevent for instance table in Actions-Pages is not too wide - } - var allColumns = $('tr:nth-child(1) td.label', domElem).length; - var firstTableColumn = $('table:first tbody>tr:first td.label', domElem).length; - var amount = allColumns; - if (allColumns > 2 * firstTableColumn) { - amount = 2 * firstTableColumn; - } - var newWidth = parseInt(labelWidth / amount, 10) - if (newWidth == 0) { - newWidth = maxLabelWidth; // fallback to the maximum width if zero - } - return newWidth; - } - - function getLabelColumnMinWidth(domElem) - { - var minWidth = 0; - var minWidthHead = $('thead .first.label', domElem).css('minWidth'); - - if (minWidthHead) { - minWidth = parseInt(minWidthHead, 10); - } - - var minWidthBody = $('tbody tr:nth-child(1) td.label', domElem).css('minWidth'); - if (minWidthBody) { - minWidthBody = parseInt(minWidthBody, 10); - if (minWidthBody && minWidthBody > minWidth) { - minWidth = minWidthBody; - } - } - - return parseInt(minWidth, 10); - } - - function getLabelColumnMaxWidth(domElem) - { - var maxWidth = 0; - var maxWidthHead = $('thead .first.label', domElem).css('maxWidth'); - - if (maxWidthHead) { - maxWidthHead = parseInt(maxWidthHead, 10); - if (maxWidthHead > 0) { - maxWidth = parseInt(maxWidthHead, 10); - } - } - - var maxWidthBody = $('tbody tr:nth-child(1) td.label', domElem).css('maxWidth'); - - if (maxWidthBody) { - maxWidthBody = parseInt(maxWidthBody, 10); - if (maxWidthBody && maxWidthBody > 0 && (maxWidth === 0 || maxWidthBody < maxWidth)) { - maxWidth = maxWidthBody; - } - } - - return parseInt(maxWidth, 10); - } - - function removePaddingFromWidth(elem, labelWidth) { - var paddingLeft = elem.css('paddingLeft'); - paddingLeft = paddingLeft ? Math.round(parseFloat(paddingLeft)) : 0; - var paddingRight = elem.css('paddingRight'); - paddingRight = paddingRight ? Math.round(parseFloat(paddingRight)) : 0; - - if (elem.find('.prefix-numeral').length) { - labelWidth -= Math.round(parseFloat(elem.find('.prefix-numeral').outerWidth())); - } - - return labelWidth - paddingLeft - paddingRight; - } - - var isTableVisualization = this.param.viewDataTable - && typeof this.param.viewDataTable === 'string' - && typeof this.param.viewDataTable.indexOf === 'function' - && this.param.viewDataTable.indexOf('table') !== -1; - if (isTableVisualization) { - // we do this only for html tables - - var tableWidth = getTableWidth(domElem); - var labelColumnMinWidth = getLabelColumnMinWidth(domElem); - var labelColumnMaxWidth = getLabelColumnMaxWidth(domElem); - var labelColumnWidth = getLabelWidth( - domElem, - tableWidth, - self.props.min_label_width || 125, - self.props.max_label_width || 440 - ); - if (labelColumnMinWidth > labelColumnWidth) { - labelColumnWidth = labelColumnMinWidth; - } - if (labelColumnMaxWidth && labelColumnMaxWidth < labelColumnWidth) { - labelColumnWidth = labelColumnMaxWidth; - } - - // special handling if the loaded datatable is a subtable - if ($(domElem).closest('.subDataTableContainer').length) { - var parentTable = $(domElem).closest('table.dataTable'); - var tableColumns = $('table:eq(0)>thead th', domElem).length; - var parentTableColumns = $('>thead th', parentTable).length; - var labelColumn = $('>tbody td.label:eq(0)', parentTable); - var labelWidthParentTable = labelColumn.outerWidth(); - - // if the subtable has the same column count as the main table, we rearrange all tables - if (parentTableColumns === tableColumns) { - labelColumnWidth = Math.min(labelColumnWidth, labelWidthParentTable); - - // rearrange base table labels, so the tables are displayed aligned - $('>tbody>tr:not(.subDataTableContainer)>td.label', parentTable).each(function() { - $(this).css({ - width: removePaddingFromWidth($(this), labelColumnWidth) + 'px' - }); - }); - - // rearrange all subtables having the same column count - $('>tbody>tr.subDataTableContainer', parentTable).each(function() { - if ($('table:eq(0)>thead th', this).length === parentTableColumns) { - $(this).css({ - width: removePaddingFromWidth($(this), labelColumnWidth) + 'px' - }); - } - }); - } - } - - if (labelColumnWidth) { - $('td.label', domElem).each(function() { - $(this).css({ - width: removePaddingFromWidth($(this), labelColumnWidth) + 'px' - }); - }); - } - - $('td span.label', domElem).each(function () { self.tooltip($(this)); }); - } - - if (!self.windowResizeTableAttached) { - self.windowResizeTableAttached = true; - - // on resize of the window we re-calculate everything. - var timeout = null; - var windowWidth = 0; - var resizeDataTable = function() { - - if (windowWidth === $(window).width()) { - return; // only resize a data table if the width changes - } - - if (timeout) { - clearTimeout(timeout); - } - - timeout = setTimeout(function () { - var isInDom = domElem && domElem[0] && document && document.body && document.body.contains(domElem[0]); - if (isInDom) { - // as domElem might have been removed by now we check whether domElem actually still is in dom - // and do this expensive operation only if needed. - if (isTableVisualization) { - $('td.label', domElem).width(''); - } - self.setFixWidthToMakeEllipsisWork(domElem); - windowWidth = $(window).width(); - } else { - $(window).off('resize', resizeDataTable); - } - - timeout = null; - }, Math.floor((Math.random() * 80) + 220)); - // we randomize it just a little to not process all dataTables at similar time but to have a little - // delay in between for smoother resizing. we want to do it between 300 and 400ms - } - - $(window).on('resize', resizeDataTable); - self._resizeDataTable = resizeDataTable; - } - }, - - handleLimit: function (domElem) { - var tableRowLimits = this.props.datatable_row_limits || piwik.config.datatable_row_limits, - evolutionLimits = - { - day: [8, 30, 60, 90, 180], - week: [4, 12, 26, 52, 104], - month: [3, 6, 12, 24, 36, 120], - year: [3, 5, 10] - }; - - // only allow big evolution limits for non flattened reports - if (!parseInt(this.param.flat)) { - evolutionLimits.day.push(365, 500); - evolutionLimits.week.push(500); - } - - var self = this; - if (typeof self.parentId != "undefined" && self.parentId != '') { - return; - } - - if (self.props.disable_all_rows_filter_limit) { // remove the -1 value from the limits array - var tempTableRowLimits = []; - tableRowLimits.forEach(function (limit) { - if (limit != -1) { - tempTableRowLimits.push(limit); - } - }); - tableRowLimits = tempTableRowLimits; - } - - // configure limit control - var setLimitValue, numbers, limitParamName; - if (self.param.viewDataTable == 'graphEvolution') { - limitParamName = 'evolution_' + self.param.period + '_last_n'; - numbers = evolutionLimits[self.param.period] || tableRowLimits; - - setLimitValue = function (params, limit) { - params[limitParamName] = limit; - }; - } - else { - numbers = tableRowLimits; - limitParamName = 'filter_limit'; - - setLimitValue = function (params, value) { - params.filter_limit = value; - params.filter_offset = 0; - }; - } - - function getFilterLimitAsString(limit) { - if (limit == '-1') { - return _pk_translate('General_All').toLowerCase(); - } - return limit; - } - - // setup limit control - - var selectionMarkup = '
'; - - $('.limitSelection', domElem).append(selectionMarkup); - - var $limitSelect = $('.limitSelection select', domElem); - - if (!self.isEmpty) { - - $limitSelect.on('change', function (event) { - var limit = $(this).val(); - - if (limit != self.param[limitParamName]) { - setLimitValue(self.param, limit); - self.reloadAjaxDataTable(); - - var data = {}; - data[limitParamName] = self.param[limitParamName]; - self.notifyWidgetParametersChange(domElem, data); - } - }); - } - else { - $limitSelect.toggleClass('disabled'); - } - - $limitSelect.material_select(); - - $('.limitSelection input', domElem).attr('title', _pk_translate('General_RowsToDisplay')); - } - else { - $('.limitSelection', domElem).hide(); - } - }, - handlePeriod: function (domElem) { - var $periodSelect = $('.dataTablePeriods .tableIcon', domElem); - - var self = this; - $periodSelect.click(function () { - var period = $(this).attr('data-period'); - if (!period || period == self.param['period']) { - return; - } - - var piwikPeriods = window.CoreHome.Periods; - var formatDate = window.CoreHome.format; - if (self.param['dateUsedInGraph']) { - // this parameter is passed along when switching between periods. So we perfer using - // it, to avoid a change in the end date shown in the graph - var currentPeriod = piwikPeriods.parse('range', self.param['dateUsedInGraph']); - } else { - var currentPeriod = piwikPeriods.parse(self.param['period'], self.param['date']); - } - var endDateOfPeriod = currentPeriod.getDateRange()[1]; - endDateOfPeriod = formatDate(endDateOfPeriod); - - var newPeriod = piwikPeriods.get(period); - $('.periodName', domElem).html(newPeriod.getDisplayText()); - - self.param['period'] = period; - self.param['date'] = endDateOfPeriod; - self.reloadAjaxDataTable(); - }); - }, - - // if sorting the columns is enabled, when clicking on a column, - // - if this column was already the one used for sorting, we revert the order desc<->asc - // - we send the ajax request with the new sorting information - handleSort: function (domElem) { - var self = this; - - if (self.props.enable_sort) { - $('.sortable', domElem).off('click.dataTableSort').on('click.dataTableSort', - function () { - $(this).off('click.dataTableSort'); - self.onClickSort(this); - } - ); - } - - if (self.param.filter_sort_column) { - // are we in a subdatatable? - var currentIsSubDataTable = $(domElem).parent().hasClass('cellSubDataTable'); - var imageSortClassType = currentIsSubDataTable ? 'sortSubtable' : '' - var imageSortWidth = 16; - var imageSortHeight = 16; - - var sortOrder = self.param.filter_sort_order || 'desc'; - - // we change the style of the column currently used as sort column - // adding an image and the class columnSorted to the TD - var head = $('th', domElem).filter(function () { - return $(this).attr('id') == self.param.filter_sort_column; - }).addClass('columnSorted'); - - var sortIconHtml = ''; - - var div = head.find('.thDIV'); - if (head.hasClass('first') || head.attr('id') == 'label') { - div.append(sortIconHtml); - } else { - div.prepend(sortIconHtml); - } - } - }, - - //behaviour for the DataTable 'search box' - handleSearchBox: function (domElem, callbackSuccess) { - var self = this; - - var currentPattern = self.param.filter_pattern; - if (typeof self.param.filter_pattern != "undefined" - && self.param.filter_pattern.length > 0) { - currentPattern = self.param.filter_pattern; - } - else if (typeof self.param.filter_pattern_recursive != "undefined" - && self.param.filter_pattern_recursive.length > 0) { - currentPattern = self.param.filter_pattern_recursive; - } - else { - currentPattern = ''; - } - currentPattern = piwikHelper.htmlDecode(currentPattern); - - var patternsToReplace = [{from: '?', to: '\\?'}, {from: '+', to: '\\+'}, {from: '*', to: '\\*'}] - - $.each(patternsToReplace, function (index, pattern) { - if (0 === currentPattern.indexOf(pattern.to)) { - currentPattern = pattern.from + currentPattern.slice(2); - } - }); - - var $searchAction = $('.dataTableAction.searchAction', domElem); - if (!$searchAction.length) { - return; - } - - $searchAction.on('click', showSearch); - $searchAction.find('.icon-close').on('click', hideSearch); - - var $searchInput = $('.dataTableSearchInput', domElem); - - function getOptimalWidthForSearchField($searchAction) { - var controlBarWidth = $searchAction.parents('.dataTableControls').first().width(); - var spaceLeft = controlBarWidth - $searchAction.position().left; - var idealWidthForSearchBar = 250; - var minimalWidthForSearchBar = 150; // if it's only 150 pixel we still show it on same line - var width = idealWidthForSearchBar; - if (spaceLeft > minimalWidthForSearchBar && spaceLeft < idealWidthForSearchBar) { - width = spaceLeft; - } - - if (width > controlBarWidth) { - width = controlBarWidth; - } - - return width; - } - - function hideSearch(event) { - event.preventDefault(); - event.stopPropagation(); - - var $searchAction = $(this).parents('.searchAction').first(); - $searchAction.removeClass('searchActive active forceActionVisible'); - $searchAction.css('width', ''); - $searchAction.on('click', showSearch); - $searchAction.find('.icon-search').off('click', searchForPattern); - - $searchInput.val(''); - - if (currentPattern) { - // we search for this pattern so if there was a search term before, and someone closes the search - // we show all results again - searchForPattern(); - } - } - - function getTriggerField(event) { - if (typeof self.param.filter_trigger_id !== "undefined" && - self.param.filter_trigger_id.length > 0) { - return document.getElementById(self.param.filter_trigger_id); - } else { - if (event && event.target) { - if (event.target.nodeName.toLowerCase() === 'span') { - return $(event.target).siblings('input'); - } else { - return $(event.target).children('input'); - } - } - } - } - - function restoreSearchFieldFocus(event) - { - var triggerField = getTriggerField(event); - - if (triggerField) { - triggerField.focus(); - } - } - - function showSearchInputFields($searchAction) { - $searchAction.addClass('searchActive forceActionVisible'); - var width = getOptimalWidthForSearchField($searchAction); - $searchAction.css('width', width + 'px'); - $searchAction.find('.icon-search').on('click', searchForPattern); - $searchAction.off('click', showSearch); - } - - function showSearch(event) { - event.preventDefault(); - event.stopPropagation(); - - showSearchInputFields($(this)); - restoreSearchFieldFocus(event); - } - - - function searchForPattern(event) { - var keyword = ''; - if (event) { - var $input; - if (event.target.tagName.toLowerCase() === 'input') { - $input = $(event.target); - } else if (event.target.tagName.toLowerCase() === 'span') { - $input = $(event.target).siblings('input'); - } - - if ($input && $input.length) { - keyword = $input.val(); - self.param.filter_trigger_id = $input.attr('id'); - } - } - - if (!keyword && !currentPattern) { - // we search only if a keyword is actually given, or if no keyword is given and a search was performed - // before (in this case we want to clear the search basically.) - return; - } - - self.param.filter_offset = 0; - - $.each(patternsToReplace, function (index, pattern) { - if (0 === keyword.indexOf(pattern.from)) { - keyword = pattern.to + keyword.slice(1); - } - }); - - if (self.param.search_recursive) { - self.param.filter_column_recursive = 'label'; - self.param.filter_pattern_recursive = keyword; - } - else { - self.param.filter_column = 'label'; - self.param.filter_pattern = keyword; - } - - delete self.param.totalRows; - - self.reloadAjaxDataTable(true, callbackSuccess); - } - - $searchInput.on("keyup", function (e) { - if (isEnterKey(e)) { - searchForPattern(e); - } else if (isEscapeKey(e)) { - $searchAction.find('.icon-close').click(); - } - }); - - $searchInput.on("blur", function () { - delete self.param.filter_trigger_id; - }); - - var $dataTable = $searchInput.parents('.dataTable').first(); - if (currentPattern) { - $dataTable.addClass('hasSearchKeyword'); - $searchInput.val(currentPattern); - showSearchInputFields($searchAction); - restoreSearchFieldFocus(); - } else { - $dataTable.removeClass('hasSearchKeyword'); - } - - if (this.isEmpty && !currentPattern) { - $searchAction.css({display: 'none'}); - } - }, - - //behaviour for '< prev' 'next >' links and page count - handleOffsetInformation: function (domElem) { - var self = this; - - $('.dataTablePages', domElem).each( - function () { - var offset = 1 + Number(self.param.filter_offset); - var offsetEnd = Number(self.param.filter_offset) + Number(self.param.filter_limit); - var totalRows = Number(self.param.totalRows); - var offsetEndDisp = offsetEnd; - - if (self.param.keep_summary_row == 1) --totalRows; - - if (offsetEnd > totalRows || Number(self.param.filter_limit) == -1) offsetEndDisp = totalRows; - - // only show this string if there is some rows in the datatable - if (totalRows != 0) { - var str = sprintf(_pk_translate('General_Pagination'), offset, offsetEndDisp, totalRows); - $(this).text(str); - } else { - $(this).hide(); - } - } - ); - - var $next = $('.dataTableNext', domElem); - - // Display the next link if the total Rows is greater than the current end row - // and filter_limit is a positive number (not "show all") - $next.each(function () { - var offsetEnd = Number(self.param.filter_offset) - + Number(self.param.filter_limit); - var totalRows = Number(self.param.totalRows); - if (self.param.keep_summary_row == 1) --totalRows; - if (offsetEnd < totalRows && Number(self.param.filter_limit) > 0) { - $(this).css('visibility', 'visible'); - } - }); - // bind the click event to trigger the ajax request with the new offset - $next.off('click'); - $next.click(function () { - $(this).off('click'); - self.param.filter_offset = Number(self.param.filter_offset) + Number(self.param.filter_limit); - self.reloadAjaxDataTable(); - }); - - var $prev = $('.dataTablePrevious', domElem); - - // Display the previous link if the current offset is not zero - $prev.each(function () { - var offset = 1 + Number(self.param.filter_offset); - if (offset != 1) { - $(this).css('visibility', 'visible'); - } - }); - - // bind the click event to trigger the ajax request with the new offset - // take care of the negative offset, we setup 0 - $prev.off('click'); - $prev.click(function () { - $(this).off('click'); - var offset = Number(self.param.filter_offset) - Number(self.param.filter_limit); - if (offset < 0) { offset = 0; } - self.param.filter_offset = offset; - self.param.previous = 1; - self.reloadAjaxDataTable(); - }); - }, - - handleEvolutionAnnotations: function (domElem) { - var self = this; - if ((self.param.viewDataTable === 'graphEvolution' || self.param.viewDataTable === 'graphStackedBarEvolution') - && $('.annotationView', domElem).length > 0) { - // get dates w/ annotations across evolution period (have to do it through AJAX since we - // determine placement using the elements created by jqplot) - - $('.dataTableFeatures', domElem).addClass('hasEvolution'); - - piwik.annotations.api.getEvolutionIcons( - self.param.idSite, - self.param.date, - self.param.period, - self.param['evolution_' + self.param.period + '_last_n'], - function (response) { - var annotations = $(response), - datatableFeatures = $('.dataTableFeatures', domElem), - noteSize = 16, - annotationAxisHeight = 30 // css height + padding + margin - ; - - var annotationsCss = {left: 6}; // padding-left of .jqplot-graph element (in _dataTableViz_jqplotGraph.tpl) - - // set position of evolution annotation icons - annotations.css(annotationsCss); - - piwik.annotations.placeEvolutionIcons(annotations, domElem); - - piwik.annotations.placeEvolutionAnnotations(annotations, domElem); - - // reposition annotation icons every time the graph is resized - $('.piwik-graph', domElem).on('resizeGraph', function () { - piwik.annotations.placeEvolutionIcons(annotations, domElem); - }); - - // on hover of x-axis, show note icon over correct part of x-axis - datatableFeatures.on('mouseenter', '.evolution-annotations>span', function () { - $(this).css('opacity', 1); - }); - - datatableFeatures.on('mouseleave', '.evolution-annotations>span', function () { - if ($(this).attr('data-count') == 0) // only hide if there are no annotations for this note - { - $(this).css('opacity', 0); - } - }); - - // when clicking an annotation, show the annotation viewer for that period - datatableFeatures.on('click', '.evolution-annotations>span', function () { - var spanSelf = $(this), - date = spanSelf.attr('data-date'), - oldDate = $('.annotation-manager', domElem).attr('data-date'); - if (date) { - var period = self.param.period; - if (period == 'range') { - period = 'day'; - } - - piwik.annotations.showAnnotationViewer( - domElem, - self.param.idSite, - date, - period, - undefined, // lastN - function (manager) { - manager.attr('data-is-range', 0); - $('.annotationView', domElem) - .attr('title', _pk_translate('Annotations_IconDesc')); - - var viewAndAdd = _pk_translate('Annotations_ViewAndAddAnnotations'), - hideNotes = _pk_translate('Annotations_HideAnnotationsFor'); - - // change the tooltip of the previously clicked evolution icon (if any) - if (oldDate) { - $('span', annotations).each(function () { - if ($(this).attr('data-date') == oldDate) { - $(this).attr('title', sprintf(viewAndAdd, oldDate)); - return false; - } - }); - } - - // change the tooltip of the clicked evolution icon - if (manager.is(':hidden')) { - spanSelf.attr('title', sprintf(viewAndAdd, date)); - } - else { - spanSelf.attr('title', sprintf(hideNotes, date)); - } - } - ); - } - }); - - // when hover over annotation in annotation manager, highlight the annotation - // icon - var runningAnimation = null; - domElem.on('mouseenter', '.annotation', function (e) { - var date = $(this).attr('data-date'); - - // find the icon for this annotation - var icon = $(); - $('span', annotations).each(function () { - if ($(this).attr('data-date') == date) { - icon = $('img', this); - return false; - } - }); - - if (icon[0] == runningAnimation) // if the animation is already running, do nothing - { - return; - } - - // stop ongoing animations - $('span', annotations).each(function () { - $('img', this).removeAttr('style'); - }); - - // start a bounce animation - icon.effect("bounce", {times: 1, distance: 10}, 1000); - runningAnimation = icon[0]; - }); - - // reset running animation item when leaving annotations list - domElem.on('mouseleave', '.annotations', function (e) { - runningAnimation = null; - }); - - self.$element.trigger('piwik:annotationsLoaded'); - } - ); - } - }, - - handleAnnotationsButton: function (domElem) { - var self = this; - if (self.param.idSubtable) // no annotations for subtables, just whole reports - { - return; - } - - // show the annotations view on click - $('.annotationView', domElem).click(function () { - var annotationManager = $('.annotation-manager', domElem); - - if (annotationManager.length > 0 - && annotationManager.attr('data-is-range') == 1) { - if (annotationManager.is(':hidden')) { - annotationManager.slideDown('slow'); // showing - $(this).attr('title', _pk_translate('Annotations_IconDescHideNotes')); - } - else { - annotationManager.slideUp('slow'); // hiding - $(this).attr('title', _pk_translate('Annotations_IconDesc')); - } - } - else { - // show the annotation viewer for the whole date range - var lastN = self.param['evolution_' + self.param.period + '_last_n']; - piwik.annotations.showAnnotationViewer( - domElem, - self.param.idSite, - self.param.date, - self.param.period, - lastN, - function (manager) { - manager.attr('data-is-range', 1); - } - ); - - // change the tooltip of the view annotation icon - $(this).attr('title', _pk_translate('Annotations_IconDescHideNotes')); - } - }); - }, - - // DataTable view box (simple table, all columns table, Goals table, pie graph, tag cloud, graph, ...) - handleExportBox: function (domElem) { - var self = this; - if (self.param.idSubtable) { - // no view box for subtables - return; - } - - //footer arrow position element name - self.jsViewDataTable = self.param.viewDataTable; - - $('.tableAllColumnsSwitch a', domElem).show(); - - $('.dataTableFooterIcons .tableIcon', domElem).click(function () { - var id = $(this).attr('data-footer-icon-id'); - if (!id) { - return; - } - - var handler = DataTable._footerIconHandlers[id]; - if (!handler) { - handler = DataTable._footerIconHandlers['table']; - } - - handler(self, id); - }); - - //Graph icon Collapsed functionality - self.currentGraphViewIcon = 0; - self.graphViewEnabled = 0; - self.graphViewStartingThreads = 0; - self.graphViewStartingKeep = false; //show keep flag - }, - - handleConfigurationBox: function (domElem, callbackSuccess) { - var self = this; - - if (typeof self.parentId != "undefined" && self.parentId != '') { - // no manipulation when loading subtables - return; - } - - if ((typeof self.numberOfSubtables == 'undefined' || self.numberOfSubtables == 0) - && (typeof self.param.flat == 'undefined' || self.param.flat != 1) - ) { - // if there are no subtables, remove the flatten action from all data table actions - var dataTableActionsVueApps = $('[vue-entry="CoreHome.DataTableActions"]', domElem); - if (dataTableActionsVueApps.length) { - dataTableActionsVueApps.each(function() { - var appData = $(this).data('vueAppInstance'); - if (appData) { - appData.showFlattenTable_ = false; - } - }); - } - } - - var ul = $('ul.tableConfiguration', domElem); - if (!ul.find('li').length) { - return; - } - - var generateClickCallback = function (paramName, callbackAfterToggle, setParamCallback) { - return function () { - if (setParamCallback) { - var data = setParamCallback(); - } else { - self.param[paramName] = (1 - (self.param[paramName] || 0)) + ''; - var data = {}; - } - self.param.filter_offset = 0; - delete self.param.totalRows; - if (callbackAfterToggle) callbackAfterToggle(); - self.reloadAjaxDataTable(true, callbackSuccess); - data[paramName] = self.param[paramName]; - self.notifyWidgetParametersChange(domElem, data); - }; - }; - - // handle low population - $('.dataTableExcludeLowPopulation', domElem) - .click(generateClickCallback('enable_filter_excludelowpop')); - - // handle flatten - $('.dataTableFlatten', domElem) - .click(generateClickCallback('flat')); - - // handle flatten - $('.dataTableShowTotalsRow', domElem) - .click(generateClickCallback('keep_totals_row')); - - $('.dataTableIncludeAggregateRows', domElem) - .click(generateClickCallback('include_aggregate_rows', function () { - if (self.param.include_aggregate_rows == 1) { - // when including aggregate rows is enabled, we remove the sorting - // this way, the aggregate rows appear directly before their children - self.param.filter_sort_column = ''; - self.notifyWidgetParametersChange(domElem, {filter_sort_column: ''}); - } - })); - - $('.dataTableShowDimensions', domElem) - .click(generateClickCallback('show_dimensions')); - - // handle pivot by - $('.dataTablePivotBySubtable', domElem) - .click(generateClickCallback('pivotBy', null, function () { - if (self.param.pivotBy - && self.param.pivotBy != '0' - ) { - self.param.pivotBy = '0'; // set to '0' so it will be sent in the request and override the saved param - self.param.pivotByColumn = '0'; - } else { - self.param.pivotBy = self.props.pivot_by_dimension; - if (self.props.pivot_by_column) { - self.param.pivotByColumn = self.props.pivot_by_column; - } - } - - // remove sorting so it will default to first column in table - self.param.filter_sort_column = ''; - return {filter_sort_column: ''}; - })); - }, - - findUniqueWidgetId: function (domWidget) { - // on dashboards, widget have widgetId attribute - var widget = $(domWidget).closest('[widgetId]'); - if (widget && widget.length && widget[0].hasAttribute('widgetId')) { - return widget[0].getAttribute('widgetId'); - } - - // on pages other than the dashboard the ID is on a different element - widget = $(domWidget).closest('.matomo-widget'); - if (widget && widget.length && widget[0].hasAttribute('id')) { - return widget[0].getAttribute('id'); - } - - return ''; - }, - - getFilterParams: function (params) { - return Object.keys(params) - .filter(key => key.startsWith('filter_column') || key.startsWith('filter_pattern')) - .reduce((filterParams, key) => { - filterParams[key] = params[key]; - return filterParams; - }, {}); - }, - - notifyWidgetParametersChange: function (domWidget, parameters) { - var widget = $(domWidget).closest('[widgetId],[containerid]'); - // trigger setParameters event on base element - - // Tell parent widget that the parameters of this table were updated, but only if we're not part of a widget - // container. widget containers send ajax requests for each child widget, and the child widgets' parameters - // are not saved with the container widget. - if (widget && widget.length && widget[0].hasAttribute('widgetId')) { - widget.trigger('setParameters', parameters); - } else { - if (!piwik.isUserIsAnonymous) { - var containerId = widget && widget.length ? widget.attr('containerid') : undefined; - var reportId = $(domWidget).closest('[data-report]').attr('data-report'); - - var ajaxRequest = new ajaxHelper(); - ajaxRequest.addParams({ - module: 'CoreHome', - action: 'saveViewDataTableParameters', - report_id: reportId, - containerId: containerId - }, 'get'); - ajaxRequest.withTokenInUrl(); - ajaxRequest.addParams({ - parameters: JSON.stringify(parameters) - }, 'post'); - ajaxRequest.setCallback(function () { - }); - ajaxRequest.setFormat('html'); - ajaxRequest.send(); - } - } - }, - - tooltip: function (domElement) { - - function isTextEllipsized($element) - { - return !($element && $element[0] && $element.outerWidth() >= $element[0].scrollWidth); - } - - var $domElement = $(domElement); - - if ($domElement.data('tooltip') == 'enabled') { - return; - } - - $domElement.data('tooltip', 'enabled'); - - if (!isTextEllipsized($domElement)) { - return; - } - - var customToolTipText = $domElement.attr('title') || $domElement.text(); - - if (customToolTipText) { - $domElement.attr('title', customToolTipText); - } - - $domElement.tooltip({ - track: true, - show: false, - hide: false - }); - }, - - //Apply some miscelleaneous style to the DataTable - applyCosmetics: function (domElem) { - // empty - }, - - handleColumnHighlighting: function (domElem) { - - var currentNthChild = null; - var self = this; - - // highlight all columns on hover - $(domElem).on('mouseenter', 'td:not(.cellSubDataTable)', function (e) { - e.stopPropagation(); - var $this = $(e.target); - if ($this.hasClass('label')) { - return; - } - - var table = $this.closest('table'); - var nthChild = $this.parent('tr').children().index($(e.target)) + 1; - var rows = $('> tbody > tr', table); - - if (currentNthChild === nthChild) { - return; - } - - currentNthChild = nthChild; - - rows.children("td:nth-child(" + (nthChild) + ")").addClass('highlight'); - self.repositionRowActions($this.parent('tr')); - }); - - $(domElem).on('mouseleave', 'td', function(event) { - var $this = $(event.target); - var table = $this.closest('table'); - var $parentTr = $this.parent('tr'); - var tr = $parentTr.children(); - var nthChild = $parentTr.children().index($this); - var targetTd = $(event.relatedTarget).closest('td'); - var nthChildTarget = targetTd.parent('tr').children().index(targetTd); - - if (nthChild == nthChildTarget) { - return; - } - - currentNthChild = null; - - var rows = $('tr', table); - rows.find("td:nth-child(" + (nthChild + 1) + ")").removeClass('highlight'); - }); - }, - - getComparisonIdSubtables: function ($row) { - if ($row.is('.parentComparisonRow')) { - var comparisonRows = $row.nextUntil('.parentComparisonRow').filter('.comparisonRow'); - - var comparisonIdSubtables = {}; - comparisonRows.each(function () { - var comparisonSeriesIndex = +$(this).data('comparison-series'); - comparisonIdSubtables[comparisonSeriesIndex] = $(this).data('idsubtable'); - }); - - return JSON.stringify(comparisonIdSubtables); - } - return undefined; - }, - - //behaviour for 'nested DataTable' (DataTable loaded on a click on a row) - handleSubDataTable: function (domElem) { - var self = this; - // When the TR has a subDataTable class it means that this row has a link to a subDataTable - self.numberOfSubtables = $('tr.subDataTable', domElem) - .click( - function () { - // get the idSubTable - var idSubTable = $(this).attr('id'); - var divIdToReplaceWithSubTable = 'subDataTable_' + idSubTable; - - // if the subDataTable is not already loaded - if (typeof self.loadedSubDataTable[divIdToReplaceWithSubTable] == "undefined") { - var numberOfColumns = $(this).closest('table').find('thead tr').first().children().length; - - var $insertAfter = $(this).nextUntil(':not(.comparePeriod):not(.comparisonRow)').last(); - if (!$insertAfter.length) { - $insertAfter = $(this); - } - - // at the end of the query it will replace the ID matching the new HTML table #ID - // we need to create this ID first - var newRow = $insertAfter.after( - '' + - '' + - '
' + - '' + _pk_translate('General_Loading') + '' + - '
' + - '' + - '' - ); - - piwikHelper.lazyScrollTo(newRow); - - var savedActionVariable = self.param.action; - - // reset all the filters from the Parent table - var filtersToRestore = self.resetAllFilters(); - // do not ignore the exclude low population click - self.param.enable_filter_excludelowpop = filtersToRestore.enable_filter_excludelowpop; - - self.param.idSubtable = idSubTable; - self.param.action = self.props.subtable_controller_action; - - delete self.param.totalRows; - - var extraParams = {}; - extraParams.comparisonIdSubtables = self.getComparisonIdSubtables($(this)); - - self.reloadAjaxDataTable(false, function(response) { - self.dataTableLoaded(response, divIdToReplaceWithSubTable); - }, extraParams); - - self.param.action = savedActionVariable; - delete self.param.idSubtable; - self.restoreAllFilters(filtersToRestore); - - self.loadedSubDataTable[divIdToReplaceWithSubTable] = true; - - // when "loading..." is displayed, hide actions - // repositioning after loading is not easily possible - $(this).find('div.dataTableRowActions').hide(); - } else { - var $toToggle = $(this).nextUntil('.subDataTableContainer').last(); - $toToggle = $toToggle.length ? $toToggle : $(this); - $toToggle.next().toggle(); - } - - $(this).toggleClass('expanded'); - self.repositionRowActions($(this)); - } - ).length; - }, - - // tooltip for column documentation - handleColumnDocumentation: function (domElem) { - if (this.isDashboard()) { - // don't display column documentation in dashboard - // it causes trouble in full screen view - return; - } - - $('th:has(.columnDocumentation)', domElem).each(function () { - var th = $(this); - var tooltip = th.find('.columnDocumentation'); - - tooltip.next().hover(function () { - var left = (-1 * tooltip.outerWidth() / 2) + th.width() / 2; - var top = -1 * tooltip.outerHeight(); - var thPos = th.position(); - var distance = tooltip.parent().offset().top; - var scroller = tooltip.closest('.dataTableScroller'); - - var thPosTop = 0; - - if (thPos && thPos.top) { - thPosTop = thPos.top; - } - - // we need to add thPosTop because the parent th is not position:relative. There may be a gap for the - // headline - top = top + thPosTop; - - if ($(window).scrollTop() >= distance - 100 || scroller.css('overflow-x')==='scroll') { - top = tooltip.parent().outerHeight() - } - - if (!th.next().length) { - left = (-1 * tooltip.outerWidth()) + th.width() + - parseInt(th.css('padding-right'), 10); - } - - if (th.offset().top + top < 0) { - top = thPosTop + th.outerHeight(); - } - - tooltip.css({ - marginLeft: left, - marginTop: top, - top: 0 - }); - - $(".dataTable thead").addClass('with-z-index'); - tooltip.stop(true, true).fadeIn(250); - }, - function () { - $(this).prev().stop(true, true).fadeOut(250); - $(".dataTable thead").removeClass('with-z-index'); - }); - }); - }, - - handleRowActions: function (domElem) { - this.doHandleRowActions(domElem.find('table > tbody > tr')); - }, - - handleCellTooltips: function(domElem) { - domElem.find('span.cell-tooltip').tooltip({ - track: true, - items: 'span', - content: function() { - return $(this).parent().data('tooltip'); - }, - show: false, - hide: false, - tooltipClass: 'small' - }); - domElem.find('span.ratio').tooltip({ - track: true, - content: function() { - var title = $(this).attr('title'); - return piwikHelper.escape(title.replace(/\n/g, '
')); - }, - show: {delay: 700, duration: 200}, - hide: false - }) - }, - - handleRelatedReports: function (domElem) { - var self = this, - hideShowRelatedReports = function (thisReport) { - $('span', $(thisReport).parent().parent()).each(function () { - if (thisReport == this) - $(this).hide(); - else - $(this).show(); - }); - }, - // 'this' report must be hidden in datatable output - thisReport = $('.datatableRelatedReports span:hidden', domElem)[0]; - - function replaceReportTitleAndHelp(domElem, relatedReportName) { - if (!domElem || !domElem.length) { - return; - } - - var $title = ''; - var $headline = domElem.prev('h2'); - - if ($headline.length) { - $title = $headline.find('.title:not(.ng-hide)'); - } else { - var $widget = domElem.parents('.widget'); - if ($widget.length) { - $title = $widget.find('.widgetName > span'); - } - } - - if ($title.length) { - $title.text(relatedReportName); - - var scope = $title.scope(); - - if (scope) { - var $doc = domElem.find('.reportDocumentation'); - if ($doc.length) { - // hackish solution to get binded html of p tag within the help node - // at this point the ng-bind-html is not yet converted into html when report is not - // initially loaded. Using $compile doesn't work. So get and set it manually - var helpParagraph = $doc.attr('data-content'); - - if (helpParagraph.length) { - helpParagraph.html(window.vueSanitize(helpParagraph)); - } - - scope.inlineHelp = $.trim($doc.html()); - - } - scope.featureName = $.trim(relatedReportName); - setTimeout(function (){ - scope.$apply(); - }, 1); - } - } - } - - hideShowRelatedReports(thisReport); - - var relatedReports = $('.datatableRelatedReports span', domElem); - - if (!relatedReports.length) { - $('.datatableRelatedReports', domElem).hide(); - } - - relatedReports.each(function () { - var clicked = this; - $(this).unbind('click').click(function (e) { - var $this = $(this); - var url = $this.attr('href'); - - // modify parameters - self.resetAllFilters(); - var newParams = broadcast.getValuesFromUrl(url); - var isSecondaryDimensionReport = self.param.module === newParams.module && self.param.action === newParams.action && newParams.secondaryDimension; - - for (var key in newParams) { - self.param[key] = decodeURIComponent(newParams[key]); - } - - delete self.param.pivotBy; - delete self.param.pivotByColumn; - - var relatedReportName = $this.text(); - - // do ajax request - self.reloadAjaxDataTable(true, (function (relatedReportName, isSecondaryDimensionReport) { - - return function (newReport) { - var newDomElem = self.dataTableLoaded(newReport, self.workingDivId); - hideShowRelatedReports(clicked); - if (!isSecondaryDimensionReport) { - replaceReportTitleAndHelp(newDomElem, relatedReportName); - } - } - })(relatedReportName, isSecondaryDimensionReport)); - }); - }); - }, - - /** - * Handle events that other code triggers on this table. - * - * You can trigger one of these events to get the datatable to do things, - * such as reload its data. - * - * Events handled: - * - reload: Triggering 'reload' on a datatable DOM element will - * reload the datatable's data. You can pass in an object mapping - * parameters to set before reloading data. - * - * $(datatableDomElem).trigger('reload', {columns: 'nb_visits,nb_actions', idSite: 2}); - */ - handleTriggeredEvents: function (domElem) { - var self = this; - - // reload datatable w/ new params if desired (NOTE: must use 'bind', not 'on') - $(domElem).bind('reload', function (e, paramOverride) { - paramOverride = paramOverride || {}; - for (var name in paramOverride) { - self.param[name] = paramOverride[name]; - } - - self.reloadAjaxDataTable(true); - }); - }, - - handleSummaryRow: function (domElem) { - var details = _pk_translate('General_LearnMore', [' (', ')']); - - domElem.find('tr.summaryRow').each(function () { - var labelSpan = $(this).find('.label .value').filter(function(index, elem){ - return $(elem).text() != '-'; - }).last(); - var defaultLabel = labelSpan.text(); - - $(this).hover(function() { - labelSpan.html(piwikHelper.htmlEntities(defaultLabel) + details); - }, - function() { - labelSpan.text(defaultLabel); - }); - }); - }, - - // also used in action data table - doHandleRowActions: function (trs) { - if (!trs || !trs.length || !trs[0]) { - return; - } - var parent = $(trs[0]).closest('table'); - - var self = this; - - var merged = $.extend({}, self.param, self.props); - var availableActionsForReport = DataTable_RowActions_Registry.getAvailableActionsForReport(merged); - - if (availableActionsForReport.length == 0) { - return; - } - - var actionInstances = {}; - for (var i = 0; i < availableActionsForReport.length; i++) { - var action = availableActionsForReport[i]; - actionInstances[action.name] = action.createInstance(self); - } - - var useTouchEvent = false; - var listenEvent = 'mouseenter'; - var userAgent = String(navigator.userAgent).toLowerCase(); - if (userAgent.match(/(iPod|iPhone|iPad|Android|IEMobile|Windows Phone)/i)) { - useTouchEvent = true; - listenEvent = 'click'; - } - - parent.on(listenEvent, 'tr:not(.subDataTableContainer)', function () { - var tr = this; - var $tr = $(tr); - var td = $tr.find('td.label:last'); - - // call initTr on all actions that are available for the report - for (var i = 0; i < availableActionsForReport.length; i++) { - var action = availableActionsForReport[i]; - actionInstances[action.name].initTr($tr); - } - - // if there are row actions, make sure the first column is not too narrow - td.css('minWidth', $tr.is('.comparisonRow') ? '117px' : '145px'); - - if ($(this).is('.parentComparisonRow,.comparePeriod').length) { - return; - } - - if (useTouchEvent && tr.actionsDom && tr.actionsDom.prop('rowActionsVisible')) { - tr.actionsDom.prop('rowActionsVisible', false); - tr.actionsDom.hide(); - return; - } - - if (!tr.actionsDom) { - // create dom nodes on the fly - tr.actionsDom = self.createRowActions(availableActionsForReport, $tr, actionInstances); - td.prepend(tr.actionsDom); - } - - // reposition and show the actions - self.repositionRowActions($tr); - if ($(window).width() >= 600 || useTouchEvent) { - tr.actionsDom.show(); - } - - if (useTouchEvent) { - tr.actionsDom.prop('rowActionsVisible', true); - } - }); - if (!useTouchEvent) { - parent.on('mouseleave', 'tr', function () { - var tr = this; - if (tr.actionsDom) { - tr.actionsDom.hide(); - } - }); - } - }, - - createRowActions: function (availableActionsForReport, tr, actionInstances) { - var container = $(document.createElement('div')).addClass('dataTableRowActions'); - - for (var i = availableActionsForReport.length - 1; i >= 0; i--) { - var action = availableActionsForReport[i]; - - if (!action.isAvailableOnRow(this.param, tr)) { - continue; - } - - var actionEl = $(document.createElement('a')).attr({href: '#'}).addClass('action' + action.name); - - if (action.dataTableIcon.indexOf('icon-') === 0) { - actionEl.append($(document.createElement('span')).addClass(action.dataTableIcon + ' rowActionIcon')); - } else { - actionEl.append($(document.createElement('img')).attr({src: action.dataTableIcon})); - } - - container.append(actionEl); - - if (i == availableActionsForReport.length - 1) { - actionEl.addClass('leftmost'); - } - if (i == 0) { - actionEl.addClass('rightmost'); - } - - actionEl.click((function (action, el) { - return function (e) { - $(this).blur().tooltip('close'); - container.hide(); - if (typeof actionInstances[action.name].onClick == 'function') { - return actionInstances[action.name].onClick(el, tr, e); - } - actionInstances[action.name].trigger(tr, e); - return false; - } - })(action, actionEl)); - - if (typeof action.dataTableIconHover != 'undefined') { - actionEl.append($(document.createElement('img')).attr({src: action.dataTableIconHover}).hide()); - - actionEl.hover(function () { - var img = $(this).find('img'); - img.eq(0).hide(); - img.eq(1).show(); - }, - function () { - var img = $(this).find('img'); - img.eq(1).hide(); - img.eq(0).show(); - }); - } - - if (typeof action.dataTableIconTooltip != 'undefined') { - actionEl.tooltip({ - track: true, - items: 'a', - content: '

'+action.dataTableIconTooltip[0]+'

'+action.dataTableIconTooltip[1], - tooltipClass: 'rowActionTooltip', - // ensure the tooltips of parent elements are hidden when the action tooltip is shown - // otherwise it can happen that tooltips for subtable rows are shown as well. - open: function() { - var tooltip = $(this).parents('.matomo-widget').tooltip('instance'); - if (tooltip) { - tooltip.disable(); - } - }, - close: function() { - var tooltip = $(this).parents('.matomo-widget').tooltip('instance'); - if (tooltip) { - tooltip.enable(); - } - }, - show: false, - hide: false - }); - } - } - - return container; - }, - - repositionRowActions: function (tr) { - if (!tr) { - return; - } - - var td = tr.find('td.label:last'); - var actions = tr.find('div.dataTableRowActions'); - - if (!actions) { - return; - } - - actions.height(tr.innerHeight() - 6); - actions.css('marginLeft', (td.width() - 3 - actions.outerWidth()) + 'px'); - }, - - _findReportHeader: function (domElem) { - var h2 = false; - if (domElem.prev().is('h2')) { - h2 = domElem.prev(); - } - else if (this.param.viewDataTable == 'tableGoals') { - h2 = $('#titleGoalsByDimension'); - } - else if ($('h2', domElem)) { - h2 = $('h2', domElem); - } - return h2; - }, - - _createDivId: function () { - return 'dataTable_' + this._controlId; - } -}); - -// handle switch to All Columns/Goals/HtmlTable DataTable visualization -var switchToHtmlTable = function (dataTable, viewDataTable) { - // we only reset the limit filter, in case switch to table view from cloud view where limit is custom set to 30 - // this value is stored in config file General->datatable_default_limit but this is more an edge case so ok to set it to 10 - - dataTable.param.viewDataTable = viewDataTable; - - // when switching to display simple table, do not exclude low pop by default - delete dataTable.param.enable_filter_excludelowpop; - delete dataTable.param.filter_sort_column; - delete dataTable.param.filter_sort_order; - delete dataTable.param.columns; - delete dataTable.param.totals; - dataTable.reloadAjaxDataTable(); - dataTable.notifyWidgetParametersChange(dataTable.$element, {viewDataTable: viewDataTable}); -}; - -var switchToEcommerceView = function (dataTable, viewDataTable) { - if (viewDataTable == 'ecommerceOrder') { - dataTable.param.abandonedCarts = '0'; - } else { - dataTable.param.abandonedCarts = '1'; - } - - var viewDataTable = dataTable.param.viewDataTable; - if (viewDataTable == 'ecommerceOrder' || viewDataTable == 'ecommerceAbandonedCart') { - viewDataTable = 'table'; - } - - switchToHtmlTable(dataTable, viewDataTable); -}; - -DataTable.registerFooterIconHandler('table', switchToHtmlTable); -DataTable.registerFooterIconHandler('tableAllColumns', switchToHtmlTable); -DataTable.registerFooterIconHandler('tableGoals', switchToHtmlTable); -DataTable.registerFooterIconHandler('ecommerceOrder', switchToEcommerceView); -DataTable.registerFooterIconHandler('ecommerceAbandonedCart', switchToEcommerceView); - -// generic function to handle switch to graph visualizations -DataTable.switchToGraph = function (dataTable, viewDataTable) { - var filters = dataTable.resetAllFilters(); - dataTable.param.flat = filters.flat; - dataTable.param.keep_totals_row = filters.keep_totals_row; - dataTable.param.columns = filters.columns; - - dataTable.param.viewDataTable = viewDataTable; - dataTable.reloadAjaxDataTable(); - dataTable.notifyWidgetParametersChange(dataTable.$element, {viewDataTable: viewDataTable}); -}; - -DataTable.registerFooterIconHandler('cloud', DataTable.switchToGraph); - -exports.DataTable = DataTable; - -})(jQuery, require); diff --git a/plugins/CoreHome/javascripts/dataTable_rowactions.js b/plugins/CoreHome/javascripts/dataTable_rowactions.js deleted file mode 100644 index 83e4baaa84e35e58a7044f2d8bb60663ad0ee67f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/dataTable_rowactions.js +++ /dev/null @@ -1,724 +0,0 @@ -/** - * Registry for row actions - * - * Plugins can call DataTable_RowActions_Registry.register() from their JS - * files in order to add new actions to arbitrary data tables. The register() - * method takes an object containing: - * - name: string identifying the action. must be short, no spaces. - * - dataTableIcon: path to the icon for the action - * - createInstance: a factory method to create an instance of the appropriate - * subclass of DataTable_RowAction - * - isAvailable: a method to determine whether the action is available in a - * given row of a data table - */ -var DataTable_RowActions_Registry = { - - registry: [], - - register: function (action) { - var createInstance = action.createInstance; - action.createInstance = function (dataTable, param) { - var instance = createInstance(dataTable, param); - instance.actionName = action.name; - return instance; - }; - - this.registry.push(action); - }, - - getAvailableActionsForReport: function (dataTableParams, tr) { - if (dataTableParams.disable_row_actions == '1') { - return []; - } - - var available = []; - for (var i = 0; i < this.registry.length; i++) { - if (this.registry[i].isAvailableOnReport(dataTableParams, tr)) { - available.push(this.registry[i]); - } - } - available.sort(function (a, b) { - return b.order - a.order; - }); - return available; - }, - - getActionByName: function (name) { - for (var i = 0; i < this.registry.length; i++) { - if (this.registry[i].name == name) { - return this.registry[i]; - } - } - return false; - } - -}; - -// Register Row Evolution (also servers as example) -DataTable_RowActions_Registry.register({ - - name: 'RowEvolution', - - dataTableIcon: 'icon-evolution', - - order: 50, - - dataTableIconTooltip: [ - _pk_translate('General_RowEvolutionRowActionTooltipTitle'), - _pk_translate('General_RowEvolutionRowActionTooltip') - ], - - createInstance: function (dataTable, param) { - if (dataTable !== null && typeof dataTable.rowEvolutionActionInstance != 'undefined') { - return dataTable.rowEvolutionActionInstance; - } - - if (dataTable === null && param) { - // when row evolution is triggered from the url (not a click on the data table) - // we look for the data table instance in the dom - // This actually doesn't work very good, as opening a row evolution using url params - // directly also triggers loading the report datatable, which might not yet be finished at - // this state, so the datatable might not yet be available - // When migrating/refactoring this it might be good to use promises in some way, so it would - // be possible to actually trigger the row evolution popover once the origin report was loaded. - var report = param.split(':')[0]; - var div = $(require('piwik/UI').DataTable.getDataTableByReport(report)); - if (div.length && div.data('uiControlObject')) { - dataTable = div.data('uiControlObject'); - if (typeof dataTable.rowEvolutionActionInstance != 'undefined') { - return dataTable.rowEvolutionActionInstance; - } - } - } - - var instance = new DataTable_RowActions_RowEvolution(dataTable); - if (dataTable !== null) { - dataTable.rowEvolutionActionInstance = instance; - } - return instance; - }, - - isAvailableOnReport: function (dataTableParams) { - return ( - typeof dataTableParams.disable_row_evolution == 'undefined' - || dataTableParams.disable_row_evolution == "0" - ); - }, - - isAvailableOnRow: function (dataTableParams, tr) { - return !tr.hasClass('totalsRow'); - } - -}); - -/** - * DataTable Row Actions - * - * The lifecycle of an action is as follows: - * - for each data table, a new instance of the action is created using the factory - * - when the table is loaded, initTr is called for each tr - * - when the action icon is clicked, trigger is called - * - the label is put together and performAction is called - * - performAction must call openPopover on the base class - * - openPopover calls back doOpenPopover after doing general stuff - * - * The two template methods are performAction and doOpenPopover - */ - -// -// BASE CLASS -// - -function DataTable_RowAction(dataTable) { - this.dataTable = dataTable; - - // has to be overridden in subclasses - this.trEventName = 'piwikTriggerRowAction'; - - // set in registry - this.actionName = 'RowAction'; -} - -/** Initialize a row when the table is loaded */ -DataTable_RowAction.prototype.initTr = function (tr) { - var self = this; - - // For subtables, we need to make sure that the actions are always triggered on the - // action instance connected to the root table. Otherwise sharing data (e.g. for - // for multi-row evolution) wouldn't be possible. Also, sub-tables might have different - // API actions. For the label filter to work, we need to use the parent action. - // We use jQuery events to let subtables access their parents. - tr.unbind(self.trEventName).bind(self.trEventName, function (e, params) { - self.trigger($(this), params.originalEvent, params.label, params.originalRow); - }); -}; - -/** - * This method is called from the click event and the tr event (see this.trEventName). - * It derives the label and calls performAction. - */ -DataTable_RowAction.prototype.trigger = function (tr, e, subTableLabel, originalRow) { - var label = this.getLabelFromTr(tr); - - // if we have received the event from the sub table, add the label - if (subTableLabel) { - var separator = ' > '; // LabelFilter::SEPARATOR_RECURSIVE_LABEL - label += separator + subTableLabel; - } - - // handle sub tables in nested reports: forward to parent - var subtable = tr.closest('table'); - if (subtable.is('.subDataTable')) { - subtable.closest('tr').prev().trigger(this.trEventName, { - label: label, - originalEvent: e, - originalRow: tr - }); - return; - } - - // ascend in action reports - var $dataTable = subtable.closest('div.dataTable'); - if ($dataTable.hasClass('dataTableActions') - || $dataTable.data('table-type') === 'ActionsDataTable' - ) { - var allClasses = tr.attr('class'); - var matches = allClasses.match(/level[0-9]+/); - var level = parseInt(matches[0].substring(5, matches[0].length), 10); - if (level > 0) { - // .prev(.levelX) does not work for some reason => do it "by hand" - var findLevel = 'level' + (level - 1); - var ptr = tr; - while ((ptr = ptr.prev()).length) { - if (!ptr.hasClass(findLevel) || ptr.hasClass('nodata')) { - continue; - } - ptr.trigger(this.trEventName, { - label: label, - originalEvent: e, - originalRow: tr - }); - return; - } - } - } - - this.performAction(label, tr, e, originalRow); -}; - -/** Get the label string from a tr dom element */ -DataTable_RowAction.prototype.getLabelFromTr = function (tr) { - if (tr.data('label')) { - return tr.data('label'); - } - - var rowMetadata = this.getRowMetadata(tr); - if (rowMetadata.combinedLabel) { - return '@' + rowMetadata.combinedLabel; - } - - var label = tr.find('span.label'); - - // handle truncation - var value = label.data('originalText'); - - if (!value) { - value = label.text(); - } - value = value.trim(); - value = encodeURIComponent(value); - - // if tr is a terminal node, we use the @ operator to distinguish it from branch nodes w/ the same name - if (!tr.hasClass('subDataTable')) { - value = '@' + value; - } - - return value; -}; - -/** Get row metadata object */ -DataTable_RowAction.prototype.getRowMetadata = function (tr) { - return tr.data('row-metadata') || {}; -}; - -/** - * Base method for opening popovers. - * This method will remember the parameter in the url and call doOpenPopover(). - */ -DataTable_RowAction.prototype.openPopover = function (parameter) { - broadcast.propagateNewPopoverParameter('RowAction', this.actionName + ':' + parameter); -}; - -broadcast.addPopoverHandler('RowAction', function (param) { - var paramParts = param.split(':'); - var rowActionName = paramParts[0]; - paramParts.shift(); - param = paramParts.join(':'); - - var rowAction = DataTable_RowActions_Registry.getActionByName(rowActionName); - if (rowAction) { - rowAction.createInstance(null, param).doOpenPopover(param); - } -}); - -/** To be overridden */ -DataTable_RowAction.prototype.performAction = function (label, tr, e) { -}; -DataTable_RowAction.prototype.doOpenPopover = function (parameter) { -}; - -// -// ROW EVOLUTION -// - -function DataTable_RowActions_RowEvolution(dataTable) { - this.dataTable = dataTable; - this.trEventName = 'piwikTriggerRowEvolution'; - - /** The rows to be compared in multi row evolution */ - this.multiEvolutionRows = []; - this.multiEvolutionRowsPretty = []; - this.multiEvolutionRowsSeries = []; - this.popoverRequestParams = null; - this._popoverRequest = null; - this._themeModeChangeListener = null; - this._popoverRequestSequence = 0; -} - -/** Static helper method to launch row evolution from anywhere */ -DataTable_RowActions_RowEvolution.launch = function (apiMethod, label) { - var param = 'RowEvolution:' + apiMethod + ':0:' + label; - broadcast.propagateNewPopoverParameter('RowAction', param); -}; - -DataTable_RowActions_RowEvolution.prototype = new DataTable_RowAction; - -DataTable_RowActions_RowEvolution.prototype.performAction = function (label, tr, e, originalRow) { - if (e.shiftKey) { - // only mark for multi row evolution if shift key is pressed - this.addMultiEvolutionRow(label, $(originalRow || tr).data('comparison-series'), originalRow || tr); - return; - } - - this.addMultiEvolutionRow(label, $(originalRow || tr).data('comparison-series'), originalRow || tr); - - // check whether we have rows marked for multi row evolution - var extraParams = $.extend({}, $(originalRow || tr).data('param-override')); - if (typeof extraParams !== 'object') { - extraParams = {}; - } - - if (this.multiEvolutionRows.length > 1) { - extraParams.action = 'getMultiRowEvolutionPopover'; - label = this.multiEvolutionRows.join(','); - - labelPretty = this.multiEvolutionRowsPretty.join(','); - if (label != labelPretty) { - extraParams.labelPretty = labelPretty; - } - - if (this.multiEvolutionRowsSeries.length > 1) { // when comparison is active - var MatomoUrl = window.CoreHome.MatomoUrl; - extraParams.compareDates = MatomoUrl.parsed.value.compareDates; - extraParams.comparePeriods = MatomoUrl.parsed.value.comparePeriods; - extraParams.compareSegments = MatomoUrl.parsed.value.compareSegments; - extraParams.labelSeries = this.multiEvolutionRowsSeries.join(','); - - // remove override period/date/segment since we are sending compare params so we can have the whole set of comparison - // serieses for LabelFilter - delete extraParams.period; - delete extraParams.date; - delete extraParams.segment; - } - } else { - var labelPretty = this.getPrettyLabel(originalRow || tr); - if (labelPretty && labelPretty != label) { - extraParams['labelPretty'] = labelPretty; - } - } - - $.each(this.dataTable.param, function (index, value) { - // we automatically add fields like idDimension, idGoal etc. - if (DataTable_RowActions_RowEvolution.isAllowedIdExtraParam(index, value)) { - extraParams[index] = value; - } - }); - - if (this.dataTable && this.dataTable.jsViewDataTable === 'tableGoals') { - // When there is a idGoal parameter available, the user is currently viewing a Goal or Ecommerce page - // In this case we want to show the specific goal metrics in the row evolution - if (extraParams['idGoal']) { - extraParams['showGoalMetricsForGoal'] = extraParams['idGoal']; - delete(extraParams['idGoal']); - } - // If no idGoal is available it is a random report switched to goal visualization - // we then ensure the row evolution will show the goal overview metrics - else { - extraParams['showGoalMetricsForGoal'] = -1; - } - } - - // check if abandonedCarts is in the dataTable params and if so, propagate to row evolution request - if (this.dataTable.param.abandonedCarts !== undefined) { - extraParams['abandonedCarts'] = this.dataTable.param.abandonedCarts; - } - - if (this.dataTable.param.secondaryDimension !== undefined) { - extraParams['secondaryDimension'] = this.dataTable.param.secondaryDimension; - } - - if (this.dataTable.param.flat !== undefined) { - var unflattenActionLabel = function(label) { - // To "unflatten" a label we need to convert labels from e.g. - // * @%2Fblog%2Fauthor%2Fjulien%2F - // * @%2Fcontact - // * @%2Fanalytics%2Fcultizer - // to e.g. - // * blog > author > julien > @%2Findex - // * @%2Fcontact - // * analytics > @%2Fcultizer - return label.split(',').map(function(item) { - var startsWithAt = item.startsWith('@'); - if (startsWithAt ) { - item = item.slice(1); - } - - item = decodeURIComponent(item); - - if (item === '/') { - return (startsWithAt ? '@' : '') + encodeURIComponent('/index'); - } - - var isIndex = false; - - if (item.endsWith('/')) { - item = item.slice(0, -1); - isIndex = true; - } - if (item.startsWith('/')) { - item = item.slice(1); - } - - var parts = item.split('/').map(encodeURIComponent); - - if (isIndex) { - parts.push(encodeURIComponent('/index')); - } else { - parts[parts.length - 1] = '/' + parts[parts.length - 1]; - } - - if (startsWithAt ) { - parts[parts.length - 1] = '@' + parts[parts.length - 1]; - } - - return parts.join(' > '); - }).join(','); - }; - - if ( - this.dataTable.param.module === 'Actions' && this.dataTable.param.action === 'getPageUrls' - && this.dataTable.param.flat && label.indexOf(' > ') === -1 - ) { - // Requesting a row evolution for a flattened page url report can easily reach memory limits - // This happens due to the fact, that requesting a report flattened, will currently process - // the data for ALL subtables, for all periods shown in the row evolution. - // We actually would only need to fetch the data for the requested labels. - // Till this was refactored in the backend, this hack will convert the flattened request - // into a request that would come from a subtable. This is handled differently by the backend - // and will only process the requested labels in the backend. - label = unflattenActionLabel(label); - extraParams['flat'] = 0; - } else { - extraParams['flat'] = this.dataTable.param.flat; - } - } - - var apiMethod = this.dataTable.param.module + '.' + this.dataTable.param.action; - this.openPopover(apiMethod, extraParams, label); -}; - -DataTable_RowActions_RowEvolution.prototype.getPrettyLabel = function getPrettyLabel(tr) { - if (!this.dataTable.props.row_identifier || this.dataTable.props.row_identifier === 'label') { - return null; // only necessary if a custom row identifier is provided for the report - } - - var prettyLabel = []; - - var row = $(tr); - while (row.length) { - var label = row.data('label-pretty') || this.getLabelFromTr(row); - prettyLabel.unshift(label); - - var subtable = row.closest('table'); - if (subtable.is('.subDataTable')) { - row = subtable.closest('tr').prev(); - } else { - break; - } - } - - return prettyLabel.join(' > '); -}; - -DataTable_RowActions_RowEvolution.prototype.addMultiEvolutionRow = function (label, seriesIndex, tr) { - if (typeof seriesIndex !== 'undefined') { - var self = this; - - var found = false; - this.multiEvolutionRows.forEach(function (rowLabel, index) { - var rowSeriesIndex = self.multiEvolutionRowsSeries[index]; - if (label === rowLabel && seriesIndex === rowSeriesIndex) { - found = true; - return false; - } - }); - - if (!found) { - this.multiEvolutionRows.push(label); - this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr)); - this.multiEvolutionRowsSeries.push(seriesIndex); - } - } else if ($.inArray(label, this.multiEvolutionRows) === -1) { - this.multiEvolutionRows.push(label); - this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr)) - - this.multiEvolutionRowsSeries = []; // for safety, make sure state is consistent - } -}; - -DataTable_RowActions_RowEvolution.prototype.openPopover = function (apiMethod, extraParams, label) { - var urlParam = apiMethod + ':' + encodeURIComponent(JSON.stringify(extraParams)) + ':' + label; - DataTable_RowAction.prototype.openPopover.apply(this, [urlParam]); -}; - -// Allowlist of `extraParams` keys that may flow from the popover URL hash into -// the Row Evolution XHR. -DataTable_RowActions_RowEvolution.allowedExtraParamKeys = [ - 'column', - 'action', - 'labelPretty', - 'labelSeries', - 'showGoalMetricsForGoal', - 'abandonedCarts', - 'secondaryDimension', - 'flat', - 'compareDates', - 'comparePeriods', - 'compareSegments', - 'segment', - 'period', - 'date' -]; - -// Dynamic `id*` keys (idGoal, idDimension, idSubtable, ...). Used both when -// building the row-evolution URL in `performAction` and when parsing it back -// in `doOpenPopover`, so both sides accept the same set of params. -DataTable_RowActions_RowEvolution.isAllowedIdExtraParam = function (key, value) { - return key !== 'idSite' - && key.indexOf('id') === 0 - && ($.isNumeric(value) || (typeof value === 'string' && value.indexOf('ecommerce') === 0)); -}; - -// Filter a parsed extraParams object against the allowlist. Returns a new -// object containing only keys that are either in `allowedExtraParamKeys` or -// accepted by `isAllowedIdExtraParam`. The `action` key is additionally pinned -// to the multi-row marker value. -DataTable_RowActions_RowEvolution.filterAllowedExtraParams = function (parsed) { - var result = {}; - var allowed = DataTable_RowActions_RowEvolution.allowedExtraParamKeys; - - for (var key in parsed) { - if (!Object.prototype.hasOwnProperty.call(parsed, key)) { - continue; - } - - var value = parsed[key]; - - // `action` is allowed only as the multi-row marker. Layer 2 in - // showRowEvolution unconditionally pins requestParams.action, but - // the value-check keeps the in-memory extraParams honest. - if (key === 'action' && value !== 'getMultiRowEvolutionPopover') { - continue; - } - - if (allowed.indexOf(key) !== -1 - || DataTable_RowActions_RowEvolution.isAllowedIdExtraParam(key, value)) { - result[key] = value; - } - } - - return result; -}; - -DataTable_RowActions_RowEvolution.prototype.doOpenPopover = function (urlParam) { - var urlParamParts = urlParam.split(':'); - var apiMethod = urlParamParts.shift(); - var extraParamsString = urlParamParts.shift(); - var label = urlParamParts.join(':'); - - var extraParams = {}; - try { - var parsed = JSON.parse(decodeURIComponent(extraParamsString)); - if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) { - throw new Error('extraParams must be a JSON object'); - } - extraParams = DataTable_RowActions_RowEvolution.filterAllowedExtraParams(parsed); - } catch (e) { - // Legacy short-form: bare "0"/"1"/ instead of a JSON envelope. - if (extraParamsString == '1') { - extraParams.action = 'getMultiRowEvolutionPopover'; - } else if (extraParamsString != '0') { - extraParams.action = 'getMultiRowEvolutionPopover'; - extraParams.column = String(extraParamsString); - } - } - - this.showRowEvolution(apiMethod, label, extraParams); -}; - -DataTable_RowActions_RowEvolution.prototype.fetchRowEvolution = function (requestParams, callback) { - var ajaxRequest = new ajaxHelper(); - ajaxRequest.addParams(requestParams, 'get'); - ajaxRequest.withTokenInUrl(); - ajaxRequest.setCallback(callback); - ajaxRequest.setFormat('html'); - ajaxRequest.send(); - return ajaxRequest; -}; - -DataTable_RowActions_RowEvolution.prototype.abortPopoverRequest = function () { - if (this._popoverRequest) { - this._popoverRequest.abort(); - this._popoverRequest = null; - } -}; - -DataTable_RowActions_RowEvolution.prototype.loadLatestPopover = function (requestParams, callback) { - var self = this; - var requestSequence; - - this.abortPopoverRequest(); - requestSequence = ++this._popoverRequestSequence; - this._popoverRequest = this.fetchRowEvolution(requestParams, function (html) { - self._popoverRequest = null; - - if (!Piwik_Popover.isOpen() || requestSequence !== self._popoverRequestSequence) { - return; - } - - callback(html); - }); -}; - -/** Open the row evolution popover */ -DataTable_RowActions_RowEvolution.prototype.showRowEvolution = function (apiMethod, label, extraParams) { - - var self = this; - - // open the popover - var box = Piwik_Popover.showLoading('Row Evolution'); - box.addClass('rowEvolutionPopover'); - - // prepare loading the popover contents - var requestParams = { - apiMethod: apiMethod, - label: label, - disableLink: 1 - }; - - var callback = function (html) { - Piwik_Popover.setContent(html); - - // use the popover title returned from the server - var title = box.find('div.popover-title'); - if (title.length) { - Piwik_Popover.setTitle(title.html()); - title.remove(); - } - - Piwik_Popover.onClose(function () { - if (!Piwik_Popover.isOpen()) { - // reset rows marked for multi row evolution on close - self.multiEvolutionRows = []; - self.multiEvolutionRowsPretty = []; - self.multiEvolutionRowsSeries = []; - self.popoverRequestParams = null; - self._popoverRequestSequence++; - self.abortPopoverRequest(); - - if (self._themeModeChangeListener) { - window.removeEventListener('themeModeChange', self._themeModeChangeListener); - self._themeModeChangeListener = null; - } - } - }); - - if (self.dataTable !== null) { - // remember label for multi row evolution - box.find('.rowevolution-startmulti').click(function () { - Piwik_Popover.onClose(false); // unbind listener that resets multiEvolutionRows - broadcast.propagateNewPopoverParameter(false); - return false; - }); - } else { - // when the popover is launched by copy&pasting a url, we don't have the data table. - // in this case, we can't remember the row marked for multi row evolution so - // we disable the picker. - box.find('.compare-container, .rowevolution-startmulti').remove(); - } - - // switch metric in multi row evolution - box.find('select.multirowevoltion-metric').change(function () { - var metric = $(this).val(); - Piwik_Popover.onClose(false); // unbind listener that resets multiEvolutionRows - extraParams.column = metric; - self.openPopover(apiMethod, extraParams, label); - return true; - }); - }; - - requestParams.colors = JSON.stringify(piwik.getSparklineColors()); - - var idDimension; - - if (broadcast.getValueFromUrl('module') === 'Widgetize') { - idDimension = broadcast.getValueFromUrl('subcategory'); - } else { - idDimension = broadcast.getValueFromHash('subcategory'); - } - - if (idDimension && ('' + idDimension).indexOf('customdimension') === 0) { - idDimension = ('' + idDimension).replace('customdimension', ''); - idDimension = parseInt(idDimension, 10); - if (idDimension > 0) { - requestParams.idDimension = idDimension; - } - } - - var wantMultiRowEvolution = extraParams && extraParams.action === 'getMultiRowEvolutionPopover'; - - $.extend(requestParams, extraParams); - - // Pin routing AFTER the merge so it cannot be overridden by any path. - requestParams.module = 'CoreHome'; - requestParams.action = wantMultiRowEvolution ? 'getMultiRowEvolutionPopover' : 'getRowEvolutionPopover'; - - this.popoverRequestParams = $.extend(true, {}, requestParams); - - if (this._themeModeChangeListener) { - window.removeEventListener('themeModeChange', this._themeModeChangeListener); - } - - this._themeModeChangeListener = function () { - if (!self.popoverRequestParams) { - return; - } - - self.popoverRequestParams.colors = JSON.stringify(piwik.getSparklineColors()); - self.loadLatestPopover(self.popoverRequestParams, callback); - }; - - window.addEventListener('themeModeChange', this._themeModeChangeListener); - - this.loadLatestPopover(requestParams, callback); -}; diff --git a/plugins/CoreHome/javascripts/listingFormatter.js b/plugins/CoreHome/javascripts/listingFormatter.js deleted file mode 100644 index f71cd22e36e64a2b74bfceca154106024277f44d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/listingFormatter.js +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * Listing Formatter for formatting listing out of a set of values - * - * @type {object} - */ -var ListingFormatter = (function () { - - /** - * Formats the given numeric value with the given pattern - * - * @param {string} type - * @param {Array} items - * @returns {string} - */ - function format(type, items) { - switch (items.length) { - case 0: - return ''; - case 1: - return items[0]; - case 2: - var pattern = _pk_translate('Intl_ListPattern' + type + '2'); - return pattern.replace('{0}', items[0]).replace('{1}', items[1]); - default: - var patternStart = _pk_translate('Intl_ListPattern' + type + 'Start'); - var patternMiddle = _pk_translate('Intl_ListPattern' + type + 'Middle'); - var patternEnd = _pk_translate('Intl_ListPattern' + type + 'End'); - - var result = patternStart; - - while (items.length > 2) { - var pattern = items.length > 3 ? patternMiddle : patternEnd; - result = result.replace('{0}', items.shift()).replace('{1}', pattern); - } - - return result.replace('{0}', items[0]).replace('{1}', items[1]); - } - } - - /** - * Public available methods - */ - return { - - formatAnd: function (values) { - return format('And', values); - }, - - formatOr: function (values) { - return format('Or', values); - }, - } -})(); diff --git a/plugins/CoreHome/javascripts/manifest.json b/plugins/CoreHome/javascripts/manifest.json deleted file mode 100644 index 7314adde61a364daf5a65810992563f33c3aca78..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/manifest.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "short_name": "Matomo", - "name": "Matomo - Open Source Analytics", - "icons": [ - { - "src": "../images/applogo_32.png", - "sizes": "32x32", - "type": "image/png" - }, - { - "src": "../images/applogo_72.png", - "sizes": "72x72", - "type": "image/png" - }, - { - "src": "../images/applogo_128.png", - "sizes": "128x128", - "type": "image/png" - }, - { - "src": "../images/applogo_144.png", - "sizes": "144x144", - "type": "image/png" - }, - { - "src": "../images/applogo_192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "../images/applogo_256.png", - "sizes": "256x256", - "type": "image/png" - } - ], - "start_url": "../../../", - "display": "standalone", - "orientation": "portrait", - "background_color": "#edecec", - "theme_color": "#3450A3", - "prefer_related_applications": true, - "related_applications": [ - { - "platform": "play", - "id": "org.piwik.mobile2" - } - ] -} diff --git a/plugins/CoreHome/javascripts/materialize-bc.js b/plugins/CoreHome/javascripts/materialize-bc.js deleted file mode 100644 index 191d4c12a200aed3334811590f7d6e849bd3015f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/materialize-bc.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -(function () { - $(document).ready(function () { - window.Materialize = window.M; - $.fn.sideNav = $.fn.sidenav; - $.fn.material_select = $.fn.formSelect; - - // we load jquery-ui after materialize so we can use the jquery-ui datepicker, but - // some controls in materialize get overwritten too. so we undo that here. - M.initializeJqueryWrapper(M.Tabs, 'tabs', 'M_Tabs'); - M.initializeJqueryWrapper(M.Modal, 'modal', 'M_Modal'); - }); -})(); diff --git a/plugins/CoreHome/javascripts/notification.js b/plugins/CoreHome/javascripts/notification.js deleted file mode 100644 index 8bb7e893db54307913864d35d6ba00c8e823c397..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/notification.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function ($, require) { - var exports = require('piwik/UI'); - - /** - * @deprecated - */ - var Notification = function () { - this.notificationId = null; - }; - - /** - * @deprecated use NotificationsStore.show() in CoreHome Vue module - */ - Notification.prototype.show = function (message, options) { - options = checkOptions(options); - options.noclear = !! options.noclear; - this.notificationId = window.CoreHome.NotificationsStore.show($.extend({ message: message }, options)); - }; - - /** - * @deprecated use NotificationsStore.remove() in CoreHome Vue module - */ - Notification.prototype.remove = function (notificationId) { - window.CoreHome.NotificationsStore.remove(notificationId); - }; - - /** - * @deprecated use NotificationsStore.scrollToNotification() in CoreHome Vue module - */ - Notification.prototype.scrollToNotification = function () { - if (this.notificationId) { - window.CoreHome.NotificationsStore.scrollToNotification(this.notificationId); - } - }; - - /** - * @deprecated use NotificationsStore.toast() in CoreHome Vue module - */ - Notification.prototype.toast = function (message, options) { - options = checkOptions(options); - options.noclear = !! options.noclear; - window.CoreHome.NotificationsStore.toast($.extend({ message: message }, options)); - }; - - exports.Notification = Notification; - - function checkOptions(options) { - if (options && !$.isPlainObject(options)) { - throw new Error('Options has the wrong format, cannot display notification'); - } else if (!options) { - options = {}; - } - return options; - } - -})(jQuery, require); diff --git a/plugins/CoreHome/javascripts/popover.js b/plugins/CoreHome/javascripts/popover.js deleted file mode 100644 index 387d13ea1b1ab64e465b5dd7f4ab777f8fd064c4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/popover.js +++ /dev/null @@ -1,311 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -var Piwik_Popover = (function () { - var container = false; - var isOpen = false; - var closeCallback = false; - var isProgrammaticClose = false; - var scrollTopPosition = 0; - var ajaxLoadingRequest = null; - var createContainer = function () { - if (container === false) { - container = $(document.createElement('div')).attr('id', 'Piwik_Popover'); - } - if (!$('#Piwik_Popover_Wrapper').length) { - $(document.createElement('div')).attr('id', 'Piwik_Popover_Wrapper').appendTo('body'); - } - }; - - var openPopover = function (title, dialogClass) { - createContainer(); - - var options = - { - title: title, - modal: true, - width: 1050, - resizable: false, - autoOpen: true, - classes: { - "ui-dialog": 'ui-dialog--responsive', - }, - appendTo: '#Piwik_Popover_Wrapper', - open: function (event, ui) { - if (dialogClass) { - $(this).parent().addClass(dialogClass).attr('style', ''); - } - - $('.ui-widget-overlay').on('click.popover', function () { - // if clicking outside of the dialog, close entire stack - broadcast.resetPopoverStack(); - container.dialog('close'); - }); - - // sometimes the modal can be displayed outside of the current viewport, in this case - // we scroll to it to make sure it's visible. this isn't a perfect workaround, since it - // doesn't center the modal. - scrollTopPosition = $(window).scrollTop(); - $('#root').css({ - position: 'fixed', - height: $(window).height + scrollTopPosition, - width: '100%', - top: -scrollTopPosition - }); - - window.scrollTo(0, 0); - }, - close: function (event, ui) { - container.find('div.jqplot-target').trigger('piwikDestroyPlot'); - container[0].innerHTML = ''; - container.dialog('destroy').remove(); - - if (ajaxLoadingRequest) { - ajaxLoadingRequest.abort(); - } - - $('.ui-widget-overlay').off('click.popover'); - isOpen = false; - require('piwik/UI').UIControl.cleanupUnusedControls(); - if (typeof closeCallback == 'function') { - closeCallback(); - closeCallback = false; - } - - // just to avoid any annoying race conditions that cause tooltips to remain on the screen permanently, - // remove any that still exist - $('body > .ui-tooltip').remove(); - - // if we were not called by Piwik_Popover.close(), then the user clicked the close button or clicked - // the overlay, in which case we want to handle the popover URL as well as the actual modal. - if (!isProgrammaticClose || isEscapeKey(event)) { - broadcast.propagateNewPopoverParameter(false); - } - - $('#root').css({ - position: '', - height: '', - width: '', - top: '' - }); - - window.scrollTo(0, scrollTopPosition); - } - }; - - container.dialog(options); - - // override the undocumented _title function to ensure that the title attribute is not escaped (according to jQueryUI bug #6016) - container.data( "uiDialog" )._title = function(title) { - title.html( this.options.title ); - }; - - isOpen = true; - }; - - return { - - /** - * Open the popover with a loading message - * - * @param {string} popoverName name of the popover - * @param {string} [popoverSubject] subject of the popover (e.g. url, optional) - * @param {int} [height] height of the popover in px (optional) - * @param {string} [dialogClass] css class to add to dialog - */ - showLoading: function (popoverName, popoverSubject, height, dialogClass) { - var loading = $(document.createElement('div')).addClass('Piwik_Popover_Loading'); - - var loadingMessage = popoverSubject ? translations.General_LoadingPopoverFor : - translations.General_LoadingPopover; - - loadingMessage = sprintf(loadingMessage, popoverName); - - var p1 = $(document.createElement('p')).addClass('Piwik_Popover_Loading_Name'); - loading.append(p1.text(loadingMessage)); - - var p2; - if (popoverSubject) { - popoverSubject = piwikHelper.addBreakpointsToUrl(popoverSubject); - p1.addClass('Piwik_Popover_Loading_NameWithSubject'); - p2 = $(document.createElement('p')).addClass('Piwik_Popover_Loading_Subject'); - loading.append(p2.html(popoverSubject)); - } - - if (height) { - loading.height(height); - } - - if (!isOpen) { - openPopover(null, dialogClass); - } - - this.setContent(loading); - this.setTitle(''); - - if (height) { - var offset = loading.height() - p1.outerHeight(); - if (popoverSubject) { - offset -= p2.outerHeight(); - } - var spacingEl = $(document.createElement('div')); - spacingEl.height(Math.round(offset / 2)); - loading.prepend(spacingEl); - } - - return container; - }, - - /** - * Add a help button to the current popover - * - * @param {string} helpUrl - */ - addHelpButton: function (helpUrl) { - if (!isOpen) { - return; - } - - var titlebar = container.parent().find('.ui-dialog-titlebar'); - - var button = $(document.createElement('a')).addClass('ui-dialog-titlebar-help'); - button.attr({href: helpUrl, target: '_blank'}); - - titlebar.append(button); - }, - - /** Set the title of the popover */ - setTitle: function (titleHtml) { - var titleText = piwikHelper.htmlDecode(titleHtml); - if (titleText.length > 60) { - titleHtml = $('').attr('class', 'tooltip').attr('title', titleText).html(titleHtml); - } - container.dialog('option', 'title', titleHtml); - try { - $('.tooltip', container.parentNode).tooltip('destroy'); - } catch (e) {} - if (titleText.length > 60) { - $('.tooltip', container.parentNode).tooltip({track: true, items: '.tooltip'}); - } - }, - - /** Set inner HTML of the popover */ - setContent: function (html) { - if (typeof closeCallback == 'function') { - closeCallback(); - closeCallback = false; - } - - container.html(html); - - container.children().each(function (i, childNode) { - piwikHelper.compileVueEntryComponents(childNode); - }); - }, - - /** - * Show an error message. All params are HTML! - * - * @param {string} title - * @param {string} [message] - * @param {string} [backLabel] - */ - showError: function (title, message, backLabel) { - var error = $(document.createElement('div')).addClass('Piwik_Popover_Error'); - - var p = $(document.createElement('p')).addClass('Piwik_Popover_Error_Title'); - error.append(p.html(title)); - - if (message) { - p = $(document.createElement('p')).addClass('Piwik_Popover_Error_Message'); - error.append(p.html(message)); - } - - if (backLabel) { - var back = $(document.createElement('a')).addClass('Piwik_Popover_Error_Back'); - back.attr('href', '#').click(function () { - history.back(); - return false; - }); - error.append(back.html(backLabel)); - } - - if (!isOpen) { - openPopover(); - } - - this.setContent(error); - }, - - /** - * Add a callback for the next time the popover is closed or the content changes - * - * @param {function} callback - */ - onClose: function (callback) { - closeCallback = callback; - }, - - /** - * Close the popover. - * - * Note: this method shouldn't normally be used to close a popover, instead - * `broadcast.propagateNewPopoverHandler(false)` should be used. - */ - close: function () { - if (isOpen) { - isProgrammaticClose = true; - container.dialog('close'); - isProgrammaticClose = false; - } - }, - - /** - * Create a Popover and load the specified URL in it. - * - * Note: If you want the popover to be persisted in the URL (so if the URL is copy/pasted - * to a new window/tab it will be opened there), use broadcast.propagateNewPopoverParameter - * with a popover handler function that calls this one. - * - * @param {string} url - * @param {string} loadingName - * @param {string} [dialogClass] css class to add to dialog - * @param {object} [ajaxRequest] optional instance of ajaxHelper - */ - createPopupAndLoadUrl: function (url, loadingName, dialogClass, ajaxRequest) { - // open the popover - var box = Piwik_Popover.showLoading(loadingName, null, null, dialogClass); - - var callback = function (html) { - function setPopoverTitleIfOneFoundInContainer() { - var title = $('h1,h2', container); - if (title.length == 1) { - Piwik_Popover.setTitle(title.text()); - $(title).hide(); - } - } - - Piwik_Popover.setContent(html); - setPopoverTitleIfOneFoundInContainer(); - }; - - if ('undefined' === typeof ajaxRequest) { - ajaxRequest = new ajaxHelper(); - } - ajaxRequest.addParams(piwikHelper.getArrayFromQueryString(url), 'get'); - ajaxRequest.setCallback(callback); - ajaxRequest.setFormat('html'); - ajaxRequest.send(); - - ajaxLoadingRequest = ajaxRequest; - }, - - isOpen: function() { - return isOpen; - } - }; -})(); diff --git a/plugins/CoreHome/javascripts/require.js b/plugins/CoreHome/javascripts/require.js deleted file mode 100644 index 3d8c4ca611ec7d49451eaeb7c57ed76510722ac3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/require.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Matomo - free/libre analytics platform - * - * Module creation & inclusion for Piwik. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function (window) { - - var MODULE_SPLIT_REGEX = /[\/.\\]/; - - /** - * Returns a module for its ID. Empty modules are created if they does not exist. - * - * Modules are currently stored in the window object. - * - * @param {String} moduleId e.g. 'piwik/UserCountryMap' or 'myPlugin/Widgets/FancySchmancyThing'. - * The following characters can be used to separate individual modules: - * '/', '.' or '\'. - * @return {Object} The module object. - */ - window.require = function (moduleId) { - var parts = moduleId.split(MODULE_SPLIT_REGEX); - - // TODO: we use window objects for backwards compatibility. when rest of Piwik is rewritten to use - // require, we can switch simply holding the modules in a private variable. - var currentModule = window; - for (var i = 0; i != parts.length; ++i) { - var part = parts[i]; - - currentModule[part] = currentModule[part] || {}; - currentModule = currentModule[part]; - } - return currentModule; - }; - -})(window); diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js deleted file mode 100644 index d7404fe3f2325f1c2933b2474c3f20ec12613318..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/sparkline.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function ($) { - -var sparklineColorNames = ['backgroundColor', 'lineColor', 'minPointColor', 'maxPointColor', 'lastPointColor', 'fillColor']; - -var sparklineDisplayHeight = 25; -var sparklineDisplayWidth = 100; - -piwik.getSparklineColors = function () { - var colors = piwik.ColorManager.getColors('sparkline-colors', sparklineColorNames); - - var comparisonService = window.CoreHome.ComparisonsStoreInstance; - if (comparisonService.isComparing()) { - var comparisons = comparisonService.getAllComparisonSeries(); - colors.lineColor = comparisons.map(function (comp) { return comp.color; }); - } - - return colors; -}; - -piwik.refreshSparklines = function () { - $('.sparkline img').each(function () { - var $self = $(this); - var dataSrc = $self.attr('data-src'); - - if (!dataSrc) { - return; - } - - var seriesIndices = $self.closest('.sparkline').data('series-indices'); - var sparklineColors = piwik.getSparklineColors(); - - if (seriesIndices && sparklineColors.lineColor instanceof Array) { - sparklineColors.lineColor = sparklineColors.lineColor.filter(function (c, index) { - return seriesIndices.indexOf(index) !== -1; - }); - } - - var colors = JSON.stringify(sparklineColors); - var appendToSparklineUrl = '&colors=' + encodeURIComponent(colors); - - // The redesign lets sparklines be rendered at a custom size; without it we keep the - // legacy behaviour of rendering at the server default and displaying at 100x25. - var redesignEnabled = document.body.classList.contains('sparklines-redesign-enabled'); - var width = sparklineDisplayWidth; - var height = sparklineDisplayHeight; - - if (redesignEnabled) { - width = parseInt($self.attr('width'), 10) || sparklineDisplayWidth; - height = parseInt($self.attr('height'), 10) || sparklineDisplayHeight; - // Render the PNG at twice the displayed size so it stays crisp on hi-DPI screens - // (matching the legacy 200x50-render / 100x25-display ratio). - appendToSparklineUrl += '&width=' + encodeURIComponent(width * 2) - + '&height=' + encodeURIComponent(height * 2); - } - - // Append the token_auth to the URL if it was set (eg. embed dashboard) - var token_auth = broadcast.getValueFromUrl('token_auth'); - if (token_auth.length && piwik.shouldPropagateTokenAuth) { - appendToSparklineUrl += '&token_auth=' + token_auth; - } - - $self.attr('width', width); - $self.attr('height', height); - $self.attr('src', dataSrc + appendToSparklineUrl); - }); -}; - -// initializes each sparkline so they use colors defined in CSS -piwik.initSparklines = function() { - $(function () { - piwik.refreshSparklines(); - }); -}; - -window.addEventListener('themeModeChange', function () { - piwik.refreshSparklines(); -}); - -window.initializeSparklines = function () { - $('.dataTableVizEvolution[data-report]').each(function () { - var graph = $(this); - - // we search for .widget to make sure eg in the Dashboard to not update any graph of another report - var selectorsToFindParent = ['.widget', '.widget-container', '.reporting-page', 'body']; - var index = 0, selector, parent; - for (index; index < selectorsToFindParent.length; index++) { - selector = selectorsToFindParent[index]; - parent = graph.parents(selector).first(); - if (parent && parent.length) { - break; - } - } - - if (!parent || !parent.length) { - return; - } - - var sparklines = parent.find('div.sparkline:not(.notLinkable)'); - - // try to find sparklines and add them clickable behaviour - sparklines.each(function () { - // find the sparkline and get it's src attribute - var sparklineUrl = $('img', this).attr('data-src'); - - var $this = $(this); - - if (sparklineUrl != "") { - - $this.addClass('linked'); - - var params = $this.data('graph-params') || {}; - if (!Object.keys(params).length) { - var urlParams = broadcast.getValuesFromUrl(sparklineUrl); - - if (urlParams.columns) { - params.columns = decodeURIComponent(urlParams.columns); - } - if (urlParams.rows) { - params.rows = decodeURIComponent(urlParams.rows); - } - if (urlParams.idGoal) { - params.idGoal = decodeURIComponent(urlParams.idGoal); - } - } - - // on click, reload the graph with the new url - $this.off('click.sparkline'); - $this.on('click.sparkline', function () { - var reportId = graph.attr('data-report'), - dataTable = graph; - - // when the metrics picker is used, the id of the data table might be updated (which is correct behavior). - // for example, in goal reports it might change from GoalsgetEvolutionGraph to GoalsgetEvolutionGraph1. - // if this happens, we can't find the graph using $('#'+idDataTable+"Chart"); - // instead, we just use the first evolution graph we can find. - if (dataTable.length == 0) { - if ($(this).closest('.widget').length) { - dataTable = $(this).closest('.widget').find('div.dataTableVizEvolution'); - } else { - dataTable = $('div.dataTableVizEvolution'); - } - } - - // reload the datatable w/ a new column & scroll to the graph - dataTable.trigger('reload', params); - }); - } - }); - }); -}; - -}(jQuery)); diff --git a/plugins/CoreHome/javascripts/themes.js b/plugins/CoreHome/javascripts/themes.js deleted file mode 100644 index 0109cac0ef860e604d3841e77bedb3fb52ca4faf..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/themes.js +++ /dev/null @@ -1,106 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function () { - /** @type {Function|null|undefined} */ - let autoListener = null; - const mediaQuery = typeof window.matchMedia === 'function' - ? window.matchMedia('(prefers-color-scheme: dark)') - : null - let currentPreferredThemeMode = document.documentElement.getAttribute('data-theme-mode') || 'light'; - - /** - * Resolves the saved theme mode to the effective active theme. - * - * @param {string} preferredThemeMode - * @returns {string} - */ - function resolveThemeMode(preferredThemeMode) { - if (preferredThemeMode === 'dark') { - return 'dark'; - } - - if (preferredThemeMode === 'auto') { - return mediaQuery && mediaQuery.matches ? 'dark' : 'light'; - } - - return 'light'; - } - - /** - * Removes the browser color scheme change listener when one is registered. - * - * @returns {void} - */ - function removeAutoListener() { - if (!mediaQuery || !autoListener) { - return; - } - - if (typeof mediaQuery.removeEventListener === 'function') { - mediaQuery.removeEventListener('change', autoListener); - } - } - - /** - * Adds a browser color scheme change listener for auto mode. - * - * @returns {void} - */ - function addAutoListener() { - removeAutoListener(); - - if (!mediaQuery || currentPreferredThemeMode !== 'auto') { - return; - } - - autoListener = function () { - emitThemeModeChange(); - }; - - if (typeof mediaQuery.addEventListener === 'function') { - mediaQuery.addEventListener('change', autoListener); - } - } - - /** - * Emits the theme mode change event with the previous resolved theme. - * - * @returns {void} - */ - function emitThemeModeChange() { - if (typeof piwik.postEvent === 'function') { - piwik.postEvent('themeModeChange'); - return; - } - - window.dispatchEvent(new CustomEvent('themeModeChange')); - } - - /** - * Gets the resolved active theme mode. - * - * @returns {string} - */ - piwik.getThemeMode = function () { - return resolveThemeMode(currentPreferredThemeMode); - }; - - /** - * Sets the saved theme mode on the page and refreshes the active theme. - * - * @param {string} preferredThemeMode - * @returns {void} - */ - piwik.setThemeMode = function (preferredThemeMode) { - document.documentElement.setAttribute('data-theme-mode', preferredThemeMode); - currentPreferredThemeMode = preferredThemeMode; - addAutoListener() - emitThemeModeChange(); - }; - addAutoListener(); -}()); diff --git a/plugins/CoreHome/javascripts/top_controls.js b/plugins/CoreHome/javascripts/top_controls.js deleted file mode 100644 index cf7f76c7df3efa97426c44936932f0775f12e7c3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/top_controls.js +++ /dev/null @@ -1,135 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function initTopControls() { - function getOverlap(element1, element2) - { - if (!element1 || !element1.getBoundingClientRect || !element2 || !element2.getBoundingClientRect) { - return 0; - } - - var rect1 = element1.getBoundingClientRect(); - var rect2 = element2.getBoundingClientRect(); - - var doOverlap = !(rect1.right < rect2.left || rect1.left > rect2.right); - - if (doOverlap) { - return rect1.left - rect2.right; - } - - return 0; - } - - var $topControlsContainer = $('.top_controls'); - - var allRendered = true; - - if ($topControlsContainer.length) { - $topControlsContainer.find('.piwikTopControl').each(function () { - var $control = $(this); - if ($control.css('display') == 'none') { - return; - } - - var width = $control.outerWidth(true); - - var isControlFullyRendered = width >= 30; - if (!isControlFullyRendered) { - allRendered = false; - } - }); - - if (allRendered) { - var alreadyRendered = $('.top_controls').css('visibility') === 'visible'; - - // we make top controls visible only after all selectors are rendered - $('.top_controls').css('visibility', 'visible'); - $('.top_controls').css('opacity', '1'); - - if (!alreadyRendered) { - window.CoreHome.Matomo.postEvent('Matomo.topControlsRendered'); - } - } - - } -} - -//Keyboard controls for Top Controls Calendar through tab and enter. -$( document ).ready(function() { - $('.periodSelector').keydown(function(e){ - toggleCalendar(e); - }) - - blockPropegation(); - - $('.periodSelector .form-radio').keydown(function(e){ - e.stopPropagation(); - if(e.which==13){ - selectPeriodRadioButton($(this)); - } - }) -}); - -//Keyboard controls for Top Controls Calendar through tab and enter. -$( document ).ready(function() { - $('.periodSelector').keydown(function(e){ - toggleCalendar(e); - }) - - blockPropegation(); - - $('.periodSelector .form-radio').keydown(function(e){ - e.stopPropagation(); - if(e.which==13){ - selectPeriodRadioButton($(this)); - } - }) -}); - -function toggleCalendar(e){ - var calendarOpen = $('.periodSelector').hasClass('expanded'); - - if(e.which==13){ - if(calendarOpen){ - $('.periodSelector').removeClass('expanded'); - }else{ - $('.periodSelector').addClass('expanded'); - } - } -} - -function selectPeriodRadioButton(button){ - $('.periodSelector .form-radio').removeClass('checked'); - button.addClass('checked'); - button.find('input').click(); - - blockPropegation(); -} - -function blockPropegation(){ - $('.ui-datepicker-month, .ui-datepicker-year, .periodSelector td a').keydown(function(e){ - e.stopPropagation(); - }) -} - -//refresh page short cut 'r' -$(function () { - piwikHelper.registerShortcut('r', _pk_translate('CoreHome_ShortcutRefresh'), function (event) { - if (event.altKey) { - return; - } - if (event.preventDefault) { - event.preventDefault(); - } else { - event.returnValue = false; // IE - } - - var Matomo = window.CoreHome.Matomo; - var hashParsed = window.CoreHome.MatomoUrl.hashParsed.value; - - Matomo.postEvent('loadPage', hashParsed.category, hashParsed.subcategory); - }); -}); diff --git a/plugins/CoreHome/javascripts/uiControl.js b/plugins/CoreHome/javascripts/uiControl.js deleted file mode 100644 index 64d5e81de7b7f76356e24851ca81153bd95931d5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/javascripts/uiControl.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Matomo - free/libre analytics platform - * - * Visitor profile popup control. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function ($, require) { - - var exports = require('piwik/UI'); - - var ARRAY_PARAM_NAMES = ['compareDates', 'comparePeriods', 'compareSegments']; - - /** - * Base type for Matomo UI controls. Provides functionality that all controls need (such as - * cleanup on destruction). - * - * @param {Element} element The root element of the control. - */ - var UIControl = function (element) { - if (!element) { - throw new Error("no element passed to UIControl constructor"); - } - - this._controlId = UIControl._nextControlId++; - UIControl._controls.push(this); - - var $element = this.$element = $(element); - $element.data('uiControlObject', this); - - var params = JSON.parse($element.attr('data-params') || '{}'); - for (var key in params) { // convert values in params that are arrays to comma separated string lists - if (params[key] instanceof Array - && ARRAY_PARAM_NAMES.indexOf(key) === -1 - ) { - params[key] = params[key].join(','); - } - } - this.param = params; - - this.props = JSON.parse($element.attr('data-props') || '{}'); - }; - - /** - * Contains all active control instances. - */ - UIControl._controls = []; - - /** - * Specifies the next unique control ID to use. - */ - UIControl._nextControlId = 0; - - /** - * Utility method that will clean up all Matomo UI controls whose elements are not attached - * to the DOM. - * - * TODO: instead of having other pieces of the UI manually calling cleanupUnusedControls, - * MutationObservers should be used - */ - UIControl.cleanupUnusedControls = function () { - var controls = UIControl._controls; - // reset _controls; we will repopulate it with only active - // controls in the loop below. - var activeControls = UIControl._controls = []; - - for (var i = 0; i != controls.length; ++i) { - var control = controls[i]; - if (control - && control.$element - && !$.contains(document.documentElement, control.$element[0]) - ) { - controls[i] = null; - control._destroy(); - - if (!control._baseDestroyCalled) { - throw new Error("Error: " + control.constructor.name + "'s destroy method does not call " + - "UIControl.destroy. You may have a memory leak."); - } - } else { - // Control is still active / used. - activeControls.push(control); - } - } - }; - - UIControl.initElements = function (klass, selector) { - $(selector).each(function () { - if (!$(this).attr('data-inited')) { - var control = new klass(this); - $(this).attr('data-inited', 1); - } - }); - }; - - UIControl.prototype = { - - /** - * Perform cleanup. Called when the control has been removed from the DOM. Derived - * classes should overload this function to perform their own cleanup. - */ - _destroy: function () { - this.$element.removeData('uiControlObject'); - delete this.$element; - - this._baseDestroyCalled = true; - }, - - /** - * Handle the widget resize event, if we're currently in a widget. - * - * TODO: should use proper resize detection (see - * https://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ ) - * with timeouts (since resizing widgets can be expensive) - */ - onWidgetResize: function (handler) { - var $widget = this.$element.closest('.widgetContent'); - $widget.on('widget:maximise', handler) - .on('widget:minimise', handler) - .on('widget:resize', handler); - } - }; - - exports.UIControl = UIControl; - -})(jQuery, require); diff --git a/plugins/CoreHome/lang/am.json b/plugins/CoreHome/lang/am.json deleted file mode 100644 index ef03064b4b177ca9717e397824f78a131ea2dbf9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/am.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "በዚህ ፈርጅ ምንም ውሂብ የለም. \"ሁሉንም ምድብ\" ለማጠቃለል ይሞክሩ።", - "PresetDateToday": "ዛሬ", - "PresetDateYesterday": "ትናንት", - "ShowJSCode": "ለማስገባት የጃቫ ስክሪፕትን ኮድ አሳይ", - "SystemSummaryPhpVersion": "የፒ ኤች ፒ ስሪት" - } -} diff --git a/plugins/CoreHome/lang/ar.json b/plugins/CoreHome/lang/ar.json deleted file mode 100644 index 7612ee0b2cac0ca5887f0c5bc784d1858975973a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ar.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "في حال استخدامك لحاجب إعلانات ، فضلاً عطّله عن هذا الموقع لتضمن عمل بيويك دون مشاكل.", - "CategoryNoData": "لا توجد بيانات في هذه الفئة. حاول أن \"تضمن كافة الكثافات\".", - "ChangeCurrentWebsite": "إختر موقع وب، الموقع المختار حالياً : %s", - "ChangePeriod": "فترة التغيير", - "ChangeVisualization": "تغيير العرض", - "CheckForUpdates": "بحث عن تحديثات", - "CheckPiwikOut": "تفحص بايويك!", - "ChooseWebsite": "اختر الموقع", - "ClickRowToExpandOrContract": "إضغط هذا الصف لتوسيع أو طيّ الجدول الفرعي.", - "ClickToEditX": "إضغط لتحرير %s", - "CloseSearch": "إغلاق البحث", - "CloseWidgetDirections": "يمكنك إغلاق عنصر الواجهة هذا بالضغط على علامة 'X' أعلى العنصر.", - "DataForThisReportHasBeenPurged": "بيانات هذا التقرير أقدم من %s شهور وتم التخلص منها.", - "DataTableExcludeAggregateRows": "صفوف الإجمالي معروضة، %s اخفها", - "DataTableHowToSearch": "إضغط إدخال أو اضغط على رمز البحث لتبحث", - "DataTableIncludeAggregateRows": "الصفوف المجمَّعة مخفيَّة %s إعرضها", - "Default": "الافتراضي", - "DonateCall1": "لن يكلفك بايويك قرشاً في استخدامه أبداً، ولكن ذلك لا يعني أنه لا يكلفنا شيئاً في تطويره.", - "DonateCall2": "يحتاج بايويك إلى دعمك المستمر لينمو ويزدهر.", - "ExcludeRowsWithLowPopulation": "كافة الصفوف معروضة %s استثني الكثافات المنخفضة", - "ExternalHelp": "مساعدة (ينفتح في تبويب جديد)", - "FlattenDataTable": "التقرير هيكلي %s اجعله بمستوى واحد", - "IncludeRowsWithLowPopulation": "الصفوف ذات الأعداد المنخفضة مخفية %s عرض كافة الصفوف", - "InjectedHostEmailBody": "مرحباً ، حاولت الوصول إلى Matomo اليوم وواجهني التحذير : اسم المضيف مجهول.", - "InjectedHostEmailSubject": "تم الوصول إلى بايويك باستخدام مضيف غير معروف: %s", - "InjectedHostNonSuperUserWarning": "%1$s إضغط هنا للوصول الآمن إلى Matomo %2$s و إزالة هذا التحذير. قد ترغب في الاتصال بمدير Matomo وإشعاره بهذا الموضوع ( %3$s إضغط هنا لإرسال بريد إلكتروني %4$s ).", - "InjectedHostSuperUserWarning": "قد تكون إعدادات بايويك غير مضبوطة بشكل صحيح (مثلاً، أن يكون قد تم نقله إلى ملقم جديد مؤخراً). يمكنك إما %1$sالنقر هنا وإضافة مضيف%2$s صالح جديد (إذا كنت تثق به)%3$s، أو %4$sانقر هنا لزيارة %5$s بايويك بأمان%6$s.", - "InjectedHostWarningIntro": "أنت الآن تصل إلى Matomo من %1$s ، إلا أن Matomo قد تم إعداده للعمل على هذا العنوان : %2$s .", - "JavascriptDisabled": "يجب تفعيل برمجيات جافا في سبيل استخدام Matomo في الوضع القياسي.
ومع ذلك، يبدو أن برمجيات جافا إما معطلة أو غير مدعمة في متصفح ويب الخاص بك.
لاستخدام العرض القياسي، قم بتفعيل JavaScript من خلال تغيير إعدادات متصفحك، ثم %1$sحاول مرة أخرى%2$s.
", - "MainNavigation": "التصفح الرئيس", - "Menu": "القائمة", - "MenuEntries": "بنود (مدخلات) القائمة", - "NoPrivilegesAskPiwikAdmin": "لقد سجلت الدخول بصفتك '%1$s' ولكن يبدو أنه لا توجد أي صلاحيات لك في Matomo. %2$s اسأل مدير Matomo (انقر لمراسلته)%3$s gلمنحك صلاحيات \"المشاهدة\" لموقع ما.", - "NoSuchPage": "هذه الصفحة غير موجودة", - "OnlyForSuperUserAccess": "عنصر الواجهة هذا يُعرَض للمستخدمين من فئة المستخدم الفائق فقط.", - "PeriodRange": "نطاق", - "PivotBySubtable": "هذا التقرير ليس متمركزاً %1$s ، إجعله متمركزاً على %2$s", - "PresetDateToday": "اليوم", - "PresetDateYesterday": "أمس", - "QuickAccessTitle": "إبحث عن %s . استخدم مفاتيح الأسهم لتصفح نتائج البحث. اختصار: إضغط 'f' للبحث.", - "ReportGeneratedOn": "تم إنشاء التقرير في %s", - "ReportGeneratedXAgo": "التقارير المستخرجة منذ %s", - "ReportLowercase": "تقرير", - "Segments": "فئات", - "SharePiwikLong": "مرحباً.. وجدت تطبيقاً رائعاً مفتوح المصدر: Matomo!\n\nسيمكنك بايويك من تتبع زوار موقعك مجاناً، ويتوجب عليك حقاً أن تجربه الآن!", - "SharePiwikShort": "Matomo هو برنامج احصائيات ويب مجاني ومفتوح المصدر، إمتلك بياناتك", - "ShareThis": "شارك هذا", - "ShowJSCode": "عرض كود JaveScript الذي سيتم إدخاله.", - "SkipToContent": "تجاوز للمحتوى", - "SubscribeAndBecomePiwikSupporter": "تقدَّم إلى الصفحة الآمنة للدفع ببطاقة الائتمان (Paypal) لتصبح داعماً لـ Matomo!", - "SupportPiwik": "ادعم بايويك!", - "SystemSummaryMysqlVersion": "نسخة MySQL", - "SystemSummaryNActivatedPlugins": "%d الإضافات المفعّلة", - "SystemSummaryNWebsites": "%d مواقع ويب", - "SystemSummaryPhpVersion": "نسخة PHP", - "SystemSummaryPiwikVersion": "نسخة Matomo", - "SystemSummaryWidget": "ملخص النظام", - "TableNoData": "لاتوجد بيانات لهذا الجدول.", - "ThereIsNoDataForThisReport": "لا توجد بيانات لهذا التقرير.", - "UnFlattenDataTable": "هذا التقرير منبسط %s إجعله تراتبياً (هرمياً)", - "UndoPivotBySubtable": "حصل تمركُز لهذا التقرير %s تراجع عن التمركز", - "ViewAllPiwikVideoTutorials": "مشاهدة كافة دروس بايويك الفيديوية", - "WebAnalyticsReports": "تقارير تحليلات ويب", - "YouAreUsingTheLatestVersion": "أنت الآن تستخدم احدث إصدار من Matomo!" - } -} diff --git a/plugins/CoreHome/lang/az.json b/plugins/CoreHome/lang/az.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/az.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/be.json b/plugins/CoreHome/lang/be.json deleted file mode 100644 index 6439815c00ebabb0510628591da9eef25cfc067e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/be.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Няма дадзеных у гэтай катэгорыі. Паспрабуйце \"Ўключыць усе паказчыкі\".", - "ChooseWebsite": "Абярыце вэб-сайт", - "JavascriptDisabled": "Java-скрыпт павінен быць уключаны, каб выкарыстоўваць Matomo ў звычайны рэжыме прагляду.
Аднак, здаецца, што Java-скрыпт адключаны або не падтрымліваецца браўзэрам.
Каб выкарыстоўваць стандартны выгляд, уключыце JavaScript, змяніўшы наладкі браўзэра , затым %1$sпаспрабуйце зноў%2$s.
", - "NoPrivilegesAskPiwikAdmin": "Вы ўвайшлі як '%1$s', але здаецца, што у вас няма патрэбнага дазволу у Matomo. %2$s Спытайце свайго Matomo адміністратара (націснуць, каб паслаць паведамленне)%3$s, каб падаць вам дазвол для прагляду вэб-сайту.", - "PresetDateToday": "Сёння", - "PresetDateYesterday": "Учора", - "ShowJSCode": "Паказаць Java-код для ўстаўкі", - "SystemSummaryPhpVersion": "Версія PHP", - "ThereIsNoDataForThisReport": "Няма дадзеных для гэтай справаздачы.", - "WebAnalyticsReports": "Справаздачы Вэб-Аналітыкі" - } -} diff --git a/plugins/CoreHome/lang/bg.json b/plugins/CoreHome/lang/bg.json deleted file mode 100644 index fe5c83497643357eaaee555bc37be5f4cbbf4bc9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/bg.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "В случай, че използвате рекламен блокер, моля, деактивирайте го за този сайт, за да сте сигурни, че Matomo работи без проблеми.", - "AddTotalsRowDataTable": "Отчетът не показва общия ред %s Показване на реда с общите суми", - "CategoryNoData": "Няма данни в тази категория. Опитайте \"Включи всички данни\".", - "ChangeCurrentWebsite": "Изберете уебсайт. Избран в момента уебсайт: %s", - "ChangePeriod": "Промяна на периода", - "ChangeVisualization": "Промяна на визуализацията", - "CheckForUpdates": "Проверка за обновления", - "CheckPiwikOut": "Разгледайте Matomo!", - "ChooseWebsite": "Избери уеб сайт", - "ChooseX": "Изберете %1$s", - "ClickRowToExpandOrContract": "Кликнете върху този ред, за да разширите или свиете подтаблицата.", - "ClickToEditX": "Кликнете за промяна на %s", - "ClickToSeeFullInformation": "Кликнете, за да видите пълната информация", - "CloseSearch": "Затваряне на търсенето", - "CloseWidgetDirections": "Можете да затворите този уиджет, като кликнете на 'Х' иконата в горната му част.", - "CssDidntLoad": "Вашият браузър не можа да зареди стила на тази страница.", - "CustomLimit": "Персонализиран лимит", - "DataForThisReportHasBeenDisabled": "Понастоящем сегментирането е деактивирано за този отчет. Моля, проверете %1$s този ЧЗВ %2$s за повече подробности.", - "DataForThisReportHasBeenPurged": "Датата на този доклад е стара с %s месеца и ще бъде изтрита.", - "DataTableCombineDimensions": "Размерите се показват отделно %s Показване на комбинираните размери", - "DataTableExcludeAggregateRows": "Сумарните редове са показани %s Скриване", - "DataTableHowToSearch": "Натиснете Enter или кликнете върху иконата за търсене, за да търсите", - "DataTableIncludeAggregateRows": "Сумарните редове са скрити %s Покажи ги", - "DataTableShowDimensions": "Размерите са комбинирани %s Показване на размерите отделно", - "DateInvalid": "Посочената комбинация от дата и период е невалидна. Моля, изберете валидна дата в селектора на дати.", - "Default": "подразбиране", - "DevicesSubcategoryHelp": "Разделът Устройства Ви помага да разберете технологията, която Вашите посетители използват за достъп до Вашия сайт. Ще видите отчети за типа устройство и конкретни модели, за да можете да оптимизирате сайта си за най-популярните устройства.", - "DonateCall1": "Matomo винаги ще бъде безплатен за използване, но това не означава, че ние нямаме разходи за развитието му.", - "DonateCall2": "Matomo се нуждае от вашата подкрепа, за да продължава да расте и процъфтява.", - "DonateCall3": "Ако смятате, че Matomo е добавил значителна стойност към Вашия бизнес или начинание, %1$sмоля, обмислете да дарите %2$s или %3$sза закупуване на премиум функционалности %4$s. Всяка стотинка ще помогне.", - "EndDate": "Крайна дата", - "EndShortcut": "Край", - "EngagementSubcategoryHelp1": "Разделът за ангажираност предоставя отчети, които помагат да се определи количествено колко нови и завърнали се посетители получавате. Можете също да прегледате отчети, които разбиват средното време и броя на страниците на посещение, както и броя пъти, когато посетител е бил на Вашия сайт и най-често срещания брой дни между посещенията.", - "EngagementSubcategoryHelp2": "Това може да Ви помогне да оптимизирате за честота и посещения с високо взаимодействие в допълнение към максимизирането на обхвата Ви.", - "EnterZenMode": "Влезте в режим Zen (скрийте менютата)", - "ExceptionNotAllowlistedIP": "Не можете да използвате Matomo, тъй като Вашият IP %s не е разрешен.", - "ExcludeRowsWithLowPopulation": "Всички редове са показани %s С изключение на тези с ниски стойности", - "ExitZenMode": "Излизане от режим Zen (показване на менютата)", - "ExpandSubtables": "Разширете подтаблиците", - "ExportFormat": "Формат за експортиране", - "ExportTooltip": "Забележка: За да използвате генерирания URL адрес за експортиране, ще трябва да посочите означение за удостоверяване на приложението. Можете да конфигурирате тези токени в Администратор → Сигурност → Удостоверяване на токени.", - "ExportTooltipWithLink": "Забележка: За да използвате генерирания URL адрес за експортиране, ще трябва да посочите означение за удостоверяване на приложението. Можете да конфигурирате тези токени в %1$s[Администратор → Сигурност → Токени]%2$s. Заменете %3$s в URL адреса за експортиране с Вашия токен за удостоверяване. Предупреждение: Никога не споделяйте URL адреса с истинския маркер с никой друг.", - "ExternalHelp": "Помощ (отваря се в нов прозорец)", - "FlattenDataTable": "Този доклад е йерархичен %s Направете го плосък", - "FlattenReport": "Изравняване на отчета", - "FormatMetrics": "Показатели за форматиране", - "HideExportUrl": "Скриване на URL за експортиране", - "HomeShortcut": "Начало", - "IncludeRowsWithLowPopulation": "Редове с ниски стойности са скрити %s Покажи всички редове", - "InjectedHostEmailBody": "Здравейте, днес се опитах да достъпя Matomo и се натъкнах на предупреждение за неизвестно име на машината.", - "InjectedHostEmailSubject": "Matomo е бил достъпен чрез неизвестно име: %s", - "InjectedHostNonSuperUserWarning": "%1$sКликнете тук за безопасен достъп до Matomo%2$s и премахнете това предупреждение. Може също да искате да се свържете с Вашия администратор на Matomo и да го уведомите за този проблем (%3$sкликнете тук за имейл %4$s).", - "InjectedHostSuperUserWarning": "Възможно е конфигурацията на Matomo да е неправилна (това се случва когато Matomo е бил изместен на нов сървър или друг адрес). Вие можете или %1$sда кликнете тук и да добавите %2$s като валиден Matomo адрес (ако сте сигурни в достоверността му)%3$s, или %4$sда кликнете тук и да посетите %5$s, за да достъпите Matomo безопасно%6$s.", - "InjectedHostWarningIntro": "В момента достъпвате Matomo от %1$s, но Matomo е настроен да работи чрез този адрес: %2$s.", - "JavascriptDisabled": "JavaScript трябва да бъде разрешен за да използвате Matomo в стандартен изглед.
Същото е ако JavaScript не е разрешен или браузърът не го поддържа.
За да използвате стандартен изглед разрешете JavaScript от настройките на Вашия браузър и %1$sопитайте отново%2$s.
", - "JsDidntLoad": "Вашият браузър не успя да зареди скриптовете на тази страница.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Водещата отворена платформа за анализ, която зачита поверителността на личните Ви данни.", - "MacPageDown": "Fn + стрелка надясно", - "MacPageUp": "Fn + стрелка наляво", - "MainNavigation": "Основна навигация", - "Menu": "Меню", - "MenuEntries": "Записи в менюто", - "NoPrivilegesAskPiwikAdmin": "Вие се логнахте в като '%1$s' но изглежда че нямате разрешение от Matomo. %2$s Попитайте Вашият Matomo администратор (клик на email)%3$s да Ви даде \"поглед\" достъп до сайта.", - "NoSuchPage": "Тази страница не съществува", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Актуализацията с едно кликване не е възможна, тъй като използвате Matomo с множество сървъри. Моля, изтеглете най-новата версия от %1$s, за да продължите.", - "OnlyForSuperUserAccess": "Този уиджет се показва в таблото за управление по подразбиране само за потребители с достъп на супер потребител.", - "PageDownShortcutDescription": "за да стигнете до края на страницата", - "PageUpShortcutDescription": "за да стигнете до горната част на страницата", - "PeriodHasOnlyRawData": "Изглежда отчетите за този период все още не са обработени. Искате ли да видите какво се случва сега? Разгледайте %1$sРегистъра на посещенията%2$s или изберете друг период от дата, докато се генерират отчетите.", - "PeriodRange": "Период", - "PivotBySubtable": "Този отчет не е пивотиран %1$s Пивот от %2$s", - "PresetDateToday": "Днес", - "PresetDateYesterday": "Вчера", - "Profilable": "Профилируеми", - "QuickAccessTitle": "Потърсете %s. Използвайте клавишите със стрелки, за да навигирате в резултатите от търсенето. Пряк път: Натиснете 'f' за търсене.", - "QuickLinks": "Бързи връзки", - "ReadMoreOnlineGuide": "Прочетете повече по тази тема в онлайн ръководството.", - "RemoveTotalsRowDataTable": "Отчетът показва общия ред %s Премахване на реда с общи суми", - "ReportGeneratedOn": "Доклада е генериран за %s", - "ReportGeneratedXAgo": "Доклада е генериран преди %s", - "ReportLowercase": "доклад", - "ReportType": "Вид на отчета", - "ReportWithMetadata": "Отчет с метаданни", - "ReportingCategoryHelpPrefix": "Как ми помага страницата за отчитане „%1$s → %2$s“?", - "RowLimit": "Ограничение на редовете", - "SearchOnMatomo": "Потърсете '%1$s' на Matomo.org", - "SeeAvailableVersions": "Вижте наличните версии", - "Segments": "Сегменти", - "SharePiwikLong": "Здравейте! Туко-що открих прекрасен софтуер с отворен код: Matomo! \n\nMatomo позволява проследяването на посетителите на даден сайт безплатно. Задължително трябва да го пробвате!", - "SharePiwikShort": "Matomo! Софтуер с отворен код за уеб анализ. Притежавайте вашите собствени данни.", - "ShareThis": "Сподели това", - "ShortcutCalendar": "за отваряне на календара (d означава дата)", - "ShortcutHelp": "за отваряне на тази помощ", - "ShortcutRefresh": "за опресняване на съдържанието", - "ShortcutSearch": "за отваряне на търсенето (f означава Намери)", - "ShortcutSegmentSelector": "за отваряне на Селектор на сегменти", - "ShortcutWebsiteSelector": "за отваряне на Селектора на уеб сайтове", - "ShortcutZenMode": "за режим Zen", - "ShortcutsAvailable": "Налични преки пътища", - "ShowExportUrl": "Показване на URL за експортиране", - "ShowJSCode": "Покажи JavaScript кода за вмъкване в сайта", - "SkipToContent": "Преминете към съдържанието", - "SoftwareSubcategoryHelp": "Разделът за софтуер показва операционните системи, браузърите и плъгините, които Вашите посетители използват за достъп до сайта, така че да можете да оптимизирате сайта си, за да гарантирате, че е напълно съвместим с най-популярните конфигурации.", - "StandardReport": "Стандартен отчет", - "StartDate": "Начална дата", - "SubscribeAndBecomePiwikSupporter": "Пристъпете към сигурната страница за плащане (PayPal) за да станете Matomo Supporter!", - "SupportPiwik": "Подкрепи Matomo!", - "SupportUsOn": "Подкрепете ни в", - "SystemSummaryMysqlVersion": "Версия на MySQL", - "SystemSummaryNActivatedPlugins": "%d активирани плъгини", - "SystemSummaryNSegments": "%1$d сегменти", - "SystemSummaryNSegmentsWithBreakdown": "%1$d сегменти (%2$s предварително обработени, %3$s обработени в реално време)", - "SystemSummaryNWebsites": "%d уебсайтове", - "SystemSummaryPhpVersion": "PHP версия", - "SystemSummaryPiwikVersion": "Версия Matomo", - "SystemSummaryWidget": "Резюме на системата", - "TableNoData": "Няма данни за тази таблица.", - "TechDeprecationWarning": "Започвайки от версия Matomo %1$s, Matomo ще прекрати поддръжката за %2$s. За повече информация %3$sвижте публикацията ни в блога.%4$s", - "ThanksFromAllOfUs": "Благодарим Ви от всички нас в Matomo!", - "ThereIsNoDataForThisReport": "Няма данни за този доклад.", - "UnFlattenDataTable": "Този доклад е плосък %s Направете го йерархичен", - "UndoPivotBySubtable": "Този отчет е с пивот %s Отмяна на пивот", - "ViewAllPiwikVideoTutorials": "Виж всички Matomo помощни клипове", - "VisitStatusOrdered": "Поръчано", - "VisitStatusOrderedThenAbandoned": "Поръчана и след това изоставена кошница", - "VisitTypeReturning": "Връщане", - "VisitTypeReturningCustomer": "Връщащ се клиент", - "VisitorsCategoryHelp1": "Страниците за посетители Ви разказват кои са Вашите посетители. Неща като откъде идват Вашите посетители, какви устройства и браузъри използват и кога обикновено посещават уебсайта Ви. Разберете като цяло коя е Вашата аудитория и потърсете отклонения, за да видите как аудиторията Ви може да нарасне.", - "VisitorsCategoryHelp2": "В допълнение към общата информация за Вашите посетители, можете също да използвате %1$sДневник на посещенията%2$s, за да видите какво се е случило при всяко отделно посещение.", - "VisitorsOverviewHelp": "Прегледът на посетителите Ви помага да разберете популярността на Вашия сайт. Той прави това, като предоставя диаграми, които показват колко посещения получава Вашият сайт за избран период и средното ниво на ангажираност за ключови функции, като например търсения и изтегляния.", - "WebAnalyticsReports": "Уеб Анализи Доклади", - "YouAreUsingTheLatestVersion": "Вие използвате последна версия на Matomo!", - "YourDonationWillHelp": "Вашето дарение директно ще помогне за финансирането на нови функции и подобрения за тази платформа за анализ с отворен код. Това означава, че общността винаги ще се възползва от инструмент, който защитава поверителността и Ви позволява да контролирате данните си." - } -} diff --git a/plugins/CoreHome/lang/bn.json b/plugins/CoreHome/lang/bn.json deleted file mode 100644 index 06a5258803aed89937ac496048eba3bf7fd741a4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/bn.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "CoreHome": { - "PresetDateToday": "আজ", - "PresetDateYesterday": "গতকাল" - } -} diff --git a/plugins/CoreHome/lang/bs.json b/plugins/CoreHome/lang/bs.json deleted file mode 100644 index 6d4abece3527965f44631a8dc9a2f6f0754966c3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/bs.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "CoreHome": { - "CheckForUpdates": "Provjeri nove verzije", - "CheckPiwikOut": "Probajte Matomo!", - "ChooseWebsite": "Izaberite web sajt", - "PeriodRange": "Domet", - "PresetDateToday": "Danas", - "PresetDateYesterday": "Jučer", - "ReportLowercase": "izvještaj", - "ShareThis": "Podijeli ovo" - } -} diff --git a/plugins/CoreHome/lang/ca.json b/plugins/CoreHome/lang/ca.json deleted file mode 100644 index b6e802672b10381e5762530679f791133b30d1d9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ca.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "En cas que utilitzeu un bloquejador d'anuncis desactiveu-lo per a aquest lloc, per assegurar-vos que Matomo funciona sense cap problema.", - "AddTotalsRowDataTable": "L'informe no mostra la fila de totals %s Mostra la fila de totals", - "CategoryNoData": "No hi ha dades en aquesta categoria. Proveu d'incloure tota la població.", - "ChangeCurrentWebsite": "Trieu un lloc web, lloc web seleccionat actualment: %s", - "ChangePeriod": "Canviar el període", - "ChangeVisualization": "Canviar la visualització", - "CheckForUpdates": "Cerca actualitzacions", - "CheckPiwikOut": "Fes una ullada a Matomo!", - "ChooseWebsite": "Trieu el lloc web", - "ChooseX": "Trieu %1$s", - "ClickRowToExpandOrContract": "Feu clic en aquesta fila per ampliar o reduir la subtaula.", - "ClickToEditX": "Feu clic per editar %s", - "ClickToSeeFullInformation": "Feu clic per veure tota la informació", - "CloseSearch": "Tancar la cerca", - "CloseWidgetDirections": "Podeu tancar aquest giny fent clic a la icona \"X\" a la part superior del giny.", - "CopyModalNote": "%1$sNota:%2$s És possible que calgui ajustar el %3$s copiat si inclou referències específiques del lloc web original. Reviseu la configuració per garantir la compatibilitat.", - "CopyX": "Copia %1$s", - "CopyXDescription": "Seleccioneu el lloc web on voleu copiar aquest %1$s. Això crearà una còpia exacta, inclosa la configuració, al lloc web escollit.", - "CssDidntLoad": "El vostre navegador no ha pogut carregar l'estil d'aquesta pàgina.", - "CustomLimit": "Límit personalitzat", - "DataForThisReportHasBeenDisabled": "Actualment la segmentació està desactivada per a aquest informe. Si us plau, consulteu %1$saquest FAQ%2$s per obtenir més detalls.", - "DataForThisReportHasBeenPurged": "La informació d'aquest informés és anterior a %s mesos d'antiguitat i s'ha purgat.", - "DataTableCombineDimensions": "Les dimensions es mostren per separat %s Mostra les dimensions combinades", - "DataTableExcludeAggregateRows": "Es mostren les files aggrupades %s Amaga-ho", - "DataTableHowToSearch": "Premeu Intro o feu clic a la icona de cerca per cercar", - "DataTableIncludeAggregateRows": "No es mostren les files agrupades %s Mostra-les", - "DataTableShowDimensions": "Les dimensions s'han combinat %s Mostra les dimensions per separat", - "DateInvalid": "La combinació de data i període indicada no és vàlida. Trieu una data vàlida al selector de dates.", - "Default": "per defecte", - "DevicesSubcategoryHelp": "La secció Dispositius us ajuda a entendre la tecnologia que fan servir els vostres visitants per accedir al vostre lloc. Veureu informes sobre el tipus de dispositiu i models específics que us permetran optimitzar el vostre lloc per als dispositius més populars.", - "DonateCall1": "Matomo mai us costarà res d'utilitzar, però això no vol dir que no ens costi res de fer.", - "DonateCall2": "Matomo necessita el vostre suport continuat per créixer i prosperar.", - "DonateCall3": "Si creieu que Matomo ha afegit un valor important al vostre negoci o esforç, %1$si us plau, considereu donar%2$s o %3$scomprar una funció premium%4$s. Cada cèntim ajudarà.", - "EndDate": "Data final", - "EndShortcut": "Final", - "EngagementSubcategoryHelp1": "La secció Implicació ofereix informes que ajuden a quantificar quants visitants nous i recurrents rebeu. També podeu revisar informes que desglossen el temps mitjà i el nombre de pàgines per visita, així com el nombre de vegades que un visitant ha visitat el vostre lloc i el nombre de dies més habitual entre visites.", - "EngagementSubcategoryHelp2": "Això us pot ajudar a optimitzar la freqüència i les visites d'alta interacció, a més de maximitzar el vostre abast.", - "EnterZenMode": "Entra al mode Zen (amaga els menús)", - "ExceptionNotAllowlistedIP": "No podeu utilitzar aquest Matomo perquè la vostra IP %s no està permesa.", - "ExcludeRowsWithLowPopulation": "Es mostren totes les files %s No mostris la població inferior", - "ExitZenMode": "Sortir del mode Zen (mostrar els menús)", - "ExpandSubtables": "Amplieu les subtaules", - "ExportFormat": "Format d'exportació", - "ExportTooltip": "Nota: per utilitzar l'URL d'exportació generat, haureu d'especificar una autenticació de testimoni d'aplicació. Podeu configurar aquests testimonis a Admin → Security → Token Auths.", - "ExportTooltipWithLink": "Nota: per utilitzar l'URL d'exportació generat, haureu d'especificar una autenticació de testimoni d'aplicació. Podeu configurar aquests testimonis a %1$s[Administrador → Seguretat → Fitxers d'autenticació]%2$s. Substituïu %3$s a l'URL d'exportació pel vostre testimoni d'autenticació. Avís: mai compartiu l'URL amb el testimoni real amb ningú més.", - "ExternalHelp": "Ajuda (s'obre en una pestanya nova)", - "FlattenDataTable": "L'informe es jeràrquic %s Feu-lo pla", - "FlattenReport": "Allisar l'informe", - "FormatMetrics": "Format de mètriques", - "HideExportUrl": "Amaga l'URL d'exportació", - "HomeShortcut": "Inici", - "IncludeDimensionsSeparately": "Inclou les dimensions per separat", - "IncludeRowsWithLowPopulation": "No es mostren les files amb polbació inferior %s Mostra totes les files", - "InjectedHostEmailBody": "Hola, He provat d'accedir al Matomo avui i m'he trobat amb l'avís de nom de la màquina desconegut.", - "InjectedHostEmailSubject": "S'ha accedit al Matomo amb un nom de màquina desconegut: %s", - "InjectedHostNonSuperUserWarning": "%1$sClick here to access Matomo safely%2$s i eliminar aaquest avíst. Potse també voldreu contractar amb l'administrador del vostre Matomo i notificar-li aquesta incidència (%3$sclick here to email%4$s).", - "InjectedHostSuperUserWarning": "Pot ser que el Matomo estigui mal configurat (per exemple, si el Matomo s'ha mogut a un nou servidor o URL). Podeu %1$sfer click aquí i afegir %2$s com el nom de la màquina vàlid (si hi confieu)%3$s, o bé %4$s fer click aquí %5$s per accedir al Matomo de forma segura%6$s.", - "InjectedHostWarningIntro": "Esteu accedint al Matomo desde %1$s, però el Matomo està configurat per escoltar a l'adreça: %2$s.", - "JavascriptDisabled": "JavaScript ha d'estar habilitat perquè pugueu utilitzar Matomo amb la vista estàndard.
No obstant això sembla que JavaScript està desactivat o no és compatible amb el vostre navegador.
Per utilitzar la vista estàndard, activeu JavaScript canviant les opcions del navegador i després %1$storneu-ho a provar%2$s.
", - "JsDidntLoad": "El vostre navegador no ha pogut carregar els scripts d'aquesta pàgina.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "La plataforma d'anàlisi oberta líder que respecta la vostra privadesa.", - "LearnMoreFullStop": "%1$sMés informació.%2$s", - "MacPageDown": "Fn + fletxa dreta", - "MacPageUp": "Fn + fletxa esquerra", - "MainNavigation": "Navegació principal", - "Menu": "Menú", - "MenuEntries": "Entrades del menú", - "NoPrivilegesAskPiwikAdmin": "Esteu identificat com a '%1$s' però sembla que no teniu cap permís establert al Matomo. %2$s Pregunteu al vostre administrador de Matomo (feu click per enviar un email)%3$s que us dongui access per veure un lloc web.", - "NoSuchPage": "Aquesta pàgina no existeix", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "L'actualització d'un sol clic no està disponible perquè utilitzeu Matomo amb diversos servidors. Baixeu la darrera versió de %1$s per continuar.", - "OnlyForSuperUserAccess": "Aquest widget només es mostra al tauler predeterminat per als usuaris que tenen accés de superusuari.", - "PageDownShortcutDescription": "per arribar al final de la pàgina", - "PageUpShortcutDescription": "per anar al capdamunt de la pàgina", - "PeriodHasOnlyRawData": "Sembla que els informes d'aquest període encara no s'han processat. Vols veure què passa ara? Consulteu el %1$sRegistre de visites%2$s o trieu un període de dates diferent mentre no es generin els informes.", - "PeriodHasOnlyRawDataNoVisitsLog": "Sembla que els informes d'aquest període encara no s'han processat, però estaran disponibles d'aquí a unes hores. Podeu triar un període diferent fins que es generin els informes.", - "PeriodRange": "Rang", - "PivotBySubtable": "Aquest informe no està orientat %1$s Gira per %2$s", - "PresetDateToday": "Avui", - "PresetDateYesterday": "Ahir", - "Profilable": "Perfilable", - "ProfilableSegmentHelp": "1 per a perfilable (per exemple, s'han utilitzat cookies), 0 per a no perfilable (per exemple, no s'han utilitzat cookies)", - "QuickAccessTitle": "Cerca %s. Utilitzeu les tecles de direcció per navegar pels resultats de la cerca. Drecera: premeu 'f' per cercar.", - "QuickLinks": "Enllaços ràpids", - "ReadMoreOnlineGuide": "Llegiu més sobre aquest tema a la guia en línia.", - "RemoveTotalsRowDataTable": "L'informe mostra la fila de totals %s Elimina la fila de totals", - "ReportGeneratedOn": "Informe generat el %s", - "ReportGeneratedXAgo": "Informe generat fa %s", - "ReportLowercase": "informe", - "ReportType": "Tipus d'informe", - "ReportWithMetadata": "Informe amb metadades", - "ReportingCategoryHelpPrefix": "Com m'ajuda la pàgina d'informes \"%1$s → %2$s\"?", - "RowLimit": "Límit de files", - "SearchOnMatomo": "Cerqueu \"%1$s\" a Matomo.org", - "SeeAvailableVersions": "Consulteu les versions disponibles", - "Segments": "Segments", - "SharePiwikLong": "Bones! Acabo de trobar un gran programari lliure: Matomo!\n\nMatomo et permetrà fer un seguiment dels visitants del teu lloc web de forma gratuïta. De veritat que l'hauries de provar!", - "SharePiwikShort": "Matomo! Analítica web gratuïta/lliure. Sigues propietari de les teves dades.", - "ShareThis": "Comparteix-ho", - "ShortcutCalendar": "per obrir el calendari (d vol dir Date)", - "ShortcutHelp": "per mostrar aquesta ajuda", - "ShortcutRefresh": "per actualitzar el contingut", - "ShortcutSearch": "per obrir la cerca (f vol dir Find)", - "ShortcutSegmentSelector": "per obrir el selector Segment", - "ShortcutWebsiteSelector": "per obrir el selector Lloc Web", - "ShortcutZenMode": "per mode Zen", - "ShortcutsAvailable": "Dreceres disponibles", - "ShowExportUrl": "Mostra l'URL d'exportació", - "ShowJSCode": "Mostra el codi JavaScript necessari", - "SkipToContent": "Saltar al contingut", - "SoftwareSubcategoryHelp": "La secció Programari mostra els sistemes operatius, els navegadors i els connectors que fan servir els vostres visitants per accedir al lloc perquè pugueu optimitzar el vostre lloc per assegurar-vos que és totalment compatible amb les configuracions més populars.", - "StandardReport": "Informe estàndard", - "StartDate": "Data d'inici", - "SubscribeAndBecomePiwikSupporter": "Aneu a una pàgina de pagament segura amb targeta de crèdit (Paypal) per convertir-vos en un benefactor de Matomo!", - "SupportPiwik": "Dona suport a Matomo!", - "SupportUsOn": "Doneu-nos suport", - "SystemSummaryMysqlVersion": "Versió de MySQL", - "SystemSummaryNActivatedPlugins": "%d connectors activats", - "SystemSummaryNSegments": "%1$d segments", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segments (%2$s preprocessats, %3$s processats en temps real)", - "SystemSummaryNWebsites": "%d llocs web", - "SystemSummaryPhpVersion": "Versió del PHP", - "SystemSummaryPiwikVersion": "Versió de Matomo", - "SystemSummaryWidget": "Resum del sistema", - "TableNoData": "No hi ha dades per a aquesta taula.", - "TechDeprecationWarning": "A partir de la versió de Matomo %1$s, Matomo finalitzarà el suport per a %2$s. Per obtenir més informació %3$sconsulteu la nostra entrada al bloc.%4$s", - "ThanksFromAllOfUs": "Gràcies de part de tots nosaltres a Matomo!", - "ThereIsNoDataForThisReport": "No hi ha informació per aquest informe.", - "UnFlattenDataTable": "Aquest informe es pla %s Feu-lo jeràrquic", - "UndoPivotBySubtable": "Aquest informe s'ha girat %s Desfés el gir", - "ViewAllPiwikVideoTutorials": "Veure tots els tutorials de vídeo de Matomo", - "VisitStatusOrdered": "Ordenat", - "VisitStatusOrderedThenAbandoned": "Carretó carregat i abandonat", - "VisitTypeReturning": "Habitual", - "VisitTypeReturningCustomer": "Client habitual", - "VisitorsCategoryHelp1": "Les pàgines de Visitants t'expliquen coses sobre qui són els teus visitants. Coses com ara d'on provenen els teus visitants, quins dispositius i navegadors fan servir i quan visiten generalment el teu lloc web. Per entendre, en conjunt, qui és el teu públic i buscar valors atípics per veure com podria créixer el teu públic.", - "VisitorsCategoryHelp2": "A més de la informació general sobre els vostres visitants, també podeu utilitzar el %1$sRegistre de visites%2$s per veure què va passar a cada visita individual.", - "VisitorsOverviewHelp": "La \"Visió general dels visitants\" us ajuda a entendre la popularitat del vostre lloc. Ho fa proporcionant gràfics que mostren quantes visites rep el vostre lloc durant un període seleccionat i el nivell mitjà d'interacció amb les funcions clau, com ara cerques i baixades.", - "WebAnalyticsReports": "Informe d'analítica web", - "YouAreUsingTheLatestVersion": "Esteu fent servir l'última versió de Matomo!", - "YourDonationWillHelp": "La teva donació ajudarà directament a finançar noves funcions i millores per a aquesta plataforma d'anàlisi de codi obert. Això significa que la comunitat sempre es beneficiarà d'una eina que protegeixi la privadesa i us permeti mantenir el control de les vostres dades." - } -} diff --git a/plugins/CoreHome/lang/cs.json b/plugins/CoreHome/lang/cs.json deleted file mode 100644 index dea2b7b3eb6623a272b797c4f3174ddc41f95df5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/cs.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Pokud používáte blokování reklam, zakažte ho pro tyto stránky, aby Matomo fungovalo správně.", - "AddTotalsRowDataTable": "Sestava nezobrazuje řádek součtů %s Zobrazit řádek součtů", - "CategoryNoData": "V této kategorii nejsou k dispozici žádná data. Zkuste \"Zobrazit všechny výsledky\".", - "ChangeCurrentWebsite": "Vyberte web, aktuálně vybraný web: %s", - "ChangePeriod": "Změnit období", - "ChangeVisualization": "Změnit vizualizaci", - "CheckForUpdates": "Zkontrolovat aktualizace", - "CheckPiwikOut": "Vyzkoušejte Matomo!", - "ChooseWebsite": "Zvolte web", - "ChooseX": "Vyberte %1$s", - "ClickRowToExpandOrContract": "Klikněte na tento řádek pro rozbalení nebo zbalení podtabulky.", - "ClickToEditX": "Klikněte pro úpravu %s", - "ClickToSeeFullInformation": "Klikněte pro zobrazení úplné informace", - "CloseSearch": "Zavřít vyhledávání", - "CloseWidgetDirections": "Tento widget můžete zavřít kliknutím na ikonu X v horní části widgetu.", - "CssDidntLoad": "Vášmu prohlížeči se nepodařilo načíst styl této stránky.", - "CustomLimit": "Vlastní limit", - "DataForThisReportHasBeenDisabled": "Segmentace je v současné době pro toto hlášení zakázaná. Další podrobnosti najdete v %1$stěchto často kladených dotazech%2$s.", - "DataForThisReportHasBeenPurged": "Data pro toto hlášení jsou starší než %s měsíců a byla odstraněna.", - "DataTableCombineDimensions": "Rozměry jsou zobrazeny samostatně %s Zobrazit rozměry dohromady", - "DataTableExcludeAggregateRows": "Souhrnné řádky jsou zobrazeny %s Skrýt", - "DataTableHowToSearch": "Pro hledání stiskněte enter, nebo klikněte na ikonu vyhledávání", - "DataTableIncludeAggregateRows": "Souhrnné řádky jsou skryty %s Zobrazit", - "DataTableShowDimensions": "Rozměry jsou kombinovány %s Zobrazit rozměry samostatně", - "DateInvalid": "Uvedená kombinace data a období je neplatná. Vyberte prosím platné datum.", - "Default": "výchozí", - "DevicesSubcategoryHelp": "Sekce Zařízení vám pomůže zjistit, jakou technologii návštěvníci používají k přístupu na vaše stránky. Zobrazí se přehledy o typu zařízení a konkrétních modelech, které vám umožní optimalizovat web pro nejoblíbenější zařízení.", - "DonateCall1": "Matomo bude vždy zadarmo, to ale neznamená, že jeho vývoj nic nestojí.", - "DonateCall2": "Matomo potřebuje vaši podporu, ať může dál růst a prosperovat.", - "DonateCall3": "Pokud se domníváte, že vám Matomo významně pomáhá při vašem podnikání nebo projektu, %1$sprosím zvažte příspěvek%2$s nebo %3$szakoupení prémiové funkce%4$s. Každý haléř pomůže.", - "EndDate": "Datum ukončení", - "EndShortcut": "Konec", - "EngagementSubcategoryHelp1": "Sekce Zapojení poskytuje přehledy, které pomáhají vyčíslit počet nových a vracejících se návštěvníků. Můžete si také prohlédnout přehledy, které rozebírají průměrnou dobu a počet stránek na jednu návštěvu, stejně jako počet návštěv, které návštěvník na vašem webu absolvoval, a nejčastější počet dní mezi návštěvami.", - "EngagementSubcategoryHelp2": "To vám kromě maximalizace dosahu pomůže optimalizovat četnost a vysokou interakci návštěv.", - "EnterZenMode": "Vstup do režimu Zen (skrýt nabídky)", - "ExceptionNotAllowlistedIP": "Nemůžete použít toto Matomo, protože vaše IP %s není povolena.", - "ExcludeRowsWithLowPopulation": "Všechny řádky jsou zobrazeny %s Vyloučit nízkou populaci", - "ExitZenMode": "Ukončit režim Zen (zobrazit nabídky)", - "ExpandSubtables": "Rozbalit dílčí tabulky", - "ExportFormat": "Formát exportu", - "ExportTooltip": "Poznámka: Chcete-li použít vygenerovanou adresu URL exportu, musíte zadat autentizační token aplikace. Tyto tokeny můžete nakonfigurovat v nabídce Admin → Security → Token Auths.", - "ExportTooltipWithLink": "Poznámka: Chcete-li použít vygenerovanou adresu URL exportu, musíte zadat autentizační token aplikace. Tyto tokeny můžete nakonfigurovat v %1$s[Admin → Security → Auths Tokens]%2$s. Nahraďte %3$s v adrese URL exportu svým tokenem Auth. Upozornění: V případě, že se jedná o autentizační kód, je třeba zadat tzv: Adresu URL se skutečným tokenem nikdy nesdílejte s nikým jiným.", - "ExternalHelp": "Nápověda (otevře se v nové záložce)", - "FlattenDataTable": "Hlášení je hierarchické %s Zploštit", - "FlattenReport": "Srovnat report", - "FormatMetrics": "Formátovat metriky", - "HideExportUrl": "Skrýt URL exportu", - "HomeShortcut": "Domů", - "IncludeDimensionsSeparately": "Rozměry uveďte samostatně", - "IncludeRowsWithLowPopulation": "Řádky s nízkou populací jsou skryty %s Zobrazit všechny řádky", - "InjectedHostEmailBody": "Ahoj. Dnes jsem se snažil(a) dostat do Matoma a zobrazilo se varování o neznámém jménu hostitele.", - "InjectedHostEmailSubject": "K Matomo bylo přistupováno s neznámým jménem hostitele %s", - "InjectedHostNonSuperUserWarning": "%1$sKlikněte zde pro bezpečný přístup k Matomu%2$s a odstranění tohoto varování. Pokud chcete upozornit administrátora na tento problém, (%3$sklikněte zde pro odeslání e-mailu%4$s).", - "InjectedHostSuperUserWarning": "Matomo může být špatně nakonfigurováno, například pokud bylo přesunuto na nový server nebo URL. Můžete %1$skliknout zde a přidat %2$s jako platné jméno hostitele Matoma (pokud mu důvěřujete)%3$s, nebo %4$s klikněte zde%5$s pro bezpečný přístup k Matomu%6$s.", - "InjectedHostWarningIntro": "Nyní přistupujete k Matomu z %1$s, ale bylo nakonfigurováno, aby naslouchalo na následující adrese: %2$s.", - "JavascriptDisabled": "Pro zobrazení Matoma je nutné mít zapnutý JavaScript.
Zdá se, že máte JavaScript vypnutý, nebo ho vás prohlížeč nepodporuje.
Pro běžné zobrazení zapněte JavaScript ve svém prohlížeči a poté to %1$szkuste znovu%2$s.
", - "JsDidntLoad": "Vašemu prohlížeči se nepodařilo načíst skripty této stránky.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Nejrozšířenější otevřená aplatforma pro analýzu, která respektuje vaše soukromí.", - "MacPageDown": "Fn + pravá šipka", - "MacPageUp": "Fn + levá šipka", - "MainNavigation": "Hlavní navigace", - "Menu": "Menu", - "MenuEntries": "Položky menu", - "NoPrivilegesAskPiwikAdmin": "Jste přihlášeni jako '%1$s' ale zdá se, že nemáte v Matomu žádná práva. %2$s Zeptejte se administrátora vašeho Matoma (kliknutím na e-mail)%3$s aby vám dal oprávnění pro zobrazení stránek.", - "NoSuchPage": "Tato stránka neexistuje", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Aktualizace na jedno kliknutí není dostupná při nasazení Matoma na několika serverech naráz. Stáhněte prosím nejnovější verzi z %1$s a pokračujte.", - "OnlyForSuperUserAccess": "Tento widget je na výchozí nástěnce zobrazen pouze pro uživatele se super uživatelským přístupem.", - "PageDownShortcutDescription": "dostat se na konec stránky", - "PageUpShortcutDescription": "dostat se na začátek stránky", - "PeriodHasOnlyRawData": "Vypadá to, že hlášení za toto období ještě nebyla zpracována. Chcete se podívat, co se děje nyní? Podívejte se do %1$sVisits log%2$s nebo zvolte jiné datumové období, dokud nebudou hlášení vygenerována.", - "PeriodHasOnlyRawDataNoVisitsLog": "Vypadá to, že hlášení za toto období ještě nebyla zpracována, ale budou k dispozici během několika hodin. Do doby, než budou hlášení vygenerována, můžete zvolit jiné datumové období.", - "PeriodRange": "Rozsah", - "PivotBySubtable": "Toto hlášení není zaměřené %1$s Zaměřit na %2$s", - "PresetDateToday": "Dnes", - "PresetDateYesterday": "Včera", - "Profilable": "Profilovatelné", - "QuickAccessTitle": "Výsledky hledání pro %s. Pro navigaci ve výsledcích vyhledávání použijte šipky. Zkratka: Zmáčknout 'f' pro hledání.", - "QuickLinks": "Rychlé odkazy", - "ReadMoreOnlineGuide": "Další informace o tomto tématu naleznete v online příručce.", - "RemoveTotalsRowDataTable": "Sestava zobrazuje řádek součtů %s Odebrat řádek součtů", - "ReportGeneratedOn": "Hlášení vygenerované %s", - "ReportGeneratedXAgo": "Hlášení vygenerováno před %s", - "ReportType": "Typ reportu", - "ReportWithMetadata": "Report s metadaty", - "ReportingCategoryHelpPrefix": "Jak mi pomůže stránka hlášení \"%1$s → %2$s\"?", - "RowLimit": "Limit řádků", - "SearchOnMatomo": "Vyhledat '%1$s' na Matomo.org", - "SeeAvailableVersions": "Prohlédnout dostupné verze", - "Segments": "Segmenty", - "SharePiwikLong": "Ahoj! Právě jsem našel skvělý software zdarma: Matomo!\n\nMatomo vám umožní zdarma sledovat návštěvníky vašich webových stránek. Určitě byste ho měli vyzkoušet!", - "SharePiwikShort": "Matomo! Bezplatná webová analytika. Vlastni svá data.", - "ShareThis": "Sdílet", - "ShortcutCalendar": "k otevření kalendáře (d znamená datum)", - "ShortcutHelp": "pro zobrazení této nápovědy", - "ShortcutRefresh": "obnovit obsah", - "ShortcutSearch": "k otevření vyhledávání (f znamená hledání)", - "ShortcutSegmentSelector": "k otevření selektoru segmentu", - "ShortcutWebsiteSelector": "k otevření selektoru webové stránky", - "ShortcutZenMode": "pro Zen mód", - "ShortcutsAvailable": "Dostupné zkratky", - "ShowExportUrl": "Zobrazit URL exportu", - "ShowJSCode": "Zobrazit JavaScriptový kód ke vložení", - "SkipToContent": "Přejít k obsahu", - "SoftwareSubcategoryHelp": "V části Software se zobrazují operační systémy, prohlížeče a pluginy, které návštěvníci používají k přístupu na web, abyste mohli optimalizovat web a zajistit jeho plnou kompatibilitu s nejrozšířenějšími konfiguracemi.", - "StandardReport": "Standartní report", - "StartDate": "Datum zahájení", - "SubscribeAndBecomePiwikSupporter": "Pokračujte na zabezpečenou platební stránku (Paypal), pokud se chcete stát podporovatelem Matoma!", - "SupportPiwik": "Podpořte Matomo!", - "SupportUsOn": "Podpořte nás na", - "SystemSummaryMysqlVersion": "Verze MySQL", - "SystemSummaryNActivatedPlugins": "%d aktivovaných zásuvných modulů", - "SystemSummaryNSegments": "%1$dsegmentů", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentů (%2$s předzpracované, %3$s zpracované v reálném čase)", - "SystemSummaryNWebsites": "%d webových stránek", - "SystemSummaryPhpVersion": "Verze PHP", - "SystemSummaryPiwikVersion": "Verze Matoma", - "SystemSummaryWidget": "Souhrn systému", - "TableNoData": "Žádná data pro tuto tabulku.", - "TechDeprecationWarning": "Počínaje verzí Matomo %1$s ukončí Matomo podporu %2$s. Další informace %3$s najdete v příspěvku na našem blogu.%4$s", - "ThanksFromAllOfUs": "Díky vám od nás všech z Matoma!", - "ThereIsNoDataForThisReport": "Pro toto hlášení nejsou k dispozici žádná data.", - "UnFlattenDataTable": "Hlášení je ploché %s Vytvořit hierarchický", - "UndoPivotBySubtable": "Toto hlášení bylo zaměřeno %s Vrátit zpět", - "ViewAllPiwikVideoTutorials": "Zobrazit všechny návody Matomo", - "VisitStatusOrdered": "Objednáno", - "VisitStatusOrderedThenAbandoned": "Objednáno a poté opuštěn košík", - "VisitTypeReturning": "Návraty", - "VisitTypeReturningCustomer": "Věrný zákazník", - "VisitorsCategoryHelp1": "Stránky Návštěvníci vás informují o tom, kdo jsou vaši návštěvníci. Například odkud návštěvníci přišli, jaká zařízení a prohlížeče používají a kdy obvykle navštěvují vaše webové stránky. Pochopte, kdo je v souhrnu vaše publikum, a hledejte odlehlé hodnoty, abyste zjistili, jak by se vaše publikum mohlo rozrůst.", - "VisitorsCategoryHelp2": "Kromě obecných informací o návštěvnících můžete také pomocí %1$sVisits Log%2$s zjistit, co se stalo při každé jednotlivé návštěvě.", - "VisitorsOverviewHelp": "Přehled návštěvníků vám pomůže zjistit popularitu vašich stránek. K tomu slouží grafy, které ukazují počet návštěv vašeho webu za zvolené období a průměrnou úroveň zapojení klíčových funkcí, jako jsou vyhledávání a stahování.", - "WebAnalyticsReports": "Hlášení", - "YouAreUsingTheLatestVersion": "Používáte nejnovější verzi Matoma.", - "YourDonationWillHelp": "Váš dar přímo pomůže financovat nové funkce a vylepšení této analytické platformy s otevřeným zdrojovým kódem. To znamená, že komunita bude vždy těžit z nástroje, který chrání soukromí a umožní vám mít kontrolu nad svými daty." - } -} diff --git a/plugins/CoreHome/lang/cy.json b/plugins/CoreHome/lang/cy.json deleted file mode 100644 index 0aafe6ad93f691d2366c88463bda21297ab34d91..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/cy.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "CoreHome": { - "ChooseWebsite": "Dewiswch wefan", - "PresetDateToday": "Heddiw", - "PresetDateYesterday": "Ddoe" - } -} diff --git a/plugins/CoreHome/lang/da.json b/plugins/CoreHome/lang/da.json deleted file mode 100644 index d065be79a54f2071de310cca35519520f8d16454..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/da.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Hvis du bruger en annonce blokering skal du deaktivere denne for at sikre, at Matomo arbejder uden problemer.", - "AddTotalsRowDataTable": "Rapporten viser ikke en total %s Vis total", - "CategoryNoData": "Ingen data i kategorien. Prøv at 'Inkluder hele populationen'.", - "ChangeCurrentWebsite": "Vælg et website. Det aktuelle website er: %s", - "ChangePeriod": "Skift periode", - "ChangeVisualization": "Skift visualisering", - "CheckForUpdates": "Søg efter opdateringer", - "CheckPiwikOut": "Prøv Matomo!", - "ChooseWebsite": "Vælg hjemmeside", - "ChooseX": "Vælg %1$s", - "ClickRowToExpandOrContract": "Klik på rækken for at udvide eller sammentrække undertabelen.", - "ClickToEditX": "Klik for at redigere %s", - "ClickToSeeFullInformation": "Klik for at se den fulde information", - "CloseSearch": "Luk søgning", - "CloseWidgetDirections": "Luk modulet ved at klikke på 'X' ikonet øverst.", - "CssDidntLoad": "Din browser var ikke i stand til at indlæse style for denne side.", - "CustomLimit": "Brugerdefineret grænse", - "DataForThisReportHasBeenPurged": "Data til rapporten er er mere end %s måneder gamle og er blevet ryddet op.", - "DataTableCombineDimensions": "Dimensioner vises seperate %s Vis dimensioner kombineret", - "DataTableExcludeAggregateRows": "Samlede rækker vises %s Skjul dem", - "DataTableHowToSearch": "Tryk enter og klik på søgeikonet for at søge", - "DataTableIncludeAggregateRows": "Samlede rækker er skjult %s Vis dem", - "DataTableShowDimensions": "Dimensioner er kombineret %s Vis dimensioner separat", - "Default": "standard", - "DonateCall1": "Matomo vil altid være gratis at bruge, men det betyder ikke, at den er gratis at lave.", - "DonateCall2": "Matomo har brug for din fortsatte støtte til at vokse og trives.", - "DonateCall3": "Hvis Matomo har skabt værdi for din forretning eller dit projekt, kan du overveje at %1$sgive et økonomisk bidrag%2$s eller %3$skøbe en betalt funktion%4$s. Hver krone tæller.", - "EndShortcut": "Slut", - "EnterZenMode": "Gå i Zen tilstand (skjul menuen)", - "ExcludeRowsWithLowPopulation": "Alle rækker vises %s Udeluk lav population", - "ExitZenMode": "Forlad Zen tilstand (vis menuen)", - "ExpandSubtables": "Udvid undertabeller", - "ExportFormat": "Eksportformat", - "ExternalHelp": "Hjælp (åbnes i en ny fane)", - "FlattenDataTable": "Rapporten er hierarkisk %s lav den ikke hierakisk", - "FlattenReport": "Flad rapport", - "FormatMetrics": "Format målinger", - "HideExportUrl": "Skjul eksport URL", - "HomeShortcut": "Hjem", - "IncludeRowsWithLowPopulation": "Rækker med lav population er skjult %s Vis alle rækker", - "InjectedHostEmailBody": "Hej, jeg forsøgte at få adgang Matomo i dag og stødte på den ukendte værtsnavn advarsel.", - "InjectedHostEmailSubject": "Matomo blev åbnet fra et ukendt værtsnavn: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlik her for at få adgang Matomo på en sikker måde%2$s og fjerne denne advarsel. Du kan også vælge at kontakte din Matomo administrator og underrette om problemet (%3$sKlik her for e-mail%4$s).", - "InjectedHostSuperUserWarning": "Matomo kan være konfigureret forkert (f.eks. Hvis Matomo for nylig blev flyttet til en ny server eller en URL-adresse). Du kan enten %1$sklikke her og føje %2$s som gyldigt Matomo værtsnavn (hvis du har tillid til det) %3$s eller %4$sklikke her og få %5$s adgang til Matomo sikkert %6$s.", - "InjectedHostWarningIntro": "Du tilgår Matomo fra %1$s, men Matomo er konfigureret til at køre på denne adresse: %2$s.", - "JavascriptDisabled": "JavaSript skal være aktiveret for at Matomo kan bruges i standardvisning. JavaScript er enten deaktiveret eller ikke understøttet i netlæseren.
For at bruge standardvisning, aktiver JavaScript i indstillingerne for netlæseren, og %1$s prøv igen %2$s.
", - "JsDidntLoad": "Den browser var ikke i stand til at indlæse scriptet for denne side.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Den førende åbne analyseplatform som respekterer dit privatliv.", - "MacPageDown": "Fn + højre pil", - "MacPageUp": "Fn + venstre pil", - "MainNavigation": "Hovednavigation", - "Menu": "Menu", - "MenuEntries": "Menu indgange", - "NoPrivilegesAskPiwikAdmin": "Du er logget på som '%1$s' men det ser ikke ud som du har adgang til Matomo. %2$s Spørg Matomo administratoren (klik for at sende e-mail)%3$s for at give dig 'se' adgang til et websted.", - "NoSuchPage": "Denne side findes ikke", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Et-klik opdatering er ikke tilgængelig, da du bruger Matomo med flere servere. Hent venligst den seneste version fra %1$s for at fortsætte.", - "OnlyForSuperUserAccess": "Dette modul vises i standarddashboardet kun til brugere med superbrugeradgang.", - "PageDownShortcutDescription": "for at komme til bunden af siden", - "PageUpShortcutDescription": "for at komme til toppen af siden", - "PeriodRange": "Interval", - "PivotBySubtable": "Rapporten er ikke pivoteret %1$s Pivoter med %2$s", - "PresetDateToday": "I dag", - "PresetDateYesterday": "I går", - "Profilable": "Profilérbar", - "QuickAccessTitle": "Søg efter %s. Brug pil-tasterne for at navigere igennem søgeresultaterne. Genvej: Tryk 'f' for at søge.", - "QuickLinks": "Hurtiglinks", - "ReadMoreOnlineGuide": "Læs mere om dette emne i guiden online.", - "RemoveTotalsRowDataTable": "Rapporten viser en total %s Fjern total", - "ReportGeneratedOn": "Rapport genereret på %s", - "ReportGeneratedXAgo": "Rapport genereret %s siden", - "ReportType": "Rapporttype", - "ReportWithMetadata": "Rapport med metadata", - "RowLimit": "Rækkebegrænsning", - "SeeAvailableVersions": "Se tilgængelige versioner", - "Segments": "Segmenter", - "SharePiwikLong": "Hej! Jeg har lige fundet et fantastisk open source program: Matomo!\n\nMatomo kan gratis spore besøgende på din hjemmeside. Du bør helt klart undersøge det!", - "SharePiwikShort": "Matomo! Gratis og open source internet analyse. Ej dine egne data.", - "ShareThis": "Del dette", - "ShortcutCalendar": "for at åbne kalender (d står for dato)", - "ShortcutHelp": "for at vise denne hjælp", - "ShortcutSearch": "for at åbne for søgning (f står for find)", - "ShortcutSegmentSelector": "for at åbne segment-vælger", - "ShortcutWebsiteSelector": "for at åbne website-vælger", - "ShortcutZenMode": "for Zen tilstand", - "ShortcutsAvailable": "Tilgængelige genveje", - "ShowExportUrl": "Vis eksport-URL", - "ShowJSCode": "Vis JavaScript-koden til at indsætte", - "SkipToContent": "Gå til indhold", - "StandardReport": "Standardrapport", - "SubscribeAndBecomePiwikSupporter": "Fortsæt til sikker kreditkort betalingsside (Paypal) for at blive en Matomo supporter!", - "SupportPiwik": "Støt Matomo!", - "SupportUsOn": "Støt os på", - "SystemSummaryMysqlVersion": "MySQL-version", - "SystemSummaryNActivatedPlugins": "%d aktiverede programudvidelser", - "SystemSummaryNWebsites": "%d websteder", - "SystemSummaryPhpVersion": "PHP-version", - "SystemSummaryPiwikVersion": "Matomo-version", - "SystemSummaryWidget": "Systemoversigt", - "TableNoData": "Ingen data til denne tabel.", - "ThanksFromAllOfUs": "Tak fra alle os hos Matomo!", - "ThereIsNoDataForThisReport": "Der er ingen data for denne rapport.", - "UnFlattenDataTable": "Rapporten er ikke hierarkisk %s lav den hierakisk", - "UndoPivotBySubtable": "Rapporten er blevet pivoteret %s Fortryd pivot", - "ViewAllPiwikVideoTutorials": "Vis alle Matomo videoselvstudier", - "VisitStatusOrdered": "Sorteret", - "VisitStatusOrderedThenAbandoned": "Sorteret, herefter efterladte ordrer", - "VisitTypeReturning": "Tilbagevendende", - "VisitTypeReturningCustomer": "Tilbagevendende kunder", - "WebAnalyticsReports": "Webanalyse-rapporter", - "YouAreUsingTheLatestVersion": "Du bruger den seneste version af Matomo!", - "YourDonationWillHelp": "Din støtte går direkte til at finansiere nye funktioner og forbedringer for denne open source-statistsystem. Det betyder, at brugerne altid vil have glæde af et værktøj, der respekterer privatliv og lader dig bevare kontrol over dine data." - } -} diff --git a/plugins/CoreHome/lang/de.json b/plugins/CoreHome/lang/de.json deleted file mode 100644 index e64929c3d415d7ec36bdd9ccb7057331df0ebb33..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/de.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Für den Fall, dass Sie einen Ad-Blocker verwenden, deaktivieren Sie diesen bitte für diese Seite, um sicherzustellen, dass Matomo problemlos läuft.", - "AddTotalsRowDataTable": "Der Bericht zeigt die Totalzeile nicht %s Zeige Totalzeile", - "CategoryNoData": "Keine Daten in dieser Kategorie. Probieren Sie \"Gesamte Daten einbeziehen\".", - "ChangeCurrentWebsite": "Wählen Sie eine Webseite, aktuell gewählte Webseite: %s", - "ChangePeriod": "Zeitraum ändern", - "ChangeVisualization": "Visualisierung ändern", - "CheckForUpdates": "Nach Aktualisierungen suchen", - "CheckPiwikOut": "Sieh dir Matomo an!", - "ChooseWebsite": "Webseite wählen", - "ChooseX": "Wähle %1$s", - "ClickRowToExpandOrContract": "Klicken Sie auf diese Zeile, um die Untertabelle anzuzeigen oder zu verbergen.", - "ClickToEditX": "Klicken Sie, um %s zu bearbeiten", - "ClickToSeeFullInformation": "Klicken Sie hier für die komplette Information", - "CloseSearch": "Suche schließen", - "CloseWidgetDirections": "Sie können das Widget schließen, indem Sie auf das 'X' oben im Widget klicken.", - "CopyX": "%1$s kopieren", - "CssDidntLoad": "Ihr Browser war nicht in der Lage die Stylesheet-Definitionen der Seite zu laden.", - "CustomLimit": "Eigenes Limit", - "DataForThisReportHasBeenDisabled": "Segmentierung ist für diesen Bericht momentan außer Betrieb. Bitte sehen Sie %1$sdieses FAQ%2$s ein für weitere Einzelheiten.", - "DataForThisReportHasBeenPurged": "Die Daten für diesen Bericht sind älter als %s Monate und wurden gelöscht.", - "DataTableCombineDimensions": "Dimensionen werden einzeln angezeigt %s Dimensionen zusammengefasst anzeigen", - "DataTableExcludeAggregateRows": "Aggregierte Zeilen werden angezeigt %s Ausblenden", - "DataTableHowToSearch": "Drücken Sie Enter oder klicken Sie auf das Such-Symbol, um eine Suche zu starten", - "DataTableIncludeAggregateRows": "Aggregierte Zeilen sind ausgeblendet %s Wieder anzeigen", - "DataTableShowDimensions": "Dimensionen wurden zusammengefasst %s Dimensionen separat anzeigen", - "DateInvalid": "Die angegebene Kombination von Datum und Zeitraum ist ungültig. Bitte in der Datumsselektion eine gültige Auswahl treffen.", - "Default": "Standard", - "DevicesSubcategoryHelp": "Der Gerätebereich hilft aufzuzeigen, welche Technologien Ihre Besucher verwenden, wenn Sie Ihre Seite besuchen. Sie werden Berichte der Gerätetypen und spezifische Modelle sehen, was Ihnen ermöglicht, Ihre Seite für die beliebtesten Geräte zu optimieren.", - "DonateCall1": "Die Nutzung von Matomo wird immer kostenlos bleiben, was aber nicht heißt, dass es uns nichts kostet, es zu erstellen.", - "DonateCall2": "Matomo braucht Ihre dauerhafte Unterstützung um zu wachsen und zu gedeihen.", - "DonateCall3": "Finden Sie, dass Matomo einen deutlichen Mehrwert für Sie oder Ihr Unternehmen hat? %1$sBitte spenden Sie%2$s oder überlegen Sie sich unsere %3$sPremium Features zu kaufen%4$s. Jeder Cent hilft.", - "EndDate": "Enddatum", - "EndShortcut": "Ende", - "EngagementSubcategoryHelp1": "Der Bereich \"Engagement\" bietet Berichte, die dabei helfen, zu quantifizieren, wie viele neue und wiederkehrende Besucher Sie haben. Sie können auch Berichte einsehen, welche die durchschnittliche Zeit und Anzahl der Seiten pro Besuch aufschlüsseln, sowie die Anzahl der Besuche eines Besuchers auf Ihrer Webseite und die übliche Anzahl an Tagen zwischen den Besuchen.", - "EngagementSubcategoryHelp2": "Dies kann Ihnen helfen, neben der Maximierung Ihrer Reichweite auch die Häufigkeit und die Interaktionsrate zu optimieren.", - "EnterZenMode": "\"Zen mode\" aktivieren (Menü verstecken)", - "ExceptionNotAllowlistedIP": "Sie können diese Matomo Installation nicht verwenden, weil Ihre IP-Adresse %s nicht erlaubt ist.", - "ExcludeRowsWithLowPopulation": "Alle Zeilen werden angezeigt %s Niedrige Werte ausschließen", - "ExitZenMode": "\"Zen mode\" verlassen (Menü zeigen)", - "ExpandSubtables": "Erweitere Untertabellen", - "ExportFormat": "Exportformat", - "ExportTooltip": "Hinweis: Um die generierte Export-URL zu verwenden, müssen Sie einen Authentifizierungstoken angeben. Sie können diese Token unter Admin → Sicherheit → Authentifizierungstoken konfigurieren.", - "ExportTooltipWithLink": "Hinweis: Um die generierte Export URL zu verwenden, müssen Sie einen Authentifizierungstoken angeben. Sie können diese Token in %1$s[Admin → Security → Authentifizierungstoken]%2$s konfigurieren. Ersetzen Sie %3$s in der Export URL durch Ihren Authentifizierungstoken. Warnung: Geben Sie niemals die URL mit dem echten Token jemandem weiter.", - "ExternalHelp": "Hilfe (öffnet in neuem Tab)", - "FlattenDataTable": "Der Bericht ist hierarchisch strukturiert %s Flach anzeigen", - "FlattenReport": "Flacher Bericht", - "FormatMetrics": "Metriken formatieren", - "HideExportUrl": "Export-URL verstecken", - "HomeShortcut": "Pos1", - "IncludeDimensionsSeparately": "Dimensionen separat hinzufügen", - "IncludeRowsWithLowPopulation": "Niedrige Werte sind ausgeschlossen %s Alle Zeilen anzeigen", - "InjectedHostEmailBody": "Hallo, ich habe gerade versucht Matomo aufzurufen und erhielt eine Warnung, dass der Hostname unbekannt ist.", - "InjectedHostEmailSubject": "Matomo wurde mit einem unbekannten Hostnamen aufgerufen: %s", - "InjectedHostNonSuperUserWarning": "%1$sHier klicken um Matomo sicher zu betreten%2$s und die Warnung zu entfernen. Zusätzlich können Sie den Matomo Administrator kontaktieren und ihn auf dieses Problem hinweisen (%3$sHier klicken um eine E-Mail zu senden%4$s).", - "InjectedHostSuperUserWarning": "Matomo könnte falsch konfiguriert sein (zum Beispiel, wenn Matomo vor kurzem auf einen neuen Server oder eine neue URL umgezogen ist). Sie können entweder %1$shier klicken und %2$s als gültigen Hostnamen hinzufügen (wenn Sie ihm vertrauen)%3$s, oder %4$shier klicken, um zu %5$s zu gehen und Matomo sicher zu betreten%6$s.", - "InjectedHostWarningIntro": "Sie betreten Matomo aktuell von %1$s, allerdings wurde Matomo so konfiguriert, dass es unter dieser Adresse läuft: %2$s.", - "JavascriptDisabled": "JavaScript muss aktiviert sein, um die Standardansicht von Matomo zu benutzen.
Es scheint jedoch so, als wäre JavaScript bei Ihnen deaktiviert bzw. würde nicht von Ihrem Browser unterstützt.
Um die Standardansicht zu benutzen, aktivieren Sie JavaScript in Ihren Browseroptionen und %1$sversuchen Sie es erneut%2$s.
", - "JsDidntLoad": "Ihr Browser war nicht in der Lage die Skripte der Seite zu laden.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Die führende Open-Source-Analyseplattform, die Ihre Privatsphäre achtet.", - "LearnMoreFullStop": "%1$sErfahren Sie mehr.%2$s", - "MacPageDown": "Fn + Pfeil nach Rechts", - "MacPageUp": "Fn + Pfeil nach Links", - "MainNavigation": "Hauptnavigation", - "Menu": "Menü", - "MenuEntries": "Menüeinträge", - "NoPrivilegesAskPiwikAdmin": "Sie sind angemeldet als '%1$s', aber es wurden keine Berechtigungen für diesen Benutzer in Matomo gesetzt. %2$s Bitte fragen Sie Ihren Matomo Administrator (klicken für E-Mail)%3$s um Zugriff auf die Webseite zu erhalten.", - "NoSuchPage": "Diese Seite existiert nicht", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Das Ein-Klick-Update ist nicht verfügbar, weil Sie Matomo mit mehreren Servern einsetzen. Bitte laden Sie die neueste Version von %1$s herunter, um fortzufahren.", - "OnlyForSuperUserAccess": "Dieses Widget wird im Standard-Dashboard nur Benutzern mit Hauptadministrator-Berechtigung angezeigt.", - "PageDownShortcutDescription": "um zum Seitenende zu kommen", - "PageUpShortcutDescription": "um zum Seitenanfang zu kommen", - "PeriodHasOnlyRawData": "Anscheinend wurden für diesen Zeitbereich noch keine Berichte generiert. Möchten Sie sehen was aktuell passiert? Schauen Sie im %1$sBesucher-Log%2$s oder wählen Sie einen anderen Zeitbereich, bis die Berichte generiert sind.", - "PeriodHasOnlyRawDataNoVisitsLog": "Es scheint, als ob die Berichte für diesen Zeitraum noch nicht verarbeitet wurden, aber sie werden in ein paar Stunden verfügbar sein. Sie könnten einen anderen Zeitraum auswählen, bis die Berichte generiert sind.", - "PeriodRange": "Zeitspanne", - "PivotBySubtable": "Kein Pivot erstellt für diesen Bericht %1$s Pivot erstellen mit %2$s", - "PresetDateLast30Days": "Letzte 30 Tage", - "PresetDateLast7Days": "Letzte 7 Tage", - "PresetDateLast90Days": "Letzte 90 Tage", - "PresetDateLastMonth": "Letzter Monat", - "PresetDateLastQuarter": "Letztes Quartal", - "PresetDateLastWeekMonSun": "Letzte Woche (Mo - So)", - "PresetDateLastYear": "Letztes Jahr", - "PresetDateThisMonth": "Dieser Monat", - "PresetDateThisQuarter": "Dieses Quartal", - "PresetDateThisWeekMonToday": "Diese Woche (Mo - heute)", - "PresetDateThisYear": "Dieses Jahr", - "PresetDateToday": "Heute", - "PresetDateYesterday": "Gestern", - "Profilable": "Profilierbar", - "QuickAccessTitle": "Suche nach '%s'. Benutzen Sie die Pfeiltasten um durch die Ergebnisse zu navigieren. Tastenkürzel: Drücken Sie 'f' um zu suchen.", - "QuickLinks": "Schnelllinks", - "ReadMoreOnlineGuide": "Lesen Sie mehr zu diesem Thema in der Online-Anleitung.", - "RemoveTotalsRowDataTable": "Der Bericht zeigt die Totalzeile %s Entferne Totalzeile", - "ReportConfigure": "Diesen Bericht konfigurieren", - "ReportGeneratedOn": "Bericht erzeugt am %s", - "ReportGeneratedXAgo": "Bericht erzeugt vor %s", - "ReportLowercase": "Bericht", - "ReportType": "Art des Berichts", - "ReportWithMetadata": "Bericht mit Metadaten", - "ReportingCategoryHelpPrefix": "Wie kann die \"%1$s → %2$s\" Berichtsseite mir helfen?", - "RowLimit": "Zeilenlimit", - "SearchOnMatomo": "Suche '%1$s' auf Matomo.org", - "SeeAvailableVersions": "Zeige verfügbare Versionen", - "Segments": "Segmente", - "SharePiwikLong": "Hi! Ich habe gerade diese großartige Open Source Software gefunden: Matomo!\n\nMatomo ermöglicht es dir, Besucher einer Webseite zu tracken und ist kostenlos. Du solltest es dir unbedingt einmal ansehen!", - "SharePiwikShort": "Matomo! Kostenlose und Open Source Web Analyse. Behalten Sie Ihre Daten.", - "ShareThis": "Teilen", - "ShortcutCalendar": "um den Kalender zu öffnen (d steht für Datum)", - "ShortcutHelp": "um diese Hilfe anzuzeigen", - "ShortcutRefresh": "um den Inhalt neu zu laden", - "ShortcutSearch": "um diese Suche zu öffnen (f steht für Find)", - "ShortcutSegmentSelector": "um den Segment Selektor zu öffnen", - "ShortcutWebsiteSelector": "um den Webseiten Selektor zu öffnen", - "ShortcutZenMode": "für Zen Modus", - "ShortcutsAvailable": "Verfügbare Tastaturkürzel", - "ShowExportUrl": "Export-URL anzeigen", - "ShowJSCode": "Den einzufügenden JavaScript-Code anzeigen", - "SkipToContent": "Zum Inhalt wechseln", - "SoftwareSubcategoryHelp": "Der Softwarebereich zeigt das Betriebssystem, Browser und Plugins welche Ihre Besucher verwenden, um Ihre Seite zu besuchen, sodass Sie Ihre Seite so optimieren können, dass sie mit den meisten Konfigurationen vollständig kompatibel ist.", - "StandardReport": "Standard Bericht", - "StartDate": "Anfangsdatum", - "SubscribeAndBecomePiwikSupporter": "Weiter zur sicheren Webseite für Kreditkartenzahlung (Paypal), um ein Unterstützer von Matomo zu werden!", - "SupportPiwik": "Unterstützen Sie Matomo!", - "SupportUsOn": "Unterstützen Sie uns auf", - "SystemSummaryMysqlVersion": "MySQL-Version", - "SystemSummaryNActivatedPlugins": "%d aktivierte Plugins", - "SystemSummaryNSegments": "%1$d Segmente", - "SystemSummaryNSegmentsWithBreakdown": "%1$d Segmente (%2$s im Hintergrund verarbeitet, %3$s in Echtzeit verarbeitet)", - "SystemSummaryNWebsites": "%d Webseiten", - "SystemSummaryPhpVersion": "PHP-Version", - "SystemSummaryPiwikVersion": "Matomo-Version", - "SystemSummaryWidget": "Systemzusammenfassung", - "TableNoData": "Keine Daten für diese Tabelle.", - "TechDeprecationWarning": "Ab Matomo-Version %1$s stellt Matomo die Unterstützung für %2$s ein. Mehr Details entnehmen Sie bitte %3$sunserem Blogpost.%4$s", - "ThanksFromAllOfUs": "Vielen Dank von uns allen bei Matomo!", - "ThereIsNoDataForThisReport": "Es stehen keine Daten für diesen Bericht zur Verfügung.", - "UnFlattenDataTable": "Der Bericht ist flach %s Hierarchisch anzeigen", - "UndoPivotBySubtable": "Pivot erstellt für diesen Bericht %s Pivot rückgängig machen", - "ViewAllPiwikVideoTutorials": "Zeige alle Matomo Video Tutorials an", - "VisitStatusOrdered": "Bestellt", - "VisitStatusOrderedThenAbandoned": "Bestellt, dann Warenkorb verlassen", - "VisitTypeReturning": "Wiederkehrend", - "VisitTypeReturningCustomer": "Wiederkehrender Kunde", - "VisitorsCategoryHelp1": "Die Besucherseiten sagen Ihnen Dinge darüber wer Ihre Besucher sind. Dinge wie woher Ihre Besucher kommen, welche Geräte und Browser sie verwenden und wann sie Ihre Webseite generell besuchen. Verstehen Sie, wer Ihr Publikum im Allgemeinen ist, und achten Sie auf Sonderfälle um zu sehen wie Ihr Publikum wachsen könnte.", - "VisitorsCategoryHelp2": "Zusätzlich zu generellen Informationen über Ihre Besucher können Sie das %1$sBesucher-Log%2$sauch verwenden um zu sehen, was bei jedem individuellen Besuch passiert ist.", - "VisitorsOverviewHelp": "Die Besucherübersicht hilft Ihnen, die Popularität Ihrer Webseite zu verstehen. Dazu stellt sie Diagramme bereit, die zeigen, wie viele Besuche Ihre Webseite über einen ausgewählten Zeitraum erhält und wie hoch das durchschnittliche Engagement für wichtige Funktionen wie Suchen und Downloads ist.", - "WebAnalyticsReports": "Webanalytik-Berichte", - "YouAreUsingTheLatestVersion": "Sie verwenden die aktuelle Version von Matomo!", - "YourDonationWillHelp": "Ihre Spende wird direkt dafür eingesetzt, neue Features und Erweiterungen für diese Open-Source Analyse-Plattform zu finanzieren. Das bedeutet, die Community wird immer von einem Tool profitieren, welches Privatsphäre beschützt und Ihnen erlaubt, die Kontrolle Ihrer Daten zu bewahren." - } -} diff --git a/plugins/CoreHome/lang/dv.json b/plugins/CoreHome/lang/dv.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/dv.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/el.json b/plugins/CoreHome/lang/el.json deleted file mode 100644 index 86eb33adf8acb865550f7938f1c4e296e20991c7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/el.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Όλες οι Διορατικότητες", - "AdblockIsMaybeUsed": "Σε περίπτωση που χρησιμοποιείτε κάποιο πρόγραμμα που μπλοκάρει τις διαφημίσεις, παρακαλούμε απενεργοποιήστε το για αυτόν τον ιστοτόπο για να είστε σίγουροι ότι το Matomo δουλεύει σωστά.", - "AddTotalsRowDataTable": "Η αναφορά δεν εμφανίζει τη γραμμή συνόλων %s Να εμφανιστεί η γραμμή συνόλων", - "CategoryNoData": "Ανεπαρκή δεδομένα στη κατηγορία. Δοκιμάστε να \"συμπεριλάβετε όλο τον πληθυσμό\".", - "ChangeCurrentWebsite": "Επιλέξτε ένα ιστοτόπο, επιλεγμένος ιστοτόπος αυτή τη στιγμή: %s", - "ChangePeriod": "Αλλαγή περιόδου", - "ChangeVisualization": "Αλλαγή οπτικοποίησης", - "CheckForUpdates": "Έλεγχος για ενημερώσεις", - "CheckPiwikOut": "Δείτε το Matomo!", - "ChooseWebsite": "Επιλέξτε ιστοτόπο", - "ChooseX": "Επιλέξτε %1$s", - "ClickRowToExpandOrContract": "Πατήστε στη γραμμή για να επεκταθεί ή να κρυφτεί ο υποπίνακας.", - "ClickToEditX": "Κάντε κλικ για να επεξεργαστείτε το %s", - "ClickToSeeFullInformation": "Κάντε κλικ για περισσότερες πληροφορίες", - "CloseSearch": "Κλείσιμο αναζήτησης", - "CloseWidgetDirections": "Μπορείτε να κλείσετε αυτή τη λειτουργία κάνοντας κλικ στο εικονίδιο 'X' στην κορυφή του widget.", - "CopyModalNote": "%1$sΣημείωση:%2$s Το αντιγραμμένο %3$s ενδέχεται να χρειαστεί προσαρμογές αν περιλαμβάνει αναφορές ειδικά προς τον αρχικό ιστοτόπο. Ελέγξτε τις ρυθμίσεις για να επιβεβαιώσετε την συμβατότητα.", - "CopyX": "Αντιγραφή του %1$s", - "CopyXDescription": "Επιλέξτε τον ιστοτόπο για αντιγραφή του %1$s σε αυτόν. Αυτό θα δημιουργήσει ένα ακριβές αντίγραφο, που θα περιλαμβάνει τις ρυθμίσεις, στον επιλεγμένο ιστοτόπο.", - "CssDidntLoad": "Το πρόγραμμα πλοήγησής σας δεν κατέστη δυνατό να φορτώσει το στυλ της σελίδας.", - "CustomLimit": "Προσαρμοσμένο όριο", - "DataForThisReportHasBeenDisabled": "Η τμηματοποίηση είναι αυτή τη στιγμή ανενεργή για αυτή την αναφορά. Δείτε τις %1$sΣυχνές Ερωτήσεις-Απαντήσεις%2$s για περισσότερες πληροφορίες.", - "DataForThisReportHasBeenPurged": "Τα δεδομένα για αυτή την αναφορά είναι περισσότερα από %s μήνες και κόπηκαν.", - "DataTableCombineDimensions": "Οι διαστάσεις εμφανίζονται ξεχωριστά %s Εμφάνιση των διαστάσεων συνδυασμένα", - "DataTableExcludeAggregateRows": "Οι συγκεντρωτικές εγγραφές είναι ορατές %s Απόκρυψη", - "DataTableHowToSearch": "Πατήστε Enter ή κάντε κλικ στο εικονίδιο της αναζήτησης για αναζήτηση", - "DataTableIncludeAggregateRows": "Συγκεντρωτικές εγγραφές είναι κρυφές %s Προβολή", - "DataTableShowDimensions": "Οι διαστάσεις συνδυάζονται %s Εμφάνιση των διαστάσεων ξεχωριστά", - "DateInvalid": "Ο δοθέν συνδυασμός ημερομηνίας και περιόδου είναι μη έγκυρος. Επιλέξτε μια έγκυρη ημερομηνία στον πλαίσιο επιλογής ημερομηνίας.", - "Default": "προεπιλογή", - "DevicesSubcategoryHelp": "Το τμήμα Συσκευών σας βοηθά να κατανοήσετε την τεχνολογία που οι επισκέπτες σας χρησιμοποιούν κατά την προσπέλαση στον ιστοτόπο σας. Θα δείτε αναφορές για τους τύπους συσκευών και ξεχωριστά μοντέλα για να σας επιτρέψουν να βελτιστοποιήσετε τον ιστοτόπο σας για τις περισσότερο δημοφιλείς συσκευές.", - "DonateCall1": "Το Matomo θα είναι πάντα δωρεάν, αλλά αυτό δεν σημαίνει ότι δεν κοστίζει τίποτα για να φτιαχτεί.", - "DonateCall2": "Το Matomo χρειάζεται τη συνεχή υποστήριξή σας για να αναπτυχθεί και να ευδοκιμήσει.", - "DonateCall3": "Εάν θεωρείτε ότι το Matomo έχει προσθέσει σημαντική αξία στην επιχείρηση ή στο εγχείρημά σας, %1$sπαρακαλούμε σκεφτείτε μια δωρεά%2$s ή %3$sπρομηθευτείτε ένα χαρακτηριστικό επί πληρωμή%4$s. Κάθε λεπτό βοηθάει.", - "EndDate": "Ημερομηνία Λήξης", - "EndShortcut": "Τέλος", - "EngagementSubcategoryHelp1": "Το τμήμα Ενασχόλησης παρέχει αναφορές που σας βοηθούν να ποσοτικοποιήσετε τον αριθμό των νέων και επιστρεφόμενων επισκεπτών. Μπορείτε να δείτε αναφορές που τμηματοποιούν τον μέσο χρόνο και τον αριθμό των σελίδων ανά επίσκεψη, καθώς και τον αριθμό των φορών που ένας επισκέπτης ήρθε στον ιστοτόπο σας και τον πιο συνηθισμένο αριθμό ημερών μεταξύ επισκέψεων.", - "EngagementSubcategoryHelp2": "Αυτό μπορεί να σας βοηθήσει να βελτιστοποιήσετε την συχνότητα και τις επισκέψεις με έντονη διάδραση μεγιστοποιώντας παράλληλα και το εύρος επικοινωνίας σας.", - "EnterZenMode": "Εισαγωγή σε κατάσταση Zen (απόκρυψη των μενού)", - "ExceptionNotAllowlistedIP": "Δεν μπορείτε να χρησιμοποιήσετε το Matomo καθώς η διεύθυνση IP σας %s δεν επιτρέπεται.", - "ExcludeRowsWithLowPopulation": "Προβάλλονται όλες οι εγγραφές %s Εξαίρεση αυτών με μικρό πλήθος", - "ExitZenMode": "Έξοδος από κατάσταση Zen (εμφάνιση των μενού)", - "ExpandSubtables": "Ανάπτυξη υποπινάκων", - "ExportFormat": "Μορφή εξαγωγής", - "ExportTooltip": "Σημείωση: Για να χρησιμοποιηθεί η ηλεκτρονική διεύθυνση URL εξαγωγής, θα πρέπει να οριστεί ένα τεκμήριο αυθεντικοποίησης εφαρμογής. Μπορείτε να ρυθμίσετε τέτοια τεκμήρια στη Διαχείριση → Ασφάλεια → Τεκμήρια Αυθεντικοποίησης.", - "ExportTooltipWithLink": "Σημείωση: Για να χρησιμοποιηθεί η ηλεκτρονική διεύθυνση URL εξαγωγής, θα πρέπει να οριστεί ένα τεκμήριο αυθεντικοποίησης εφαρμογής. Μπορείτε να ρυθμίσετε τέτοια τεκμήρια στο %1$s [Διαχείριση → Ασφάλεια → Τεκμήρια Αυθεντικοποίησης]%2$s. Αντικαταστήστε το %3$s στη διεύθυνση εξαγωγής με το τεκμήριο αυθεντικοποίησης. Προειδοποίηση: Ποτέ μην κοινοποιείτε τη διεύθυνση με το πραγματικό τεκμήριο σε οποιονδήποτε τρίτο.", - "ExternalHelp": "Βοήθεια (ανοίγει σε νέα καρτέλα)", - "FlattenDataTable": "Η αναφορά είναι ιεραρχημένη %s Κάντε την επίπεδη", - "FlattenReport": "Επίπεδη αναφορά", - "FormatMetrics": "Μετρικές μορφοποίησης", - "HideExportUrl": "Απόκρυψη URL εξαγωγής", - "HomeShortcut": "Αρχή", - "IncludeDimensionsSeparately": "Να συμπεριληφθούν οι διαστάσεις ξεχωριστά", - "IncludeRowsWithLowPopulation": "Οι εγγραφές με χαμηλό πλήθος είναι κρυφές %s Προβολή όλων", - "InjectedHostEmailBody": "Γεια σας, προσπάθησα να έχω προσπελάσω σήμερα το Matomo και αντιμετώπισα μια προειδοποίηση για άγνωστο όνομα διακομιστή.", - "InjectedHostEmailSubject": "Το Matomo προσπελάστηκε με ένα άγνωστο όνομα διακομιστή: %s", - "InjectedHostNonSuperUserWarning": "%1$sΚάντε κλικ εδώ για να προσπελάσετε το Matomo με ασφάλεια%2$s και να αφαιρέσετε αυτή την προειδοποίηση. Μπορείτε επίσης να επικοινωνήσετε με το διαχειριστή του Matomo και τους ειδοποιήσετε για αυτό το θέμα (%3$sκάντε κλικ εδώ για να στείλετε email%4$s).", - "InjectedHostSuperUserWarning": "Το Matomo μπορεί να είναι λάθος ρυθμισμένο (για παράδειγμα, αν το Matomo πρόσφατα μεταφέρθηκε σε ένα νέο διακομιστή ή URL). Μπορείτε είτε %1$sνα κάνετε κλικ εδώ και να προσθέσετε %2$s ως έγκυρο όνομα διακομιστή του Matomo (αν το εμπιστεύεστε)%3$s ή %4$sνα κάνετε κλικ εδώ και να μεταβείτε στο %5$s για να προσπελάσετε με ασφάλεια το Matomo%6$s.", - "InjectedHostWarningIntro": "Θα προσπελάσετε τώρα το Matomo από το %1$s, αλλά το Matomo έχει ρυθμιστεί να τρέχει σε αυτή τη διεύθυνση: %2$s.", - "InvalidComparisonDateRange": "Εισαγάγετε ένα έγκυρο εύρος ημερομηνιών για σύγκριση.", - "JavascriptDisabled": "Η JavaScript πρέπει να ενεργοποιηθεί για να χρησιμοποιήσετε το Matomo στη βασική του όψη.
Ωστόσο, φαίνεται ότι η JavaScript είναι είτε απενεργοποιημένη ή δεν υποστηρίζεται από τον φυλλομετρητή σας.
Για τη χρήση της βασικής όψης, ενεργοποιήστε τη JavaScript αλλάζοντας της ρυθμίσεις του φυλλομετρητή σας και %1$sδοκιμάστε ξανά%2$s.
", - "JsDidntLoad": "Το πρόγραμμα πλοήγησής σας δεν κατέστη δυνατό να φορτώσει τα σενάρια της σελίδας.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Η κορυφαία ανοικτή πλατφόρμα αναλυτικών που σέβεται την ιδιωτικότητά σας.", - "LearnMoreFullStop": "%1$sΜάθετε περισσότερα.%2$s", - "MacPageDown": "Fn + Δεξί Βέλος", - "MacPageUp": "Fn + Αριστερό Βέλος", - "MainNavigation": "Κεντρική πλοήγηση", - "Menu": "Μενού", - "MenuEntries": "Καταχωρήσεις μενού", - "NoPrivilegesAskPiwikAdmin": "Έχετε κάνει είσοδο ως '%1$s', αλλά φαίνεται ότι δεν σας έχει δοθεί κάποιο δικαίωμα από το Matomo. %2$s Ζητήστε από το διαχειριστή του Matomo σας (κλικ για αποστολή e-mail)%3$s να σας δώσει δικαίωμα 'ανάγνωσης' στον ιστοτόπο.", - "NoSuchPage": "Η σελίδα δεν υπάρχει", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Η ενημέρωση με ένα κλικ δεν είναι διαθέσιμη καθώς χρησιμοποιείτε το Matomo με πολλαπλούς διακομιστές. Κατεβάστε την τελευταία έκδοση από %1$s για να συνεχίσετε.", - "OnlyForSuperUserAccess": "Το συστατικό εμφανίζεται στον προκαθορισμένο πίνακα εργαλείων μόνο σε χρήστες με δικαίωμα Υπερ Χρήστη.", - "PageDownShortcutDescription": "για μετάβαση στο κάτω μέρος της σελίδας", - "PageUpShortcutDescription": "για μετάβαση στην κορυφή της σελίδας", - "PeriodHasOnlyRawData": "Φαίνεται ότι δεν έχει γίνει επεξεργασία των αναφορών για αυτή την περίοδο ακόμη. Θέλετε να δείτε τι συμβαίνει τώρα; Δείτε το %1$sΗμερολόγιο επισκέψεων%2$s ή επιλέξτε μια διαφορετική χρονική περίοδο μέχρι να ολοκληρωθεί η επεξεργασία των αναφορών.", - "PeriodHasOnlyRawDataNoVisitsLog": "Φαίνεται ότι δεν έχει γίνει ακόμη επεξεργασία των αναφορών για αυτή την περίοδο, αλλά θα είναι διαθέσιμες αργότερα μέσα σε λίγες ώρες. Μπορείτε να επιλέξετε διαφορετική χρονική περίοδο μέχρι να δημιουργηθούν οι αναφορές.", - "PeriodRange": "Εύρος", - "PivotBySubtable": "Η αναφορά αυτή δεν στηρίζεται %1$s Pivot από %2$s", - "PresetDateLast30Days": "Τελευταίες 30 ημέρες", - "PresetDateLast7Days": "Τελευταίες 7 ημέρες", - "PresetDateLast90Days": "Τελευταίες 90 ημέρες", - "PresetDateLastMonth": "Τελευταίος μήνας", - "PresetDateLastQuarter": "Τελευταίο τρίμηνο", - "PresetDateLastWeekMonSun": "Τελευταία εβδομάδα (Δευ - Κυρ)", - "PresetDateLastYear": "Τελευταίο έτος", - "PresetDateThisMonth": "Αυτός ο μήνας", - "PresetDateThisQuarter": "Αυτό το τρίμηνο", - "PresetDateThisWeekMonToday": "Η τρέχουσα εβδομάδα (Δευ - Σήμερα)", - "PresetDateThisYear": "Αυτό το έτος", - "PresetDateToday": "Σήμερα", - "PresetDateYesterday": "Χθες", - "Profilable": "Profilable", - "ProfilableSegmentHelp": "1 για εντός προφίλ (πχ. χρησιμοποιήθηκαν cookies), 0 για εκτός προφίλ (πχ. δεν χρησιμοποιήθηκαν cookies)", - "QuickAccessTitle": "Αναζήτηση για %s. Χρησιμοποιήστε τα βελάκια για να πλοηγηθείτε μεταξύ των αποτελεσμάτων αναζήτησης. Συντόμευση πληκτρολογίου: πατήστε 'f' για αναζήτηση.", - "QuickLinks": "Γρήγοροι Σύνδεσμοι", - "ReadMoreOnlineGuide": "Διαβάστε περισσότερα για το θέμα στον online οδηγό.", - "RemoveTotalsRowDataTable": "Η αναφορά εμφανίζει τη γραμμή συνόλων %s Να αφαιρεθεί η γραμμή συνόλων", - "ReportConfigure": "Παραμετροποιήστε αυτή την αναφορά", - "ReportGeneratedOn": "Η αναφορά δημιουργήθηκε στις %s", - "ReportGeneratedXAgo": "Η αναφορά δημιουργήθηκε πριν από %s", - "ReportLowercase": "αναφορά", - "ReportType": "Τύπος αναφοράς", - "ReportWithMetadata": "Αναφορά με μεταδεδομένα", - "ReportingCategoryHelpPrefix": "Πώς με βοηθά η σελίδα αναφοράς \"%1$s → %2$s\";", - "RowLimit": "Όριο γραμμής", - "SearchOnMatomo": "Αναζήτηση του '%1$s' στο Matomo.org", - "SeeAvailableVersions": "Εμφάνιση Διαθέσιμων Εκδόσεων", - "Segments": "Τμήματα", - "SharePiwikLong": "Γεια σας! Βρήκα μόνο ένα καταπληκτικό λογισμικό ανοικτού κώδικα: το Matomo!\n\nΤο Matomo θα σας επιτρέψει να παρακολουθείτε τους επισκέπτες στην ιστοσελίδα σας δωρεάν. Καλό θα είναι να το δείτε!", - "SharePiwikShort": "Matomo! Δωρεάν και ανοικτού κώδικα στατιστικά ιστοσελίδων. Κρατήστε δικά σας τα δεδομένα.", - "ShareThis": "Μοιραστείτε το", - "ShortcutCalendar": "για άνοιγμα του ημερολογίου (το d είναι για Ημερομηνία)", - "ShortcutHelp": "για εμφάνιση της βοήθειας", - "ShortcutRefresh": "για ανανέωση του περιεχομένου", - "ShortcutSearch": "για άνοιγμα της αναζήτησης (το f είναι για Αναζήτηση)", - "ShortcutSegmentSelector": "για άνοιγμα του επιλογέα Τμήματος", - "ShortcutWebsiteSelector": "για άνοιγμα του επιλογέα Ιστοτόπου", - "ShortcutZenMode": "για κατάσταση Zen", - "ShortcutsAvailable": "Διαθέσιμες συντομεύσεις", - "ShowExportUrl": "Εμφάνιση URL εξαγωγής", - "ShowJSCode": "Εμφάνιση του κώδικα της Javascript προς εισαγωγή", - "SkipToContent": "Μετάβαση στο περιεχόμενο", - "SoftwareSubcategoryHelp": "Το τμήμα Λογισμικού σας δείχνει τα λειτουργικά συστήματα, φυλλομετρητές και πρόσθετα που χρησιμοποιούν οι επισκέπτες σας για την προσπέλαση στον ιστοτόπο σας ώστε να βελτιστοποιήσετε τον ιστοτόπο σας έτσι ώστε να εξασφαλίσετε ότι είναι συμβατός με τις περισσότερο δημοφιλείς παραμετροποιήσεις.", - "StandardReport": "Κανονική αναφορά", - "StartDate": "Ημερομηνία Έναρξης", - "SubscribeAndBecomePiwikSupporter": "Προχωρήστε σε μια ασφαλή σελίδα πληρωμής με πιστωτική κάρτα (Paypal) για να γίνετε Υποστηρικτής του Matomo!", - "SupportPiwik": "Στηρίξτε το Matomo!", - "SupportUsOn": "Υποστηρίξτε μας στο", - "SystemSummaryMysqlVersion": "Έκδοση της MySQL", - "SystemSummaryNActivatedPlugins": "%d ενεργά πρόσθετα", - "SystemSummaryNSegments": "%1$d τμήματα", - "SystemSummaryNSegmentsWithBreakdown": "%1$d τμήματα (%2$s σε προ-επεξεργασία, %3$s σε επεξεργασία σε πραγματικό χρόνο)", - "SystemSummaryNWebsites": "%d ιστοτόποι", - "SystemSummaryPhpVersion": "Έκδοση της PHP", - "SystemSummaryPiwikVersion": "Έκδοση του Matomo", - "SystemSummaryWidget": "Περίληψη συστήματος", - "TableNoData": "Δεν υπάρχουν δεδομένα για τον πίνακα.", - "TechDeprecationWarning": "Αρχίζοντας από την έκδοση %1$s του Matomo, η υποστήριξη του Matomo θα λήξει για την %2$s. Για περισσότερες πληροφορίες, %3$sδείτε την καταχώρισή μας στο ιστολόγιο%4$s.", - "ThanksFromAllOfUs": "Από όλους εμάς στο Matomo σας ευχαριστούμε!", - "ThereIsNoDataForThisReport": "Δεν υπάρχουν δεδομένα για αυτή την αναφορά.", - "UnFlattenDataTable": "Η αναφορά είναι επίπεδη %s Κάντε την ιεραρχημένη", - "UndoPivotBySubtable": "Η αναφορά θεμελιώθηκε %s Αναίρεση της θεμελίωσης", - "ViewAllPiwikVideoTutorials": "Δείτε όλα τα βίντεο εκμάθησης του Matomo", - "VisitStatusOrdered": "Παραγγέλθηκαν", - "VisitStatusOrderedThenAbandoned": "Παραγγέλθηκαν από εγκαταλελειμμένο καλάθι", - "VisitTypeReturning": "Επιστροφές", - "VisitTypeReturningCustomer": "Επιστρεφόμενος πελάτης", - "VisitorsCategoryHelp1": "Οι σελίδες Επισκεπτών σας δείχνουν πράματα σχετικά με το ποιοι είναι οι επισκέπτες σας. Πράματα όπως από που προέρχονται οι επισκέπτες σας, ποιες συσκευές και φυλλομετρητές χρησιμοποιούν και πότε γενικά επισκέπτονται τον ιστοτόπο σας. Κατανοήστε, στη σύνοψη, ποιο είναι το κοινό σας και ψάξτε για αποκομμένους χρήστες για να δείτε πως το κοινό σας μπορεί να μεγαλώσει.", - "VisitorsCategoryHelp2": "Επιπρόσθετα με τις γενικές πληροφορίες σχετικά με τους επισκέπτες σας, μπορείτε να δείτε το %1$sΗμερολόγιο Επισκεπτών%2$s για να δείτε τι συνέβη σε κάθε ξεχωριστή επίσκεψη.", - "VisitorsOverviewHelp": "Η Σύνοψη Επισκεπτών σας βοηθά να κατανοήσετε την δημοφιλία του ιστοτόπου σας. Αυτό το κάνει παρέχοντας γραφήματα που δείχνουν πόσες επισκέψεις δέχεται ο ιστοτόπος σας σε μια επιλεγμένη χρονική περίοδο και το μέσο όρο ενασχόλησης με κύρια χαρακτηριστικά, όπως οι αναζητήσεις και τα κατεβάσματα αρχείων.", - "WebAnalyticsReports": "Αναφορές Στατιστικών Ιστού", - "YouAreUsingTheLatestVersion": "Χρησιμοποιείτε την τελευταία έκδοση του Matomo!", - "YourDonationWillHelp": "Η δωρεά σας θα βοηθήσει άμεσα στην χρηματοδότηση νέων χαρακτηριστικών και βελτιώσεων για αυτή την ανοικτού κώδικα πλατφόρμα αναλυτικών. Αυτό σημαίνει ότι η κοινότητα θα κερδίζει πάντα από ένα εργαλείο που προστατεύει την ιδιωτικότητα και σας δίνει τον έλεγχο των δεδομένων σας." - } -} diff --git a/plugins/CoreHome/lang/en.json b/plugins/CoreHome/lang/en.json deleted file mode 100644 index 8f85dacab44487ac364b1a2cdfb4d513bf120084..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/en.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "AI Insights", - "CategoryNoData": "No data in this category. Try to \"Include all population\".", - "ChangeVisualization": "Change visualization", - "ChangePeriod": "Change period", - "CheckForUpdates": "Check for updates", - "CheckPiwikOut": "Check Matomo out!", - "ClickToEditX": "Click to edit %s", - "ClickToSeeFullInformation": "Click to see the full information", - "CloseSearch": "Close search", - "CloseWidgetDirections": "You can close this widget by clicking on the 'X' icon at the top of the widget.", - "ChooseX": "Choose %1$s", - "DataForThisReportHasBeenPurged": "The data for this report is more than %s months old and has been purged.", - "DataForThisReportHasBeenDisabled": "Segmentation is currently disabled for this report. Please check %1$sthis FAQ%2$s for more details.", - "DataTableExcludeAggregateRows": "Aggregate rows are shown %s Hide them", - "DataTableIncludeAggregateRows": "Aggregate rows are hidden %s Show them", - "DataTableHowToSearch": "Press enter or click the search icon to search", - "DataTableShowDimensions": "Dimensions are combined %s Show dimensions separately", - "DataTableCombineDimensions": "Dimensions are shown separately %s Show dimensions combined", - "DateInvalid": "The given date and period combination is invalid. Please choose a valid date in the date selector.", - "Default": "default", - "DonateCall1": "Matomo will always cost you nothing to use, but that doesn't mean it costs us nothing to make.", - "DonateCall2": "Matomo needs your continued support to grow and thrive.", - "DonateCall3": "If you feel that Matomo has added significant value to your business or endeavour, %1$splease consider donating%2$s or %3$spurchasing a premium feature%4$s. Every penny will help.", - "EndShortcut": "End", - "EnterZenMode": "Enter Zen mode (hide the menus)", - "ExitZenMode": "Exit Zen mode (show the menus)", - "ExceptionNotAllowlistedIP": "You cannot use this Matomo as your IP %s is not allowed.", - "ExcludeRowsWithLowPopulation": "All rows are shown %s Exclude low population", - "ExternalHelp": "Help (opens in new tab)", - "FlattenDataTable": "The report is hierarchical %s Make it flat", - "FormatMetrics": "Format metrics", - "ShowExportUrl": "Show Export URL", - "HideExportUrl": "Hide Export URL", - "HomeShortcut": "Home", - "SupportUsOn": "Support us on", - "IncludeRowsWithLowPopulation": "Rows with low population are hidden %s Show all rows", - "InjectedHostEmailBody": "Hello, I tried to access Matomo today and encountered the unknown hostname warning.", - "InjectedHostEmailSubject": "Matomo was accessed with an unknown hostname: %s", - "InjectedHostNonSuperUserWarning": "%1$sClick here to access Matomo safely%2$s and remove this warning. You may also want to contact your Matomo administrator and notify them about this issue (%3$sclick here to email%4$s).", - "InjectedHostSuperUserWarning": "Matomo may be misconfigured (for example, if Matomo was recently moved to a new server or URL). You can either %1$sclick here and add %2$s as the valid Matomo hostname (if you trust it)%3$s, or %4$sclick here and go to %5$s to access Matomo safely%6$s.", - "InjectedHostWarningIntro": "You are now accessing Matomo from %1$s, but Matomo has been configured to run at this address: %2$s.", - "JavascriptDisabled": "JavaScript must be enabled in order for you to use Matomo in standard view.
However, it seems JavaScript is either disabled or not supported by your browser.
To use standard view, enable JavaScript by changing your browser options, then %1$stry again%2$s.
", - "VisitStatusOrdered": "Ordered", - "VisitStatusOrderedThenAbandoned": "Ordered then Abandoned Cart", - "VisitTypeReturning": "Returning", - "VisitTypeReturningCustomer": "Returning Customer", - "MainNavigation": "Main navigation", - "YourDonationWillHelp": "Your donation will directly help fund new features and improvements for this open-source analytics platform. This means the community will always benefit from a tool that protects privacy and lets you stay in control of your data.", - "ThanksFromAllOfUs": "Thank you from all of us at Matomo!", - "Menu": "Menu", - "NoPrivilegesAskPiwikAdmin": "You are logged in as '%1$s' but it seems you don't have any permission set in Matomo. %2$s Ask your Matomo administrator (click to email)%3$s to give you 'view' access to a website.", - "OnlyForSuperUserAccess": "This widget is displayed in the default dashboard only to users having Super User access.", - "PeriodRange": "Range", - "PresetDateToday": "Today", - "PresetDateYesterday": "Yesterday", - "PresetDateLast7Days": "Last 7 days", - "PresetDateLast30Days": "Last 30 days", - "PresetDateLast90Days": "Last 90 days", - "PresetDateLastWeekMonSun": "Last week (Mon - Sun)", - "PresetDateLastMonth": "Last month", - "PresetDateLastQuarter": "Last quarter", - "PresetDateLastYear": "Last year", - "PresetDateThisWeekMonToday": "This week (Mon - Today)", - "PresetDateThisMonth": "This month", - "PresetDateThisQuarter": "This quarter", - "PresetDateThisYear": "This year", - "ReportGeneratedOn": "Report generated on %s", - "ReportGeneratedXAgo": "Report generated %s ago", - "ReportConfigure": "Configure this report", - "SharePiwikLong": "Hi! I just found a great piece of free software: Matomo!\n\nMatomo will let you track visitors to your website for free. You should definitely check it out!", - "SharePiwikShort": "Matomo! Free\/libre web analytics. Own your data.", - "ShareThis": "Share this", - "ShortcutsAvailable": "Available shortcuts", - "ShortcutZenMode": "for Zen mode", - "ShortcutSegmentSelector": "to open Segment selector", - "ShortcutWebsiteSelector": "to open Website selector", - "ShortcutCalendar": "to open calendar (d stands for Date)", - "ShortcutSearch": "to open the search (f stands for Find)", - "ShortcutRefresh": "to refresh the content", - "ShortcutHelp": "to show this help", - "ShowJSCode": "Show the JavaScript code to insert", - "SkipToContent": "Skip to content", - "SubscribeAndBecomePiwikSupporter": "Proceed to a secure credit card payment page (Paypal) to become a Matomo Supporter!", - "SupportPiwik": "Support Matomo!", - "TableNoData": "No data for this table.", - "ThereIsNoDataForThisReport": "There is no data for this report.", - "UnFlattenDataTable": "The report is flat %s Make it hierarchical", - "RemoveTotalsRowDataTable": "The report is showing the totals row %s Remove totals row", - "AddTotalsRowDataTable": "The report is not showing the totals row %s Show totals row", - "ViewAllPiwikVideoTutorials": "View all Matomo Video Tutorials", - "WebAnalyticsReports": "Web Analytics Reports", - "YouAreUsingTheLatestVersion": "You are using the latest version of Matomo!", - "ClickRowToExpandOrContract": "Click this row to expand or contract the subtable.", - "UndoPivotBySubtable": "This report has been pivoted %s Undo pivot", - "NoSuchPage": "This page does not exist", - "PageUpShortcutDescription": "to get to the top of the page", - "PageDownShortcutDescription": "to get to the bottom of the page", - "PivotBySubtable": "This report is not pivoted %1$s Pivot by %2$s", - "SystemSummaryWidget": "System Summary", - "SystemSummaryNWebsites": "%d websites", - "SystemSummaryNSegments": "%1$d segments", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segments (%2$s pre-processed, %3$s processed in real-time)", - "SystemSummaryNActivatedPlugins": "%d activated plugins", - "SystemSummaryPiwikVersion": "Matomo version", - "SystemSummaryMysqlVersion": "MySQL version", - "SystemSummaryPhpVersion": "PHP version", - "QuickAccessTitle": "Search for %s. Use the arrow keys to navigate through search results. Shortcut: Press 'f' to search.", - "MenuEntries": "Menu entries", - "Segments": "Segments", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "The one-click update is not available as you are using Matomo with multiple servers. Please download the latest version from %1$s to proceed.", - "CssDidntLoad": "Your browser was unable to load the style of this page.", - "JsDidntLoad": "Your browser was unable to load the scripts of this page.", - "AdblockIsMaybeUsed": "In case you are using an ad blocker, please disable it for this site to make sure Matomo works without any issues.", - "ChangeCurrentWebsite": "Choose a website, currently selected website: %s", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "The leading open analytics platform that respects your privacy.", - "MacPageUp": "Fn + Left arrow", - "MacPageDown": "Fn + Right arrow", - "ReportType": "Report type", - "RowLimit": "Row limit", - "CustomLimit": "Custom limit", - "ExportFormat": "Export format", - "ExportTooltip": "Note: To use the generated export URL, you will need to specify an app token auth. You can configure these tokens in Admin → Security → Token Auths.", - "ExportTooltipWithLink": "Note: To use the generated export URL, you will need to specify an app token auth. You can configure these tokens in %1$s[Admin → Security → Auths Tokens]%2$s. Replace %3$s in the Export URL by your Auth token. Warning: Never share the URL with the real token with anyone else.", - "ExpandSubtables": "Expand subtables", - "StandardReport": "Standard report", - "FlattenReport": "Flatten report", - "IncludeDimensionsSeparately": "Include dimensions separately", - "ReportWithMetadata": "Report with metadata", - "ReadMoreOnlineGuide": "Read more about this topic in the online guide.", - "SeeAvailableVersions": "See Available Versions", - "QuickLinks": "Quick Links", - "Profilable": "Profilable", - "ProfilableSegmentHelp": "1 for profilable (eg cookies were used), 0 for not profilable (eg no cookies were used)", - "SearchOnMatomo": "Search '%1$s' on Matomo.org", - "TechDeprecationWarning": "Starting in version Matomo %1$s, Matomo will be ending support for %2$s. For more information %3$ssee our blog post.%4$s", - "ReportingCategoryHelpPrefix": "How does the \"%1$s → %2$s\" reporting page help me?", - "VisitorsCategoryHelp1": "The Visitors pages tell you things about who your visitors are. Things like where your visitors came from, what devices and browsers they're using and when they generally visit your website. Understand, in the aggregate, who your audience is, and look for outliers to see how your audience could grow.", - "VisitorsCategoryHelp2": "In addition to general information about your visitors, you can also use the %1$sVisits Log%2$s to see what occurred in every individual visit.", - "VisitorsOverviewHelp": "The Visitors Overview helps you understand the popularity of your site. It does this by providing charts that show how many visits your site is receiving over a selected period and the average level of engagement for key features, such as searches and downloads.", - "DevicesSubcategoryHelp": "The Devices section helps you understand the technology that your visitors are using to access your site. You will see reports on the type of device and specific models to enable you to optimise your site for the most popular devices.", - "SoftwareSubcategoryHelp": "The Software section shows the operating systems, browsers and plugins that your visitors are using to access the site so that you can optimise your site to ensure it is fully compatible with the most popular configurations.", - "EngagementSubcategoryHelp1": "The Engagement section provides reports that help to quantify how many new and returning visitors you get. You can also review reports that break down the average time and number of pages per visit, as well as the number of times a visitor has been to your site and the most common number of days between visits.", - "EngagementSubcategoryHelp2": "This can help you to optimise for frequency and high-interaction visits in addition to maximising your reach.", - "PeriodHasOnlyRawData": "It looks like reports for this period have not been processed yet. Do you want to see what's happening now? Check out the %1$sVisits log%2$s or choose a different date period until the reports are generated.", - "PeriodHasOnlyRawDataNoVisitsLog": "It looks like reports for this period have not been processed yet, but they will be available in a few hours. You could choose a different date period until the reports are generated.", - "StartDate": "Start Date", - "EndDate": "End Date", - "ReportLowercase": "report", - "LearnMoreFullStop": "%1$sLearn more.%2$s", - "ChooseWebsite": "Choose website", - "CopyModalNote": "%1$sNote:%2$s The copied %3$s may need adjustments if it includes references specific to the original website. Review settings to ensure compatibility.", - "CopyX": "Copy %1$s", - "CopyXDescription": "Select the website to copy this %1$s to. This will create an exact copy, including settings, in the chosen site.", - "InvalidComparisonDateRange": "Enter a valid comparison date range." - } -} diff --git a/plugins/CoreHome/lang/eo.json b/plugins/CoreHome/lang/eo.json deleted file mode 100644 index 0d4f3c077888d05b1981306b548aefe98592140e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/eo.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "CoreHome": { - "ChooseWebsite": "Elekti retpaĝon", - "PresetDateToday": "Today", - "PresetDateYesterday": "Yesterday" - } -} diff --git a/plugins/CoreHome/lang/es-ar.json b/plugins/CoreHome/lang/es-ar.json deleted file mode 100644 index ee3a4af2b4ec74cfeb6af23a82a73c52a9f7b034..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/es-ar.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "En el caso de que estés usando un bloqueador de publicidad, por favor, deshabilitalo para este sitio, para asegurarte de que Matomo funciona sin ningún problema.", - "AddTotalsRowDataTable": "El informe no muestra la fila de totales %s Mostrar la fila de totales", - "CategoryNoData": "No hay datos en esta categoría. Intente \"Incluir toda la población\".", - "ChangeCurrentWebsite": "Elegí un sitio web, actualmente está elegido: %s", - "ChangePeriod": "Cambiar período", - "ChangeVisualization": "Cambiar la visualización", - "CheckForUpdates": "Buscar actualizaciones", - "CheckPiwikOut": "¡Pruebe Matomo!", - "ChooseWebsite": "Elegir sitio web", - "ChooseX": "Elegí %1$s", - "ClickRowToExpandOrContract": "Hacé clic para expandir o contraer la subtabla.", - "ClickToEditX": "Hacé clic para editar %s", - "ClickToSeeFullInformation": "Hacé Click para ver la información completa", - "CloseSearch": "Cerrar search", - "CloseWidgetDirections": "Podés cerrar este widget haciendo clic en el icono \"X\" en la parte superior del widget.", - "CssDidntLoad": "Tu navegador web no fue capaz de cargar el estilo de esta página.", - "CustomLimit": "Límite personalizado", - "DataForThisReportHasBeenDisabled": "La segmentación se encuentra actualmente \"disabled\" para éste report. Por favor visite %1$seste FAQ%2$s para mas detalles.", - "DataForThisReportHasBeenPurged": "Los datos para este informe tienen más de %s meses de antigüedad y han sido eliminados.", - "DataTableCombineDimensions": "Las dimensiones se muestran separadamente %s Mostrar dimensiones combinadas", - "DataTableExcludeAggregateRows": "Se muestran las filas acumuladas %s Ocultarlas", - "DataTableHowToSearch": "Presioná \"Enter\" o hacé clic en el ícono de búsqueda para buscar", - "DataTableIncludeAggregateRows": "Se ocultan las filas agregadas %s Mostrarlas", - "DataTableShowDimensions": "Las dimensiones están combinadas %s Mostrar dimensiones separadamente", - "DateInvalid": "La combinación ofrecida de fecha y período no es válida. Por favor, elegí una fecha válida en el selector de fechas.", - "Default": "predeterminado", - "DevicesSubcategoryHelp": "La sección de dispositivos te ayuda a entender la tecnología que tus visitantes están usando para acceder a tu sitio web. Vas a ver informes sobre el tipo de dispositivo y modelos específicos para habilitarte a optimizar tu sitio para los dispositivos más populares.", - "DonateCall1": "Matomo nunca te costará nada para usarlo, pero eso no significa que no nos cueste hacerlo.", - "DonateCall2": "Matomo necesita de tu contínuo apoyo para crecer y prosperar.", - "DonateCall3": "Si sentís que Matomo agregó valor significativo a tu negocio o emprendimiento, %1$spor favor, considerá donar%2$s o %3$scomprar una función prémium%4$s. Cada centavo cuenta.", - "EndDate": "Fecha de finalización", - "EndShortcut": "Fin", - "EngagementSubcategoryHelp1": "La sección de compromiso ofrece informes que ayudan a cuantificar cuántos visitantes nuevos y habitués tenés. También podés revisar informes que delimitan el tiempo promedio y número de páginas por visitas, así como el número de veces que un visitante estuvo en tu sitio y la cantidad más común de días entre visitas.", - "EngagementSubcategoryHelp2": "Esto te puede ayudar a optimizar la frecuencia de visitas y su alta interacción, además de maximizar tu alcance.", - "EnterZenMode": "Entrar al modo Zen (ocultar los menús)", - "ExceptionNotAllowlistedIP": "No podés usar este Matomo ya que tu dirección IP %s no está permitida.", - "ExcludeRowsWithLowPopulation": "Se muestran todas las filas %s Excluir baja población", - "ExitZenMode": "Salir del modo Zen (mostrar los menús)", - "ExpandSubtables": "Expandir subtablas", - "ExportFormat": "Exportar formato", - "ExportTooltip": "Nota: para usar la dirección web de exportación generada, vas a necesitar especificar una aplicación de autenticación de token. Podés configurar estos tokens en \"Administración\" > \"Seguridad\" > \"Autenticaciones de tokens\".", - "ExportTooltipWithLink": "Nota: para usar la dirección web de exportación generada, vas a necesitar una aplicación de autenticación de token. Podés configurar estos tokens en %1$s[\"Administración\" → \"Seguridad\" → \"Autenticaciones de tokens\"]%2$s. Reemplazá %3$s en la dirección web de exportación por tu token de autenticación. Advertencia: nunca compartas la dirección web con el token real con nadie.", - "ExternalHelp": "Ayuda (se abre en una nueva pestaña)", - "FlattenDataTable": "Este informe es jerárquico %s Hacelo plano", - "FlattenReport": "Aplanar informe", - "FormatMetrics": "Formatear mediciones", - "HideExportUrl": "Ocultar dirección web de exportación", - "HomeShortcut": "Página principal", - "IncludeRowsWithLowPopulation": "Se ocultan las filas con baja población %s Mostrar todas las filas", - "InjectedHostEmailBody": "Hola, hoy intenté acceder a Matomo pero encontré la advertencia sobre nombre de dominio (\"hostname\") desconocido.", - "InjectedHostEmailSubject": "Se accedió a Matomo desde un servidor desconocido: %s", - "InjectedHostNonSuperUserWarning": "%1$sHacé clic acá para acceder de forma segura a Matomo%2$s y quitar esta advertencia. Podés contactarte con tu administrador de Matomo y notificarlo acerca de este problema (%3$shacé clic acá para enviarle un correo electrónico%4$s).", - "InjectedHostSuperUserWarning": "Matomo puede estar desconfigurado (por ejemplo, si Matomo fue mudado recientemente a un nuevo servidor o cambió su dirección web). Podés, o bien %1$shacer clic acá y agregar %2$s como servidores válidos Matomo (si los considerás confiables)%3$s, o bien %4$shacé clic acá y andá a %5$s para acceder de forma segura a Matomo%6$s.", - "InjectedHostWarningIntro": "Está accediendo a Matomo desde %1$s, pero Matomo fue configurado para ejecutarse en esta dirección: %2$s.", - "JavascriptDisabled": "JavaScript debe estar habilitado para que puedas usar la vista estándar de Matomo .
Sin embargo, parece que JavaScript, o bien está deshabilitado, o bien no es soportado por tu navegador.
Para usar la vista estándar, habilitá JavaScript cambiando la configuración de tu navegador, luego%1$sintentá nuevamente%2$s.
", - "JsDidntLoad": "Tu navegador web no fue capaz de cargar los scripts de esta página.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "La plataforma abierta líder de análisis que respeta tu privacidad.", - "MacPageDown": "\"Fn\" + flecha derecha", - "MacPageUp": "\"Fn\" + flecha izquierda", - "MainNavigation": "Navegación principal", - "Menu": "Menú", - "MenuEntries": "Entradas del menú", - "NoPrivilegesAskPiwikAdmin": "Iniciaste sesión como \"%1$s\", pero parece que no tenés ningún permiso configurado en Matomo. %2$sConsultá al administrador de tu Matomo (hacé clic para enviarle un correo electrónico)%3$s para que te dé acceso de lectura al sitio web.", - "NoSuchPage": "Esta página no existe", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "La actualización de un clic no está disponible, ya que estás usando Matomo con múltiples servidores. Por favor, descargá la última versión desde %1$s para continuar.", - "OnlyForSuperUserAccess": "Este widget se muestra en el panel principal sólo a los usuarios que tengan acceso de súper usuario.", - "PageDownShortcutDescription": "para ir al fin de la página", - "PageUpShortcutDescription": "para ir al comienzo de la página", - "PeriodHasOnlyRawData": "Parece que todavía no se procesaron informes para este período. ¿Querés saber lo que está pasando ahora? Revisá el %1$sregistro de visitas%2$s o elegí un período de fechas diferentes hasta que se generen los informes.", - "PeriodRange": "Rango", - "PivotBySubtable": "Este informe no fue pivotado %1$s Pivote por %2$s", - "PresetDateToday": "Hoy", - "PresetDateYesterday": "Ayer", - "Profilable": "Perfilable", - "QuickAccessTitle": "Buscar %s. Usá las teclas de flechas para navegar entre los resultados de la búsqueda. Atajo: presioná \"f\" para buscar.", - "QuickLinks": "Enlaces rápidos", - "ReadMoreOnlineGuide": "Leé más sobre este tema en la guía en línea.", - "RemoveTotalsRowDataTable": "El informe muestra la fila de totales %s Quitar la fila de totales", - "ReportGeneratedOn": "Informe generado el %s", - "ReportGeneratedXAgo": "Informe generado hace %s", - "ReportLowercase": "informe", - "ReportType": "Tipo de informe", - "ReportWithMetadata": "Informe con metadatos", - "ReportingCategoryHelpPrefix": "¿Cómo puede ayudarme la página de informe \"%1$s > %2$s\"?", - "RowLimit": "Límite fe fila", - "SearchOnMatomo": "Buscá \"%1$s\" en matomo.org", - "SeeAvailableVersions": "Ver las versiones disponibles", - "Segments": "Segmentos", - "SharePiwikLong": "¡Hola! Acabo de encontrar otro software libre de calidad: ¡Matomo!\n\nMatomo te permite rastrear visitantes en tu sitio web, gratis. ¡Deberían probarlo!", - "SharePiwikShort": "Matomo: análisis web gratis y de código abierto. Conservá tus propios datos.", - "ShareThis": "Compartilo", - "ShortcutCalendar": "para abrir el calendario (\"d\" significa \"fecha\")", - "ShortcutHelp": "para mostrar esta ayuda", - "ShortcutSearch": "para abrir la búsqueda (\"f\" significa \"buscar\")", - "ShortcutSegmentSelector": "para abrir el selector de Segmento", - "ShortcutWebsiteSelector": "para abrir el selector de Sitio web", - "ShortcutZenMode": "para el modo Zen", - "ShortcutsAvailable": "Atajos disponibles", - "ShowExportUrl": "Mostrar dirección web de exportación", - "ShowJSCode": "Mostrar el código JavaScript para insertar", - "SkipToContent": "Pasar al contenido", - "SoftwareSubcategoryHelp": "La sección de software muestra los sistemas operativos, navehadores web y plugins que tus visitantes están usando para acceder al sitio, así podés optimizarlo para asegurarte de que es totalmente compatible con las configuraciones más populares.", - "StandardReport": "Informe estándar", - "StartDate": "Fecha de inicio", - "SubscribeAndBecomePiwikSupporter": "Continuar a una página de pago con tarjeta de crédito segura (PayPal) ¡para ser un colaborador de Matomo!", - "SupportPiwik": "¡Apoyá a Matomo!", - "SupportUsOn": "Apoyanos en", - "SystemSummaryMysqlVersion": "Versión de MySQL", - "SystemSummaryNActivatedPlugins": "%d plugins activos", - "SystemSummaryNSegments": "%1$d segmentos", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentos (%2$s preprocesados, %3$s procesados en tiempo real)", - "SystemSummaryNWebsites": "%d sitios web", - "SystemSummaryPhpVersion": "Versión de PHP", - "SystemSummaryPiwikVersion": "Versión de Matomo", - "SystemSummaryWidget": "Resumen del sistema", - "TableNoData": "Sin datos para esta tabla.", - "TechDeprecationWarning": "A partir de la versión Matomo %1$s, Matomo no dará soporte para %2$s. Para más información %3$s visite nuestro blog.%4$s", - "ThanksFromAllOfUs": "¡Gracias de parte de todos nosotros en Matomo!", - "ThereIsNoDataForThisReport": "No hay datos para este informe.", - "UnFlattenDataTable": "Este informe es plano %s Hacelo jerárquico", - "UndoPivotBySubtable": "Este informe fue pivotado %s Deshacerlo", - "ViewAllPiwikVideoTutorials": "Ver todos los videos tutoriales de Matomo", - "VisitStatusOrdered": "Ordenado", - "VisitStatusOrderedThenAbandoned": "Ordenado, entonces changuito abandonado", - "VisitTypeReturning": "Regresos", - "VisitTypeReturningCustomer": "Cliente que vuelve", - "VisitorsCategoryHelp1": "Las páginas de visitantes te dicen cosas sobre quiénes son los visitantes. Cosas como desde dónde vienen, qué dispositivos y navegadores web están usando y cuándo generalmente visitan tu sitio web. Asimilá, en el agregado, quién es tu audiencia, y buscá valores atípicos para ver cómo podría crecer.", - "VisitorsCategoryHelp2": "Además de la información general sobre tus visitantes, también podés usar el %1$sregistro de visitas%2$s para ver qué ocurrió con cada visita individual.", - "VisitorsOverviewHelp": "El pantallazo de los visitantes te ayuda a entender la popularidad de tu sitio web. Lo hace ofreciendo gráficos que muestran cuántas visitas está recibiendo tu sitio sobre un período seleccionado y el nivel promedio de compromiso con las funciones claves, como las búsquedas y las descargas.", - "WebAnalyticsReports": "Informes de análisis web", - "YouAreUsingTheLatestVersion": "¡Estás usando la última versión de Matomo!", - "YourDonationWillHelp": "Tu donación ayudará directamente a crear nuevas funciones y mejoras en esta plataforma de análisis web de código abierto. Esto significa que la comunidad siempre se beneficiará de una herramienta que protege la privacidad y que te permite tener el control de tus datos." - } -} diff --git a/plugins/CoreHome/lang/es.json b/plugins/CoreHome/lang/es.json deleted file mode 100644 index 7d6e6619c84e4d8028814024247c3191942b04f2..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/es.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Insignias IA", - "AdblockIsMaybeUsed": "En caso de que esté utilizando un ad-blocker, por favor deshabilítelo para este sitio para asegurarse que Matomo pueda trabajar sin problemas.", - "AddTotalsRowDataTable": "El informe no está mostrando la fila de totales %s Mostrar fila de totales", - "CategoryNoData": "No hay datos en esta categoría. Intente \"Incluir toda la población\".", - "ChangeCurrentWebsite": "Elige un sitio web, actualmente el sitio web seleccionado es: %s", - "ChangePeriod": "Cambiar período", - "ChangeVisualization": "Cambiar visualización", - "CheckForUpdates": "Comprobar actualizaciones", - "CheckPiwikOut": "Compruebe Matomo ahora!", - "ChooseWebsite": "Elege un sitio de internet", - "ChooseX": "Elige %1$s", - "ClickRowToExpandOrContract": "Haga clic en esta fila para expandir o contraer la subtabla.", - "ClickToEditX": "Clic para editar %s", - "ClickToSeeFullInformation": "Haz clic para ver la información completa", - "CloseSearch": "Cerrar búsqueda", - "CloseWidgetDirections": "Puede cerrar este módulo haciendo clic en el icono \"X\" de la parte superior del mismo.", - "CopyModalNote": "%1$sNota:%2$s La %3$s copiada puede requerir ajustes si incluye referencias específicas al sitio web original. Revisa los ajustes para asegurar la compatibilidad.", - "CopyX": "Copiar %1$s", - "CopyXDescription": "Seleccionar el sitio web para copiar este %1$s. Esto creará una copia exacta, incluyendo ajustes, dentro del sitio elegido.", - "CssDidntLoad": "Su navegador de internet no fue capaz de cargar el estilo de esta página.", - "CustomLimit": "Límite personalizado", - "DataForThisReportHasBeenDisabled": "La segmentación está actualmente desactivada para este informe. Por favor, compruebe %1$sesta pregunta frecuente%2$s para más detalles.", - "DataForThisReportHasBeenPurged": "Los datos para este informe tienen más de %s meses de antigüedad y han sido purgados.", - "DataTableCombineDimensions": "Dimensiones están mostradas separadamente %s Mostrarlas de manera combinada", - "DataTableExcludeAggregateRows": "Mostrar filas acumuladas %s Ocultarlas", - "DataTableHowToSearch": "Pulse Intro o haga clic en el icono de búsqueda para buscar", - "DataTableIncludeAggregateRows": "Filas agregadas están ocultas %s Mostrarlas", - "DataTableShowDimensions": "Dimensiones están combinadas %s Mostrarlas separadamente", - "DateInvalid": "La combinación de fecha y periodo seleccionados es inválido. Por favor escoja una fecha válida en el selector de fechas.", - "Default": "predeterminado", - "DevicesSubcategoryHelp": "La sección Dispositivos le ayuda a comprender la tecnología que sus visitantes utilizan para acceder a su sitio. Verás informes sobre el tipo de dispositivo y los modelos específicos que te permitirán optimizar tu sitio para los dispositivos más populares.", - "DonateCall1": "Matomo siempre será gratis, pero eso no significa que no nos cueste nada hacerlo.", - "DonateCall2": "Matomo necesita su apoyo para crecer y prosperar.", - "DonateCall3": "Si sientes que Matomo ha supuesto un valor añadido para tu negocio o emprendimiento, %1$spor favor, considera hacer una donación%2$s o %3$sadquirir una funcionalidad premium%4$s. Cada centavo ayudará.", - "EndDate": "Fecha final", - "EndShortcut": "Fin", - "EngagementSubcategoryHelp1": "La sección Compromiso proporciona informes que ayudan a cuantificar cuántos visitantes nuevos y recurrentes recibe. También puede revisar los informes que desglosan el tiempo medio y el número de páginas por visita, así como el número de veces que un visitante ha estado en su sitio y el número de días más común entre las visitas.", - "EngagementSubcategoryHelp2": "Esto le puede ayudar a usted, además de a maximizar su alcance, a optimizar por frecuencia y visitas de gran interacción.", - "EnterZenMode": "Cambiar al modo Zen (ocultar los menús)", - "ExceptionNotAllowlistedIP": "No puede usar este Matomo dado que su IP %s no está habilitada.", - "ExcludeRowsWithLowPopulation": "Mostrar todas las filas %s Excluir baja población", - "ExitZenMode": "Salir de modo Zen (mostrar menús)", - "ExpandSubtables": "Expandir subtablas", - "ExportFormat": "Formato de exportación", - "ExportTooltip": "Nota: Para usar la URL de exportación generada, deberá especificar una autenticación de token de aplicación. Puede configurar estos tokens en Admin → Seguridad → Autorizaciones de token.", - "ExportTooltipWithLink": "Nota: Para usar la URL de exportación generada, deberá especificar una autenticación de token de aplicación. Puede configurar estos tokens en %1$s[Admin → Security → Auths Tokens]%2$s. Reemplace %3$s en la URL de exportación por su token de autenticación. Advertencia: nunca comparta la URL con el token real con nadie más.", - "ExternalHelp": "Ayuda (se abre en una nueva pestaña)", - "FlattenDataTable": "Este reporte es jerárquico %s Hazlo plano", - "FlattenReport": "Aplanar informe", - "FormatMetrics": "Formato de métricas", - "HideExportUrl": "Ocultar URL de exportación", - "HomeShortcut": "Inicio", - "IncludeDimensionsSeparately": "Incluir dimensiones separadamente", - "IncludeRowsWithLowPopulation": "Las filas con baja población están ocultas %s Mostrar todas las filas", - "InjectedHostEmailBody": "Hola, traté de acceder a Matomo hoy y encontré una advertencia de que el nombre del servidor es desconocido.", - "InjectedHostEmailSubject": "Se ha accedido a Matomo con un nombre desconocido de servidor: %s", - "InjectedHostNonSuperUserWarning": "%1$sHaga clic aquí para acceder a Matomo de forma segura%2$s y elimine esta advertencia. También puede ponerse en contacto con su administrador de Matomo y notificarle sobre este problema (%3$shaga clic aquí para enviar un correo electrónico a%4$s).", - "InjectedHostSuperUserWarning": "Matomo puede estar desconfigurado (por ejemplo, si has mudado Matomo a un nuevo servidor hace poco o ha cambiado su URL). Puedes %1$shacer aquí y añadir %2$s como servidores válidos de Matomo (si los considera fiables)%3$s, o bien %4$s hacer clic aquí e ir a %5$s para acceder de forma segura a Matomo%6$s.", - "InjectedHostWarningIntro": "Está accediendo a Matomo desde %1$s, pero Matomo ha sido configurado para ejecutarse en esta dirección: %2$s.", - "InvalidComparisonDateRange": "Introduzca un intervalo de fechas de comparación válido.", - "JavascriptDisabled": "JavaScript debe estar habilitado para poder usar Matomo en la vista estándar.
Sin embargo, parece que JavaScript está deshabilitado o no es compatible con su navegador.
Para usar la vista estándar, habilite JavaScript cambiando las opciones de su navegador , luego %1$sintentar de nuevo%2$s.
", - "JsDidntLoad": "Su navegador de internet no fue capaz de cargar los comandos de esta página.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "La plataforma abierta, líder en estadísticas, que respeta tu privacidad.", - "LearnMoreFullStop": "%1$sAprende más.%2$s", - "MacPageDown": "Fn + flecha derecha", - "MacPageUp": "Fn + flecha izquierda", - "MainNavigation": "Menú principal de navegación", - "Menu": "Menú", - "MenuEntries": "Opciones de menú", - "NoPrivilegesAskPiwikAdmin": "Has iniciado sesión como '%1$s', pero parece que no posees ningún permiso configurado en Matomo. %2$s Consulta al administrador de tu Matomo (clic para enviar correo electrónico)%3$s para que te otorgue acceso para 'ver' el sitio web.", - "NoSuchPage": "Esta página no existe", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "La actualización en un solo clic no está disponible ya que está usando Matomo en varios servidores. Por favor, para continuar, descargue la última versión de %1$s.", - "OnlyForSuperUserAccess": "Este módulo se muestra en el panel de control predeterminado solo a los usuarios que poseen permisos de Super Usuario.", - "PageDownShortcutDescription": "para ir a la parte inferior de la página", - "PageUpShortcutDescription": "para ir a la parte superior de la página", - "PeriodHasOnlyRawData": "Parece que los informes para este periodo aún no han sido procesados. ¿Quiere ver lo que está sucediendo ahora? Consulte aquí %1$s, registro de visitas %2$s o elija un periodo distinto hasta que los informes se hayan generado.", - "PeriodHasOnlyRawDataNoVisitsLog": "Parece que los informes correspondientes a este periodo aún no se han procesado, pero estarán disponibles en unas horas. Podría elegir un periodo de fechas diferente hasta que se generen los informes.", - "PeriodRange": "Rango", - "PivotBySubtable": "Este informe no está girado %1$s Girarlo sobre %2$s", - "PresetDateLast30Days": "Últimos 30 días", - "PresetDateLast7Days": "Últimos 7 días", - "PresetDateLast90Days": "Últimos 90 días", - "PresetDateLastMonth": "Último mes", - "PresetDateLastQuarter": "Último trimestre", - "PresetDateLastWeekMonSun": "Última semana (Lun - Dom)", - "PresetDateLastYear": "Último año", - "PresetDateThisMonth": "Este mes", - "PresetDateThisQuarter": "Este trimestre", - "PresetDateThisWeekMonToday": "Esta semana (Lun - Hoy)", - "PresetDateThisYear": "Este año", - "PresetDateToday": "Hoy", - "PresetDateYesterday": "Ayer", - "Profilable": "Perfilable", - "ProfilableSegmentHelp": "1 para perfilable (p.ej., fueron utilizadas cookies), 0 para ningún perfilado (p.ej., no fueron utilizadas cookies)", - "QuickAccessTitle": "Buscar por %s. Utilice las teclas del cursor para navegar a través de los resultados. Atajo de teclado: Click 'f' para buscar.", - "QuickLinks": "Enlaces rápidos", - "ReadMoreOnlineGuide": "Lea más sobre este tema en la guía en linea.", - "RemoveTotalsRowDataTable": "El informe está mostrando la fila de totales %s Eliminar fila de totales", - "ReportConfigure": "Configura este informe", - "ReportGeneratedOn": "Informe generado el %s", - "ReportGeneratedXAgo": "Informe generado hace %s", - "ReportLowercase": "informe", - "ReportType": "Tipo de informe", - "ReportWithMetadata": "Informe con metadatos", - "ReportingCategoryHelpPrefix": "¿Cómo me ayuda la página de informes \"%1$s → %2$s\"?", - "RowLimit": "Límite de fila", - "SearchOnMatomo": "Busca '%1$s' en Matomo.org", - "SeeAvailableVersions": "Ver versiones disponibles", - "Segments": "Segmentos", - "SharePiwikLong": "Hola! Acabo de encontrar un software gratuito: Matomo!\n\nMatomo le permitirá rastrear los visitantes de su sitio web gratuitamente. will let you track visitors to your website for free. Definitivamente deberías comprobarlo!", - "SharePiwikShort": "Matomo! Análisis de internet gratuito y de código abierto. Posea sus datos.", - "ShareThis": "Compartirlo", - "ShortcutCalendar": "para abrir calendario (d significa Date)", - "ShortcutHelp": "para mostrar esta ayuda", - "ShortcutRefresh": "para actualizar el contenido", - "ShortcutSearch": "para ejecutar la búsqueda (f significa Find)", - "ShortcutSegmentSelector": "para abrir el selector Segmento", - "ShortcutWebsiteSelector": "para abrir el selector Sitio web", - "ShortcutZenMode": "para modo Zen", - "ShortcutsAvailable": "Atajos disponibles", - "ShowExportUrl": "Mostrar URL de exportación", - "ShowJSCode": "Mostrar el código JavaScript para insertar", - "SkipToContent": "Saltar al contenido", - "SoftwareSubcategoryHelp": "La sección de software muestra los sistemas operativos, los navegadores y los plugins que utilizan sus visitantes para acceder al sitio, de modo que pueda optimizarlo para que sea totalmente compatible con las configuraciones más populares.", - "StandardReport": "Informe estándar", - "StartDate": "Fecha de inicio", - "SubscribeAndBecomePiwikSupporter": "Continuar a una página de pago con tarjeta de crédito segura (PayPal) para transformarse en un ¡Colaborador de Matomo!", - "SupportPiwik": "¡Apoye a Matomo!", - "SupportUsOn": "Apóyanos en", - "SystemSummaryMysqlVersion": "Versión MySQL", - "SystemSummaryNActivatedPlugins": "%d complementos activados", - "SystemSummaryNSegments": "%1$d segmentos", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentos (%2$s pre-procesados, %3$s procesados en tiempo real)", - "SystemSummaryNWebsites": "%d sitios web", - "SystemSummaryPhpVersion": "Versión de PHP", - "SystemSummaryPiwikVersion": "Versión Matomo", - "SystemSummaryWidget": "Resumen del sistema", - "TableNoData": "Sin datos para esta tabla.", - "TechDeprecationWarning": "A partir de la versión Matomo %1$s, Matomo dejará de ser compatible con %2$s. Para obtener más información, %3$sconsulte nuestra publicación de blog.%4$s", - "ThanksFromAllOfUs": "¡Gracias de parte de todos en Matomo!", - "ThereIsNoDataForThisReport": "No hay datos para este informe.", - "UnFlattenDataTable": "Este informe es plano %s Hazlo jerárquico", - "UndoPivotBySubtable": "Este informe ha sido girado %s Deshacer giro", - "ViewAllPiwikVideoTutorials": "Ver todos los video tutoriales de Matomo", - "VisitStatusOrdered": "Ordenado", - "VisitStatusOrderedThenAbandoned": "Ordenado pero luego Carrito abandonado", - "VisitTypeReturning": "Recurrente", - "VisitTypeReturningCustomer": "Cliente recurrente", - "VisitorsCategoryHelp1": "Las páginas de visitantes te dicen cosas sobre quiénes son tus visitantes. Cosas como de dónde vinieron tus visitantes, qué dispositivos y navegadores están usando y cuándo generalmente visitan tu sitio web. Entiende, en conjunto, quién es tu audiencia y busca valores atípicos para ver cómo tu audiencia podría crecer.", - "VisitorsCategoryHelp2": "Además de la información general respecto a los visitantes, también puede usar %1$s los registros de visitas %2$s para ver que ha ocurrido en cada visita individual.", - "VisitorsOverviewHelp": "La visión general de los visitantes le ayuda a comprender la popularidad de su sitio. Para ello, ofrece gráficos que muestran el número de visitas que recibe su sitio durante un periodo seleccionado y el nivel medio de participación en funciones clave, como las búsquedas y las descargas.", - "WebAnalyticsReports": "Informes de análisis de internet", - "YouAreUsingTheLatestVersion": "¡Está utilizando la última versión de Matomo!", - "YourDonationWillHelp": "Su donación ayudará directamente al desarrollo de nuevas características y mejoras para esta plataforma de analíticas de código abierto. Esto significa que la comunidad siempre se beneficiará de una herramienta que proteje la privacidad y le permite tener el control de sus datos." - } -} diff --git a/plugins/CoreHome/lang/et.json b/plugins/CoreHome/lang/et.json deleted file mode 100644 index a808f3ca341ec2a7f1b1acf73cc004b915a861d3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/et.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Informatsioon puudub selles kategoorias. Proovi \"Include all population\".", - "ChangePeriod": "Muuda ajavahemikku", - "ChangeVisualization": "Muuda visualiseerimist", - "CheckForUpdates": "Kontrolli uuendusi", - "CheckPiwikOut": "Proovi Matomout!", - "ChooseWebsite": "Vali veebileht", - "ChooseX": "Vali %1$s", - "ClickToEditX": "Muutmiseks klõpsi - %s", - "ClickToSeeFullInformation": "Kogu teabe lugemiseks klõpsi", - "CloseSearch": "Sulge otsing", - "CloseWidgetDirections": "Sa saad antud vidina sulgeda, valides 'X' vidina ülaservas.", - "Default": "vaikimisi", - "ExcludeRowsWithLowPopulation": "Kuvatakse kõiki ridu %s Eemalda ebapopulaarsemad", - "ExternalHelp": "Abi (avaneb uues aknas)", - "FlattenDataTable": "Antud raport on hierarhiline %s Tee see lamedaks", - "IncludeRowsWithLowPopulation": "Ebapopulaarsed read on peidetud %s Kuva kõik read", - "Menu": "Menüü", - "PeriodRange": "vahemik", - "PresetDateToday": "Täna", - "PresetDateYesterday": "Eile", - "ReportGeneratedOn": "Raport genereeritud %s", - "ReportGeneratedXAgo": "Raport genereeritud %s tagasi", - "SharePiwikShort": "Matomo! Tasuta ja avatud lähtekoodiga veebianalüütika tarkvara. Andmed on sinu kontrolli all.", - "ShareThis": "Jaga seda", - "ShowJSCode": "Näita sisestatavat JavaScript koodi", - "SkipToContent": "Mine sisu juurde", - "SupportPiwik": "Toeta Matomout!", - "SystemSummaryNWebsites": "%d veebilehte", - "SystemSummaryPhpVersion": "PHP versioon", - "SystemSummaryWidget": "Süsteemi kokkuvõte", - "TableNoData": "Antud tabeli jaoks andmed puuduvad.", - "ThereIsNoDataForThisReport": "Raporti jaoks puuduvad antud perioodis andmed.", - "UnFlattenDataTable": "Antud raport on lame %s Tee see hierarhiliseks", - "ViewAllPiwikVideoTutorials": "Vaata kõiki Matomou video õpetusi", - "WebAnalyticsReports": "Veebi analüüsi raportid", - "YouAreUsingTheLatestVersion": "Kasutad uusimat Matomou versiooni!" - } -} diff --git a/plugins/CoreHome/lang/eu.json b/plugins/CoreHome/lang/eu.json deleted file mode 100644 index 0bffe819094a0ba5f490141e11d86ae253286ec6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/eu.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Iragarki-blokeatzaile bat erabiltzen ari bazara, mesedez desgaitu orri honetan, Matomok arazorik gabe funtzionatzen duela ziurtatzeko.", - "AddTotalsRowDataTable": "Txosten honek ez du guztizko errenkada erakusten %s Erakutsi guztizko errenkada", - "CategoryNoData": "Daturik ez kategoria honetan. Saiatu \"Sartu populazio guztia\" aukerarekin.", - "ChangeCurrentWebsite": "Aukeratu webgune bat, une honetan hautatutako webgunea: %s", - "ChangePeriod": "Aldatu tartea", - "ChangeVisualization": "Aldatu bisualizazioa", - "CheckForUpdates": "Egiaztatu eguneraketarik badagoen", - "CheckPiwikOut": "Probatu Matomo!", - "ChooseWebsite": "Aukeratu webgunea", - "ChooseX": "Aukeratu %1$s", - "ClickRowToExpandOrContract": "Egin klik errenkada honetan azpi-taula zabaldu edo uzkurtzeko.", - "ClickToEditX": "Egin klik %s editatzeko", - "ClickToSeeFullInformation": "Egin klik informazio osoa ikusteko", - "CloseSearch": "Itxi bilaketa", - "CloseWidgetDirections": "Widget hau itxi dezakezu goiko 'X' ikonoan klik eginez.", - "CssDidntLoad": "Zure nabigatzaileak ezin izan du kargatu orri honen estiloa.", - "CustomLimit": "Muga pertsonalizatua", - "DataForThisReportHasBeenDisabled": "Segmentazioa desgaituta dago txosten honentzat. Egiaztatu %1$sMEG hau%2$s xehetasun gehiagorako.", - "DataForThisReportHasBeenPurged": "Txosten honen datuak %s hilabete baino zaharragoak dira eta garbitu egin dira.", - "DataTableCombineDimensions": "Dimentsioak bereizita erakusten dira %s Erakutsi dimentsioak konbinatuta", - "DataTableExcludeAggregateRows": "Agregatutako errenkadak ikusgai daude %s Ezkutatu", - "DataTableHowToSearch": "Sakatu enter edo egin klik bilaketa ikonoan bilatzeko", - "DataTableIncludeAggregateRows": "Agregatutako errenkadak ezkutuan daude %s Erakutsi", - "DataTableShowDimensions": "Dimentsioak konbinatuta daude %s Erakutsi dimentsioak bereizita", - "DateInvalid": "Emandako data eta tarte konbinazioa baliogabea da. Aukeratu baliozko data bat data-hautatzailean.", - "Default": "lehenetsia", - "DevicesSubcategoryHelp": "Gailuak atalak erabiltzaileek zure gunea bisitatzeko erabiltzen duten teknologia ulertzen lagunduko dizu. Gailu mota eta modelo zehatzei buruzko txostenak aurkituko dituzu bertan, zure gunea gailu mota erabilienentzat optimizatu ahal izateko.", - "DonateCall1": "Matomo beti doan erabili ahal izango duzu, baina horrek ez du esan nahi garatzeak kosturik ez duenik.", - "DonateCall2": "Matomok zure etengabeko babesa behar du hazi eta aurrera egiteko.", - "DonateCall3": "Matomok zure negozio edo proiektuari balio esanguratsua eman diola iruditzen bazaizu, %1$smesedez kontuan izan dohaintza egiteko aukera%2$s edo %3$spremium ezaugarri bat erostea%4$s. Ekarpen txikienak ere lagungarriak dira.", - "EndDate": "Bukaera data", - "EndShortcut": "Amaiera", - "EngagementSubcategoryHelp1": "Atxikimendua ataleko txostenak lagungarriak dira lortzen dituzun bisitari berriak eta itzultzen direnak kuantifikatzeko. Bisitako batez besteko denbora eta orri kopurua ere berrikusi ditzakezu, baita bisitari bat zure gunean zenbat aldiz izan den eta bisiten arteko egun kopuru ohikoena ere.", - "EngagementSubcategoryHelp2": "Hau lagungarria izan daiteke zure irismena handitzeaz gain, maiztasun eta interakzio altuko bisitak optimizatzeko.", - "EnterZenMode": "Ezarri Zen modua (ezkutatu menuak)", - "ExceptionNotAllowlistedIP": "Ezin duzu Matomo hau erabili, zure %s IPa ez delako onartzen.", - "ExcludeRowsWithLowPopulation": "Errenkada guztiak ikusgai daude %s Baztertu populazio txikikoak", - "ExitZenMode": "Irten Zen modutik (erakutsi menuak)", - "ExpandSubtables": "Zabaldu azpi-taulak", - "ExportFormat": "Esportatu formatua", - "ExportTooltip": "Oharra: Sortutako esportazio URLa erabiltzeko aplikazioaren baimen-token bat zehaztu beharko duzu. Token horiek konfiguratzeko: Administrazioa → Segurtasuna → Baimen-tokenak.", - "ExportTooltipWithLink": "Oharra: Sortutako esportazio URLa erabiltzeko, aplikazio token baimen bat zehaztu beharko duzu. Token horiek konfiguratzeko joan %1$s[Admin → Segurtasuna → Baimen tokenak]%2$s. Ordezkatu %3$s esportazio URLan zure baimen tokenarekin. Abisua: Inoiz ez partekatu benetako tokena duen URLa inorekin.", - "ExternalHelp": "Laguntza (fitxa berri batean irekitzen da)", - "FlattenDataTable": "Txostena hierarkikoa da %s Lautu", - "FlattenReport": "Lautu txostena", - "FormatMetrics": "Eman formatua metrikei", - "HideExportUrl": "Ezkutatu esportatzeko URLa", - "HomeShortcut": "Hasiera", - "IncludeRowsWithLowPopulation": "Populazio txikiko errenkadak ezkutuan daude %s Erakutsi errenkada guztiak", - "InjectedHostEmailBody": "Kaixo, Matomora sartzen saiatu naiz gaur eta ostalari ezezaguna abisua agertu zait.", - "InjectedHostEmailSubject": "Matomo ostalari-izen ezezagun batetik atzitu da: %s", - "InjectedHostNonSuperUserWarning": "%1$sEgin klik hemen Matomora modu seguruan sartu%2$s eta ohar hau kentzeko. Nahi baduzu zure Matomo administratzailearekin harremanetan jar zaitezke eta arazoaren berri eman (%3$segin klik hemen e-posta bidaltzeko%4$s).", - "InjectedHostSuperUserWarning": "Matomo gaizki konfiguratuta egon daiteke, adibidez, Matomo zerbitzari edo URL berri batera pasa delako azkenaldian. Hemen %1$sklik egin dezakezu eta %2$s gehitu baliozko Matomo ostalari-izen bezala, fidagarria iruditzen bazaizu%3$s, edo hemen %4$sklik egin eta %5$s(e)ra joan Matomora modu seguruan sartzeko%6$s.", - "InjectedHostWarningIntro": "Matomora %1$s(e)tik sartu zara, baina Matomo beste helbide honetan exekutatzeko konfiguratua dago: %2$s.", - "JavascriptDisabled": "JavaScript-ek gaituta egon behar du Matomo ikuspegi estandarrean erabiltzeko.
Badirudi ordea JavaScript desgaituta dagoela edo zure nabigatzaileak ez duela onartzen.
Ikuspegi estandarra erabiltzeako, gaitu JavaScript zure nabigatzailearen aukeretan eta ondoren %1$ssaiatu berriro%2$s.
", - "JsDidntLoad": "Zure nabigatzaileak ezin izan ditu kargatu orri honen script-ak.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Zure pribatutasuna errespetatzen duen analitika plataforma ireki liderra.", - "MacPageDown": "Fn + eskuinera gezia", - "MacPageUp": "Fn + ezkerrera gezia", - "MainNavigation": "Nabigazio nagusia", - "Menu": "Menua", - "MenuEntries": "Menuko sarrerak", - "NoPrivilegesAskPiwikAdmin": "'%1$s' bezala saioa hasita zaude, baina dirudienez ez daukazu inongo baimenik ezarrita Matomon. %2$s Eskatu zure Matomo administratzaileari (egin klik e-posta bidaltzeko)%3$s webgune batean 'ikusi' baimena emateko.", - "NoSuchPage": "Orrialde hau ez da existitzen", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Klik bateko eguneratzea ez dago erabilgarri Matomo hainbat zerbitzarirekin erabiltzen ari bazara. Mesedez deskargatu azken bertsioa jarraitzeko: %1$s.", - "OnlyForSuperUserAccess": "Widget hau super erabiltzaile sarbidea dutenei soilik bistaratzen zaie panel lehenetsian.", - "PageDownShortcutDescription": "orriaren beheko aldera iristeko", - "PageUpShortcutDescription": "orriaren goiko aldera iristeko", - "PeriodHasOnlyRawData": "Dirudienez epe honetako txostenak ez dira prozesatu oraindik. Orain zer gertatzen ari den ikusi nahi duzu? Begiratu %1$sBisiten egunkaria%2$s edo aukeratu beste denbora-epe bat txostenak sortu bitartean.", - "PeriodRange": "Tartea", - "PivotBySubtable": "Txosten hau ez dago pibotatuta %1$s Pibotatu %2$s erabiliz", - "PresetDateToday": "Gaur", - "PresetDateYesterday": "Atzo", - "Profilable": "Errentagarria", - "QuickAccessTitle": "Bilatu %s. Erabili gako-teklak bilaketaren emaitzetan nabigatzeko. Lasterbidea: Sakatu 'f' bilatzeko.", - "QuickLinks": "Esteka azkarrak", - "ReadMoreOnlineGuide": "Irakurri gehiago honi buruz online gidan.", - "RemoveTotalsRowDataTable": "Txostenak guztizko errenkada erakusten du %s Kendu guztizko errenkada", - "ReportGeneratedOn": "Txostenaren sortze-data: %s", - "ReportGeneratedXAgo": "Txostena duela %s sortuta", - "ReportLowercase": "txosten", - "ReportType": "Txosten-mota", - "ReportWithMetadata": "Metadatudun txostena", - "ReportingCategoryHelpPrefix": "Zertan lagun nazake \"%1$s\" → %2$s\" txostenen orriak?", - "RowLimit": "Lerro muga", - "SearchOnMatomo": "Bilatu '%1$s' Matomo.org-en", - "SeeAvailableVersions": "Ikusi eskuragarri dauden bertsioak", - "Segments": "Segmentuak", - "SharePiwikLong": "Aupa! Software libreko tresna bikain bat aurkitu berri dut: Matomo!\n\nMatomorekin zure webguneko bisitarien jarraipena egin dezakezu, doan. Probatzea gomendatzen dizut!", - "SharePiwikShort": "Matomo! Web analitika doako eta libreak. Izan zaitez zure datuen jabe.", - "ShareThis": "Partekatu hau", - "ShortcutCalendar": "egutegia irekitzeko (d-k data esan nahi du)", - "ShortcutHelp": "laguntza hau erakusteko", - "ShortcutRefresh": "edukia berriz kargatzeko", - "ShortcutSearch": "bilaketa irekitzeko (f-k find, bilatu ingelesez, esan nahi du)", - "ShortcutSegmentSelector": "Segmentu-hautatzailea irekitzeko", - "ShortcutWebsiteSelector": "webgune-hautatzailea irekitzeko", - "ShortcutZenMode": "Zen modurako", - "ShortcutsAvailable": "Lasterbide erabilgarriak", - "ShowExportUrl": "Erakutsi esportatzeko URLa", - "ShowJSCode": "Erakutsi txertatu beharreko JavaScript kodea", - "SkipToContent": "Saltatu edukira", - "SoftwareSubcategoryHelp": "Softwarea atalak erabiltzaileek zure gunea bisitatzeko erabiltzen dituzten sistema eragileak, nabigatzaileak eta pluginak erakusten dizkizu. Zure gunea konfigurazio erabilienekin guztiz bateragarria dela ziurtatzeko optimizatu ahal izateko.", - "StandardReport": "Txosten estandarra", - "StartDate": "Hasiera data", - "SubscribeAndBecomePiwikSupporter": "Joan kreditu txartel bidezko ordainketa orri seguru batera (Paypal) Matomoren babesle bihurtzeko!", - "SupportPiwik": "Babestu Matomo!", - "SupportUsOn": "Babes gaitzazu hemen:", - "SystemSummaryMysqlVersion": "MySQL bertsioa", - "SystemSummaryNActivatedPlugins": "Aktibatutako %d plugin", - "SystemSummaryNSegments": "%1$d segmentu", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentu (%2$s aurre-prozesatuta, %3$s denbora errealean prozesatuta)", - "SystemSummaryNWebsites": "%d webgune", - "SystemSummaryPhpVersion": "PHP bertsioa", - "SystemSummaryPiwikVersion": "Matomo bertsioa", - "SystemSummaryWidget": "Sistemaren laburpena", - "TableNoData": "Daturik ez taula honetarako.", - "TechDeprecationWarning": "Matomoren %1$s bertsiotik aurrera, Matomok %2$s(r)i euskarria emateari utziko dio. Informazio gehiagorako %3$sikusi gure blog bidalketa.%4$s", - "ThanksFromAllOfUs": "Eskerrik asko Matomoko guztion partetik!", - "ThereIsNoDataForThisReport": "Ez dago daturik txosten honentzat.", - "UnFlattenDataTable": "Txostena laua da %s Bihurtu hierarkiko", - "UndoPivotBySubtable": "Txosten hau pibotatuta dago %s Desegin pibotatzea", - "ViewAllPiwikVideoTutorials": "Ikusi Matomoren bideo-tutorial guztiak", - "VisitStatusOrdered": "Eskaera eginda", - "VisitStatusOrderedThenAbandoned": "Eskaera eginda, ondoren saskia utzita", - "VisitTypeReturning": "Itzultzen dena", - "VisitTypeReturningCustomer": "Itzultzen den bezeroa", - "VisitorsCategoryHelp1": "Bisitarien orrian zure bisitariak nor diren jakin dezakezu. Nondik datozen bisitariak, zein gailu eta nabigatzaile erabiltzen dituzten, eta noiz bisitatzen duten nagusiki zure webgunea. Agregatuan zure audientzia nor den uler dezakezu, eta kasu bereziak bilatu, zure audientzia handitzeko moduak aurkitzeko.", - "VisitorsCategoryHelp2": "Zure bisitariei buruzko informazio orokorraz gain, %1$sBisitarien egunkaria%2$s ere erabil dezakezu bisita bakoitzean zer gertatu zen ikusteko.", - "VisitorsOverviewHelp": "Bisiten ikuspegi orokorrak zure gunearen arrakasta ulertzen lagun zaitzake. Horretarako hautatutako epean zure guena jasotako bisita kopuruak erakusten dituzten grafikoak eskaintzen dizkizu, baita bilaketak eta deskargak bezalako ezaugarri gakoen atxikimendu mailaren batezbestekoa ere.", - "WebAnalyticsReports": "Web analitika txostenak", - "YouAreUsingTheLatestVersion": "Matomoren azken bertsioa erabiltzen ari zara!", - "YourDonationWillHelp": "Zure dohaintzak kode irekiko analitika plataforma honen ezaugarri berrien eta hobekuntzen garapenean lagunduko du. Honek esan nahi du komunitateak beti lortuko duela onura pribatutasuna babestu eta zure datuen kontrola edukitzeko aukera ematen dizun tresnatik." - } -} diff --git a/plugins/CoreHome/lang/fa.json b/plugins/CoreHome/lang/fa.json deleted file mode 100644 index cf6373bb3a267256b7e5d93fc0be69b0bbdd659c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/fa.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "CoreHome": { - "AddTotalsRowDataTable": "این گزارش مجموع ردیف‌ها را نمایش نمی‌دهد %s نمایش دهید", - "CategoryNoData": "داده ها در این رده نیستند.سعی کنید به \"همه جامعه\" گسترش بدهید.", - "ChangePeriod": "تغییر بازه", - "ChangeVisualization": "تغییر تصویرسازی", - "CheckForUpdates": "بررسی برای بروزرسانی", - "CheckPiwikOut": "پیویک را بررسی کنید!", - "ChooseWebsite": "انتخاب وب سایت", - "ChooseX": "انتخاب %1$s", - "ClickRowToExpandOrContract": "روی این ردیف کلیک کنید تا زیرمجموعه را باز یا بسته کنید.", - "ClickToEditX": "برای ویرایش %s کلیک کنید", - "ClickToSeeFullInformation": "برای مشاهده‌ی همه‌‌ی اطلاعات کلیک کنید", - "CloseSearch": "بستن جستجو", - "CloseWidgetDirections": "شما میتونید این ویجت را با کلیک بر روی ایکن 'X' در بالا ببندید.", - "DataForThisReportHasBeenPurged": "داده های این گزارش از %s ماه قدیمی تر است و از سیستم پاک شده است.", - "DataTableExcludeAggregateRows": "مجموع ردیف ها نمایش داده شده است %s انها را پنهان کنید .", - "DataTableHowToSearch": "برای جستجو، اینتر زده یا روی آیکون جستجو کلیک کنید", - "DataTableIncludeAggregateRows": "مجموع ردیف ها پنهان است %s انها را نمایش دهید .", - "Default": "پیش فرض", - "DonateCall1": "استفاده از پیویک هیچگاه هزینه ای برای شما نخواهد داشت ، اما این به این معنا نیست که ما هم برای تولید آن هزینه ای نمی کنیم.", - "DonateCall2": "پیویک به حمایت همیشگی شما برای رشد و پیشرفت نیاز دارد.", - "DonateCall3": "اگر احساس می‌کنید که Matomo به تجارت یا فعالیت شما ارزش قابل توجهی افزوده، %1$sلطفا به ما کمک کنید%2$s یا %3$sویژگی‌های خاص را خریداری کنید%4$s. کوچکترین کمک شما ارزشمند است.", - "EndDate": "تاریخ پایان", - "EndShortcut": "پایان", - "EnterZenMode": "ورود به حالت ذن (مخفی کردن منوها)", - "ExcludeRowsWithLowPopulation": "تمام ردیف ها نمایش داده شده اند %s انها را ببندید", - "ExitZenMode": "خروج از حالت ذن (نمایش منوها)", - "ExternalHelp": "راهنما (در tab جدید)", - "FlattenDataTable": "این گزارش سلسله مراتبی است %sآن را مسطح کن", - "FormatMetrics": "معیارهای فرمت", - "HideExportUrl": "مخفی کردن آدرس خروجی", - "HomeShortcut": "خانه", - "IncludeRowsWithLowPopulation": "ردیف ها با جمعیت کم نمایش داده نمیشوند %s نمایش تمام ردیف ها", - "InjectedHostEmailBody": "درود، من امروز برای دسترسی به پیویک تلاش کردم و هشدار نام هاست نامشخص را دریافت کردم.", - "InjectedHostEmailSubject": "دسترسی به پیویک توسط یک میزبان ناشناخته انجام شده است: %s", - "InjectedHostNonSuperUserWarning": "%1$sبرای دسترسی ایمن به Matomo اینجا را کلیک کنید%2$s و این اخطار را پاک کنید. ممکن است نیاز به تماس با مدیریت Matomo خود و اطلاع از این مشکل را داشته باشید (%3$sبرای ارسال ایمیل کلیک کنید%4$s).", - "InjectedHostSuperUserWarning": "Matomo به درستی پیکربندی نشده است (به طور مثال ممکن است اخیرا Matomo به سرور یا آدرس جدید منتقل شده باشد). شما می‌توانید برای افزودن به عنوان میزبان Matomo معتبر (در صورت اطمینان) %1$sاینجا را کلیک کرده%2$s%3$s، یا %4$sاینجا را کلیک کنید%5$s تا به Matomo به صورت ایمن دسترسی پیدا کنید%6$s.", - "InjectedHostWarningIntro": "شما در حال حاضر از %1$s به Matomo دسترسی دارید اما Matomo تنظیم شده تا از این آدرس اجرا شود: %2$s.", - "JavascriptDisabled": "برای استفاده از Matomo در نمای استاندارد، JavaScript باید فعال باشد.
هرچند به نظر می‌رسد که JavaScript فعال نیست یا توسط مرورگر شما پشتیبانی نمی‌شود.
برای استفاده از نمای استاندارد، با تغییر تنظیمات مرورگر خود JavaScript را فعال کرده و %1$sدوباره تلاش کنید%2$s.
", - "MainNavigation": "مسیریابی اصلی", - "Menu": "منو", - "NoPrivilegesAskPiwikAdmin": "شما به عنوان %1$s وارد شده اید , اما به نظر می رسد که شما اجازه دسترسی به هیچ بخشی از پیویک را ندارید. %2$s از مدیریت پیویک تان بخواهید (برای ارسال ایمیل کلیک کنید)%3$s تا به شما دسترسی \\\"مشاهده\\\" یک وبسایت را بدهد.", - "NoSuchPage": "این صفحه وجود ندارد", - "OnlyForSuperUserAccess": "این ابزارک در داشبورد پیشفرض تنها برای کاربران با دسترسی مدیر ارشد نمایش می‌یابد.", - "PageDownShortcutDescription": "برای رفتن به انتهای صفحه", - "PageUpShortcutDescription": "برای رفتن به ابتدای صفحه", - "PeriodRange": "بازه", - "PivotBySubtable": "این گزارش نچرخیده است %1$s انجام دهید %2$s", - "PresetDateToday": "امروز", - "PresetDateYesterday": "دیروز", - "RemoveTotalsRowDataTable": "این گزارش مجموع ردیف‌ها را نمایش می‌دهد %s حذف کنید", - "ReportGeneratedOn": "گزارش تولید شده است در %s", - "ReportGeneratedXAgo": "گزارش %s قبل تولید شده است", - "ReportLowercase": "گزارش", - "SharePiwikLong": "سلام! من تازه یک نرم‌افزار رایگان عالی پیدا کردم: Matomo!\n\nMatomo به شما اجازه‌ی ردیابی بازدیدکنندگان وبسایت شما را به صورت رایگان می‌دهد. حتما بررسی کنید!", - "ShareThis": "این را به اشتراک بگذارید", - "ShortcutCalendar": "برای باز کردن تقویم (d به معنای تاریخ)", - "ShortcutHelp": "برای نمایش این کمک", - "ShortcutSearch": "برای باز کردن جستجو (f برای یافتن)", - "ShortcutSegmentSelector": "برای بازکردن انتخابگر بخش", - "ShortcutWebsiteSelector": "برای باز کردن انتخابگر وبسایت", - "ShortcutZenMode": "برای حالت ذن", - "ShortcutsAvailable": "میانبرهای در دسترس", - "ShowExportUrl": "نمایش آدرس خروجی", - "ShowJSCode": "نمایش کد جاوا اسکریپت برای اضافه نمودن", - "SkipToContent": "پرش به محتوا", - "StartDate": "تاریخ شروع", - "SubscribeAndBecomePiwikSupporter": "در حال پردازش کریدیت کارت برای اتصال امن به درگاه پرداخت. پیویک از پی پال هم ساپورت میکند.", - "SupportPiwik": "ازپیویک حمایت کنید!", - "SystemSummaryMysqlVersion": "نسخه‌ی MySQL", - "SystemSummaryNWebsites": "%d وبسایت", - "SystemSummaryPhpVersion": "نسخه‌ی PHP", - "SystemSummaryPiwikVersion": "نسخه‌ی Matomo", - "SystemSummaryWidget": "خلاصه سیستم", - "TableNoData": "اطلاعاتی برای این جدول وجود ندارد.", - "ThereIsNoDataForThisReport": "اطلاعاتی برای این گزارش موجود نیست.", - "UnFlattenDataTable": "این گزارش مسطح است %s آن را سلسله مراتبی کن", - "UndoPivotBySubtable": "این گزارش چرخیده است %s برگردانید", - "ViewAllPiwikVideoTutorials": "تمام ویدئوهای آموزشی پیویک را ببینید", - "VisitStatusOrdered": "سفارش داده شده", - "VisitStatusOrderedThenAbandoned": "سفارش داده و سبد خرید رها شده", - "VisitTypeReturning": "برگشتی", - "VisitTypeReturningCustomer": "مشتری برگشتی", - "WebAnalyticsReports": "گزارش اطلاعات آماری وب", - "YouAreUsingTheLatestVersion": "شما در حال استفاده از آخرین ویرایش پیویک هستید!" - } -} diff --git a/plugins/CoreHome/lang/fi.json b/plugins/CoreHome/lang/fi.json deleted file mode 100644 index dadceb826b3b314295075902fc3a1ba749f7ee8e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/fi.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Jos käytät mainostenestoa (ad blocker), poista se käytöstä tällä sivulla, jotta Matomo toimii ongelmitta.", - "AddTotalsRowDataTable": "Tämä raportti ei näytä yhtenvetoriviä %s Näytä yhteenvetorivi", - "CategoryNoData": "Tässä kategoriassa ei ole tietoja. Kokeile linkkiä \"Kaikki esiintymät\".", - "ChangeCurrentWebsite": "Valitse sivusto, nyt valittuna %s", - "ChangePeriod": "Vaihda aikaväliä", - "ChangeVisualization": "Vaihda visualisaatio", - "CheckForUpdates": "Tarkista päivitykset", - "CheckPiwikOut": "Tutustu Matomoon!", - "ChooseWebsite": "Valitse sivusto", - "ChooseX": "Valitse %1$s", - "ClickRowToExpandOrContract": "Klikkaa tätä riviä avataksesi tai sulkeaksesi alataulukon.", - "ClickToEditX": "Muokkaa %s klikkaamalla", - "ClickToSeeFullInformation": "Klikkaa nähdäksesi lisätietoja", - "CloseSearch": "Sulje haku", - "CloseWidgetDirections": "Voit sulkea tämän vimpaimen napsauttamalla vimpaimen yläosassa olevaa X-kuvaketta.", - "CssDidntLoad": "Selaimesi ei saanut ladattua tämän sivun tyyliä.", - "CustomLimit": "Muokattu rajaus", - "DataForThisReportHasBeenPurged": "Tämän raportin data on yli %s kuukautta vanhaa ja on poistettu.", - "DataTableExcludeAggregateRows": "Yhdistetyt rivit ovat näkyvillä %s Piilota", - "DataTableHowToSearch": "Hae painamalla enter tai klikkaamalla hakukuvaketta", - "DataTableIncludeAggregateRows": "Yhdistetyt rivit on piilotettu %s Näytä", - "Default": "oletus", - "DonateCall1": "Matomo on sinulle aina ilmainen, mutta tämä ei tarkoita sitä, että sen luominen olisi ilmaista meille.", - "DonateCall2": "Matomo tarvitsee sinun tukeasi kasvaakseen ja menestyäkseen.", - "DonateCall3": "Jos Matomosta on ollut merkittävää hyötyä liiketoiminnallesi, %1$sharkitse lahjoittamista%2$s tai %3$spremium-toimintojen ostamista%4$s. Jokainen euro auttaa.", - "EndDate": "Lopetuspäivä", - "EndShortcut": "Loppuun", - "EnterZenMode": "Siirry Zen-tilaan (piilota valikot)", - "ExceptionNotAllowlistedIP": "Et voi käyttää tätä Matomo-instanssia, koska IP-osoitteesi %s ei ole sallittu.", - "ExcludeRowsWithLowPopulation": "Kaikki rivit näytetään %s Piilota vajaat rivit", - "ExitZenMode": "Poistu Zen-tilasta (näytä valikot)", - "ExpandSubtables": "Avaa alataulut", - "ExportFormat": "Vientimuoto", - "ExternalHelp": "Apua (aukeaa uudessa ikkunassa)", - "FlattenDataTable": "Tämä raportti on hierarkinen %s Muuta tasaiseksi", - "FlattenReport": "Litistä raportti", - "FormatMetrics": "Muotoile mittarit", - "HideExportUrl": "Piilota vienti-URL", - "HomeShortcut": "Alkuun", - "IncludeRowsWithLowPopulation": "Vajaat rivit on piilotettu %s Näytä kaikki rivit", - "InjectedHostEmailBody": "Hei, yritin käyttää tänään Matomoa ja sain varoituksen tuntemattomasta isäntänimestä.", - "InjectedHostEmailSubject": "Matomoon otettiin yhteyttä tuntemattomalla isäntänimellä: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlikkaa tästä avataksesi Matomo turvallisesti%2$s ja poistaaksesi tämä varoitus. Voit myös ottaa yhteyttä Matomon ylläpitäjään ja ilmoittaa ongelmasta (%3$sklikkaa tästä lähettääksesi sähköpostia%4$s).", - "InjectedHostSuperUserWarning": "Matomo saattaa olla väärin asennettu (esim. jos Matomo on hiljattain siirretty uuteen serveriin tai URL:ään). Voit joko %1$sklikata tästä ja lisätä %2$s ja lisätä päteväksi Matomo isäntänimeksi (jos luotat siihen)%3$s, tai %4$sklikata tästä ja %5$s siirtyäksesi Matomoon turvallisesti%6$s.", - "InjectedHostWarningIntro": "Käytät Matomoa osoitteesta %1$s, mutta Matomo on konfiguroitu ajettavaksi tässä osoitteessa: %2$s.", - "JavascriptDisabled": "JavaScriptin on oltava käytössä, jotta voit käyttää Matomoa vakionäkymässä.
Näyttää kuitenkin, että JavaScript on joko poissa käytöstä tai selaimesi ei tue sitä.
Vakionäkymän käyttäämiseksi, ota JavaScript käyttöön muuttamalla selaimesi asetuksia. , sitten %1$syritä uudelleen%2$s.
", - "JsDidntLoad": "Selaimesi ei saanut ladattua tämän sivun skriptejä.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Johtava avoimen lähdekoodin analytiikka-alusta, joka kunnioittaa yksityisyyttäsi.", - "MacPageDown": "Fn + Nuoli oikealle", - "MacPageUp": "Fn + Nuoli vasemmalle", - "MainNavigation": "Päänavigointi", - "Menu": "Valikko", - "MenuEntries": "Valikon sisältö", - "NoPrivilegesAskPiwikAdmin": "Olet kirjautuneena sisään käyttäjänä '%1$s', mutta sinulla ei ole mitään oikeuksia Matomoon. %2$sPyydä Matomon ylläpitäjää (napsauta avataksesi sähköpostin)%3$s antamaan katseluoikeudet verkkosivustoon.", - "NoSuchPage": "Tätä sivua ei ole olemassa", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Yhden klikkauksen päivitys ei ole saatavilla, sillä Matomoasi ajetaan useilla palvelimilla. Lataa uusin versio jatkaaksesi: %1$s", - "OnlyForSuperUserAccess": "Tämä vimpain näkyy ainoastaan käyttäjille, joilla on superkäyttäjän oikeudet.", - "PageDownShortcutDescription": "päästäksesi sivun loppuun", - "PageUpShortcutDescription": "päästäksesi sivun alkuun", - "PeriodRange": "Alue", - "PivotBySubtable": "Tämä raportti ei ole käännetty %1$s:n mukaan. Käännetty %2$s:llä.", - "PresetDateToday": "Tänään", - "PresetDateYesterday": "Eilen", - "QuickAccessTitle": "Hae %s:llä. Käytä nuolia navigointiin. Oikotie: haku aukeaa painamalla f-näppäintä.", - "QuickLinks": "Pikalinkit", - "ReadMoreOnlineGuide": "Lue lisää tästä aiheesta verkko-oppaasta.", - "RemoveTotalsRowDataTable": "Tämä raportti näyttää yhteenvetorivin%sPoista yhteenvetorivi", - "ReportGeneratedOn": "Raportti luotu %s", - "ReportGeneratedXAgo": "Raportti luotu %s sitten", - "ReportLowercase": "raportti", - "ReportType": "Raportin tyyppi", - "ReportWithMetadata": "Raportti metadatan kera", - "RowLimit": "Rivejä", - "SearchOnMatomo": "Hae '%1$s' Matomo.orgista", - "SeeAvailableVersions": "Näytä saatavilla olevat versiot", - "Segments": "Segmentit", - "SharePiwikLong": "Hei! Löysin juuri hienon vapaan ohjelmiston: Matomon!\n\nMatomolla voit seurata verkkosivustosi vierailijoita ilmaiseksi. Kannattaa tutustua!", - "SharePiwikShort": "Matomo! Vapaa ja avoimen lähdekoodin verkkoanalyysi. Hallitse omaa dataasi.", - "ShareThis": "Jaa tämä", - "ShortcutCalendar": "kalenterin avaamiselle", - "ShortcutHelp": "tälle ohjeelle", - "ShortcutSearch": "haulle", - "ShortcutSegmentSelector": "segmentin valinnalle", - "ShortcutWebsiteSelector": "verkkosivun valinnalle", - "ShortcutZenMode": "Zen-tila", - "ShortcutsAvailable": "Saatavilla olevat oikotiet", - "ShowExportUrl": "Näytä vienti-URL", - "ShowJSCode": "Näytä lisättävä Javascript-koodi", - "SkipToContent": "Siirry sisältöön", - "StandardReport": "Standardiraportti", - "StartDate": "Aloituspäivä", - "SubscribeAndBecomePiwikSupporter": "Jatka turvalliselle luottokorttimaksusivulle (Paypal) ryhtyäksesi Matomon tukijaksi!", - "SupportPiwik": "Tue Matomoa!", - "SupportUsOn": "Tue meitä", - "SystemSummaryMysqlVersion": "MySQL-versio", - "SystemSummaryNActivatedPlugins": "%d lisäosaa käytössä", - "SystemSummaryNWebsites": "%d verkkosivustoa", - "SystemSummaryPhpVersion": "PHP-versio", - "SystemSummaryPiwikVersion": "Matomo-versio", - "SystemSummaryWidget": "Järjestelmän yhteenveto", - "TableNoData": "Ei tietoja tässä taulukossa", - "ThanksFromAllOfUs": "Kiitos meiltä kaikilta matomalaisilta!", - "ThereIsNoDataForThisReport": "Tähän raporttiin ei ole tietoja.", - "UnFlattenDataTable": "Tämä raportti on tasainen %s Muuta hierarkiseksi", - "UndoPivotBySubtable": "Tämä raportti on käännetty %s:llä. Kumoa kääntö", - "ViewAllPiwikVideoTutorials": "Näytä kaikki Matomon videokurssit", - "VisitStatusOrdered": "Ostettu", - "VisitStatusOrderedThenAbandoned": "Ostettu, sitten hylätty ostoskori", - "VisitTypeReturning": "Palaava", - "VisitTypeReturningCustomer": "Palaava asiakas", - "WebAnalyticsReports": "Raportit", - "YouAreUsingTheLatestVersion": "Käytössäsi on Matomon uusin versio!" - } -} diff --git a/plugins/CoreHome/lang/fr.json b/plugins/CoreHome/lang/fr.json deleted file mode 100644 index 10b0963e0bcf78b90bdba1f966bfb1091a59d4e1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/fr.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Aperçus IA", - "AdblockIsMaybeUsed": "Dans le cas où vous utiliseriez un bloqueur de publicités, veuillez le désactiver pour ce site afin de vous assurer que Matomo fonctionne correctement.", - "AddTotalsRowDataTable": "Le rapport n'affiche pas la ligne des totaux %s Afficher la ligne des totaux", - "CategoryNoData": "Aucune donnée pour cette catégorie. Essayez \"d'inclure toute la population\".", - "ChangeCurrentWebsite": "Choisir un site web, site couramment sélectionné : %s", - "ChangePeriod": "Modifier la période", - "ChangeVisualization": "Changer la visualisation", - "CheckForUpdates": "Vérifier les mises à jour", - "CheckPiwikOut": "Vérifiez sur Matomo !", - "ChooseWebsite": "Choisir un site", - "ChooseX": "Choisir %1$s", - "ClickRowToExpandOrContract": "Cliquez sur cette rangée pour afficher ou masquer le sous-tableau.", - "ClickToEditX": "Cliquer pour éditer %s", - "ClickToSeeFullInformation": "Cliquer pour voir le détail de l'information", - "CloseSearch": "Recherche précise", - "CloseWidgetDirections": "Vous pouvez fermer ce gadget en cliquant sur l'icône en forme de \"X\" en haut du gadget.", - "CopyModalNote": "%1$sRemarque :%2$s Le %3$s copié peut nécessiter des ajustements s’il contient des références propres au site web d’origine. Vérifiez les paramètres afin de garantir la compatibilité.", - "CopyX": "Copier %1$s", - "CopyXDescription": "Sélectionnez le site web vers lequel copier ce %1$s. Cela créera une copie exacte, y compris les paramètres, dans le site choisi.", - "CssDidntLoad": "Votre navigateur n'a pas été en mesure de charger le style de la page.", - "CustomLimit": "Limite personnalisée", - "DataForThisReportHasBeenDisabled": "La segmentation est actuellement désactivée pour ce rapport. Veuillez consulter %1$sthis FAQ%2$s pour plus de détails.", - "DataForThisReportHasBeenPurged": "Les données pour ce rapport ont plus de %s mois et ont été purgées.", - "DataTableCombineDimensions": "Les dimensions sont affichées séparément %s Combiner les dimensions", - "DataTableExcludeAggregateRows": "Les lignes agrégées sont affichées %s Les cacher", - "DataTableHowToSearch": "Appuyez sur Entrée ou cliquez sur l'icône pour rechercher", - "DataTableIncludeAggregateRows": "Les lignes agrégées sont cachées %s Les afficher", - "DataTableShowDimensions": "Les dimensions sont combinées %sAfficher les dimensions séparément", - "DateInvalid": "La combinaison date et période n'est pas valable. Veuillez choisir une date valide dans le sélecteur de date.", - "Default": "par défaut", - "DevicesSubcategoryHelp": "La page \"Périphériques\" vous aide à comprendre avec quelle technologie vos visiteurs accèdent à votre site. Vous trouverez des rapports sur les types de périphériques et modèles pour vous permettre d'optimiser votre site aux configurations les plus utilisées.", - "DonateCall1": "Matomo ne vous coûtera jamais rien à utiliser, mais cela ne veut pas dire que ça ne nous coûte rien pour le réaliser.", - "DonateCall2": "Matomo a besoin de votre support pour continuer croître et prospérer.", - "DonateCall3": "Si vous pensez que Matomo a ajouté une valeur significative à votre entreprise ou projet, %1$spensez à faire un don%2$s ou %3$sachetez des fonctionnalités premium%4$s. Chaque centime sera le bienvenu.", - "EndDate": "Date de fin", - "EndShortcut": "Fin", - "EngagementSubcategoryHelp1": "La page \"Engagement\" fournit des rapports pour quantifier la part des nouveaux visiteurs et des visiteurs connus. Vous pouvez également consulter les rapports qui ventilent la durée moyenne et le nombre de pages par visite, ainsi que le nombre de fois qu'un visiteur est venu sur votre site et le nombre de jours le plus fréquent entre deux visites.", - "EngagementSubcategoryHelp2": "Cela peut vous aider à optimiser la fréquence et l'interaction des visites, tout en maximisant votre portée.", - "EnterZenMode": "Passer en mode Zen (masquer les menus)", - "ExceptionNotAllowlistedIP": "Vous ne pouvez pas utiliser Matomo car votre adresse IP %s n'est pas autorisée.", - "ExcludeRowsWithLowPopulation": "Toutes les lignes sont affichées %s Exclure celles peu signifiantes", - "ExitZenMode": "Quitter le mode Zen (afficher les menus)", - "ExpandSubtables": "Élargir les sous-tables", - "ExportFormat": "Format d'export", - "ExportTooltip": "Remarque : pour utiliser l'URL d'exportation générée, vous devrez spécifier un jeton d'authentification d'application. Vous pouvez configurer ces jetons dans Administration → Sécurité → Jetons d'authentification.", - "ExportTooltipWithLink": "Remarque : pour utiliser l'URL d'exportation générée, vous devrez spécifier un jeton d'authentification d'application. Vous pouvez configurer ces jetons dans %1$s[Administration → Sécurité → Jetons d'authentification]%2$s. Remplacez %3$s dans l'URL d'exportation par votre jeton d'authentification. Avertissement : Ne partagez jamais cette URL contenant le jeton réel avec quelqu'un d'autre.", - "ExternalHelp": "Aide (nouvel onglet)", - "FlattenDataTable": "Le rapport est hiérarchique %s L'aplatir", - "FlattenReport": "Aplatir le rapport", - "FormatMetrics": "Format des métriques", - "HideExportUrl": "Masquer l'URL d'export", - "HomeShortcut": "Accueil", - "IncludeDimensionsSeparately": "Inclure les dimensions séparément", - "IncludeRowsWithLowPopulation": "Les lignes peu signifiantes sont cachées %s Afficher toutes les lignes", - "InjectedHostEmailBody": "Bonjour, j'ai essayé d'accéder à Matomo aujourd'hui et j'ai rencontré l'avertissement de nom d'hôte inconnu.", - "InjectedHostEmailSubject": "On a accédé à Matomo avec un nom d'hôte inconnu : %s", - "InjectedHostNonSuperUserWarning": "%1$sCliquez ici pour accéder à Matomo de manière sécurisé%2$s et supprimer cette alerte. Vous pouvez aussi contacter votre administrateur Matomo and l'avertir de ce problème (%3$sCliquez ici pour envoyer un message%4$s).", - "InjectedHostSuperUserWarning": "Matomo est probablement mal configuré (par exemple, si Matomo a récemment été déplacé vers un nouveau serveur ou une nouvelle URL). Vous pouvez ou %1$scliquer ici et l'ajouter %2$s en tant que nom d'hôte Matomo valide (si vous lui faites confiance)%3$s, ou %4$s cliquer ici et accéder %5$s à Matomo de manière sécurisée%6$s.", - "InjectedHostWarningIntro": "Vous accédez maintenant à Matomo depuis %1$s, mais Matomo a été configuré pour s'exécuter à cette adresse : %2$s.", - "InvalidComparisonDateRange": "Entrez une plage de date de comparaison valide.", - "JavascriptDisabled": "JavaScript doit être activé pour que vous puissiez utiliser Matomo de manière standard.
Cependant, il semble que JasvaScript ne soit pas supporté ou soit désactivé sur votre navigateur.
Pour utiliser l'interface standard, activez JavaScript en modifiant les options de votre navigateur, ensuite %1$sessayez encore%2$s.
", - "JsDidntLoad": "Votre navigateur n'a pas été en mesure de charger les scripts de la page.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "La première plateforme d'analyses statistiques libre qui respecte votre vie privée.", - "LearnMoreFullStop": "%1$sEn savoir plus.%2$s", - "MacPageDown": "Fn + flèche Droite", - "MacPageUp": "Fn + flèche gauche", - "MainNavigation": "Navigation principale", - "Menu": "Menu", - "MenuEntries": "Entrées de menu", - "NoPrivilegesAskPiwikAdmin": "Vous êtes connecté en tant que '%1$s' mais il semble que nous n'ayez aucune permission définie dans Matomo. %2$s Demandez à votre administrateur (cliquez pour envoyer un e-mail)%3$s de vous donner l'accès 'Consultation' à un site web.", - "NoSuchPage": "Cette page n'existe pas", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "La mise à jour en un clic n'est pas disponible car vous utilisez Matomo sur plusieurs serveurs. Veuillez télécharger la dernière version depuis %1$s pour continuer.", - "OnlyForSuperUserAccess": "Ce gadget est affiché dans le tableau de bord par défaut uniquement aux utilisateurs possédant un accès de type super utilisateur.", - "PageDownShortcutDescription": "pour vous rendre au bas de la page", - "PageUpShortcutDescription": "pour vous rendre au haut de la page", - "PeriodHasOnlyRawData": "Il semble que les rapports pour cette période n'aient pas encore été traités. Voulez-vous voir ce qui se passe maintenant ? Consultez le journal %1$sVisits%2$s ou choisissez une autre période jusqu'à ce que les rapports soient générés.", - "PeriodHasOnlyRawDataNoVisitsLog": "Il semble que les rapports pour cette période n'ont pas encore été générés, ils seront disponibles dans quelques heures. Vous pouvez choisir une période différente en attendant que les rapports soient générés.", - "PeriodRange": "Etendue", - "PivotBySubtable": "Ce rapport n'a pas été pivoté %1$s Pivoter par %2$s", - "PresetDateLast30Days": "30 derniers jours", - "PresetDateLast7Days": "7 derniers jours", - "PresetDateLast90Days": "90 derniers jours", - "PresetDateLastMonth": "Mois dernier", - "PresetDateLastQuarter": "Trimestre dernier", - "PresetDateLastWeekMonSun": "Semaine dernière (lun - dim)", - "PresetDateLastYear": "Année dernière", - "PresetDateThisMonth": "Ce mois-ci", - "PresetDateThisQuarter": "Ce trimestre", - "PresetDateThisWeekMonToday": "Cette semaine (lun - aujourd'hui)", - "PresetDateThisYear": "Cette année", - "PresetDateToday": "Aujourd’hui", - "PresetDateYesterday": "Hier", - "Profilable": "Profilage", - "ProfilableSegmentHelp": "1 pour profilable (par exemple, des cookies ont été utilisés), 0 pour non profilable (par exemple, aucun cookie n’a été utilisé)", - "QuickAccessTitle": "Recherche pour %s. Utilisez les flèches de navigation pour parcourir les résultats de recherche. Raccourci : appuyez sur 'f' pour rechercher.", - "QuickLinks": "Liens rapides", - "ReadMoreOnlineGuide": "Lisez plus sur ce sujet dans le guide en ligne.", - "RemoveTotalsRowDataTable": "Le rapport la ligne des totaux %s Supprimer la ligne des totaux", - "ReportConfigure": "Configurer ce rapport", - "ReportGeneratedOn": "Rapport généré le %s", - "ReportGeneratedXAgo": "Rapport généré il y a %s", - "ReportLowercase": "rapport", - "ReportType": "Type de rapport", - "ReportWithMetadata": "Rapport avec métadonnées", - "ReportingCategoryHelpPrefix": "Comment la page de rapport \"%1$s → %2$s\" m'a-t-elle aidée ?", - "RowLimit": "Limite de rang", - "SearchOnMatomo": "Rechercher '%1$s' sur Matomo.org", - "SeeAvailableVersions": "Voir les versions disponibles", - "Segments": "Segments", - "SharePiwikLong": "Salut ! Je viens juste de trouver un bon logiciel libre : Matomo !\n\nMatomo va te permettre de suivre les visiteurs de ton site web gratuitement. Tu devrais vraiment aller voir !", - "SharePiwikShort": "Matomo ! Analyse web gratuite et libre. Maîtrisez vos données.", - "ShareThis": "Partager ceci", - "ShortcutCalendar": "pour ouvrir le calendrier (d signifie Date)", - "ShortcutHelp": "pour afficher cette aide", - "ShortcutRefresh": "pour rafraîchir le contenu", - "ShortcutSearch": "pour ouvrir la recherche (f signifie Rechercher)", - "ShortcutSegmentSelector": "pour ouvrir le sélecteur de segment", - "ShortcutWebsiteSelector": "pour ouvrir le sélecteur de Site Web", - "ShortcutZenMode": "pour le mode Zen", - "ShortcutsAvailable": "Raccourcis disponibles", - "ShowExportUrl": "Afficher l'URL d'export", - "ShowJSCode": "Afficher le code JavaScript à insérer", - "SkipToContent": "Passer au contenu", - "SoftwareSubcategoryHelp": "La page \"Logiciel\" affiche les systèmes d'exploitation, les navigateurs et les modules complémentaires de vos visiteurs, vous permettant d'optimiser votre site pour s'assurer d'être pleinement compatible avec les configurations les plus populaires.", - "StandardReport": "Rapport standard", - "StartDate": "Date de début", - "SubscribeAndBecomePiwikSupporter": "Procéder à un paiement par carte de crédit sécurisé (Paypal) pour devenir un bienfaiteur de Matomo !", - "SupportPiwik": "Supporter Matomo !", - "SupportUsOn": "Soutenez-nous sur", - "SystemSummaryMysqlVersion": "Version de MySQL", - "SystemSummaryNActivatedPlugins": "%d plugins activés", - "SystemSummaryNSegments": "%1$d segments", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segments (%2$s prétraité, %3$s traité en temps réel)", - "SystemSummaryNWebsites": "%d sites web", - "SystemSummaryPhpVersion": "Version de PHP", - "SystemSummaryPiwikVersion": "Version de Matomo", - "SystemSummaryWidget": "Résumé", - "TableNoData": "Aucune donnée pour cette table.", - "TechDeprecationWarning": "À partir de la version Matomo %1$s, Matomo mettra fin au support pour %2$s. Pour plus d'informations %3$sconsultez notre article de blog.%4$s", - "ThanksFromAllOfUs": "Merci de la part de toute l'équipe Matomo !", - "ThereIsNoDataForThisReport": "Il n'y a pas de données pour ce rapport.", - "UnFlattenDataTable": "Le rapport est plat %s Le rendre hiérarchique", - "UndoPivotBySubtable": "Ce rapport a été pivoté %s Annuler le pivot", - "ViewAllPiwikVideoTutorials": "Visualiser tous les tutoriaux vidéo de Matomo", - "VisitStatusOrdered": "Commandé", - "VisitStatusOrderedThenAbandoned": "Panier commandé et abandonné", - "VisitTypeReturning": "Habitués", - "VisitTypeReturningCustomer": "Client habitué", - "VisitorsCategoryHelp1": "Les pages \"Visiteurs\" vous donnent des renseignements sur les visiteurs. Elles vous indiquent par exemple d'où viennent vos visiteurs, quels appareils et navigateurs ils utilisent et quand ils visitent généralement votre site web. Comprenez, dans l'ensemble, qui est votre public et recherchez les cas particuliers pour voir comment votre public pourrait augmenter.", - "VisitorsCategoryHelp2": "En complément des informations générales à propos de vos visiteurs, vous pouvez utiliser le %1$sJournal des Visites%2$s pour voir ce qui s'est passé lors de chaque visite individuelle.", - "VisitorsOverviewHelp": "Le \"Récapitulatif des visites\" vous aide à comprendre la popularité de votre site. Cela est possible grâce aux graphiques qui montrent combien de visites votre site reçoit durant une période et le niveau moyen d'engagement sur des indicateurs clés tels que les recherches ou les téléchargements.", - "WebAnalyticsReports": "Rapports des statistiques web", - "YouAreUsingTheLatestVersion": "Vous utilisez la dernière version de Matomo !", - "YourDonationWillHelp": "Votre don participera au financement des nouvelles fonctionnalités et des améliorations de cette plateforme open-source de statistiques. Ainsi, la communauté bénéficiera toujours d'un outil qui protège la vie privée et vous permet de garder le contrôle de vos données." - } -} diff --git a/plugins/CoreHome/lang/ga.json b/plugins/CoreHome/lang/ga.json deleted file mode 100644 index 66689d6134ee3cddb573b503add329afadfd270b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ga.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Léargais AI", - "AdblockIsMaybeUsed": "Sa chás go bhfuil bacaire ad á úsáid agat, déan é a dhíchumasú don suíomh seo chun a chinntiú go n-oibríonn Matomo gan aon saincheisteanna.", - "AddTotalsRowDataTable": "Níl an tsraith iomlán %s Show totals row á thaispeáint sa tuarascáil", - "CategoryNoData": "Níl aon sonraí sa chatagóir seo. Déan iarracht \"Cuir an daonra ar fad san áireamh\".", - "ChangeCurrentWebsite": "Roghnaigh suíomh gréasáin, suíomh Gréasáin atá roghnaithe faoi láthair: %s", - "ChangePeriod": "Tréimhse athraithe", - "ChangeVisualization": "Athraigh amharcléiriú", - "CheckForUpdates": "Seiceáil le haghaidh nuashonruithe", - "CheckPiwikOut": "Seiceáil Matomo amach!", - "ChooseWebsite": "Roghnaigh láithreán gréasáin", - "ChooseX": "Roghnaigh%1$s", - "ClickRowToExpandOrContract": "Cliceáil an ró seo chun an subtable a leathnú nó a chonradh.", - "ClickToEditX": "Cliceáil chun %s a chur in eagar", - "ClickToSeeFullInformation": "Cliceáil chun an t-eolas iomlán a fheiceáil", - "CloseSearch": "Dún an cuardach", - "CloseWidgetDirections": "Is féidir leat an ghiuirléid seo a dhúnadh trí chliceáil ar an deilbhín 'X' ag barr na giuirléide.", - "CopyModalNote": "%1$sNóta:%2$s B’fhéidir go mbeadh gá le coigeartuithe ar an %3$s cóipeáilte má tá tagairtí ann atá sainiúil don suíomh Gréasáin bunaidh. Athbhreithnigh na socruithe chun comhoiriúnacht a chinntiú.", - "CopyX": "Cóipeáil %1$s", - "CopyXDescription": "Roghnaigh an suíomh gréasáin ar mhaith leat an %1$s seo a chóipeáil chuige. Cruthóidh sé seo cóip chruinn, lena n-áirítear socruithe, sa suíomh roghnaithe.", - "CssDidntLoad": "Ní raibh do bhrabhsálaí in ann stíl an leathanaigh seo a luchtú.", - "CustomLimit": "Teorainn shaincheaptha", - "DataForThisReportHasBeenDisabled": "Tá deighilt díchumasaithe don tuarascáil seo faoi láthair. Seiceáil le do thoil %1$sthis FAQ%2$s le haghaidh tuilleadh sonraí.", - "DataForThisReportHasBeenPurged": "Tá sonraí na tuarascála seo níos mó ná %s mí d'aois agus tá siad íonaithe.", - "DataTableCombineDimensions": "Taispeántar toisí ar leithligh %s Taispeáin toisí le chéile", - "DataTableExcludeAggregateRows": "Taispeántar rónna comhiomlána %s Folaigh iad", - "DataTableHowToSearch": "Brúigh iontráil nó cliceáil ar dheilbhín an chuardaigh chun cuardach a dhéanamh", - "DataTableIncludeAggregateRows": "Tá rónna comhiomlána i bhfolach %s Taispeáin iad", - "DataTableShowDimensions": "Cuirtear toisí le chéile %s Taispeáin toisí ar leithligh", - "DateInvalid": "Tá an dáta agus an tréimhse a thugtar neamhbhailí. Roghnaigh dáta bailí sa roghnóir dáta.", - "Default": "réamhshocrú", - "DevicesSubcategoryHelp": "Cuidíonn an rannán Gléasanna leat tuiscint a fháil ar an teicneolaíocht atá á húsáid ag do chuairteoirí chun rochtain a fháil ar do shuíomh. Feicfidh tú tuairiscí ar an gcineál gléis agus samhlacha sonracha chun cur ar do chumas do shuíomh a bharrfheabhsú do na gléasanna is coitianta.", - "DonateCall1": "Cosnóidh Matomo rud ar bith ort i gcónaí, ach ní chiallaíonn sé sin nach gcosnaíonn sé aon rud orainn a dhéanamh.", - "DonateCall2": "Matomo riachtanais do thacaíocht leanúnach ag fás agus rathú.", - "DonateCall3": "Má bhraitheann tú gur chuir Matomo luach suntasach le do ghnó nó le d'iarracht, smaoinigh%1$splease ar %2$s nó %3$s a bhronnadh ar ghné phréimhe%4$s. Cabhróidh gach pingin.", - "EndDate": "Dáta Deiridh", - "EndShortcut": "Deireadh", - "EngagementSubcategoryHelp1": "Soláthraíonn an rannóg Rannpháirtíochta tuarascálacha a chabhraíonn le cainníochtú a dhéanamh ar líon na gcuairteoirí nua agus fillte a fhaigheann tú. Is féidir leat athbhreithniú a dhéanamh freisin ar thuarascálacha a bhriseann síos an meán-am agus líon na leathanach in aghaidh na cuairte, chomh maith leis an líon uaireanta a bhí cuairteoir ar do shuíomh agus an líon laethanta is coitianta idir cuairteanna.", - "EngagementSubcategoryHelp2": "Is féidir leis seo cabhrú leat barrfheabhsú a dhéanamh ar chuairteanna minicíochta agus ard-idirghníomhaíochta chomh maith le do shroicheadh a uasmhéadú.", - "EnterZenMode": "Iontráil mód Zen (folaigh na biachláir)", - "ExceptionNotAllowlistedIP": "Ní féidir leat an Matomo seo a úsáid toisc nach gceadaítear do IP %s.", - "ExcludeRowsWithLowPopulation": "Taispeántar gach ró %s Gan daonra íseal a eisiamh", - "ExitZenMode": "Scoir de mhód Zen (taispeáin na biachláir)", - "ExpandSubtables": "Leathnaigh fo-ailt", - "ExportFormat": "Easpórtáil formáid", - "ExportTooltip": "nóta: Chun an URL easpórtála a ghintear a úsáid, beidh ort auth comhartha feidhmchláir a shonrú. Is féidir leat na comharthaí seo a chumrú in Admin → Security → Token Auths.", - "ExportTooltipWithLink": "nóta: Chun an URL easpórtála a ghintear a úsáid, beidh ort auth comhartha feidhmchláir a shonrú. Is féidir leat na comharthaí seo a chumrú i %1$s[Admin → Security → Auths Tokens]%2$s. Cuir do chomhartha Auth in ionad %3$s sa URL Easpórtála. Rabhadh: Ná roinn an URL leis an bhfíorchomhartha le duine ar bith eile.", - "ExternalHelp": "Cabhair (osclaítear i gcluaisín nua é)", - "FlattenDataTable": "Tá an tuairisc ordlathach %s Déan cothrom í", - "FlattenReport": "Tuairisc leacaithe", - "FormatMetrics": "Méadracht formáide", - "HideExportUrl": "Folaigh URL Easpórtála", - "HomeShortcut": "Baile", - "IncludeDimensionsSeparately": "Cuir na toisí san áireamh ar leithligh", - "IncludeRowsWithLowPopulation": "Tá sraitheanna le daonra íseal i bhfolach %s Taispeáin gach ró", - "InjectedHostEmailBody": "Dia duit, rinne mé iarracht rochtain a fháil ar Matomo inniu agus tháinig mé ar an rabhadh anaithnid óstainm.", - "InjectedHostEmailSubject": "Aimsíodh Matomo le hóstainm anaithnid: %s", - "InjectedHostNonSuperUserWarning": "%1$sCliceáil anseo chun Matomo a rochtain go sábháilte%2$s agus bain an rabhadh seo. B'fhéidir gur mhaith leat teagmháil a dhéanamh le do riarthóir Matomo agus iad a chur ar an eolas faoin gceist seo (%3$sclick here to email%4$s).", - "InjectedHostSuperUserWarning": "D'fhéadfadh Matomo a bheith míchumraithe (mar shampla, má aistríodh Matomo le déanaí chuig freastalaí nó URL nua). Is féidir leat %1$sclick anseo agus %2$s a chur leis mar óstainm bhailí Matomo (má tá muinín agat as)%3$s, nó %4$sclick anseo agus téigh go dtí%5$s chun rochtain a fháil ar Matomo go sábháilte%6$s.", - "InjectedHostWarningIntro": "Tá Matomo á rochtain agat anois ó %1$s, ach tá Matomo cumraithe le rith ag an seoladh seo:%2$s.", - "InvalidComparisonDateRange": "Cuir isteach raon dáta comparáide bailí.", - "JavascriptDisabled": "Ní mór JavaScript a chumasú ionas gur féidir leat Matomo a úsáid san amharc caighdeánach.
Mar sin féin, tá an chuma ar an scéal go bhfuil JavaScript díchumasaithe nó nach dtacaíonn do bhrabhsálaí leis.
Chun an t-amharc caighdeánach a úsáid, cumasaigh JavaScript trí do roghanna brabhsálaí a athrú , ansin %1$s déan iarracht eile %2$s.
", - "JsDidntLoad": "Ní raibh do bhrabhsálaí in ann scripteanna an leathanaigh seo a luchtú.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "An t-ardán anailísíochta oscailte tosaigh a léiríonn meas ar do phríobháideacht.", - "LearnMoreFullStop": "%1$sFoghlaim tuilleadh.%2$s", - "MacPageDown": "Fn + Saighead dheas", - "MacPageUp": "Fn + Saighead chlé", - "MainNavigation": "Príomh-nascleanúint", - "Menu": "Clár", - "MenuEntries": "Iontrálacha roghchláir", - "NoPrivilegesAskPiwikAdmin": "Tá tú logáilte isteach mar '%1$s' ach is cosúil nach bhfuil aon chead socraithe agat i Matomo. %2$s Iarr ar do riarthóir Matomo (cliceáil ar ríomhphost)%3$s chun rochtain 'amharc' a thabhairt duit ar shuíomh gréasáin.", - "NoSuchPage": "Níl an leathanach seo ann", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Níl an nuashonrú aon-cliceáil ar fáil mar go bhfuil tú ag baint úsáide as Matomo le freastalaithe éagsúla. Íoslódáil an leagan is déanaí ó %1$s le dul ar aghaidh.", - "OnlyForSuperUserAccess": "Tá an ghiuirléid ar taispeáint sa Painéal na nIonstraimí réamhshocraithe ach amháin d'úsáideoirí a bhfuil rochtain Super Úsáideora.", - "PageDownShortcutDescription": "dul go bun an leathanaigh", - "PageUpShortcutDescription": "chun barr an leathanaigh a fháil", - "PeriodHasOnlyRawData": "Tá an chuma ar an scéal nach bhfuil tuairiscí don tréimhse seo próiseáilte go fóill. Ar mhaith leat a fheiceáil cad atá ag tarlú anois? Seiceáil loga %1$sVisits%2$s nó roghnaigh dáta eile go dtí go mbeidh na tuairiscí ginte.", - "PeriodHasOnlyRawDataNoVisitsLog": "Tá an chuma ar an scéal nach bhfuil tuairiscí don tréimhse seo próiseáilte go fóill, ach beidh siad ar fáil i gceann cúpla uair an chloig. D'fhéadfá tréimhse dáta eile a roghnú go dtí go ngintear na tuairiscí.", - "PeriodRange": "Raon", - "PivotBySubtable": "Níl an tuarascáil seo pivoted%1$s Pivot ag %2$s", - "PresetDateLast30Days": "30 lá anuas", - "PresetDateLast7Days": "7 lá anuas", - "PresetDateLast90Days": "90 lá anuas", - "PresetDateLastMonth": "An mhí seo caite", - "PresetDateLastQuarter": "An ráithe dheireanach", - "PresetDateLastWeekMonSun": "An tseachtain seo caite (Luan - Domh)", - "PresetDateLastYear": "Anuraidh", - "PresetDateThisMonth": "An mhí seo", - "PresetDateThisQuarter": "An ráithe seo", - "PresetDateThisWeekMonToday": "An tseachtain seo (Luan - Inniu)", - "PresetDateThisYear": "I mbliana", - "PresetDateToday": "Inniu", - "PresetDateYesterday": "Inné", - "Profilable": "Próifíliúil", - "ProfilableSegmentHelp": "1 le haghaidh próifílithe (m.sh. úsáideadh fianáin), 0 le haghaidh neamhphróifílithe (m.sh. níor úsáideadh aon fhianáin)", - "QuickAccessTitle": "Cuardaigh %s. Bain úsáid as na heochracha arrow chun nascleanúint a dhéanamh trí thorthaí cuardaigh. Aicearra: Brúigh 'f' chun cuardach a dhéanamh.", - "QuickLinks": "Naisc Thapa", - "ReadMoreOnlineGuide": "Léigh tuilleadh faoin ábhar seo sa treoir ar líne.", - "RemoveTotalsRowDataTable": "Tá an tsraith iomlán %s á thaispeáint sa tuarascáil Bain an tsraith iomlán", - "ReportConfigure": "Cumraigh an tuarascáil seo", - "ReportGeneratedOn": "Tuairisc ginte ar %s", - "ReportGeneratedXAgo": "Gineadh %s ó shin", - "ReportLowercase": "tuairisc", - "ReportType": "Cineál tuairisce", - "ReportWithMetadata": "Tuairiscigh le meiteashonraí", - "ReportingCategoryHelpPrefix": "Conas a chabhraíonn leathanach tuairiscithe \"%1$s → %2$s\" liom?", - "RowLimit": "Teorainn ró", - "SearchOnMatomo": "Cuardaigh '%1$s' ar Matomo.org", - "SeeAvailableVersions": "Féach na leaganacha atá ar fáil", - "Segments": "Deighleáin", - "SharePiwikLong": "Haigh! Fuair mé píosa iontach bogearraí saor in aisce: Matomo!\n\nLigfidh Matomo duit cuairteoirí ar do láithreán gréasáin a rianú saor in aisce. Ba chóir duit é a sheiceáil go cinnte!", - "SharePiwikShort": "Matomo! Anailísíocht gréasáin saor in aisce / libre. Bíodh do chuid sonraí féin agat.", - "ShareThis": "Comhroinn é seo", - "ShortcutCalendar": "féilire a oscailt (seasann d don Dáta)", - "ShortcutHelp": "chun an chabhair seo a thaispeáint", - "ShortcutRefresh": "chun an t-ábhar a athnuachan", - "ShortcutSearch": "chun an cuardach a oscailt (seasann f d'Aimsigh)", - "ShortcutSegmentSelector": "chun roghnóir Deighleoga a oscailt", - "ShortcutWebsiteSelector": "chun roghnóir an tSuímh Gréasáin a oscailt", - "ShortcutZenMode": "le haghaidh mód Zen", - "ShortcutsAvailable": "Aicearraí atá ar fáil", - "ShowExportUrl": "Taispeáin URL Easpórtála", - "ShowJSCode": "Taispeáin an cód JavaScript le ionsá", - "SkipToContent": "Scipeáil chuig ábhar", - "SoftwareSubcategoryHelp": "Taispeánann an rannóg Bogearraí na córais oibriúcháin, brabhsálaithe agus breiseáin atá á n-úsáid ag do chuairteoirí chun rochtain a fháil ar an suíomh ionas gur féidir leat do shuíomh a bharrfheabhsú chun a chinntiú go bhfuil sé comhoiriúnach go hiomlán leis na cumraíochtaí is coitianta.", - "StandardReport": "Tuarascáil chaighdeánach", - "StartDate": "Dáta Tosaigh", - "SubscribeAndBecomePiwikSupporter": "Lean ar aghaidh chuig leathanach slán íocaíochta cárta creidmheasa (PayPal) le bheith i do Thacadóir Matomo!", - "SupportPiwik": "Tacaíocht Matomo!", - "SupportUsOn": "Tacaigh linn ar", - "SystemSummaryMysqlVersion": "Leagan MySQL", - "SystemSummaryNActivatedPlugins": "%d breiseáin gníomhachtaithe", - "SystemSummaryNSegments": "deighleoga %1$d", - "SystemSummaryNSegmentsWithBreakdown": "deighleoga %1$d (%2$s réamhphróiseáilte,%3$s próiseáilte i bhfíor-am)", - "SystemSummaryNWebsites": "Suíomhanna Gréasáin %d", - "SystemSummaryPhpVersion": "Leagan PHP", - "SystemSummaryPiwikVersion": "Leagan Matomo", - "SystemSummaryWidget": "Achoimre ar an gCóras", - "TableNoData": "Níl aon sonraí don tábla seo.", - "TechDeprecationWarning": "Ag tosú sa leagan Matomo %1$s, beidh Matomo ag cur deireadh le tacaíocht do %2$s. Le haghaidh tuilleadh eolais %3$ssee our blog post.%4$s", - "ThanksFromAllOfUs": "Go raibh maith agat ó gach duine againn ag Matomo!", - "ThereIsNoDataForThisReport": "Níl aon sonraí ann don tuarascáil seo.", - "UnFlattenDataTable": "Tá an tuairisc cothrom %s Déan ordlathach í", - "UndoPivotBySubtable": "Tá an tuairisc seo pivoted %s Cealaigh pivot", - "ViewAllPiwikVideoTutorials": "Féach ar gach Rang Teagaisc Físe Matomo", - "VisitStatusOrdered": "Ordaíodh", - "VisitStatusOrderedThenAbandoned": "Ordaíodh ansin Cart Tréigthe", - "VisitTypeReturning": "Ag filleadh", - "VisitTypeReturningCustomer": "Custaiméir ag Filleadh", - "VisitorsCategoryHelp1": "Insíonn leathanaigh na gCuairteoirí rudaí duit faoi cé hiad do chuairteoirí. Rudaí cosúil leis an áit as ar tháinig do chuairteoirí, cad iad na gléasanna agus na brabhsálaithe atá in úsáid acu agus nuair a thugann siad cuairt ar do láithreán gréasáin de ghnáth. Tuig, san iomlán, cé hé do lucht féachana, agus féach ar outliers chun a fheiceáil conas a d'fhéadfadh do lucht féachana fás.", - "VisitorsCategoryHelp2": "Chomh maith le faisnéis ghinearálta faoi do chuairteoirí, is féidir leat an %1$sVisits Log%2$s a úsáid freisin chun an méid a tharla i ngach cuairt aonair a fheiceáil.", - "VisitorsOverviewHelp": "Cuidíonn Forbhreathnú na gCuairteoirí leat an tóir a bhí ar do shuíomh a thuiscint. Déanann sé é seo trí chairteacha a sholáthar a léiríonn cé mhéad cuairt atá á fháil ag do shuíomh thar thréimhse roghnaithe agus an meánleibhéal rannpháirtíochta do phríomhghnéithe, amhail cuardaigh agus íoslódálacha.", - "WebAnalyticsReports": "Tuarascálacha Anailísíochta Gréasáin", - "YouAreUsingTheLatestVersion": "Tá an leagan is déanaí de Matomo á úsáid agat!", - "YourDonationWillHelp": "Cabhróidh do thabhartas go díreach le gnéithe agus feabhsuithe nua a mhaoiniú don ardán anailísíochta foinse oscailte seo. Ciallaíonn sé seo go mbainfidh an pobal leas i gcónaí as uirlis a chosnaíonn príobháideachas agus a ligeann duit fanacht i gceannas ar do chuid sonraí." - } -} diff --git a/plugins/CoreHome/lang/gl.json b/plugins/CoreHome/lang/gl.json deleted file mode 100644 index e37bd9f61bddadd0f78fe69b36d6763fb4a5d9d8..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/gl.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Non hai datos nesta categoría. Intente \"Incluir todos os datos\".", - "ChangePeriod": "Cambiar período", - "ChangeVisualization": "Cambiar visualización", - "CheckForUpdates": "Buscar actualizacións", - "CheckPiwikOut": "Controla Matomo!", - "PresetDateToday": "Hoxe", - "PresetDateYesterday": "Onte", - "ShowJSCode": "Ver o código javascript para insertar", - "SystemSummaryPhpVersion": "Versión PHP" - } -} diff --git a/plugins/CoreHome/lang/gu.json b/plugins/CoreHome/lang/gu.json deleted file mode 100644 index 0bcf212d4ac1ebd6fb7491a6959edcfab66c2a0c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/gu.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "જો તમે એડ બ્લોકર વાપરી રહ્યાં હોય તો, કૃપા કરીને આ સાઇટ માટે તેને નિષ્ક્રિય કરો જેથી Matomo કોઈ સમસ્યા વિના કામ કરી શકે.", - "AddTotalsRowDataTable": "અહેવાલમાં કુલ પંક્તિ %s બતાવતું નથી કુલ પંક્તિ બતાવો", - "CategoryNoData": "આ કેટેગરીમાં કોઈ ડેટા નથી. \"બધી વસ્તીનો સમાવેશ\" કરવાનો પ્રયાસ કરો.", - "ChangeCurrentWebsite": "એક વેબસાઇટ પસંદ કરો, હાલમાં પસંદ કરેલી વેબસાઇટ: %s", - "ChangePeriod": "સમયગાળો બદલો", - "ChangeVisualization": "વિઝ્યુલાઇઝેશન બદલો", - "CheckForUpdates": "અપડેટ્સ માટે તપાસો", - "CheckPiwikOut": "Matomo તપાસો!", - "ChooseWebsite": "વેબસાઇટ પસંદ કરો", - "ChooseX": "%1$s પસંદ કરો", - "ClickRowToExpandOrContract": "આ પંક્તિને વિસ્તૃત કરવા અથવા ઉપટેબલને સંકુચિત કરવા માટે ક્લિક કરો.", - "ClickToEditX": "%s સંપાદિત કરવા માટે ક્લિક કરો", - "ClickToSeeFullInformation": "સંપૂર્ણ માહિતી જોવા માટે ક્લિક કરો", - "CloseSearch": "શોધ બંધ કરો", - "CloseWidgetDirections": "તમે વિજેટને 'X' આઇકોન પર ક્લિક કરીને બંધ કરી શકો છો, જે વિજેટની ટોચમાં છે.", - "CssDidntLoad": "તમારું બ્રાઉઝર આ પૃષ્ઠની સ્ટાઇલને લોડ કરવામાં અસમર્થ હતું.", - "CustomLimit": "કસ્ટમ મર્યાદા", - "DataForThisReportHasBeenDisabled": "આ અહેવાલ માટે હાલમાં સેગમેન્ટેશન અક્ષમ છે. વધુ વિગતો માટે કૃપા કરીને %1$sઆ FAQ%2$s તપાસો.", - "DataForThisReportHasBeenPurged": "આ રિપોર્ટ માટેનો ડેટા %s મહિના કરતાં વધુ જૂનો છે અને તેને સાફ કરવામાં આવ્યો છે.", - "DataTableCombineDimensions": "આયામો અલગ અલગ બતાવવામાં આવે છે %s આયામોને એકસાથે બતાવો", - "DataTableExcludeAggregateRows": "એકંદર પંક્તિઓ %s દેખાય છે તેમને છુપાવો", - "DataTableHowToSearch": "એન્ટર દબાવો અથવા શોધવા માટે શોધ આયકન પર ક્લિક કરો", - "DataTableIncludeAggregateRows": "એકંદર પંક્તિઓ છુપાઈ છે %s તેમને બતાવો", - "DataTableShowDimensions": "આયામો એકસાથે જોડાયેલા છે %s આયામોને અલગ બતાવો", - "DateInvalid": "આપેલી તારીખ અને સમયગાળોનું સંયોજન અમાન્ય છે. કૃપા કરીને તારીખ પસંદગીમાં માન્ય તારીખ પસંદ કરો.", - "Default": "ડિફૉલ્ટ", - "DevicesSubcategoryHelp": "ઉપકરણો વિભાગ તમને સમજાવે છે કે તમારા મુલાકાતીઓ તમારી સાઇટ પર પ્રવેશ માટે કયા તકનીકી ઉપયોગ કરી રહ્યાં છે. તમે ઉપકરણના પ્રકાર અને વિશેષ મોડેલ્સ પર અહેવાલો જોવા મળશે જેથી તમે સૌથી વધુ લોકપ્રિય ઉપકરણો માટે તમારી સાઇટ ઓપ્ટિમાઇઝ કરી શકો છો.", - "DonateCall1": "Matomo હંમેશા તમને ઉપયોગ કરવા માટે કંઈપણ ખર્ચ કરશે નહીં, પરંતુ તેનો અર્થ એ નથી કે તે બનાવવા માટે અમને કંઈપણ ખર્ચ થશે નહીં.", - "DonateCall2": "Matomo ને વિકાસ અને વિકાસ માટે તમારા સતત સમર્થનની જરૂર છે.", - "DonateCall3": "જો તમને લાગે કે Matomo એ તમારા વ્યવસાય અથવા પ્રયાસમાં નોંધપાત્ર મૂલ્ય ઉમેર્યું છે, તો %1$sકૃપા કરીને %2$s અથવા %3$s પ્રીમિયમ સુવિધા%4$s ખરીદવાનું દાન કરવાનું વિચારો. દરેક પૈસો મદદ કરશે.", - "EndDate": "અંતિમ તારીખ", - "EndShortcut": "અંત", - "EngagementSubcategoryHelp1": "એન્ગેજમેન્ટ વિભાગ તમને નવા અને પાછા ફરતા મુલાકાતીઓ કેટલા છે તે ગણવામાં મદદ કરતા અહેવાલો પૂરી પાડે છે. તમે પ્રતિ મુલાકાતનો સરેરાશ સમય અને પૃષ્ઠોની સંખ્યા, તેમ જ કે તમારી સાઇટ પર મુલાકાતી કેટલીવાર આવ્યો છે અને મુલાકાતો વચ્ચેના સૌથી સામાન્ય દિવસોની સંખ્યા જેવા અહેવાલોની સમીક્ષા પણ કરી શકો છો.", - "EngagementSubcategoryHelp2": "આ તમને આવકની વધારે વારંવાર અને ઉચ્ચ-ક્રિયાપ્રતિક્રિયા મુલાકાતો માટે ઓપ્ટિમાઇઝ કરવામાં મદદ કરી શકે છે, જેથી તમારી પહોંચ પણ વધી શકે છે.", - "EnterZenMode": "ઝેન મોડમાં પ્રવેશ કરો (મેનુઝ છુપાવો)", - "ExceptionNotAllowlistedIP": "તમે આ Matomo નો ઉપયોગ કરી શકતા નથી કારણ કે તમારા IP %s ને મંજૂરી નથી.", - "ExcludeRowsWithLowPopulation": "બધી પંક્તિઓ દર્શાવવામાં આવી છે %s ઓછી આબાદીને બહાર રાખો", - "ExitZenMode": "ઝેન મોડ નિર્ગમ કરો (મેનુઓ બતાવો)", - "ExpandSubtables": "સબટેબલ્સ વિસ્તૃત કરો", - "ExportFormat": "નિકાસ ફોર્મેટ", - "ExportTooltip": "નોંધ: ઉત્પન્ન કરેલ URL નો ઉપયોગ કરવા માટે, તમારે એપ્લિકેશન ટોકન ઓથ નિર્દિષ્ટ કરવું પડશે. તમે આ ટોકનોને એડમિન → સુરક્ષા → ટોકન ઓથ્સ માં કન્ફિગર કરી શકો છો.", - "ExportTooltipWithLink": "નોંધ: ઉત્પન્ન કરેલ URL નો ઉપયોગ કરવા માટે, તમારે એપ્લિકેશન ટોકન ઓથ નિર્દિષ્ટ કરવી પડશે. તમે આ ટોકન્સને %1$s[એડમિન → સુરક્ષા → ઓથ ટોકન્સ]%2$s માં કન્ફિગર કરી શકો છો. એક્સપોર્ટ URL માં %3$s ને તમારા ઓથ ટોકન દ્વારા બદલો. ચેતવણી: વાસ્તવિક ટોકન સાથેનું URL કોઈને પણ શેર કરવું નહીં.", - "ExternalHelp": "મદદ (નવી ટેબમાં ખોલો)", - "FlattenDataTable": "અહેવાલ હિયરાર્કીકલ છે %s તેને ફ્લેટ બનાવો", - "FlattenReport": "અહેવાલ ફ્લેટ કરો", - "FormatMetrics": "મેટ્રિક્સ ફોર્મેટ કરો", - "HideExportUrl": "એક્સપોર્ટ URL છુપાવો", - "HomeShortcut": "હોમ", - "IncludeRowsWithLowPopulation": "ઓછી આબાદી ધરાવતી પંક્તિઓ છુપાઈ છે %s બધી પંક્તિઓ બતાવો", - "InjectedHostEmailBody": "હેલો, મેં આજે Matomo ને ઍક્સેસ કરવાનો પ્રયાસ કર્યો અને અજાણ્યા હોસ્ટનામ ચેતવણી મળી.", - "InjectedHostEmailSubject": "Matomoને અજાણી હોસ્ટનામ સાથે ઍક્સેસ કરવામાં આવ્યું છે: %s", - "InjectedHostNonSuperUserWarning": "%1$s Matomo ને સુરક્ષિત રીતે ઍક્સેસ કરવા માટે અહીં ક્લિક કરો%2$s અને આ ચેતવણી દૂર કરો. તમે તમારા Matomo એડમિનિસ્ટ્રેટરનો સંપર્ક કરવા અને તેમને આ સમસ્યા વિશે સૂચિત કરવા પણ ઈચ્છી શકો છો (%4$sને ઈમેલ કરવા માટે અહીં %3$s ક્લિક કરો).", - "InjectedHostSuperUserWarning": "Matomo ખોટી રીતે ગોઠવાયેલ હોઈ શકે છે (ઉદાહરણ તરીકે, જો Matomo તાજેતરમાં નવા સર્વર અથવા URL પર ખસેડવામાં આવ્યો હતો). તમે ક્યાં તો %1$s અહીં ક્લિક કરી શકો છો અને %2$s ને માન્ય Matomo હોસ્ટનામ તરીકે ઉમેરી શકો છો (જો તમને તેના પર વિશ્વાસ હોય તો)%3$s અથવા %4$s અહીં ક્લિક કરો અને Matomo ને સુરક્ષિત રીતે ઍક્સેસ કરવા માટે %5$s પર જઈ શકો છો%6$s.", - "InjectedHostWarningIntro": "તમે હવે %1$s પરથી Matomo ઍક્સેસ કરી રહ્યા છો, પરંતુ Matomo ને આ સરનામું પર ચલવા માટે કોન્ફિગર કરી દેવામાં આવ્યું છે: %2$s.", - "JavascriptDisabled": "તમે માનક દૃશ્યમાં Matomo નો ઉપયોગ કરી શકો તે માટે JavaScript સક્ષમ હોવું આવશ્યક છે.
જો કે, એવું લાગે છે કે JavaScript કાં તો અક્ષમ છે અથવા તમારા બ્રાઉઝર દ્વારા સમર્થિત નથી.
માનક દૃશ્યનો ઉપયોગ કરવા માટે, તમારા બ્રાઉઝર વિકલ્પો બદલીને JavaScript સક્ષમ કરો , પછી %1$sફરી પ્રયાસ કરો%2$s.
", - "JsDidntLoad": "તમારા બ્રાઉઝરને આ પૃષ્ઠના સ્ક્રિપ્ટ્સ લોડ કરવામાં અસમર્થતા આવી.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "તમારી ગોપનીયતાનો આદર કરતું અગ્રણી ઓપન એનાલિટિક્સ પ્લેટફોર્મ.", - "MacPageDown": "Fn + જમણી તીર કી", - "MacPageUp": "Fn + ડાબી તીર કી", - "MainNavigation": "મુખ્ય નેવીગેશન", - "Menu": "મેનુ", - "MenuEntries": "મેનુ એન્ટ્રીઓ", - "NoPrivilegesAskPiwikAdmin": "તમે '%1$s' તરીકે લૉગ ઇન છો પરંતુ તેમ લાગે છે કે તમારી પાસે Matomo માં કોઈ પરવાનગી સેટ નથી. %2$s તમારા Matomo વ્યવસ્થાપકને (ઇમેઇલ માટે ક્લિક કરો)%3$s વેબસાઇટ પર 'દૃશ્ય' પ્રવેશ-હક આપવા માટે કહો.", - "NoSuchPage": "આ પૃષ્ઠ અસ્તિત્વમાં નથી", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "તમે મલ્ટિપલ સર્વર્સ સાથે Matomo વાપરી રહ્યાં છો તેથી એક-ક્લિક અપડેટ ઉપલબ્ધ નથી. આગળ વધવા માટે કૃપા કરીને %1$s પરથી નવું સંસ્કરણ ડાઉનલોડ કરો.", - "OnlyForSuperUserAccess": "આ વિજેટ માત્ર સુપર વપરાશકર્તા પ્રવેશ-હક ધરાવતા વપરાશકર્તાઓ માટે ડિફોલ્ટ ડેશબોર્ડમાં પ્રદર્શિત થાય છે.", - "PageDownShortcutDescription": "પૃષ્ઠના તળિયે જવા માટે", - "PageUpShortcutDescription": "પૃષ્ઠની ટોચને પોહચવા માટે", - "PeriodHasOnlyRawData": "લાગે છે કે આ સમયગાળો માટેના અહેવાલો હજુ સુધી પ્રક્રિયા કરવામાં આવ્યા નથી. શું તમે હમણાં શું થાય છે તે જોવા માંગો છો? %1$sમુલાકાતોનો લોગ%2$s તપાસો અથવા અહેવાલો પેદા થયા પર્યંત અલગ તારીખનો સમયગાળો પસંદ કરો.", - "PeriodHasOnlyRawDataNoVisitsLog": "એવું લાગે છે કે આ સમયગાળા માટેના અહેવાલો પર હજી પ્રક્રિયા કરવામાં આવી નથી, પરંતુ તે થોડા કલાકોમાં ઉપલબ્ધ થશે. રિપોર્ટ્સ જનરેટ થાય ત્યાં સુધી તમે અલગ તારીખનો સમયગાળો પસંદ કરી શકો છો.", - "PeriodRange": "શ્રેણી", - "PivotBySubtable": "આ અહેવાલ પિવોટ નથી કરેલું %1$s %2$s દ્વારા પિવોટ કરો", - "Profilable": "પ્રોફાઇલબલ", - "QuickAccessTitle": "%s માટે શોધો. શોધ પરિણામો માં નેવીગેટ કરવા માટે તીર કીઓ વાપરો. શોર્ટકટ: 'f' દબાવીને શોધો.", - "QuickLinks": "ઝડપી લિંક્સ", - "ReadMoreOnlineGuide": "ઑનલાઇન માર્ગદર્શિકામાં આ વિષય વિશે વધુ વાંચો.", - "RemoveTotalsRowDataTable": "અહેવાલ કુલ પંક્તિ %s દર્શાવે છે કુલ પંક્તિ દૂર કરો", - "ReportGeneratedOn": "અહેવાલ %s પર બનાવવામાં આવ્યો છે", - "ReportGeneratedXAgo": "અહેવાલ %s પહેલા બનાવવામાં આવ્યો છે", - "ReportLowercase": "અહેવાલ", - "ReportType": "અહેવાલ પ્રકાર", - "ReportWithMetadata": "મેટાડેટા સાથેનો અહેવાલ", - "ReportingCategoryHelpPrefix": "\"%1$s → %2$s\" રિપોર્ટિંગ પૃષ્ઠ મને કેવી રીતે મદદ કરે છે?", - "RowLimit": "પંક્તિ મર્યાદા", - "SearchOnMatomo": "Matomo.org પર '%1$s' શોધો", - "SeeAvailableVersions": "ઉપલબ્ધ સંસ્કરણો જુઓ", - "Segments": "સેગમેન્ટ્સ", - "SharePiwikLong": "હાય! મને હમણાં જ મફત સૉફ્ટવેરનો એક મહાન ભાગ મળ્યો: Matomo!\n\nMatomo તમને તમારી વેબસાઇટ પર મુલાકાતીઓને મફતમાં ટ્રૅક કરવા દેશે. તમારે ચોક્કસપણે તે તપાસવું જોઈએ!", - "SharePiwikShort": "માટોમો! મફત/મુક્ત વેબ એનાલિટિક્સ. તમારા ડેટાની માલિકી રાખો.", - "ShareThis": "આ શેર કરો", - "ShortcutCalendar": "કેલેન્ડર ખોલવા માટે (d તારીખ માટે છે)", - "ShortcutHelp": "આ મદદ બતાવવા માટે", - "ShortcutRefresh": "સામગ્રીને તાજું કરવા માટે", - "ShortcutSearch": "શોધ ખોલવા માટે (f એ Find માટે છે)", - "ShortcutSegmentSelector": "સેગમેન્ટ પસંદગી ખોલવા માટે", - "ShortcutWebsiteSelector": "વેબસાઇટ પસંદગી ખોલવા માટે", - "ShortcutZenMode": "ઝેન મોડ માટે", - "ShortcutsAvailable": "ઉપલબ્ધ શોર્ટકટ્સ", - "ShowExportUrl": "એક્સપોર્ટ URL બતાવો", - "ShowJSCode": "દાખલ કરવા માટે JavaScript કોડ બતાવો", - "SkipToContent": "સામગ્રી પર જાઓ", - "SoftwareSubcategoryHelp": "સોફ્ટવેર વિભાગમાં તમારા મુલાકાતીઓ જે ઓપરેટિંગ સિસ્ટમ્સ, બ્રાઉઝર્સ અને પ્લગઈન્સ વાપરી રહ્યાં છે તે બતાવે છે જેથી તમે તમારી સાઇટને સૌથી લોકપ્રિય કોન્ફિગ્યુરેશન સાથે પૂરી રીતે સુસંગત હોવા માટે તેને ઓપ્ટિમાઇઝ કરી શકો છો.", - "StandardReport": "માનક અહેવાલ", - "StartDate": "પ્રારંભ તારીખ", - "SubscribeAndBecomePiwikSupporter": "એક સુરક્ષિત ક્રેડિટ કાર્ડ ચુકવણી પૃષ્ઠ (Paypal) પર જાઓ અને Matomo સમર્થક બનો!", - "SupportPiwik": "Matomo સપોર્ટ કરો!", - "SupportUsOn": "અમને સપોર્ટ કરો", - "SystemSummaryMysqlVersion": "MySQL સંસ્કરણ", - "SystemSummaryNActivatedPlugins": "%d સક્રિય પ્લગઈન્સ", - "SystemSummaryNSegments": "%1$d સેગમેન્ટ્સ", - "SystemSummaryNSegmentsWithBreakdown": "%1$d સેગમેન્ટ્સ (%2$s પૂર્વ-પ્રક્રિયાબદ્ધ, %3$s રીઅલ-ટાઇમમાં પ્રક્રિયાબદ્ધ)", - "SystemSummaryNWebsites": "%d વેબસાઇટ્સ", - "SystemSummaryPhpVersion": "PHP સંસ્કરણ", - "SystemSummaryPiwikVersion": "Matomo સંસ્કરણ", - "SystemSummaryWidget": "સિસ્ટમ સારાંશ", - "TableNoData": "આ ટેબલ માટે કોઈ ડેટા નથી.", - "TechDeprecationWarning": "Matomo %1$s સંસ્કરણથી શરૂ કરીને, Matomo %2$s માટે સમર્થન સમાપ્ત કરશે. વધુ માહિતી માટે %3$ss અમારી બ્લોગ પોસ્ટ જુઓ.%4$s", - "ThanksFromAllOfUs": "Matomo પર અમારા બધા તરફથી તમારો આભાર!", - "ThereIsNoDataForThisReport": "આ અહેવાલ માટે કોઈ ડેટા નથી.", - "UnFlattenDataTable": "અહેવાલ સમતલ છે %s તેને હિયરાર્કીકલ બનાવો", - "UndoPivotBySubtable": "આ અહેવાલને %s પિવોટ કરવામાં આવ્યું છે પિવોટ રદ કરો", - "ViewAllPiwikVideoTutorials": "બધા Matomo વિડિઓ ટ્યુટોરિયલ્સ જુઓ", - "VisitStatusOrdered": "ઓર્ડર કર્યું", - "VisitStatusOrderedThenAbandoned": "પસંદ કર્યું પછી છોડી દેવાયેલું કાર્ટ", - "VisitTypeReturning": "પરત", - "VisitTypeReturningCustomer": "પરત આવતો ગ્રાહક", - "VisitorsCategoryHelp1": "મુલાકાતીઓના પૃષ્ઠો તમને તમારા મુલાકાતીઓ કોણ છે તેવા વિષયો વિશે જણાવે છે. વિષયો જેમ કે તમારા મુલાકાતીઓ ક્યાંથી આવ્યા છે, તેઓ કયા ઉપકરણો અને બ્રાઉઝર્સ વાપરી રહ્યા છે અને તેઓ સામાન્ય રીતે તમારી વેબસાઇટ પર ક્યારે મુલાકાત કરે છે. એકંદરમાં સમજો કે તમારું પ્રેક્ષક કોણ છે, અને તમારું પ્રેક્ષક કેવી રીતે વધી શકે છે તે જોવા માટે આઉટલાયર્સ જુઓ.", - "VisitorsCategoryHelp2": "તમારા મુલાકાતીઓ વિશેની સામાન્ય માહિતી સાથે સાથે, તમે %1$sમુલાકાતોનો લોગ%2$s પણ ઉપયોગ કરી શકો છો જેથી તમે દરેક વ્યક્તિગત મુલાકાતમાં શું થયું તે જોવા મળે.", - "VisitorsOverviewHelp": "મુલાકાતીઓનું વિહંગાવલોકન તમને તમારી સાઇટની લોકપ્રિયતા સમજવામાં મદદ કરે છે. તે ચાર્ટ પ્રદાન કરીને આ કરે છે જે દર્શાવે છે કે તમારી સાઇટને પસંદ કરેલા સમયગાળા દરમિયાન કેટલી મુલાકાતો મળી રહી છે અને મુખ્ય સુવિધાઓ, જેમ કે શોધ અને ડાઉનલોડ્સ માટે જોડાણનું સરેરાશ સ્તર.", - "WebAnalyticsReports": "વેબ એનાલિટિક્સ અહેવાલો", - "YouAreUsingTheLatestVersion": "તમે Matomoનું નવીનતમ આવૃત્તિ વાપરી રહ્યાં છો!", - "YourDonationWillHelp": "તમારું દાન આ ઓપન સોર્સ એનાલિટિક્સ પ્લેટફોર્મ માટે નવા ફિચર્સ અને સુધારો માટે સીધી રીતે ફંડ મદદ કરશે. આનો અર્થ છે કે સમુદાય હંમેશા એવું સાધન મળશે જે ગોપનીયતાની રક્ષા કરે છે અને તમને તમારા ડેટાની નિયંત્રણમાં રહેવા દે છે." - } -} diff --git a/plugins/CoreHome/lang/he.json b/plugins/CoreHome/lang/he.json deleted file mode 100644 index 5d26550960e4646e67af6c31d2f8769e900d561b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/he.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "אין מידע בקטגוריה זו. נא לנסות \"לכלול את כלל האוכלוסייה\"", - "ChangePeriod": "עדכן תקופה", - "ChangeVisualization": "ערוך תצוגה", - "CheckForUpdates": "בדוק עדכונים", - "CheckPiwikOut": "בדוק את מטומו!", - "ChooseWebsite": "בחירת אתר", - "ChooseX": "בחר %1$s", - "ClickToEditX": "לחץ לעריכה %s", - "ClickToSeeFullInformation": "לחץ למידע מלא", - "CloseSearch": "סגור חיפוש", - "CloseWidgetDirections": "אתה יכול לסגור את הווידג'ט ע\"י לחיצה על ה 'X' בכותרת של הווידג'ט.", - "DataForThisReportHasBeenPurged": "המידע בדוח זה הוא בן למעלה מ %s חודשים והוא נגנז.", - "DataTableHowToSearch": "לחץ Enter או לחץ על סמלון החיפוש כדי לחפש", - "Default": "ברירת מחדל", - "DonateCall1": "תמיד השימוש ב-Matomo לא יעלה לך דבר, אך זה לא אומר שלהכין אותו לא עולה לנו כסף", - "DonateCall2": "מאמוטו זקוקה לתמיכה ממושכת כדי לצמוח ולגדול.", - "EndShortcut": "סוף", - "EnterZenMode": "כניסה למצב זן (להסתיר את התפריטים)", - "ExitZenMode": "יציאה ממצב זן (להציג את התפריטים)", - "ExternalHelp": "עזרה (נפתח בכרטיסייה חדשה)", - "HomeShortcut": "בית", - "MainNavigation": "ניווט מרכזי", - "Menu": "תפריט", - "PeriodRange": "טווח", - "PresetDateToday": "היום", - "PresetDateYesterday": "אתמול", - "SharePiwikShort": "Matomo! ניתוח רשת חינמי ופתוח. שליטה בנתונים של עצמך.", - "ShareThis": "שתף את זה", - "ShortcutCalendar": "לפתיחת לוח שנה (d מסמל תאריך (Date))", - "ShortcutHelp": "להציג את העזרה הזו", - "ShortcutRefresh": "לרענן את התוכן", - "ShortcutSearch": "לפתיחת החיפוש (f מסמל למצוא (Find))", - "ShortcutZenMode": "למצב זן", - "ShortcutsAvailable": "קיצורי דרך זמינים", - "ShowJSCode": "הצגת הJavaScript להטמעה", - "SkipToContent": "לדלג לתוכן", - "SubscribeAndBecomePiwikSupporter": "עבור לדף תשלום מאובטח לכרטיס אשראי (PayPal) כדי להפוך לתומך של מאמוטו!", - "SupportPiwik": "תמיכה ב-Matomo!", - "SupportUsOn": "עזרו לנו ב", - "SystemSummaryPhpVersion": "גרסת PHP", - "ThanksFromAllOfUs": "תודה לך מכולנו במאמוטו!", - "ThereIsNoDataForThisReport": "אין מידע להצגה עבור הדוח", - "ViewAllPiwikVideoTutorials": "צפייה בכל סרטי ההדרכה של Matomo", - "VisitTypeReturning": "חוזר", - "VisitTypeReturningCustomer": "לקוח חוזר", - "WebAnalyticsReports": "דוחות פעילות" - } -} diff --git a/plugins/CoreHome/lang/hi.json b/plugins/CoreHome/lang/hi.json deleted file mode 100644 index 946202d94449dd55e7b2213602f251f456ec7481..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/hi.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "इस श्रेणी में कोई डेटा नहीं । \"सभी लोगों को शामिल\" करने का प्रयास करें।", - "ChangePeriod": "अवधि बदलें", - "ChangeVisualization": "विज़ुअलाइज़ेशन बदलें", - "CheckForUpdates": "अद्यतन देखें", - "CheckPiwikOut": "Matomo की जाँच करें!", - "ChooseWebsite": "वेबसाइट चुनें", - "ChooseX": "%1$s चुनें", - "ClickToEditX": "%s को संपादित करने के लिए क्लिक करें", - "ClickToSeeFullInformation": "पूरी जानकारी देखने के लिए क्लिक करें", - "CloseSearch": "खोज बंद करें", - "CloseWidgetDirections": "आप विजेट के शीर्ष पर 'X' आइकन पर क्लिक करके इस विजेट बंद कर सकते हैं.", - "DataForThisReportHasBeenDisabled": "इस रिपोर्ट के लिए वर्तमान में विभाजन अक्षम है। अधिक विवरण के लिए कृपया %1$sthis FAQ%2$s देखें।", - "DataForThisReportHasBeenPurged": "इस रिपोर्ट के लिए डेटा %s महीनोंकी तुलना में अधिक पुराना है और शुद्ध किया गया है.", - "DataTableCombineDimensions": "आयाम अलग-अलग हैं%s संयुक्त आयाम दिखाएँ", - "DataTableExcludeAggregateRows": "कुल पंक्तियों %s को दिखाया जाता है उन्हें छुपाने", - "DataTableHowToSearch": "एंटर दबाएँ या खोज करने के लिए खोज चिह्न क्लिक करें", - "DataTableIncludeAggregateRows": "कुल पंक्तियों को छिपा रहे हैं, %s उन्हें दिखाओ", - "DataTableShowDimensions": "आयाम संयुक्त हैं %s अलग से आयाम दिखाएं", - "DateInvalid": "दिया गया दिनांक और अवधि संयोजन अमान्य है। कृपया दिनांक चयनकर्ता में एक मान्य दिनांक चुनें।", - "Default": "डिफ़ॉल्ट", - "DonateCall1": "Matomo उपयोग करने के लिए आपके कुछ भी खर्च नहीं होंगे, लेकिन यह मतलब नहीं बनाने के लिए कोई खर्च नहीं लगता है.", - "DonateCall2": "Matomo के बढ़ने और फूलने के लिए आपके निरंतर समर्थन की जरूरत है.", - "DonateCall3": "यदि आपको लगता है कि माटोमो ने आपके व्यवसाय या प्रयास में महत्वपूर्ण मूल्य जोड़ा है, तो %1$sकृपया%2$s या %3$spurchasing एक प्रीमियम विशेषता%4$s दान करने पर विचार करें। हर पैसा मदद करेगा।", - "EndShortcut": "समाप्ति", - "EnterZenMode": "ज़ेन मोड में प्रवेश करें (मेन्यू छुपाएं)", - "ExceptionNotAllowlistedIP": "आप इस मातोमो का उपयोग नहीं कर सकते क्योंकि आपके IP %s की अनुमति नहीं है।", - "ExcludeRowsWithLowPopulation": "सभी पंक्तियों %s को दिखाया जाता है कम आबादी बाहर निकालें", - "ExitZenMode": "ज़ेन मोड से बाहर निकलें (मेन्यू दिखाएँ)", - "ExternalHelp": "सहायता (नए टैब में खुलती है)", - "FlattenDataTable": "रिपोर्ट श्रेणीबद्ध %s है यह फ्लैट बनाओ है", - "FormatMetrics": "प्रारूप मेट्रिक्स", - "HideExportUrl": "निर्यात URL छुपाएं", - "HomeShortcut": "होमपेज", - "IncludeRowsWithLowPopulation": "कम आबादी के साथ पंक्तियाँ छिपे %s हुए हैं, सभी पंक्तियों दिखाएँ", - "InjectedHostEmailBody": "नमस्कार, मैं आज Matomo का उपयोग करने की कोशिश की और अज्ञात परिचारक नाम चेतावनी का सामना करना पड़ा.", - "InjectedHostEmailSubject": "Matomo एक अज्ञात परिचारक नाम से पहुँचा था: %s", - "InjectedHostNonSuperUserWarning": "सुरक्षित %2$s Matomo का उपयोग और इस चेतावनी को दूर करने के लिए यहां क्लिक %1$s करें. आप भी अपनी Matomo व्यवस्थापक से संपर्क करें और इस मुद्दे (%3$sईमेल के लिए यहां क्लिक %4$s करें) के बारे में उन्हें सूचित करना चाहिए", - "InjectedHostSuperUserWarning": "Matomo गलत हो सकता है (उदाहरण के लिए, अगर Matomo हाल ही में एक नया सर्वर या यूआरएल के लिए ले जाया गया था)आप या तो यहाँ %1$sक्लिक करें और परिचारक नाम वैध Matomo (यदि आप इसे पर भरोसा है अगर)%3$s के %4$s रूप में जोड़े%2$s, या यहाँ क्लिक करें और %5$sसुरक्षित रूप से Matomo तक पहुँच सकते हैं%6$s.", - "InjectedHostWarningIntro": "%2$sअब आप%1$s Matomo से पहुँच रहे हैं, लेकिन Matomo इस पते पर चलाने के लिए समाकृति किया गया है:", - "NoPrivilegesAskPiwikAdmin": "आप '%1$s' के रूप में लॉग इन किया है, लेकिन यह आपको Matomo में निर्धारित कोई भी अनुमति नहीं है लगता है. एक वेबसाइट पर 'दृश्य' पहुंच देने के लिए आपके %2$sMatomo व्यवस्थापक (ईमेल के लिए क्लिक करें)%3$s से पूछो.", - "PeriodRange": "सीमा", - "PresetDateToday": "आज", - "PresetDateYesterday": "कल", - "ReportGeneratedOn": "%s पर उत्पन्न रिपोर्ट", - "ReportGeneratedXAgo": "%s रिपोर्ट के पहले उत्पन्न", - "SharePiwikLong": "नमस्ते! मुझे अभी-अभी एक बेहतरीन मुफ्त सॉफ्टवेयर मिला है: माटोमो!\n\nMatomo आपको अपनी वेबसाइट पर आने वाले विज़िटर्स को निःशुल्क ट्रैक करने देगा। आपको निश्चित ही इसे परखना चाहिए!", - "SharePiwikShort": "Matomo! मुफ्त और ओपन सोर्स वेब विश्लेषण. आपके डेटा के मालिक हैं.", - "ShareThis": "यह साझा करें", - "ShowExportUrl": "निर्यात URL दिखाएं", - "ShowJSCode": "सम्मिलित करने के लिए जावास्क्रिप्ट कोड दिखाएँ", - "SubscribeAndBecomePiwikSupporter": "एक Matomo समर्थक बनने के लिए एक सुरक्षित क्रेडिट कार्ड भुगतान पृष्ठ (पेपैल) के लिए आगे बढ़ें!", - "SupportPiwik": "मातोमो का समर्थन करें!", - "SupportUsOn": "हमारा समर्थन करें", - "SystemSummaryPhpVersion": "PHP संस्करण", - "TableNoData": "इस तालिका के लिए कोई डेटा नहीं है .", - "ThereIsNoDataForThisReport": "इस रिपोर्ट के लिए कोई डाटा नहीं है.", - "UnFlattenDataTable": "रिपोर्ट फ्लैट %s है इसे श्रेणीबद्ध करें", - "ViewAllPiwikVideoTutorials": "सभी Matomo वीडियो ट्यूटोरियल देखें", - "WebAnalyticsReports": "वेब विश्लेषिकी रिपोर्टें", - "YouAreUsingTheLatestVersion": "आप Matomo का नवीनतम संस्करण का उपयोग कर रहे हैं!" - } -} diff --git a/plugins/CoreHome/lang/hr.json b/plugins/CoreHome/lang/hr.json deleted file mode 100644 index a7ae6a2595f049b067ed0ee1ffd7c9a1c2d41364..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/hr.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "CoreHome": { - "CheckForUpdates": "Traži nove verzije", - "ChooseWebsite": "Odaberi web-stranicu", - "Default": "standardno", - "EndDate": "Datum kraja", - "LearnMoreFullStop": "%1$sSaznaj više.%2$s", - "PresetDateToday": "Danas", - "PresetDateYesterday": "Jučer", - "ReadMoreOnlineGuide": "Saznaj više o ovoj temi u online vodiču.", - "ReportLowercase": "izvještaj", - "StartDate": "Datum početka" - } -} diff --git a/plugins/CoreHome/lang/hu.json b/plugins/CoreHome/lang/hu.json deleted file mode 100644 index 4178ec273d948082d33be96ea14ff7f37b831484..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/hu.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Nincs adat ebben a kategóriában. Próbáld meg a \"Tartalmazza a teljes populációt\" opciót.", - "ChooseWebsite": "Válassz weboldalt", - "NoPrivilegesAskPiwikAdmin": "'%1$s' felhasználóként léptél be, de úgy tűnik, hogy nem rendelkezel semmilyen jogosultsággal. %2$s Kérd meg a Matomo adminisztrátorod (kattints ide egy email írásához)%3$s, hogy adjon számodra 'megtekintési' jogosultságot a webhelyhez.", - "PresetDateToday": "Ma", - "PresetDateYesterday": "Tegnap", - "Segments": "Szegmensek", - "ShowJSCode": "Mutasd a JavaScript kódot a beillesztéshez", - "SystemSummaryPhpVersion": "PHP verzió", - "ThereIsNoDataForThisReport": "Nincs adat ehhez a jelentéshez.", - "WebAnalyticsReports": "Webanalitikai jelentések" - } -} diff --git a/plugins/CoreHome/lang/hy.json b/plugins/CoreHome/lang/hy.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/hy.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/id.json b/plugins/CoreHome/lang/id.json deleted file mode 100644 index e5aa84832d0f267cd02a67ec0c790c43c3e3e665..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/id.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Jika Anda menggunakan pemblokir iklan, harap nonaktifkan untuk situs ini untuk memastikan Matomo berfungsi tanpa masalah.", - "AddTotalsRowDataTable": "Laporan tidak menampilkan baris total %s Tampilkan baris total", - "CategoryNoData": "Tak ada data untuk kategori ini. Coba untuk \"Masukkan seluruh populasi\".", - "ChangeCurrentWebsite": "Pilih situs web, situs web yang saat ini dipilih: %s", - "ChangePeriod": "Ubah periode", - "ChangeVisualization": "Ubah visualisasi", - "CheckForUpdates": "Periksa pembaruan", - "CheckPiwikOut": "Periksa Matomo!", - "ChooseWebsite": "Pilih situs web", - "ChooseX": "Pilih %1$s", - "ClickRowToExpandOrContract": "Klik baris ini untuk memperluas atau mengontrak subtabel.", - "ClickToEditX": "Klik untuk mengubah %s", - "ClickToSeeFullInformation": "Klik untuk melihat informasi lengkap", - "CloseSearch": "Tutup pencarian", - "CloseWidgetDirections": "Anda dapat menutup widget ini dengan mengklik ikon 'X' di bagian atas widget.", - "CopyModalNote": "%1$sCatatan:%2$s %3$s yang disalin mungkin memerlukan penyesuaian jika mencakup referensi yang spesifik untuk website asli. Tinjau pengaturan untuk memastikan kompatibilitas.", - "CopyX": "Salin %1$s", - "CopyXDescription": "Pilih website untuk menyalin %1$s ini ke sana. Ini akan membuat salinan persis, termasuk pengaturan, di situs yang dipilih.", - "CssDidntLoad": "Peramban Anda tidak dapat memuat gaya halaman ini.", - "CustomLimit": "Batas khusus", - "DataForThisReportHasBeenDisabled": "Segmentasi untuk laporan ini saat ini dinonaktifkan. Silakan periksa %1$sFAQ ini%2$s untuk detail selengkapnya.", - "DataForThisReportHasBeenPurged": "Data untuk laporan ini telah berumur lebih dari %s bulan dan telah dibersihkan.", - "DataTableCombineDimensions": "Dimensi ditampilkan secara terpisah %s Tampilkan dimensi gabungan", - "DataTableExcludeAggregateRows": "Baris agregat ditampilkan %s Sembunyikan", - "DataTableHowToSearch": "Tekan enter atau klik ikon pencarian untuk mencari", - "DataTableIncludeAggregateRows": "Baris agregat disembunyikan %s Perlihatkan", - "DataTableShowDimensions": "Dimensi digabungkan %s Tampilkan dimensi secara terpisah", - "DateInvalid": "Kombinasi tanggal dan periode yang diberikan tidak valid. Harap pilih tanggal yang valid di pemilih tanggal.", - "Default": "asali", - "DevicesSubcategoryHelp": "Bagian Perangkat membantu Anda memahami teknologi yang digunakan oleh pengunjung untuk mengakses situs. Anda akan melihat laporan tentang jenis perangkat dan model tertentu untuk memungkinkan Anda mengoptimalkan situs Anda untuk perangkat yang paling populer.", - "DonateCall1": "Anda tidak perlu mengeluarkan biaya apa pun untuk memakai Matomo, tetapi bukan berarti kami tidak mengeluarkan biaya apa pun untuk membuatnya.", - "DonateCall2": "Matomo membutuhkan bantuan berkelanjutan Anda untuk tumbuh dan berkembang.", - "DonateCall3": "Jika Anda merasa bahwa Matomo telah memberi nilai signifikan bagi bisnis atau usaha Anda, %1$sharap pertimbangkan untuk menyumbang%2$s atau %3$smembeli fitur premium%4$s. Setiap sen akan sangat membantu.", - "EndDate": "Tanggal Akhir", - "EndShortcut": "Akhir", - "EngagementSubcategoryHelp1": "Bagian Keterlibatan memberikan laporan yang membantu menghitung jumlah pengunjung baru dan pengunjun yang kembali. Anda juga dapat meninjau laporan yang memecah waktu rata-rata dan jumlah halaman per kunjungan, serta frekuensi pengunjung yang mengunjungi situs Anda dan jumlah hari kunjungan.", - "EngagementSubcategoryHelp2": "Ini dapat membantu Anda untuk mengoptimalkan frekuensi dan tingkat interaksi kunjungan demi memaksimalkan jangkauan Anda.", - "EnterZenMode": "Masuk ke mode Zen (sembunyikan menu)", - "ExceptionNotAllowlistedIP": "Anda tidak dapat menggunakan Matomo karena IP Anda %s tidak diperbolehkan.", - "ExcludeRowsWithLowPopulation": "Semua baris ditampilkan %s Kecualikan populasi yang rendah", - "ExitZenMode": "Keluar dari mode Zen (tampilkan menu)", - "ExpandSubtables": "Perluas subtabel", - "ExportFormat": "Format ekspor", - "ExportTooltip": "Catatan: Untuk menggunakan URL ekspor yang dihasilkan, Anda harus menentukan autentikasi token aplikasi. Anda dapat mengatur token ini di Admin → Keamanan → Token Auths.", - "ExportTooltipWithLink": "Catatan: Untuk menggunakan URL ekspor yang dihasilkan, Anda harus menentukan autentikasi token aplikasi. Anda dapat mengatur token ini di %1$s[Admin → Keamanan → Auths Tokens]%2$s. Ganti %3$s di URL Ekspor dengan token Auth Anda. Peringatan: Jangan pernah membagikan URL yang berisi token asli kepada orang lain.", - "ExternalHelp": "Bantuan (terbuka di tab baru)", - "FlattenDataTable": "Laporan ini hierarkis %s Tampilkan secara datar", - "FlattenReport": "Ratakan laporan", - "FormatMetrics": "Format metrik", - "HideExportUrl": "Sembunyikan URL Ekspor", - "HomeShortcut": "Beranda", - "IncludeDimensionsSeparately": "Sertakan dimensi secara terpisah", - "IncludeRowsWithLowPopulation": "Baris dengan populasi rendah disembunyikan %s Tampilkan semua baris", - "InjectedHostEmailBody": "Halo, saya mencoba mengakses Matomo hari ini dan menemukan peringatan nama host yang tidak dikenal.", - "InjectedHostEmailSubject": "Matomo diakses dengan nama host yang tidak diketahui: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlik di sini untuk mengkases Matomo secara aman%2$s dan menghapus peringatan ini. Anda juga dapat menghubungi pengelola Matomo Anda dan memberi tahu tentang permasalahan ini (%3$sklik di sini untuk surel%4$s).", - "InjectedHostSuperUserWarning": "Matomo mungkin salah dikonfigurasi (misalnya, jika Matomo baru saja dipindahkan ke server atau URL baru). Anda dapat %1$sklik di sini dan menambahkan %2$s sebagai nama host Matomo yang valid (jika Anda memercayainya)%3$s atau %4$sklik di sini dan pergi ke %5$s untuk mengakses Matomo dengan aman%6$s.", - "InjectedHostWarningIntro": "Sekarang Anda mengakses Matomo dari %1$s, tetapi Matomo telah diatur untuk berjalan di alamat ini: %2$s.", - "InvalidComparisonDateRange": "Masukkan rentang tanggal perbandingan yang valid.", - "JavascriptDisabled": "JavaScript harus diaktifkan agar Anda dapat menggunakan Matomo dalam tampilan standar.
Namun, tampaknya JavaScript dinonaktifkan atau tidak didukung oleh peramban Anda.
Untuk menggunakan tampilan standar, aktifkan JavaScript dengan mengubah opsi peramban Anda , lalu %1$scoba lagi%2$s.
", - "JsDidntLoad": "Peramban Anda tidak dapat memuat skrip halaman ini.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Platform analitik terbuka terkemuka yang menghormati privasi Anda.", - "LearnMoreFullStop": "%1$sPelajari lebih lanjut.%2$s", - "MacPageDown": "Fn + Panah kanan", - "MacPageUp": "Fn + Panah kiri", - "MainNavigation": "Navigasi utama", - "Menu": "Menu", - "MenuEntries": "Entri menu", - "NoPrivilegesAskPiwikAdmin": "Anda masuk sebagai '%1$s' tetapi sepertinya Anda tidak memiliki izin apapun di Matomo. %2$s Tanyakan kepada pengelola Matomo Anda (klik untuk kirim surel)%3$s untuk memberikan akses 'Lihat' ke situs.", - "NoSuchPage": "Halaman ini tidak ada", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Pembaruan sekali klik tidak tersedia karena Anda menggunakan Matomo dengan banyak server. Silakan unduh versi terbaru dari %1$s untuk melanjutkan.", - "OnlyForSuperUserAccess": "Widget ini ditampilkan di dasbor bawaan hanya untuk pengguna yang memiliki akses Pengguna Super.", - "PageDownShortcutDescription": "untuk sampai ke bagian bawah halaman", - "PageUpShortcutDescription": "untuk sampai ke bagian atas halaman", - "PeriodHasOnlyRawData": "Sepertinya laporan untuk periode ini belum diproses. Apakah Anda ingin melihat apa yang terjadi sekarang? Lihat %1$sLog kunjungan%2$s atau pilih periode tanggal yang berbeda hingga laporan dibuat.", - "PeriodHasOnlyRawDataNoVisitsLog": "Sepertinya laporan untuk jangka waktu ini belum diproses, tetapi akan tersedia dalam beberapa jam. Anda bisa memilih periode tanggal yang berbeda hingga laporan tersebut dibuat.", - "PeriodRange": "Rentang", - "PivotBySubtable": "Laporan ini tidak dipivot %1$s Dipivot berdasarkan %2$s", - "PresetDateLast30Days": "30 hari terakhir", - "PresetDateLast7Days": "7 hari terakhir", - "PresetDateLast90Days": "90 hari terakhir", - "PresetDateLastMonth": "Bulan terakhir", - "PresetDateLastQuarter": "Kuartal terakhir", - "PresetDateLastWeekMonSun": "Minggu terakhir (Sen - Min)", - "PresetDateLastYear": "Tahun terakhir", - "PresetDateThisMonth": "Bulan ini", - "PresetDateThisQuarter": "Kuartal ini", - "PresetDateThisWeekMonToday": "Minggu ini (Sen - Hari ini)", - "PresetDateThisYear": "Tahun ini", - "PresetDateToday": "Hari ini", - "PresetDateYesterday": "Kemarin", - "Profilable": "Dapat diprofilkan", - "ProfilableSegmentHelp": "1 untuk dapat diprofilkan (misalnya cookie digunakan), 0 untuk tidak dapat diprofilkan (misalnya cookie tidak digunakan)", - "QuickAccessTitle": "Telusuri %s. Gunakan tombol panah untuk menavigasi hasil pencarian. Pintasan: Tekan 'f' untuk mencari.", - "QuickLinks": "Tautan Cepat", - "ReadMoreOnlineGuide": "Baca lebih lanjut tentang topik ini di panduan daring.", - "RemoveTotalsRowDataTable": "Laporan menunjukkan baris total %s Hapus baris total", - "ReportConfigure": "Konfigurasi laporan ini", - "ReportGeneratedOn": "Laporan dibuat dalam %s", - "ReportGeneratedXAgo": "Laporan dibuat %s lalu", - "ReportLowercase": "laporan", - "ReportType": "Tipe laporan", - "ReportWithMetadata": "Laporan dengan metadata", - "ReportingCategoryHelpPrefix": "Bagaimana halaman pelaporan \"%1$s → %2$s\" membantu saya?", - "RowLimit": "Batas baris", - "SearchOnMatomo": "Cari '%1$s' di Matomo.org", - "SeeAvailableVersions": "Lihat Versi yang Tersedia", - "Segments": "Segmen", - "SharePiwikLong": "Hai! Saya baru saja menemukan perangkat lunak gratis yang hebat yaitu Matomo!\n\nMatomo memungkinkan Anda untuk melacak pengunjung situs web Anda secara gratis. Anda benar-benar harus mengeceknya!", - "SharePiwikShort": "Matomo! Analisis web gratis/libre. Miliki data Anda.", - "ShareThis": "Bagikan ini", - "ShortcutCalendar": "untuk membuka kalender (d singkatan dari Tanggal)", - "ShortcutHelp": "untuk menampilkan bantuan ini", - "ShortcutRefresh": "untuk menyegarkan konten", - "ShortcutSearch": "untuk membuka pencarian (f singkatan dari Cari)", - "ShortcutSegmentSelector": "untuk membuka pemilih Segmen", - "ShortcutWebsiteSelector": "untuk membuka pemilih Situs Web", - "ShortcutZenMode": "untuk mode Zen", - "ShortcutsAvailable": "Pintasan yang tersedia", - "ShowExportUrl": "Tampilkan URL Ekspor", - "ShowJSCode": "Tampilkan kode JavaScript untuk disisipkan", - "SkipToContent": "Lewati ke konten", - "SoftwareSubcategoryHelp": "Bagian Perangkat Lunak menunjukkan sistem operasi, peramban, dan pengaya yang digunakan oleh pengunjung Anda untuk mengakses situs sehingga Anda dapat mengoptimalkan situs untuk memastikannya kompatibel sepenuhnya dengan konfigurasi yang paling populer.", - "StandardReport": "Laporan standar", - "StartDate": "Tanggal Awal", - "SubscribeAndBecomePiwikSupporter": "Lanjutkan ke halaman pembayaran kartu kredit yang aman (Paypal) untuk menjadi Pendukung Matomo!", - "SupportPiwik": "Dukung Matomo!", - "SupportUsOn": "Dukung kami di", - "SystemSummaryMysqlVersion": "Versi MySQL", - "SystemSummaryNActivatedPlugins": "%d pengaya yang diaktifkan", - "SystemSummaryNSegments": "%1$d segmen", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmen (%2$s telah diproses sebelumnya, %3$s diproses secara waktu nyata)", - "SystemSummaryNWebsites": "%d situs web", - "SystemSummaryPhpVersion": "Versi PHP", - "SystemSummaryPiwikVersion": "Versi Matomo", - "SystemSummaryWidget": "Ringkasan Sistem", - "TableNoData": "Tidak ada data untuk tabel ini.", - "TechDeprecationWarning": "Mulai dari versi Matomo %1$s, Matomo akan mengakhiri dukungan untuk %2$s. Untuk informasi lebih lanjut %3$slihat postingan blog kami.%4$s", - "ThanksFromAllOfUs": "Terima kasih dari kami semua di Matomo!", - "ThereIsNoDataForThisReport": "Tidak ada data untuk laporan ini.", - "UnFlattenDataTable": "Laporan ditampilkan secara datar %s Buat berurutan", - "UndoPivotBySubtable": "Laporan ini telah dipivot %s Batalkan pivot", - "ViewAllPiwikVideoTutorials": "Tampilkan seluruh Video Tutorial Matomo", - "VisitStatusOrdered": "Dipesan", - "VisitStatusOrderedThenAbandoned": "Dipesan lalu Keranjang Ditinggalkan", - "VisitTypeReturning": "Kembali", - "VisitTypeReturningCustomer": "Pelanggan yang Kembali", - "VisitorsCategoryHelp1": "Halaman Pengunjung memberi tahu Anda banyak hal tentang siapa pengunjung Anda. Hal-hal seperti dari mana pengunjung Anda berasal, perangkat dan peramban apa yang mereka gunakan, dan kapan mereka biasanya mengunjungi situs web Anda. Pahami secara keseluruhan siapa audiens Anda dan cari anomali untuk melihat bagaimana audiens Anda bisa tumbuh.", - "VisitorsCategoryHelp2": "Selain informasi umum tentang pengunjung, Anda juga dapat menggunakan %1$sLog Kunjungan%2$s untuk melihat apa yang terjadi di setiap kunjungan individu.", - "VisitorsOverviewHelp": "Ikhtisar Pengunjung membantu Anda dalam memahami popularitas situs Anda. Ini dilakukan dengan menyediakan bagan yang menunjukkan berapa banyak kunjungan yang diterima situs Anda selama periode yang dipilih dan tingkat keterlibatan rata-rata untuk fitur utama, seperti pencarian dan unduhan.", - "WebAnalyticsReports": "Laporan Analisis Web", - "YouAreUsingTheLatestVersion": "Anda menggunakan versi Matomo terbaru!", - "YourDonationWillHelp": "Donasi Anda secara langsung akan membantu mendanai fitur dan peningkatan baru untuk platform analitik sumber terbuka ini. Ini berarti komunitas akan selalu mendapat manfaat dari alat yang melindungi privasi dan memungkinkan Anda untuk tetap mengontrol data Anda." - } -} diff --git a/plugins/CoreHome/lang/is.json b/plugins/CoreHome/lang/is.json deleted file mode 100644 index 7103a77958249feecffb1dcb625b0d32effc63eb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/is.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "CoreHome": { - "ChooseWebsite": "Veldu vef", - "PresetDateToday": "Í dag", - "PresetDateYesterday": "Í gær", - "ShowJSCode": "Sýna JavaScript kóða til að setja inn", - "ThereIsNoDataForThisReport": "Það eru eingin gögn til fyrir þessa skýrslu" - } -} diff --git a/plugins/CoreHome/lang/it.json b/plugins/CoreHome/lang/it.json deleted file mode 100644 index 82d11839e035b1f2bfc24b5ed2fd6a6efaf88b53..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/it.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Se stai utilizzando un plugin di blocco della pubblicità, disabilitalo per questo sito, per essere sicuro che Matomo lavori senza problemi.", - "AddTotalsRowDataTable": "Questo report non sta mostrando la riga dei totali %s. Mostra la riga dei totali", - "CategoryNoData": "Non ci sono dati in questa categoria. Prova ad includere tutte le categorie.", - "ChangeCurrentWebsite": "Scegli un sito, attualmente è selezionato: %s", - "ChangePeriod": "Cambia periodo", - "ChangeVisualization": "Cambia la visualizzazione", - "CheckForUpdates": "Cerca aggiornamenti", - "CheckPiwikOut": "Controlla Matomo!", - "ChooseWebsite": "Scegli il sito web", - "ChooseX": "Scegli %1$s", - "ClickRowToExpandOrContract": "Clicca su questa riga per espandere o restringere la sotto-tabella.", - "ClickToEditX": "Clicca per modificare %s", - "ClickToSeeFullInformation": "Clicca per vedere le informazioni complete", - "CloseSearch": "Chiudi la ricerca", - "CloseWidgetDirections": "Potete chiudere questo widget cliccando sull'icona 'X' nella parte alta del widget stesso.", - "CopyModalNote": "%1$sNota:%2$s Potrebbe essere necessario apportare modifiche alla copia %3$s se include riferimenti specifici al sito web originale. Rivedi le impostazioni per assicurarti la compatibilità.", - "CopyX": "Copia %1$s", - "CopyXDescription": "Seleziona il sito web in cui copiare questo %1$s. Verrà creata una copia esatta, impostazioni incluse, nel sito scelto.", - "CssDidntLoad": "Il tuo browser non ha potuto caricare lo stile di questa pagina.", - "CustomLimit": "Limite personalizzato", - "DataForThisReportHasBeenDisabled": "La segmentazione é disabilitata al momento per questo documento. Per maggiori dettagli controllate %1$s la sezione Domande Frequenti%2$s perfavore.", - "DataForThisReportHasBeenPurged": "I dati di questo report hanno più di un mese %s e sono stati eliminati.", - "DataTableCombineDimensions": "Le dimensioni sono separate %s Mostra le dimensioni combinate", - "DataTableExcludeAggregateRows": "Le righe di aggregazione sono visibili. %s Nascondile", - "DataTableHowToSearch": "Premi Invio o clicca sull'icona per cercare", - "DataTableIncludeAggregateRows": "Le righe di aggregazione sono nascoste %s Visualizzale", - "DataTableShowDimensions": "Le dimensioni sono combinate %s Mostra le dimensioni separatamente", - "DateInvalid": "La combinazione data e periodo inserita non è valida. Scegli una data valida dal selettore di data.", - "Default": "predefinito", - "DevicesSubcategoryHelp": "La sezione Dispositivi ti aiuta a capire la tecnologia che i tuoi visitatori utilizzano per accedere al tuo sito. Vedrai dei report sul tipo di dispositivo e sui modelli specifici per consentirti di ottimizzare il tuo sito per i dispositivi più popolari.", - "DonateCall1": "Matomo non costerà mai nulla a voi per il suo utilizzo, ma ciò non significa che non costi nulla a noi svilupparlo.", - "DonateCall2": "Matomo ha bisogno del vostro costante supporto per crescere e prosperare.", - "DonateCall3": "Se ritieni che Matomo abbia portato alla tua attività un significativo valore aggiunto, %1$sconsidera di fare una donazione%2$s o di %3$sacquistare una funzionalità premium%4$s. Anche gli spiccioli aiutano.", - "EndDate": "Data di Fine", - "EndShortcut": "Fine", - "EngagementSubcategoryHelp1": "La sezione Engagement fornisce dei report che aiutano a quantificare il numero di visitatori nuovi e di ritorno che ricevi. Puoi anche esaminare i report che dettagliano il tempo medio e il numero di pagine per visita, nonché il numero di volte in cui un visitatore è stato sul tuo sito e il numero abituale di giorni che intercorrono tra le visite.", - "EngagementSubcategoryHelp2": "Questo può aiutarti a ottimizzare la frequenza e le visite ad alta interazione oltre a massimizzare la tua copertura.", - "EnterZenMode": "Entra in modalità Zen (nascondi i menù)", - "ExceptionNotAllowlistedIP": "Non puoi utilizzare questo Matomo in quanto il tuo IP %s non è abilitato.", - "ExcludeRowsWithLowPopulation": "Tutte le righe sono visualizzate %s Escludi quelle scarsamente popolate", - "ExitZenMode": "Esci dalla modalità Zen (mostra i menù)", - "ExpandSubtables": "Espandi sottotabelle", - "ExportFormat": "Esporta formato", - "ExportTooltip": "Nota: per utilizzare l'URL di esportazione generato, sarà necessario specificare un token auth dell'applicazione. Puoi configurare questi token in Admin → Sicurezza → Token Auth.", - "ExportTooltipWithLink": "Nota: per utilizzare l'URL di esportazione generato, sarà necessario specificare un token auth dell'applicazione. È possibile configurare questi token in %1$s[Admin → Sicurezza → Token Auth]%2$s. Sostituisci %3$s nell'URL di esportazione con il tuo token auth. Attenzione: non condividere mai con nessun altro l'URL con il token reale.", - "ExternalHelp": "Aiuto (apri in una nuova scheda)", - "FlattenDataTable": "Il report è gerarchico %s Rendilo piatto", - "FlattenReport": "Report piatto", - "FormatMetrics": "Formatta metriche", - "HideExportUrl": "Nascondi URL Esportazione", - "HomeShortcut": "Home", - "IncludeDimensionsSeparately": "Includi le dimensioni separatamente", - "IncludeRowsWithLowPopulation": "Le righe con popolazione bassa sono nascoste %s Mostra tutte le righe", - "InjectedHostEmailBody": "Salve, oggi ho provato ad accedere a Matomo e ho incontrato un avvertimento per nome host sconosciuto.", - "InjectedHostEmailSubject": "Si sta accedendo a Matomo con un nome host sconosciuto: %s", - "InjectedHostNonSuperUserWarning": "%1$sClicca qui per accedere a Matomo in maniera sicura%2$s e rimuovere questo avvertimento. Puoi anche voler contattare il tuo amministratore di Matomo per avvisare di questo problema (%3$sclicca qui per inviare un'email%4$s).", - "InjectedHostSuperUserWarning": "Matomo può essere configurato in modo errato (ad esempio, se Matomo è stato recentemente spostato in un nuovo server o URL). È possibile anche %1$s cliccare qui e aggiungere %2$s come hostname valido per Matomo (se ti fidi di esso)%3$s, o %4$scliccare qui e andare a %5$s per accedere in modo sicuro a Matomo%6$s.", - "InjectedHostWarningIntro": "Stai accedendo a Matomo da %1$s ma Matomo è stato configurato per girare a questo indirizzo: %2$s.", - "JavascriptDisabled": "Perché tu possa usare Matomo in visualizzazione standard, JavaScript deve essere abilitato.
Comunque sembra che JavaScript sia disabilitato o non supportato dal tuo browser.
Per usare la visualizzazione standard, abilita JavaScript cambiando le opzioni del tuo browser, poi %1$sprova ancora%2$s.
", - "JsDidntLoad": "Il tuo browser non ha potuto caricare gli script di questa pagina.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "La piattaforma gratuita di analisi web che rispetta la tua privacy.", - "LearnMoreFullStop": "%1$sScopri di più.%2$s", - "MacPageDown": "Fn + Freccia a destra", - "MacPageUp": "Fn + Freccia a sinistra", - "MainNavigation": "Navigazione principale", - "Menu": "Menu", - "MenuEntries": "Ingressi da menù", - "NoPrivilegesAskPiwikAdmin": "Hai effettuato l'accesso come '%1$s', ma a quanto pare non disponi di alcuna autorizzazione in Matomo. %2$sContatta l'amministratore Matomo (clicca per e-mail)%3$s per avere un accesso che ti consenta di 'vedere' un sito web.", - "NoSuchPage": "Questa pagina non esiste", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "L'aggiornamento in un click non è disponibile se stai utilizzando Matomo con server multipli. Si prega di scaricare l'ultima versione da %1$s per procedere.", - "OnlyForSuperUserAccess": "Questo widget è visualizzato sulla dashboard predefinita solo per gli utenti che hanno accesso come Super User.", - "PageDownShortcutDescription": "per andare in fondo alla pagina", - "PageUpShortcutDescription": "per andare in cima alla pagina", - "PeriodHasOnlyRawData": "Sembra che i report per questo periodo non siano stati ancora elaborati. Vuoi vedere cosa sta succedendo adesso? Controlla il %1$sRegistro delle visite%2$s o scegli un diverso intervallo di date fino alla generazione dei report.", - "PeriodHasOnlyRawDataNoVisitsLog": "Sembra che i report per questo periodo non siano ancora stati elaborati, ma saranno disponibili tra qualche ora. Puoi scegliere un periodo di tempo diverso finché i report non saranno generati.", - "PeriodRange": "Intervallo", - "PivotBySubtable": "Questo report non è imperniato al Pivot %1$s da %2$s", - "PresetDateToday": "Oggi", - "PresetDateYesterday": "Ieri", - "Profilable": "Profilabili", - "ProfilableSegmentHelp": "1 per profilabile (ad esempio sono stati utilizzati cookie), 0 per non profilabile (ad esempio non sono stati utilizzati cookie)", - "QuickAccessTitle": "Ricerca per %s. Utilizza i tasti freccia per navigare tra i risultati della ricerca. Scorciatoia: premi 'f' per cercare.", - "QuickLinks": "Link Rapidi", - "ReadMoreOnlineGuide": "Leggi altro su questo argomento nella guida online.", - "RemoveTotalsRowDataTable": "Questo report sta mostrando la riga dei totali %s. Rimuovi la riga dei totali", - "ReportGeneratedOn": "Report generato il %s", - "ReportGeneratedXAgo": "Report generato %s fa", - "ReportLowercase": "rapporto", - "ReportType": "Tipo di report", - "ReportWithMetadata": "Report con metadati", - "ReportingCategoryHelpPrefix": "In che modo la pagina dei report \"%1$s → %2$s\" può aiutarmi?", - "RowLimit": "Limite riga", - "SearchOnMatomo": "Cerca '%1$s' su matomo.org", - "SeeAvailableVersions": "Vedi le Versioni Disponibili", - "Segments": "Segmenti", - "SharePiwikLong": "Ciao! Ho trovato un grande esempio di software gratuito: Matomo!\n\nMatomo traccerà gratuitamente i visitatori del tuo sito web. Devi assolutamente provarlo!", - "SharePiwikShort": "Matomo! Analisi web gratuita. Trattieni i tuoi dati.", - "ShareThis": "Condividi", - "ShortcutCalendar": "per aprire il calendario (d sta per Data)", - "ShortcutHelp": "per mostrare questo aiuto", - "ShortcutRefresh": "per aggiornare l'attuale visualizzazione", - "ShortcutSearch": "per aprire la ricerca (f sta per Trova)", - "ShortcutSegmentSelector": "per aprire il Selettore di segmenti", - "ShortcutWebsiteSelector": "per aprire il Selettore di siti", - "ShortcutZenMode": "per la modalità Zen", - "ShortcutsAvailable": "Shortcut disponibili", - "ShowExportUrl": "Mostra URL Esportazione", - "ShowJSCode": "Mostra il codice JavaScript da inserire", - "SkipToContent": "Vai al contenuto", - "SoftwareSubcategoryHelp": "La sezione Software mostra i sistemi operativi, i browser e i plugin che i tuoi visitatori stanno utilizzando per accedere al sito, in modo da poterlo ottimizzare per assicurarti che sia completamente compatibile con le configurazioni più diffuse.", - "StandardReport": "Report standard", - "StartDate": "Data di Inizio", - "SubscribeAndBecomePiwikSupporter": "Procedi su una pagina sicura di pagamento con carta di credito (Paypal) per diventare un Sostenitore di Matomo!", - "SupportPiwik": "Sostieni Matomo!", - "SupportUsOn": "Sostienici su", - "SystemSummaryMysqlVersion": "Versione MySQL", - "SystemSummaryNActivatedPlugins": "%d plugin attivati", - "SystemSummaryNSegments": "%1$d segmenti", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmenti (%2$s pre-elaborati. %3$s elaborati in tempo reale)", - "SystemSummaryNWebsites": "%d siti web", - "SystemSummaryPhpVersion": "Versione PHP", - "SystemSummaryPiwikVersion": "Versione di Matomo", - "SystemSummaryWidget": "Riepilogo Sistema", - "TableNoData": "Nessun dato per questa tabella.", - "TechDeprecationWarning": "A partire dalla versione Matomo%1$s, Matomo terminerà il supporto per %2$s. Per maggiori informazioni %3$sconsulta il post sul blog.%4$s", - "ThanksFromAllOfUs": "Grazie da tutti noi per avere utilizzato Matomo!", - "ThereIsNoDataForThisReport": "Non c'è nessun dato in questo report.", - "UnFlattenDataTable": "Il report è piatto %s Rendilo gerarchico", - "UndoPivotBySubtable": "Questo report è stato imperniato al Pivot %s Undo", - "ViewAllPiwikVideoTutorials": "Vedi tutti i Video Tutorial di Matomo", - "VisitStatusOrdered": "Ordinati", - "VisitStatusOrderedThenAbandoned": "Ordinati poi Carrello Abbandonato", - "VisitTypeReturning": "Ritorno", - "VisitTypeReturningCustomer": "Cliente di Ritorno", - "VisitorsCategoryHelp1": "Le pagine dei visitatori ti dicono delle cose su chi sono i tuoi visitatori. Cose come la provenienza dei tuoi visitatori, quali dispositivi e browser stanno utilizzando e quando, di solito, visitano il tuo sito web. Comprendi, nel complesso, chi è il tuo pubblico e cerca valori anomali per vedere come potrebbe crescere.", - "VisitorsCategoryHelp2": "Oltre alle informazioni generali sui tuoi visitatori, puoi anche utilizzare il %1$sRegistro delle visite%2$s per vedere cosa è successo in ogni singola visita.", - "VisitorsOverviewHelp": "La panoramica sui visitatori ti aiuta a capire la popolarità del tuo sito. Lo fa fornendo grafici che mostrano quante visite sta ricevendo il tuo sito in un periodo selezionato e il livello medio di coinvolgimento per le funzionalità chiave, come ricerche e download.", - "WebAnalyticsReports": "Report Web Analytics", - "YouAreUsingTheLatestVersion": "Stai utilizzando l'ultima versione di Matomo!", - "YourDonationWillHelp": "La tua donazione aiuterà direttamente a finanziare nuove funzionalità e miglioramenti per questa piattaforma di analisi open source. Ciò significa che la comunità beneficerà sempre di uno strumento che protegge la privacy e ti consente di mantenere il controllo dei tuoi dati." - } -} diff --git a/plugins/CoreHome/lang/ja.json b/plugins/CoreHome/lang/ja.json deleted file mode 100644 index 9db5113a89334e5a1365892291b792c3137923d3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ja.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "広告ブロッカーを使用している場合には、Matomo が問題なく動作することを確認するために、このサイトでそれを無効にしてください。", - "AddTotalsRowDataTable": "レポートに合計 %s 行が表示されていません 合計行を表示する", - "CategoryNoData": "このカテゴリのデータはありません。 「すべての人口を含める」ようにしてください。", - "ChangeCurrentWebsite": "ウェブサイトを選ぶ 現在選択されている Web サイト:%s", - "ChangePeriod": "期間を変更する", - "ChangeVisualization": "ビジュアルの変更", - "CheckForUpdates": "アップデートの確認", - "CheckPiwikOut": "Matomo をチェックしてください!", - "ChooseWebsite": "ウェブサイトを選択", - "ChooseX": "%1$s を選択", - "ClickRowToExpandOrContract": "サブテーブルを拡大または縮小するには、この列をクリックしてください。", - "ClickToEditX": "クリックして %s を編集", - "ClickToSeeFullInformation": "クリックすると詳しい情報が表示されます", - "CloseSearch": "クローズ検索", - "CloseWidgetDirections": "このウィジェットを閉じるには、ウィジェットの上部にある ' × ' アイコンをクリックします。", - "CssDidntLoad": "お使いのブラウザではこのページのスタイルを読み込めませんでした。", - "CustomLimit": "カスタム制限", - "DataForThisReportHasBeenDisabled": "現在、このレポートではセグメンテーションが無効になっています。 詳細については、%1$sこのFAQ%2$sを確認してください。", - "DataForThisReportHasBeenPurged": "このレポートのデータは、%sヶ月以上経過しており、パージされています。", - "DataTableCombineDimensions": "ディメンションは %s で別々に表示されています。組み合わせたディメンションを表示", - "DataTableExcludeAggregateRows": "%s で表示している集計行を非表示にする", - "DataTableHowToSearch": "Enter を押すか検索アイコンをクリックして検索します", - "DataTableIncludeAggregateRows": "%sで非表示にしている集計行を表示する", - "DataTableShowDimensions": "ディメンションは %s の合計です。ディメンションを別々に表示", - "DateInvalid": "指定された日付と期間の組み合わせは無効です。 日付セレクターで有効な日付を選択してください。", - "Default": "デフォルト", - "DevicesSubcategoryHelp": "[デバイス]セクションは、ビジターがサイトにアクセスするために使用しているテクノロジーを理解するのに役立ちます。 最も人気のあるデバイス用にサイトを最適化できるように、デバイスのタイプと特定のモデルに関するレポートが表示されます。", - "DonateCall1": "Matomo は無料でご利用いただけますが、 Matomo の制作に費用がかかっていないと言う意味ではありません。", - "DonateCall2": "Matomo の成長と発展には、みなさんの継続的なご支援が必要です。", - "DonateCall3": "Matomo がビジネスや努力に重大な付加価値を感じる場合は、%3$sプレミアム機能を購入%4$sまたは%1$s寄付する%2$sことをご検討ください。 すべての寄付金が助けになるでしょう。", - "EndDate": "終了日", - "EndShortcut": "終了", - "EngagementSubcategoryHelp1": "エンゲージメントセクションには、新規ビジターとリピーターの数を定量化するのに役立つレポートがあります。 また、ビジットあたりの平均時間とページ数、ビジターがサイトにアクセスした回数、およびビジット間の最も一般的な日数を分類したレポートを確認することもできます。", - "EngagementSubcategoryHelp2": "これにより、リーチを最大化するだけでなく、ビジットの頻度とインタラクションの多いビジットを最適化することができます。", - "EnterZenMode": "禅モードを使用(メニューを隠す)", - "ExceptionNotAllowlistedIP": "この IP %sは許可されていないため、Matomoを使用することはできません。", - "ExcludeRowsWithLowPopulation": "全ての行を表示 %s 少ない数の行を除く", - "ExitZenMode": "禅モードを終了(メニューを表示)", - "ExpandSubtables": "サブテーブルを展開する", - "ExportFormat": "エクスポート形式", - "ExportTooltip": "注: 生成されたエクスポート URL を使用するには、アプリ トークン認証を指定する必要があります。 これらのトークンは、[管理] → [セキュリティ] → [トークン認証] で構成できます。", - "ExportTooltipWithLink": "注: 生成されたエクスポート URL を使用するには、アプリ トークン認証を指定する必要があります。 %1$s[Admin → Security → Auths Tokens]%2$s でこれらのトークンを設定できます。 エクスポート URL の %3$s を認証トークンに置き換えます。 警告: URL と実際のトークンを他の人と共有しないでください。", - "ExternalHelp": "ヘルプ(新しいタブで開きます)", - "FlattenDataTable": "レポートは階層表示です %s フラットにする", - "FlattenReport": "レポートのフラット化", - "FormatMetrics": "フォーマットメトリック", - "HideExportUrl": "エクスポート URL を非表示", - "HomeShortcut": "ホーム", - "IncludeRowsWithLowPopulation": "数が少ない行は非表示 %s 全ての行を表示", - "InjectedHostEmailBody": "お知らせ:本日 Matomo にアクセスしようとしましたが、未知のホスト名の警告が発生しました。", - "InjectedHostEmailSubject": "Matomo が未知のホスト名にアクセスされました :%s", - "InjectedHostNonSuperUserWarning": "%1$sMatomo に安全にアクセスし、この警告を削除するにはここをクリック%2$sしてください。 また、Matomo 管理者に連絡して、この問題について通知することもできます (%3$sここをクリックしてメールを送る%4$s)。", - "InjectedHostSuperUserWarning": "Matomo が誤って設定されている可能性があります ( たとえば、Matomo が最近新しいサーバーまたは URL に移動した場合など ) 。 %1$sここをクリックして、有効な Matomo ホスト名 ( 信頼する場合 ) として%2$sを追加するか%3$s、%4$sここをクリックして%5$sに移動し、Matomo に安全にアクセスしてください%6$s。", - "InjectedHostWarningIntro": "現在 %1$s から Matomo にアクセスしていますが、 Matomo は以下のアドレスで実行するように設定されています。: %2$s", - "JavascriptDisabled": "標準ビューで Matomo を使用するには、JavaScript を有効にする必要があります。
JavaScript が無効になっているか、ブラウザでサポートされていないようです。
標準ビューを使用するには、ブラウザオプションを変更して JavaScript を有効にしてから、%1$sもう一度やり直してください%2$s。
", - "JsDidntLoad": "お使いのブラウザではこのページのスクリプトを読み込めませんでした。", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "あなたのプライバシーを尊重するオープンな分析プラットフォームです。", - "MacPageDown": "Fn + 右矢印", - "MacPageUp": "Fn + 左矢印", - "MainNavigation": "メインナビゲーション", - "Menu": "メニュー", - "MenuEntries": "メニュー エントリー", - "NoPrivilegesAskPiwikAdmin": "'%1$s'としてログインしていますが、権限が設定されていないようです。 %2$s Matomo の管理者 ( クリックして E メール ) %3$s に'表示'の権限を与えてもらってください。", - "NoSuchPage": "このページは存在しません", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "複数のサーバーで Matomo を使用しているため、ワンクリック更新は利用できません。続行するには、%1$s から最新バージョンをダウンロードしてください。", - "OnlyForSuperUserAccess": "このウィジェットは、スーパーユーザー権限を持つユーザーにのみデフォルトのダッシュボードに表示されます。", - "PageDownShortcutDescription": "ページの下部に移動する", - "PageUpShortcutDescription": "ページのトップに移動する", - "PeriodHasOnlyRawData": "この期間のレポートはまだ処理されていないようです。 今何が起こっているのか見たいですか? %1$sビジットログ%2$sを確認するか、レポートが生成されるまで別の期間を選択してください。", - "PeriodRange": "範囲", - "PivotBySubtable": "このレポートは、%1$s が %2$s ピボット を旋回していません。", - "PresetDateToday": "今日", - "PresetDateYesterday": "昨日", - "Profilable": "プロファイラブル", - "QuickAccessTitle": "%s を検索します。矢印キーを使用して、検索結果をナビゲートします。ショートカット: ' f ' を押して検索します。", - "QuickLinks": "クイックリンク", - "ReadMoreOnlineGuide": "このトピックの詳細については、オンラインガイドをご覧ください。", - "RemoveTotalsRowDataTable": "レポートには合計 %s 行が表示されています 合計行を削除する", - "ReportGeneratedOn": "%s に生成されたリポート", - "ReportGeneratedXAgo": "%s 前に生成されたリポート", - "ReportLowercase": "レポート", - "ReportType": "レポートタイプ", - "ReportWithMetadata": "メタデータを使用したレポート", - "ReportingCategoryHelpPrefix": "\"%1$s → %2$s\" レポート ページはどのように役立ちますか?", - "RowLimit": "行制限", - "SearchOnMatomo": "Matomo.org で '%1$s' を検索", - "SeeAvailableVersions": "使用可能なバージョンを表示する", - "Segments": "セグメント", - "SharePiwikLong": "素晴らしい無償ソフトウェアが見つかりました ! : Matomo です! \n\nMatomo はあなたのウェブサイトのビジターを無料で追跡します。要チェック !", - "SharePiwikShort": "Matomo !フリーでオープンソースのウェブ解析、自身でデータを所有できます。", - "ShareThis": "共有する", - "ShortcutCalendar": "カレンダーを開く( d は日付を表します)", - "ShortcutHelp": "このヘルプを表示する", - "ShortcutRefresh": "コンテンツを更新する", - "ShortcutSearch": "検索を開く( f は Find を表します)", - "ShortcutSegmentSelector": "セグメントセレクタを開く", - "ShortcutWebsiteSelector": "ウェブサイトセレクタを開く", - "ShortcutZenMode": "禅モード用", - "ShortcutsAvailable": "使用可能なショートカット", - "ShowExportUrl": "エクスポート URL を表示", - "ShowJSCode": "挿入する javascript コードを表示", - "SkipToContent": "コンテンツへスキップ", - "SoftwareSubcategoryHelp": "ソフトウェアセクションには、ビジターがサイトにアクセスするために使用しているオペレーティングシステム、ブラウザ、プラグインが表示されます。これにより、サイトを最適化して、最も一般的な構成と完全に互換性を持たせることができます。", - "StandardReport": "標準レポート", - "StartDate": "開始日", - "SubscribeAndBecomePiwikSupporter": "Matomo サポーターになるには、安全なクレジットカード決済 ( Paypal ) ページにお進みください !", - "SupportPiwik": "Matomo をサポート!", - "SupportUsOn": "で私たちをサポート", - "SystemSummaryMysqlVersion": "MySQL バージョン", - "SystemSummaryNActivatedPlugins": "%d アクティブなプラグイン", - "SystemSummaryNSegments": "%1$d セグメント", - "SystemSummaryNSegmentsWithBreakdown": "%1$dセグメント(%2$sは前処理済み、%3$sはリアルタイムで処理済み)", - "SystemSummaryNWebsites": "%d ウェブサイト", - "SystemSummaryPhpVersion": "PHP バージョン", - "SystemSummaryPiwikVersion": "Matomo バージョン", - "SystemSummaryWidget": "システム概要", - "TableNoData": "このテーブルにはデータがありません。", - "TechDeprecationWarning": "Matomoのバージョン%1$sより、Matomoは%2$sのサポートを終了します。詳しくは%3$sブログ記事をご覧ください。%4$s。", - "ThanksFromAllOfUs": "Matomoの皆さん、ありがとうございました!", - "ThereIsNoDataForThisReport": "このリポートのデータがありません。", - "UnFlattenDataTable": "リポートはフラット表示です %s 階層表示にする", - "UndoPivotBySubtable": "このレポートは、%sにピボットされました。ピボットをもとに戻す。", - "ViewAllPiwikVideoTutorials": "Matomo のチュートリアルビデオを全て表示する", - "VisitStatusOrdered": "注文", - "VisitStatusOrderedThenAbandoned": "注文時に放棄されたカート", - "VisitTypeReturning": "リピート", - "VisitTypeReturningCustomer": "リピートカスタマー", - "VisitorsCategoryHelp1": "ビジターページには、ビジターが誰であるかが表示されます。 ビジターがどこから来たのか、どのデバイスとブラウザを使用しているのか、いつビジターがWebサイトにアクセスするのかなどです。 全体として、オーディエンスが誰であるかを理解し、外れ値を探して、オーディエンスがどのように成長するかを確認します。", - "VisitorsCategoryHelp2": "ビジターに関する一般的な情報に加えて、%1$sビジットログ%2$sを使用して、個々の訪問ごとに何が発生したかを確認することもできます。", - "VisitorsOverviewHelp": "ビジターの概要は、サイトの人気を理解するのに役立ちます。 これは、選択した期間にサイトが受けたビジット数と、検索やダウンロードなどの主要機能の平均エンゲージメントレベルを示すグラフを提供することで実現します。", - "WebAnalyticsReports": "ウェブ解析リポート", - "YouAreUsingTheLatestVersion": "Matomo の最新バージョンを使用しています !", - "YourDonationWillHelp": "あなたの寄付は、このオープンソース分析プラットフォームの新機能と改善に直接資金を提供するのに役立ちます。 これは、コミュニティがプライバシーを保護し、データの管理を維持できるツールから常に恩恵を受けることを意味します。" - } -} diff --git a/plugins/CoreHome/lang/ka.json b/plugins/CoreHome/lang/ka.json deleted file mode 100644 index 495c9d795161dab941ffa0689c619ef2844df72f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ka.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "ამ კატეგორიაში მონაცემები არ არის. ცადეთ \"ყველა მონაწილის ჩართვა\".", - "ChooseWebsite": "აირჩიეთ ვებ საიტი", - "PresetDateToday": "დღეს", - "PresetDateYesterday": "გუშინ", - "ShowJSCode": "JavaScript კოდის ნახვა, რომელიც უნდა ჩაისვას ვებ გვერდზე", - "SystemSummaryPhpVersion": "PHP ვერსია", - "ThereIsNoDataForThisReport": "რეპორტისთვის მონაცემები არ არის.", - "WebAnalyticsReports": "ვებ ანალიზატორის რეპორტები" - } -} diff --git a/plugins/CoreHome/lang/ko.json b/plugins/CoreHome/lang/ko.json deleted file mode 100644 index 16a0e966fdcdebe1d00a5db07563f70bf2060f7c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ko.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Matomo가 문제 없이 동작하기 위해서 광고 차단기능이 있는 플러그인을 꺼주시길 바랍니다.", - "CategoryNoData": "이 카테고리 안에 데이터가 없습니다. \"모든 집단 포함\"을 시도해보세요.", - "ChangeCurrentWebsite": "웹사이트를 선택하세요, 현재 선택된 웹사이트: %s", - "ChangePeriod": "기간 변경", - "ChangeVisualization": "시각화 변경", - "CheckForUpdates": "업데이트 확인", - "CheckPiwikOut": "Matomo 출시 확인!", - "ChooseWebsite": "웹사이트 선택", - "ChooseX": "%1$s 을(를) 선택하세요", - "ClickRowToExpandOrContract": "하위 테이블의 행을 확장하거나 축소하기 위해 클릭하세요.", - "ClickToEditX": "%s 수정하기", - "ClickToSeeFullInformation": "모든 정보를 보려면 클릭하세요", - "CloseSearch": "검색 닫기", - "CloseWidgetDirections": "위젯 상단에 있는 'X'아이콘을 클릭하여 위젯을 닫을 수 있습니다.", - "DataForThisReportHasBeenPurged": "이 보고서의 데이터는 %s 개월이 지나 소거되었습니다.", - "DataTableExcludeAggregateRows": "합계행 표시 %s 숨기기", - "DataTableHowToSearch": "검색하려면 엔터키를 누르거나 검색 아이콘을 클릭하세요", - "DataTableIncludeAggregateRows": "합계행 숨기기 %s 보이기", - "DateInvalid": "지정한 날짜와 기간이 유효하지 않습니다. 날짜 선택기에서 유효한 날짜를 선택해주세요.", - "Default": "기본", - "DonateCall1": "Matomo을 사용하는 것은 언제나 무료일것이지만, 개발 비용이 무료인 것은 아닙니다.", - "DonateCall2": "Matomo는 성장하고 번영하기 위해 여러분의 지속적인 도움이 필요합니다.", - "DonateCall3": "Matomo가 귀하의 비즈니스나 프로젝트에 큰 가치를 더했다고 느끼신다면, %1$s기부를 고려%2$s하시거나 %3$s프리미엄 기능을 구매%4$s해 주시기 바랍니다. 여러분의 소중한 지원이 큰 힘이 됩니다.", - "EndShortcut": "끝", - "EnterZenMode": "젠 모드 활성화 (메뉴 숨기기)", - "ExceptionNotAllowlistedIP": "현재 접속한 IP %s 이(가) 사용금지되어 이 Matomo를 사용할 수 없습니다.", - "ExcludeRowsWithLowPopulation": "모든 행을 표시 %s 적은 군집 제외", - "ExitZenMode": "젠 모드 종료 (메뉴 보이기)", - "ExternalHelp": "도움말 (새로운 탭에 열림)", - "FlattenDataTable": "이 보고서는 계층형입니다. %s 펼치기", - "FormatMetrics": "포멧 메트릭", - "HideExportUrl": "Export URL을 숨김", - "HomeShortcut": "홈", - "IncludeRowsWithLowPopulation": "수가 적은 줄 숨기기 %s 모든 행을 표시", - "InjectedHostEmailBody": "안녕하세요, 오늘 Matomo에 접근 시도했는데 알 수 없는 호스트 경고가 발생했습니다.", - "InjectedHostEmailSubject": "Matomo에서 알 수 없는 호스트네임을 사용하여 접근함: %s", - "InjectedHostNonSuperUserWarning": "%1$sMatomo에 안전하게 접근하려면 여기를 클릭%2$s하고 이 경고를 제거합니다. 또한 Matomo 관리자에게 문의하여이 이 문제를 알릴 수 있습니다 (%3$s클릭하여 이메일 발송%4$s).", - "InjectedHostSuperUserWarning": "Matomo이 잘못 구성된 것 같습니다 (예를 들어, Matomo이 최근에 새로운 서버 또는 URL로 이동됨). 유효한 Matomo 호스트네임을 (신뢰하는 경우) %1$s이곳을 클릭하여 추가%2$s할 수 있습니다 %3$s, 또는 %4$s이곳을 클릭하여 이동%5$s하는 것으로 Matomo의 안전한 %6$s로 접근할 수 있습니다.", - "InjectedHostWarningIntro": "당신은 지금 %1$s에서 Matomo에 접근하고 있지만 Matomo은 다음 주소로 실행되도록 구성되어 있습니다: %2$s.", - "JavascriptDisabled": "Matomo를 표준 보기로 사용하려면 JavaScript가 활성화되어 있어야 합니다.
그러나 현재 사용 중인 브라우저에서 JavaScript가 비활성화되어 있거나 지원되지 않는 것 같습니다.
표준 보기를 사용하려면 브라우저 설정에서 JavaScript를 활성화한 후 %1$s다시 시도%2$s하세요.
", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "선두하는 오픈 분석플랫폼은 여러분의 프라이버시를 존중합니다", - "MainNavigation": "주요 네비게이션", - "Menu": "메뉴", - "MenuEntries": "메뉴", - "NoPrivilegesAskPiwikAdmin": "'%1$s'로 로그인되었지만 권한이 설정되어 있지 않습니다. %2$s Matomo 관리자(클릭 이메일) %3$s에 '보기'권한을 부여 받으세요.", - "NoSuchPage": "해당 페이지는 존재하지 않습니다.", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "여러개의 서버들에 대해서 피윅을 사용한다면 원클릭 업데이트는 이용불가합니다. %1$s 로 부터 진행하기 위해서 최신버전을 다운로드하세요.", - "OnlyForSuperUserAccess": "이 위젯은 슈퍼 유저 접근 권한이 있는 유저의 기본 대시보드에만 나타납니다.", - "PeriodRange": "기간", - "PivotBySubtable": "이 보고서는 %1$s Pivot이 %2$s에 의해 결정되지 않았습니다.", - "PresetDateToday": "오늘", - "PresetDateYesterday": "어제", - "QuickAccessTitle": "%s 검색. 검색 결과를 확인할 때 방향키를 사용하세요. 단축키: 'f'는 검색", - "ReportGeneratedOn": "%s에 생성된 보고서", - "ReportGeneratedXAgo": "%s 전에 생성된 보고서", - "Segments": "세그멘트", - "SharePiwikShort": "Matomo은 오픈소스기반 무료 웹 분석 도구입니다. 이제 소중한 정보를 소유하세요!", - "ShareThis": "공유하기", - "ShowExportUrl": "Export URL을 표시", - "ShowJSCode": "삽입할 자바스크립트 코드 보기", - "SkipToContent": "내용 건너뛰기", - "SubscribeAndBecomePiwikSupporter": "Matomo의 후원자가 되기 위해서 보안 신용카드 결제 페이지 (페이팔)로 이동합니다!", - "SupportPiwik": "Matomo 지원!", - "SupportUsOn": "저희를 지원", - "SystemSummaryMysqlVersion": "MySQL 버전", - "SystemSummaryNActivatedPlugins": "%d개 활성화된 플러그인", - "SystemSummaryNWebsites": "%d개 웹사이트", - "SystemSummaryPhpVersion": "PHP 버전", - "SystemSummaryPiwikVersion": "Matomo 버전", - "SystemSummaryWidget": "시스템 요약", - "TableNoData": "이 테이블에 데이터가 없습니다.", - "ThereIsNoDataForThisReport": "이 보고서에는 데이터가 없습니다.", - "UnFlattenDataTable": "보고서가 펼쳐져 있습니다 %s 계층으로 표시하기", - "UndoPivotBySubtable": "이 보고서는 %s Undo pivot에 의해 결정되었습니다.", - "ViewAllPiwikVideoTutorials": "모든 비디오 튜토리얼 보기", - "WebAnalyticsReports": "웹 분석 보고서", - "YouAreUsingTheLatestVersion": "Matomo 최신 버전을 사용하고 있습니다!" - } -} diff --git a/plugins/CoreHome/lang/ku.json b/plugins/CoreHome/lang/ku.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ku.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/lb.json b/plugins/CoreHome/lang/lb.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/lb.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/lt.json b/plugins/CoreHome/lang/lt.json deleted file mode 100644 index 11fc022e8f8fb2a9bb56a43c0df592c2bc043da0..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/lt.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Šioje kategorijoje duomenų nėra. Pabandykite \"Įtraukti visą populiaciją\"", - "ChangeCurrentWebsite": "Pasirinkite svetainę, šiuo metu pasirinkta svetainė: %s", - "CheckForUpdates": "Tikrinti ar yra atnaujinimų", - "ChooseWebsite": "Pasirinkti svetainę", - "ClickToEditX": "Spustelėkite norėdami taisyti %s", - "ClickToSeeFullInformation": "Spustelėkite, norėdami matyti daugiau informacijos", - "CloseSearch": "Užverti paiešką", - "CloseWidgetDirections": "Galite užverti šį valdiklį, spusteldami ant valdiklio viršuje esančios \"X\" piktogramos.", - "EndDate": "Pabaigos data", - "EndShortcut": "Baigti", - "ExternalHelp": "Pagalba (atsiveria naujoje kortelėje)", - "HomeShortcut": "Namo", - "Menu": "Meniu", - "PresetDateLast90Days": "Paskutinės 90 dienų", - "PresetDateThisYear": "Šiais metais", - "PresetDateToday": "Šiandien", - "PresetDateYesterday": "Vakar", - "ReportLowercase": "pranešti", - "Segments": "Segmentai", - "SharePiwikShort": "Matomo! Nemokama/laisva saityno analitika. Būkite savo duomenų savininkais.", - "ShowJSCode": "Parodyti JavaScript kodą įvedimui", - "SystemSummaryPhpVersion": "PHP versija", - "ThereIsNoDataForThisReport": "Nėra duomenų šiai ataskaitai.", - "WebAnalyticsReports": "Žiniatinklio analizės sprendimo ataskaitos" - } -} diff --git a/plugins/CoreHome/lang/lv.json b/plugins/CoreHome/lang/lv.json deleted file mode 100644 index 235b473423c002c4530571ac04c206d887152a97..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/lv.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Ja izmantojat reklāmu bloķētāju, lūdzu, atslēdziet to šai vietnei, lai nodrošinātu, ka Matomo darbojas bez problēmām.", - "AddTotalsRowDataTable": "Ziņojums nerāda apkopojuma rindu %s Rādīt apkopojuma rindu", - "CategoryNoData": "Nav datu šajā kategorijā. Mēģiniet izvēlēties \"Iekļaut visu apmeklējumu\".", - "ChangeCurrentWebsite": "Izvēlieties vietni, pašlaik izvēlētā vietne: %s", - "ChangePeriod": "Izmainīt laikposmu", - "ChangeVisualization": "Izmainīt attēlojumu", - "CheckForUpdates": "Pārbaudīt atjauninājumus", - "CheckPiwikOut": "Iepazīstieties ar Matomo!", - "ChooseWebsite": "Izvēlieties lapu", - "ChooseX": "Izvēlieties %1$s", - "ClickRowToExpandOrContract": "Klikšķiet uz šīs rindas, lai paplašinātu vai sašaurinātu apakštabulu.", - "ClickToEditX": "Klikšķiniet, lai rediģētu %s", - "ClickToSeeFullInformation": "Klikšķiniet, lai apskatītu pilnu informāciju", - "CloseSearch": "Aizvērt meklēšanu", - "CloseWidgetDirections": "Šo logrīku var aizvērt, noklikšķinot uz \"X\" ikonas logrīka augšdaļā.", - "CssDidntLoad": "Jūsu pārlūkam neizdevās ielādēt šīs lapas stilu.", - "CustomLimit": "Pielāgots limits", - "DataForThisReportHasBeenDisabled": "Šim ziņojumam segmentācija ir atspējota. Lūdzu, pārbaudiet %1$sšo BUJ%2$s plašākai informācijai.", - "DataForThisReportHasBeenPurged": "Šī ziņojuma dati ir vecāki par %s mēnešiem un ir dzēsti.", - "DataTableCombineDimensions": "Parametri tiek rādīti atsevišķi %s Rādīt apvienoti", - "DataTableExcludeAggregateRows": "Tiek parādītas apkopotas rindas %s Paslēpt", - "DataTableHowToSearch": "Nospiediet enter vai klikšķiet uz meklēšanas ikonas, lai meklētu", - "DataTableIncludeAggregateRows": "Apkopotās rindas ir paslēptas %s Rādīt", - "DataTableShowDimensions": "Parametri ir apvienoti %s Rādīt parametrus atsevišķi", - "DateInvalid": "Dotā datuma un laikposma kombinācija ir nederīga. Lūdzu, izvēlieties derīgu datumu.", - "Default": "noklusējums", - "DevicesSubcategoryHelp": "Ierīču sadaļa palīdz saprast, kādu tehnoloģiju jūsu apmeklētāji izmanto, lai piekļūtu jūsu vietnei. Jūs redzēsiet ziņojumus par ierīces veidu un konkrētiem modeļiem, kas ļauj optimizēt vietni vispopulārākajām ierīcēm.", - "DonateCall1": "Matomo izmantošana jums vienmēr būs bez maksas, bet tas nenozīmē, ka mums tā izveide neko nemaksā.", - "DonateCall2": "Matomo turpina vajag jūsu pastāvīgu atbalstu, lai augtu un plauktu.", - "DonateCall3": "Ja Matomo ir sniedzis nozīmīgu ieguldījumu jūsu biznesā vai darbībā, %1$slūdzu, apsveriet iespēju ziedot%2$s vai %3$siegādāties papildmaksas rīku%4$s. Katrs cents palīdzēs.", - "EndDate": "Beigu datums", - "EndShortcut": "Beigas", - "EngagementSubcategoryHelp1": "Iesaistīšanās sadaļā atrodami ziņojumi, kas palīdz noteikt, cik jaunu apmeklētāju un apmeklētāju, kuri atgriežas, saņemat. Varat arī pārskatīt ziņojumus, kuros ir sadalīts vidējais apmeklējuma laiks un lapu skaits, kā arī apmeklētāju apmeklējumu skaits jūsu vietnē un biežākais dienu skaits starp apmeklējumiem.", - "EngagementSubcategoryHelp2": "Tas var palīdzēt optimizēt regulārus un plašas mijiedarbības apmeklējumus, kā arī maksimāli palielināt sasniedzamību.", - "EnterZenMode": "Iespējot Zen režīmu (paslēpt izvēlnes)", - "ExceptionNotAllowlistedIP": "Jūs nevarat izmantot Matomo, jo jūsu IP %s nav atļauts.", - "ExcludeRowsWithLowPopulation": "Tiek rādītas visas rindas %s Nerādīt rindas ar mazu datu apjomu", - "ExitZenMode": "Iziet no Zen režīma (rādīt izvēlnes)", - "ExpandSubtables": "Paplašināt apakštabulas", - "ExportFormat": "Eksportēšanas formāts", - "ExportTooltip": "Piezīme: lai izmantotu ģenerēto eksporta URL, jānorāda lietotnes autentifikācijas žetons. Žetonus var konfigurēt sadaļā Administrēt → Drošība → Žetonu autentifikācija.", - "ExportTooltipWithLink": "Piezīme: lai izmantotu ģenerēto eksporta URL, jānorāda lietotnes autentifikācijas žetons. Žetonus var konfigurēt sadaļā %1$s[Administrēt → Drošība → Žetonu autentifikācija]%2$s. Aizstājiet %3$s saitē ar savu autentifikācijas žetonu. Brīdinājums: nekad nekoplietojiet URL ar īstu žetonu.", - "ExternalHelp": "Palīdzība (atveras jaunā cilnē)", - "FlattenDataTable": "Ziņojums ir hierarhisks %s Padarīt to plakanu", - "FlattenReport": "Saplacināt ziņojumu", - "FormatMetrics": "Formatēt rādījumus", - "HideExportUrl": "Paslēpt eksporta URL", - "HomeShortcut": "Sākums", - "IncludeRowsWithLowPopulation": "Rindas ar mazu datu apjomu ir paslēptas %s Rādīt visas rindas", - "InjectedHostEmailBody": "Sveiki, šodien mēģināju piekļūt Matomo un sastapos ar \"nezināma resursdatora\" brīdinājumu.", - "InjectedHostEmailSubject": "Matomo tika piekļūts ar nezināmu resursdatora nosaukumu: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlikšķiniet šeit, lai droši piekļūtu Matomo%2$s un noņemtu šo brīdinājumu. Jūs varat sazināties ar savu Matomo administratoru un informēt par šo problēmu (%3$sklikšķiniet šeit, lai nosūtītu e-pastu%4$s).", - "InjectedHostSuperUserWarning": "Iespējams, Matomo ir nepareizi konfigurēts (piemēram, ja Matomo nesen tika pārvietots uz jaunu serveri vai URL). Jūs varat %1$sklikšķināt šeit un pievienot %2$s kā derīgu Matomo resursdatora nosaukumu (ja tam uzticaties)%3$s, vai %4$sklikšķināt šeit un doties uz %5$s, lai droši piekļūtu Matomo%6$s.", - "InjectedHostWarningIntro": "Jūs piekļūstat Matomo no %1$s, bet Matomo ir konfigurēts darbam šajā adresē: %2$s.", - "JavascriptDisabled": "Lai izmantotu Matomo standarta skatā, jums ir jāiespējo JavaScript.
Šķiet, ka JavaScript ir vai nu atspējots, vai arī to neatbalsta jūsu pārlūks.
Lai izmantotu standarta skatu, iespējojiet JavaScript, mainot sava pārlūka iestatījumus, un tad %1$smēģiniet vēlreiz%2$s.
", - "JsDidntLoad": "Jūsu pārlūkam neizdevās ielādēt šīs lapas skriptus.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Vadošā atvērtā analīzes platforma, kas ievēro Jūsu privātumu.", - "MacPageDown": "Fn + Labā bulta", - "MacPageUp": "Fn + Kreisā bulta", - "MainNavigation": "Galvenā navigācija", - "Menu": "Izvēlne", - "MenuEntries": "Izvēlnes ieraksti", - "NoPrivilegesAskPiwikAdmin": "Jūs esat ienākuši kā '%1$s', bet izskatās, ka Jums nav iestatītas vajadzīgās Matomo atļaujas. %2$s Pieprasiet savam Matomo administratoram (klikšķiniet, lai nosūtītu e-pastu)%3$s Jums pieslēgt vietnes apskates atļauju.", - "NoSuchPage": "Šī lapa nepastāv", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Viena klikšķa atjaunināšana nav pieejama, jo jūs izmantojat Matomo ar vairākiem serveriem. Lūdzu, lejupielādējiet jaunāko versiju no %1$s, lai turpinātu.", - "OnlyForSuperUserAccess": "Šis logrīks noklusējuma panelī tiek parādīts tikai lietotājiem, kuriem ir galvenā lietotāja piekļuve.", - "PageDownShortcutDescription": "nokļūt lapas apakšpusē", - "PageUpShortcutDescription": "nokļūt lapas augšpusē", - "PeriodHasOnlyRawData": "Izskatās, ka ziņojumi par šo laikposmu vēl nav apstrādāti. Vai vēlaties redzēt, kas notiek pašlaik? Apskatiet %1$sapmeklējumu žurnālu%2$s vai izvēlieties citu laikposmu, līdz ziņojumi būs uzģenerēti.", - "PeriodHasOnlyRawDataNoVisitsLog": "Izskatās, ka ziņojumi par šo laikposmu vēl nav apstrādāti, bet tie būs pieejami pēc dažām stundām. Kamēr ziņojumi tiek ģenerēti, varat izvēlēties citu laikposmu.", - "PeriodRange": "Diapazons", - "PivotBySubtable": "Šis ziņojums nav apkopots %1$s Apkopot pēc %2$s", - "PresetDateToday": "Šodien", - "PresetDateYesterday": "Vakar", - "Profilable": "Profilējams", - "QuickAccessTitle": "Meklēt %s. Izmantojiet bulttaustiņus, lai pārlūkotu meklēšanas rezultātus. Saīsne: nospiediet \"f\", lai meklētu.", - "QuickLinks": "Ātrās saites", - "ReadMoreOnlineGuide": "Vairāk par šo tēmu uzziniet tiešsaistes rokasgrāmatā.", - "RemoveTotalsRowDataTable": "Ziņojums parāda apkopojuma rindu %s Noņemt apkopojuma rindu", - "ReportGeneratedOn": "Ziņojums izveidots %s", - "ReportGeneratedXAgo": "Ziņojums izveidots pirms %s", - "ReportLowercase": "ziņojums", - "ReportType": "Ziņojuma veids", - "ReportWithMetadata": "Ziņojums ar metadatiem", - "ReportingCategoryHelpPrefix": "Kā ziņojumu lapa \"%1$s → %2$s\" man palīdz?", - "RowLimit": "Rindu limits", - "SearchOnMatomo": "Meklēt \"%1$s\" vietnē Matomo.org", - "SeeAvailableVersions": "Apskatīt pieejamās versijas", - "Segments": "Segmenti", - "SharePiwikLong": "Sveiks! Es atradu lielisku bezmaksas programmatūru: Matomo!\n\nMatomo ļauj bez maksas izsekot apmeklētājus tavā vietnē. Tev tas ir jāizmēģina!", - "SharePiwikShort": "Matomo! Bezmaksas/brīvpieejas tīmekļa analīze. Pārvaldiet savus datus.", - "ShareThis": "Dalīties ar šo", - "ShortcutCalendar": "atvērt kalendāru (\"d\" apzīmē datumu)", - "ShortcutHelp": "parādīt palīdzību", - "ShortcutRefresh": "atjaunot saturu", - "ShortcutSearch": "atvērt meklēšanu (\"f\" apzīmē meklēt)", - "ShortcutSegmentSelector": "atvērt segmentu izvēlni", - "ShortcutWebsiteSelector": "atvērt tīmekļa vietņu izvēlni", - "ShortcutZenMode": "Zen režīmam", - "ShortcutsAvailable": "Pieejamās saīsnes", - "ShowExportUrl": "Rādīt eksporta URL", - "ShowJSCode": "Rādīt ievietošanai paredzēto JavaScript kodu", - "SkipToContent": "Pāriet uz saturu", - "SoftwareSubcategoryHelp": "Programmatūras sadaļa parāda operētājsistēmas, pārlūkprogrammas un spraudņus, ko Jūsu apmeklētāji izmanto, lai piekļūtu vietnei, lai Jūs varētu optimizēt savu vietni, nodrošinot pilnīgu savietojamību ar populārākajām konfigurācijām.", - "StandardReport": "Standarta ziņojums", - "StartDate": "Sākuma datums", - "SubscribeAndBecomePiwikSupporter": "Dodieties uz drošu kredītkaršu maksājumu lapu (Paypal), lai kļūtu par Matomo atbalstītāju!", - "SupportPiwik": "Atbalstiet Matomo!", - "SupportUsOn": "Atbalstiet mūs", - "SystemSummaryMysqlVersion": "MySQL versija", - "SystemSummaryNActivatedPlugins": "%d aktivizēti spraudņi", - "SystemSummaryNSegments": "%1$d segmenti", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmenti (%2$s iepriekš apstrādāti, %3$s apstrādāti reāllaikā)", - "SystemSummaryNWebsites": "%d vietnes", - "SystemSummaryPhpVersion": "PHP versija", - "SystemSummaryPiwikVersion": "Matomo versija", - "SystemSummaryWidget": "Sistēmas kopsavilkums", - "TableNoData": "Šai tabulai nav datu.", - "TechDeprecationWarning": "Sākot ar versiju %1$s, Matomo pārtrauks atbalstu %2$s. Lai iegūtu vairāk informācijas, %3$slasiet mūsu bloga ierakstu.%4$s", - "ThanksFromAllOfUs": "Paldies no mums visiem Matomo!", - "ThereIsNoDataForThisReport": "Dati šim ziņojumam nav pieejami.", - "UnFlattenDataTable": "Ziņojums ir plakans %s Padariet to hierarhisku", - "UndoPivotBySubtable": "Šis ir ziņojuma apkopojums %s Atcelt apkopojumu", - "ViewAllPiwikVideoTutorials": "Skatīt visas Matomo video pamācības", - "VisitStatusOrdered": "Pasūtīts", - "VisitStatusOrderedThenAbandoned": "Pasūtīts, pēc tam atstāts grozs", - "VisitTypeReturning": "Atkārtots apmeklējums", - "VisitTypeReturningCustomer": "Atgriezies klients", - "VisitorsCategoryHelp1": "Apmeklētāju lapās ir informācija par to, kas ir jūsu apmeklētāji. Piemēram, no kurienes radās jūsu apmeklētāji, kādas ierīces un pārlūkprogrammas viņi izmanto un kad viņi apmeklē jūsu tīmekļa vietni. Apkopojums parāda, kas ir jūsu auditorija, un ļauj meklēt netipiskas personas, lai redzētu, kā jūsu auditorija varētu pieaugt.", - "VisitorsCategoryHelp2": "Papildus vispārīgai informācijai par jūsu apmeklētājiem, jūs varat arī izmantot %1$sapmeklējumu žurnālu%2$s, lai redzētu, kas notika katrā atsevišķā apmeklējumā.", - "VisitorsOverviewHelp": "Apmeklētāju pārskats palīdz izprast vietnes popularitāti. Tas redzams diagrammās, kurās parādīts, cik apmeklējumu jūsu vietne saņem atlasītajā periodā, un kāds ir vidējais piesaistes līmenis tādām darbībām kā meklējumiem un lejupielādēm.", - "WebAnalyticsReports": "Tīmekļa analīzes ziņojumi", - "YouAreUsingTheLatestVersion": "Jūs izmantojat jaunāko Matomo versiju!", - "YourDonationWillHelp": "Jūsu ziedojums palīdzēs finansēt jaunas funkcijas un uzlabojumus šai atvērtā koda analīzes platformai. Tas nozīmē, ka kopiena gūs labumu no rīka, kas aizsargā privātumu un ļauj jums kontrolēt savus datus." - } -} diff --git a/plugins/CoreHome/lang/ms.json b/plugins/CoreHome/lang/ms.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ms.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/nb.json b/plugins/CoreHome/lang/nb.json deleted file mode 100644 index 793a2ca5e9dd7170238e09c9d21ccd9efeeafacb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/nb.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Hvis du bruker en ad-blocker, vennligst deaktiver den for dette nettstedet for å forsikre deg om at Matomo fungerer som det skal.", - "AddTotalsRowDataTable": "Rapporten viser ikke totalt antall rader %s Vis totalt antall", - "CategoryNoData": "Ingen data i denne kategorien. Prøv å velge «Inkluder hele populasjonen».", - "ChangeCurrentWebsite": "Velg et nettsted. Nettstedet som nå er valgt er: %s", - "ChangePeriod": "Endre periode", - "ChangeVisualization": "Endre visualisering", - "CheckForUpdates": "Se etter oppdateringer", - "CheckPiwikOut": "Sjekk ut Matomo!", - "ChooseWebsite": "Velg nettsted", - "ChooseX": "Velg %1$s", - "ClickRowToExpandOrContract": "Klikk denne raden for utvide eller slå sammen undertabellen.", - "ClickToEditX": "Klikk for å redigere %s", - "ClickToSeeFullInformation": "Klikk her for å se mer informasjon", - "CloseSearch": "Lukk søk", - "CloseWidgetDirections": "Lukk dette elementet ved å klikke på «X»-ikonet over miniprogrammet.", - "CssDidntLoad": "Nettleseren din kunne ikke laste inn sidestilen.", - "CustomLimit": "Egendefinert grense", - "DataForThisReportHasBeenDisabled": "Inndeling er avskrudd for denne rapporten. Sjekk %1$softe stilte spørsmål%2$s for flere detaljer.", - "DataForThisReportHasBeenPurged": "Dataene for denne rapporten er mer enn %s måneder gamle og har blitt fjernet.", - "DataTableCombineDimensions": "Dimensjoner vises for seg selv %s Vis dimensjoner sammenslått", - "DataTableExcludeAggregateRows": "Aggregerte rader vises %s Skjul dem", - "DataTableHowToSearch": "Trykk enter eller klikk på søkeikonet for å søke", - "DataTableIncludeAggregateRows": "Aggregerte rader er skjult %s Vis dem", - "DataTableShowDimensions": "Dimensjoner er kombinert %s Vis dimensjoner separert", - "DateInvalid": "Angitt kombinasjon av dato og periode er ugyldig. Velg en gyldig dato i datovelgeren.", - "Default": "standard", - "DevicesSubcategoryHelp": "Enhetsdelen hjelper deg å forstå teknologien dine besøkende bruker for å besøke nettsiden din. Du vil finne rapporter om hvilken type enhet og spesifikke modeller for å skru på og optimisere din side for de mest populære enhetene.", - "DonateCall1": "Det vil aldri koste noe å bruke Matomo, men det betyr ikke at det ikke koster oss noe å lage.", - "DonateCall2": "Matomo trenger din fortsatte støtte for å vokse og blomstre.", - "DonateCall3": "Hvis u synes Matomo har gitt din virksomhet økt verdi kan du %1$sdonere%2$s eller %3$skjøpe en premiumsfunksjon%4$s. Hvert øre bidrar.", - "EndDate": "Sluttdato", - "EndShortcut": "Slutt", - "EngagementSubcategoryHelp1": "Interaksjonsdelen gir deg rapporter som hjelper deg å anslå hvor mange nye og tilbakevendende besøk du får. Du kan også gjennomse rapporter som gir gjennomsnittlig tid og antall sider per besøk, sågar også antall ganger en besøkende har vært på siden din, og hvor lenge det vanligvis går mellom avlagt besøk.", - "EngagementSubcategoryHelp2": "Dette kan hjelpe deg å optimalisere for frekvens og høy-interaksjonsbesøk i tillegg til å maksimere din rekkevidde.", - "EnterZenMode": "Gå inn i Zen-modus (skjul menyene)", - "ExceptionNotAllowlistedIP": "Du kan ikke bruke denne Matomo-installasjonen fordi din IP (%s) ikke tillates.", - "ExcludeRowsWithLowPopulation": "All rader vises %s Ekskluder lav populasjon", - "ExitZenMode": "Avslutt Zen-modus (vis menyene)", - "ExpandSubtables": "Fold ut undertabeller", - "ExportFormat": "Eksportformat", - "ExportTooltip": "Merk: for å bruke generert eksportnettadresse må du angi en programsymbolidentitetsbekreftelse. Du kan sette opp disse symbolene i Administrasjon → Sikkerhet → Symbolidentitetsbekreftelser.", - "ExportTooltipWithLink": "Merk: For å bruke en generert eksportnettadresse må du angi en programsymbolidentitetsbekreftelse. Du kan sette opp disse symbolene i %1$s[Administrasjon → Sikkerhet → Identitetbekreftelsessymboler]%2$s. Erstatt %3$s i eksportnettadressen med ditt identitetbekreftelsessymbol. Advarsel: Aldri del nettadressen som har det virkelige symbolet med noen andre.", - "ExternalHelp": "Hjelp (åpnes i ny fane)", - "FlattenDataTable": "Rapporten er hierarkisk %s Gjør den flat", - "FlattenReport": "Fold sammen rapport", - "FormatMetrics": "Formater målinger", - "HideExportUrl": "Skjul eksport-nettadresse", - "HomeShortcut": "Hjem", - "IncludeRowsWithLowPopulation": "Rader med lav populasjon er skjult %s Vis alle rader", - "InjectedHostEmailBody": "Hei, jeg prøvde å få tilgang til Matomo i dag og ble møtt av «ukjent vertsnavn»-advarselen.", - "InjectedHostEmailSubject": "Matomo ble åpnet med et ukjent vertsnavn: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlikk her for å få sikker tilgang til Matomo%2$s og for å fjerne denne advarselen. Du vil kanskje også kontakte din Matomo-administrator for å varsle dem om dette problemet (%3$sklikk her for å sende e-post%4$s).", - "InjectedHostSuperUserWarning": "Matomo kan være feilkonfigurert (for eksempel hvis Matomo nylig var flyttet til en ny tjener eller ny URL). Du kan enten %1$sklikke her og legge til %2$s som et gyldig Matomo-vertsnavn (hvis du stoler på det)%3$s eller %4$sklikk her og gå til %5$s for sikker tilgang til Matomo%6$s.", - "InjectedHostWarningIntro": "Du har tilgang til Matomo fra %1$s, men Matomo er satt opp til å kjøre på denne adressen: %2$s.", - "JavascriptDisabled": "JavaScript må skrus på for at du skal kunne bruke Matomo i forvalgt visning.
Dog ser det ut til at det enten er avslått eller ustøttet i din nettleser.
For å bruke forvalgt visning kan du skru på JavaScript ved å endre dine nettleservalg, og så %1$sprøve igjen%2$s.
", - "JsDidntLoad": "Nettleseren din kunne ikke laste inn skript fra denne siden.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Den ledende åpne analyseplattformen som respekterer personvernet.", - "MacPageDown": "Fn+høyrepil", - "MacPageUp": "Fn+venstrepil", - "MainNavigation": "Hovednavigasjon", - "Menu": "Meny", - "MenuEntries": "Menyvalg", - "NoPrivilegesAskPiwikAdmin": "Du er logget inn som «%1$s», men det ser ut til at du ikke har noen rettigheter satt i Matomo. %2$s Be din Matomo-administrator (klikk for å sende e-post)%3$s å gi deg «vis»-tilgang til et nettsted.", - "NoSuchPage": "Denne siden finnes ikke", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Énklikksoppdateringen er ikke tilgjengelig siden du bruker Matomo med flere tjenere. Last ned siste versjon fra %1$s for å fortsette.", - "OnlyForSuperUserAccess": "Denne widgeten vises kun i standardoversikten for brukere som har superbruker-tilgang.", - "PageDownShortcutDescription": "for å komme til bunnen av siden", - "PageUpShortcutDescription": "for å komme til toppen av siden", - "PeriodHasOnlyRawData": "Det ser ut til at rapporter for denne perioden ikke har blitt behandlet enda. Ønsker du å finne ut hva som skjer nå? Sjekk ut %1$sbesøksloggen%2$s eller velg et annet datofølge til rapportene er generert.", - "PeriodRange": "Periode", - "PivotBySubtable": "Denne rapporten er ikke pivotert %1$s Pivot etter %2$s", - "PresetDateToday": "I dag", - "PresetDateYesterday": "I går", - "Profilable": "Profilerbar", - "QuickAccessTitle": "Søk etter %s. Bruk piltastene for å navigere i søkeresultatene. Snarvei: trykk «f» for å søke.", - "QuickLinks": "Hurtiglenker", - "ReadMoreOnlineGuide": "Les mer om dette emnet i den nettbaserte veiledningen.", - "RemoveTotalsRowDataTable": "Rapporten viser totalt antall rader %s Fjern total", - "ReportGeneratedOn": "Rapport generert %s", - "ReportGeneratedXAgo": "Rapport generert for %s siden", - "ReportLowercase": "rapport", - "ReportType": "Rapporttype", - "ReportWithMetadata": "Rapport med metadata", - "ReportingCategoryHelpPrefix": "Hvordan hjelper «%1$s → %2$s»-rapportsiden meg?", - "RowLimit": "Radgrense", - "SearchOnMatomo": "Søk etter «%1$s» på Matomo.org", - "SeeAvailableVersions": "Vis tilgjengelige versjoner", - "Segments": "Segmenter", - "SharePiwikLong": "Hei. Du bør prøve den frie programvaren Matomo.\n\nDen lar deg spore besøk på nettisden din.", - "SharePiwikShort": "Matomo! Gratis og åpen kildekode for nettstatistikk. Du eier dataene.", - "ShareThis": "Del dette", - "ShortcutCalendar": "for å åpne kalenderen (d står for dato)", - "ShortcutHelp": "for å vise denne hjelpen", - "ShortcutRefresh": "for å gjenoppfriske innholdet", - "ShortcutSearch": "for å åpne søket (f står for finn)", - "ShortcutSegmentSelector": "for å åpne segmentvelger", - "ShortcutWebsiteSelector": "for å åpne nettsidevelger", - "ShortcutZenMode": "for Zen-modus", - "ShortcutsAvailable": "Tilgjengelige snarveier", - "ShowExportUrl": "Vis eksport-nettadresse", - "ShowJSCode": "Vis JavaScript-koden til å sette inn på din nettside", - "SkipToContent": "Hopp til innhold", - "SoftwareSubcategoryHelp": "Programvaredelen viser operativsystemene, nettleserne og programtilleggene dine besøkende bruker for å besøke siden, slik at du kan optimalisere den for å sikre at den er kompatibel med de mest populære oppsettene.", - "StandardReport": "Forvalgt rapport", - "StartDate": "Startdato", - "SubscribeAndBecomePiwikSupporter": "Fortsett til en sikker betalingsside for kredittkort (Paypal) for å bli en Matomo-støttespiller!", - "SupportPiwik": "Støtt Matomo!", - "SupportUsOn": "Støtt oss på", - "SystemSummaryMysqlVersion": "MySQL-versjon", - "SystemSummaryNActivatedPlugins": "%d aktiverte utvidelser", - "SystemSummaryNSegments": "%1$d segmenter", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmenter (%2$s forhåndsbehandlet, %3$s behandlet i sanntid)", - "SystemSummaryNWebsites": "%d nettsteder", - "SystemSummaryPhpVersion": "PHP-versjon", - "SystemSummaryPiwikVersion": "Matomo-versjon", - "SystemSummaryWidget": "Systemsammendrag", - "TableNoData": "Ingen data for denne tabellen.", - "TechDeprecationWarning": "Fra Matomo versjon %1$s vil støtten for %2$s slutte. Mer info er å finne i %3$sdenne bloggposten%4$s.", - "ThanksFromAllOfUs": "Takk til deg fra alle oss i Matomo.", - "ThereIsNoDataForThisReport": "Det finnes ingen data for denne rapporten.", - "UnFlattenDataTable": "Rapporten er flat %s Gjør den hierarkisk", - "UndoPivotBySubtable": "Denne rapporten er pivotert %s Angre pivot", - "ViewAllPiwikVideoTutorials": "Se alle opplæringsvideoene for Matomo", - "VisitStatusOrdered": "Bestilt", - "VisitStatusOrderedThenAbandoned": "Bestilt, men forlot handlekurven", - "VisitTypeReturning": "Tilbakevendende", - "VisitTypeReturningCustomer": "Tidligere kunde", - "VisitorsCategoryHelp1": "Besøkssiden forteller deg noe om hvem dine besøkende er. Hvor de besøkte fra, hvilke enheter og nettlesere de brukte, og når de vanligvis besøker nettsiden din. Du kan i de store tallene forstå hvem publikumet ditt består av, og se etter avvik for å finne ut hvordan du kan øke besøkstallene.", - "VisitorsCategoryHelp2": "I tillegg til generell info om dine besøkende, kan du også bruke %1$sbesøksloggen%2$s for å finne ut hva som skjedde for hvert enkelte besøk.", - "VisitorsOverviewHelp": "Besøksoversikten hjelper deg å forstå hvor populær nettsiden din er. Diagrammer som viser hvor mange besøk den mottar over en valgt periode og gjennomsnittlig interaksjonsnivå for nøkkelaktiviteter tilbys, som f.eks. søk og nedlastninger.", - "WebAnalyticsReports": "Nettstatistikkrapporter", - "YouAreUsingTheLatestVersion": "Du bruker den nyeste versjonen av Matomo!", - "YourDonationWillHelp": "Donasjonen din går direkte til utvikling av nye funksjoner og forbedringer i denne frie analyseplattformen. Dette betyr at gemenskapen alltid nyter godt av et verktøy som hegner om personvernet og lar deg kontrollere din data." - } -} diff --git a/plugins/CoreHome/lang/nl.json b/plugins/CoreHome/lang/nl.json deleted file mode 100644 index c7b33cda279053e6a47666d1cc4ae949e477ed46..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/nl.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "AI Inzichten", - "AdblockIsMaybeUsed": "Als je gebruik maakt van een reclame blokker, schakel deze a.u.b. uit zodat je zeker weet dat Matomo werkt zonder problemen.", - "AddTotalsRowDataTable": "Het rapport toont geen rij totalen %s Toon rij totalen", - "CategoryNoData": "Geen data in deze categorie. Probeer \"Toon alle data\".", - "ChangeCurrentWebsite": "Kies een website, huidig geselecteerde website: %s", - "ChangePeriod": "Wijzig tijdsspanne", - "ChangeVisualization": "Verander visualisatie", - "CheckForUpdates": "Controleer op updates", - "CheckPiwikOut": "Bekijk Matomo eens!", - "ChooseWebsite": "Kies website", - "ChooseX": "Kies %1$s", - "ClickRowToExpandOrContract": "Klik deze regel om de tabel te openen of te sluiten.", - "ClickToEditX": "Klik om %s te bewerken", - "ClickToSeeFullInformation": "Klik om de volledige informatie te zien", - "CloseSearch": "Sluit zoeken", - "CloseWidgetDirections": "U kunt deze widget sluiten door op het 'X'-icoon te klikken aan de bovenkant van de widget.", - "CopyModalNote": "%1$sOpmerking:%2$s De gekopieerde %3$s kan aanpassingen nodig hebben indien die referenties heeft die specifiek zijn voor de originele website. Controleer de instellingen om te verifiëren of ze nog overeen komen.", - "CopyX": "Kopieer %1$s", - "CopyXDescription": "Selecteer de website om deze %1$s naar te kopiëren. Dit zal een exacte kopij aanmaken, inclusief instellingen, in de gekozen website.", - "CssDidntLoad": "De browser kan de style van deze pagina niet laden.", - "CustomLimit": "Aangepaste limiet", - "DataForThisReportHasBeenDisabled": "Segmentatie is niet beschikbaar voor dit rapport. Zie %1$sdeze FAQ%2$s voor meer informatie.", - "DataForThisReportHasBeenPurged": "De data voor dit rapport was meer dan %s maanden oud en is reeds opgeschoond.", - "DataTableCombineDimensions": "Dimensies worden afzonderlijk weergegeven %s Toon dimensies gecombineerd", - "DataTableExcludeAggregateRows": "Geagregeerde rijen worden getoond %s Verberg ze", - "DataTableHowToSearch": "Druk op enter of klik op het zoek icoon om te zoeken", - "DataTableIncludeAggregateRows": "Geagregeerde rijen zijn verborgen %s Toon ze", - "DataTableShowDimensions": "Dimensies zijn gecombineerd %s Toon dimensies apart", - "DateInvalid": "De opgegeven datum en tijdsspanne is niet geldig. Selecteer een geldige datum.", - "Default": "standaard", - "DevicesSubcategoryHelp": "Het gedeelte Apparaten helpt u de technologie te begrijpen die uw bezoekers gebruiken om toegang te krijgen tot uw site. U ziet rapporten over het type apparaat en specifieke modellen, zodat u uw site kunt optimaliseren voor de meest populaire apparaten.", - "DonateCall1": "Matomo zal altijd gratis zijn om te gebruiken, maar dat wil niet zeggen dat het niks kost om te maken.", - "DonateCall2": "Matomo heeft uw voortdurende steun nodig om te groeien en te bloeien.", - "DonateCall3": "Als u het gevoel heeft dat Matomo van toegevoegde waarde is voor uw bedrijf of inspanningen, %1$soverweeg dan te doneren %2$s of %3$skoop een premium-functie%4$s. Elke cent helpt.", - "EndDate": "Einddatum", - "EndShortcut": "Einde", - "EngagementSubcategoryHelp1": "Het gedeelte Betrokkenheid biedt rapporten die helpen kwantificeren hoeveel nieuwe en terugkerende bezoekers u krijgt. U kunt ook rapporten bekijken die de gemiddelde tijd en het aantal pagina's per bezoek uitsplitsen, evenals het aantal keren dat een bezoeker uw site heeft bezocht en het meest voorkomend aantal dagen tussen bezoeken.", - "EngagementSubcategoryHelp2": "Dit kan u helpen om te optimaliseren voor bezoeken met een hoge frequentie en hoge interactie, naast het maximaliseren van uw bereik.", - "EnterZenMode": "Activeer Zen-modus (verberg menu's)", - "ExceptionNotAllowlistedIP": "Je kunt deze Matomo niet gebruiken omdat je IP%s niet is toegestaan.", - "ExcludeRowsWithLowPopulation": "Alle rijen worden getoond %s Verberg de rijen met een lage populatie", - "ExitZenMode": "Deactiveer Zen-modus (toon menu's)", - "ExpandSubtables": "Subtabellen uitbreiden", - "ExportFormat": "Export formaat", - "ExportTooltip": "Opmerking: om de gegeneerde export URL te gebruiken, dient u een app token auth te specifiëren. U kan deze tokens configureren in Admin → Security → Token Auths.", - "ExportTooltipWithLink": "Opmerking: om de gegenereerde export URL te gebruiken, dient u een app token auth te specifiëren. U kan deze tokens configureren in %1$s[Admin → Security → Auths Tokens]%2$s. Vervang %3$s in de export URL door uw Auth token. Opgelet: deel de URL nooit met een echt token van iemand anders.", - "ExternalHelp": "Help (opent in een nieuw tabblad)", - "FlattenDataTable": "De rapportweergave is hierarchisch %s Maak het vlak", - "FlattenReport": "Rapport afvlakken", - "FormatMetrics": "Waarden opmaken", - "HideExportUrl": "Verberg Export URL", - "HomeShortcut": "Home", - "IncludeDimensionsSeparately": "Voeg dimensies afzonderlijk toe", - "IncludeRowsWithLowPopulation": "Rijen met een lage populatie zijn verborgen %s Laat alle rijen zien", - "InjectedHostEmailBody": "Hallo, ik probeerde Matomo vandaag te benaderen, en kreeg de onbekende hostnaam waarschuwing.", - "InjectedHostEmailSubject": "Matomo werd bezocht via een onbekende hostnaam: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlik hier om Matomo veilig te benaderen%2$s en deze waarschuwing te verwijderen. Je verwittigt best ook je Matomo beheerder en meld hen dit probleem (%3$sKlik hier om te emailen%4$s).", - "InjectedHostSuperUserWarning": "Matomo is waarschijnlijk verkeerd geconfigureerd (bijv. Matomo werd verplaatst naar een nieuwe server of URL). %1$sKlik hier en voeg %2$s toe als een toegestane Matomo hostnaam indien je die vertrouwd%3$s, of %4$sklik hier en ga naar %5$s om Matomo veilig te banaderen%6$s.", - "InjectedHostWarningIntro": "Je bezoekt nu Matomo van %1$s, maar Matomo is geconfigureerd om op dit adres te draaien: %2$s.", - "JavascriptDisabled": "JavaScript moet ingeschakeld zijn om Matomo te kunnen gebruiken in standard weergave.
Echter, het lijkt er op dat Javascript uitgeschakeld of niet ondersteund is door uw browser.
Om de standaard weergave te gebruiken, schakel Javascript in via uw browser-instellingen en %1$sprobeer opnieuw%2$s.
", - "JsDidntLoad": "De browser kan het script van deze website niet laden.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Het leidende open analytics platform dat privacy respecteert.", - "LearnMoreFullStop": "%1$sLees meer.%2$s", - "MacPageDown": "Fn + Pijl naar rechts", - "MacPageUp": "Fn + Pijl naar links", - "MainNavigation": "Hoofdnavigatie", - "Menu": "Menu", - "MenuEntries": "Menu-items", - "NoPrivilegesAskPiwikAdmin": "U bent aangemeld as '%1$s'. Maar het lijkt er op dat u geen rechten hebt op Matomo te bezoeken. %2$sVraag aan uw webmaster (klik hier voor e-mail)%3$s of hij u de juiste rechten wilt geven om de statistieken te bekijken.", - "NoSuchPage": "Deze pagina bestaat niet", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "De één-klik update is niet beschikbaar wanneer Matomo is geïnstalleerd over meerdere servers. Download de laatste versie van Matomo via %1$s om verder te gaan.", - "OnlyForSuperUserAccess": "Het widget wordt alleen getoond in het standaard dashbord aan gebruikers met Super User toegang.", - "PageDownShortcutDescription": "om onderaan de pagina te komen", - "PageUpShortcutDescription": "om bovenaan de pagina te komen", - "PeriodHasOnlyRawData": "Het lijkt erop dat meldingen voor deze periode nog niet verwerkt zijn. Wilt u zien wat er nu gebeurt? Bekijk de %1$sBezoeken log%2$s of kies een andere periode totdat de rapporten worden gegenereerd.", - "PeriodHasOnlyRawDataNoVisitsLog": "Het lijkt er op dat rapporten voor deze periode nog niet verwerkt zijn, maar deze zullen beschikbaar komen binnen enkele uren. Je kan een andere periode kiezen tot de rapporten gegenereerd zijn.", - "PeriodRange": "Bereik", - "PivotBySubtable": "Dit rapport wordt niet als een draaitabel getoond, %1$s maak een draaitabel op basis van %2$s", - "PresetDateLast30Days": "Afgelopen 30 dagen", - "PresetDateLast7Days": "Afgelopen 7 dagen", - "PresetDateLast90Days": "Afgelopen 90 dagen", - "PresetDateLastMonth": "Afgelopen maand", - "PresetDateLastQuarter": "Afgelopen kwartaal", - "PresetDateLastWeekMonSun": "Afgelopen week (Ma - Zo)", - "PresetDateLastYear": "Afgelopen jaar", - "PresetDateThisMonth": "Deze maand", - "PresetDateThisQuarter": "Dit kwartaal", - "PresetDateThisWeekMonToday": "Deze week (Ma - Vandaag)", - "PresetDateThisYear": "Dit jaar", - "PresetDateToday": "Vandaag", - "PresetDateYesterday": "Gisteren", - "Profilable": "Profileerbaar", - "QuickAccessTitle": "Zoeken naar %s. Gebruik de pijltjestoetsen om door de zoekopdrachten te navigeren. Shortcut: Druk 'f' om te zoeken.", - "QuickLinks": "Snelkoppelingen", - "ReadMoreOnlineGuide": "Lees meer over dit onderwerp in de online handleiding.", - "RemoveTotalsRowDataTable": "Het rapport toont de rij totalen %s Verwijder rij totalen", - "ReportGeneratedOn": "Rapport gegenereerd op %s", - "ReportGeneratedXAgo": "Rapport %s geleden gegenereerd", - "ReportLowercase": "rapport", - "ReportType": "Rapport type", - "ReportWithMetadata": "Rapport met metadata", - "ReportingCategoryHelpPrefix": "Hoe kan de \"%1$s → %2$s\" rapportpagina mij helpen?", - "RowLimit": "Rij limiet", - "SearchOnMatomo": "Zoek '%1$s' op Matomo.org", - "SeeAvailableVersions": "Zie Beschikbare Versies", - "Segments": "Segmenten", - "SharePiwikLong": "Hallo! Ik vond zonet een geweldige gratis software: Matomo!\n\nMatomo maakt het mogelijk om helemaal gratis de bezoekers van uw website te volgen. Da's zeker de moeite om eens uit te proberen!", - "SharePiwikShort": "Matomo! Gratis en open source web analyse. Beheer je data.", - "ShareThis": "Deel dit", - "ShortcutCalendar": "kalender openen (d staat voor Datum)", - "ShortcutHelp": "om deze help te tonen", - "ShortcutRefresh": "om de inhoud te verversen", - "ShortcutSearch": "zoekveld openen (f staat voor Find)", - "ShortcutSegmentSelector": "om de Segment selector te openen", - "ShortcutWebsiteSelector": "om de Website selector te openen", - "ShortcutZenMode": "voor Zen mode", - "ShortcutsAvailable": "Beschikbare snelkoppelingen", - "ShowExportUrl": "Toon Export URL", - "ShowJSCode": "Toon de in te voegen JavaScript code", - "SkipToContent": "Ga naar de inhoud", - "SoftwareSubcategoryHelp": "Het gedeelte Software toont de besturingssystemen, browsers en plug-ins die uw bezoekers gebruiken om toegang te krijgen tot de site, zodat u uw site kunt optimaliseren om ervoor te zorgen dat deze volledig compatibel is met de meest populaire configuraties.", - "StandardReport": "Standaard rapport", - "StartDate": "Begindatum", - "SubscribeAndBecomePiwikSupporter": "Ga verder naar een veilige kredietkaart betaalpagina (Paypal) en wordt een Matomo Supporter!", - "SupportPiwik": "Ondersteun Matomo!", - "SupportUsOn": "Ondersteun ons op", - "SystemSummaryMysqlVersion": "MySQL-versie", - "SystemSummaryNActivatedPlugins": "%d geactiveerde plugins", - "SystemSummaryNSegments": "%1$d segmenten", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmenten (%2$s voor-verwerkt, %3$s verwerkt in real-time)", - "SystemSummaryNWebsites": "%d websites", - "SystemSummaryPhpVersion": "PHP-versie", - "SystemSummaryPiwikVersion": "Matomo-versie", - "SystemSummaryWidget": "Systeem samenvatting", - "TableNoData": "Geen gegevens voor deze tabel.", - "TechDeprecationWarning": "Vanaf versie Matomo %1$s, zal Matomo de ondersteuning beëindigen voor %2$s. Voor meer informatie %3$szie onze blog post.%4$s", - "ThanksFromAllOfUs": "Bedankt van ons allen bij Matomo!", - "ThereIsNoDataForThisReport": "Er zijn geen gegevens voor dit rapport.", - "UnFlattenDataTable": "De rapportweergave is vlak %s Maak het hierarchisch", - "UndoPivotBySubtable": "Dit rapport wordt als een draaitabel getoond %s, schakel de draaitabel uit", - "ViewAllPiwikVideoTutorials": "Bekijk alle Matomo Video Tutorials", - "VisitStatusOrdered": "Besteld", - "VisitStatusOrderedThenAbandoned": "Besteld, daarna winkelwagen achtergelaten", - "VisitTypeReturning": "Terugkerend", - "VisitTypeReturningCustomer": "Terugkerende klant", - "VisitorsCategoryHelp1": "De bezoekerspagina's vertellen u wie uw bezoekers zijn. Zaken zoals waar uw bezoekers vandaan kwamen, welke apparaten en browsers ze gebruiken en wanneer ze uw website over het algemeen bezoeken. Begrijp in het algemeen wie uw publiek is en zoek naar uitschieters om te zien hoe uw publiek zou kunnen groeien.", - "VisitorsCategoryHelp2": "Als uitbreiding op de algemene informatie over uw bezoekers, kan u ook de %1$sBezoekers Log%2$s gebruiken om te zien wat er gebeurt bij elke individueel bezoek.", - "VisitorsOverviewHelp": "Het bezoekersoverzicht helpt u de populariteit van uw site te begrijpen. Dit door grafieken die laten zien hoeveel bezoeken uw site ontvangt gedurende een geselecteerde periode en het gemiddelde niveau van betrokkenheid voor belangrijke functionaliteiten, zoals zoekopdrachten en downloads.", - "WebAnalyticsReports": "Web Analyse rapporten", - "YouAreUsingTheLatestVersion": "Je gebruikt de laatste versie van Matomo!", - "YourDonationWillHelp": "Uw donatie helpt direct bij het financieren van nieuwe functionaliteiten en verbeteringen voor dit open-source analyseplatform. Dit betekent dat de gemeenschap altijd profiteert van een tool die de privacy beschermt en u de controle over uw gegevens geeft." - } -} diff --git a/plugins/CoreHome/lang/nn.json b/plugins/CoreHome/lang/nn.json deleted file mode 100644 index 07e692f30e4a856a3a15c775ef2ef3ee2ddcd0cf..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/nn.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Ingen data i denne kategorien. Prøv \"Inkluder heile datasettet\".", - "ChooseWebsite": "Vel nettside", - "DataForThisReportHasBeenPurged": "Data for denne rapporten er meir enn %s månader gammal og er fjerna.", - "DataTableExcludeAggregateRows": "Samlingsrader er vist %s Skjul dei", - "DataTableIncludeAggregateRows": "Samlingsrader er skjult %s Vis dei", - "Default": "standard", - "ExcludeRowsWithLowPopulation": "Alle rader er vist %s Skjul låg populasjon", - "FlattenDataTable": "Rapporten er hierarkisk %s Gjer den flat", - "IncludeRowsWithLowPopulation": "Rader med låg populasjon er skjult %s Vis alle rader", - "NoPrivilegesAskPiwikAdmin": "Du er innlogga som '%1$s' men det ser ikkje ut til at du har vidare tilgang til Matomo. %2$s Spør Matomo-administratoren (klikk for å senda e-post)%3$s om å gje deg 'vis'-tilgang til ei nettside.", - "PeriodRange": "Periode", - "PresetDateToday": "I dag", - "PresetDateYesterday": "I går", - "ReportGeneratedOn": "Rapport generert den %s", - "ReportGeneratedXAgo": "Rapport generert %s sidan", - "ReportLowercase": "rapport", - "ShowJSCode": "Vis JavaScript-koden for å setja inn.", - "SystemSummaryPhpVersion": "PHP-versjon", - "ThereIsNoDataForThisReport": "Det finst ingen data for denne rapporten.", - "UnFlattenDataTable": "Denne rapporten er flat %s Gjer den hierarkisk", - "WebAnalyticsReports": "Nettstatistikkrapportar" - } -} diff --git a/plugins/CoreHome/lang/pl.json b/plugins/CoreHome/lang/pl.json deleted file mode 100644 index 11c646ef936833574b187821124c1552f2c0f0f1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/pl.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "W sytuacji gdy korzystasz z blokady reklam, proszę wyłącz ją dla tej strony, aby upewnić się, że Matomo może działać bez przeszkód.", - "AddTotalsRowDataTable": "Raport nie pokazuje podsumowanych wierszy %s Pokaż podsumowane wiersze", - "CategoryNoData": "Brak danych w tej kategorii. Spróbuj opcji \"Uwzględnij całą populację\".", - "ChangeCurrentWebsite": "Wybierz stronę. Aktualnie wybrana: %s", - "ChangePeriod": "Zmień zakres", - "ChangeVisualization": "Zmień wizualizację", - "CheckForUpdates": "Sprawdź aktualizacje", - "CheckPiwikOut": "Sprawdź Matomo!", - "ChooseWebsite": "Wybierz stronę", - "ChooseX": "Wybierz %1$s", - "ClickRowToExpandOrContract": "Kliknij ten wiersz aby rozwinić lub zwinąć tabelę podrzędną", - "ClickToEditX": "Edytuj %s", - "ClickToSeeFullInformation": "Kliknij, żeby zobaczyć pełną informację", - "CloseSearch": "Zamknij wyszukiwanie", - "CloseWidgetDirections": "Możesz zamknąć ten widżet klikając na ikonie 'X' na górze widżetu.", - "CssDidntLoad": "Twojej przeglądarce nie udało się pobrać stylów tej strony.", - "CustomLimit": "Spersonalizowany limit", - "DataForThisReportHasBeenDisabled": "Segmentacja jest obecnie wyłączona dla tego raportu. Proszę sprawdzić %1$s w FAQ%2$s, aby uzyskać więcej szczegółów.", - "DataForThisReportHasBeenPurged": "Dane do tego raportu są starsze niż %s miesięcy i zostały wyczyszczone.", - "DataTableCombineDimensions": "Wymiary pokazane są osobno %s Pokaż wymiary połączone", - "DataTableExcludeAggregateRows": "Sumaryczne wiersze są widoczne %s Ukryj je", - "DataTableHowToSearch": "Naciśnij Enter lub kliknij lupkę aby wyszukać", - "DataTableIncludeAggregateRows": "Sumaryczne wiersze są ukryte %s Pokaż je", - "DataTableShowDimensions": "Wymiary są połączone %s Pokaż wymiary osobno", - "DateInvalid": "Podana kombinacja daty i okresu jest nieprawidłowa. Proszę wybrać poprawną datę w selektorze daty.", - "Default": "domyślne", - "DevicesSubcategoryHelp": "Sekcja Urządzenia pomaga zrozumieć technologię, z której korzystają odwiedzający Twoją witrynę. Zobaczysz raporty dotyczące typu urządzenia i konkretnych modeli, aby umożliwić optymalizację witryny pod kątem najpopularniejszych urządzeń.", - "DonateCall1": "Korzystanie z Matomo zawsze będzie bezpłatne, ale to nie znaczy, że tworzenie go nic nas nie kosztuje.", - "DonateCall2": "Matomo potrzebuje Twojego ciągłego wsparcia by rosnąć i kwitnąć.", - "DonateCall3": "Jeśli uważasz, że Matomo wniósł znaczącą wartość do Twojego przedsięwzięcia lub projektu, %1$srozważ proszę datek %2$s lub %3$s zakup funkcjonalności premium%4$s. Każdy grosik może pomóc.", - "EndDate": "Data końcowa", - "EndShortcut": "Koniec", - "EngagementSubcategoryHelp1": "Sekcja Zaangażowanie zawiera raporty, które pomagają określić liczbę nowych i powracających użytkowników. Możesz również przeglądać raporty, które rozkładają średni czas i liczbę stron na wizytę, a także liczbę odwiedzin w Twojej witrynie i najczęstszą liczbę dni między wizytami.", - "EngagementSubcategoryHelp2": "Może ci to pomóc w zoptymalizowaniu częstotliwości i wizyt z dużym zaangażowaniem wraz ze zmaksymalizowaniem zasięgu.", - "EnterZenMode": "Uruchom tryb Zen (ukryj menu)", - "ExceptionNotAllowlistedIP": "Nie możesz używać tego Matomo, ponieważ Twoje IP %s jest niedozwolone.", - "ExcludeRowsWithLowPopulation": "Wyświetlane są wszystkie rzędy %s Ukryj rzędy małej populacji", - "ExitZenMode": "Zakończ tryb Zen (pokaż menu)", - "ExpandSubtables": "Rozwiń zagnieżdżone tabele", - "ExportFormat": "Format eksportu", - "ExportTooltip": "Uwaga: aby użyć wygenerowanego adresu URL eksportu, musisz określić autoryzację tokena aplikacji. Możesz skonfigurować te tokeny w Administracja → Bezpieczeństwo → Uwierzytelnianie tokenów.", - "ExportTooltipWithLink": "Uwaga: Aby użyć wygenerowanego adresu URL eksportu, musisz określić token uwierzytelniania aplikacji. Możesz skonfigurować te tokeny w %1$s[Administracja → Bezpieczeństwo → Tokeny uwierzytelniania]%2$s. Zastąp %3$s w Eksport URL przez swój token uwierzytelniania. Ostrzeżenie: Nigdy nie udostępniaj nikomu adres URL z prawdziwym tokenem.", - "ExternalHelp": "Pomoc (otworzy się w nowym oknie)", - "FlattenDataTable": "Raport jest hierarchiczny %s Przełącz na płaski", - "FlattenReport": "Spłaszcz raport", - "FormatMetrics": "Formatuj wskaźniki", - "HideExportUrl": "Ukryj adres eksportu", - "HomeShortcut": "Strona główna", - "IncludeRowsWithLowPopulation": "Wiersze z niską populacją zostały ukryte %s Pokaż wszystkie wiersze", - "InjectedHostEmailBody": "Witaj, próbowałem dostać się dzisiaj do Matomo i napotkałem ostrzeżenie o nieznanym hoście.", - "InjectedHostEmailSubject": "Matomo został otwarty z nieznaną nazwą hosta: %s", - "InjectedHostNonSuperUserWarning": "%1$sKliknij tutaj, aby uzyskać dostęp do Matomo bezpiecznie%2$s i usunąć to ostrzeżenie. Możesz również skontaktować się z administratorem Matomo i powiadomić o problemie (%3$sKliknij tutaj email%4$s).", - "InjectedHostSuperUserWarning": "Matomo mógł zostać błędnie skonfigurowany (np. jeśli Matomo został ostatnio przeniesiony na nowy serwer lub adres URL). Możesz %1$skliknąć tutaj i dodać %2$s jako prawidłową nazwę hosta Matomo (jeśli jej ufasz)%3$s, lub %4$skliknąć tutaj aby przejść do %5$s aby uzyskać bezpieczny dostęp do Matomo'a%6$s.", - "InjectedHostWarningIntro": "Uzyskujesz obecnie dostęp do Matomo pod adresem %1$s, ale Matomo został skonfigurowany aby działać pod adresem: %2$s.", - "JavascriptDisabled": "JavaScript musi być włączony, aby można było korzystać z Matomo w widoku standardowym.
Wygląda na to, że JavaScript jest wyłączony lub nie jest obsługiwany przez Twoją przeglądarkę.
Aby skorzystać z widoku standardowego, włącz obsługę JavaScript w opcjach przeglądarki, a następnie %1$sspróbuj ponownie%2$s.
", - "JsDidntLoad": "Twojej przeglądarce nie udało się pobrać skryptów wykorzystywanych przez tą stronę.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Wiodąca otwarta platforma statystyczna respektująca Twoją prywatność.", - "MacPageDown": "Fn + strzałka w prawo", - "MacPageUp": "Fn + strzałka w lewo", - "MainNavigation": "Główna nawigacja", - "Menu": "Menu", - "MenuEntries": "Pozycje menu", - "NoPrivilegesAskPiwikAdmin": "Jesteś zalogowany jako '%1$s' ale wygląda na to, że nie masz nadanych żadnych uprawnień w Matomo'u. %2$s Poproś swojego administratora Matomo'a (kliknij aby wysłąć email)%3$s aby nadał Ci uprawnienia 'przeglądania' strony.", - "NoSuchPage": "Ta strona nie istnieje", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Aktualizacja One-click nie jest dostępna dla Matomo korzystającego z wielu serwerów. Proszę pobierz najnowszą wersję z %1$s aby kontynuować.", - "OnlyForSuperUserAccess": "Ten widżet jest wyświetlany na domyślnym pulpicie jedynie użytkownikom w uprawnieniami Super Użytkownika.", - "PageDownShortcutDescription": "przewiń na dół", - "PageUpShortcutDescription": "przewiń na górę", - "PeriodHasOnlyRawData": "Wygląda, że raporty dla tego okresu są jeszcze procesowane. Chcesz zobaczyć co dzieje się teraz? Sprawdź %1$sVisits log%2$s lub wybierz inny okres zanim raporty zostaną wygenerowane.", - "PeriodRange": "Zakres", - "PivotBySubtable": "Ten raport nie jest obrócony %1$s Obróć o %2$s", - "PresetDateLastMonth": "Ostatni miesiąc", - "PresetDateLastYear": "Ostatni rok", - "PresetDateThisMonth": "Ten miesiąc", - "PresetDateToday": "Dzisiaj", - "PresetDateYesterday": "Wczoraj", - "Profilable": "Profilowane", - "QuickAccessTitle": "Wyszukaj %s. Użyj strzałek do nawigacji po wynikach wyszukiwania. Skrót: Naciśnij 'f' aby wyszukać.", - "QuickLinks": "Szybkie linki", - "ReadMoreOnlineGuide": "Więcej na ten temat można przeczytać w przewodniku online.", - "RemoveTotalsRowDataTable": "Raport pokazuje podsumowane wiersze %s Usuń podsumowanie wierszy", - "ReportGeneratedOn": "Raport wygenerowany %s", - "ReportGeneratedXAgo": "Raport wygenerowany %s temu", - "ReportType": "Typ raportu", - "ReportWithMetadata": "Raport z metadanymi", - "ReportingCategoryHelpPrefix": "W jaki sposób pomaga mi strona raportowania \"%1$s → %2$s\"?", - "RowLimit": "Liczba rzędów", - "SearchOnMatomo": "Wyszukaj '%1$s' na Matomo.org", - "SeeAvailableVersions": "Zobacz dostępne wersje", - "Segments": "Grypy użytkowników", - "SharePiwikLong": "Cześć! Właśnie znalazłem/am fantastyczne darmowe oprogramowanie: Matomo!\n\nMatomo pozwoli Ci śledzić Internautów odwiedzających Twój serwis, bezpłatnie. Koniecznie musisz go przetestować!", - "SharePiwikShort": "Matomo! Darmowa open source'owa analityka. Twoje dane pod Twoją kontrolą.", - "ShareThis": "Udostępnij to", - "ShortcutCalendar": "otwórz kalendarz (d reprezentuje datę)", - "ShortcutHelp": "pokaż tą pomoc", - "ShortcutRefresh": "aby odświeżyć zawartość", - "ShortcutSearch": "otwórz wyszukiwarkę (f reprezentuje find (znajdź))", - "ShortcutSegmentSelector": "otwórz wybór Grup", - "ShortcutWebsiteSelector": "otwórz wybór Serwisów", - "ShortcutZenMode": "tryb Zen", - "ShortcutsAvailable": "Dostępne skróty", - "ShowExportUrl": "Pokaż adres eksportu", - "ShowJSCode": "Pokaż kod JavaScript do umieszczenia w kodzie strony", - "SkipToContent": "Przejdź do zawartości", - "SoftwareSubcategoryHelp": "Sekcja Oprogramowanie pokazuje systemy operacyjne, przeglądarki i wtyczki, z których korzystają Twoi odwiedzający, aby uzyskać dostęp do witryny, dzięki czemu możesz zoptymalizować swoją witrynę, aby zapewnić jej pełną kompatybilność z najpopularniejszymi konfiguracjami.", - "StandardReport": "Raport standardowy", - "StartDate": "Data początkowa", - "SubscribeAndBecomePiwikSupporter": "Przejdź do bezpiecznej płatności kartami kredytowymi (Paypal) aby zostać Wspierającym Matomo!", - "SupportPiwik": "Wesprzyj Matomo!", - "SupportUsOn": "Wspieraj nas na", - "SystemSummaryMysqlVersion": "Wersja MySQL", - "SystemSummaryNActivatedPlugins": "%d aktywnych wtyczek", - "SystemSummaryNSegments": "%1$d segmenty", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentów (%2$s wstępnie przetworzone, %3$s przetworzone w czasie rzeczywistym)", - "SystemSummaryNWebsites": "%d serwisów", - "SystemSummaryPhpVersion": "Wersja PHP", - "SystemSummaryPiwikVersion": "Wersja Matomo", - "SystemSummaryWidget": "Statystyka systemu", - "TableNoData": "Brak danych dla tej tabeli.", - "TechDeprecationWarning": "Począwszy od wersji %1$s, Matomo zakończy wsparcie dla %2$s. Więcej informacji %3$smożna znaleźć w naszym wpisie na blogu.%4$s", - "ThanksFromAllOfUs": "Podziękowania dla was wszystkich od Matomo!", - "ThereIsNoDataForThisReport": "Brak danych dla tego raportu.", - "UnFlattenDataTable": "Raport jest jednolity %s Przełącz na hierarchiczny", - "UndoPivotBySubtable": "Ten raport został obrócony %s Przywróć normalny wygląd", - "ViewAllPiwikVideoTutorials": "Obejrzyj wideo tutoriale Matomo", - "VisitStatusOrdered": "Zamówione", - "VisitStatusOrderedThenAbandoned": "Zamówiono, następnie Porzucono koszyk", - "VisitTypeReturning": "Powracający", - "VisitTypeReturningCustomer": "Powracający Klient", - "VisitorsCategoryHelp1": "Strony dotyczące odwiedzin mówią o tym, kim są odwiedzający. Na przykład skąd pochodzą, z jakich urządzeń i przeglądarek korzystają oraz kiedy zazwyczaj odwiedzają Twoją stronę. Zrozum, kim są Twoi odbiorcy, i poszukaj wartości skrajnych, aby zobaczyć, jak Twoja publiczność może się rozwijać.", - "VisitorsCategoryHelp2": "Oprócz ogólnych informacji o odwiedzających, możesz również skorzystać z dziennika wizyt %1$s%2$s , aby zobaczyć, co wystąpiło w każdej indywidualnej wizycie.", - "VisitorsOverviewHelp": "Przegląd odwiedzin pomaga zrozumieć popularność Twojej witryny. Robi to poprzez dostarczanie wykresów, które pokazują, ile wizyt otrzymuje Twoja witryna w wybranym okresie oraz średni poziom zaangażowania dla kluczowych funkcji, takich jak wyszukiwanie i pobieranie.", - "WebAnalyticsReports": "Raport analityki statystyk stron", - "YouAreUsingTheLatestVersion": "Używasz najnowszej wersji Matomo!", - "YourDonationWillHelp": "Twoja darowizna bezpośrednio pomoże sfinansować nowe funkcje i ulepszenia tej platformy analitycznej o otwartym kodzie źródłowym. Oznacza to, że społeczność zawsze będzie korzystać z narzędzia, które chroni prywatność i pozwala zachować kontrolę nad danymi." - } -} diff --git a/plugins/CoreHome/lang/pt-br.json b/plugins/CoreHome/lang/pt-br.json deleted file mode 100644 index aecd3e513c5475d9621fd86c830ae6139ccfcba0..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/pt-br.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Informações de IA", - "AdblockIsMaybeUsed": "Caso você esteja usando um bloqueador de anúncios, por favor desative-o para este site, pois assim poderá certificar-se de que o Matomo funciona sem qualquer problema.", - "AddTotalsRowDataTable": "O relatório não está mostrando o totais de linha %s Mostrar totais de linha", - "CategoryNoData": "Sem dados nesta categoria. Tente \"Incluir toda a população\".", - "ChangeCurrentWebsite": "Escolha um site; atualmente selecionado: %s", - "ChangePeriod": "Alterar período", - "ChangeVisualization": "Mudar visualização", - "CheckForUpdates": "Verificar atualizações", - "CheckPiwikOut": "Experimente o Matomo!", - "ChooseWebsite": "Escolha o site", - "ChooseX": "Escolher %1$s", - "ClickRowToExpandOrContract": "Clique nesta linha para expandir ou contrair a subtabela.", - "ClickToEditX": "Clique para editar %s", - "ClickToSeeFullInformation": "Clique para ver toda a informação", - "CloseSearch": "Fechar busca", - "CloseWidgetDirections": "Você pode fechar esta ferramenta clicando no ícone \"X\" na parte superior do widget.", - "CopyModalNote": "%1$sNota:%2$s O texto copiado%3$s pode precisar de ajustes se incluir referências específicas ao site original. Verifique as configurações para garantir a compatibilidade.", - "CopyX": "Copiar%1$s", - "CopyXDescription": "Selecione o site para o qual deseja copiar este %1$s. Isso criará uma cópia exata, incluindo as configurações, no site escolhido.", - "CssDidntLoad": "Seu navegador não conseguiu carregar o estilo desta página.", - "CustomLimit": "Limite personalizado", - "DataForThisReportHasBeenDisabled": "A segmentação está atualmente desabilitada para este relatório. Verifique %1$sesta FAQ%2$s para obter mais detalhes.", - "DataForThisReportHasBeenPurged": "Os dados para este relatório possuem mais de %s meses e foram excluídos.", - "DataTableCombineDimensions": "Dimensões são mostradas separadamente %s Mostrar dimensões combinadas", - "DataTableExcludeAggregateRows": "As linhas agregadas encontram-se visíveis %s Oculte-as", - "DataTableHowToSearch": "Pressione enter ou clique no ícone de busca para buscar", - "DataTableIncludeAggregateRows": "Linhas agregadas estão ocultas %s Clique para exibir", - "DataTableShowDimensions": "Dimensões são combinadas %s Mostrar dimensões separadamente", - "DateInvalid": "A combinação de data e período fornecida é inválida. Escolha uma data válida no seletor de data.", - "Default": "Padrão", - "DevicesSubcategoryHelp": "A seção Dispositivos ajuda você a entender a tecnologia que seus visitantes estão usando para acessar seu site. Você verá relatórios sobre o tipo de dispositivo e modelos específicos para permitir que você otimize seu site para os dispositivos mais populares.", - "DonateCall1": "Matomo sempre custará nada para usar, mas isso não significa que não nos custa nada para fazê-lo.", - "DonateCall2": "Matomo precisa do seu apoio continuado para crescer e prosperar.", - "DonateCall3": "Se você sentir que Matomo tem acrescentado valor significativo para seu negócio ou empreendimento, %1$sconsidere doar para o projeto%2$s ou %3$s comprar um recurso premium%4$s. Cada centavo vai ajudar.", - "EndDate": "Data Final", - "EndShortcut": "Fim", - "EngagementSubcategoryHelp1": "A seção Engajamento fornece relatórios que ajudam a quantificar quantos visitantes novos e recorrentes você recebe. Você também pode revisar relatórios que detalham o tempo médio e o número de páginas por visita, bem como o número de vezes que um visitante acessou seu site e o número mais comum de dias entre as visitas.", - "EngagementSubcategoryHelp2": "Isso pode ajudá-lo a otimizar a frequência e as visitas de alta interação, além de maximizar seu alcance.", - "EnterZenMode": "Entrar no modo Zen (esconder os menus)", - "ExceptionNotAllowlistedIP": "Você não pode usar este Matomo porque seu IP %s não é permitido.", - "ExcludeRowsWithLowPopulation": "Todas as linhas são mostradas %s Excluir população baixa", - "ExitZenMode": "Sair do mode Zen (mostrar os menus)", - "ExpandSubtables": "Expandir sub tabelas", - "ExportFormat": "Formato de exportação", - "ExportTooltip": "Observação: para usar a URL de exportação gerada, você precisará especificar uma autenticação de token de aplicativo. Você pode configurar esses tokens em Admin → Segurança → Autorização por Token.", - "ExportTooltipWithLink": "Observação: para usar a URL de exportação gerada, você precisará especificar uma autenticação de token de aplicativo. Você pode configurar esses tokens em %1$s[Admin → Segurança → Autorização por Tokens]%2$s. Substitua %3$s na URL de exportação por seu token de autenticação. Aviso: nunca compartilhe a URL com o token real com mais ninguém.", - "ExternalHelp": "Ajuda (abre em uma nova aba)", - "FlattenDataTable": "O relatório é hierárquico %s Tornar plano", - "FlattenReport": "Achatar relatório", - "FormatMetrics": "Métricas de formato", - "HideExportUrl": "Esconder a URL de exportação", - "HomeShortcut": "Início", - "IncludeDimensionsSeparately": "Incluir dimensões separadamente", - "IncludeRowsWithLowPopulation": "Linhas com poucos dados estão ocultas %s Mostrar todas as linhas", - "InjectedHostEmailBody": "Olá, eu tentei acessar Matomo hoje e encontrei um aviso de hostname desconhecido.", - "InjectedHostEmailSubject": "Matomo foi acessado por um hostname desconhecido : %s", - "InjectedHostNonSuperUserWarning": "%1$sClique aqui para acessar com segurança Matomo%2$s e remover esse aviso. Você também pode entrar em contato com o administrador do Matomo e notificá-lo sobre essa questão (%3$sClique aqui para enviar e-mail%4$s).", - "InjectedHostSuperUserWarning": "Matomo pode estar mal configurado (por exemplo, se Matomo foi recentemente movido para um novo servidor ou URL). Você pode tanto %1$sClicar aqui e adicionar%2$s como um Matomo hostname válido (se você confiar nele)%3$s, ou %4$sClique aqui para %5$s para acessar com segurança Matomo%6$s.", - "InjectedHostWarningIntro": "Você está agora acessando Matomo de %1$s, mas Matomo foi configurado para ser executado neste endereço: %2$s.", - "InvalidComparisonDateRange": "Insira um intervalo de datas de comparação válido.", - "JavascriptDisabled": "O JavaScript deve ser habilitado para que você possa usar o Matomo como visualização padrão.
Contudo, parece que o JavaScript está desabilitado ou não é suportado pelo seu navegador.
Para usar a visualização padrão, habilite o JavaScript mudando as opções do seu navegador, então %1$stente novamente%2$s.
", - "JsDidntLoad": "Seu navegador não conseguiu carregar os scripts desta página.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "A principal plataforma de análise aberta que respeita sua privacidade.", - "LearnMoreFullStop": "%1$sSaiba mais.%2$s", - "MacPageDown": "Fn + seta direita", - "MacPageUp": "Fn + seta esquerda", - "MainNavigation": "Navegação principal", - "Menu": "Menu", - "MenuEntries": "Itens do menu", - "NoPrivilegesAskPiwikAdmin": "Você está logado como '%1$s', mas parece que você não tem nenhuma permissão definida no Matomo. %2$s Pergunte ao seu administrador Matomo (clique para e-mail) %3$s para lhe dar acesso de 'visão' para um site.", - "NoSuchPage": "Esta página não existe", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "A atualização de um clique não está disponível enquanto você esta usando Matomo com múltiplos servidores. Por favor, faça o download da última versão em %1$s para continuar.", - "OnlyForSuperUserAccess": "Este widget é exibido no painel padrão somente para usuários com acesso de Super Usuário.", - "PageDownShortcutDescription": "para chegar ao final da página", - "PageUpShortcutDescription": "para chegar ao topo da página", - "PeriodHasOnlyRawData": "Parece que os relatórios deste período ainda não foram processados. Você quer ver o que está acontecendo agora? Verifique o %1$sLog de Visitas%2$s ou escolha um período de data diferente até que os relatórios sejam gerados.", - "PeriodHasOnlyRawDataNoVisitsLog": "Parece que os relatórios deste período ainda não foram processados, mas estarão disponíveis em algumas horas. Você pode escolher um período de data diferente até que os relatórios sejam gerados.", - "PeriodRange": "Alcance", - "PivotBySubtable": "Este relatório não foi articulado %1$s Articular por %2$s", - "PresetDateLast30Days": "Últimos 30 dias", - "PresetDateLast7Days": "Últimos 7 dias", - "PresetDateLast90Days": "Últimos 90 dias", - "PresetDateLastMonth": "Mês passado", - "PresetDateLastQuarter": "Último trimestre", - "PresetDateLastWeekMonSun": "Última semana (segunda a domingo)", - "PresetDateLastYear": "Último ano", - "PresetDateThisMonth": "Este mês", - "PresetDateThisQuarter": "Este trimestre", - "PresetDateThisWeekMonToday": "Esta semana (segunda-feira - hoje)", - "PresetDateThisYear": "Este ano", - "PresetDateToday": "Hoje", - "PresetDateYesterday": "Ontem", - "Profilable": "Perfilável", - "ProfilableSegmentHelp": "1 para perfilável (por exemplo, cookies foram usados), 0 para não perfilável (por exemplo, nenhum cookie foi usado)", - "QuickAccessTitle": "Buscar por %s. Use as setas do teclado para navegar pelos resultados da pesquisa. Atalho: Pressione 'f' para pesquisar.", - "QuickLinks": "Links rápidos", - "ReadMoreOnlineGuide": "Leia mais sobre este tópico no guia online.", - "RemoveTotalsRowDataTable": "O relatório está mostrando totais de linha %s Remover totais de linha", - "ReportConfigure": "Configurar este relatório", - "ReportGeneratedOn": "Relatório gerado em %s", - "ReportGeneratedXAgo": "Relatório gerado %s atrás", - "ReportLowercase": "relatório", - "ReportType": "Tipo de relatório", - "ReportWithMetadata": "Relatório com metadados", - "ReportingCategoryHelpPrefix": "Como a página de relatórios '%1$s → %2$s' me ajuda?", - "RowLimit": "Limite de linha", - "SearchOnMatomo": "Procurar '%1$s' em Matomo.org", - "SeeAvailableVersions": "Veja Versões Disponíveis", - "Segments": "Segmentos", - "SharePiwikLong": "Oi! Acabei de encontrar um grande software open source: Matomo!\n\nO Matomo permitirá que você acompanhe os visitantes do seu site gratuitamente. Você definitivamente deve dar uma olhada!", - "SharePiwikShort": "Matomo! Web analytics gratuito/livre. Seja o proprietário dos seus dados.", - "ShareThis": "Compartilhar", - "ShortcutCalendar": "para abrir o calendário (d significa Data)", - "ShortcutHelp": "para exibir esta ajuda", - "ShortcutRefresh": "para atualizar o conteúdo", - "ShortcutSearch": "para abrir a pesquisa (f significa Buscar)", - "ShortcutSegmentSelector": "para abrir o seletor de segmento", - "ShortcutWebsiteSelector": "para abrir o seletor de site", - "ShortcutZenMode": "para o modo Zen", - "ShortcutsAvailable": "Atalhos disponíveis", - "ShowExportUrl": "Mostrar a URL de exportação", - "ShowJSCode": "Mostra o código JavaScript a inserir", - "SkipToContent": "Ir para o conteúdo", - "SoftwareSubcategoryHelp": "A seção Software mostra os sistemas operacionais, navegadores e plugins que seus visitantes estão usando para acessar o site para que você possa otimizá-lo e garantir que seja totalmente compatível com as configurações mais populares.", - "StandardReport": "Relatório padrão", - "StartDate": "Data Inicial", - "SubscribeAndBecomePiwikSupporter": "Proceder a uma página de pagamento seguro através de cartão de crédito (Paypal) para se tornar um apoiador do Matomo!", - "SupportPiwik": "Apóie o Matomo!", - "SupportUsOn": "Apoie-nos em", - "SystemSummaryMysqlVersion": "Versão do MySQL", - "SystemSummaryNActivatedPlugins": "%d plugins ativados", - "SystemSummaryNSegments": "%1$d segmentos", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentos (%2$s pré-processados, %3$s processados em tempo real)", - "SystemSummaryNWebsites": "%d sites", - "SystemSummaryPhpVersion": "Versão do PHP", - "SystemSummaryPiwikVersion": "Versão do Matomo", - "SystemSummaryWidget": "Resumo do Sistema", - "TableNoData": "Sem dados para esta tabela.", - "TechDeprecationWarning": "A partir da versão Matomo %1$s, Matomo encerrará o suporte para %2$s. Para obter mais informações %3$s, consulte o nosso post no blog.%4$s", - "ThanksFromAllOfUs": "Obrigado de todos nós do Matomo!", - "ThereIsNoDataForThisReport": "Não existem dados para esse relatório.", - "UnFlattenDataTable": "O relatório é plano %s Tornar hierárquico", - "UndoPivotBySubtable": "Este relatório foi articulado %s desfazer articulação", - "ViewAllPiwikVideoTutorials": "Veja todos os Video tutoriais do Matomo", - "VisitStatusOrdered": "Ordenado", - "VisitStatusOrderedThenAbandoned": "Carrinho abandonado de pedidos", - "VisitTypeReturning": "Retorno", - "VisitTypeReturningCustomer": "Retorno de cliente", - "VisitorsCategoryHelp1": "As páginas de visitantes informam sobre quem são seus visitantes. Coisas como de onde vêm seus visitantes, quais dispositivos e navegadores estão usando e quando geralmente visitam seu site. Entenda, de forma agregada, quem é seu público e procure por situações atípicas para ver como seu público pode crescer.", - "VisitorsCategoryHelp2": "Além das informações gerais sobre seus visitantes, você também pode usar o %1$sRegistro de visitas%2$s para ver o que ocorreu em cada visita individual.", - "VisitorsOverviewHelp": "A Visão geral dos visitantes ajuda você a entender a popularidade de seu site. Ele faz isso fornecendo gráficos que mostram quantas visitas seu site está recebendo em um período selecionado e o nível médio de engajamento para os principais recursos, como pesquisas e downloads.", - "WebAnalyticsReports": "Relatórios Web Analytics", - "YouAreUsingTheLatestVersion": "Você está usando a última versão do Matomo!", - "YourDonationWillHelp": "Sua doação ajudará diretamente a financiar novos recursos e melhorias para esta plataforma analítica de código aberto. Isso significa que a comunidade sempre se beneficiará de uma ferramenta que protege a privacidade e permite que você mantenha o controle de seus dados." - } -} diff --git a/plugins/CoreHome/lang/pt.json b/plugins/CoreHome/lang/pt.json deleted file mode 100644 index 286b3eb1e0f379cf74397fd5e728a763e60e74bb..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/pt.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "CoreHome": { - "AIInsights": "Informações de IA", - "AdblockIsMaybeUsed": "No caso de estar a utilizar um bloqueador de publicidade, por favor desative-o para garantir que o Matomo funciona sem quaisquer problemas.", - "AddTotalsRowDataTable": "O relatório não está a apresentar a linha dos totais %s Mostrar a linha de totais", - "CategoryNoData": "Sem dados nesta categoria. Tente o \"Incluir toda a população\".", - "ChangeCurrentWebsite": "Escolha um site; atualmente selecionado: %s", - "ChangePeriod": "Alterar período", - "ChangeVisualization": "Alterar visualização", - "CheckForUpdates": "Procurar por atualizações", - "CheckPiwikOut": "Experimente o Matomo!", - "ChooseWebsite": "Escolher site", - "ChooseX": "Escolher %1$s", - "ClickRowToExpandOrContract": "Clique nesta linha para expandir ou contrair a sub-tabela.", - "ClickToEditX": "Clique para editar %s", - "ClickToSeeFullInformation": "Clique para ver a informação completa", - "CloseSearch": "Fechar pesquisa", - "CloseWidgetDirections": "Você pode fechar este widget clicando no ícone 'X' no topo.", - "CopyModalNote": "%1$sNota:%2$s O texto copiado%3$s pode precisar de ajustes se incluir referências específicas ao site original. Verifique as configurações para garantir a compatibilidade.", - "CopyX": "Copiar%1$s", - "CopyXDescription": "Selecione o site para o qual deseja copiar este %1$s. Isto criará uma cópia exata, a incluir as configurações, no site escolhido.", - "CssDidntLoad": "O seu navegador não conseguiu carregar o estilo para esta página.", - "CustomLimit": "Limite personalizado", - "DataForThisReportHasBeenDisabled": "Segmentação esta atualmente desativada para este relatório. Por favor veja %1$seste FAQ%2$s para mais detalhes.", - "DataForThisReportHasBeenPurged": "Os dados para este relatório têm mais do que %s meses e foram limpos.", - "DataTableCombineDimensions": "As dimensões estão separadas %s Mostrar dimensões combinadas", - "DataTableExcludeAggregateRows": "As linhas agregadas encontram-se visíveis %s Oculte-as", - "DataTableHowToSearch": "Pressione enter ou clique no ícone de pesquisa para pesquisar", - "DataTableIncludeAggregateRows": "As linhas agregadas encontram-se escondidas %s Mostre-as", - "DataTableShowDimensions": "As dimensões estão combinadas %s Mostrar dimensões em separado", - "DateInvalid": "A combinação fornecida de data e período é inválida. Por favor, escolha uma data válida no seletor de data.", - "Default": "predefinido", - "DevicesSubcategoryHelp": "A secção Dispositivos ajuda a compreender a tecnologia que os seus visitantes estão a utilizar para aceder ao seu site. Irá ver relatórios sobre o tipo de dispositivos e modelos específicos, que permitem que possa otimizar o seu site para os dispositivos mais utilizados.", - "DonateCall1": "O Matomo nunca lhe custará nada para usar, mas isso não quer dizer que não nos custe nada para o criar.", - "DonateCall2": "O Matomo precisa do seu apoio contínuo para crescer e prosperar.", - "DonateCall3": "Se considera que o Matomo adicionou um valor significativo ao seu negócio ou empreendimento, %1$sconsidere fazer um donativo%2$s ou %3$sadquirir uma funcionalidade suplementar%4$s. Qualquer cêntimo vai ajudar.", - "EndDate": "Data Final", - "EndShortcut": "Fim", - "EngagementSubcategoryHelp1": "A secção Interesse fornece relatórios para ajudar a quantificar quantos visitantes novos e recorrentes obteve. Pode também analisar relatórios que discriminam o tempo médio e o número de páginas por visita, bem como o número de vezes que um visitante esteve no seu site e o número de dias mais comum entre visitas.", - "EngagementSubcategoryHelp2": "Isto poderá ajudar a otimizar as visitas para frequência e elevado nível de interação, para além de maximizar o seu alcance.", - "EnterZenMode": "Entre no modo Zen (oculte os menus)", - "ExceptionNotAllowlistedIP": "Não pode utilizar este Matomo dado que o seu IP %s não é permitido.", - "ExcludeRowsWithLowPopulation": "Estão a ser mostradas todas as linhas %s Excluir baixa população", - "ExitZenMode": "Sair do modo Zen (mostrar os menus)", - "ExpandSubtables": "Expandir sub-tabelas", - "ExportFormat": "Formato de exportação", - "ExportTooltip": "Nota: Para utilizar a URL de exportação gerada, você precisará especificar um código de autenticação para a aplicação. Você pode configurar estes códigos em Administração → Segurança → Códigos de autenticação.", - "ExportTooltipWithLink": "Nota: Para utilizar o endereço de exportação gerado, você precisará especificar um código de autenticação para a aplicação. Você pode configurar estes códigos em %1$s[Administração → Segurança → Códigos de autenticação]%2$s. Substitua %3$s na URL de exportação pelo seu código de autenticação. Aviso: Nunca compartilhe a URL com o código real de autenticação com mais ninguém.", - "ExternalHelp": "Ajuda (abre um novo separador)", - "FlattenDataTable": "O relatório está hierarquizado %s Torná-lo nivelado", - "FlattenReport": "Nivelar relatório", - "FormatMetrics": "Formatar métricas", - "HideExportUrl": "Ocultar URL de exportação", - "HomeShortcut": "Início", - "IncludeDimensionsSeparately": "Incluir dimensões separadamente", - "IncludeRowsWithLowPopulation": "As linhas com baixa população estão ocultas %s Mostrar todas as linhas", - "InjectedHostEmailBody": "Olá, eu tentei aceder ao Matomo hoje e deparei-me com um aviso de nome de servidor desconhecido.", - "InjectedHostEmailSubject": "O Matomo foi acedido com um nome de servidor desconhecido: %s", - "InjectedHostNonSuperUserWarning": "%1$sClique aqui para aceder ao Matomo com segurança%2$s e remover este aviso. Pode também querer contacttar o seu administrador do Matomo e reportar esta situação (%3$sclique aqui para enviar um e-mail%4$s).", - "InjectedHostSuperUserWarning": "O Matomo pode estar mal configurado (por exemplo, se o Matomo foi movido para um novo servidor ou endereço recentemente). Pode %1$sclicar aqui e adicionar %2$s como um nome de servidor válido para o Matomo (se confia no mesmo)%3$s, ou %4$sclicar aqui para ir para %5$s para aceder ao Matomo com segurança%6$s.", - "InjectedHostWarningIntro": "Está agora a aceder ao Matomo a partir de %1$s, mas o Matomo foi configurado para funcionar no endereço: %2$s.", - "InvalidComparisonDateRange": "Insira um intervalo de datas de comparação válido.", - "JavascriptDisabled": "O JavaScript tem de estar ativo para que possa utilizar o Matomo na vista predefinida.
No entanto, parece que o JavaScript está desativado ou não é suportado pelo seu navegador.
Para utilizar a vista predefinida, ative o JavaScript alterando as opções do seu navegador e %1$stentando novamente%2$s.
", - "JsDidntLoad": "O seu navegador não conseguiu carregar os scripts para esta página.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "A plataforma aberta de web analytics dominante que respeita a sua privacidade.", - "LearnMoreFullStop": "%1$sSaiba mais.%2$s", - "MacPageDown": "Fn + seta para a direita", - "MacPageUp": "Fn + seta para a esquerda", - "MainNavigation": "Navegação principal", - "Menu": "Menu", - "MenuEntries": "Entradas do menu", - "NoPrivilegesAskPiwikAdmin": "Está autenticado como '%1$s' mas parece que não tem quaisquer permissões definidas no Matomo. %2$s Peça ao seu administrador do Matomo (clique para enviar um e-mail)%3$s para lhe dar permissões para 'ver' um site.", - "NoSuchPage": "Esta página não existe", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "A atualização de um clique não está disponível porque está a utilizar o Matomo em vários servidores. Por favor, descarregue a última versão de %1$s para continuar.", - "OnlyForSuperUserAccess": "Esta widget é apresentada no painel predefinido apenas para utilizadores com acesso de super-utilizador.", - "PageDownShortcutDescription": "para ir para o final da página", - "PageUpShortcutDescription": "para ir para o topo da página", - "PeriodHasOnlyRawData": "Parece que os relatório para este período ainda não foram processados. Quer ver o que está a acontecer agora? Consulte o %1$sRegisto de visitantes%2$s ou escola um período diferente até que os relatórios sejam gerados.", - "PeriodHasOnlyRawDataNoVisitsLog": "Parece que os relatórios para este período ainda não foram processados, mas estarão disponíveis em poucas horas. Você pode escolher um período de data diferente até que os relatórios sejam gerados.", - "PeriodRange": "Intervalo", - "PivotBySubtable": "O relatório não está articulado %1$s Articulado por %2$s", - "PresetDateLast30Days": "Últimos 30 dias", - "PresetDateLast7Days": "Últimos 7 dias", - "PresetDateLast90Days": "Últimos 90 dias", - "PresetDateLastMonth": "Mês passado", - "PresetDateLastQuarter": "Último trimestre", - "PresetDateLastWeekMonSun": "Última semana (segunda a domingo)", - "PresetDateLastYear": "Último ano", - "PresetDateThisMonth": "Este mês", - "PresetDateThisQuarter": "Este trimestre", - "PresetDateThisWeekMonToday": "Esta semana (segunda-feira - hoje)", - "PresetDateThisYear": "Este ano", - "PresetDateToday": "Hoje", - "PresetDateYesterday": "Ontem", - "Profilable": "Perfilável", - "ProfilableSegmentHelp": "1 para perfilável (por exemplo, cookies foram usados), 0 para não perfilável (por exemplo, nenhum cookie foi usado)", - "QuickAccessTitle": "Pesquisa por %s. Utilize as teclas direcionais para navegar pelos resultados da pesquisa. Tecla de atalho: Pressione 'f' para pesquisar.", - "QuickLinks": "Ligações rápidas", - "ReadMoreOnlineGuide": "Leia mais sobre este tópico no guia online.", - "RemoveTotalsRowDataTable": "O relatório está a apresentar a linha dos totais %s Remover a linha de totais", - "ReportConfigure": "Configurar este relatório", - "ReportGeneratedOn": "Relatório gerado a %s", - "ReportGeneratedXAgo": "Relatório gerado há %s", - "ReportLowercase": "relatório", - "ReportType": "Tipo de relatório", - "ReportWithMetadata": "Relatório com metadados", - "ReportingCategoryHelpPrefix": "Como é que a página de relatório \"%1$s → %2$s\" pode ajudar-me?", - "RowLimit": "Limite de linhas", - "SearchOnMatomo": "Procurar por '%1$s' em Matomo.org", - "SeeAvailableVersions": "Ver versões disponíveis", - "Segments": "Segmentos", - "SharePiwikLong": "Olá! Encontrei um excelente software gratuito: o Matomo!\n\nO Matomo permite-lhe acompanhar visitantes no seu site gratuitamente. Deve mesmo experimentar!", - "SharePiwikShort": "Matomo! Web analytics gratuito/livre. Seja o proprietário dos seus dados.", - "ShareThis": "Partilhar isto", - "ShortcutCalendar": "para abrir o calendário (d representa a Data)", - "ShortcutHelp": "para mostrar esta ajuda", - "ShortcutRefresh": "para atualizar o conteúdo", - "ShortcutSearch": "para abrir a pesquisa (f representa Find - pesquisar)", - "ShortcutSegmentSelector": "para abrir o seletor de segmentos", - "ShortcutWebsiteSelector": "para abrir o seletor de sites", - "ShortcutZenMode": "para o modo Zen", - "ShortcutsAvailable": "Atalhos disponíveis", - "ShowExportUrl": "Mostrar URL de exportação", - "ShowJSCode": "Mostrar o código JavaScript a inserir", - "SkipToContent": "Saltar para o conteúdo", - "SoftwareSubcategoryHelp": "A secção Software mostra os sistemas operativos, navegadores e extensões que os seus visitantes estão a utilizar para aceder ao site, para que possa otimizar o seu site e garantir que é totalmente compatível com as configuração mais comuns.", - "StandardReport": "Relatório padrão", - "StartDate": "Data Inicial", - "SubscribeAndBecomePiwikSupporter": "Avançar para uma página segura de pagamentos com cartão de crédito (Paypal) para se tornar um apoiante do Matomo!", - "SupportPiwik": "Apoie o Matomo!", - "SupportUsOn": "Apoie-nos em", - "SystemSummaryMysqlVersion": "Versão do MySQL", - "SystemSummaryNActivatedPlugins": "%d extensões ativas", - "SystemSummaryNSegments": "%1$d segmentos", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmentos (%2$s pré-processados, %3$s processados em tempo real)", - "SystemSummaryNWebsites": "%d sites", - "SystemSummaryPhpVersion": "Versão do PHP", - "SystemSummaryPiwikVersion": "Versão do Matomo", - "SystemSummaryWidget": "Resumo do sistema", - "TableNoData": "Sem dados para esta tabela.", - "TechDeprecationWarning": "A partir da versão Matomo %1$s, Matomo encerrará o suporte para %2$s. Para obter mais informações %3$s, consulte o nosso post no blog.%4$s", - "ThanksFromAllOfUs": "Um agradecimento de todos nós do Matomo!", - "ThereIsNoDataForThisReport": "Não existem dados para este relatório.", - "UnFlattenDataTable": "O relatório está nivelado %s Torná-lo hierarquizado", - "UndoPivotBySubtable": "Este relatório foi articulado %s Desarticular", - "ViewAllPiwikVideoTutorials": "Ver todos os tutoriais vídeo do Matomo", - "VisitStatusOrdered": "Encomendado", - "VisitStatusOrderedThenAbandoned": "Encomendado, mas carrinho abandonado", - "VisitTypeReturning": "Recorrente", - "VisitTypeReturningCustomer": "Cliente recorrente", - "VisitorsCategoryHelp1": "As páginas de Visitantes mostram informação sobre quem são os seus visitantes. Coisas como de onde os seus visitantes vieram, que dispositivos e navegadores estão a utilizar, e quando é que geralmente visitam o seu site. Compreenda, de forma agregada, quem é a sua audiência e procure por situações atípicas para saber como a sua audiência pode crescer.", - "VisitorsCategoryHelp2": "Para além de informação geral sobre os seus visitantes, pode utilizar o %1$sRegisto de visitantes%2$s para ver o que aconteceu em cada visita.", - "VisitorsOverviewHelp": "A Visão geral dos visitantes ajuda a compreender a popularidade do seu site. Consegue isto fornecendo gráficos que mostram quantas visitas o seu site está a receber ao longo de um determinado período e qual o nível médio de envolvimento em funcionalidades-chave, como pesquisas e descargas.", - "WebAnalyticsReports": "Relatórios de Web Analytics", - "YouAreUsingTheLatestVersion": "Está a utilizar a última versão do Matomo!", - "YourDonationWillHelp": "O seu donativo irá ajudar diretamente no financiamento de novas funcionalidades e melhorias para esta plataforma de análise de código aberto. Isto significa que a comunidade irá sempre beneficiar de uma ferramenta que protege a privacidade e ajuda-o a manter o controlo dos seus dados." - } -} diff --git a/plugins/CoreHome/lang/ro.json b/plugins/CoreHome/lang/ro.json deleted file mode 100644 index c96be6334801cdda24330c38ea9c88ab0fc0a95f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ro.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Nici o data in aceasta categorie. Incearca \"Include toata populatia\".", - "CheckForUpdates": "Verifică actualizări", - "CheckPiwikOut": "Verifica iesire Matomo (out)!", - "ChooseWebsite": "Alegeti website", - "CloseWidgetDirections": "Poti inchide acest widget dand click pe iconul 'X' in partea de sus a widget-ului.", - "DataForThisReportHasBeenPurged": "Datele din acest raport sunt mai vechi decât %s luni şi au fost şterse.", - "DataTableExcludeAggregateRows": "Randurile grupate sunt aratate %s Ascunde-le", - "DataTableIncludeAggregateRows": "Randurile grupate sunt ascunse %s Arata-le", - "Default": "implicit", - "DonateCall1": "Matomo va fi folosit de dumneavoastra gratuit intotdeauna, dar aceasta nu inseamna ca pe noi nu ne costa nimic sa il facem.", - "DonateCall2": "Matomo are nevoie de sprijinul dumneavoastra continuu pentru a continua sa se dezvolte si sa progreseze.", - "ExcludeRowsWithLowPopulation": "Toate randurile sunt afisate %s Exclude popularea putina", - "ExternalHelp": "Ajutor (se deschide in tab nou)", - "FlattenDataTable": "Raportul este ierarhic %s Faceti-l uniform", - "IncludeRowsWithLowPopulation": "Randurile cu populare putina sunt ascunse %s Afiseaza toate randurile", - "InjectedHostEmailBody": "Buna, am incercat sa accesez Matomo astazi si am primit o avertizare de hostname necunoscut.", - "InjectedHostEmailSubject": "Matomo a fost acesat de pe un hostname necunoscut: %s", - "InjectedHostNonSuperUserWarning": "%1$sApasă aici pentru a accesa Matomo în siguranță%2$s și pentru a șterge acestă atenționare. Ai putea să contactezi un administrator Matomo și să-i atenționezi despre această problemă (%3$strimite email%4$s).", - "InjectedHostSuperUserWarning": "Matomo poate sa fie configurat greșit (de exemplu, dacă Matomo a fost recent mutat pe un server nou sau la un URL nou). Poți fie să %1$s dai click aici și să adaugi %2$s ca un hostname valid de Matomo (dacă ai încredere)%3$s, sau %4$s să dai click aici și să te duci la %5$s pentru a accesa Matomo în siguranță%6$s.", - "InjectedHostWarningIntro": "Acum accesati Matomo de la %1$s, dar Matomo a fost configurat sa ruleze la aceasta adresa: %2$s.", - "NoPrivilegesAskPiwikAdmin": "Sunteti logat ca '%1$s' dar se pare ca nu aveti nici o permisiune setata in Matomo. %2$s Solicitati administratorului dvs al Matomo (click pentru email)%3$s sa va permita accesul tip 'vizualizare' pentru un site.", - "PeriodRange": "Perioadă", - "PresetDateToday": "Azi", - "PresetDateYesterday": "Ieri", - "ReportGeneratedOn": "Raport creat la %s", - "ReportGeneratedXAgo": "Raport creat %s în urmă", - "SharePiwikShort": "Matomo! Analiză liberă şi open-source a activităţii web. Fii stăpân pe datele tale.", - "ShareThis": "Distribuie", - "ShowJSCode": "Arată codul JavaScript ce trebuie folosit", - "SubscribeAndBecomePiwikSupporter": "Mergeti catre o pagina securizata de procesare a platii online (Paypal) pentru a deveni un sustinator al Matomo!", - "SupportPiwik": "Susţine Matomo!", - "SystemSummaryPhpVersion": "PHP version", - "TableNoData": "Nici un fel de date pentru aceasta tabela.", - "ThereIsNoDataForThisReport": "Nu există date pentru acest raport.", - "UnFlattenDataTable": "Acest raport este uniform %s Faceti-l ierarhic", - "ViewAllPiwikVideoTutorials": "Vizualizeaza toate Tutorialele Video ale Matomo", - "WebAnalyticsReports": "Rapoarte de analitică web", - "YouAreUsingTheLatestVersion": "Foloseşti ultima versiune Matomo!" - } -} diff --git a/plugins/CoreHome/lang/ru.json b/plugins/CoreHome/lang/ru.json deleted file mode 100644 index 4b04f91a00862a6e7292a2bcccdfe838916ab51a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ru.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "В случае, если вы используете блокировщик рекламы, пожалуйста, отключите его, чтобы убедиться, что Matomo работает без проблем.", - "AddTotalsRowDataTable": "В отчёте не отображается итоговая строка %s. Показать итоговую строку", - "CategoryNoData": "Нет данных в этой категории. Попробуйте «Включить все показатели».", - "ChangeCurrentWebsite": "Выбор вебсайта, сейчас выбран вебсайт: %s", - "ChangePeriod": "Сменить период", - "ChangeVisualization": "Сменить представление", - "CheckForUpdates": "Проверить на обновления", - "CheckPiwikOut": "Попробуйте Matomo!", - "ChooseWebsite": "Выбрать сайт", - "ChooseX": "Выберите %1$s", - "ClickRowToExpandOrContract": "Нажмите на эту строку, чтобы растянуть или сжать подтаблицу.", - "ClickToEditX": "Редактировать %s", - "ClickToSeeFullInformation": "Нажмите, чтобы увидеть полную информацию", - "CloseSearch": "Закрыть поиск", - "CloseWidgetDirections": "Вы можете закрыть этот виджет, нажав на значок 'X' в верхней части виджета.", - "CssDidntLoad": "Ваш браузер не смог загрузить стили этой страницы.", - "CustomLimit": "Пользовательские лимиты", - "DataForThisReportHasBeenDisabled": "Сегментация в настоящее время отключена для этого отчета. Дополнительные сведения см. в разделе %1$sчасто задаваемых вопросов%2$s.", - "DataForThisReportHasBeenPurged": "Данные для этого отчета хранятся более %s месяцев и были почищены.", - "DataTableCombineDimensions": "Размеры указаны отдельно %s Показать размеры вместе", - "DataTableExcludeAggregateRows": "Выбранные строки отображены %s Скрыть их", - "DataTableHowToSearch": "Нажмите ввод или щелкните значок поиска для поиска", - "DataTableIncludeAggregateRows": "Выбранные строки скрыты %s Показать их", - "DataTableShowDimensions": "Размеры объединены %s Показать размеры отдельно", - "DateInvalid": "Данная комбинация даты и периода невалидна. Пожалуйста, выберите валидную дату в селекторе даты.", - "Default": "по умолчанию", - "DevicesSubcategoryHelp": "Раздел «Устройства» поможет вам понять технологии, которые ваши посетители используют для доступа к вашему сайту. Вы увидите отчеты о типе устройства и конкретных моделях, чтобы вы могли оптимизировать свой сайт для самых популярных устройств.", - "DonateCall1": "Matomo всегда будет бесплатным для использования, но это не значит, что нам это ничего не стоит.", - "DonateCall2": "Matomo нуждается в вашей постоянной поддержке, чтобы расти и процветать.", - "DonateCall3": "Если вы думаете, что Matomo добавил существенное значение для вашего бизнеса или деятельности, %1$sпожалуйста, сделайте пожертвование!%2$s или %3$sкупите премиум-возможность%4$s. Поможет каждый цент.", - "EndDate": "Конечная дата", - "EndShortcut": "Конец", - "EngagementSubcategoryHelp1": "В разделе «Вовлеченность» представлены отчеты, которые помогают количественно определить, сколько новых и постоянных посетителей вы получаете. Вы также можете просматривать отчеты с разбивкой по среднему времени и количеству страниц за одно посещение, а также количеству посещений посетителем вашего сайта и наиболее распространенному количеству дней между посещениями.", - "EngagementSubcategoryHelp2": "Это может помочь вам оптимизировать частоту и количество посещений с высоким уровнем взаимодействия в дополнение к максимальному охвату.", - "EnterZenMode": "Вход в режим дзен (скрыть меню)", - "ExceptionNotAllowlistedIP": "Вы не можете использовать этот Matomo, так как ваш IP %s не разрешён.", - "ExcludeRowsWithLowPopulation": "Все строки отображены %s Кроме низких показателей", - "ExitZenMode": "Выход из режима дзен (показать меню)", - "ExpandSubtables": "Развернуть подтаблицы", - "ExportFormat": "Формат экспорта", - "ExportTooltip": "Примечание: Чтобы использовать сгенерированный URL экспорта, нужно указать токен аутентификации приложения. Вы можете настроить эти токены в Персональное → Безопасность → Токены аутентификации.", - "ExportTooltipWithLink": "Примечание: Чтобы использовать сгенерированный URL экспорта, нужно указать токен аутентификации приложения. Вы можете настроить эти токены в %1$s[Персональное → Безопасность → Токены аутентификации]%2$s. Замените %3$s в URL экспорта на ваш токен Аутентификации. Предупреждение: Никогда не делитесь URL с настоящим токеном с кем-либо.", - "ExternalHelp": "Помощь (откроется в новой вкладке)", - "FlattenDataTable": "Отчет построен по иерархии %s Сделать его линейным", - "FlattenReport": "Сокращённый отчёт", - "FormatMetrics": "Формат метрик", - "HideExportUrl": "Скрыть URL экспорта", - "HomeShortcut": "Домой", - "IncludeRowsWithLowPopulation": "Строки с низкими показателями отображены %s Показать все", - "InjectedHostEmailBody": "Привет, попытался зайти в Matomo сегодня и столкнулся с проблемой неизвестного хоста.", - "InjectedHostEmailSubject": "В Matomo был получен доступ по неизвестному хосту: %s", - "InjectedHostNonSuperUserWarning": "%1$sНажмите здесь, чтобы безопасно войти в Matomo%2$s и убрать это предупреждение. Вы также можете связаться с администратором Matomo и уведомить его о проблеме (%3$sотправить ему email%4$s).", - "InjectedHostSuperUserWarning": "Matomo может быть неправильно сконфигурирован (например, если Matomo был недавно перемещен на новый сервер или переехал на новый адрес). Вы также можете %1$sнажать сюда и добавить %2$s в качестве доверенного имени хоста Matomo (если вы доверяете ему)%3$s, или %4$sнажмите сюда и перейдите %5$s для безопасного доступа к Matomo%6$s.", - "InjectedHostWarningIntro": "Сейчас вы заходите в Matomo на %1$s, но Matomo был настроен на этом адресе: %2$s.", - "JavascriptDisabled": "JavaScript должен быть включен, чтобы использовать Matomo в стандартном представлении.
Однако кажется, что JavaScript либо отключен, либо не поддерживается вашим браузером.
Чтобы использовать стандартное представление, включите JavaScript, изменив настройки браузера, затем %1$sповторите попытку%2$s.
", - "JsDidntLoad": "Ваш браузер не смог загрузить скрипты этой страницы.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Лидирующая открытая аналитическая платформа, уважающая вашу конфиденциальность.", - "MacPageDown": "Fn + стрелка вправо", - "MacPageUp": "Fn + стрелка влево", - "MainNavigation": "Основная навигация", - "Menu": "Меню", - "MenuEntries": "Пункты меню", - "NoPrivilegesAskPiwikAdmin": "Вы авторизованы как «%1$s», но, кажется, для вас не установлены права в Matomo. %2$s Попросите вашего администратора (кликните, чтобы написать письмо)%3$s дать вам доступ на «просмотр» к статистике сайта.", - "NoSuchPage": "Запрашиваемая страница не существует", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Автоматическое обновление недоступно так как вы используете Matomo с несколькими серверами. Пожалуйста, скачайте вручную последнюю версию с %1$s для продолжения.", - "OnlyForSuperUserAccess": "Этот виджет отображается в панели управления по умолчанию только для суперпользователя.", - "PageDownShortcutDescription": "переход вниз страницы", - "PageUpShortcutDescription": "переход наверх страницы", - "PeriodHasOnlyRawData": "Похоже, отчеты за этот период еще не обработаны. Хотите увидеть, что сейчас происходит? Просмотрите %1$sЖурнал посещений%2$s или выберите другой период времени пока отчёты не сгенерируются.", - "PeriodHasOnlyRawDataNoVisitsLog": "Похоже, что отчеты за этот период еще не обработаны, но они будут доступны через несколько часов. Вы можете выбрать другой период или дату пока обрабатывается этот отчет.", - "PeriodRange": "Период", - "PivotBySubtable": "Этот отчёт не развёрнут %1$s развернуть по параметру %2$s", - "PresetDateToday": "Сегодня", - "PresetDateYesterday": "Вчера", - "Profilable": "Профилируемый", - "QuickAccessTitle": "Поиск %s. Используйте клавиши со стрелками для переходов в пределах результатов поиска. Быстрый доступ: нажмите 'f' для поиска.", - "QuickLinks": "Быстрые ссылки", - "ReadMoreOnlineGuide": "Подробнее об этом читайте в онлайн-руководстве.", - "RemoveTotalsRowDataTable": "В отчёте отображается итоговая строка %s. Скрыть итоговую строку", - "ReportGeneratedOn": "Отчёт был составлен %s", - "ReportGeneratedXAgo": "Отчёт был составлен %s назад", - "ReportLowercase": "отчёт", - "ReportType": "Тип отчёта", - "ReportWithMetadata": "Отчёт с метаданными", - "ReportingCategoryHelpPrefix": "Как мне поможет \"%1$s → %2$s\" страница отправки отсчета?", - "RowLimit": "Лимиты строк", - "SearchOnMatomo": "Искать '%1$s' на Matomo.org", - "SeeAvailableVersions": "Посмотреть доступные версии", - "Segments": "Сегменты", - "SharePiwikLong": "Привет! Я только что нашел отличную бесплатную программу: Matomo!\n\nMatomo позволит вам отслеживать посетителей вашего сайта бесплатно. Вы обязательно должны попробовать!", - "SharePiwikShort": "Matomo! Свободное и открытое программное веб-аналитики. Владейте вашими данными.", - "ShareThis": "Поделиться", - "ShortcutCalendar": "открыть календарь (d обозначает дату)", - "ShortcutHelp": "открыть эту помощь", - "ShortcutRefresh": "чтобы обновить содержимое", - "ShortcutSearch": "открыть поиск (f обозначает поиск)", - "ShortcutSegmentSelector": "чтобы выбрать сегмент", - "ShortcutWebsiteSelector": "чтобы выбрать сайт", - "ShortcutZenMode": "для режима дзен", - "ShortcutsAvailable": "Доступные ярлыки", - "ShowExportUrl": "Показать URL экспорта", - "ShowJSCode": "Показать JavaScript код для вставки", - "SkipToContent": "Перейти к содержимому", - "SoftwareSubcategoryHelp": "В разделе «Программное обеспечение» показаны операционные системы, браузеры и плагины, которые ваши посетители используют для доступа к сайту, чтобы вы могли оптимизировать свой сайт, чтобы обеспечить его полную совместимость с наиболее популярными конфигурациями.", - "StandardReport": "Стандартный отчёт", - "StartDate": "Начальная дата", - "SubscribeAndBecomePiwikSupporter": "Приступить к безопасной оплате кредитной картой (Paypal), чтобы стать сторонником Matomo!", - "SupportPiwik": "Поддержите Matomo!", - "SupportUsOn": "Поддержите нас на", - "SystemSummaryMysqlVersion": "Версия MySQL", - "SystemSummaryNActivatedPlugins": "%d активированных плагинов", - "SystemSummaryNSegments": "%1$d сегментов", - "SystemSummaryNSegmentsWithBreakdown": "%1$d сегментов (%2$s в предварительной обработке, %3$s обрабатываются в реальном времени)", - "SystemSummaryNWebsites": "%d веб-сайтов", - "SystemSummaryPhpVersion": "Версия PHP", - "SystemSummaryPiwikVersion": "Версия Matomo", - "SystemSummaryWidget": "Системный отчёт", - "TableNoData": "Нет данных для этой таблицы.", - "TechDeprecationWarning": "Начиная с версии Matomo %1$s, Matomo прекращает поддержку %2$s. Для детальной информации %3$sсмотрите запись в нашем блоге.%4$s", - "ThanksFromAllOfUs": "Спасибо от всех нас в Matomo!", - "ThereIsNoDataForThisReport": "Не существует данных для составления отчёта.", - "UnFlattenDataTable": "Отчет более конкретный %s Построить его по иерархии", - "UndoPivotBySubtable": "Этот отчёт развёрнут %s Отменить горизонтальный отчёт", - "ViewAllPiwikVideoTutorials": "Просмотреть все обучающие ролики про Matomo", - "VisitStatusOrdered": "Заказано", - "VisitStatusOrderedThenAbandoned": "Заказал, но вышел из корзины", - "VisitTypeReturning": "Возвраты", - "VisitTypeReturningCustomer": "Постоянный клиент", - "VisitorsCategoryHelp1": "Страницы посетителей рассказывают вам о том, кто ваши посетители. Например, откуда пришли ваши посетители, какие устройства и браузеры они используют и когда они обычно посещают ваш сайт. Поймите в совокупности, кто ваша аудитория, и ищите, кто выделяется, чтобы увидеть, как ваша аудитория может вырасти.", - "VisitorsCategoryHelp2": "В дополнение к общей информации о ваших посетителях вы также можете использовать %1$sЖурнал посещений%2$s, чтобы увидеть, что происходило при каждом отдельном посещении.", - "VisitorsOverviewHelp": "Обзор посетителей помогает понять популярность вашего сайта. Это достигается за счет предоставления диаграмм, показывающих, сколько посещений ваш сайт получает за выбранный период, а также средний уровень взаимодействия с ключевыми функциями, такими как поиск и загрузка.", - "WebAnalyticsReports": "Отчеты веб аналитики", - "YouAreUsingTheLatestVersion": "У вас последняя версия Matomo!", - "YourDonationWillHelp": "Ваше пожертвование напрямую поможет финансировать новые функции и улучшения для этой аналитической платформы с открытым исходным кодом. Это означает, что сообществу всегда будет полезен инструмент, который защищает конфиденциальность и позволяет вам контролировать свои данные." - } -} diff --git a/plugins/CoreHome/lang/si.json b/plugins/CoreHome/lang/si.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/si.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/sk.json b/plugins/CoreHome/lang/sk.json deleted file mode 100644 index 7ef90d891dda688982af8c20cb36a30570039785..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/sk.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Pre túto kategóriu nie sú dáta. Skúste použiť „Vrátane celej populácie“.", - "ChangeVisualization": "Zmeniť zobrazenie", - "CheckForUpdates": "Skontrolovať aktualizácie", - "CheckPiwikOut": "Vyskúšajte Matomo!", - "ChooseWebsite": "Vyberte si web", - "ChooseX": "Vyberte %1$s", - "ClickRowToExpandOrContract": "Kliknite na tento riadok pre rozvinutie alebo zbalenie podtabuľky.", - "ClickToEditX": "Kliknite pre editovanie %s", - "ClickToSeeFullInformation": "Klinite pre viac informácií.", - "CloseSearch": "Zavrieť vyhľadávanie", - "CloseWidgetDirections": "Túto miniaplikáciu môžete zavrieť kliknutím na ikonu 'X' navrchu.", - "DataForThisReportHasBeenPurged": "Dáta pre tento report sú viac ako %s mesiacov staré a boli zmazané.", - "DataTableExcludeAggregateRows": "Súhrnné riadky sú zobrazené %s Schovať ich", - "DataTableHowToSearch": "Stlačte enter alebo kliknite na ikonu hľadania pre vyhľadávanie", - "DataTableIncludeAggregateRows": "Súhrnné riadky sú schované %s Zobraziť ich", - "Default": "Prednastavené", - "DonateCall1": "Používanie projektu Matomo Vás nebude nikdy nič stáť, ale to neznamená, že jeho vývoj nič nestojí.", - "DonateCall2": "Matomo potrebuje Vašu neustálu podporu aby rástol a prospieval.", - "ExcludeRowsWithLowPopulation": "Všetky riadky sú zobrazené %s Vylúčiť nízku populáciu", - "ExternalHelp": "Nápoveda (otvorí sa nová tabuľka)", - "FlattenDataTable": "Report je hierarchický %s Urobiť ho plochý", - "IncludeRowsWithLowPopulation": "Riadky s nízkou populáciou sú skryté %s Zobraziť všetky riadky", - "InjectedHostEmailBody": "Hello, dnes som sa pokúšal vstúpiť do Matomou ale objavilo sa neznáme hostname varovanie.", - "InjectedHostEmailSubject": "Do Matomou bolo vstúpené s neznámym hostname: %s", - "InjectedHostNonSuperUserWarning": "%1$s Kliknite sem pre bezpečný prístup do Matomo %2$s a odstráňte toto varovanie. Môžete taktiež kontaktovať Vášho Matomo administrátora a upozorniť ho na túto záležitosť (%3$s kliknite sem pre email%4$s).", - "InjectedHostSuperUserWarning": "Matomo môže byť zle nakonfigurovaný (napr., ak bol práve Matomo presunutý na nový server alebo URL). Môžete buďto %1$s kliknúť sem a pridať %2$s ako platné Matomo hostname (ak tomu dôverujete)%3$s, alebo %4$s kliknúť sem a vsúpiť %5$s do Matomou bezpečne%6$s.", - "InjectedHostWarningIntro": "Práve vstupujete do Matomo z %1$s, ale Matomo bol nakonfigurovaný aby bežal na tejto adrese: %2$s.", - "MainNavigation": "Hlavná navigácia", - "Menu": "Menu", - "NoPrivilegesAskPiwikAdmin": "Ste prihlásený ako '%1$s' ale vyzerá to tak , že nemáte žiadne povolenie do Matomo. %2$s Spýtajte sa Vášho Matomo administrátora (Kliknite pre email)%3$s aby Vám dal 'prezerací' prístup na webstránku.", - "NoSuchPage": "Táto stránka neexistuje", - "PeriodRange": "Rozsah", - "PivotBySubtable": "Tento report nebol pivotovaný %1$s Pivotovať podľa %2$s", - "PresetDateToday": "Dnes", - "PresetDateYesterday": "Včera", - "ReportGeneratedOn": "Report vygenerovaný %s", - "ReportGeneratedXAgo": "Report vygenerovaný pred %s", - "SharePiwikShort": "Matomo! Voľne dostupný analytický nástroj. Vlastnite svoje dáta.", - "ShareThis": "Zdieľajte to", - "ShowJSCode": "Zobraziť javascript kód pre vloženie", - "SkipToContent": "Preskočiť k obsahu", - "SubscribeAndBecomePiwikSupporter": "Pristúpte na stránku bezpečného platenia kreditnou kartou (Paypal) a staňte sa podporovateľom Matomou!", - "SupportPiwik": "Podporte Matomo!", - "SystemSummaryPhpVersion": "PHP verzia", - "TableNoData": "Žiadne údaje k tejto tabuľke.", - "ThereIsNoDataForThisReport": "Neexistujú žiadne dáta pre túto správu.", - "UnFlattenDataTable": "Report je jednotný %s Urobte ho hierarchickým", - "UndoPivotBySubtable": "Tento report bol pivotovaný %s Naspäť pivot", - "ViewAllPiwikVideoTutorials": "Prezrite si všetky Matomo videonávody", - "WebAnalyticsReports": "Web Analytik report", - "YouAreUsingTheLatestVersion": "Používate najnovšiu verziu Matomou!" - } -} diff --git a/plugins/CoreHome/lang/sl.json b/plugins/CoreHome/lang/sl.json deleted file mode 100644 index a80d99a416272c61c052ec77d5465eb0a146c1e7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/sl.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "V tej kategoriji ni podatkov. Poizkusite \"Vključiti celotno populacijo\".", - "ChangePeriod": "Spremeni obdobje", - "ChangeVisualization": "Spremenite način prikazovanja", - "CheckForUpdates": "Preveri za posodobitve", - "CheckPiwikOut": "Preverite Matomo!", - "ChooseWebsite": "Izberite spletno stran", - "ChooseX": "Izberite %1$s", - "ClickToEditX": "Kliknite za urejanje %s", - "ClickToSeeFullInformation": "Kliknite za ogled vseh informacij", - "CloseSearch": "Zapri iskanje", - "CloseWidgetDirections": "Ta pripomoček lahko zaprete s klikom na ikono 'X' na vrhu pripomočka.", - "DataForThisReportHasBeenPurged": "Podatki za to poročilo so stari več kot %s mesecev in so bili očiščeni.", - "DataTableCombineDimensions": "Mere so prikazane ločeno %s Prikaži kombinirane dimenzije", - "DataTableExcludeAggregateRows": "Prikazane so združene vrstice %s Skrij jih", - "DataTableHowToSearch": "Pritisnite enter ali kliknite na ikono za iskanje", - "DataTableIncludeAggregateRows": "Skrite so združene vrstice %s Prikaži jih", - "DataTableShowDimensions": "Mere so kombinirane %s Prikaži mere ločeno", - "DateInvalid": "Navedena kombinacija datuma in obdobja je neveljavna. Prosimo, izberite veljaven datum v izbirniku datumov.", - "Default": "privzeto", - "DonateCall1": "Uporaba Matoma je brezplačna, vendar to ne pomeni, da nas izdelava nič ne stane.", - "DonateCall2": "Matomo potrebuje vašo stalno podporo, da raste in uspeva.", - "DonateCall3": "Če menite, da je Matomo vašemu podjetju ali prizadevanju dodal pomembno vrednost, %1$s prosimo, razmislite o donaciji %2$s ali %3$s nakupu vrhunske funkcije%4$s. Vsak peni bo pomagal.", - "EndShortcut": "Konec", - "EnterZenMode": "Vstopite v način Zen (skrij menije)", - "ExceptionNotAllowlistedIP": "Tega Matoma ne morete uporabljati, ker vaš IP %s ni dovoljen.", - "ExitZenMode": "Zapustite način Zen (prikažite menije)", - "NoPrivilegesAskPiwikAdmin": "Vpisani ste kot '%1$s', vendar v Matomo-u nimate nastavljenih nobenih pooblastil. %2$s Poprosite vašega Matomo administratorja (klik za email)%3$s naj vam da pooblastila za ogled določene(ih) strani.", - "PeriodRange": "Razpon", - "PresetDateToday": "Danes", - "PresetDateYesterday": "Včeraj", - "ReportGeneratedOn": "Poročilo ustvarjano na %s", - "ReportGeneratedXAgo": "Poročilo ustvarjano pred %s", - "ShowJSCode": "Prikaži JavaScript kodo za vstavljanje", - "SystemSummaryPhpVersion": "Različica PHP", - "ThereIsNoDataForThisReport": "Za to poročilo ni podatkov." - } -} diff --git a/plugins/CoreHome/lang/sq.json b/plugins/CoreHome/lang/sq.json deleted file mode 100644 index 04e4afa5f4ed9dc4c2f5bd59b3985ac0966b6e18..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/sq.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Në rast se përdorni ndonjë bllokues reklamash, ju lutemi, çaktivizojeni për këtë sajt, që të siguroni punën pa probleme të Matomo-s.", - "AddTotalsRowDataTable": "Raporti s’shfaq rreshtin e tërësoreve %s Shfaqe rreshtin e tërësoreve", - "CategoryNoData": "Pa të dhëna për këtë kategori. Provoni të “Përfshini tërë popullatën”.", - "ChangeCurrentWebsite": "Zgjidhni një sajt, sajti i përzgjedhur tani: %s", - "ChangePeriod": "Ndryshoni periudhën", - "ChangeVisualization": "Ndryshoni vizualizimin", - "CheckForUpdates": "Kontrollo për përditësime", - "CheckPiwikOut": "Provojeni Matomo-s!", - "ChooseWebsite": "Zgjidhni sajt", - "ChooseX": "Zgjidhni %1$s", - "ClickRowToExpandOrContract": "Që të zgjeroni ose tkurrni nëntabelën, klikoni mbi këtë rresht.", - "ClickToEditX": "Klikoni që të përpunoni %s", - "ClickToSeeFullInformation": "Klikoni që të shihni hollësitë e plota", - "CloseSearch": "Mbylle kërkimin", - "CloseWidgetDirections": "Këtë “widget” mund ta mbyllni duke klikuar mbi ikonën 'X' në krye të widget-it.", - "CopyModalNote": "%1$sShënim:%2$s %3$s i kopjuar mund të ketë nevojë për përshtatje, nëse përmban referenca specifike te sajti origjinal. Shqyrtoni rregullimet, për të garantuar përputhje.", - "CopyX": "Kopjo %1$s", - "CopyXDescription": "Përzgjidhni sajtin ku të kopjohet kjo %1$s. Kështu do të krijohet një kopje e përpiktë, përfshi rregullimet, te sajti i zgjedhur.", - "CssDidntLoad": "Shfletuesi juaj s’qe në gjendje të ngarkonte stilin e kësaj faqeje.", - "CustomLimit": "Kufi vetjak", - "DataForThisReportHasBeenDisabled": "Segmentimi është aktualisht i çaktivizuar për këtë raport. Për më tepër hollësi, ju lutemi, shihni %1$skëto PBR%2$s.", - "DataForThisReportHasBeenPurged": "Të dhënat e këtij raporti janë më të vjetra se %s muaj dhe u spastruan.", - "DataTableCombineDimensions": "Përmasat janë shfaqur ndarazi %s Shfaqi përmasat të ndërthurura", - "DataTableExcludeAggregateRows": "Shfaqen rreshtat përmbledhur %s Fshihi", - "DataTableHowToSearch": "Që të kërkoni, shtypni tastin Enter, ose klikoni ikonën e kërkimit", - "DataTableIncludeAggregateRows": "Rreshtat e përmbledhur janë të fshehur %s Shfaqi", - "DataTableShowDimensions": "Përmasat janë të ndërthurura %s Shfaqi përmasat ndarazi", - "DateInvalid": "Kombinimi dhënë për datë dhe periudhë është i pavlefshëm. Ju lutemi, zgjidhni një datë të vlefshme te përzgjedhësi i datave.", - "Default": "parazgjedhje", - "DevicesSubcategoryHelp": "Ndarja Pajisje ju ndihmon të njihni teknologjinë që vizitorët përdorin në sajtin tuaj. Do të shihni raporte mbi llojin e pajisjes dhe modele specifike, që t’ju bëjnë të mundur ta optimizoni sajtin për shumicën e pajisjeve popullore.", - "DonateCall1": "Përdorimi i Matomo-a s’do t’ju kushtojë kurrë një dysh, por kjo s’do të thotë që neve s’na kushton krijimi i tij.", - "DonateCall2": "Që të rritet dhe lulëzojë, Matomo lyp përkrahjen tuaj.", - "DonateCall3": "Nëse jeni të mendimit se Matomo ka sjellë një shtim të vyer në biznesin apo në përpjekjet tuaja, %1$sju lutemi, shihni mundësinë e dhurimit%2$s, ose %3$sblerjes së paketës me pagesë%4$s. Çdo qindarkë do të na ndihmonte.", - "EndDate": "Datë Përfundimi", - "EndShortcut": "Përfundim", - "EngagementSubcategoryHelp1": "Ndarja Angazhim ju furnizon raporte që ndihmojnë të kini një ide mbi sasinë e vizitave të reja dhe të rikthyerish që përfiton sajti juaj. Mund të shqyrtoni edhe raporte që japin kohën mesatare dhe numrin e faqeve sipas vizitash, si dhe numrin e herëve që një vizitor ka qenë në sajtin tuaj dhe numrin më të zakonshëm të ditëve mes vizitash.", - "EngagementSubcategoryHelp2": "Kjo mund t’ju ndihmojë të bëni optimizim për shpeshti dhe vizita me shkallë të lartë ndërveprimi, përveç se për të kapur maksimumin e shtrirjes tuaj.", - "EnterZenMode": "Kalo nën mënyrën Zen (fshihi menutë)", - "ExceptionNotAllowlistedIP": "S’mund të përdorni këtë instancë të Matomo-s, ngaqë IP-ja juaj %s s’është e lejuar.", - "ExcludeRowsWithLowPopulation": "Po shfaqen krejt rreshtat %s Përjashtoni popullatat e ulëta", - "ExitZenMode": "Dil nga mënyra Zen (shfaqi menutë)", - "ExpandSubtables": "Zgjeroji nëntabelat", - "ExportFormat": "Format eksportimi", - "ExportTooltip": "Shënim: Për të përdorur URL-në e prodhuar për eksportim, do t’ju duhet të specifikoni një aplikacion mirëfilltësimi token-ësh. Këta token-ë mund t’i formësoni te Përgjegjës → Siguri → Token-ë Mirëfilltësimi.", - "ExportTooltipWithLink": "Shënim: Për të përdorur URL-në e prodhuar për eksportim, do t’ju duhet të specifikoni një aplikacion mirëfilltësimi token-ësh. Këta token-ë mund t’i formësoni te %1$s[Përgjegjës → Siguri → Token-ë Mirëfilltësimi]%2$s. Zëvendësoni %3$s te URL Eksportimi me token-in tuaj të Mirëfilltësimit. Kujdes: Mos ia jepni kujt tjetër URL-në me token-in real.", - "ExternalHelp": "Ndihmë (hapet në skedë të re)", - "FlattenDataTable": "Raporti është hierarkik %s Bëje të sheshtë", - "FlattenReport": "Raport i sheshtë", - "FormatMetrics": "Statistika formatesh", - "HideExportUrl": "Fshihe URL-në e Eksportimit", - "HomeShortcut": "Kreu", - "IncludeDimensionsSeparately": "Përfshiji ndarazi përmasat", - "IncludeRowsWithLowPopulation": "Janë fshehur rreshta me popullatë të ulët %s Shfaqi krejt rreshtat", - "InjectedHostEmailBody": "Tungjatjeta, provova të hyj në Matomo sot dhe ndesha sinjalizimin për strehëemër të panjohur.", - "InjectedHostEmailSubject": "Te Matomo u hy me një strehëemër të panjohur: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlikoni këtu që të hyni te Matomo pa rrezik%2$s dhe që të hiqet ky sinjalizim. Mund të doni edhe të lidheni me përgjegjësin e instalimit tuaj të Matomo-s dhe t’ia bëni të ditur këtë problem (%3$sklikoni këtu që t’ia dërgoni me email%4$s).", - "InjectedHostSuperUserWarning": "Matomo mund të jetë i keqformësuar (për shembull, në rast se Matomo tani së fundi u kalua në një shërbyes të ri ose URL të re). Mundeni ose %1$stë klikoni këtu dhe ta shtoni %2$s si një strehëemër të vlefshëm Matomo (nëse i zini besë)%3$s, ose %4$stë klikoni këtu dhe të kaloni te %5$s për hyrje të parrezik në Matomo%6$s.", - "InjectedHostWarningIntro": "Po hyni në Matomo që prej %1$s, por Matomo qe formësuar të xhirojë në këtë adresë: %2$s.", - "JavascriptDisabled": "Që të mund të përdorni Matomo-n në parjen standarde, duhet të aktivizohet JavaScript-i.
Por ja që duket se ose JavaScript-i është i çaktivizuar, ose nuk mbulohet nga shfletuesi juaj.
Që të përdorni parjen standarde, aktivizoni JavaScript-in duke ndryshuar mundësitë përkatëse te shfletuesi juaj, mandej %1$sriprovoni%2$s.
", - "JsDidntLoad": "Shfletuesi juaj s’qe në gjendje të ngarkonte programthet e kësaj faqeje.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Platforma kryesuese e analizave të hapura që respekton privatësinë tuaj.", - "LearnMoreFullStop": "%1$sMësoni më tepër.%2$s", - "MacPageDown": "Fn+tasti shigjetë Djathtas", - "MacPageUp": "Fn+tasti shigjetë Majtas", - "MainNavigation": "Lëvizja kryesore", - "Menu": "Menu", - "MenuEntries": "Zëra menuje", - "NoPrivilegesAskPiwikAdmin": "Jeni i futur si '%1$s', por duket se s’keni leje të rregulluara për ju në Matomo. %2$s Kërkojini administratorit tuaj te Matomo (klikoni që t’i dërgoni email)%3$s që t’ju japë të drejta 'parjesh' te një sajt.", - "NoSuchPage": "Kjo faqe s’ekziston", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "S’kryeni dot përditësim me një klikim, ngaqë po e përdorni Matomo-n me disa shërbyes. Ju lutemi, që të mund të vazhdohet, shkarkoni versionin më të ri prej %1$s.", - "OnlyForSuperUserAccess": "Ky “widget” u shfaqet te pulti parazgjedhje vetëm përdoruesve që kanë hyrje si Superpërdorues.", - "PageDownShortcutDescription": "që të shkohet në fund të faqes", - "PageUpShortcutDescription": "që të shkohet në krye të faqes", - "PeriodHasOnlyRawData": "Duket sikur raportet për këtë periudhë s’janë përpunuar ende. Doni të shihni ç’po ndodh tani? Shihni %1$sRegjistër vizitash%2$s, ose zgjidhni një periudhë tjetër datash, deri sa të prodhohen raportet.", - "PeriodHasOnlyRawDataNoVisitsLog": "Duket sikur raportet për këtë periudhë s’janë përpunuar ende, por do të jenë gati pas pak orësh. Deri sa të prodhohen raportet, mund të zgjidhnit një tjetër periudhë datash.", - "PeriodRange": "Interval", - "PivotBySubtable": "Ky raport s’është rrotulluar %1$s Rrotullojeni sipas %2$s", - "PresetDateLast30Days": "30 ditët e fundit", - "PresetDateLast7Days": "7 ditët e fundit", - "PresetDateLast90Days": "90 ditët e fundit", - "PresetDateLastMonth": "Muajin e fundit", - "PresetDateLastQuarter": "Katërmujorin e fundit", - "PresetDateLastWeekMonSun": "Javën e fundit (E hënë - E diel)", - "PresetDateLastYear": "Vitin e fundit", - "PresetDateThisMonth": "Këtë muaj", - "PresetDateThisQuarter": "Këtë katërmujor", - "PresetDateThisWeekMonToday": "Këtë javë (E hënë - Sot)", - "PresetDateThisYear": "Këtë vit", - "PresetDateToday": "Sot", - "PresetDateYesterday": "Dje", - "Profilable": "E profilizueshme", - "ProfilableSegmentHelp": "1 për të profilizueshme (p.sh., qenë përdorur “cookies”), 0 për të paprofilizueshme (p.sh., s’qenë përdorur “cookies”)", - "QuickAccessTitle": "Kërkoni për %s. Përdorni tastet shigjetë që të lëvizni nëpër përfundimet e kërkimit. Shkurtore tastiere: Shtypni tastin 'f' që të kërkohet.", - "QuickLinks": "Lidhje të Shpejta", - "ReadMoreOnlineGuide": "Lexoni më tepër rreth kësaj teme te udhërrëfyesi në internet.", - "RemoveTotalsRowDataTable": "Raporti shfaq rreshtin e tërësoreve %s Hiqe rreshtin e tërësoreve", - "ReportConfigure": "Formësoni këtë raport", - "ReportGeneratedOn": "Raport i prodhuar më %s", - "ReportGeneratedXAgo": "Raport i prodhuar %s më parë", - "ReportLowercase": "raport", - "ReportType": "Lloj raport", - "ReportWithMetadata": "Raport me tejtëdhëna", - "ReportingCategoryHelpPrefix": "Si më ndihmon faqja e raportimeve “%1$s→ %2$s”?", - "RowLimit": "Kufi i papërpunuar", - "SearchOnMatomo": "Kërkoni për '%1$s' te Matomo.org", - "SeeAvailableVersions": "Shihni Versione të Gatshëm", - "Segments": "Segmente", - "SharePiwikLong": "Njatjeta! Sapo gjeta një program të lirë shumë të mirë: Matomo!\n\nMatomo do t’ju lejojë të ndiqni falas vizitorët në sajtin tuaj. Duhet ta provoni medoemos!", - "SharePiwikShort": "Matomo! Analiza web të lira/libre. Jini zot i të dhënave tuaja.", - "ShareThis": "Ndajeni me të tjerët këtë", - "ShortcutCalendar": "për hapje kalendarësh (d nënkupton Datë)", - "ShortcutHelp": "për shfaqjen e kësaj ndihme", - "ShortcutRefresh": "për rifreskim të lëndës", - "ShortcutSearch": "për hapje kërkimesh (f nënkupton Find, pra Gjej në shqip)", - "ShortcutSegmentSelector": "për hapje përzgjedhësi Segmentesh", - "ShortcutWebsiteSelector": "për hapje përzgjedhësi Sajtesh", - "ShortcutZenMode": "për mënyrën Zen", - "ShortcutsAvailable": "Shkurtore të gatshme", - "ShowExportUrl": "Shfaq URL Eksportimi", - "ShowJSCode": "Shfaqe kodin JavaScript që duhet futur", - "SkipToContent": "Kalo te lënda", - "SoftwareSubcategoryHelp": "Ndarja Software ju shfaq sistemet operative, shfletues dhe shtojca që vizitorët tuaj përdorin për sajtin, që të mund ta optimizoni sajtin tuaj për të garantuar se është plotësisht i përputhshëm me formësimet më popullore.", - "StandardReport": "Raport standard", - "StartDate": "Datë Fillimi", - "SubscribeAndBecomePiwikSupporter": "Vazhdoni te një faqe e sigurt pagesash me kartë krediti (Paypal), që të bëheni një Përkrahës i Matomo-s!", - "SupportPiwik": "Përkrahni Matomo-n!", - "SupportUsOn": "Na përkrahni në", - "SystemSummaryMysqlVersion": "Version MySQL-je", - "SystemSummaryNActivatedPlugins": "%d shtojca të aktivizuara", - "SystemSummaryNSegments": "%1$d segmente", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segmente (%2$s të parapërpunuar, %3$s të përpunuar aty për aty)", - "SystemSummaryNWebsites": "%d sajte", - "SystemSummaryPhpVersion": "Version PHP-je", - "SystemSummaryPiwikVersion": "Version Matomo", - "SystemSummaryWidget": "Përmbledhje Sistemi", - "TableNoData": "S’ka të dhëna për këtë tabelë.", - "TechDeprecationWarning": "Duke filluar me versionin Matomo %1$s, Matomo-ja do të reshtë së mbuluari %2$s. Për më tepër hollësi, %3$sshihni postimin tonë në blog.%4$s", - "ThanksFromAllOfUs": "Faleminderit prej krejt nesh në Matomo!", - "ThereIsNoDataForThisReport": "S’ka të dhëna për këtë raport.", - "UnFlattenDataTable": "Raporti është i sheshtë %s Bëje hierarkik", - "UndoPivotBySubtable": "Ky raport është rrotulluar %s Zhbëje rrotullimin", - "ViewAllPiwikVideoTutorials": "Shihini krejt Përkujdesoret Video për Matomo-n", - "VisitStatusOrdered": "Të porositura", - "VisitStatusOrderedThenAbandoned": "Shportë e të Porositurave, mandej të Braktisura", - "VisitTypeReturning": "I rikthyer", - "VisitTypeReturningCustomer": "Klient i Rikthyer", - "VisitorsCategoryHelp1": "Faqet Vizitorë ju tregojnë gjëra rreth se cilët janë vizitorët tuaj. Gjëra të tilla si nga vijnë vizitorët tuaj, çfarë pajisjesh dhe shfletuesish përdorin dhe kur e vizitojnë, përgjithësisht, sajtin tuaj. Të kuptoni, përmbledhtas, cili është publiku juaj dhe të kërkoni për veçanti, për të parë se si mund të shtohet publiku juaj.", - "VisitorsCategoryHelp2": "Përveç informacionit të përgjithshëm rreth vizitorëve tuaj, mund të përdorni edhe %1$sRegjistër Vizitash%2$s, që të shihni ç’ndodhi gjatë çdo vizite individuale.", - "VisitorsOverviewHelp": "Përmbledhja mbi Vizitorët ju ndihmon të kuptoni popullaritetin e sajtit tuaj. Këtë e bën duke dhënë grafikë që shfaqin sa vizita ka sajti juaj gjatë një periudhe të caktuar dhe shkallën mesatare të angazhimit për veçori bazë, bie fjala, kërkime dhe shkarkime.", - "WebAnalyticsReports": "Raporte Analizash Web", - "YouAreUsingTheLatestVersion": "Po përdorni versionin më të ri të Matomo-s!", - "YourDonationWillHelp": "Dhurimi juaj do të ndihmojë drejtpërsëdrejti për financim veçorish të reja dhe përmirësime të kësaj platforme statistikash dhe analizimesh me burim të hapët. Kjo do të thotë se bashkësia do të përfitojë përherë nga një mjet që mbron privatësinë dhe ju lejon të jeni në kontroll të të dhënave tuaja." - } -} diff --git a/plugins/CoreHome/lang/sr.json b/plugins/CoreHome/lang/sr.json deleted file mode 100644 index 1d7b653b9a84db0e02b82f9acd58f607a0e4dd34..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/sr.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Ukoliko koristite bloker reklama, molimo vas da ga isključite na ovom sajtu kako biste bili sigurni da Matomo radi bez ikakvih problema.", - "CategoryNoData": "Nema podataka u ovoj kategoriji. Probajte sa \"Uključi celu populaciju\".", - "ChangeCurrentWebsite": "Izaberite sajt, trenutno izabrani sajt je %s", - "ChangePeriod": "период промене", - "ChangeVisualization": "Promenite način prikaza", - "CheckForUpdates": "Proveri da li se pojavila nova verzija", - "CheckPiwikOut": "Proverite!", - "ChooseWebsite": "Izaberite sajt", - "ChooseX": "Izaberite %1$s", - "ClickRowToExpandOrContract": "Kliknite ovaj red kako biste proširili ili skupili tabelu.", - "ClickToEditX": "Kliknite kako biste izmenili %s", - "ClickToSeeFullInformation": "Kliknite ovde za više informacija", - "CloseSearch": "Zatvori pretragu", - "CloseWidgetDirections": "Možete zatvoriti ovaj vidžet tako što ćete kliknuti na sličicu 'X' na vrhu.", - "DataForThisReportHasBeenPurged": "Podaci za ovaj izveštaj su više od %s meseci stari te su obrisani.", - "DataTableExcludeAggregateRows": "Zbirni redovi su prikazani %s Sakrij ih", - "DataTableHowToSearch": "Pritisnite Enter ili kliknite na sličicu kako biste pokrenuli pretragu", - "DataTableIncludeAggregateRows": "Zbirni redovi su sakriveni %s Prikaži ih", - "Default": "podrazumevano", - "DonateCall1": "Matomo vas nikada neće ništa koštati ali to ne znači da nas Matomo ništa ne košta dok ga pravimo.", - "DonateCall2": "Matomou je potrebna vaša stalna podrška kako bi rastao i napredovao.", - "DonateCall3": "Ukoliko imate osećaj da je Matomo u znatnoj meri dodao vrednost vašem biznisu, %1$smolimo vas da razmislite o donaciji%2$s ili %3$snaručivanju premium usluga%4$s. Svaki dinar je od pomoći.", - "ExcludeRowsWithLowPopulation": "Svi redovi su prikazani %s Sakrij slabu populaciju", - "ExternalHelp": "Pomoć (otvara se u novom tabu)", - "FlattenDataTable": "Izveštaj je u hijerarhiji %s Poravnaj ga", - "IncludeRowsWithLowPopulation": "Redovi sa slabom populacijom su sakriveni %s Prikaži sve redove", - "InjectedHostEmailBody": "Pozdrav. Pokušao\\/la sam da pristupim Matomo-u danas i dobio\\/la upozorenje o nepoznatom nazivu hosta.", - "InjectedHostEmailSubject": "Matomo-u je pristupljeno sa nepoznatim nazivom hosta: %s", - "InjectedHostNonSuperUserWarning": "%1$sKliknite ovde kako biste pristupili Matomo-u bezbedno%2$s i uklonili ovo upozorenje. Takođe možete kontaktirati administratora i obavestiti ga o ovom upozorenju (%3$skliknite ovde kako biste poslali poruku%4$s).", - "InjectedHostSuperUserWarning": "Matomo možda nije podešen kako treba (na primer, premešten je na novi server ili URL). Možete ili da %1$skliknete ovde i dodate %2$s kao validan naziv hosta (ukoliko mu verijete)%3$s, ili da %4$skliknete ovde i %5$s pristupite bezbedno Matomo-u%6$s.", - "InjectedHostWarningIntro": "Sada pristupate Matomo-u sa %1$s, ali je Matomo podešen da radi sa ove adrese: %2$s.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Vodeća otvorena analitička platforma koja poštuje vašu privatnost.", - "MainNavigation": "Glavna navigacija", - "Menu": "Meni", - "MenuEntries": "Stavke menija", - "NoPrivilegesAskPiwikAdmin": "Prijavljeni ste kao '%1$s' ali izgleda da nemate postavljena nikakva ovlašćenja. %2$s Tražite od Matomo administratora (kliknite za poruku)%3$s da vam dozvoli 'prikaz' na sajtu.", - "NoSuchPage": "Ova stranica ne postoji", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Nadogradnja jednim klikom nije moguća zato što koristite Matomo na više servera. Molimo vas da preuzmete poslednju verziju sa %1$s kako biste nastavili.", - "OnlyForSuperUserAccess": "Ovaj vidžet se prikazuje na podrazumevanoj konzoli samo superkorisnicima.", - "PeriodRange": "Period", - "PivotBySubtable": "Ovaj izveštaj nije pivotiran %1$s Pivotiraj sa %2$s", - "PresetDateToday": "Данас", - "PresetDateYesterday": "Јуче", - "QuickAccessTitle": "Pretraga za %s. Koristite tastere sa strelicama kako biste se kretali kroz rezultate pretrage. Prečica: pritisnite 'f' za pretragu.", - "ReportGeneratedOn": "Izveštaj generisan %s", - "ReportGeneratedXAgo": "Izveštaj generisan pre %s", - "ReportLowercase": "извештај", - "Segments": "Segmenti", - "SharePiwikShort": "Matomo! Besplatna web analitika otvorenog koda. Budite vlasnici svojih podataka.", - "ShareThis": "Podeli", - "ShowJSCode": "Prikaži JavaScript kod", - "SkipToContent": "Pređi na sadržaj", - "SubscribeAndBecomePiwikSupporter": "Nastavite ka stranici za sigurno plaćanje (Paypal) kako biste postali Matomo suporter!", - "SupportPiwik": "Podržite Matomo!", - "SystemSummaryMysqlVersion": "Verzija MySQL-a", - "SystemSummaryNActivatedPlugins": "%d aktiviranih dodataka", - "SystemSummaryNWebsites": "%d sajtova", - "SystemSummaryPhpVersion": "Verzija PHP-a", - "SystemSummaryPiwikVersion": "Verzija Matomo-a", - "SystemSummaryWidget": "Sumarno", - "TableNoData": "Nema podataka za ovu tabelu.", - "ThereIsNoDataForThisReport": "Nema podataka za ovaj izveštaj.", - "UnFlattenDataTable": "Izveštaj je ravan %s Prikaži hijerarhiju", - "UndoPivotBySubtable": "Ovaj izveštaj je pivotiran %s Otkaži pivot", - "ViewAllPiwikVideoTutorials": "Prikaži sve Matomo video tutorijale", - "WebAnalyticsReports": "Izveštaj web analitike", - "YouAreUsingTheLatestVersion": "Koristite poslednju verziju Matomo-a" - } -} diff --git a/plugins/CoreHome/lang/sv.json b/plugins/CoreHome/lang/sv.json deleted file mode 100644 index 78c1436c882186dcfd481594bee2560b332a45df..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/sv.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Om du blockerar annonser vänligen inaktivera blockeringen på den här webbplatsen för att Matomo ska fungera utan några problem.", - "AddTotalsRowDataTable": "Rapporten visar inte totalt antal rader %s Visa totalt antal rader", - "CategoryNoData": "Inga data i den här kategorin. Försök att \"Inkludera all befolkning\".", - "ChangeCurrentWebsite": "Välj en webbplats, vald webbplats just nu: %s", - "ChangePeriod": "Ändra period", - "ChangeVisualization": "Ändra visualisering", - "CheckForUpdates": "Sök efter uppdateringar", - "CheckPiwikOut": "Kolla in Matomo!", - "ChooseWebsite": "Välj webbplats", - "ChooseX": "Välj %1$s", - "ClickRowToExpandOrContract": "Klicka på denna rad för att visa eller dölja undertabeller.", - "ClickToEditX": "Klicka för att redigera %s", - "ClickToSeeFullInformation": "Klicka för att se all information", - "CloseSearch": "Stäng sökning", - "CloseWidgetDirections": "Du kan stänga widgeten genom att klicka på (X) på widgetens topp.", - "CopyModalNote": "%1$sObs:%2$s Den kopierade %3$s kan behöva justeras om den innehåller referenser som är specifika för den ursprungliga webbplatsen. Granska inställningarna för att säkerställa kompatibilitet.", - "CopyX": "Kopiera %1$s", - "CopyXDescription": "Välj den webbplats som denna %1$s ska kopieras till. Detta skapar en exakt kopia, inklusive inställningar, på den valda webbplatsen.", - "CssDidntLoad": "Din webbläsare kunde inte läsa in stilen på den här sidan.", - "CustomLimit": "Anpassad begränsning", - "DataForThisReportHasBeenDisabled": "Segmentering är för närvarande nerstängt för den här rapporten. Vänligen kolla %1$sden här FAQ'en%2$s för mer detaljer.", - "DataForThisReportHasBeenPurged": "Data för denna rapport är mer än %s månader gammal och har tagits bort.", - "DataTableCombineDimensions": "Dimensioner som visas separerade %s Visa dimensioner kombinerade", - "DataTableExcludeAggregateRows": "Aggregerade rader dolda %s Dölj dem", - "DataTableHowToSearch": "Tryck enter eller klicka på sökikonen för att söka", - "DataTableIncludeAggregateRows": "Aggregerade rader dolda %s Visa dem", - "DataTableShowDimensions": "Dimensioner som är kombinerade %s Visa dimensioner separerade", - "DateInvalid": "Den angivna datum- och periodkombinationen är ogiltig. Välj ett giltigt datum i datumväljaren.", - "Default": "standard", - "DevicesSubcategoryHelp": "Avsnittet Enheter hjälper dig att förstå den teknik som dina besökare använder för att besöka din webbplats. Du kommer att se rapporter om typer av enheter och specifika modeller så att du kan optimera din webbplats för de mest populära enheterna.", - "DonateCall1": "Matomo kommer alltid vara gratis att använda men det innebär inte att det inte kostar något att skapa den.", - "DonateCall2": "Matomo behöver ditt fortsatta stöd för att växa och frodas.", - "DonateCall3": "Om du tycker att Matomo bidragit till din verksamhet är vi tacksamma om du överväger att %1$sdonera%2$s eller %3$sköpa premiumfunktioner%4$s. Varje öre bidrar.", - "EndDate": "Slutdatum", - "EndShortcut": "Slut", - "EngagementSubcategoryHelp1": "Avsnittet Engagemang ger rapporter som hjälper till att kvantifiera hur många nya och återkommande besökare du får. Du kan också granska rapporter som tar upp genomsnittlig tid och antal sidvisningar per besök, liksom antalet gånger en besökare har varit på din webbplats och det vanligaste antalet dagar mellan besök.", - "EngagementSubcategoryHelp2": "Detta kan hjälpa dig att optimera för besök med hög frekvens och interaktion utöver att maximera din räckvidd.", - "EnterZenMode": "Starta Zen-läge (göm menyerna)", - "ExceptionNotAllowlistedIP": "Du kan inte använda denna Matomo eftersom din IP %s inte är tillåten.", - "ExcludeRowsWithLowPopulation": "Alla rader visas %s Dölj rader med låga värden", - "ExitZenMode": "Avsluta Zen-läge (visa menyerna)", - "ExpandSubtables": "Expandera undertabeller", - "ExportFormat": "Format för exportering", - "ExportTooltip": "Obs! För att kunna använda den genererade export-URL:en måste du ange en app-token-autentisering. Du kan konfigurera dessa tokens i Admin → Säkerhet → Token Auths.", - "ExportTooltipWithLink": "Obs! För att kunna använda den genererade export-URL:en måste du ange en app-token-autentisering. Du kan konfigurera dessa tokens i %1$s[Admin → Säkerhet → Auth-token]%2$s. Ersätt %3$s i Export URL:en med din Auth-token. Varning: Dela aldrig URL:en med den verkliga token med någon annan.", - "ExternalHelp": "Hjälp (öppnas i en ny flik)", - "FlattenDataTable": "Rapporten är hierarkisk %s Gör den plan", - "FlattenReport": "Platta till rapport", - "FormatMetrics": "Formatera variabler", - "HideExportUrl": "Dölj exportadress", - "HomeShortcut": "Hem", - "IncludeDimensionsSeparately": "Inkludera dimensioner separat", - "IncludeRowsWithLowPopulation": "Rader med låga värden är dolda %s Visa alla rader", - "InjectedHostEmailBody": "Hej, jag försökte komma åt Matomo idag och stötte på varningen det okända värdnamnet.", - "InjectedHostEmailSubject": "Matomo nåddes genom ett okänt värdnamn: %s", - "InjectedHostNonSuperUserWarning": "%1$sKlicka här för att öppna en säker anslutning till Matomo%2$s och ta bort varningen. Du kan också kontakta administratören för Matomo angående det här problemet (%3$sklicka här för att skicka e-post%4$s).", - "InjectedHostSuperUserWarning": "Matomo kan vara felkonfigurerat (t.ex. om Matomo nyligen har flyttats till en ny server eller URL). Du kan antigen %1$sklicka här och lägga till %2$s som ett giltigt värdnamn för Matomo (om det är giltigt)%3$s, eller %4$sklicka här för att gå till %5$s och ansluta till Matomo säkert%6$s.", - "InjectedHostWarningIntro": "Du ansluter till Matomo från %1$s, men Matomo har konfigurerats att köras från den här adressen: %2$s.", - "InvalidComparisonDateRange": "Ange ett giltigt datumintervall för jämförelse.", - "JavascriptDisabled": "JavaScript måste vara aktiverat för att du ska kunna använda Matomo i standardläge.
Det verkar som att JavaScript antingen är inaktiverat eller att det inte stöds av din webbläsare.
För att använda standardläget, aktivera JavaScript genom att ändra din webbläsares inställningar och%1$sförsök sedan igen%2$s.
", - "JsDidntLoad": "Din webbläsare kunde inte läsa in skripten på den här sidan.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Den ledande analysplattformen som respekterar personlig integritet.", - "LearnMoreFullStop": "%1$sLäs mer.%2$s", - "MacPageDown": "Fn + Högerpil", - "MacPageUp": "Fn + Vänsterpil", - "MainNavigation": "Huvudmenu", - "Menu": "Meny", - "MenuEntries": "Menyposter", - "NoPrivilegesAskPiwikAdmin": "Du är inloggad som '%1$s' men det verkar som om du inte har några rättigheter satta i Matomo. %2$s Fråga din Matomo administratör (klicka för att e-posta)%3$s för att få läsrättighet till en webbplats.", - "NoSuchPage": "Denna sida finns inte", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "En-klicksuppgradering är inte tillgängligt för du använder Matomo på flera servrar. Ladda ner den senaste versionen från %1$sför att fortsätta.", - "OnlyForSuperUserAccess": "Denna widget visas bara för superanvändare i standardkontrollpanelen.", - "PageDownShortcutDescription": "för att komma till botten av sidan", - "PageUpShortcutDescription": "för att komma till toppen av sidan", - "PeriodHasOnlyRawData": "Det verkar som att rapporterna för den här perioden inte har behandlats än. Vill du se vad som händer nu? Kolla in %1$sBesöksloggen%2$s eller välj en annorlunda datum-period tills det att rapporterna är genererade.", - "PeriodHasOnlyRawDataNoVisitsLog": "Det ser ut som att rapporterna för perioden inte bearbetats ännu, men de kommer synas inom några timmar. Du kan välja en annan datumperiod medan rapporterna skapas.", - "PeriodRange": "Intervall", - "PivotBySubtable": "Denna rapport är inte pivoterad %1$s Pivotera med %2$s", - "PresetDateLast30Days": "Senaste 30 dagarna", - "PresetDateLast7Days": "Senaste 7 dagarna", - "PresetDateLast90Days": "Senaste 90 dagarna", - "PresetDateLastMonth": "Förra månaden", - "PresetDateLastQuarter": "Förra kvartalet", - "PresetDateLastWeekMonSun": "Förra veckan (mån–sön)", - "PresetDateLastYear": "Förra året", - "PresetDateThisMonth": "Denna månad", - "PresetDateThisQuarter": "Detta kvartal", - "PresetDateThisWeekMonToday": "Denna vecka (mån–idag)", - "PresetDateThisYear": "Detta år", - "PresetDateToday": "I dag", - "PresetDateYesterday": "I går", - "Profilable": "Profilabel", - "ProfilableSegmentHelp": "1 för profileringsbara besök (t.ex. när cookies användes), 0 för icke-profileringsbara besök (t.ex. när inga cookies användes)", - "QuickAccessTitle": "Sök efter %s. Använd piltangenterna för att navigera i sökresultatet. Genväg: Tryck på 'f' för att söka.", - "QuickLinks": "Snabblänkar", - "ReadMoreOnlineGuide": "Läs mer om ämnet i onlineguiden.", - "RemoveTotalsRowDataTable": "Rapporten visar totalt antal rader %s Ta bort totalt antal rader", - "ReportConfigure": "Konfigurera den här rapporten", - "ReportGeneratedOn": "Rapporten genererades på %s", - "ReportGeneratedXAgo": "Rapporten genererades för %s sen", - "ReportLowercase": "rapport", - "ReportType": "Rapporttyp", - "ReportWithMetadata": "Rapport med metadata", - "ReportingCategoryHelpPrefix": "Hur hjälper \"%1$s → %2$s\" rapporteringssidan mig?", - "RowLimit": "Radbegränsning", - "SearchOnMatomo": "Sök efter '%1$s' på Matomo.org", - "SeeAvailableVersions": "Se tillgängliga versioner", - "Segments": "Segment", - "SharePiwikLong": "Hej! Jag har hittat en riktigt bra och gratis mjukvara: Matomo!\n\nMatomo hjälper dig att spåra besökarna på din hemsida helt gratis. Du borde definitivt kolla in det!", - "SharePiwikShort": "Matomo! Gratis och öppen webbstatistik. Äg din egen data.", - "ShareThis": "Dela det här", - "ShortcutCalendar": "för att öppna kalender (d står för Date)", - "ShortcutHelp": "för att visa hjälpen", - "ShortcutRefresh": "för att uppdatera innehållet", - "ShortcutSearch": "för att öppna sök (f står för Find)", - "ShortcutSegmentSelector": "för att öppna segmentväljaren", - "ShortcutWebsiteSelector": "för att öppna webbplatsväljaren", - "ShortcutZenMode": "för Zen-läge", - "ShortcutsAvailable": "Tillgängliga genvägar", - "ShowExportUrl": "Visa exportadress", - "ShowJSCode": "Visa JavaScript-koden för att inkludera", - "SkipToContent": "Hoppa till innehåll", - "SoftwareSubcategoryHelp": "Avsnittet Programvara visar de operativsystem, webbläsare och plugins som dina besökare använder för att besöka webbplatsen så att du kan optimera din webbplats för att säkerställa att den är helt kompatibel med de mest populära konfigurationerna..", - "StandardReport": "Standardrapport", - "StartDate": "Startdatum", - "SubscribeAndBecomePiwikSupporter": "Fortsätt till en säker kortbetalningssida (Paypal) för att bli en Matomo-Supporter!", - "SupportPiwik": "Stöd Matomo!", - "SupportUsOn": "Stöd oss på", - "SystemSummaryMysqlVersion": "MySQL version", - "SystemSummaryNActivatedPlugins": "%d aktiverade plugins", - "SystemSummaryNSegments": "%1$d segment", - "SystemSummaryNSegmentsWithBreakdown": "%1$d segment (%2$s förbehandlade, %3$s bearbetade i realtid)", - "SystemSummaryNWebsites": "%d webbplatser", - "SystemSummaryPhpVersion": "PHP version", - "SystemSummaryPiwikVersion": "Matomo version", - "SystemSummaryWidget": "Systemsammanfattning", - "TableNoData": "Inga data för denna tabell.", - "TechDeprecationWarning": "Från och med version %1$s av Matomo så kommer Matomo att upphöra sin support för %2$s. För mer information, %3$släs vårat blogg-inlägg.%4$s", - "ThanksFromAllOfUs": "Tack från oss alla på Matomo!", - "ThereIsNoDataForThisReport": "Det finns ingen data för denna rapport.", - "UnFlattenDataTable": "Rapporten är plan %s Gör den hierarkisk", - "UndoPivotBySubtable": "Denna rapport har pivoterats %s Ångra pivotering", - "ViewAllPiwikVideoTutorials": "Visa alla videokurser för Matomo", - "VisitStatusOrdered": "Beställde", - "VisitStatusOrderedThenAbandoned": "Beställde men övergav kundvagn", - "VisitTypeReturning": "Återkommande", - "VisitTypeReturningCustomer": "Återkommande kund", - "VisitorsCategoryHelp1": "Besökarsidorna berättar vem dina besökare är. Sådant som var dina besökare kom ifrån, vilka enheter och webbläsare de använder och när de vanligtvis besöker din webbplats. Förstå, i sammantaget, vem din publik är och leta efter avvikelser för att se hur din publik kan växa.", - "VisitorsCategoryHelp2": "Förutom allmän information om dina besökare kan du också använda %1$sbesöksloggen%2$s för att se vad som hände vid varje enskilt besök.", - "VisitorsOverviewHelp": "Besökaröversikten hjälper dig att förstå populariteten på din webbplats. Den gör det genom att tillhandahålla diagram som visar hur många besök din webbplats får under en vald period och den genomsnittliga engagemangsnivån för viktiga funktioner, såsom sökningar och nedladdningar.", - "WebAnalyticsReports": "Webbanalys rapporter", - "YouAreUsingTheLatestVersion": "Du använder den senaste versionen av Matomo!", - "YourDonationWillHelp": "Din donation hjälper direkt till att finansiera nya funktioner och förbättringar för denna open source analysplattform. Det betyder att communityn alltid kommer att dra nytta av ett verktyg som skyddar integriteten och låter dig ha kontroll över dina data." - } -} diff --git a/plugins/CoreHome/lang/ta.json b/plugins/CoreHome/lang/ta.json deleted file mode 100644 index a704f51800c31af88cfcb22780a251ae92000484..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ta.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "நீங்கள் ஒரு விளம்பரத் தடுப்பாளரைப் பயன்படுத்துகிறீர்கள் என்றால், தயவுசெய்து இந்த தளத்திற்கு அதை முடக்கவும், எந்த சிக்கலும் இல்லாமல் மாடோமோ செயல்படுவதை உறுதிசெய்யவும்.", - "AddTotalsRowDataTable": "அறிக்கை மொத்த வரிசையை காட்டவில்லை %s மொத்த வரிசையை காட்டு", - "CategoryNoData": "இந்த பிரிவில் தரவு இல்லை. \"அனைத்து மக்களையும் சேர்க்க\" முயற்சிக்கவும்.", - "ChangeCurrentWebsite": "ஒரு வலைத்தளத்தை தேர்வுசெய்க, தற்போது தேர்வுசெய்யப்பட்ட வலைத்தளம்: %s", - "ChangePeriod": "காலம்", - "ChangeVisualization": "காட்சிப்படுத்தலை மாற்றவும்", - "CheckForUpdates": "புதிய பதிப்புகளை சரிபார்க்கவும்", - "CheckPiwikOut": "மாட்டோமோவை ஆய்வு செய்யவும்!", - "ChooseWebsite": "வலைத்தளத்தைத் தேர்வுசெய்க", - "ChooseX": "%1$s ஐத் தேர்ந்தெடுக்கவும்", - "ClickRowToExpandOrContract": "சப்டேபிள் விரிவாக்க அல்லது சுருக்க இந்த வரிசையைக் சொடுக்கு செய்க.", - "ClickToEditX": "%sஐத் திருத்த கிளிக் செய்க", - "ClickToSeeFullInformation": "முழு தகவலைக் காண கிளிக் செய்க", - "CloseSearch": "தேடலை மூடு", - "CloseWidgetDirections": "நிரல்பலத்தின் மேல்பகுதியில் உள்ள 'X' படவுருவை சொடுக்குவதன் மூலம் இந்த நிரல்பலத்தை நீங்கள் மூட முடியும்.", - "CopyModalNote": "%1$sகுறிப்பு:%2$s நகலெடுக்கப்பட்ட %3$s அசல் இணையதளத்திற்கு குறிப்பிட்ட குறிப்புகளை உள்ளடக்கியிருந்தால், அதைச் சரிசெய்தல் தேவைப்படலாம். இணக்கத்தன்மையை உறுதிப்படுத்த அமைப்புகளை மதிப்பாய்வு செய்யவும்.", - "CopyX": "%1$sஐ நகலெடு", - "CopyXDescription": "இந்த %1$s ஐ நகலெடுக்க இணையதளத்தைத் தேர்ந்தெடுக்கவும். இது தேர்ந்தெடுக்கப்பட்ட தளத்தில் அமைப்புகள் உட்பட சரியான நகலை உருவாக்கும்.", - "CssDidntLoad": "உங்கள் உலாவியில் இந்த பக்கத்தின் பாணியை ஏற்ற முடியவில்லை.", - "CustomLimit": "தனிப்பயன் வரம்பு", - "DataForThisReportHasBeenDisabled": "இந்த அறிக்கைக்கு தற்போது பிரிவு முடக்கப்பட்டுள்ளது. மேலும் விவரங்களுக்கு %1$sthis கேள்விகள் %2$s ஐ சரிபார்க்கவும்.", - "DataForThisReportHasBeenPurged": "இந்த அறிக்கைக்கான தரவு %sஐ மாதங்களைத் தாண்டியுள்ளது. மேலும், அது நீக்கப்பட்டுள்ளது.", - "DataTableCombineDimensions": "பரிமாணங்கள் தனித்தனியாக காட்டப்பட்டுள்ளன %s பரிமாணங்களைக் காட்டுகின்றன", - "DataTableExcludeAggregateRows": "மொத்த வரிசைகள் காட்டப்பட்டுள்ளன %s அவற்றை மறைக்கின்றன", - "DataTableHowToSearch": "தேட Enter ஐ அழுத்தவும் அல்லது தேட தேடல் ஐகானைக் சொடுக்கு செய்யவும்", - "DataTableIncludeAggregateRows": "மொத்த வரிசைகள் மறைக்கப்பட்டவை %s அவற்றைக் காட்டுகின்றன", - "DataTableShowDimensions": "பரிமாணங்கள் இணைக்கப்படுகின்றன %s தனித்தனியாக பரிமாணங்களைக் காட்டுகின்றன", - "DateInvalid": "கொடுக்கப்பட்ட தேதி மற்றும் கால சேர்க்கை தவறானது. தேதி தேர்வாளரில் செல்லுபடியாகும் தேதியைத் தேர்வுசெய்க.", - "Default": "தவறுதல்", - "DevicesSubcategoryHelp": "உங்கள் தளத்தை அணுக உங்கள் பார்வையாளர்கள் பயன்படுத்தும் தொழில்நுட்பத்தைப் புரிந்துகொள்ள சாதனங்கள் பிரிவு உங்களுக்கு உதவுகிறது. மிகவும் பிரபலமான சாதனங்களுக்கு உங்கள் தளத்தை மேம்படுத்த உங்களுக்கு உதவும் சாதனத்தின் வகை மற்றும் குறிப்பிட்ட மாதிரிகள் குறித்த அறிக்கைகளை நீங்கள் காண்பீர்கள்.", - "DonateCall1": "பிவிக் எப்போதும் உங்களுக்கு எந்தவித செலவும் இல்லாமல் கிடைகிறது, ஆனால் பிவிக்-ஐ உருவாக்க எங்களுக்கு செலவாகாமல் இருப்பதில்லை.", - "DonateCall2": "Matomo செழித்து வளர உங்கள் தொடர்ந்த ஆதரவு தேவைப்படுகிறது.", - "DonateCall3": "உங்கள் வணிகம் அல்லது முயற்சிக்கு மாடோமோ குறிப்பிடத் தக்க மதிப்பைச் சேர்த்துள்ளதாக நீங்கள் உணர்ந்தால், %1$s ச்பிளீச் %2$s அல்லது %3$s ஒரு காப்பீடு அம்சத்தை %4$s ஐ சுழற்றுவதைக் கவனியுங்கள். ஒவ்வொரு பைசாவும் உதவும்.", - "EndDate": "இறுதி தேதி", - "EndShortcut": "முடிவுறு", - "EngagementSubcategoryHelp1": "நிச்சயதார்த்த பிரிவு நீங்கள் எத்தனை புதிய மற்றும் திரும்பும் பார்வையாளர்களைப் பெறுகிறது என்பதை அளவிட உதவும் அறிக்கைகளை வழங்குகிறது. வருகைக்கு சராசரி நேரத்தையும் பக்கங்களின் எண்ணிக்கையையும் உடைக்கும் அறிக்கைகளையும் நீங்கள் மதிப்பாய்வு செய்யலாம், அத்துடன் ஒரு பார்வையாளர் உங்கள் தளத்திற்கு எத்தனை முறை வந்திருக்கிறார் மற்றும் வருகைகளுக்கு இடையில் மிகவும் பொதுவான நாட்கள்.", - "EngagementSubcategoryHelp2": "உங்கள் வரம்பை அதிகரிப்பதோடு கூடுதலாக அதிர்வெண் மற்றும் உயர்-தொடர்பு வருகைகளை மேம்படுத்த இது உங்களுக்கு உதவும்.", - "EnterZenMode": "ஜென் மோடிற்குள் நுழை (மெனுவை மறைக்கவும்)", - "ExceptionNotAllowlistedIP": "உங்கள் ஐபி %s அனுமதிக்கப்படாததால் இந்த மாடோமோவைப் பயன்படுத்த முடியாது.", - "ExcludeRowsWithLowPopulation": "அனைத்து வரிசைகளும் காட்டப்பட்டுள்ளன %s குறைந்த மக்கள்தொகையை விலக்குகின்றன", - "ExitZenMode": "ஜென் மோடை விட்டும் வெளியேறு (மெனுவை காட்டவும்)", - "ExpandSubtables": "சப்டேபிள்சை விரிவாக்குங்கள்", - "ExportFormat": "ஏற்றுமதி வடிவம்", - "ExportTooltip": "குறிப்பு: உருவாக்கப்பட்ட ஏற்றுமதி முகவரி ஐப் பயன்படுத்த, நீங்கள் ஒரு பயன்பாட்டு கிள்ளாக்கு அங்கீகாரத்தைக் குறிப்பிட வேண்டும். இந்த டோக்கன்களை நிர்வாகி → பாதுகாப்பு → கிள்ளாக்கு அங்கீகாரங்களில் உள்ளமைக்கலாம்.", - "ExportTooltipWithLink": "குறிப்பு: உருவாக்கப்பட்ட ஏற்றுமதி முகவரி ஐப் பயன்படுத்த, நீங்கள் ஒரு பயன்பாட்டு கிள்ளாக்கு அங்கீகாரத்தைக் குறிப்பிட வேண்டும். இந்த டோக்கன்களை %1$s [நிர்வாகம் → பாதுகாப்பு → அங்கீகார டோக்கன்கள்] %2$s இல் உள்ளமைக்கலாம். உங்கள் அங்கீகார கிள்ளாக்கு மூலம் ஏற்றுமதி முகவரி இல் %3$s ஐ மாற்றவும். எச்சரிக்கை: முகவரி ஐ உண்மையான டோக்கனுடன் வேறு யாருடனும் பகிர்ந்து கொள்ள வேண்டாம்.", - "ExternalHelp": "உதவி (புதிய தாவலில் திறக்கிறது)", - "FlattenDataTable": "அறிக்கை படிநிலை %s அதை தட்டையாக ஆக்குகின்றன", - "FlattenReport": "தட்டையான அறிக்கை", - "FormatMetrics": "வடிவமைப்பு அளவீடுகள்", - "HideExportUrl": "ஏற்றுமதி முகவரி ஐ மறைக்கவும்", - "HomeShortcut": "வீடு", - "IncludeDimensionsSeparately": "பரிமாணங்களை தனித்தன்மையாக சேர்க்கவும்", - "IncludeRowsWithLowPopulation": "குறைந்த மக்கள்தொகை கொண்ட வரிசைகள் மறைக்கப்பட்ட %s அனைத்து வரிசைகளையும் காட்டுகின்றன", - "InjectedHostEmailBody": "வணக்கம், நான் இன்று Matomo அணுக முயற்சிசெய்யும் போது அறியப்படாத புரவலன்பெயர் எச்சரிக்கையை எதிர்கொண்டேன்.", - "InjectedHostEmailSubject": "Matomo தெரியாத இந்த புரவலன் பேரில் இருந்து அணுகப்பட்டுள்ளது: %s", - "InjectedHostNonSuperUserWarning": "%1$s ச்கிலிக் இங்கே மாடோமோவை பாதுகாப்பாக%2$s ஐ அணுகவும் இந்த எச்சரிக்கையை அகற்றவும். உங்கள் மாடோமோ நிர்வாகியைத் தொடர்புகொண்டு இந்தச் சிக்கலைப் பற்றி அவர்களுக்கு அறிவிக்க விரும்பலாம் (%3$s ச்க்லிக் இங்கே%4$s க்கு மின்னஞ்சல் செய்ய).", - "InjectedHostSuperUserWarning": "மாடோமோ தவறாகக் கட்டமைக்கப்படலாம் (எடுத்துக்காட்டாக, மாடோமோ அண்மைக் காலத்தில் ஒரு புதிய சேவையகம் அல்லது முகவரி க்கு மாற்றப்பட்டால்). நீங்கள் இங்கே %1$s ச்க்லிக் மற்றும் செல்லுபடியாகும் மாடோமோ ஓச்ட்பெயராக %2$s ஐச் சேர்க்கலாம் (நீங்கள் அதை நம்பினால்) %3$s, அல்லது %4$s ச்க்லிக் மற்றும் %5$s க்குச் செல்ல மாடோமோவை பாதுகாப்பாக %6$s கள்.", - "InjectedHostWarningIntro": "நீங்கள் இப்போது பிவிக்கை %1$s -ல் இருந்து இயக்குகிறீர்கள், ஆனால் பிவிக்கானது %2$s -முகவரியிலிருந்து இயங்க கட்டமைக்கப்பட்டுள்ளது.", - "JavascriptDisabled": "நிலையான பார்வையில் நீங்கள் மாடோமோவைப் பயன்படுத்துவதற்காகச் சாவாச்கிரிப்ட் இயக்கப்பட வேண்டும்.
இருப்பினும், சாவாச்கிரிப்ட் முடக்கப்பட்டதாகத் தெரிகிறது அல்லது உங்கள் உலாவியால் ஆதரிக்கப்படவில்லை. , பின்னர் %1$s ச்ட்ரைக் மீண்டும் %2$s.
", - "JsDidntLoad": "உங்கள் உலாவியில் இந்த பக்கத்தின் ச்கிரிப்ட்களை ஏற்ற முடியவில்லை.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "உங்கள் தனியுரிமையை மதிக்கும் முன்னணி திறந்த பகுப்பாய்வு தளம்.", - "LearnMoreFullStop": "%1$sமேலும் அறிக.%2$s", - "MacPageDown": "Fn + வலது அம்பு", - "MacPageUp": "Fn + இடது அம்பு", - "MainNavigation": "முதன்மையான வழிசெலுத்தல்", - "Menu": "பட்டியல்", - "MenuEntries": "பட்டி உள்ளீடுகள்", - "NoPrivilegesAskPiwikAdmin": "நீங்கள் '%1$s' -ஆக உள்நுழைந்துள்ளீர்கள், ஆனால் உங்களுக்கு பார்வை அனுமதி வழங்கப்படவில்லை. %2$s உங்களுடைய பிவிக் நிர்வாகியிடம் (மின்னஞ்சல் அனுப்ப)%3$s வலைதளத்தைப் \\\"பார்வையிட\\\" அனுமதி கேளுங்கள்.", - "NoSuchPage": "இந்த பக்கம் இல்லை", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "நீங்கள் பல சேவையகங்களுடன் மடோமோ ஐப் பயன்படுத்துவதால் ஒரு சொடுக்கு புதுப்பிப்பு கிடைக்காது. தொடர %1$s இலிருந்து அண்மைக் கால பதிப்பைப் பதிவிறக்கவும்.", - "OnlyForSuperUserAccess": "இந்த விட்செட் இயல்புநிலை டாச்போர்டில் சூப்பர் பயனர் அணுகல் கொண்ட பயனர்களுக்கு மட்டுமே காட்டப்படும்.", - "PageDownShortcutDescription": "பக்கத்தின் கீழே செல்ல", - "PageUpShortcutDescription": "பக்கத்தின் மேலே செல்ல", - "PeriodHasOnlyRawData": "இந்த காலத்திற்கான அறிக்கைகள் இன்னும் செயலாக்கப்படவில்லை என்று தெரிகிறது. இப்போது என்ன நடக்கிறது என்று பார்க்க விரும்புகிறீர்களா? %1$svisits பதிவு %2$s ஐப் பாருங்கள் அல்லது அறிக்கைகள் உருவாக்கப்படும் வரை வேறு தேதி காலத்தைத் தேர்வுசெய்க.", - "PeriodHasOnlyRawDataNoVisitsLog": "இந்த காலகட்டத்திற்கான அறிக்கைகள் இன்னும் செயலாக்கப்படவில்லை என்று தெரிகிறது, ஆனால் அவை சில மணிநேரங்களில் கிடைக்கும். அறிக்கைகள் உருவாக்கப்படும் வரை நீங்கள் வேறு தேதி காலத்தைத் தேர்வு செய்யலாம்.", - "PeriodRange": "வீச்சு", - "PivotBySubtable": "இந்த அறிக்கை %2$s ஆல் %1$s பிவோட் முன்னிலைப்படுத்தப்படவில்லை", - "PresetDateLast30Days": "கடந்த 30 நாட்கள்", - "PresetDateLast7Days": "கடந்த 7 நாட்கள்", - "PresetDateLast90Days": "கடந்த 90 நாட்கள்", - "PresetDateLastMonth": "கடந்த மாதம்", - "PresetDateLastQuarter": "கடந்த காலாண்டு", - "PresetDateLastWeekMonSun": "கடந்த வாரம் (திங்கள் - ஞாயிறு)", - "PresetDateLastYear": "கடந்த ஆண்டு", - "PresetDateThisMonth": "இந்த மாதம்", - "PresetDateThisQuarter": "இந்த காலாண்டு", - "PresetDateThisWeekMonToday": "இந்த வாரம் (திங்கள் - இன்று)", - "PresetDateThisYear": "இந்த ஆண்டு", - "PresetDateToday": "இன்று", - "PresetDateYesterday": "நேற்று", - "Profilable": "விவரக்குறிப்பு", - "ProfilableSegmentHelp": "1 விவரக்குறிப்புக்கு (எ.கா. குக்கீகள் பயன்படுத்தப்பட்டன), 0 சுயவிவரத்திற்கு இல்லை (எ.கா. குக்கீகள் பயன்படுத்தப்படவில்லை)", - "QuickAccessTitle": "%s ஐத் தேடுங்கள். தேடல் முடிவுகள் மூலம் செல்ல அம்பு விசைகளைப் பயன்படுத்தவும். குறுக்குவழி: தேட 'f' ஐ அழுத்தவும்.", - "QuickLinks": "விரைவான இணைப்புகள்", - "ReadMoreOnlineGuide": "நிகழ்நிலை வழிகாட்டியில் இந்த தலைப்பைப் பற்றி மேலும் வாசிக்க.", - "RemoveTotalsRowDataTable": "மொத்த வரிசையை அகற்றும் %s மொத்த வரிசையை அறிக்கை காட்டுகிறது", - "ReportConfigure": "இந்த அறிக்கையை உள்ளமைக்கவும்", - "ReportGeneratedOn": "அறிக்கை %s அன்று உருவாக்கப்பட்டது", - "ReportGeneratedXAgo": "அறிக்கை %s முன் உருவாக்கப்பட்டது", - "ReportLowercase": "அறிக்கை", - "ReportType": "அறிக்கை வகை", - "ReportWithMetadata": "மெட்டாடேட்டாவுடன் அறிக்கை", - "ReportingCategoryHelpPrefix": "\" %1$s → %2$s\" அறிக்கையிடல் பக்கம் எனக்கு எவ்வாறு உதவுகிறது?", - "RowLimit": "வரிசை வரம்பு", - "SearchOnMatomo": "Matomo.org இல் '%1$s' ஐத் தேடுங்கள்", - "SeeAvailableVersions": "கிடைக்கக்கூடிய பதிப்புகளைக் காண்க", - "Segments": "பிரிவுகள்", - "SharePiwikLong": "ஆய்! நான் ஒரு சிறந்த இலவச மென்பொருளைக் கண்டேன்: மாடோமோ!\n\n உங்கள் வலைத்தளத்திற்கு பார்வையாளர்களை இலவசமாக கண்காணிக்க மேடோமோ உங்களை அனுமதிக்கும். நீங்கள் நிச்சயமாக அதைப் பார்க்க வேண்டும்!", - "SharePiwikShort": "மாடோமோ! இலவச/லிப்ரே வலை பகுப்பாய்வு. உங்கள் தரவை சொந்தமாக வைத்திருங்கள்.", - "ShareThis": "இதை பகிர", - "ShortcutCalendar": "காலெண்டரைத் திறக்க (டி என்பது தேதியைக் குறிக்கிறது)", - "ShortcutHelp": "இந்த உதவியைக் காட்ட", - "ShortcutRefresh": "உள்ளடக்கத்தைப் புதுப்பிக்க", - "ShortcutSearch": "தேடலைத் திறக்க (எஃப் என்பது கண்டுபிடிப்பைக் குறிக்கிறது)", - "ShortcutSegmentSelector": "பிரிவு தேர்வாளரைத் திறக்க", - "ShortcutWebsiteSelector": "வலைத்தள தேர்வாளரைத் திறக்க", - "ShortcutZenMode": "சென் பயன்முறைக்கு", - "ShortcutsAvailable": "கிடைக்கும் குறுக்குவழிகள்", - "ShowExportUrl": "ஏற்றுமதி முகவரி ஐக் காட்டு", - "ShowJSCode": "உள் நுழைப்பதற்கான ஜாவாஸ்க்ரிப்டினை காட்ட", - "SkipToContent": "உள்ளடக்கத்தைத் தவிர்க்கவும்", - "SoftwareSubcategoryHelp": "தளத்தை அணுக உங்கள் பார்வையாளர்கள் பயன்படுத்தும் இயக்க முறைமைகள், உலாவிகள் மற்றும் செருகுநிரல்களை மென்பொருள் பிரிவு காட்டுகிறது, இதன் மூலம் உங்கள் தளத்தை மிகவும் பிரபலமான உள்ளமைவுகளுடன் முழுமையாக இணக்கமாக உறுதிப்படுத்த நீங்கள் மேம்படுத்தலாம்.", - "StandardReport": "நிலையான அறிக்கை", - "StartDate": "தொடக்க தேதி", - "SubscribeAndBecomePiwikSupporter": "மாட்டோமோ ஆதரவாளராக மாற்றுவதற்கு, பாதுகாப்பான கடன் அட்டை கட்டணப் பக்கத்திற்கு (பேபால்) செல்லவும்!", - "SupportPiwik": "மாட்டோமோக்கு உதவு!", - "SupportUsOn": "எங்களை ஆதரிக்கவும்", - "SystemSummaryMysqlVersion": "MySQL பதிப்பு", - "SystemSummaryNActivatedPlugins": "%d செயல்படுத்தப்பட்ட செருகுநிரல்கள்", - "SystemSummaryNSegments": "%1$d பிரிவுகள்", - "SystemSummaryNSegmentsWithBreakdown": "%1$d பிரிவுகள் ( %2$s முன் பதப்படுத்தப்பட்டவை, %3$s நிகழ்நேரத்தில் செயலாக்கப்படுகிறது)", - "SystemSummaryNWebsites": "%d வலைத்தளங்கள்", - "SystemSummaryPhpVersion": "பிஎச்பி பதிப்பு", - "SystemSummaryPiwikVersion": "மாடோமோ பதிப்பு", - "SystemSummaryWidget": "கணினி சுருக்கம்", - "TableNoData": "இந்த அட்டவணைக்குத் தகவல்கள் இல்லை.", - "TechDeprecationWarning": "Matomo %1$s பதிப்பில் தொடங்கி, Matomo %2$s க்கு ஆதரவை முடிக்கும். மேலும் தகவலுக்கு %3$sஎங்கள் வலைப்பதிவு பதிவைப் பார்க்கவும்.%4$s", - "ThanksFromAllOfUs": "மாடோமோவில் உள்ள எங்கள் அனைவரிடமிருந்தும் நன்றி!", - "ThereIsNoDataForThisReport": "இந்த அறிக்கைக்கு போதுமான தகவல்கள் இல்லை.", - "UnFlattenDataTable": "அறிக்கை தட்டையானது %s அதை படிநிலையாக ஆக்குகின்றன", - "UndoPivotBySubtable": "இந்த அறிக்கை %s செயல்தவிர்க்கும் முன்னிலைப்படுத்தப்பட்டுள்ளது", - "ViewAllPiwikVideoTutorials": "எல்லா Matomo பயிற்ச்சி கானோளிகளையும் காண", - "VisitStatusOrdered": "உத்தரவிடப்பட்டது", - "VisitStatusOrderedThenAbandoned": "பின்னர் கைவிடப்பட்ட வண்டி உத்தரவிட்டது", - "VisitTypeReturning": "திரும்பும்", - "VisitTypeReturningCustomer": "திரும்பும் வாடிக்கையாளர்", - "VisitorsCategoryHelp1": "உங்கள் பார்வையாளர்கள் யார் என்பது பற்றிய விசயங்களை பார்வையாளர்களின் பக்கங்கள் உங்களுக்குச் சொல்கின்றன. உங்கள் பார்வையாளர்கள் எங்கிருந்து வந்தார்கள், அவர்கள் பயன்படுத்தும் சாதனங்கள் மற்றும் உலாவிகள் மற்றும் அவர்கள் பொதுவாக உங்கள் வலைத்தளத்தைப் பார்வையிடும்போது போன்ற விசயங்கள். மொத்தத்தில், உங்கள் பார்வையாளர்கள் யார் என்பதைப் புரிந்துகொண்டு, உங்கள் பார்வையாளர்கள் எவ்வாறு வளர முடியும் என்பதைப் பார்க்க வெளிநாட்டவர்களைத் தேடுங்கள்.", - "VisitorsCategoryHelp2": "உங்கள் பார்வையாளர்களைப் பற்றிய பொதுவான தகவல்களுக்கு மேலதிகமாக, ஒவ்வொரு தனிப்பட்ட வருகையிலும் என்ன நடந்தது என்பதைப் பார்க்க %1$svisits பதிவு %2$s ஐப் பயன்படுத்தலாம்.", - "VisitorsOverviewHelp": "பார்வையாளர்கள் கண்ணோட்டம் உங்கள் தளத்தின் பிரபலத்தைப் புரிந்துகொள்ள உதவுகிறது. தேர்ந்தெடுக்கப்பட்ட காலப்பகுதியில் உங்கள் தளம் எத்தனை வருகைகளைப் பெறுகிறது என்பதைக் காட்டும் விளக்கப்படங்களை வழங்குவதன் மூலம் இதைச் செய்கிறது மற்றும் தேடல்கள் மற்றும் பதிவிறக்கங்கள் போன்ற முக்கிய அம்சங்களுக்கான சராசரி ஈடுபாட்டின் அளவு.", - "WebAnalyticsReports": "இணைய பகுப்பாய்வு அறிக்கைகள்", - "YouAreUsingTheLatestVersion": "நீங்கள் மாட்டோமோ அண்மைய பதிப்பைப் பயன்படுத்துகிறீர்கள்!", - "YourDonationWillHelp": "இந்த திறந்த மூல பகுப்பாய்வு தளத்திற்கான புதிய நற்பொருத்தங்கள் மற்றும் மேம்பாடுகளுக்கு நிதியளிக்கும் உங்கள் நன்கொடை நேரடியாக உதவும். இதன் பொருள், தனியுரிமையைப் பாதுகாக்கும் மற்றும் உங்கள் தரவின் கட்டுப்பாட்டில் இருக்க உங்களை அனுமதிக்கும் ஒரு கருவியிலிருந்து சமூகம் எப்போதும் பயனடைகிறது." - } -} diff --git a/plugins/CoreHome/lang/te.json b/plugins/CoreHome/lang/te.json deleted file mode 100644 index 584984970cc29e58b1ee72d7335713d5d697bb47..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/te.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "CoreHome": { - "ChooseWebsite": "వెబ్ సైటుని ఎంచుకోండి", - "Default": "అప్రమేయం", - "PresetDateToday": "ఈ రోజు", - "PresetDateYesterday": "నిన్న" - } -} diff --git a/plugins/CoreHome/lang/th.json b/plugins/CoreHome/lang/th.json deleted file mode 100644 index 2bfd3af5ab2a37dcfe4b0d0d9955c81bd65ac377..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/th.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "ไม่มีข้อมูลในประเภทนี้ พยายาม \"รวมประชากรทั้งหมด\"", - "ChangeVisualization": "เปลี่ยน มุมมอง", - "CheckForUpdates": "ตรวจสอบชุดอัพเดท", - "ChooseWebsite": "เลือกเว็บไซต์", - "Default": "ค่าเริ่มต้น", - "PresetDateToday": "วันนี้", - "PresetDateYesterday": "เมื่อวาน", - "ShowJSCode": "แสดงรหัส JavaScript เมื่อต้องการแทรก", - "SupportPiwik": "สนับสนุน Matomo!", - "SystemSummaryPhpVersion": "เวอร์ชั่น PHP", - "ThereIsNoDataForThisReport": "ไม่มีข้อมูลสำหรับรายงานนี้", - "ViewAllPiwikVideoTutorials": "ดูคลิปวีดีโอสอน Matomo ทั้งหมด", - "WebAnalyticsReports": "รายงานการวิเคราะห์เว็บไซต์", - "YouAreUsingTheLatestVersion": "คุณกำลังใช้งานรุ่นล่าสุดของ Matomo!" - } -} diff --git a/plugins/CoreHome/lang/tl.json b/plugins/CoreHome/lang/tl.json deleted file mode 100644 index 6525d283a70f87a692afc4a9c9621bb399c4a834..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/tl.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Walang data sa kategoryang ito. Subukan ang \"Isama ang lahat ng populasyon\".", - "CheckForUpdates": "Suriin kung may mga update", - "CheckPiwikOut": "Suriin ang Matomo!", - "ChooseWebsite": "Pumili ng website", - "ClickRowToExpandOrContract": "I-click ang hanay na ito, upang palawakin o ikontrata ang subtable", - "CloseWidgetDirections": "Maaari mong isara ang widget na ito sa pamamagitan ng pag-click sa icon na 'X' na nasa tuktok ng widget.", - "DataForThisReportHasBeenPurged": "Ang data para sa ulat na ito ay higit sa %s na buwang gulang at ito ay na-purge na.", - "DataTableExcludeAggregateRows": "Ang pinagsama-samang mga hilera ay ipinapakita %s Itago ang mga ito", - "DataTableIncludeAggregateRows": "Ang pinagsama-samang mga hilera ay nakatago %s Ipakita ang mga ito", - "Default": "default", - "DonateCall1": "Ang Matomo ay palaging magdudulot sa iyo ng walang gastos, ngunit hindi ibig sabihin ay magdudulot ito sa amin upang walang gawin.", - "DonateCall2": "Kailangan ng Matomo ang iyong patuloy na suporta upang lumago at maging maunlad ito.", - "ExcludeRowsWithLowPopulation": "Ang lahat ng mga hilera ay ipinapakita %s Ibukod ang mababang populasyon", - "ExternalHelp": "Tulong (bubukas sa bagong tab)", - "FlattenDataTable": "Ang ulat ay naka-herarkiya %s Gawin itong patag", - "IncludeRowsWithLowPopulation": "Ang mga hilera na may mababang populasyon ay nakatago %s Ipakita ang lahat ng mga hilera", - "InjectedHostEmailBody": "Hello, sinubukan kong i-access ang Matomo ngayon at nakaranas ako ng hindi kilalang hostname warning.", - "InjectedHostEmailSubject": "Ang Matomo ay na-access gamit ang isang hindi kilalang hostname: %s", - "InjectedHostNonSuperUserWarning": "%1$sI-click ito upang ma-access ang Matomo nang ligtas%2$s at alisin ang babalang ito. Baka gusto mo ring makipag-ugnay sa iyong administrator sa Matomo at ipaalam sa kanila ang isyung ito (%3$si-click dito upang mag-email%4$s).", - "InjectedHostSuperUserWarning": "Ang Matomo ay maaaring na-configure ng mali (halimbawa, kung inilipat kamakailan ang Matomo sa bagong server o URL). Maaari mong %1$s i-click dito at magdagdag ng %2$s bilang wastong Matomo hostname (kung pinagkakatiwalaan mo ito) %3$s, o %4$s i-click dito at pumunta sa %5$s upang ma-access ang Matomo ng ligtas %6$s.", - "InjectedHostWarningIntro": "Ina-access mo na ngayon Matomo mula sa %1$s, ngunit ang Matomo ay na-configure upang tumakbo sa address na ito: %2$s.", - "NoPrivilegesAskPiwikAdmin": "Ikaw ay naka-log-in bilang '%1$s' ngunit mukhang wala kang anumang pahintulot na naka-set sa Matomo. %2$s Tanungin ang iyong Matomo administrator (i-click upang i-email) %3$s upang bigyan ka ng 'view' access sa website.", - "PeriodRange": "Pagitan", - "PivotBySubtable": "Ang ulat na ito ay hindi umiikot %1$s Paikutin ng %2$s", - "PresetDateToday": "Ngayong araw", - "PresetDateYesterday": "Kahapon", - "ReportGeneratedOn": "Ang ulat ay ginawa sa %s", - "ReportGeneratedXAgo": "Ang ulat ay ginawa %s na ang nakalilipas", - "SharePiwikShort": "Matomo! Libreng web analytics. Maging may-ari ng iyong data", - "ShareThis": "Ibahagi ito", - "ShowJSCode": "Ipakita ang Javascript code upang ipasok", - "SubscribeAndBecomePiwikSupporter": "Magpatuloy sa isang secure na pahina sa pagbabayad gamit ang credit card (PayPal) upang maging isang Matomo Supporter!", - "SupportPiwik": "Suportahan ang Matomo!", - "SystemSummaryPhpVersion": "Bersyon ng PHP", - "TableNoData": "Walang data para sa talahanayang ito.", - "ThereIsNoDataForThisReport": "Walang data para sa ulat na ito.", - "UnFlattenDataTable": "Ang ulat ay flat %s Gawin itong hierarchical", - "UndoPivotBySubtable": "Ang ulat na ito ay napaikot %s I-undo ang pagpaikot", - "ViewAllPiwikVideoTutorials": "Tingnan ang lahat Matomo Video Tutorials", - "WebAnalyticsReports": "Mga Ulat ng Analitiko ng Web", - "YouAreUsingTheLatestVersion": "Ginagamit mo ang pinaka bagong bersyon ng Matomo" - } -} diff --git a/plugins/CoreHome/lang/tr.json b/plugins/CoreHome/lang/tr.json deleted file mode 100644 index 56cd25dc9b0c5632fa89f155326c8c56cd31a8bd..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/tr.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "Bir reklam engelleyici kullanıyorsanız, Matomo uygulamasının sorunsuz çalışmasını sağlamak için etkisizleştirin.", - "AddTotalsRowDataTable": "Raporda toplamlar satırı görüntülenmiyor. Toplamlar satırını eklemek için %s", - "CategoryNoData": "Bu kategoride henüz bir veri yok. \"Tüm dağılımlar katılsın\" seçeneğini deneyin.", - "ChangeCurrentWebsite": "Bir site seçin, geçerli seçilmiş site: %s", - "ChangePeriod": "Zaman aralığını değiştir", - "ChangeVisualization": "Görselleştirmeyi değiştir", - "CheckForUpdates": "Güncellemeleri denetle", - "CheckPiwikOut": "Matomo uygulamasına göz atın!", - "ChooseWebsite": "Site seçin", - "ChooseX": "%1$s seçin", - "ClickRowToExpandOrContract": "Genişletmek ya da alt tablo ile ilişkilendirmek için bu satıra tıklayın.", - "ClickToEditX": "%s ögesini düzenlemek için tıklayın", - "ClickToSeeFullInformation": "Bütün bilgileri görüntülemek için tıklayın", - "CloseSearch": "Aramayı kapat", - "CloseWidgetDirections": "Üst kısımdaki 'X' simgesine tıklayarak bu pano bileşenini kapatabilirsiniz.", - "CopyModalNote": "%1$sNot:%2$s Kopyalanan %3$s, özgün siteye özgü referanslar içeriyorsa ayarlamalara gerek duyabilir. Uyumluluğu sağlamak için ayarları gözden geçirin.", - "CopyX": "%1$s ögesini kopyala", - "CopyXDescription": "Bu %1$s ögesinin kopyalanacağı siteyi seçin. Bu işlem, seçilmiş sitede ayarları ile birlikte tam bir kopya oluşturur.", - "CssDidntLoad": "Tarayıcınız bu sayfanın biçemini yükleyemedi.", - "CustomLimit": "Özel sayı", - "DataForThisReportHasBeenDisabled": "Şu anda bu rapor için dilimlere ayırma seçeneği kapatılmış. Ayrıntılı bilgi almak için %1$sbu SSS%2$s bölümüne bakabilirsiniz.", - "DataForThisReportHasBeenPurged": "Bu raporda bulunan veriler %s ay öncesine ait olduğundan atıldı.", - "DataTableCombineDimensions": "Boyutlar ayrı görüntüleniyor %s Boyutları birleştirerek görüntüle", - "DataTableExcludeAggregateRows": "Tüm satırlar görüntüleniyor %s Gizle", - "DataTableHowToSearch": "Arama yapmak için enter tuşuna basın ya da arama simgesine tıklayın", - "DataTableIncludeAggregateRows": "Tüm satırlar gizlenmiş %s Görüntüle", - "DataTableShowDimensions": "Boyutlar birleştirildi %s Boyutları ayırarak görüntüle", - "DateInvalid": "Belirtilen tarih ve sıklık kombinasyonu geçersiz. Lütfen tarih seçicisinden geçerli bir tarih seçin.", - "Default": "varsayılan", - "DevicesSubcategoryHelp": "Aygıtlar bölümü, ziyaretçilerin siteye erişmek için kullandığı teknolojinin anlaşılmasını sağlar. Sitenin yaygın kullanılan aygıtlara göre iyileştirilmesine yardımcı olan aygıt türü ve belirli model raporları içerir.", - "DonateCall1": "Matomo her zaman ücretsiz kullanılabilecek ancak bu durum geliştirmenin ücretsiz olduğu anlamına gelmiyor.", - "DonateCall2": "Gelişip ilerleyebilmesi için Matomo projesi sürekli desteğinize gerek duyuyor.", - "DonateCall3": "Matomo uygulamasının işinize önemli bir katkı sağladığını düşünüyorsanız, %1$slütfen düzenli bağış yapmayı%2$s ya da %3$sbir özellik satın almayı%4$s düşünün. Her kuruşun yardımı olur.", - "EndDate": "Bitiş tarihi", - "EndShortcut": "Son", - "EngagementSubcategoryHelp1": "Bağlılık arttırma bölümü, yeni ve geri gelen ziyaretçilerin ölçülmesini sağlayan raporlar içerir. Ayrıca raporlara, ortalama ziyaret süresi ve ziyaret edilen sayfa sayısı yanında bir ziyaretçinin siteyi kaç kez ziyaret ettiği ve ziyaretler arasındaki genellikle kaç gün olduğu gibi çeşitli kırılımlara göre bakabilirsiniz.", - "EngagementSubcategoryHelp2": "Bunlar ziyaretlerin sıklığını ve etkileşim oranını arttırarak erişimi iyileştirmeye yardımcı olabilir.", - "EnterZenMode": "Zen kipini aç (menüleri gizle)", - "ExceptionNotAllowlistedIP": "%s IP adresinize izin verilmediğinden bu Matomo uygulamasını kullanamazsınız.", - "ExcludeRowsWithLowPopulation": "Tüm satırlar görüntüleniyor %s Düşük dağılımlar katılmasın", - "ExitZenMode": "Zen kipini kapat (menüleri görüntüle)", - "ExpandSubtables": "Alt tabloları genişlet", - "ExportFormat": "Dışa aktarma biçimi", - "ExportTooltip": "Not: Üretilen dışa aktarma adresini kullanmak için uygulamaya özel bir kod gereklidir. Bu kodları Yönetim → Güvenlik → Kimlik doğrulama kodları bölümünden yapılandırabilirsiniz.", - "ExportTooltipWithLink": "Not: Üretilen dışa aktarma adresini kullanmak için uygulamaya özel bir kod gereklidir. Bu kodları %1$s[Yönetim → Güvenlik → Kimlik doğrulama kodları]%2$s bölümünden yapılandırabilirsiniz. Dışa aktarma adresinde %3$s yerine kimlik doğrulama kodunu yazın. Uyarı: Gerçek kodun bulunduğu adresi asla kimse ile paylaşmayın.", - "ExternalHelp": "Yardım (yeni sekmede açılır)", - "FlattenDataTable": "Rapor hiyerarşik yapıda %s Düz yap", - "FlattenReport": "Düz rapor", - "FormatMetrics": "Biçim ölçümleri", - "HideExportUrl": "Dışa aktarma adresi gizlensin", - "HomeShortcut": "Ana sayfa", - "IncludeDimensionsSeparately": "Boyutlar ayrı olarak katılsın", - "IncludeRowsWithLowPopulation": "Düşük dağılımlı satırlar gizlendi %s Tüm satırları görüntüle", - "InjectedHostEmailBody": "Merhaba, bugün Matomo uygulamasına erişmeye çalıştım ve sunucu adı bilinmiyor uyarısı ile karşılaştım.", - "InjectedHostEmailSubject": "Matomo uygulamasına bilinmeyen bir sunucu adından erişildi: %s", - "InjectedHostNonSuperUserWarning": "%1$sMatomo uygulamasına güvenli bir şekilde erişebilmek için buraya tıklayın%2$s ve bu uyarıdan kurtulun. Ayrıca Matomo yöneticiniz ile görüşerek bu sorunu bildirebilirsiniz (%3$se-posta göndermek için buraya tıklayın%4$s).", - "InjectedHostSuperUserWarning": "Matomo hatalı şekilde yapılandırılmış olabilir (örneğin Matomo yakın zamanda yeni bir sunucu adresine taşınmış olabilir). %1$sBuraya tıklayarak %2$sgeçerli bir sunucu adı (güveniyorsanız) ekleyebilir%3$s ya da %4$sburaya tıklayarak%5$s güvenli bir Matomo erişimi sağlayabilirsiniz%6$s.", - "InjectedHostWarningIntro": "Şu anda Matomo üzerinde %1$s kullanarak oturum açıyorsunuz ancak Matomo şu adreste çalışmak üzere yapılandırılmış: %2$s.", - "InvalidComparisonDateRange": "Geçerli bir karşılaştırma tarihi aralığı yazın.", - "JavascriptDisabled": "Matomo uygulamasını standart görünümü ile kullanabilmek için JavaScript desteği açılmış olmalıdır. Ancak JavaScript kapatılmış ya da tarayıcınız tarafından desteklenmiyor gibi görünüyor.
Standart görünümü kullanabilmek için tarayıcı ayarlarınızdan JavaScript desteğini açıp %1$syeniden deneyin%2$s.
", - "JsDidntLoad": "Tarayıcınız bu sayfadaki betikleri yükleyemedi.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Gizliliğinize önem veren lider açık kaynaklı istatistik platformu.", - "LearnMoreFullStop": "%1$sAyrıntılı bilgi alın.%2$s", - "MacPageDown": "Fn + Sağ ok", - "MacPageUp": "Fn + Sol ok", - "MainNavigation": "Ana gezinme", - "Menu": "Menü", - "MenuEntries": "Menü kayıtları", - "NoPrivilegesAskPiwikAdmin": "'%1$s' olarak oturum açmışsınız ancak kullanıcınıza Matomo üzerinde herhangi bir izin verilmemiş gibi görünüyor. Kullanıcınıza bir siteyi 'Görüntüleme' izni vermesi için %2$sMatomo yöneticiniz ile görüşün (e-posta göndermek için tıklayın)%3$s.", - "NoSuchPage": "Bu sayfa bulunamadı", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Matomo uygulamasını bir kaç sunucu üzerinde kullandığınız için tek tıklama ile güncelleme özelliğini kullanamazsınız. Lütfen ilerlemek için %1$s üzerinden son sürümü indirin.", - "OnlyForSuperUserAccess": "Varsayılan panodaki bu pano bileşeni yalnızca süper kullanıcılara görüntülenir.", - "PageDownShortcutDescription": "sayfanın altına gitmek için", - "PageUpShortcutDescription": "sayfanın üstüne gitmek için", - "PeriodHasOnlyRawData": "Bu dönemin raporları henüz işlenmemiş gibi görünüyor. Şu anda olduğunu görmek ister misiniz? %1$sZiyaret günlüğüne%2$s göz atın ya da raporlar oluşturulana kadar farklı bir tarih aralığı seçin.", - "PeriodHasOnlyRawDataNoVisitsLog": "Bu aralıktaki raporlar henüz işlenmemiş gibi görünüyor, ancak birkaç saat içinde hazır olacaklar. Raporlar oluşturulana kadar farklı bir tarih aralığı seçebilirsiniz.", - "PeriodRange": "Aralık", - "PivotBySubtable": "Bu rapor merkeze alınmamış %1$s Şununla merkeze alın %2$s", - "PresetDateLast30Days": "Son 30 gun", - "PresetDateLast7Days": "Son 7 gün", - "PresetDateLast90Days": "Son 90 gun", - "PresetDateLastMonth": "Geçen ay", - "PresetDateLastQuarter": "Geçen çeyrek", - "PresetDateLastWeekMonSun": "Geçen hafta (Pzt- Paz)", - "PresetDateLastYear": "Geçen yıl", - "PresetDateThisMonth": "Bu ay", - "PresetDateThisQuarter": "Bu çeyrek", - "PresetDateThisWeekMonToday": "Bu hafta (Pzt - Bugün)", - "PresetDateThisYear": "Bu yıl", - "PresetDateToday": "Bugün", - "PresetDateYesterday": "Dün", - "Profilable": "Profillenebilir", - "ProfilableSegmentHelp": "Profili oluşturulabilenler için 1 (tanımlama bilgileri kullanıldı gibi), profili oluşturulamayanlar için 0 (hiçbir tanımlama bilgisi kullanılmadı gibi)", - "QuickAccessTitle": "%s ile arayın. Arama sonuçlarında gezinmek için ok tuşlarını kullanın. Aramak için 'f' kısa yol tuşuna basın.", - "QuickLinks": "Kestirme bağlantıları", - "ReadMoreOnlineGuide": "Bu konu hakkında ayrıntılı bilgi almak için çevrim içi rehbere bakabilirsiniz.", - "RemoveTotalsRowDataTable": "Raporda toplamlar satırı görüntüleniyor. Toplamlar satırını kaldırmak için %s", - "ReportConfigure": "Bu raporu yapılandır", - "ReportGeneratedOn": "Rapor %s tarihinde oluşturuldu", - "ReportGeneratedXAgo": "Rapor %s zaman önce oluşturuldu", - "ReportLowercase": "rapor", - "ReportType": "Rapor türü", - "ReportWithMetadata": "Üst veriler ile rapor", - "ReportingCategoryHelpPrefix": "\"%1$s → %2$s\" raporları bölümü bana nasıl yardımcı olabilir?", - "RowLimit": "Satır sayısı", - "SearchOnMatomo": "Matomo.org üzerinde '%1$s' arayın", - "SeeAvailableVersions": "Kullanılabilecek sürümlere bakın", - "Segments": "Dilimler", - "SharePiwikLong": "Merhaba, Harika bir uygulama buldum: Matomo!\n\nMatomo kullanarak sitene gelen ziyaretçileri ücretsiz olarak izleyebilirsin. Kesinlikle denemeni öneririm!", - "SharePiwikShort": "Matomo! Ücretsiz ve özgür site istatistikleri. Verilerinizi elinizde tutun.", - "ShareThis": "Paylaş", - "ShortcutCalendar": "Takvimi açar (d Tarih anlamına gelir)", - "ShortcutHelp": "bu yardımı görüntüler", - "ShortcutRefresh": "içeriği yenilemek için", - "ShortcutSearch": "aramayı açar (f Bul anlamına gelir)", - "ShortcutSegmentSelector": "Parça seçiciyi açar", - "ShortcutWebsiteSelector": "Site seçiciyi açar", - "ShortcutZenMode": "Zen kipini açar", - "ShortcutsAvailable": "Kullanılabilecek kısa yollar", - "ShowExportUrl": "Dışa aktarma adresi görüntülensin", - "ShowJSCode": "Eklenecek JavaScript kodunu görüntüle", - "SkipToContent": "İçeriğe geç", - "SoftwareSubcategoryHelp": "Yazılım bölümü, ziyaretçilerin siteye erişmek için kullandığı işletim sistemlerini, tarayıcıları ve eklentileri içerir. Böylece site yaygın kullanılan yazılımlarla tam olarak uyumlu olacak şekilde iyileştirilebilir.", - "StandardReport": "Standart rapor", - "StartDate": "Başlangıç tarihi", - "SubscribeAndBecomePiwikSupporter": "Matomo destekçisi olmak için güvenli bir kredi kartı ödeme sayfası (Paypal) açın!", - "SupportPiwik": "Matomo uygulamasını destekleyin!", - "SupportUsOn": "Şu kanallardan destekleyebilirsiniz", - "SystemSummaryMysqlVersion": "MySQL sürümü", - "SystemSummaryNActivatedPlugins": "%d eklenti etkinleştirilmiş", - "SystemSummaryNSegments": "%1$d dilim", - "SystemSummaryNSegmentsWithBreakdown": "%1$d dilim (%2$s önceden işlenen, %3$s gerçek zamanlı işlenen)", - "SystemSummaryNWebsites": "%d site", - "SystemSummaryPhpVersion": "PHP sürümü", - "SystemSummaryPiwikVersion": "Matomo sürümü", - "SystemSummaryWidget": "Sistem özeti", - "TableNoData": "Bu tablo için henüz bir veri yok.", - "TechDeprecationWarning": "Matomo %1$s sürümünden başlayarak, Matomo %2$s desteği vermeyecek. Ayrıntılı bilgi almak için %3$sblog yazımıza bakabilirsiniz.%4$s", - "ThanksFromAllOfUs": "Matomo topluluğu olarak teşekkür ederiz!", - "ThereIsNoDataForThisReport": "Bu rapor için henüz bir veri yok.", - "UnFlattenDataTable": "Rapor düz yapıda %s Hiyerarşik yap", - "UndoPivotBySubtable": "Bu rapor merkeze alınmış. %s merkezden çıkarın", - "ViewAllPiwikVideoTutorials": "Tüm görüntülü Matomo eğitimlerine bakın", - "VisitStatusOrdered": "Sipariş edilen", - "VisitStatusOrderedThenAbandoned": "Sipariş edilen ve terk edilen sepet", - "VisitTypeReturning": "Geri gelen", - "VisitTypeReturningCustomer": "Geri gelen müşteri", - "VisitorsCategoryHelp1": "Ziyaretçiler bölümünde, ziyaretçilerin kim olduğu hakkında bilgiler bulunur. Ziyaretçilerin nereden geldiği, hangi aygıtlar üzerinde hangi tarayıcıları kullandığı ve genel olarak sitenizi ne zaman ziyaret ettikleri gibi bilgiler sunulur. Kitlenin kimlerden oluştuğunun anlaşılmasını ve nasıl büyütülebileceğini görmek için aykırılıklara toplu olarak bakılabilmesini sağlar.", - "VisitorsCategoryHelp2": "Ziyaretçiler hakkındaki genel bilgilere ek olarak, her ziyaret sırasında neler olduğunu görmek için %1$sziyaret günlüğü%2$s kullanılabilir.", - "VisitorsOverviewHelp": "Ziyaretçiler özeti, sitenizin ne kadar beğenildiğini anlamanıza yardımcı olur. Sitenin seçilmiş bir dönemde kaç ziyaret aldığı ile aramalar ve indirmeler gibi bağlılık arttırıcı özelliklerin ortalama etkileşim düzeyini gösteren çizelgeler gibi bilgiler içerir.", - "WebAnalyticsReports": "Site istatistikleri raporları", - "YouAreUsingTheLatestVersion": "Son Matomo sürümünü kullanıyorsunuz!", - "YourDonationWillHelp": "Bağışınız, bu açık kaynaklı istatistik platformu için yeni özellik ve geliştirmelerin doğrudan desteklenmesini sağlar. Böylece topluluk her zaman kişisel gizliliği koruyan ve verilerinizin kontrolünü elinizde tutmanızı sağlayan bir araçtan yararlanabilir." - } -} diff --git a/plugins/CoreHome/lang/tzm.json b/plugins/CoreHome/lang/tzm.json deleted file mode 100644 index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/tzm.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/plugins/CoreHome/lang/uk.json b/plugins/CoreHome/lang/uk.json deleted file mode 100644 index 3cfd8b3277752090f06b2a0fd6b7bf8fb7ae5ff2..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/uk.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "У разі, якщо ви використовуєте блокувальник реклами, будь ласка, вимкніть його, щоб переконатися, що Matomo працює без проблем.", - "AddTotalsRowDataTable": "Звіт не показує підсумковий рядок %s Показати підсумкові рядки", - "CategoryNoData": "Немає даних в цій категорії. Спробуйте \"Увімкнути усі показники\".", - "ChangeCurrentWebsite": "Вибір вебсайту, зараз обраний вебсайт: %s", - "ChangePeriod": "Виберіть період", - "ChangeVisualization": "Зміна візуалізації", - "CheckForUpdates": "Перевірити на оновлення", - "CheckPiwikOut": "Перевірити Matomo на оновлення!", - "ChooseWebsite": "Виберіть вебсайт", - "ChooseX": "Вибирати %1$s", - "ClickRowToExpandOrContract": "Натисніть на цей рядок, щоб розширити або скоротити підтаблиці.", - "ClickToEditX": "Редагувати %s", - "ClickToSeeFullInformation": "Натисніть, щоб побачити повну інформацію", - "CloseSearch": "Закрити пошук", - "CloseWidgetDirections": "Ви можете закрити цей віджет, натиснувши на значок 'X' у верхній частині віджета.", - "CssDidntLoad": "Ваш браузер не зміг завантажити стиль цієї сторінки.", - "CustomLimit": "Вибраний ліміт", - "DataForThisReportHasBeenDisabled": "Сегментацію для цього звіту наразі вимкнено. Будь ласка, перевірте %1$sпоширені запитання%2$s для отримання додаткової інформації.", - "DataForThisReportHasBeenPurged": "Дані для цього звіту зберігалися понад %s місяців і були видалені.", - "DataTableCombineDimensions": "Аспекти вказано окремо для %s Показати аспекти в поєднанні", - "DataTableExcludeAggregateRows": "Вибрані рядки відображені %s Приховати їх", - "DataTableHowToSearch": "Натисніть enter або клацніть значок пошуку для пошуку", - "DataTableIncludeAggregateRows": "Вибрані рядки приховані %s Показати їх", - "DataTableShowDimensions": "Обє'кти об'єднані %s Показувати об'єкти окремо", - "DateInvalid": "Наведене сполучення дати та періоду неправильне. Будь ласка, виберіть дійсну дату в списку дат.", - "Default": "за замовчуванням", - "DevicesSubcategoryHelp": "Розділ \"Пристрої\" допоможе вам зрозуміти технологію, яку ваші відвідувачі використовують для доступу до вашого сайту. Ви побачите звіти про тип пристрою та конкретні моделі, щоб оптимізувати свій сайт для найпопулярніших пристроїв.", - "DonateCall1": "Matomo завжди буде безкоштовним для використання, але це не означає, що нам це нічого не коштує.", - "DonateCall2": "Matomo потребує вашої постійної підтримки, щоб рости і процвітати.", - "DonateCall3": "Якщо ви відчуваєте, що Matomo додав значну цінність для вашого бізнесу чи зусиль, %1$sбудь ласка, подумайте про пожертву%2$s або %3$sпридбайте преміум-функції%4$s. Кожна копійка допоможе.", - "EndDate": "Дата завершення", - "EndShortcut": "Кінець", - "EngagementSubcategoryHelp1": "У розділі Залучення представлені звіти, які допомагають визначити кількість нових відвідувачів і відвідувачів, які повернулися. Ви також можете переглянути звіти, у яких розбивається середній час і кількість сторінок за відвідування, а також кількість відвідувань відвідувачів вашого сайту та найпоширеніша кількість днів між відвідуваннями.", - "EngagementSubcategoryHelp2": "Це може допомогти вам оптимізувати ресурс для частоти відвідувань і високої взаємодії, а також максимізувати охоплення.", - "EnterZenMode": "Увійти в режим Дзен (показати меню)", - "ExceptionNotAllowlistedIP": "Ви не можете використовувати цей Matomo, оскільки ваш IP %s не дозволено.", - "ExcludeRowsWithLowPopulation": "Всі рядки відображені %s Крім низьких показників", - "ExitZenMode": "Вийти з режиму Дзен (показати меню)", - "ExpandSubtables": "Розгорнути підтаблиці", - "ExportFormat": "Експорт формату", - "ExportTooltip": "Примітка. Щоб використовувати утворену URL-адресу експорту, вам потрібно буде вказати токен автентифікації застосунку. Ви можете налаштувати ці токени в Адміністрування → Безпека → Автентифікація токенів.", - "ExportTooltipWithLink": "Примітка. Щоб використовувати утворену URL-адресу експорту, вам потрібно буде вказати токен автентифікації застосунку. Ви можете налаштувати ці токени в %1$s[Адміністрування → Безпека → Токени автентифікації]%2$s. Замініть %3$s в URL-адресі експорту вашим токеном автентифікації. Попередження: ніколи ні з ким не діліться URL-адресою зі справжнім токеном.", - "ExternalHelp": "Допомога (відкриється в новій вкладці)", - "FlattenDataTable": "Звіт побудований за ієрархією %s Зробити його конкретнішим", - "FlattenReport": "Згладити звіт", - "FormatMetrics": "Формати показника", - "HideExportUrl": "Приховати експорт URL", - "HomeShortcut": "Головна", - "IncludeRowsWithLowPopulation": "Рядки з низькими показниками відображені %s Показати всі", - "InjectedHostEmailBody": "Привіт, спробував зайти в Matomo сьогодні і зіткнувся з проблемою невідомого хоста.", - "InjectedHostEmailSubject": "В Matomo був наданий доступ по невідомому хосту: %s", - "InjectedHostNonSuperUserWarning": "%1$sНатисніть тут, щоб безпечно увійти в Matomo%2$s і прибрати це попередження. Ви також можете зв'язатися з адміністратором Matomo і повідомити його про проблему (%3$sвідправити йому email%4$s).", - "InjectedHostSuperUserWarning": "Matomo може бути неправильно налаштований (наприклад, якщо Matomo був недавно переміщений на новий сервер або переїхав на нову адресу). Ви також можете %1$sнатиснути сюди і додати %2$s в якості довіреного імені хоста Matomo (якщо ви довіряєте йому)%3$s, або %4$sнатисніть сюди і перейдіть %5$s для безпечного доступу до Matomo%6$s.", - "InjectedHostWarningIntro": "Зараз ви заходите в Matomo на %1$s, але Matomo був налаштований на цю адресу: %2$s.", - "JavascriptDisabled": "Щоб мати можливість використовувати Matomo у стандартному режимі, потрібно ввімкнути JavaScript.
Тим не менш, здається, що JavaScript відключений або не підтримується вашим браузером.
Щоб використовувати стандартний вигляд, увімкніть JavaScript, змінюючи параметри браузера, потім %1$sспробуйте ще раз%2$s.
", - "JsDidntLoad": "Вашому браузеру не вдалося завантажити скрипти цієї сторінки.", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "Провідна відкрита платформа аналітики, яка поважає ваше приватне життя.", - "MacPageDown": "Fn + Стрілка праворуч", - "MacPageUp": "Fn + Стрілка ліворуч", - "MainNavigation": "Основна навігація", - "Menu": "Меню", - "MenuEntries": "Пункти меню", - "NoPrivilegesAskPiwikAdmin": "Ви авторизовані як '%1$s', але, здається, для вас не встановлені права в Matomo. %2$s Попросіть вашого адміністратора (натисніть, щоб написати лист)%3$s надати вам доступ для \\\"перегляду\\\" до статистики сайту.", - "NoSuchPage": "Ця сторінка не існує", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "Оновлення одним клацанням миші не доступно, як ви використовуєте Matomo з декількома серверами. Будь ласка, завнтажте останню версію з %1$s щоб продовжити.", - "OnlyForSuperUserAccess": "Цей віджет відображається в панелі управління за замовчуванням тільки для користувачів, що мають доступ до супер користувача.", - "PageDownShortcutDescription": "щоб дістатись донизу сторінки", - "PageUpShortcutDescription": "щоб перейти до верхньої частини сторінки", - "PeriodHasOnlyRawData": "Схоже, звіти за цей період ще не оброблені. Хочете подивитись, що зараз відбувається? Перегляньте %1$sЖурнал відвідувань%2$s або виберіть інший період дати до створення звітів.", - "PeriodHasOnlyRawDataNoVisitsLog": "Схоже, що звіти за цей період ще не оброблені, але вони будуть доступні за кілька годин. Ви можете вибрати інший період, поки звіти не будуть створені.", - "PeriodRange": "Період", - "PivotBySubtable": "Цей звіт не згенерований %1$s Згенеровано %2$s", - "PresetDateToday": "Сьогодні", - "PresetDateYesterday": "Учора", - "Profilable": "Профільовано", - "QuickAccessTitle": "Пошук %s. Використовуйте клавіші зі стрілками для переходів в межах результатів пошуку. Швидкий доступ: натисніть 'f' для пошуку.", - "QuickLinks": "Швидкі посилання", - "ReadMoreOnlineGuide": "Докладніше про цю тему читайте в онлайн-посібнику.", - "RemoveTotalsRowDataTable": "Звіт показує підсумковий рядок %s Видалити підсумкові рядки", - "ReportGeneratedOn": "Звіт було складено %s", - "ReportGeneratedXAgo": "Звіт було складено %s назад", - "ReportLowercase": "звіт", - "ReportType": "Тип звіту", - "ReportWithMetadata": "Звіт з метаданими", - "ReportingCategoryHelpPrefix": "Як мені допомагає сторінка звітів «%1$s → %2$s»?", - "RowLimit": "Ліміт рядка", - "SearchOnMatomo": "Шукайте «%1$s» на Matomo.org", - "SeeAvailableVersions": "Див. Доступні версії", - "Segments": "Сегменти", - "SharePiwikLong": "Привіт! Я знайшов чудову безкоштовну програму: Matomo!\n\nMatomo дозволить відстежувати відвідувачів на вашому сайті безкоштовно. Ви повинні обов'язково перевірити це!", - "SharePiwikShort": "Matomo! Вільне та відкрите програмне вебаналітики. Володійте вашими даними.", - "ShareThis": "Поділитися", - "ShortcutCalendar": "щоб відкрити календар (d означає дату)", - "ShortcutHelp": "щоб показати цю допомогу", - "ShortcutRefresh": "для оновлення вмісту", - "ShortcutSearch": "щоб відкрити пошук (f означає \"Знайти\")", - "ShortcutSegmentSelector": "щоб відкрити селектор сегментів", - "ShortcutWebsiteSelector": "відкрити селектор вебсайтів", - "ShortcutZenMode": "для режиму Дзен", - "ShortcutsAvailable": "Доступні ярлики", - "ShowExportUrl": "Показати експорт URL", - "ShowJSCode": "Показати JavaScript код для вставки", - "SkipToContent": "Перейти до вмісту", - "SoftwareSubcategoryHelp": "У розділі Програмне забезпечення показано операційні системи, браузери та плагіни, які ваші відвідувачі використовують для доступу до сайту, щоб ви могли оптимізувати свій сайт, щоб забезпечити його повну сумісність з найрозповсюдженішими конфігураціями.", - "StandardReport": "Стандартний звіт", - "StartDate": "Дата початку", - "SubscribeAndBecomePiwikSupporter": "Приступити до безпечної оплаті кредитною картою (Paypal), щоб стати прихильником Matomo!", - "SupportPiwik": "Підтримайте Matomo!", - "SupportUsOn": "Підтримайте нас на", - "SystemSummaryMysqlVersion": "Версія MySQL", - "SystemSummaryNActivatedPlugins": "%d активовані плагіни", - "SystemSummaryNSegments": "%1$d сегментів", - "SystemSummaryNSegmentsWithBreakdown": "%1$d сегментів (%2$s попередньо оброблено, %3$s оброблено наживо)", - "SystemSummaryNWebsites": "%d сайтів", - "SystemSummaryPhpVersion": "Версія PHP", - "SystemSummaryPiwikVersion": "Версія Matomo", - "SystemSummaryWidget": "Відомості про систему", - "TableNoData": "Немає даних для цієї таблиці.", - "TechDeprecationWarning": "Починаючи з версії Matomo %1$s, Matomo припинить підтримку %2$s. Подробиці %3$s дивіться в нашому блозі.%4$s", - "ThanksFromAllOfUs": "Дякуємо від усіх нас у Matomo!", - "ThereIsNoDataForThisReport": "Не існує даних для складання звіту.", - "UnFlattenDataTable": "Конкретніший звіт %s Побудувати його по ієрархії", - "UndoPivotBySubtable": "Цей звіт було зведено %s Скасувати зведення", - "ViewAllPiwikVideoTutorials": "Переглянути всі навчальні ролики про Matomo", - "VisitStatusOrdered": "Замовлено", - "VisitStatusOrderedThenAbandoned": "Замовлені та покинуті кошики", - "VisitTypeReturning": "Повторні", - "VisitTypeReturningCustomer": "Повторні клієнти", - "VisitorsCategoryHelp1": "Сторінки відвідувачів розповідають вам про те, хто є вашими відвідувачами. Такі речі, як звідки прийшли ваші відвідувачі, які пристрої та браузери вони використовують і коли вони зазвичай відвідують ваш вебсайт. Зрозумійте в сукупності, хто ваша авдиторія, і шукайте відхилення, щоб побачити, як ваша авдиторія може зрости.", - "VisitorsCategoryHelp2": "На додаток до загальних відомостей про ваших відвідувачів, ви також можете використовувати %1$sЖурнал відвідувань%2$s, щоб побачити, що відбувалося під час кожного окремого відвідування.", - "VisitorsOverviewHelp": "Огляд відвідувачів допомагає зрозуміти відвідуваність вашого сайту. Це робиться, надаючи діаграми, які показують, скільки відвідувань ваш сайт отримує за вибраний період, а також середній рівень залучення ключових функцій, таких як пошуки та завантаження.", - "WebAnalyticsReports": "Звіти веб аналітики", - "YouAreUsingTheLatestVersion": "У вас остання версія Matomo!", - "YourDonationWillHelp": "Ваша пожертва безпосередньо допоможе фінансувати нові функції та покращення для цієї аналітичної платформи з відкритим кодом. Це означає, що спільнота завжди отримає вигоду від засобу, який захищає приватність і дозволяє вам контролювати свої дані." - } -} diff --git a/plugins/CoreHome/lang/ur.json b/plugins/CoreHome/lang/ur.json deleted file mode 100644 index da44ed3d1797d09ddee9ea00a218c7246a46e54a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/ur.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "CoreHome": { - "ChooseWebsite": "ویب سائیٹ منتخب کریں", - "PeriodRange": "رینج", - "ShareThis": "اسکو سئیر کریں" - } -} diff --git a/plugins/CoreHome/lang/vi.json b/plugins/CoreHome/lang/vi.json deleted file mode 100644 index 085df4a3dded5bd1ad402fb9382516a0fab36a12..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/vi.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "CoreHome": { - "CategoryNoData": "Không có dữ liệu trong mục này. Thử \"tất cả các thành phần\"", - "CheckForUpdates": "Kiểm tra các bản cập nhật", - "CheckPiwikOut": "Thủ tục thoát Matomo!", - "ChooseWebsite": "Chọn website", - "CloseWidgetDirections": "Bạn có thể đóng widget này bằng cách click vào biểu tượng \"X\" ở trên cùng của các widget", - "DataForThisReportHasBeenPurged": "Các dữ liệu cho báo cáo này là nhiều hơn %s tháng và đã được loại bỏ", - "DataTableExcludeAggregateRows": "Hàng tổng hợp hiển thị %s Hide", - "DataTableIncludeAggregateRows": "Hàng tổng hợp hiển thị %s Show", - "Default": "mặc định", - "DonateCall1": "Matomo sẽ luôn luôn cho bạn thấy không có gì để sử dụng, nhưng điều đó không có nghĩa là nó cho thấy chúng ta không có gì để làm.", - "DonateCall2": "Matomo cần sự hỗ trợ của bạn để phát triển và phát triển mạnh hơn.", - "EndShortcut": "Kết Thúc", - "ExceptionNotAllowlistedIP": "Bạn không thế sử dụng Matomo vì địa chỉ IP %s của bạn không được cho phép.", - "ExcludeRowsWithLowPopulation": "Tất cả các hàng được hiển thị %s Loại trừ dân số thấp", - "ExternalHelp": "Giúp đỡ (mở trong tab mới)", - "FlattenDataTable": "Báo cáo này là phân cấp %s Làm cho nó minh bạch", - "IncludeRowsWithLowPopulation": "Các Hàng với mật độ tập trung thấp đang ẩn %s Hiển thị tất cả các hàng", - "InjectedHostEmailBody": "Xin chào, hôm nay tôi đã cố gắng để truy cập Matomo và gặp phải cảnh báo tên máy chủ chưa biết", - "InjectedHostEmailSubject": "Matomo được truy cập với tên máy chủ không rõ ràng :%s", - "InjectedHostNonSuperUserWarning": "%1$sNhấn vào đây để truy cập Matomo một cách an toàn%2$s và loại bỏ cảnh báo này. Bạn còn có thể liên lạc với người quản trị Matomo và thông báo cho họ về vấn đề này(%3$sNhấn vào đây để gửi email%4$s)", - "InjectedHostSuperUserWarning": "Matomo có thể bị cấu hình sai (ví dụ, Matomo gần đây được dời sang máy chủ khác hoặc URL khác). Bạn có thể %1$snhấn vào đây và thêm %2$s như là tên máy chủ hợp lệ%3$s, hoặc %4$snhấn vào đây để đi đến %5$s để truy cập Matomo một cách an toàn%6$s", - "InjectedHostWarningIntro": "Bây giờ bạn đang truy cập Matomo từ %1$s, nhưng Matomo đã được cấu hình để chạy tại địa chỉ này: %2$s", - "NoPrivilegesAskPiwikAdmin": "Bạn được đăng nhập như '%1$s' nhưng dường như bạn không được phép thiết lập trong Matomo. %2$s Yêu cầu quản trị Matomo của bạn (bấm vào để email) %3$s để cung cấp cho bạn 'xem' truy cập đến một website.", - "PeriodRange": "Phạm vi", - "PresetDateToday": "Hôm nay", - "PresetDateYesterday": "Hôm qua", - "ReportGeneratedOn": "Báo cáo được tạo vào %s", - "ReportGeneratedXAgo": "Báo cáo được tạo %s trước đây", - "SharePiwikShort": "Matomo! Công cụ phân tích web mã nguồn mỡ miễn phí! Sở hữu dữ liệu của chính bạn.", - "ShareThis": "Chia sẻ điều này", - "ShowJSCode": "Hiển thị đoạn mã JavaScript để chèn", - "SubscribeAndBecomePiwikSupporter": "Thực hiện một trang thanh toán bằng thẻ tín dụng an toàn (Paypal) để trở thành một nhà tài trợ cho Matomo!", - "SupportPiwik": "Ủng hộ Matomo!", - "SystemSummaryPhpVersion": "Phiên bản PHP", - "TableNoData": "Không có dữ liệu cho bảng này.", - "ThereIsNoDataForThisReport": "Không có dữ liệu cho báo cáo này", - "UnFlattenDataTable": "Báo cáo là rõ ràng %s Làm cho nó có thứ bậc", - "ViewAllPiwikVideoTutorials": "Xem tất cả các video hướng dẫn Matomo", - "WebAnalyticsReports": "Các báo cáo phân tích web", - "YouAreUsingTheLatestVersion": "Bạn đang sử dụng phiên bản mới nhất của Matomo!" - } -} diff --git a/plugins/CoreHome/lang/zh-cn.json b/plugins/CoreHome/lang/zh-cn.json deleted file mode 100644 index 6cbe060c680f470555bc12adc63da52668067a41..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/zh-cn.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "如果您使用的是广告拦截,请禁用此网站,以确保Matomo工作没有任何问题。", - "AddTotalsRowDataTable": "该报告未显示总计行%s显示总计行", - "CategoryNoData": "该分类没有数据。 请试试 \"包含所有数据\"。", - "ChangeCurrentWebsite": "选择一个网站,当前选择的网站: %s", - "ChangePeriod": "更改周期", - "ChangeVisualization": "更改视图", - "CheckForUpdates": "检查更新", - "CheckPiwikOut": "访问 Matomo!", - "ChooseWebsite": "选择网站", - "ChooseX": "选择 %1$s", - "ClickRowToExpandOrContract": "点击这行可以扩展或压缩小工作台。", - "ClickToEditX": "点击编辑 %s", - "ClickToSeeFullInformation": "点击查看完整信息", - "CloseSearch": "关闭搜索", - "CloseWidgetDirections": "点击右上角的“X”图标可关闭这个小部件。", - "CopyX": "复制%1$s", - "CssDidntLoad": "您的浏览器无法加载此页面的样式。", - "CustomLimit": "自定义限制", - "DataForThisReportHasBeenDisabled": "此报告当前已禁用分段。有关详细信息,请查看%1$s此常见问题解答%2$s。", - "DataForThisReportHasBeenPurged": "本报表数据超过 %s 个月已被清空。", - "DataTableCombineDimensions": "尺寸单独显示%s显示组合尺寸", - "DataTableExcludeAggregateRows": "汇总行已显示 %s 隐藏汇总", - "DataTableHowToSearch": "按回车或者点击搜索图标进行搜索", - "DataTableIncludeAggregateRows": "汇总行已隐藏 %s 显示汇总", - "DataTableShowDimensions": "尺寸合并%s单独显示尺寸", - "DateInvalid": "所选的日期和时期组合无效。请在日期选择器中选择一个有效的日期。", - "Default": "默认", - "DevicesSubcategoryHelp": "设备部分可以帮助您了解您的访问者访问您的网站所使用的技术。您将看到其设备类型和型号,使您能够针对最流行的设备优化您的网站.", - "DonateCall1": "Matomo 对您来说可以免费使用,但对我们来说并非零成本。", - "DonateCall2": "Matomo 的茁壮成长离不开您的支持。", - "DonateCall3": "如果你觉得Matomo对你的商业有价值的话,%1$s请考虑资助%2$s 或者 %3$s购买会员%4$s。任何一分都会有帮助。", - "EndDate": "结束日期", - "EndShortcut": "结束", - "EngagementSubcategoryHelp1": "参与部分提供的报告帮助你量化了得到的新访客和回访访客的数量。你还可以查看报告,其中细分了每次访问的平均时间和页面数,以及访客访问你的网站的次数和最常见的访问间隔天数。", - "EngagementSubcategoryHelp2": "这可以帮助你优化频率和高互动访问,此外还可以最大限度地提高你的影响力。", - "EnterZenMode": "进入Zen模式(隐藏菜单)", - "ExceptionNotAllowlistedIP": "您不能使用此Matomo,因为不允许使用IP%s。", - "ExcludeRowsWithLowPopulation": "显示了所有的数据 %s 不显示低密度数据", - "ExitZenMode": "退出Zen模式(显示菜单)", - "ExpandSubtables": "展开子表", - "ExportFormat": "出口格式", - "ExportTooltip": "注意:要使用导出URL,你将需要指定一个应用程序令牌授权。你可以在管理 → 安全 → 令牌认证中配置。", - "ExportTooltipWithLink": "注意:要使用生成的导出URL,你将需要指定一个应用程序令牌认证。你可以在%1$s[管理 → 安全 → 令牌认证]%2$s中配置这些令牌。用你的认证令牌替换导出URL中的%3$s。警告。千万不要与其他人分享带有真正令牌的URL。", - "ExternalHelp": "帮助(在新标签页打开)", - "FlattenDataTable": "本报表已分级显示 %s 改为不分级显示", - "FlattenReport": "展平报告", - "FormatMetrics": "格式指标", - "HideExportUrl": "隐藏导出URL", - "HomeShortcut": "Home", - "IncludeDimensionsSeparately": "单独包含维度", - "IncludeRowsWithLowPopulation": "没有显示低密度数据 %s 显示所有数据", - "InjectedHostEmailBody": "您好,我今天访问 Matomo 时遇到未知主机名的警告。", - "InjectedHostEmailSubject": "访问 Matomo 的主机名未知: %s", - "InjectedHostNonSuperUserWarning": "%1$s点这里安全访问 Matomo %2$s 并关闭警告。您可以联系 Matomo 管理员并报告这个问题 (%3$s点这里发邮件%4$s)。", - "InjectedHostSuperUserWarning": "可能 Matomo 配置有误 (例如,Matomo 刚移到新的服务器)。您可以 %1$s点这里添加 %2$s 为 Matomo 主机名 (如果您信任)%3$s, 或者 %4$s点这里转到 %5$s 安全访问 Matomo %6$s。", - "InjectedHostWarningIntro": "您现在是通过 %1$s 访问 Matomo,但 Matomo 设置的地址是: %2$s.", - "JavascriptDisabled": "使用 Matomo 的标准视图时必须启用 JavaScript。<br />然而,看来您的浏览器已停用或不支持 JavaScript。<br />若要使用标准视图,请修改您的浏览器选项并启用 JavaScript, 然后%1$s重试一次%2$s。<br />", - "JsDidntLoad": "您的浏览器无法加载此页面的脚本。", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "领先的开源分析平台尊重你的隐私。", - "MacPageDown": "Fn + 右箭头", - "MacPageUp": "Fn + 向左箭头", - "MainNavigation": "主导航", - "Menu": "菜单", - "MenuEntries": "菜单项", - "NoPrivilegesAskPiwikAdmin": "您当前登录用户是'%1$s' ,但是没有任何Matomo权限。%2$s 联系 Matomo 管理员 (点击发送邮件)%3$s 获得 '查看' 权限。", - "NoSuchPage": "页面不存在", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "由于你在多个服务器上部署Matomo,所以一键升级不可用。请直接从%1$s下周最新版本。", - "OnlyForSuperUserAccess": "这个小工具仅仅显示在有超级用户权限的面板里。", - "PageDownShortcutDescription": "到达页面底部", - "PageUpShortcutDescription": "到达页面顶部", - "PeriodHasOnlyRawData": "为该期间提供的报告看起来还没有处理掉。你想看看现在的情况么?点击%1$s访问记录%2$s或者选择一个不同的时段直到报告生成。", - "PeriodHasOnlyRawDataNoVisitsLog": "看起来这段时间的报告尚未处理,但几个小时后即可获得。您可以选择不同的日期段,直到生成报告。", - "PeriodRange": "时间段", - "PivotBySubtable": "这个报表尚未 pivot %1$s 以 %2$s 的身份 pivot", - "PresetDateLast30Days": "最近30天", - "PresetDateLast7Days": "最近7天", - "PresetDateLast90Days": "最近90天", - "PresetDateLastMonth": "上一个月", - "PresetDateLastQuarter": "上一季度(3个月)", - "PresetDateLastWeekMonSun": "上一周(从周一至周日)", - "PresetDateLastYear": "去年", - "PresetDateThisMonth": "本月", - "PresetDateThisQuarter": "本季度", - "PresetDateThisWeekMonToday": "本周(周一至今天)", - "PresetDateThisYear": "本年", - "PresetDateToday": "今天", - "PresetDateYesterday": "昨天", - "Profilable": "可剖析", - "QuickAccessTitle": "搜索 %s,使用上下键在搜索结果中导航。快捷键:按“F”进行搜索。", - "QuickLinks": "快速链接", - "ReadMoreOnlineGuide": "在线指南中阅读有关此主题的更多信息。", - "RemoveTotalsRowDataTable": "该报告显示总计行%s删除总计行", - "ReportConfigure": "配置本报告", - "ReportGeneratedOn": "本报表生成时间 %s", - "ReportGeneratedXAgo": "本报表在 %s 前生成", - "ReportLowercase": "报告", - "ReportType": "报告类型", - "ReportWithMetadata": "报告元数据", - "ReportingCategoryHelpPrefix": "这个\"%1$s → %2$s\"报告页面是怎样帮助我的?", - "RowLimit": "行限制", - "SearchOnMatomo": "在Matomo.org上搜索“ %1$s”", - "SeeAvailableVersions": "请参阅可用版本", - "Segments": "段", - "SharePiwikLong": "您好!我刚刚发现了一个很棒的开源软件: Matomo!\n\nMatomo 可以免费统计网站的访问情况,您一定要看一看!", - "SharePiwikShort": "Matomo!自由和开源的网络分析程序,掌控您自己的统计数据。", - "ShareThis": "分享这个", - "ShortcutCalendar": "打开日历(d代表日期)", - "ShortcutHelp": "显示这个帮助", - "ShortcutRefresh": "刷新内容", - "ShortcutSearch": "打开搜索(f代表查找)", - "ShortcutSegmentSelector": "打开Segment选择器", - "ShortcutWebsiteSelector": "打开网站选择器", - "ShortcutZenMode": "对于Zen模式", - "ShortcutsAvailable": "可用的快捷方式", - "ShowExportUrl": "显示导出URL", - "ShowJSCode": "显示插入的Javascript代码", - "SkipToContent": "跳过,查看内容", - "SoftwareSubcategoryHelp": "软件部分展示了您的访问者在访问网站时使用的操作系统、浏览器和插件,以便您可以优化您的网站,以确保它与最流行的配置完全兼容。", - "StandardReport": "标准报告", - "StartDate": "开始日期", - "SubscribeAndBecomePiwikSupporter": "进入安全的信用卡付款页面 (Paypal) 支持 Matomo !", - "SupportPiwik": "支持 Matomo!", - "SupportUsOn": "支持我们", - "SystemSummaryMysqlVersion": "MySQL版本", - "SystemSummaryNActivatedPlugins": "%d激活的插件", - "SystemSummaryNSegments": "%1$d个细分", - "SystemSummaryNSegmentsWithBreakdown": "%1$d个细分(%2$s个预处理,%3$s个实时处理)", - "SystemSummaryNWebsites": "%d网站", - "SystemSummaryPhpVersion": "PHP版本", - "SystemSummaryPiwikVersion": "Matomo版本", - "SystemSummaryWidget": "系统概要", - "TableNoData": "此表格无数据。", - "TechDeprecationWarning": "从第%1$s版的Matomo起,Matomo将停止支持%2$s。更多信息%3$s请看我们的博客。%4$s", - "ThanksFromAllOfUs": "谢谢所有和Matomo相关的人!", - "ThereIsNoDataForThisReport": "此报表沒有数据。", - "UnFlattenDataTable": "本报表不分级显示 %s 改为分级显示", - "UndoPivotBySubtable": "这个报表被 pivot 了 %s 撤销 Pivot", - "ViewAllPiwikVideoTutorials": "查看所有的 Matomo 视频教程", - "VisitStatusOrdered": "有序", - "VisitStatusOrderedThenAbandoned": "订购了Abandoned Cart", - "VisitTypeReturning": "返回", - "VisitTypeReturningCustomer": "回归客户", - "VisitorsCategoryHelp1": "访客页面会告诉你谁是你的访客。你的访客来自哪里,他们使用什么设备和浏览器,以及他们通常在什么时候访问你的网站。总的来说,了解您的受众是谁,并寻找离群值,以了解您的受众可以如何增长.", - "VisitorsCategoryHelp2": "除了您的访问者的一般信息外,您还可以使用%1$s访问日志%2$s来查看每次访问的情况.", - "VisitorsOverviewHelp": "访客概览帮助您了解您网站的受欢迎程度,它通过提供图表来显示您的网站在选定的时间段内的访问量,和关键功能(如搜索和下载)的平均参与度。", - "WebAnalyticsReports": "网站分析报表", - "YouAreUsingTheLatestVersion": "您正在使用最新版的 Matomo!", - "YourDonationWillHelp": "您的捐赠将直接为这个开源分析平台的新功能和改进提供资金。这意味着社区能持续为您提供保护隐私并完全掌控您数据的工具。" - } -} diff --git a/plugins/CoreHome/lang/zh-tw.json b/plugins/CoreHome/lang/zh-tw.json deleted file mode 100644 index 2b9259aa1d372b8578804e5e3f3dfcf4d5a79566..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/lang/zh-tw.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "CoreHome": { - "AdblockIsMaybeUsed": "假如你正在使用廣告封鎖外掛,請將它在此網站上關閉來確保 Matomo 可以正常運作。", - "AddTotalsRowDataTable": "這份報表沒有顯示總計列%s顯示總計列", - "CategoryNoData": "此分類下沒有資料。嘗試「包含所有人口」。", - "ChangeCurrentWebsite": "選擇一個網站,目前選擇的網站為:%s", - "ChangePeriod": "變更期間", - "ChangeVisualization": "更換視圖", - "CheckForUpdates": "檢查更新", - "CheckPiwikOut": "查看 Matomo!", - "ChooseWebsite": "選擇網站", - "ChooseX": "選擇 %1$s", - "ClickRowToExpandOrContract": "點擊此列來展開或收合子表。", - "ClickToEditX": "點擊以編輯 %s", - "ClickToSeeFullInformation": "點擊查看完整資訊", - "CloseSearch": "關閉搜尋", - "CloseWidgetDirections": "你可以點擊小工具上方的「X」來關閉它。", - "CssDidntLoad": "你的瀏覽器無法載入此頁面的樣式。", - "CustomLimit": "自訂限制", - "DataForThisReportHasBeenDisabled": "區隔在此報表上已停用。請參閱%1$s此 FAQ%2$s 瞭解詳情。", - "DataForThisReportHasBeenPurged": "這份報表中的資料已經超過 %s 個月因此已被清除。", - "DataTableCombineDimensions": "目前顯示個別的維度 %s 顯示綜合的維度", - "DataTableExcludeAggregateRows": "合計列已顯示 %s 點擊隱藏", - "DataTableHowToSearch": "按下 Enter 鍵或點擊搜尋圖示來搜尋", - "DataTableIncludeAggregateRows": "合計列已隱藏 %s 點擊顯示", - "DataTableShowDimensions": "目前顯示綜合的維度 %s 分別顯示各個維度", - "DateInvalid": "指定的日期與期間組合無效。請至日期工具內選擇另一個有效的日期。", - "Default": "預設", - "DevicesSubcategoryHelp": "「設備」部分幫助你瞭解訪問者用於訪問你網站的技術。你將看到有關裝置類型和型號的報表,以便你的網站能針對最受歡迎的裝置作出優化。", - "DonateCall1": "使用 Matomo 永遠不花你任何一毛錢,但那不表示我們開發不需要花到半毛錢。", - "DonateCall2": "Matomo 需要你的持續支持以成長茁壯。", - "DonateCall3": "如果你覺得 Matomo 為你的事業或是奮鬥過程中增添了非凡的價值,%1$s請考慮捐助%2$s或是%3$s購買高級功能%4$s。每一分錢都是幫助。", - "EndDate": "結束日期", - "EndShortcut": "End 鍵", - "EngagementSubcategoryHelp1": "「參與」部分提供的報表有助於量化你獲得的新訪客和回頭客之數量。你還可以查閱細分每次訪問的平均時間和頁數的報告,以及訪問者訪問你網站的次數以及一般隔多少天會再次訪問。", - "EngagementSubcategoryHelp2": "這可以幫助你針對頻次和高互動的來訪作出優化,同時最大限度地擴大覆蓋面。", - "EnterZenMode": "進入勿擾模式(隱藏選單)", - "ExceptionNotAllowlistedIP": "你無法使用此 Matomo,因為你的 IP %s 未被允許。", - "ExcludeRowsWithLowPopulation": "已顯示所有列 %s 排除較低人數", - "ExitZenMode": "離開勿擾模式(顯示選單)", - "ExpandSubtables": "展開子表格", - "ExportFormat": "匯出格式", - "ExportTooltip": "注意:要使用產生的導出 URL,你需要指定一個應用程式權杖。您可以在 管理中心 → 安全性 → 存取權杖 中設定。", - "ExportTooltipWithLink": "注意:要使用產生的導出 URL,你需要指定一個應用程式權杖。你可以在%1$s[管理中心 → 安全性 → 存取權杖]%2$s中設定這些權杖。用你的權杖替換導出 URL 中的 %3$s。警告:切勿共享帶有真實權杖的 URL 予他人。", - "ExternalHelp": "幫助(在新分頁中開啟)", - "FlattenDataTable": "報表目前已分層 %s 平面化顯示", - "FlattenReport": "平滑化報表", - "FormatMetrics": "格式數據", - "HideExportUrl": "隱藏匯出網址", - "HomeShortcut": "Home 鍵", - "IncludeRowsWithLowPopulation": "已隱藏較低人數列 %s 顯示全部", - "InjectedHostEmailBody": "嗨,今天我試著存取 Matomo 但是遇到了未知域名警告。", - "InjectedHostEmailSubject": "Matomo 被來自未知的域名訪問:%s", - "InjectedHostNonSuperUserWarning": "%1$s點擊這裡以安全的存取 Matomo%2$s 並移除這個警告。你也可能想要聯絡你的 Matomo 管理員並提醒他們這個問題(%3$s點此寄信%4$s)。", - "InjectedHostSuperUserWarning": "Matomo 可能設定錯誤(例如 Matomo 剛從其他伺服器或網址移動)。你可以%1$s點此新增 %2$s 為 Matomo 有效域名%3$s(如果你信任它),或是%4$s點此訪問 %5$s 來安全的存取 Matomo%6$s。", - "InjectedHostWarningIntro": "你現在正從 %1$s 訪問 Matomo,但 Matomo 設定中的網址已經變更為 %2$s。", - "JavascriptDisabled": "使用 Matomo 的標準檢視時必須啟用 JavaScript。
然而,你的瀏覽器似乎已停用或不支援 JavaScript。
若要使用標準檢視,請變更你的瀏覽器選項並啟用 JavaScript,然後%1$s重試一次%2$s。
", - "JsDidntLoad": "你的瀏覽器無法載入此頁面的程式碼。", - "LeadingAnalyticsPlatformRespectsYourPrivacy": "尊重你隱私的開放式分析平台領導。", - "MacPageDown": "Fn + → 鍵", - "MacPageUp": "Fn + ← 鍵", - "MainNavigation": "主選單", - "Menu": "選單", - "MenuEntries": "選單項目", - "NoPrivilegesAskPiwikAdmin": "你目前以「%1$s」登入,但你似乎在 Matomo 中沒有被授予任何權限。%2$s要求你的管理員(點擊以寄信)%3$s給你網站的「檢視」權限。", - "NoSuchPage": "此頁面不存在", - "OneClickUpdateNotPossibleAsMultiServerEnvironment": "不支援一鍵更新因為你在數個伺服器上使用 Matomo。請從 %1$s 下載最新版本以繼續。", - "OnlyForSuperUserAccess": "這個小工具只顯示於擁有超級使用者權限使用者的預設展示板。", - "PageDownShortcutDescription": "前往網頁最下方", - "PageUpShortcutDescription": "回到網頁最上方", - "PeriodHasOnlyRawData": "似乎這一時段的報表尚未處理完成。想看看現在的狀況嗎?查看%1$s訪問紀錄%2$s或選擇不同的時段,直到有生成的報告。", - "PeriodHasOnlyRawDataNoVisitsLog": "此期間的報表似乎還沒處理好,但將會在數小時內就完成。在報表生成前,可以先選擇其他日期期間的報表。", - "PeriodRange": "範圍", - "PivotBySubtable": "此報表尚未圖形化 %1$s 以 %2$s 圖形化", - "PresetDateToday": "今天", - "PresetDateYesterday": "昨天", - "Profilable": "可紀錄的", - "QuickAccessTitle": "搜尋 %s。使用方向鍵來切換搜尋結果。快捷鍵:按「F」以搜尋。", - "QuickLinks": "快速連結", - "ReadMoreOnlineGuide": "阅读在线说明了解更多关于此主题的指引。", - "RemoveTotalsRowDataTable": "這份報表顯示了總計列%s移除總計列", - "ReportGeneratedOn": "報表產生於 %s", - "ReportGeneratedXAgo": "報表產生於 %s 之前", - "ReportLowercase": "報表", - "ReportType": "報表類型", - "ReportWithMetadata": "含中繼資料報表", - "ReportingCategoryHelpPrefix": "「%1$s → %2$s 」報告頁如何協助我?", - "RowLimit": "行數限制", - "SearchOnMatomo": "在 Matomo.org 上搜尋「%1$s」", - "SeeAvailableVersions": "查看可用版本", - "Segments": "區隔", - "SharePiwikLong": "嗨!我剛找到了一個免費的軟體:Matomo!\n\nMatomo 讓你在你的網站上免費追蹤訪客。你絕對要來試試看!", - "SharePiwikShort": "Matomo!免費網頁分析。擁有你自己的資料。", - "ShareThis": "分享這個", - "ShortcutCalendar": "開啟日曆(d 表示 Date 日期)", - "ShortcutHelp": "顯示說明", - "ShortcutRefresh": "重新整理內容", - "ShortcutSearch": "開啟搜尋(f 表示 Find 搜尋)", - "ShortcutSegmentSelector": "開啟區隔選擇", - "ShortcutWebsiteSelector": "開啟網站選擇", - "ShortcutZenMode": "Zen 模式", - "ShortcutsAvailable": "可用快捷鍵", - "ShowExportUrl": "顯示匯出網址", - "ShowJSCode": "顯示要插入的 JavaScript 程式碼", - "SkipToContent": "跳到內容", - "SoftwareSubcategoryHelp": "「軟體」部分顯示訪問者用於訪問網站的作業系統、瀏覽器和外掛程式,以便你可以優化你的網站,確保其與最流行的配置完全相容。", - "StandardReport": "標準報表", - "StartDate": "開始日期", - "SubscribeAndBecomePiwikSupporter": "繼續到安全的信用卡付款網頁(Paypal)來成為 Matomo 的支持者!", - "SupportPiwik": "支持 Matomo!", - "SupportUsOn": "贊助我們", - "SystemSummaryMysqlVersion": "MySQL 版本", - "SystemSummaryNActivatedPlugins": "%d 個外掛已啟用", - "SystemSummaryNSegments": "%1$d 個區隔", - "SystemSummaryNSegmentsWithBreakdown": "%1$d 個區隔 (已預先處理 %2$s 個,即時處理 %3$s 個)", - "SystemSummaryNWebsites": "%d 個網站", - "SystemSummaryPhpVersion": "PHP 版本", - "SystemSummaryPiwikVersion": "Matomo 版本", - "SystemSummaryWidget": "系統摘要", - "TableNoData": "此表格中無資料。", - "TechDeprecationWarning": "自 Matomo %1$s 版本起,Matomo 將停止支援 %2$s。更多資訊請%3$s看我們的部落格文章。%4$s", - "ThanksFromAllOfUs": "Matomo 全體成員感謝你!", - "ThereIsNoDataForThisReport": "此報表無資料。", - "UnFlattenDataTable": "報表目前已平面化 %s 分層顯示", - "UndoPivotBySubtable": "此報表已圖形化 %s 復原", - "ViewAllPiwikVideoTutorials": "查看 Matomo 所有的影片教學", - "VisitStatusOrdered": "已下訂", - "VisitStatusOrderedThenAbandoned": "已下訂並棄用的購物車", - "VisitTypeReturning": "回訪", - "VisitTypeReturningCustomer": "回訪顧客", - "VisitorsCategoryHelp1": "「訪問者」頁面會告訴你有關訪問者的資訊。例如,訪問者來自哪裡,他們使用什麼設備和瀏覽器以及他們通常何時訪問你的網站。從總體上瞭解你的受眾是誰,並尋找異常值以瞭解你的受眾如何增長。", - "VisitorsCategoryHelp2": "除了有關訪問者的一般資訊外,你還可以使用%1$s訪問紀錄%2$s查看每次訪問的過程。", - "VisitorsOverviewHelp": "「訪問者總覽」幫助你瞭解網站的受歡迎程度。以圖表顯示你的網站在選定時段內獲得的訪問量,以及關鍵功能(如搜尋和下載)的平均參與程度。", - "WebAnalyticsReports": "網站分析報表", - "YouAreUsingTheLatestVersion": "你正在使用 Matomo 的最新版本!", - "YourDonationWillHelp": "你的捐款會直接用於建立新功能、和改善此自由開源的分析平台。由此,社群都能助益於這個能保障隱私、且使你真正擁有個人資料的工具。" - } -} diff --git a/plugins/CoreHome/stylesheets/_donate.less b/plugins/CoreHome/stylesheets/_donate.less deleted file mode 100644 index f3765a23c52cccf6c82074e53879176eb05c7f35..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/_donate.less +++ /dev/null @@ -1,121 +0,0 @@ -.piwik-donate-call { - padding: 13px; - border: 1px solid #CCC; - border-radius: 4px; - max-width: 458px; - position: relative; -} - -#piwik-worth { - font-size: 1.2em; - font-weight: bold; - display: block; - margin: 1em 1em 0.5em 0; -} - -.piwik-donate-slider { - margin: 0 0 1em 1em; -} - -.piwik-donate-slider > .slider-range { - vertical-align: top; - position: relative; - display: inline-block; - border: 1px solid #999; - - background-color: #f7f7f7; - - border-radius: 6px; - - height: 14px; - width: 270px; - margin: 22px 8px 0 0; - cursor: pointer; -} - -.piwik-donate-slider .slider-position { - border: 1px solid #999; - background-color: #CCC; - - border-radius: 3px; - - height: 18px; - width: 10px; - - position: absolute; - top: -3px; - left: -1px; -} - -.piwik-donate-slider .slider-donate-amount { - display: inline-block; - padding: .3em .5em .3em .5em; - margin: 16px 8px 0 0; - vertical-align: top; - text-align: center; - background-color: #CCC; - color: #333; - cursor: pointer; -} - -.piwik-donate-slider .slider-smiley-face { - margin: 8px 0 8px 0; - display: inline-block; - cursor: pointer; -} - -.piwik-donate-call .donate-submit { - min-height: 55px; - position: relative; -} - -.piwik-donate-call .donate-submit input { - margin-left: 13px !important; - border-style: none !important; - box-shadow: none !important; - background-image: none; - padding: 0 !important; -} - -.piwik-donate-call .donate-submit a { - display: inline-block; - margin-left: 1.2em; - font-size: 1em; -} - -.piwik-donate-call .donate-submit a.donate-spacer { - margin-bottom:.5em; - visibility:hidden; -} - -.piwik-donate-call .donate-submit a.donate-one-time { - position: absolute; - bottom: .5em; - right: 1.2em; -} - -.piwik-donate-call > .piwik-donate-message { - margin-bottom: .5em; -} - -.piwik-donate-call > .piwik-donate-message p { - margin-left: 0; -} - -.piwik-donate-call > .form-description { - margin-top: 1.25em; -} - -.donate-form-instructions { - font-size: .8em; - margin: 0 1.25em 0 0; - color: @theme-color-text-lighter; -} - -.widget .piwik-donate-call { - border-style: none; -} - -.widget .piwik-donate-slider > .slider-range { - width: 205px; -} diff --git a/plugins/CoreHome/stylesheets/cloud.less b/plugins/CoreHome/stylesheets/cloud.less deleted file mode 100644 index 0e01ce02553330dd165e2c38b0f34a38338cdf45..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/cloud.less +++ /dev/null @@ -1,74 +0,0 @@ -@-moz-document url-prefix() { - // see bug in Firefox 30+ - // https://github.com/piwik/piwik/issues/5242 - // https://bugzilla.mozilla.org/show_bug.cgi?id=1012640 - .tagCloud + .dataTableFeatures { - clear: left; - } - .tagCloud .word { - float: left; - } -} - - -.tagCloud { - - img { - border: 0; - } - - .word a { - text-decoration: none; - - } - - .word { - padding: 5px 15px 10px 8px; - white-space: nowrap; - display: inline-block; - } - - .valueIsZero { - text-decoration: line-through; - } - - span, - span a { - color: @theme-color-link !important; - } - - span.size0, span.size0 a { - color: #1f497a !important; - font-size: 46px; - } - - span.size1, span.size1 a { - color: #24568f !important; - font-size: 40px; - } - - span.size2, span.size2 a { - color: #2962a3 !important; - font-size: 32px; - } - - span.size3, span.size3 a { - color: #255792 !important; - font-size: 28px; - } - - span.size4, span.size4 a { - color: #337acc !important; - font-size: 19px; - } - - span.size5, span.size5 a { - color: #5c95d6 !important; - font-size: 14px; - } - - span.size6, span.size6 a { - color: #5c95d6 !important; - font-size: 16px; - } -} diff --git a/plugins/CoreHome/stylesheets/color_manager.css b/plugins/CoreHome/stylesheets/color_manager.css deleted file mode 100644 index 725d3df59acaf4c390f93debab4f4cd39e74efbe..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/color_manager.css +++ /dev/null @@ -1,3 +0,0 @@ -.color-manager { - color: transparent; -} \ No newline at end of file diff --git a/plugins/CoreHome/stylesheets/coreHome.less b/plugins/CoreHome/stylesheets/coreHome.less deleted file mode 100644 index c15e107a06c48bf38be55c4d75c8d3f11c81ecd4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/coreHome.less +++ /dev/null @@ -1,377 +0,0 @@ -.home { - p { - padding-bottom: 1em; - margin-right: 1em; - margin-left: 1em; - } -} - -.card h2 { - &.card-title, - .card-title { - padding: 0 !important; - } -} - -/* Content */ -#content.home { - font-size: 14px; - display: inline-block; - width: 100%; -} - -#content.admin { - display: inline-block; - max-width: 1300px; - - > .row { - margin: 0 -0.75rem; - } -} - -/* 2 columns reports */ -#leftcolumn { - float: left; - width: 50%; -} - -#rightcolumn { - float: right; - width: 45%; -} - -/* not in widget */ -.widget #leftcolumn, .widget #rightcolumn { - float: left; - padding: 0 10px; - width: auto; -} - -.accessibility-skip-to-content { - padding: 0 0.5rem; - font-size: 14px; - position: absolute; - left: -10000px; - top: 0; - color: @theme-color-header-text; -} -.accessibility-skip-to-content:focus { - display: block; - position: absolute; - left: 180px; -} - -/* Calendar */ -div.ui-datepicker { - font-size: 62.5%; -} - -.ui-datepicker-current-period a, .ui-datepicker-current-period a:link, .ui-datepicker-current-period a:visited { - border: 1px solid #2E85FF; - color: #2E85FF; -} - -#otherPeriods a { - text-decoration: none; -} - -#otherPeriods a:hover { - text-decoration: underline; -} - -#currentPeriod { - border-bottom: 1px dotted #520202; -} - -.hoverPeriod { - cursor: pointer; - font-weight: bold; - border-bottom: 1px solid #520202; -} - -#calendarRangeTo { - margin-left: 175px; -} - -#calendarRangeFrom { - float: left; -} - -#inputCalendarFrom, #inputCalendarTo { - margin-left: 10px; - width: 95px; - padding: 5px 10px; - font-size: 12px; - line-height: 12px; - border: 0; -} - -#calendarApply { - margin-top: 10px; -} - -#invalidDateRange { - display: none; -} - -.reporting-page { - .sparklines { - max-width: 1250px; - } -} - -div .sparkline { - float: left; - clear: both; - padding-bottom: 1px; - margin-top: 10px; -} - -.sparkline img { - vertical-align: middle; - padding-right: 10px; - margin-top: 0; -} - -div.pk-emptyGraph { - padding-top: 20px; - padding-bottom: 10px; - text-align: center; - font-style: italic; -} - -/** - * Popover - * @see popover.js - */ -#Piwik_Popover { - min-height: 0 !important; -} -#Piwik_Popover .alert { - margin: 20px; -} -.Piwik_Popover_Loading_Name { - padding: 50px 0 65px 0; - font-size: 16px; - line-height: 20px; - font-weight: normal; - text-align: center; - background: url(plugins/Morpheus/images/loading-blue.gif) no-repeat center 20px; -} - -.Piwik_Popover_Loading_NameWithSubject { - padding-bottom: 30px; -} - -.Piwik_Popover_Loading_Subject { - padding: 0 70px 55px 70px; - color: @theme-color-link !important; - text-align: center; - font-size: 14px; -} - -.Piwik_Popover_Error { - padding: 50px 20px 65px 20px; - text-align: center; -} - -.Piwik_Popover_Error_Title { - font-size: 16px; -} - -.Piwik_Popover_Error_Title span { - font-weight: normal; - font-size: 16px; -} - -.Piwik_Popover_Error_Message { - padding: 20px 0 0 0; - font-size: 13px; -} - -a.Piwik_Popover_Error_Back { - display: block; - margin: 20px 0 0 0; - font-size: 13px; - text-decoration: underline; -} - -#alert.ui-confirm input { - display: block; - margin: 10px auto 5px !important; -} - -.header_full #updateCheckLinkContainer { - margin-top: -2px; -} - -@-moz-document url-prefix() { - .header_full #updateCheckLinkContainer { - margin-top: -3px; - } -} - -/* Used to link within content text, without adding visual clutter */ -.linkContent { color:#333; text-decoration:none} -.linkContent:hover { text-decoration:underline;} - -.ui-confirm h2 { - border-bottom: 0 none; - margin:0; - font-size:18px; -} - -.systemSummary { - .icon { - width: 16px; - display: inline-block; - margin-right: 4px; - } - .icon-user { - font-size: 11px; - } - - > div { - margin-bottom: 2px; - } -} - -#shortcuthelp { - - dl { - margin: 20px 20px 0 20px; - font-size: 15px; - overflow: hidden; - } - dt { - clear: both; - float: left; - width: 60px; - text-align: right; - margin-top: 5px; - margin-bottom: 5px; - margin-right: 20px; - kbd { - display: inline-block; - font-weight: bolder; - border: 1px solid #000; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - box-sizing: border-box; - padding: 0 5px; - } - } - - dd { - float: left; - margin-top: 5px; - } -} - -.copyToClipboardIcon { - font-family: 'matomo' !important; - font-style: normal; - font-variant: normal; - text-transform: none; - font-size: 1.6em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - display: block; - margin-left: 4px; - float: left; - width: 1.1em; -} - -.copyToClipboardIcon:before { - content: "\e905"; -} - -.copyToClipboardIconCheck { - font-family: 'matomo' !important; - font-style: normal; - font-weight: 400; - font-variant: normal; - text-transform: none; - font-size: 1.6em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - display: block; - margin-left: 4px; - float: left; - width: 1.1em; -} - -.copyToClipboardIconCheck:before { - content: "\e906"; - color: #43a047 !important; -} - -.copyToClipboardButton { - position: relative; - float: right; - margin-right: 0.2em; - border-radius: 100%; - min-width: 3.0em; - max-width: 3.0em; - height: 3.0em; - overflow: hidden; - background: #fefefe; - padding-left: 4px; - padding-right: 4px; - cursor: pointer; - transition: max-width .5s ease-out 2s, border-radius 2s ease-out 2s; -} - -.copyToClipboardButton:focus { - background: #fefefe; -} - -.copyToClipboardButton:hover { - transition: max-width .5s ease-out 0s, border-radius 0.1s; - max-width: 18em; - border-radius: 5px; -} - -.copyToClipboardPositionDiv { - position: absolute; - right: .5em; - top: .5em; -} - -.copyToClipboardCopiedDiv { - font-size: 0.8em; - display: none; - position: relative; - float:right; - top: 0.8em; - margin-right: 1em; - width: auto; - padding: 0.5em 1em; - border-radius: 5px; - background: #fefefe; - text-align: center; - vertical-align: middle; -} - -.copyToClipboardButton:hover span { - overflow: visible; -} - -.copyToClipboardButton span { - display: block; - float: left; - margin-left: 3em; - white-space: nowrap; - overflow: hidden; - position: relative; - width: calc(100% - 1.1em); - text-align:left; - text-transform: uppercase; - margin-top: -1.5em; - margin-right: -1.5em; -} - -.copyToClipboardWrapper { - position: relative; -} diff --git a/plugins/CoreHome/stylesheets/dataTable.less b/plugins/CoreHome/stylesheets/dataTable.less deleted file mode 100644 index 2478032b757b689cc94eb67513c040964a40bc15..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "dataTable/_dataTable.less"; -@import "dataTable/_limitSelection.less"; -@import "dataTable/_reportDocumentation.less"; -@import "dataTable/_rowActions.less"; -@import "dataTable/_subDataTable.less"; -@import "dataTable/_tableConfiguration.less"; -@import "dataTable/_entityTable.less"; -@import "dataTable/_comparisonsTable.less"; \ No newline at end of file diff --git a/plugins/CoreHome/stylesheets/dataTable/_comparisonsTable.less b/plugins/CoreHome/stylesheets/dataTable/_comparisonsTable.less deleted file mode 100644 index 3350c258802418f5f0487e82060c139da2d844a9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_comparisonsTable.less +++ /dev/null @@ -1,69 +0,0 @@ -.theWidgetContent .card .card-content table.dataTable, table.dataTable { - tr.comparePeriod, tr.comparisonRow { - > td:first-child { - padding-left: 45px; - } - } - - tr.parentComparisonRow { - .dataTableRowActions { - display: none !important; - } - - > td:not(.label) > * { - visibility: hidden; - } - } - - tr.comparePeriod { - .dataTableRowActions { - display: none !important; - } - - td.label { - font-weight: bold; - color: @color-silver-l60; - } - } - - td.label .prefix-numeral { - display: inline-block; - width: 20px; - .font-default(13px, 18px); - vertical-align: text-bottom; - } - - .totalsRow,.summaryRow { - td.label .prefix-numeral { - visibility: hidden; - } - } - - img { - margin-left: 1px; - } -} - -tr.comparePeriod, tr.comparisonRow { - &.level0 td.label { - padding-left: 44px !important; - } - - &.level1 td.label { - padding-left: 68px !important; - } - - &.level2 td.label { - padding-left: 90px !important; - } -} - -tr.parentComparisonRow { - &.level1 td.label { - padding-left: 44px !important; - } - - &.level2 td.label { - padding-left: 68px !important; - } -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less b/plugins/CoreHome/stylesheets/dataTable/_dataTable.less deleted file mode 100644 index 4ba430c8d16a583edd8956c5cd529cef993e9fc1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less +++ /dev/null @@ -1,732 +0,0 @@ -/* main data table */ -.dataTable { - border: 0; - width: 100%; - padding: 0; - border-spacing: 0; - border-collapse: separate; - margin: 0; - - td { - border-radius: 1px; - } - - td .ratio { - color: #999999; - display: inline-block; - visibility: hidden; - text-align: right; - margin-right: 4px; - font-weight: normal; - .font-default(13px, 18px); - vertical-align: text-bottom; - } - - thead { - position: sticky; - position: -webkit-sticky; - top: 0; - z-index: 10; - - &.with-z-index { - z-index: 150; - } - } - - td.highlight > .ratio { - visibility: visible; - } -} - -table.dataTable .totalsRow { - font-weight: bold; - .ratio { - display: none; - } -} - -table.dataTable td.label, -table.subDataTable td.label { - width: 100%; - white-space: nowrap; -} - -table.dataTable img, -table.subDataTable img { - vertical-align: text-bottom; -} - -table.dataTable img { - border: 0; - margin-right: 1em; - margin-left: 0; -} - -table.dataTable tr td .icon-outlink { - color: #aaa; - margin-right: 0.5em; - vertical-align: bottom; - .font-default(13px, 18px); - padding-left: 1px; - display: inline-block; -} - -table.dataTable tr.subDataTable { - cursor: pointer; - - td.label span.label { - word-break: break-all; - overflow: hidden; - text-overflow: ellipsis; - width: inherit; - display: inline-block; - vertical-align: text-bottom; - } -} - -table.dataTable th { - margin: 0; - text-align: left; - padding: 6px 6px 6px 12px; - font-size: 12px; - font-weight: normal; - vertical-align: top; -} - -// for dataTables in exported widgets ( we do not want to apply this for widgets in dashboard ) -body>.widget table.dataTable { - th { - background: @theme-color-background-base; - } -} - -// for dataTables in report pages (not for widgets in the dashboard) -.theWidgetContent .card .card-content table.dataTable, -table.dataTable, -table.subDataTable { - - th { - background: @theme-color-background-base !important; - border-radius: 0; - color: @theme-color-text; - - &:first-child { - padding-left: 20px; - } - &:last-child { - padding-right: 20px; - } - } - - td { - &:first-child { - padding-left: 20px; - } - - &:last-child { - padding-right: 20px; - } - } -} - -table.dataTable th.sortable { - cursor: pointer; -} - -table.dataTable th.columnSorted { - font-weight: bold; -} - -table.dataTable td { - padding: 5px 0 5px 12px; - background: @theme-color-background-base; - z-index: 99; -} - -table.dataTable td, -table.dataTable td a { - margin: 0; - text-decoration: none; - color: @theme-color-text-light; -} - -td.clean { - background-color: @theme-color-background-base; -} - -table.dataTable td.column { - white-space: nowrap; -} - -.dataTable tr.highlight td, -.dataTable_row-highlight td { - font-weight: bold; -} - -tr:nth-last-child(1 of .dataTable_row-group) td { - border-bottom: 3px solid @theme-color-background-tinyContrast !important; -} - -table.dataTable th.label, -table.dataTable td.label, -table.subActionsDataTable td.label, -table.actionsDataTable td.label { - border-top: 0; - border-left: 0; - left: 0; - z-index: 1; - background-clip: padding-box; - - &.first { - position: sticky; position: -webkit-sticky; - } -} - -.dataTableActions table.dataTable th.label { - /* Ensures tables have enough space to display subtable on click, and prevent the jumping effect */ - min-width: 250px; -} - -table.dataTable span.label.highlighted { - font-style: italic; -} - -.widget div.dataTable:not(.isComparing) table.dataTable tbody > tr > td:not(.cellSubDataTable):first-child { - padding-left: 20px; -} - -/* the cell containing the subdatatable */ -table.dataTable tr td.cellSubDataTable { - &, .widget & { - margin: 0; - border-left: 0; - padding: 6px 20px 6px; - } -} - -.cellSubDataTable > .dataTable { - padding: 6px 0 0; -} - -/* A link in a column in the DataTable */ -table.dataTable td #urlLink { - display: none; -} - -.subDataTable > .dataTableWrapper { - width: 95%; -} - -.sortIconContainer { - float: left; - position: relative; -} - -.sortIcon { - margin: 0; - position: absolute; -} - -.datatableHeaderMessage, .datatableFooterMessage { - color: #888; - text-align: left; - margin: 10px; - margin-left: 1px; -} - -.dataTablePages { - margin: 10px; - color: @theme-color-text; - font-weight: normal; - .font-default(13px, 14px); -} - -.dataTableSearchInput { - display: inline-block; - opacity: 0; - color: #adadad !important; - min-height: 30px !important; - padding-left: 25px !important; - transition: opacity 0.3s ease !important; - box-shadow: 0 0 !important; - visibility: hidden; - height: 1rem !important; - width: calc(~'100% - 25px') !important; -} - -.searchAction:hover { - .dataTableSearchInput { - &:hover, - &:focus { - color: #333 !important; - } - } -} - -.searchAction { - transition: width 0.3s ease !important; - text-align: left !important; - padding-left: 10px; - position: relative; - cursor: pointer; - - .icon-search { - display: inline-block; - cursor: pointer; - z-index: 1; - position: absolute; - top: 8px; - left: 8px; - } - - .icon-close { - display: none; - } -} - -.searchAction.searchActive { - cursor: text; - - .dataTableSearchInput { - visibility: visible; - opacity: 1; - } - - .icon-close { - display: inline-block; - font-size: 10px; - cursor: pointer; - position: absolute; - top: 12px; - right: 10px; - color: #adadad !important; - &:hover, - &:focus { - color: #333 !important; - } - } - .icon-search { - cursor: pointer; - color: #adadad !important; - &:hover, - &:focus { - color: #333 !important; - } - } -} - -.dataTableNext, -.dataTablePrevious { - font-size: 12px; - color: #184A83; - cursor: pointer; - visibility: hidden; - text-decoration: underline; - &:hover { - text-decoration: underline; - } - @media print{ - display: none; - } -} - -.datatableRelatedReports { - color: #808080; - font-size: 12px; - padding-bottom: 5px; - margin-top: 6px; - @media print{ - display: none; - } - - span { - color: @theme-color-link; - cursor: pointer; - font-weight: normal; - text-decoration: underline; - - &:hover { - text-decoration: underline; - } - } -} - -.dataTableFeatures { - text-align: center; - - &.hasEvolution { - .dataTableFooterIcons { - margin-top: 17px; - } - } -} - -.dataTablePaginationControl { - margin: 5px 0 !important; -} - -.dataTableFeatures .loadingPiwik { - font-size: 13px; - display: inline-block; - padding-bottom: 13px; -} - -.dataTable .loadingPiwikBelow { - padding-bottom: 5px; - display: block; - text-align: center; -} - -.dataTable.isComparingBarViz { - padding-left: 10px; - padding-top: 10px; - position: relative; - left: -10px; - top: -10px; -} - -.widget .dataTableFeatures { - border-bottom-style: none !important; -} - - -// customizing footer appearance for row evolution graph -.ui-dialog .dataTableVizEvolution { - - .dataTableFooterIcons { - display: block; - } - - .dataTableFeatures { - border-bottom-style: none !important; - margin-top: 0 !important; - } -} - -.dataTableFooterWrap { - position: relative; - float: left; - margin-left: 10px; -} - -.dataTableFooterWrap select { - float: left; - margin: 1px 0 1px 10px; -} - -.dataTableFooterIcons img { - filter: @theme-filter-on-illustration; -} - -.tableIcon { - text-decoration: none; - - &:hover { - text-decoration: none; - } - - &.activeIcon { - background-color: @theme-color-background-tinyContrast; - } -} - -.tableIconsGroup > span > span { - position:relative; - float:left; -} - -.dataTableFooterActiveItem { - display: none; - position: absolute; - top: -6px; - left: 0; -} - - -.exportToFormatItems img { - vertical-align: middle; - margin: -4px -3px -2px 2px; -} - -.tableIconsGroup { - float: left; - padding-right: 4px; -} - -.tableIconsGroup .tableIcon span { - margin-right: 5px; - margin-left: 5px; -} - -.tableIconsGroup img { - vertical-align: bottom; -} - -.tableIconsGroupActive { - display: block; - float: left; - background: #dcdacf; - border-radius: 2px; -} - -.tableIconsGroupActive .tableIcon { - background: none; -} - -.tableIconsGroupActive .tableIcon:hover { - background: #e9e8e1; -} - -.dataTableSpacer { - clear: both; -} - -/* Actions table */ -.dataTableActions table.dataTable tr td.label { - background-image: none; -} - -/* levels higher than 4 have a default padding left */ -.actionsDataTable tr td.label { - padding-left: 7em; -} - -tr.level0 td.label { - padding-left: 20px !important; -} - -.widget { - div.dataTable:not(.isComparing) table.dataTable tr.level0 td.label, - div.dataTable:not(.isComparing) table.dataTable th { - padding-left: 20px !important; - } -} - -tr.level1 td.label { - padding-left: 2.5em !important; - - .widget & { - padding-left: 28px !important; - } -} - -tr.level2 td.label { - padding-left: 3.5em !important; -} - -tr.level3 td.label { - padding-left: 4.5em !important; -} - -tr.level4 td.label { - padding-left: 5em !important; -} -tr.level5 td.label { - padding-left: 5.5em !important; -} -tr.level6 td.label { - padding-left: 6em !important; -} -tr.level7 td.label { - padding-left: 6.5em !important; -} -tr.level8 td.label { - padding-left: 7em !important; -} -tr.level9 td.label { - padding-left: 7.5em !important; -} -tr.level10 td.label { - padding-left: 8em !important; -} -tr.level11 td.label { - padding-left: 8.5em !important; -} -tr.level12 td.label { - padding-left: 9em !important; -} - -table.dataTable td.label img { - max-height: 16px; -} - -.pk-emptyDataTable { - padding-top: 20px; - padding-bottom: 10px; - padding-left: 1px; -} - -.widget .pk-emptyDataTable { - padding-left: 0; - padding-top: 33px; - text-align: center; -} - -.helpDate { - color: #777777; - font-size: 11px; - font-style: italic; - padding: 4px; - text-align: right; - display: block; -} - -body .ui-tooltip.rowActionTooltip { - font-size: 11px; - padding: 3px 5px 3px 6px; -} - -table.dataTable span.cell-tooltip { - cursor: default; -} - -.dataTable .jqplot-graph { - > div { - position: relative; - } -} - -td.cellSubDataTable .loadingPiwik { - padding:0; -} - -.dataTable .searchReset { - position:relative; - - img { - position: absolute; - top: 4px; - left: -15px; - cursor: pointer; - display: inline; - } -} - -.dataTableControls { - text-align: left; - padding-left: 0 !important; - - &.col { - padding-right: 0; - } - - .dropdown-content { - a { - &:hover { - text-decoration: none; - } - } - } - - .dataTableAction { - border: 0; - border: none; - border-radius: 2px; - display: inline-block; - height: 36px; - line-height: 36px; - outline: 0; - width: 36px; - text-transform: uppercase; - vertical-align: middle; - text-decoration: none !important; - text-align: center; - font-size: 16px; - color: @theme-color-brand !important; - opacity: 0.7; - &:hover { - color: @theme-color-brand !important; - opacity: 1; - background-color: @theme-color-background-base; - text-decoration: none !important; - } - - .icon-export { - margin-top: 8px; - display: block; - } - - .icon-more-verti { - font-size: 18px; - } - - .periodName { - padding-left:8px; - padding-right:8px; - font-size:16px; - text-transform:capitalize; - } - } - - .activatePeriodsSelection { - width:auto; - text-align:left; - padding-left:8px; - } -} -.widgetContent { - div.dataTableScroller { - overflow-x: scroll; - } -} -.dataTableHeaderControls { - margin-top: -10px; - margin-bottom: 5px; - - .widgetpreview-preview .widget &, - #dashboardWidgetsArea .widget &, - .dataTable.isDataTableEmpty:not(.hasSearchKeyword) & { - display: none; - } - - .widgetized .dataTable.dataTableVizHtmlTable .dataTableWrapper & { - margin-top: 0; - } -} - -.theWidgetContent .card .card-content, table.dataTable { - div.dataTableScroller { - margin-left: -20px; - width: ~"calc(100% + 40px)"; - } -} - -#dashboard .dataTableFooterNavigation > .row { - margin-left: 0; - margin-right: 0; -} - -@media only screen and (min-width: 993px) { - #dashboardWidgetsArea .widget, - .theWidgetContent .isDataTableEmpty { - &:hover { - .limitSelection, - .dataTableControls .dataTableAction { - visibility: visible; - } - } - .limitSelection, - .dataTableControls .dataTableAction { - visibility: hidden; - - &.forceActionVisible { - visibility: visible; - } - } - } - .theWidgetContent .isDataTableEmpty.hasSearchKeyword { - .limitSelection, - .dataTableControls .dataTableAction { - visibility: visible; - } - } -} - -@media only screen and (max-width: 700px) { - table.dataTable th.label, - table.dataTable td.label, - table.subActionsDataTable td.label, - table.actionsDataTable td.label { - position: static !important; - } -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_entityTable.less b/plugins/CoreHome/stylesheets/dataTable/_entityTable.less deleted file mode 100644 index 17710946ff403adbf7bb928570384fa2bee73401..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_entityTable.less +++ /dev/null @@ -1,179 +0,0 @@ -/* main data table */ -table.entityTable { - - thead { - tr { - th { - &:first-child { - padding-left: 20px !important; - } - - text-transform: none; - background: @theme-color-background-base; - vertical-align: middle !important; - text-align: left !important; - font-size: 15px; - white-space: nowrap; - padding: 22px 16px !important; - margin: 0; - font-weight: normal; - border-radius: 0; - color: @theme-color-text-contrast; - } - } - } - - tbody { - tr { - &:hover { - td { - background-color: @theme-color-background-tinyContrast; - } - } - &.highlighted td { - background-color: #ECF9DD; - } - - td { - &:first-child { - padding-left: 20px !important; - } - - color: @theme-color-text; - font-size: 13px; - line-height: 16px; - background-color: @theme-color-background-contrast; - vertical-align: top !important; - padding: 16px; - border-bottom: 1px solid @theme-color-background-tinyContrast !important; - border-radius: 0; - } - } - } - - th.entityTable_Numeric { - text-align: right !important; - } - td.entityTable_Numeric { - text-align: right; - font-variant-numeric: tabular-nums; - } - - .entityTable_Sparkline { - padding: 0; - width: 100px; - } -} - -.entityTable_StarCell, -table.entityTable tbody tr .entityTable_StarCell { - width: 40px; - padding-right: 0; -} - -.entityTable_Filler, -table.entityTable tbody tr .entityTable_Filler { - padding: 0; -} - -.entityTable_ActionCell, -table.entityTable tbody tr .entityTable_ActionCell { - padding: 0 16px; -} - -.entityTable_ActionCell-1, -table.entityTable tbody tr .entityTable_ActionCell-1 { - width: 80px; -} - -.entityTable_ActionCell-3, -table.entityTable tbody tr .entityTable_ActionCell-3 { - width: 170px; -} - -.table-action { - padding: 16px; - height: auto; - margin: 0; - line-height: 1; - background-color: transparent; - border: 0; - color: inherit !important; - display: inline; - - a&[class^="icon-"], a&[class*=" icon-"] { - text-decoration: none!important; - } - - &:focus, - &:hover { - background-color: @theme-color-background-base; - box-shadow: 0 1px 2px 0 rgba(0,0,0,0.16), 0 1px 5px 0 rgba(0,0,0,0.12); - cursor: pointer; - } - - &[data-state="disabled"] { - opacity: 0.2; - cursor: not-allowed; - } - - .entityTable_ActionCell & { - display: inline-block; - } -} - -.card .tableActionBar { - a, button { - background-color: @theme-color-background-contrast; - &:focus { - background-color: @theme-color-background-contrast; - } - } -} - -.tableFooterLabel { - margin-bottom: 16px; - font-style: italic; -} - -.tableActionBar { - a, - button { - height: 36px; - line-height: 36px; - box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12) !important; - color: @theme-color-text; - background-image: none !important; - font-size: 12px; - cursor: pointer; - text-decoration: none; - background-color: inherit; - text-align: center; - letter-spacing: .5px; - transition: .2s ease-out; - border: none; - border-radius: 3px; - display: inline-block; - padding: 0 2rem; - margin-left: 16px; - text-transform: uppercase; - vertical-align: middle; - -webkit-tap-highlight-color: transparent; - - &:hover { - text-decoration: none; - } - } - - button:disabled, - button[disabled] { - background-color: @theme-color-background-disabled !important; - color: @theme-color-text-lighter !important; - } - - button:first-child:not(:disabled):not([disabled]), - a:first-child { - background-color: @theme-color-brand !important; - color: @color-white; - } -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_limitSelection.less b/plugins/CoreHome/stylesheets/dataTable/_limitSelection.less deleted file mode 100644 index 6173036edee6f79dc85fb8e2d794d5389953b9df..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_limitSelection.less +++ /dev/null @@ -1,131 +0,0 @@ -.limitSelection { - text-align: right; - position: relative; - margin-left: 5px; - min-height: 20px; - padding-top: 4px; - vertical-align: top; - padding-right: 0 !important; - padding-left: 0 !important; -} - -.limitSelection.hidden { - display: none; -} - -.limitSelection > div { - .select-wrapper:hover { - background-color: #edecec; - border-radius: 2px; - color: @theme-color-brand !important; - cursor: pointer; - - .inDarkMode({ - background-color: @theme-color-background-tinyContrast; - }); - - input.select-dropdown, - span.caret { - color: @theme-color-brand !important; - opacity: 1; - &:hover { - color: @theme-color-brand !important; - opacity: 1; - } - } - - input.select-dropdown { - &:hover { - border-color: @theme-color-brand !important; - } - } - } - - .select-wrapper { - padding-right: 24px; - - input.select-dropdown { - height: 36px; - line-height: 30px; - font-size: 16px; - margin-bottom: 0; - width: 100%; - padding-right: 24px; - text-align: right; - overflow: hidden; - border: 0; - transition: all 0s; - color: @theme-color-brand !important; - opacity: 0.7; - &:hover { - color: @theme-color-brand !important; - opacity: 1; - border-color: @theme-color-brand !important; - } - } - - svg.caret { - fill: @theme-color-brand !important; - opacity: 0.7; - &:hover { - fill: @theme-color-brand !important; - opacity: 1; - } - } - } - - margin-top: 0; - margin-bottom: 0; - display: inline-block; - width: 56px; - height: 36px; -} - -.widgetpreview-preview, -#dashboardWidgetsArea { - .limitSelection .select-wrapper span.caret { - top: 9px; - } -} -body > .widget { - .limitSelection .select-wrapper span.caret { - top: 9px; - } -} - -.limitSelection.disabled > div { - opacity: 0.5; - cursor: not-allowed; - filter: Alpha(opacity=50); -} - -.limitSelection.visible > div { - background-image: url(plugins/Morpheus/images/sort_subtable_asc_light.png) -} - -.limitSelection > ul { - margin-top: 1px; - overflow: visible; -} - -.limitSelection > ul > li { - cursor: pointer; - padding: 0 10px 0 4px; - font-size: 1em; - font-weight: bold; - height: 24px; - margin-top: -48px; - background-color: @theme-color-background-contrast; - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; - vertical-align: middle; - text-align: right; -} - -.limitSelection > ul > li.last { - border-top: 1px solid #ccc; -} - -.limitSelection > ul > li:hover { - background-color: @theme-color-background-tinyContrast; -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_reportDocumentation.less b/plugins/CoreHome/stylesheets/dataTable/_reportDocumentation.less deleted file mode 100644 index eee9175bfec1df487c3f6b100b7c84fc02dfa85f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_reportDocumentation.less +++ /dev/null @@ -1,41 +0,0 @@ -/* Documentation */ -table.dataTable th .columnDocumentation { - display: none; - width: 165px; - text-align: left; - background: #f7f7f7; - color: @theme-color-text-light; - font-size: 11px; - font-weight: normal; - border: 1px solid #e4e5e4; - padding: 5px 10px 6px 10px; - border-radius: 4px; - z-index: 150; - position: absolute; - box-shadow: 0 0 4px #e4e5e4; - cursor: default; -} - -table.dataTable th .columnDocumentationTitle { - line-height: 14px; - padding: 3px 0; - font-weight: bold; -} - -.reportDocumentation { - display: none; - background: #f7f7f7; - font-size: 12px; - font-weight: normal; - border: 1px solid #e4e5e4; - margin: 0 0 10px 0; - padding: 4px 4px 4px 0; - border-radius: 2px; -} - -.reportDocumentation p { - padding: 5px 10px 6px 10px; - margin: 0; - color: @theme-color-text-light; - font-size: 12px; -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_rowActions.less b/plugins/CoreHome/stylesheets/dataTable/_rowActions.less deleted file mode 100644 index 8ebe3bb213e5479692cfc4dbab8b278d5aedeb73..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_rowActions.less +++ /dev/null @@ -1,55 +0,0 @@ -.dataTableRowActions { - background: none !important; -} - -table.dataTable .dataTableRowActions { - position: absolute; - display: none; - overflow: hidden; - margin-top: -6px; - background-color: inherit !important; - z-index: 1000; /* Work around FF bug to make sure it displays over ellipsis */ -} - -table.dataTable .dataTableRowActions a { - display: block; - float: left; - padding: 6px 4px 6px 0; - margin: 0; - width: auto!important; - text-decoration: none; - - &:hover { - text-decoration: none; - } - - .rowActionIcon { - font-size: 19px; - color: @theme-color-brand !important; - opacity: 0.6; - &:hover { - opacity: 1; - } - } - @media print{ - display: none; - } -} - -table.dataTable .dataTableRowActions a.leftmost { - padding-left: 4px; -} - -table.dataTable .dataTableRowActions a.rightmost { - padding-right: 8px; -} - -table.dataTable .dataTableRowActions a img { - margin: 0; - padding: 0; - border: 0; - width: 20px; - max-width: 20px; - height: 17px; - max-height: 17px; -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_subDataTable.less b/plugins/CoreHome/stylesheets/dataTable/_subDataTable.less deleted file mode 100644 index 6c31bf7be7704e5296444c119d7e053097c3ca4a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_subDataTable.less +++ /dev/null @@ -1,31 +0,0 @@ -/* SUBDATATABLE */ -/* a datatable inside another datatable */ -table.subDataTable thead th { - font-weight: normal; - font-size: 12px; - text-align: left; - border: 0; -} - -table.subDataTable td.label { - background-image: none; -} - -table.subDataTable td { - border: 0; - border-bottom: 1px solid @theme-color-background-tinyContrast; -} - -table.subDataTable td, table.subDataTable td a { - color: #615B53; -} - -table.subDataTable td.label, table.subDataTable td.column { - color: #2D2A27; -} - -/* are the following two supposed to be together? */ -.subDataTable.dataTableFeatures { - padding-top: 0; - padding-bottom: 5px; -} diff --git a/plugins/CoreHome/stylesheets/dataTable/_tableConfiguration.less b/plugins/CoreHome/stylesheets/dataTable/_tableConfiguration.less deleted file mode 100644 index b66addaf62e0f998291d9cb1d974866febd803d9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/dataTable/_tableConfiguration.less +++ /dev/null @@ -1,25 +0,0 @@ -a.dropdownConfigureIcon.highlighted { - color: @theme-color-brand; -} - - -.tableConfiguration ul.open { - display: block; -} - -.tableConfiguration div.configItem { - cursor: pointer; - padding: 16px; - line-height: 15px; - color: @theme-color-text-light; -} - -.tableConfiguration div.configItem:hover { - background-color: @theme-color-background-tinyContrast; -} - -.tableConfiguration div.configItem span.action { - color: @theme-color-link; - padding-top: 8px; - display: inline-block; -} diff --git a/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css b/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css deleted file mode 100644 index b1b59a06e66d2294b8108418dbd408065746dad8..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css +++ /dev/null @@ -1,70 +0,0 @@ -/* Autocomplete ----------------------------------- */ -.ui-autocomplete { - position: absolute; - cursor: default; -} - -.ui-autocomplete-loading { - background: white; -} - -/* workarounds */ -* html .ui-autocomplete { - /* without this, the menu expands to 100% in IE6 */ - width: 1px; -} - -/* Menu ----------------------------------- */ -.ui-menu { - list-style: none; - padding: 6px; - margin: 0; - display: block; - position: relative; - font-family: Arial, Verdana, Helvetica, sans-serif; -} - -.ui-menu .ui-menu { - margin-top: -3px; - margin-bottom: 8px; -} - -.ui-menu .ui-menu-item { - line-height: 18px; - padding: 0; - height: auto; - display: block; - text-decoration: none; - white-space: nowrap; -} - -.ui-menu .ui-menu-item a { - line-height: 18px; - color: #255792; - font-size: 12px; - padding: 0 5px 0 5px; - position: relative; -} - -.ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: 0; -} - -.ui-widget-content { - border: 0; -} - -.ui-corner-all { - border-radius: 0; -} - -.ui-menu .ui-menu-item a.ui-state-focus { - background: #ebeae6; - border: 0; - border-radius: 0; -} - diff --git a/plugins/CoreHome/stylesheets/layout.less b/plugins/CoreHome/stylesheets/layout.less deleted file mode 100644 index 60e224d533affb5e904a88614e3e806e23c2f015..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/layout.less +++ /dev/null @@ -1,680 +0,0 @@ -@_layout-pageWrap-margin: 18px; -@top-menu-nav-color: @theme-color-focus-ring-alternative; - -.card-content > .row:last-child { - margin-bottom: 0; -} - -ul.browser-default { - list-style-type: disc; - li { - margin-left: 20px; - list-style-type: disc; - } -} - -#root nav { - background-color: @theme-color-header-background; - box-shadow: none; - - a:focus-visible, - button:focus-visible { - outline-color: @theme-color-focus-ring-alternative; - } - - .nav-wrapper { - border-bottom: 1px solid @theme-color-border-alternative; - } - - .brand-logo { - font-size: 30px; - } - - .activateLeftMenu { - float: left; - } - - .activateTopMenu { - float: right; - } - - .icon-more-verti, - .icon-menu-hamburger { - // nav{line-height:56px} - {padding:10+10px} - font-size: 36px; - padding: 8px 10px 10px; - display: inline-block; - cursor: pointer; - color: @theme-color-header-text; - } - - @media only screen and (min-width: 601px) { - .icon-more-verti, - .icon-menu-hamburger { - // nav{line-height:64px} - {padding:10+10px} - font-size: 48px; - } - } - - .side-nav { - .languageSelection { - display: block !important; - color: #444; - padding: 0 30px; - .items { - margin-left: 0 !important; - .item { - height: auto; - } - } - } - } - - ul.right.hide-on-med-and-down { - margin-right: 4px; - - .navbar-icon, - .navbar-label { - padding: 8px; - position: relative; - z-index: 1; - border-radius: 8px; - display: inline-flex; - align-items: center; - vertical-align: middle; - line-height: 1; - } - - > li[role="menuitem"].active { - background: transparent; - - > a { - background: transparent; - } - } - - > li[role="menuitem"] a { - background: transparent; - - &:hover, - &:focus, - &:focus-visible { - background: transparent; - outline: none; - } - - &:hover .navbar-icon { - &::after { - // contrast + opacity to create an effect that work in light and dark mode, with our without white-label customization - background: light-dark(black, white); - } - } - - &:hover .navbar-label, - &:focus-visible .navbar-label { - color: @top-menu-nav-color; - } - - &:focus-visible .navbar-icon, - &:focus-visible .navbar-label { - outline: 2px solid @theme-color-focus-ring-alternative; - outline-offset: -2px; - } - } - } - - ul:not(#mobile-top-menu) { - a { - color: @theme-color-header-text; - } - - .languageSelection { - .title { - color: @theme-color-header-text; - font-size: 14px; - } - } - } - - ul a { - text-decoration: none; - font-size: 14px; - padding: 0; - - &:hover { - text-decoration: none; - } - } - .navbar-icon { - font-size: 16px; - /* Hover & active background */ - &::after { - content: ''; - position: absolute; - inset: 0; - z-index: -1; - border-radius: 8px; - background: transparent; - opacity: 0.051; - } - } -} - - .navbar { - a { - text-decoration: none; - &:hover, &:focus { - text-decoration: none; - } - } - } - - // start #secondNavBar fadeInLeft animation - @-webkit-keyframes fadeInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-20px); - } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - } - } - @keyframes fadeInLeft { - 0% { - opacity: 0; - transform: translateX(-20px); - } - 100% { - opacity: 1; - transform: translateX(0); - } - } - // end #secondNavBar fadeInLeft animation - -#root { - .pageWrap { - width: calc(~'100% - @{_layout-pageWrap-margin}'); - height: fit-content; - padding-left: 9px; - padding-right: 9px; - margin-left: 9px; - margin-right: 9px; - } - - .layoutWithSidebar { - display: flex; - flex-direction: column; - width: 100%; - } - - & .top_controls { - height: auto; - - .zenModeToggle { - display: inline-flex; - align-items: center; - justify-content: center; - min-width: 32px; - min-height: 32px; - - cursor: pointer; - - @media screen and (max-width: 600px) { - display: none; - } - } - - @media all and (max-width: 600px) { - .piwikSelector { - > a.title { - max-width: none; - } - } - } - - @media print { - .quick-access { - display: none !important; - } - } - } - - @media only screen and (min-width: 993px) { - .layoutWithSidebar--hasSidebar { - display: flex; - flex-direction: row; - align-items: stretch; - - #secondNavBar { - flex: 0 0 224px; - width: 224px; - min-height: 100vh; - background-color: @theme-color-menu-contrast-background; - box-shadow: none !important; - padding: 24px 12px; - } - - .layoutWithSidebarContent { - flex: 1 1 auto; - min-width: 0; - } - } - - ~ .drag-target { - display: none !important; - } - } - - @media all and (max-width: 992px) { - #secondNavBar { - width: 0 !important; - min-height: 0; - .quick-access { - margin-left: 16px; - z-index: 1000; - position: fixed; - top: 15px; - width: 268px; - - opacity: 0; - visibility: hidden; - pointer-events: none; - transform: translateX(-24px); - transition: opacity 50ms ease-out; - } - - &.mobileLeftMenuOpen { - width: auto !important; - - .quick-access { - opacity: 1; - visibility: visible; - pointer-events: auto; - transform: translateX(0); - transition: opacity 380ms ease, transform 380ms ease; - } - .sidenav > .no-padding:first-child { - padding-top: 65px !important; - } - } - } - - .pageWrap { - width: calc(~'100% - @{_layout-pageWrap-margin}') !important; - } - } - - #ajaxLoadingDiv { - margin-bottom: 10px; - } - - #secondNavBar { - flex: none; - background-color: @theme-color-menu-contrast-background; - box-shadow: none !important; - - .navbar { - padding-top: 16px; - padding-bottom: 20px; - box-shadow: none; - - .menu-icon { - padding-right: 8px; - display: inline; - font-size: 16px; - color: @theme-color-text-contrast; - } - - .reporting-menu-sub-icon { - padding-left: 10px; - } - - > li { - display: block; - width: 100%; - .border-radius(0px); - border: 0; - background: none; - position: relative; - - .item { - width: 100%; - min-height: 42px; - padding: 8px 12px; - word-wrap: break-word; - word-break: break-word; - display: flex; - align-items: center; - .font-default(14px, 20px); - color: @theme-color-text-lighter; - border-radius: 8px; - cursor: pointer; - text-decoration: none; - &:hover, &:focus { - outline: 0; - } - &:focus-visible { - color: @theme-color-text-lighter; - background-color: @theme-color-menu-contrast-backgroundHover; - outline: 1px solid @theme-color-link; - } - &:hover { - background-color: @theme-color-menu-contrast-backgroundHover; - } - .menu-icon { - align-self: flex-start; - flex: 0 0 auto; - margin-top: 5px; - } - } - - .item-help-icon { - display: none; - opacity: 0.2; - position: absolute; - right: 0; - top: 0; - padding: 10px; - line-height: 13px; - height: 100%; - align-items: center; - justify-content: center; - - > span { - position: relative; - top: auto; - } - } - - &.menuTab li:hover { - .item-help-icon:not(.active) { - display: inline-flex; - color: @theme-color-text; - - &:hover { - color: @theme-color-link; - opacity: 0.75; - } - } - } - - .item-help-icon.active { - display: inline-flex; - color: @theme-color-link; - opacity: 0.75; - } - - > .item { - font-weight: 600; - } - - //Selects the submenu of the menu item - > ul { - position: relative; - // Submenu element - li { - position: relative; - width: 100%; - margin-left: auto; - margin-right: auto; - - .item { - .font-default(13px, 16px); - padding: 10px 22px 10px 36px; - min-height: 36px; - border-radius: 8px; - text-decoration: none; - transition: background-color 200ms linear; - &:hover, &.active { - text-decoration: none; - color: @theme-color-menu-contrast-textActive; - background-color: @theme-color-menu-contrast-backgroundHover; - } - } - - &.active { - > .menuDropdown, - > .item { - color: @theme-color-menu-contrast-textActive; - background-color: @theme-color-menu-contrast-backgroundHover; - text-decoration: none; - border-radius: 8px; - } - } - } - } - } - li.active, li:hover { - >.item { - color: @theme-color-menu-contrast-textActive; - .menu-icon { - color: @theme-color-menu-contrast-textActive; - } - } - } - - .menuTab > .item-help-icon { - top: 14px; - } - - .menuDropdown { - width: 100%; - - .items { - border-radius: 8px; - - .search { - margin: 15px 16px 10px 17px; - input { - font-size: 14px; - } - } - - .item { - padding: 10px 16px 10px !important; - min-height: 25px; - height: auto; - } - } - - .title { - color: @theme-color-menu-contrast-textActive; - padding: 10px 10px 10px 36px; - font-size: 13px; - font-weight: normal; - word-wrap: break-word; - word-break: break-all; - display: flex; - align-items: center; - justify-content: space-between; - - &:hover, &:focus { - color: @theme-color-menu-contrast-textActive; - } - - &:after { - color: @theme-color-menu-contrast-text; - border-top: 5px solid @theme-color-menu-contrast-text; - top: 20px; - right: 3px; - } - } - } - } - - &.Menu--dashboard .navbar > li { - > ul { - display: none; - - @media all and (max-width: 749px) { - display: block; - } - } - &.active { - ul { - display: block; - } - - .icon-arrow-right:before { - content: "\e63b"; - } - } - } - - &.Menu--admin .navbar > li { - .item .icon-arrow-right:before { - content: "\e63b"; - } - } - - .collapsible { - margin: 0; - border: 0; - box-shadow: none; - } - - .collapsible-header { - border-bottom: 0; - cursor: pointer !important; - color: @theme-color-text; - background-color: @theme-color-background-contrast; - - i { - color: @theme-color-text-lighter; - } - } - - .collapsible li.active > .collapsible-header, - .collapsible-header.active { - background-color: @theme-color-background-tinyContrast; - } - - .collapsible-body { - border-bottom: 0; - padding: 0; - } - } -} - -.badge-menu-item-container { - line-height: inherit; - position: relative; - - .sidenav & { - padding: 0 32px; - } -} -.badge-menu-item { - position: absolute; - top: 12px; - left: 15px; - z-index: 2; - - background-color: rgba(212, 19, 13, 1); - color: #fff; - border-radius: 999px; // hack to produce a circle - padding: 3px 5px; - - line-height: 1; - font-size: 11px; - font-weight: normal; - - .sidenav & { - left: 0; - } -} - -#root, #standalone { - .top_controls { - position: relative; - display: flex; - justify-content: flex-start; - align-items: center; - flex-wrap: wrap; - gap: 8px; - - height: auto; - min-height: 38px; - margin: 24px 16px; - - @media all and (max-width: 600px) { - flex-direction: column; - align-items: stretch; - margin: 24px 0; - padding: 0 23px 0 17px; - - .piwikSelector { - display: flex; - flex: auto; - } - - .icon-arrowup::before, - .icon-arrowdown::before { - display: none; - } - } - - .piwikTopControl { - position: relative; - font-size: 14px; - } - } -} - -.widgetize { - width: auto; -} - -@media print { - - #secondNavBar{ - display: none; - } - - nav .icon-menu-hamburger, nav .icon-more-verti{ - display: none; - } - - nav ul a{ - display: none; - } - - #root, #standalone { - .dashboard-manager{ - display: none !important; - visibility: hidden !important; - } - } - - #root{ - .layoutWithSidebar--hasSidebar .page > .pageWrap { - width: calc(~'100% - @{_layout-pageWrap-margin}') !important; - } - } - #content.home, - #content.admin { - display: block !important; - width: 100% !important; - } - - .dataTableAction{ - display: none !important; - } - - .select-dropdown, .caret{ - display: none !important; - } - - .dataTable td .ratio{ - margin-right: 4px; - visibility: visible; - } - .dataTableFooterNavigation > .row{ - margin-bottom: -20px !important; - } -} - -.z-depth-1, nav, .card-panel, .toast, .btn, .btn-large, .btn-floating, .dropdown-content, .collapsible, .side-nav { - box-shadow: @default-box-shade; -} diff --git a/plugins/CoreHome/stylesheets/matomo-loader.less b/plugins/CoreHome/stylesheets/matomo-loader.less deleted file mode 100644 index 0f625c473df93fedb4724dd51bd398471613246e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/matomo-loader.less +++ /dev/null @@ -1,48 +0,0 @@ -.matomo-loader { - width: 16px; - height: 11px; - display: inline-block; - position: relative; - - span { - background: #f0f0f0; - position: absolute; - top: 2px; - animation: matomo-loader 1s infinite ease-in-out; - width: 2px; - height: 5px; - display: inline-block; - border: 1px solid #f5f5f5; - box-sizing: content-box; - - &:nth-child(1) { - left: 0; - display: inline-block; - } - - &:nth-child(2) { - left: 6px; - display: inline-block; - animation-delay: 0.15s; - } - - &:nth-child(3) { - left: 12px; - animation-delay: 0.35s; - display: inline-block; - } - } -} - -@keyframes matomo-loader { - 0%, 75%, 100% { - top: 2px; - height: 5px; - } - 25% { - top: 0; - height: 9px; - border-color: #bbb; - background: #ccc; - } -} diff --git a/plugins/CoreHome/stylesheets/notification.less b/plugins/CoreHome/stylesheets/notification.less deleted file mode 100644 index 6d36553cb12bb431a3f7e5517d9ddfd6ba6d2dad..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/notification.less +++ /dev/null @@ -1,5 +0,0 @@ -#notificationContainer { - .notification { - margin: 0 0 10px 0; - } -} \ No newline at end of file diff --git a/plugins/CoreHome/stylesheets/promo.less b/plugins/CoreHome/stylesheets/promo.less deleted file mode 100644 index bf4992d603dc033f568372fdf3607cd4fed15c43..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/promo.less +++ /dev/null @@ -1,53 +0,0 @@ -#piwik-promo-thumbnail { - width: 100%; - min-height: 178px; - margin: 0 auto 0 auto; -} - -#piwik-promo-thumbnail:hover { - opacity: .75; - cursor: pointer; -} - -#piwik-promo-thumbnail>img { - width: 100%; -} - -#piwik-widget-footer { - margin: 0 1em 1em 1em; -} - -#piwik-promo-share { - margin: 0 2em 1em 0; - background-color: #CCC; - border: 1px solid #CCC; - border-radius: 6px; - display: inline-block; - padding: 0 .5em 0 .5em; - float: right; -} - -#piwik-promo-share > a { - margin-left: .5em; - margin-top: 4px; - display: inline-block; -} - -#piwik-promo-share>span { - display: inline-block; - vertical-align: top; - margin-top: 4px; -} - -#piwik-promo-videos-link { - font-size: .8em; - font-style: italic; - margin: 1em 0 0 1.25em; - color: @theme-color-text-lighter; - display: inline-block; - width: 90%; -} - -#piwik-promo-videos-link:hover { - text-decoration: none; -} diff --git a/plugins/CoreHome/stylesheets/selector.less b/plugins/CoreHome/stylesheets/selector.less deleted file mode 100644 index bd68a725ab87d3f1bb06a2bfe8a48b2b9b8994a7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/selector.less +++ /dev/null @@ -1,191 +0,0 @@ -@_selector-button_padding: 8px 16px; -@_selector-button_inner-half-gap: 8px; -@_selector-button_color-background: @theme-color-background-contrast; -@_selector-button_color-background-hover: @theme-color-background-contrast; -@_selector-button_border: 1px solid @theme-color-border; -@_selector-button_border-active: 1px solid @theme-color-link; -@_selector-button_border-radius: 8px; -@_selector-button_box-shadow: none; - -@_selector-dropdown_color-background: @theme-color-background-contrast; -@_selector-dropdown_border: 1px solid @theme-color-border; -@_selector-dropdown_border-radius: 8px; -@_selector-dropdown_padding: 16px; -@_selector-dropdown_box-shadow: ~"0 0 3px #A5B1CA4D, 0 10px 40px #A5B1CA4D"; -@_selector-dropdown_box-shadow-dark: ~"0 0 3px #00000080, 0 10px 40px #00000080"; -@_selector-dropdown_margin-top: 8px; - -.piwikSelector:not(.quick-access) { - position: relative; - display: inline-flex; - border: @_selector-button_border; - border-radius: @_selector-button_border-radius; - box-shadow: @_selector-button_box-shadow; - - span.title, - a.title, - button.title { - flex: auto; - - display: flex; - justify-content: center; - align-items: center; - gap: 8px; - padding: @_selector-button_padding; - background-color: @_selector-button_color-background; - border: none; - border-radius: @_selector-button_border-radius; - - .font-default(14px, 20px); - white-space: nowrap; - cursor: pointer; - text-decoration: none; - text-align: center; - color: @theme-color-text; - font-variant: tabular-nums; - - &:focus { - outline: none; - } - - &.activityIndicator { - background: url(plugins/Morpheus/images/loading-blue.gif) no-repeat 9px 9px; - - .icon { - visibility: hidden; - } - } - - .icon { - // remove relative: [class^="icon-"], [class*=" icon-"]{line-height:1em} - font-size: inherit; - line-height: inherit; - - &.iconHidden { - visibility: hidden; - } - } - - .icon:not(.icon-fixed) { - float: right; - - &::after { - clear: left; - content: ' '; - } - } - } - - &.expanded, - &.editing, - &:hover:not(.periodSelector-withPrevNext), - &:focus:not(.periodSelector-withPrevNext), - &:focus-within:not(.periodSelector-withPrevNext) { - border: @_selector-button_border-active; - - span.title, - a.title, - button.title { - text-decoration: none; - background: @_selector-button_color-background-hover; - } - } - - /* Period selector specific: left & right arrows */ - - .move-period { - position: relative; - padding: @_selector-button_padding; - background-color: @_selector-button_color-background; - - &::before { - content: ''; - position: absolute; - inset: -1px; - border: 1px solid transparent; - - pointer-events: none; - } - - &:hover::before, - &:focus-visible::before { - border-color: @theme-color-focus-ring; - } - } - - .move-period-prev { - padding-right: @_selector-button_inner-half-gap; - border-radius: @_selector-button_border-radius 0 0 @_selector-button_border-radius; - - &::before { - border-radius: @_selector-button_border-radius 0 0 @_selector-button_border-radius; - } - } - - .move-period-next { - padding-left: @_selector-button_inner-half-gap; - border-radius: 0 @_selector-button_border-radius @_selector-button_border-radius 0; - - &::before { - border-radius: 0 @_selector-button_border-radius @_selector-button_border-radius 0; - } - } - - &.periodSelector-withPrevNext .title { - border-radius: 0; - padding-left: @_selector-button_inner-half-gap; - padding-right: @_selector-button_inner-half-gap; - - &::before { - content: ''; - position: absolute; - inset: -1px; - border: 1px solid transparent; - border-radius: @_selector-button_border-radius; - - pointer-events: none; - } - - &:hover::before, - &:focus-visible::before { - border-color: @theme-color-focus-ring; - } - } -} - -/* Dropdown */ -.piwikSelector { - .dropdown { - .font-default(14px, 20px); - display: none; - } - - &.expanded { - .dropdown { - display: block; /* to revert display: none */ - - position: absolute; - z-index: 999; - top: 100%; - margin-top: @_selector-dropdown_margin-top; - left: -1px; - - border: @_selector-dropdown_border; - border-radius: @_selector-dropdown_border-radius; - padding: @_selector-dropdown_padding; - box-shadow: @_selector-dropdown_box-shadow; - - overflow: hidden; - - .inDarkMode({ - box-shadow: @_selector-dropdown_box-shadow-dark; - }); - } - } - - &.expanded .dropdown, - &:hover .dropdown, - &.active .dropdown { - background-color: @_selector-dropdown_color-background; - } -} diff --git a/plugins/CoreHome/stylesheets/sparklineColors.less b/plugins/CoreHome/stylesheets/sparklineColors.less deleted file mode 100644 index 0c8ad7b421dd488d332d120217a15480ed2b5456..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/sparklineColors.less +++ /dev/null @@ -1,46 +0,0 @@ -// sparkline colors -.sparkline-colors[data-name=backgroundColor] { - color: white; -} - -.sparkline-colors[data-name=lineColor] { - color: #162C4A; - - .inDarkMode({ - color: @theme-color-link; - }); -} - -.sparkline-colors[data-name=minPointColor] { - color: #ff7f7f; -} - -.sparkline-colors[data-name=maxPointColor] { - color: #75BF7C; -} - -.sparkline-colors[data-name=lastPointColor] { - color: #55AAFF; -} - -.sparkline-colors[data-name=fillColor] { - color: white; -} - -body.sparklines-redesign-enabled { - .sparkline-colors[data-name=lineColor] { - color: @graph-sparkline-line-color; - } - - .sparkline-colors[data-name=minPointColor] { - color: @graph-sparkline-minDot-color; - } - - .sparkline-colors[data-name=maxPointColor] { - color: @graph-sparkline-maxDot-color; - } - - .sparkline-colors[data-name=lastPointColor] { - color: @graph-sparkline-lastDot-color; - } -} diff --git a/plugins/CoreHome/stylesheets/vue-transitions.less b/plugins/CoreHome/stylesheets/vue-transitions.less deleted file mode 100644 index d9bd4cf49e75c7c5f13da8767f24af5945e8239e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/vue-transitions.less +++ /dev/null @@ -1,24 +0,0 @@ -.fade-in-enter-active { - transition: opacity 1s ease; -} - -.fade-in-enter-from { - opacity: 0; -} - -// 'slow' as in jquery.animate's 'slow' value -.slow-fade-out-leave-active { - transition: opacity .6s ease; -} - -.slow-fade-out-leave-to { - opacity: 0; -} - -.fade-out-enter-active { - transition: opacity 0.4s ease; -} - -.fade-out-enter-from { - opacity: 1; -} diff --git a/plugins/CoreHome/stylesheets/zen-mode.less b/plugins/CoreHome/stylesheets/zen-mode.less deleted file mode 100644 index 3e7d67f3777c80375a279cf1e2c89cc9f489dab2..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/stylesheets/zen-mode.less +++ /dev/null @@ -1,79 +0,0 @@ -.zenMode { - nav { - display: none; - } - - #secondNavBar { - display: none; - } - - #root #secondNavBar + .pageWrap { - width: 100%; - } - - .bannerHeader { - display: none; - } -} - -#content:not(.admin), .widget, .ui-widget { - - /* DATATABLES */ - - table.dataTable { - th.sortable { - border-left: 0; - border-bottom: 0; - } - th.columnSorted { - font-weight: normal !important; - } - tr.subDataTable { - font-weight: normal !important; - } - tr td { - padding-top: 8px; - padding-bottom: 8px; - } - } - - .dataTableActions.dataTableVizHtmlTable > .dataTableWrapper { - width: 100%; - } - - .dataTableActions table.dataTable { - td.column, - th.sortable:not(.first) { - width: 50px; - } - } - - .dataTableVizHtmlTable > .dataTableWrapper { - width: 100%; - } - - .dataTableFooterNavigation { - padding: 7px 0 0 0; - - > .row { - margin-bottom: 0; - } - } - - .goalEntry:first-of-type { - padding-top: 20px; - } - - .goalEntry { - border-bottom: 0; - } - - .relatedReferrerReports { - display: none; - } - - .reportsByDimensionView .entityList { - margin-left: 13px; - } - -} diff --git a/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig b/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig deleted file mode 100644 index d8627a68b8903c9451c8b00ef8b8e5c2c7f7f44e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/ReportRenderer/_htmlReportBody.twig +++ /dev/null @@ -1,89 +0,0 @@ -{% set fontStyle = "color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;"%} -{% set styleTableHeader = "font-size: 15px;text-align: left;font-weight:normal;padding:13px 0 13px 10px;" ~ fontStyle %} -{% set styleTableHeaderRow = "border:1px solid rgb(231,231,231);" %} -{% set styleTableCell = "font-size: 15px;font-variant-numeric: tabular-nums;padding:17px 15px;" ~ fontStyle %} -{% set styleTableRow = "border:1px solid rgb(231,231,231);border-top: 0px;" %} - -

- {{ reportName|escape|preventLinking }} -

- -{% if reportRows is empty %} - {{ 'CoreHome_ThereIsNoDataForThisReport'|translate }} -{% else %} - {% if displayGraph %} - - {% endif %} - - {% if displayGraph and displayTable %} -
-
- {% endif %} - - {% if displayTable %} - - - {% for columnId, columnName in reportColumns %} - - {% endfor %} - - - {% set cycleValues=['background-color: '~emailStyles.tableBgColor,''] %} - {% set cycleIndex=1 %} - {% for rowId,row in reportRows %} - {% set rowMetrics=row.columns %} - - {% if reportRowsMetadata[rowId] is defined %} - {% set rowMetadata=reportRowsMetadata[rowId].columns %} - {% else %} - {% set rowMetadata=null %} - {% endif %} - - {% set cycleIndex=cycleIndex+1 %} - {% for columnId, columnName in reportColumns %} - - {% endfor %} - - {% endfor %} - -
-  {{ columnName }}   -
- {% if columnId == 'label' %} - {% if rowMetrics[columnId] is defined %} - {% if rowMetadata.logo is defined %} - -   - {% endif %} - {% if rowMetadata.url is defined %} - - {% endif %} - {{ rowMetrics[columnId] | raw }}{# labels are escaped by SafeDecodeLabel filter in core/API/Response.php #} - {% if rowMetadata.url is defined %} - - {% endif %} - {% endif %} - {% else %} - {% if rowMetrics[columnId] is empty %} - 0 - {% else %} - {{ rowMetrics[columnId]|number(2) }} - {% endif %} - {% endif %} -
- {% endif %} -

- - {{ 'ScheduledReports_TopOfReport'|translate }} ↑ -

-{% endif %} diff --git a/plugins/CoreHome/templates/ReportRenderer/_htmlReportFooter.twig b/plugins/CoreHome/templates/ReportRenderer/_htmlReportFooter.twig deleted file mode 100644 index 754fd1f355cae0eec537a6eae1b24558a72fbf30..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/ReportRenderer/_htmlReportFooter.twig +++ /dev/null @@ -1 +0,0 @@ -{% include "@CoreHome/_htmlEmailFooter.twig" %} \ No newline at end of file diff --git a/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig b/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig deleted file mode 100644 index 786c4f7df44315be44ad8a8fd5e948ce612b7564..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/ReportRenderer/_htmlReportHeader.twig +++ /dev/null @@ -1,37 +0,0 @@ -{% include "@CoreHome/_htmlEmailHeader.twig" %} - -

- {{'ScheduledReports_EmailHello'|translate}} -

- -

- {% if isAttachedFile is defined and isAttachedFile %} - {{ 'ScheduledReports_PleaseFindAttachedFile'|translate(frequency, reportTitle|escape|preventLinking)|raw }} - {% else %} - {{ 'ScheduledReports_PleaseFindBelow'|translate(('Intl_Period' ~ period|capitalize)|translate, reportTitle|escape|preventLinking)|raw }} - {% endif %} -
{{ description|escape|preventLinking }} -
{{ 'General_DateRange'|translate }} {{ prettyDate }} -
{{ 'ScheduledReports_SentFromX'|translate(piwikUrl) }} -

- - {% if displaySegment %} -

- {{ 'ScheduledReports_CustomVisitorSegment'|translate }} {{ segmentName|escape|preventLinking }} -

- {% endif %} - - {% if reportMetadata|length > 1 %} -

- {{ 'ScheduledReports_TableOfContent'|translate }} -

- - {% endif %} diff --git a/plugins/CoreHome/templates/_adblockDetect.twig b/plugins/CoreHome/templates/_adblockDetect.twig deleted file mode 100644 index a33b9d07a86d405c0f57ac7a9706f9932a3e3fb5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_adblockDetect.twig +++ /dev/null @@ -1,60 +0,0 @@ -
 
- \ No newline at end of file diff --git a/plugins/CoreHome/templates/_angularComponent.twig b/plugins/CoreHome/templates/_angularComponent.twig deleted file mode 100644 index 2ac6cb7f909a29886910e1a3a357ef18458db8b3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_angularComponent.twig +++ /dev/null @@ -1,5 +0,0 @@ -<{{ componentName|e('html') }} - {% for key, value in componentParameters %} - {{ key|e('html') }}="{{ value|e('html_attr') }}" - {% endfor %} -/> \ No newline at end of file diff --git a/plugins/CoreHome/templates/_applePinnedTabIcon.twig b/plugins/CoreHome/templates/_applePinnedTabIcon.twig deleted file mode 100644 index 5ca38d9322b898264f44aa1649c9548a5d1a2efc..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_applePinnedTabIcon.twig +++ /dev/null @@ -1,4 +0,0 @@ -{% if isCustomLogo and customFavicon is defined and customFavicon %} -{% else %} - -{% endif %} diff --git a/plugins/CoreHome/templates/_dataTable.twig b/plugins/CoreHome/templates/_dataTable.twig deleted file mode 100644 index b416da50dc19b540c9ede2105be06798f0a062db..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTable.twig +++ /dev/null @@ -1,115 +0,0 @@ -{% if properties.show_visualization_only %} - {% include visualizationTemplate %} -{%- else -%} - -{% set isDataTableEmpty = (dataTable is not defined or dataTable is null or dataTableHasNoData|default(false)) %} - -{% set showCardAsContentBlock = (properties.show_as_content_block and properties.show_title and not isWidget) %} -{% set showOnlyTitleWithoutCard = not showCardAsContentBlock and properties.title and properties.show_title %} - -{# -using the show_footer to control the header actions as well since this is going to be refactored with the goal -of moving the table actions to the top of the report for all reports, at which point the config for the report -can be renamed to show_header and show_header_icons -#} -{% set showTableActionsInHeader = properties.show_footer and properties.show_footer_icons %} - -{% if showCardAsContentBlock %} -
-
- {% if properties.title %} -

{{ properties.title }}

- {% endif %} -{% elseif showOnlyTitleWithoutCard %} -
-

{{ properties.title }}

-{% endif %} - -{% set showCardTableIsEmpty = not properties.show_as_content_block and isDataTableEmpty and not isWidget %} -{% if showCardTableIsEmpty %} -
-
-{% endif %} - -{% set summaryRowId = constant('Piwik\\DataTable::ID_SUMMARY_ROW') %}{# ID_SUMMARY_ROW #} -{% set isSubtable = javascriptVariablesToSet.idSubtable is defined and javascriptVariablesToSet.idSubtable != 0 %} -
- - {% if properties.description %} -
{{ properties.description }}
- {% endif %} - -
- {% if properties.onlineGuideUrl|default is not empty %}{{ 'CoreHome_ReadMoreOnlineGuide'|translate }}{% endif %} - {% if reportLastUpdatedMessage is defined and reportLastUpdatedMessage %}{{ reportLastUpdatedMessage|raw }}{% endif %} -
- -
- {% if error is defined %} -
{{ error.message }}
- {% else %} - {% if showTableActionsInHeader %} -
-
- {% include "@CoreHome/_dataTableActions.twig" with { placement: 'top' } %} -
-
- {% endif %} - - {% if properties.show_header_message is defined and properties.show_header_message is not empty %} -
{{ properties.show_header_message | raw }}
- {% endif %} - - {% if isDataTableEmpty %} -
- {% if showReportDataWasPurgedMessage is defined and showReportDataWasPurgedMessage %} - {{ 'CoreHome_DataForThisReportHasBeenPurged'|translate(deleteReportsOlderThan) }} - {% elseif showPluginArchiveDisabled is defined and showPluginArchiveDisabled%} - {{ 'CoreHome_DataForThisReportHasBeenDisabled'|translate(externallink('https://matomo.org/faq/how-to-disable-archiving-the-segment-reports-for-specific-plugins'), '')|raw }} - {% elseif properties.no_data_message %} - {{ properties.no_data_message|raw }} - {% else %} - {{ 'CoreHome_ThereIsNoDataForThisReport'|translate }} - {% endif %} -
- {% else %} - {% include visualizationTemplate %} - {% endif %} - - {% if properties.show_footer %} - {% include "@CoreHome/_dataTableFooter.twig" %} - {% endif %} - - {% include "@CoreHome/_dataTableJS.twig" with { reportId: properties.report_id } %} - {% endif %} -
-
- -{% if notifications is not empty and notifications|length %} - {% for notificationId, n in notifications %} - - {{ n.message|notification({'id': notificationId, 'type': n.type, 'title': n.title, 'noclear': n.hasNoClear, 'context': n.context, 'raw': n.raw}, false) }} - - {% endfor %} -{% endif %} - -{% if showCardTableIsEmpty %} -
-{% endif %} - -{% if showCardAsContentBlock %} -
-{% elseif showOnlyTitleWithoutCard %} -
-{% endif %} - -{%- endif %} diff --git a/plugins/CoreHome/templates/_dataTableActions.twig b/plugins/CoreHome/templates/_dataTableActions.twig deleted file mode 100644 index 0a95b71799b364bff83da59627005791fbffba9e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTableActions.twig +++ /dev/null @@ -1,31 +0,0 @@ -
diff --git a/plugins/CoreHome/templates/_dataTableCell.twig b/plugins/CoreHome/templates/_dataTableCell.twig deleted file mode 100644 index 1824789da8bd35e60a5838b1da145357cea446f9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTableCell.twig +++ /dev/null @@ -1,43 +0,0 @@ -{% apply spaceless %} -{% set tooltipIndex = column ~ '_tooltip' %} -{% if row.getMetadata(tooltipIndex) %}{% endif %} -{% if not row.getIdSubDataTable() and column=='label' and row.getMetadata('url') %} - -{% endif %} - -{% set totals = dataTable.getMetadata('totals') %} -{% set labelColumn = columns_to_display|first %} -{% set reportLabel = row.getColumn(labelColumn)|truncate(40)|rawSafeDecoded %} -{% include "@CoreVisualizations/_dataTableViz_htmlTable_ratio.twig" with { - 'label': reportLabel, - 'labelColumn': labelColumn, - 'translations': properties.translations -} %} - -{% set dimensions = dataTable.getMetadata('dimensions')|default([]) %} -{% if column=='label' or column in dimensions %} - {% import 'macros.twig' as piwik %} - - - {% if column=='label' %} - {% if not row.getIdSubDataTable() and row.getMetadata('url') and not row.getMetadata('logo') %} - - {% else %} - {{ piwik.logoHtml(row.getMetadata(), row.getColumn('label')) }} - {% endif %} - {% endif %} - {% if row.getMetadata('html_label_prefix') %}{{ row.getMetadata('html_label_prefix') | raw }} {% endif -%} -{% endif %} - {%- if row.getColumn(column) or (column=='label' and (row.getColumn(column) is same as("0") or row.getColumn(column) is same as(0))) %}{% if column=='label' %}{{- row.getColumn(column)|rawSafeDecoded -}}{% else %}{% if row.getMetadata('html_column_' ~ column ~ '_prefix') %}{{ row.getMetadata('html_column_' ~ column ~ '_prefix') | raw }}{% endif -%}{{- row.getColumn(column)|number(2,0)|rawSafeDecoded -}}{% if row.getMetadata('html_column_' ~ column ~ '_suffix') %}{{ row.getMetadata('html_column_' ~ column ~ '_suffix') | raw }}{% endif -%}{% endif %} - {%- else -%}- - {%- endif -%} -{% if column=='label' %}{%- if row.getMetadata('html_label_suffix') %}{{ row.getMetadata('html_label_suffix') | raw }}{% endif -%}{% endif %} -{% if not row.getIdSubDataTable() and column=='label' and row.getMetadata('url') %} - -{% endif %} -{% if row.getMetadata(tooltipIndex) %}{% endif %} - -{% endapply %} diff --git a/plugins/CoreHome/templates/_dataTableFooter.twig b/plugins/CoreHome/templates/_dataTableFooter.twig deleted file mode 100644 index 58f0b3df0c9d3ef6288d8df2a5623e511e9ba854..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTableFooter.twig +++ /dev/null @@ -1,59 +0,0 @@ -
-
- - {% if not isDataTableEmpty and (properties.show_offset_information or properties.show_pagination_control) %} -
- {% if properties.show_pagination_control %} - ‹ {% if clientSideParameters.dataTablePreviousIsFirst is defined %}{{ 'General_First'|translate }}{% else %}{{ 'General_Previous'|translate }}{% endif %} -   - {% endif %} - {% if properties.show_offset_information %} - - {% endif %} - {% if properties.show_pagination_control %} -  {{ 'General_Next'|translate }} › - {% endif %} -
- {% endif %} - -
-
- {% include "@CoreHome/_dataTableActions.twig" %} -
- - {% if not isDataTableEmpty and (properties.show_footer_icons and properties.show_pagination_control or properties.show_limit_control) %} -
- {% endif %} -
- - {% if (properties.related_reports is not empty) and properties.show_related_reports %} -
- {{ properties.related_reports_title|raw }} -
    -
  • {{ properties.title }}
  • - - {% for reportUrl,reportTitle in properties.related_reports %} -
  • {{ reportTitle }}
  • - {% endfor %} -
-
- {% endif %} -
- - - - {% if properties.show_footer_message is defined and properties.show_footer_message is not empty %} -
{{ properties.show_footer_message | raw }}
- {% endif %} - -
- - - -
diff --git a/plugins/CoreHome/templates/_dataTableHead.twig b/plugins/CoreHome/templates/_dataTableHead.twig deleted file mode 100644 index 9ef585c240f8f3e8b3df4e419bbbcb4870879476..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTableHead.twig +++ /dev/null @@ -1,19 +0,0 @@ -{% set dimensions = dataTable.getMetadata('dimensions')|default([]) %} - - - {% for column in properties.columns_to_display %} - - {% if properties.metrics_documentation[column]|default is not empty %} -
-
- - {{ properties.translations[column]|default(column)|rawSafeDecoded }} -
- {{ properties.metrics_documentation[column]|rawSafeDecoded|raw }} -
- {% endif %} -
{{ properties.translations[column]|default(column)|rawSafeDecoded }}
- - {% endfor %} - - diff --git a/plugins/CoreHome/templates/_dataTableJS.twig b/plugins/CoreHome/templates/_dataTableJS.twig deleted file mode 100644 index 3d2737d2ea9941798acda8e6c8c94facf0782c6a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_dataTableJS.twig +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/plugins/CoreHome/templates/_donate.twig b/plugins/CoreHome/templates/_donate.twig deleted file mode 100644 index 3ce95ee52a663d68872c6112305902342d8dd51f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_donate.twig +++ /dev/null @@ -1,33 +0,0 @@ -
-
- {% if msg is defined %} - {{ msg }} - {% else %} -

{{ 'CoreHome_DonateCall1'|translate }}

-

{{ 'CoreHome_DonateCall2'|translate }}

-

{{ 'CoreHome_DonateCall3'|translate('','', externallink('https://matomo.org/recommends/premium-plugins/') ~ '', '')|raw }}

- {% endif %} -
- - {{ 'CoreHome_SupportUsOn'|translate }} - - - -

- {{ 'CoreHome_YourDonationWillHelp'|translate }} -

- {{ 'CoreHome_ThanksFromAllOfUs'|translate }} -

- - {% if footerMessage is defined %} -
- {{ footerMessage }} -
- {% endif %} -
diff --git a/plugins/CoreHome/templates/_favicon.twig b/plugins/CoreHome/templates/_favicon.twig deleted file mode 100644 index be54edbb84e962b24024b9301a965b9cd40062a5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_favicon.twig +++ /dev/null @@ -1,6 +0,0 @@ -{% if isCustomLogo and hasCustomFavicon and customFavicon is defined and customFavicon %} - -{% else %} - - -{% endif %} diff --git a/plugins/CoreHome/templates/_headerMessage.twig b/plugins/CoreHome/templates/_headerMessage.twig deleted file mode 100644 index 2b8cf9e367ac25f1867bbabaf080784486d88d7d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_headerMessage.twig +++ /dev/null @@ -1,38 +0,0 @@ -{% set updateCheck %} - - - {{ (lastUpdateCheckFailed|default(false) ? 'General_ErrorTryAgain' : 'CoreHome_CheckForUpdates')|translate }} - -{% endset %} - -{% if - isAutoUpdateEnabled and ( - (latest_version_available and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser) - or ( - isSuperUser - and ( - (isManualUpdateCheck is defined and isManualUpdateCheck and lastUpdateCheckFailed is defined and lastUpdateCheckFailed) - or (isAdminArea is defined and isAdminArea) - ) - ) - ) %} -
- - -{% else %} - -{% endif %} diff --git a/plugins/CoreHome/templates/_htmlEmailFooter.twig b/plugins/CoreHome/templates/_htmlEmailFooter.twig deleted file mode 100644 index cde213d7265e44b33ec5e3ae3c2256ea6be7bfc5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_htmlEmailFooter.twig +++ /dev/null @@ -1,28 +0,0 @@ -{% set fontStyle %}color:{{ themeStyles.getPropertyValue('colorText')|e('html_attr') }};font-family:{{ themeStyles.getPropertyValue('fontFamilyBase')|e('html_attr') }};{% endset %} -{% set styleParagraph = 'font-size:15px;line-height:24px;margin:0 0 16px;' %} -{% set footerParagraphStyle %}{{styleParagraph}}{{fontStyle}}text-align:center;font-size:13px; color:#666;{% endset %} -{% set hasHorizontalRule = not hasWhiteLabel or unsubscribeLink|default is not empty %} - -{% if hasHorizontalRule %} -
-{% else %} -
-{% endif %} - -{% if not hasWhiteLabel %} -

- {{'General_PoweredBy'|translate}} - Matomo Analytics -
- {{ 'CoreHome_LeadingAnalyticsPlatformRespectsYourPrivacy'|translate }} -

-{% endif %} - -{% if unsubscribeLink|default is not empty %} - {% set unsubLink %}{{ 'ScheduledReports_Unsubscribe'|translate }}{% endset %} -

{{ 'ScheduledReports_UnsubscribeFooter'|translate(unsubLink)|raw }}.

-{% endif %} - -
- - diff --git a/plugins/CoreHome/templates/_htmlEmailHeader.twig b/plugins/CoreHome/templates/_htmlEmailHeader.twig deleted file mode 100644 index d4950ef37d6c94631523007b5fbab0ccd35133c9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_htmlEmailHeader.twig +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - {% if isCustomLogo and logoHeader %} - - {% else %} - {{ emailStyles.brandNameLong|e('html_attr') }} - {% endif %} - - - {% if idSite|default is not empty %} - - {{ 'Dashboard_Dashboard'|translate }} - - {% endif %} -
- -
diff --git a/plugins/CoreHome/templates/_indexContent.twig b/plugins/CoreHome/templates/_indexContent.twig deleted file mode 100644 index 7fbf202bc5c0266640cfb0f502c6df92e6df41fd..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_indexContent.twig +++ /dev/null @@ -1,20 +0,0 @@ -{% import 'ajaxMacros.twig' as ajax %} -
- - {% include "@CoreHome/_notifications.twig" %} -
- {% include "@CoreHome/_periodSelect.twig" %} - {{ postEvent("Template.nextToCalendar") }} -
- {% include "@CoreHome/_headerMessage.twig" %} - {{ ajax.requestErrorDiv(contactEmail|default(''), false, '', showMoreFaqInfo) }} -
- - {{ ajax.loadingDiv() }} - -
- {% if content %}{{ content }}{% endif %} -
-
-
-
diff --git a/plugins/CoreHome/templates/_javaScriptDisabled.twig b/plugins/CoreHome/templates/_javaScriptDisabled.twig deleted file mode 100644 index fb50e92d561e6012876df7819a9d0fff6b2c35f0..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_javaScriptDisabled.twig +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/plugins/CoreHome/templates/_loader.twig b/plugins/CoreHome/templates/_loader.twig deleted file mode 100644 index 45b62d7c9d0d74fb6921aff87cb9f5d94e5bd018..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_loader.twig +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plugins/CoreHome/templates/_logo.twig b/plugins/CoreHome/templates/_logo.twig deleted file mode 100644 index c9f7f00c2ac0e0831a736f5136ff05569176c396..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_logo.twig +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/plugins/CoreHome/templates/_menu.twig b/plugins/CoreHome/templates/_menu.twig deleted file mode 100644 index 20258af0123863c735456e41b50fdc64c99d6633..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_menu.twig +++ /dev/null @@ -1,63 +0,0 @@ -{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction, collapsible, isSuperUser, renderQuickAccess) %} -
- {% if renderQuickAccess|default(false) %} -
- {% endif %} - -
- {% if isSuperUser %} - - {% endif %} -
-{% endmacro %} diff --git a/plugins/CoreHome/templates/_notifications.twig b/plugins/CoreHome/templates/_notifications.twig deleted file mode 100644 index 0f3254e5e5fdc9d66f0a18280a09ee0254f7c8f6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_notifications.twig +++ /dev/null @@ -1,9 +0,0 @@ -
- {% if notifications|length %} - {% for notificationId, n in notifications %} - - {{ n.message|notification({'id': notificationId, 'type': n.type, 'title': n.title, 'noclear': n.hasNoClear, 'context': n.context, 'raw': n.raw}, false) }} - - {% endfor %} - {% endif %} -
diff --git a/plugins/CoreHome/templates/_periodSelect.twig b/plugins/CoreHome/templates/_periodSelect.twig deleted file mode 100644 index c249638a1700bdbadb0f75dd361ce17f4b962872..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_periodSelect.twig +++ /dev/null @@ -1,7 +0,0 @@ -
-
diff --git a/plugins/CoreHome/templates/_shortcuts.twig b/plugins/CoreHome/templates/_shortcuts.twig deleted file mode 100644 index 957663b72431264a1387b7170ff4e46613808143..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_shortcuts.twig +++ /dev/null @@ -1,4 +0,0 @@ -
-

{{ 'CoreHome_ShortcutsAvailable'|translate }}

-
-
\ No newline at end of file diff --git a/plugins/CoreHome/templates/_singleReport.twig b/plugins/CoreHome/templates/_singleReport.twig deleted file mode 100644 index b13a37d69bca280a4568db7b26106df3133aa60a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_singleReport.twig +++ /dev/null @@ -1,2 +0,0 @@ -

{{ title }}

-{{ report|raw }} \ No newline at end of file diff --git a/plugins/CoreHome/templates/_singleWidget.twig b/plugins/CoreHome/templates/_singleWidget.twig deleted file mode 100644 index d99d663cc5e14cc5410d3486adf47644328bb694..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_singleWidget.twig +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/plugins/CoreHome/templates/_siteSelectHeader.twig b/plugins/CoreHome/templates/_siteSelectHeader.twig deleted file mode 100644 index d59ed47e4c75098672d1d8aa2e4284f35f8c04b8..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_siteSelectHeader.twig +++ /dev/null @@ -1,5 +0,0 @@ -{% if not isSingleSite %} -
-
-
-{% endif %} diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig deleted file mode 100644 index 2f0b4e56f29a3dd826acdb5dfefd6026b339dcd3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_topBar.twig +++ /dev/null @@ -1,65 +0,0 @@ -{{ postEvent("Template.beforeTopBar", userLogin, topMenu) }} - - - - diff --git a/plugins/CoreHome/templates/_topScreen.twig b/plugins/CoreHome/templates/_topScreen.twig deleted file mode 100644 index 752ce9200b7ac021aed73572a3f50c3c28fd2aa7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_topScreen.twig +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/plugins/CoreHome/templates/_uiControl.twig b/plugins/CoreHome/templates/_uiControl.twig deleted file mode 100644 index 4eaec4fc65915d2ed8e0491f02793f2aa4678ac4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_uiControl.twig +++ /dev/null @@ -1,13 +0,0 @@ -
-{% render implView with implOverride %} -
- diff --git a/plugins/CoreHome/templates/_warningInvalidHost.twig b/plugins/CoreHome/templates/_warningInvalidHost.twig deleted file mode 100644 index aed18f555ac6f8b6381c3950dd448c5e3807146a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/_warningInvalidHost.twig +++ /dev/null @@ -1,21 +0,0 @@ -{# untrusted host warning #} -{% if (isValidHost is defined and invalidHostMessage is defined and isValidHost == false) %} - {% set invalidHostText %} - - - {{ 'General_Help'|translate }} - - {{ 'General_Warning'|translate }}: {{ invalidHostMessage|raw }} - -
-
- - {{ invalidHostMessageHowToFix|raw }} - {% endset %} - -
- {{ invalidHostText|notification({'noclear': true, 'raw': true, 'context': 'warning'}) }} -
- -{% endif %} - diff --git a/plugins/CoreHome/templates/checkForUpdates.twig b/plugins/CoreHome/templates/checkForUpdates.twig deleted file mode 100644 index c611ae058750e51528f4ad58ba5e06f1e2729bca..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/checkForUpdates.twig +++ /dev/null @@ -1 +0,0 @@ -{% include "@CoreHome/_headerMessage.twig" %} \ No newline at end of file diff --git a/plugins/CoreHome/templates/getDefaultIndexView.twig b/plugins/CoreHome/templates/getDefaultIndexView.twig deleted file mode 100644 index 172412f168964111cbc1f3d08baa2414af45e508..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getDefaultIndexView.twig +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "dashboard.twig" %} -{% import 'ajaxMacros.twig' as ajax %} - -{% block topcontrols %} - {% include "@CoreHome/_siteSelectHeader.twig" %} - {% include "@CoreHome/_periodSelect.twig" %} - {{ postEvent("Template.nextToCalendar") }} -
- {% include "@CoreHome/_headerMessage.twig" %} -{% endblock %} - -{% block content %} - - {% if exampleFeatureEnabled %} - - {% endif %} - - {{ ajax.requestErrorDiv(contactEmail|default(''), areAdsForProfessionalServicesEnabled, currentModule, showMoreFaqInfo) }} - {{ ajax.loadingDiv() }} - -
- {% if content %}{{ content }}{% endif %} -
-
-
- -{% endblock %} - diff --git a/plugins/CoreHome/templates/getDonateForm.twig b/plugins/CoreHome/templates/getDonateForm.twig deleted file mode 100644 index 69130cca089722216122d5ce2ada825278bd3e63..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getDonateForm.twig +++ /dev/null @@ -1 +0,0 @@ -{% include "@CoreHome/_donate.twig" %} \ No newline at end of file diff --git a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig b/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig deleted file mode 100644 index e6af84450a50846efa5a0dd00255ae773827d20a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig +++ /dev/null @@ -1,40 +0,0 @@ -{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %} -
-
{{ 'RowEvolution_MultiRowEvolutionTitle'|translate }}
-
- {{ graph | raw }} -
-
-

{{ availableRecordsText|translate }}

- - {% for i, metric in metrics %} - - - - - {% endfor %} -
- {{ metric.sparkline|raw }} - - {% import 'macros.twig' as piwik %} - {{ piwik.logoHtml(metric, "") }} - - {{- metric.label|rawSafeDecoded -}} - - {{ metric.details|raw }} -
- » {{ 'RowEvolution_PickAnotherRow'|translate }} -
- {% if availableMetrics|length > 1 %} -
-

{{ 'RowEvolution_AvailableMetrics'|translate }}

- -
- {% endif %} -
diff --git a/plugins/CoreHome/templates/getPromoVideo.twig b/plugins/CoreHome/templates/getPromoVideo.twig deleted file mode 100644 index 1918a3093438cd0f4482e7f3d9827954de861c6d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getPromoVideo.twig +++ /dev/null @@ -1,34 +0,0 @@ -
- -
-
- -
-
- - {{ 'CoreHome_ViewAllPiwikVideoTutorials'|translate }} -
- -
- {{ 'CoreHome_ShareThis'|translate }}: - - {# facebook #} - - - - - {# twitter #} - - - - - {# email #} - - - -
- -
- - -
diff --git a/plugins/CoreHome/templates/getRowEvolutionPopover.twig b/plugins/CoreHome/templates/getRowEvolutionPopover.twig deleted file mode 100644 index 6ccb4bb0f1755aef1ea41ea7bea8418d5fa26737..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getRowEvolutionPopover.twig +++ /dev/null @@ -1,39 +0,0 @@ -{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %} -
-
{{ popoverTitle | raw }}
-
- {{ graph|raw }} -
-
-

{{ availableMetricsText|raw }}

- -
- {{ 'RowEvolution_Documentation'|translate }} -
- - {% for i, metric in metrics %} - - - - - {% endfor %} -
- {{ metric.sparkline|raw }} - - - {{- metric.label|rawSafeDecoded -}} - - {% if metric.details %}: - {{ metric.details|raw }} - {% endif %} -
-
-
-

{{ 'RowEvolution_CompareRows'|translate }}

- -
- {{ 'RowEvolution_CompareDocumentation'|translate|raw }} -
- » {{ 'RowEvolution_PickARow'|translate }} -
-
diff --git a/plugins/CoreHome/templates/getSystemSummary.twig b/plugins/CoreHome/templates/getSystemSummary.twig deleted file mode 100644 index 0aa385b4ff8b88a33a12f029c6ea8af1daa4caa4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/getSystemSummary.twig +++ /dev/null @@ -1,26 +0,0 @@ -
- {% for item in items %} - {% if item is not empty %} -
- {% if item.getIcon %}{% endif %} - - {%- if item.getUrlParams -%} - - {%- else -%} - - {%- endif -%} - - {{ item.getLabel }}{% if item.getValue %}: {% endif %} - - {%- if item.getUrlParams -%} - - {%- else -%} - - {%- endif -%} - - {% if item.getValue %}{{ item.getValue }}{% endif %} -
- {% endif %} - {% endfor %} -
-
\ No newline at end of file diff --git a/plugins/CoreHome/templates/quickLinks.twig b/plugins/CoreHome/templates/quickLinks.twig deleted file mode 100644 index 6bca77f4fda99b5d0417a501723bc88c07c29a7b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/quickLinks.twig +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/plugins/CoreHome/templates/widgetContainer.twig b/plugins/CoreHome/templates/widgetContainer.twig deleted file mode 100644 index 59932260f936ba42dd9c36cebf8535fc09954544..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/widgetContainer.twig +++ /dev/null @@ -1,20 +0,0 @@ -
-
- - -
\ No newline at end of file diff --git a/plugins/CoreHome/tests/Integration/ChangesTest.php b/plugins/CoreHome/tests/Integration/ChangesTest.php deleted file mode 100644 index 8d3464ae88a167edb2961dd93be6249fe416b5fa..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/ChangesTest.php +++ /dev/null @@ -1,57 +0,0 @@ -getChangeItems(); - self::assertCount(3, $changes); - self::assertNotContains(1, array_column($changes, 'idchange')); - } - - public function testCoreHomeChangesShouldSortChangeListMostRecentFirst() - { - $json = '{"idchange":4,"plugin_name":"CoreHome","version":"4.6.0b5","title":"New feature x added","description":"Now you can do a with b like this","link_name":"For more information go here","link":"https:\/\/www.matomo.org"}'; - $changesModel = new ChangesModel(); - $changes = $changesModel->getChangeItems(); - $r = reset($changes); - unset($r['created_time']); - $this->assertEquals($json, json_encode($r, true)); - } - - public function testCoreHomeChangesShouldAllowChangeItemAddWithoutLink() - { - $json = '{"idchange":3,"plugin_name":"CustomAlerts","version":"4.5.0","title":"New feature y added","description":"Now you can do c with d like this","link_name":null,"link":null}'; - $changesModel = new ChangesModel(); - $changes = $changesModel->getChangeItems(); - $r = $changes[1]; - unset($r['created_time']); - $this->assertEquals($json, json_encode($r, true)); - } -} - -ChangesTest::$fixture = new CreateChanges(); diff --git a/plugins/CoreHome/tests/Integration/Column/UserIdTest.php b/plugins/CoreHome/tests/Integration/Column/UserIdTest.php deleted file mode 100644 index bb29807e437dca3069fb06bcd4d2ec078dfbd28e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/Column/UserIdTest.php +++ /dev/null @@ -1,272 +0,0 @@ -userId = new UserId(); - - $this->setSuperUser(); - } - - public function testIsUsedInAtLeastOneSiteShouldReturnFalseByDefaultWhenNothingIsTracked() - { - $this->assertNotUsedInAtLeastOneSite($idSites = array(1), 'day', $this->date); - } - - public function testIsUsedInAtLeastOneSiteShouldCache() - { - $key = '1.month.' . $this->date; - $cache = Cache::getTransientCache(); - $this->assertFalse($cache->contains($key)); - - $this->userId->isUsedInAtLeastOneSite($idSites = array(1), 'day', $this->date); - - $this->assertTrue($cache->contains($key)); - $this->assertFalse($cache->fetch($key)); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectUserIdWasUsedInAllSitesWhenOneSiteGiven() - { - $this->trackPageviewsWithUsers(); - - $this->assertUsedInAtLeastOneSite($idSites = array(1), 'day', $this->date); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectUserIdWasUsedInAtLeastOneSiteWhenMultipleSitesGiven() - { - $this->trackPageviewsWithUsers(); - - $this->assertUsedInAtLeastOneSite($idSites = array(1,2), 'day', $this->date); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectUserIdWasNotUsedInAtLeastOneSiteWhenMultipleSitesGiven() - { - $this->trackPageviewsWithoutUsers(); - - $this->assertNotUsedInAtLeastOneSite($idSites = array(1,2), 'day', $this->date); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectUserIdWasNotUsedWhenOneSiteGiven() - { - $this->trackPageviewsWithUsers(); - - $this->assertNotUsedInAtLeastOneSite($idSites = array(2), 'day', $this->date); - } - - public function testIsUsedInAtLeastOneSiteShouldDefaultToMonthPeriodAndDetectUserIdIsUsedAlthoughNotTodayButYesterday() - { - $this->trackPageviewsWithUsers(); - - $this->assertUsedInAtLeastOneSite($idSites = array(1), 'day', '2014-04-03'); - } - - public function testIsUsedInAtLeastOneSiteShouldDefaultToMonthPeriodAndDetectUserIdIsUsedAlthoughNotTodayButTomorrow() - { - $this->trackPageviewsWithUsers(); - - $this->assertUsedInAtLeastOneSite($idSites = array(1), 'day', '2014-04-05'); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectItWasNotUsedInMarchAlthoughItWasUsedInApril() - { - $this->trackPageviewsWithUsers(); - - $this->assertNotUsedInAtLeastOneSite($idSites = array(1), 'day', '2014-03-04'); - } - - public function testIsUsedInAtLeastOneSiteShouldDetectItCorrectWithRangeDates() - { - $this->trackPageviewsWithUsers(); - - $this->assertUsedInAtLeastOneSite($idSites = array(1), 'range', '2014-04-01,2014-05-05'); - - // not used in that range date - $this->assertNotUsedInAtLeastOneSite($idSites = array(1), 'range', '2014-04-01,2014-04-03'); - } - - public function testHasDataTableUsersShouldReturnFalseIfEmptyTablesAreGiven() - { - $this->assertNotDataTableHasUsers(new DataTable\Map()); - $this->assertNotDataTableHasUsers(new DataTable()); - } - - public function testHasDataTableUsersShouldHandleADataTableMap() - { - $map = new DataTable\Map(); - $map->addTable(new DataTable(), 'label1'); - $map->addTable(new DataTable(), 'label2'); - $map->addTable($this->getDataTableWithoutUsersColumn(), 'label3'); - - $this->assertNotDataTableHasUsers($map); - - $map->addTable($this->getDataTableWithZeroUsers(), 'label4'); - $map->addTable(new DataTable(), 'label5'); - - $this->assertNotDataTableHasUsers($map); - - $map->addTable($this->getDataTableWithUsers(), 'label6'); - - $this->assertDataTableHasUsers($map); - } - - public function testHasDataTableUsersShouldHandleADataTable() - { - $this->assertNotDataTableHasUsers($this->getDataTableWithoutUsersColumn()); - $this->assertNotDataTableHasUsers($this->getDataTableWithZeroUsers()); - $this->assertDataTableHasUsers($this->getDataTableWithUsers()); - } - - public function testHasDataTableUsersShouldBeAbleToDetectIfNbUsersMetricIdIsused() - { - $table = $this->getDataTableWithZeroUsers(); - $table->renameColumn('nb_users', Metrics::INDEX_NB_USERS); - $this->assertNotDataTableHasUsers($table); - - $table = $this->getDataTableWithUsers(); - $table->renameColumn('nb_users', Metrics::INDEX_NB_USERS); - $this->assertDataTableHasUsers($this->getDataTableWithUsers()); - } - - private function getDataTableWithoutUsersColumn() - { - $tableWithoutUsers = new DataTable(); - $tableWithoutUsers->addRowFromSimpleArray(array('label' => 'test', 'nb_visits' => 0)); - - return $tableWithoutUsers; - } - - private function getDataTableWithZeroUsers() - { - $tableWithZeroUsers = new DataTable(); - $tableWithZeroUsers->addRowFromSimpleArray(array('label' => 'test', 'nb_users' => 0)); - - return $tableWithZeroUsers; - } - - private function getDataTableWithUsers() - { - $tableWithUsers = new DataTable(); - $tableWithUsers->addRowFromSimpleArray(array('label' => 'test', 'nb_users' => 10)); - - return $tableWithUsers; - } - - private function assertNotDataTableHasUsers($table) - { - $has = $this->userId->hasDataTableUsers($table); - $this->assertFalse($has); - } - - private function assertDataTableHasUsers($table) - { - $has = $this->userId->hasDataTableUsers($table); - $this->assertTrue($has); - } - - private function assertUsedInAtLeastOneSite($idSites, $period, $date) - { - $result = $this->userId->isUsedInAtLeastOneSite($idSites, $period, $date); - - $this->assertTrue($result); - } - - private function assertNotUsedInAtLeastOneSite($idSites, $period, $date) - { - $result = $this->userId->isUsedInAtLeastOneSite($idSites, $period, $date); - - $this->assertFalse($result); - } - - private function trackPageviewsWithUsers() - { - $this->trackPageviewsWithDifferentUsers(array('user1', false, 'user3')); - } - - private function trackPageviewsWithoutUsers() - { - $this->trackPageviewsWithDifferentUsers(array(false, false, false)); - } - - private function trackPageviewsWithDifferentUsers($userIds) - { - $tracker = $this->getTracker(); - - foreach ($userIds as $index => $userId) { - $tracker->setForceNewVisit(); - $this->trackPageview($tracker, $userId, '/index/' . $index . '.html'); - } - } - - private function trackPageview(\MatomoTracker $tracker, $userId, $url = null) - { - if (null !== $url) { - $tracker->setUrl('http://www.example.org' . $url); - } - - $tracker->setUserId($userId); - - $title = $url ? : 'test'; - - $tracker->doTrackPageView($title); - } - - private function getTracker() - { - $tracker = Fixture::getTracker(1, $this->date . ' 00:01:01', true, true); - $tracker->setTokenAuth(Fixture::getTokenAuth()); - return $tracker; - } - - private function setSuperUser() - { - FakeAccess::$superUser = true; - } - - public function provideContainerConfig() - { - return array( - 'Piwik\Access' => new FakeAccess(), - ); - } -} diff --git a/plugins/CoreHome/tests/Integration/Column/VisitLastActionTimeTest.php b/plugins/CoreHome/tests/Integration/Column/VisitLastActionTimeTest.php deleted file mode 100644 index 8ddc93d64503397e2fe8610a2f13e956b2e9f751..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/Column/VisitLastActionTimeTest.php +++ /dev/null @@ -1,154 +0,0 @@ -lastAction = new VisitLastActionTime(); - } - - public function tearDown(): void - { - parent::tearDown(); - } - - - private function makeRequest($request) - { - $request['idsite'] = 1; - - return new Request($request); - } - - public function testConvertHourToHourInSiteTimezoneUTC() - { - $idSite = Fixture::createWebsite('2020-01-02 03:04:05'); - $hourConverted = VisitLastActionTime::convertHourToHourInSiteTimezone(5, $idSite); - $this->assertEquals(5, $hourConverted); - } - - public function testConvertHourToHourInSiteTimezoneWithTimezone() - { - $idSite = Fixture::createWebsite( - '2020-01-02 03:04:05', - $ecommerce = 1, - 'Site', - $siteUrl = false, - $siteSearch = 1, - $searchKeywordParameters = null, - $searchCategoryParameters = null, - $timezone = 'Asia/Jakarta' - ); - $hourConverted = VisitLastActionTime::convertHourToHourInSiteTimezone(5, $idSite); - $this->assertEquals(12, $hourConverted); - } - - public function testConvertHourToHourInSiteTimezoneWithTimezoneAndCustomDate() - { - $_GET['period'] = 'day'; - $_GET['date'] = '2020-01-02 03:04:05'; - $idSite = Fixture::createWebsite( - '2020-01-02 03:04:05', - $ecommerce = 1, - 'Site', - $siteUrl = false, - $siteSearch = 1, - $searchKeywordParameters = null, - $searchCategoryParameters = null, - $timezone = 'Asia/Jakarta' - ); - $hourConverted = VisitLastActionTime::convertHourToHourInSiteTimezone(5, $idSite); - unset($_GET['period'], $_GET['date']); - $this->assertEquals(12, $hourConverted); - } - - private function getVisitor(?VisitProperties $previousProperties = null) - { - $visit = new VisitProperties(); - $visit->setProperty('idvisit', '321'); - $visit->setProperty('idvisitor', Common::hex2bin('1234567890234567')); - $visitor = new Visitor($visit, $isKnown = false, $previousProperties); - - return $visitor; - } - - public function testOnExistingVisitWhenPing() - { - $request = $this->makeRequest(array('ping' => 1)); - $visitor = $this->getVisitor(); - $this->assertFalse($this->lastAction->onExistingVisit($request, $visitor, $action = null)); - } - - public function testOnExistingVisitWhenNewVisitReturnsTimeFromRequest() - { - $now = time() - 5; // -5 so we make sure this time is used and not actually now - $request = $this->makeRequest(array('cdt' => $now)); - $this->assertEquals($now, $request->getCurrentTimestamp()); - - $visitor = $this->getVisitor(); - - $expected = Date::factory($now)->getDatetime(); - $this->assertSame($expected, $this->lastAction->onExistingVisit($request, $visitor, $action = null)); - } - - public function testOnExistingVisitWhenKnownVisitRequestTimeIsNewer() - { - $now = time() - 5; // -5 so we make sure this time is used and not actually now - $previousTime = $now - 10; // is older - $request = $this->makeRequest(array('cdt' => $now)); - $this->assertEquals($now, $request->getCurrentTimestamp()); - - $visitor = $this->getVisitor(new VisitProperties([ - 'visit_last_action_time' => Date::factory($previousTime)->getDatetime(), - ])); - - $expected = Date::factory($now)->getDatetime(); - $this->assertSame($expected, $this->lastAction->onExistingVisit($request, $visitor, $action = null)); - } - - public function testOnExistingVisitWhenKnownVisitAndPreviousVisitTimeIsNewer() - { - $now = time() - 5; // -5 so we make sure this time is used and not actually now - $previousTime = $now + 10; // is newer - $request = $this->makeRequest(array('cdt' => $now)); - $this->assertEquals($now, $request->getCurrentTimestamp()); - - $visitor = $this->getVisitor(new VisitProperties([ - 'visit_last_action_time' => Date::factory($previousTime)->getDatetime(), - ])); - - $expected = Date::factory($previousTime)->getDatetime(); - // should keep existing visit last action time - $this->assertSame($expected, $this->lastAction->onExistingVisit($request, $visitor, $action = null)); - } -} diff --git a/plugins/CoreHome/tests/Integration/Columns/Metrics/EvolutionMetricTest.php b/plugins/CoreHome/tests/Integration/Columns/Metrics/EvolutionMetricTest.php deleted file mode 100644 index 8f434904201ece1788b36744736559ef4e352736..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/Columns/Metrics/EvolutionMetricTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNoFailureOnComputeForLabel(DataTable::ID_SUMMARY_ROW); - } - - public function testShouldNotBreakIfTotalsRowGiven() - { - $this->assertNoFailureOnComputeForLabel(DataTable::LABEL_TOTALS_ROW); - } - - private function assertNoFailureOnComputeForLabel($label): void - { - $pastData = new DataTable(); - $cPeriod = new \Piwik\Period\Week(Date::factory('2021-10-10')); - $pastData->setMetadata('period', $cPeriod); - - $evolution = new EvolutionMetric('nb_visits', $pastData); - - $row = new Row([Row::COLUMNS => ['nb_visits' => 5, 'label' => $label]]); - $evolution->compute($row); - - $currency = $row->getMetadata('currencySymbol'); - $this->assertNotEmpty($currency); - } -} diff --git a/plugins/CoreHome/tests/Integration/CoreHomeTest.php b/plugins/CoreHome/tests/Integration/CoreHomeTest.php deleted file mode 100644 index 6aa7c2dacf8feada89f0cb9f5e2320e6bd942e89..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/CoreHomeTest.php +++ /dev/null @@ -1,38 +0,0 @@ -assertEquals($expectedContent, $content); - } - - public function testCoreHomePluginShouldListenToFilterJavaScriptEventAndRemoveSourceMapDefinition() - { - $content = '//# sourceMappingURL=55.map'; - Piwik::postEvent('AssetManager.filterMergedJavaScripts', array(&$content)); - - $this->assertEquals('//# ', $content); - } -} diff --git a/plugins/CoreHome/tests/Integration/LoginAllowlistTest.php b/plugins/CoreHome/tests/Integration/LoginAllowlistTest.php deleted file mode 100644 index 9dc2cdc3b11f9df052085f5267a248771444a5e9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/LoginAllowlistTest.php +++ /dev/null @@ -1,249 +0,0 @@ -cliMode = Common::$isCliMode; - Common::$isCliMode = false; - - $this->allowlist = new CustomLoginAllowlist(); - } - - public function tearDown(): void - { - Common::$isCliMode = $this->cliMode; - parent::tearDown(); - } - - public function testShouldAllowlistApplyToAPIShouldBeEnabledByDefault() - { - $this->assertTrue($this->allowlist->shouldAllowlistApplyToAPI()); - } - - public function testShouldAllowlistApplyToAPICanBeDisabled() - { - $this->setGeneralConfig('login_allowlist_apply_to_reporting_api_requests', '0'); - $this->assertFalse($this->allowlist->shouldAllowlistApplyToAPI()); - } - - public function testShouldAllowlistApplyToAPIEnabled() - { - $this->setGeneralConfig('login_allowlist_apply_to_reporting_api_requests', '1'); - $this->assertTrue($this->allowlist->shouldAllowlistApplyToAPI()); - } - - public function testShouldWhitelistApplyToAPIEnabledBC() - { - $this->setGeneralConfig('login_whitelist_apply_to_reporting_api_requests', '1'); - $this->assertTrue($this->allowlist->shouldAllowlistApplyToAPI()); - } - - public function testShouldCheckWhitelistShouldNotBeCheckedByDefaultAndNotHaveAnyIps() - { - $this->assertFalse($this->allowlist->shouldCheckAllowlist()); - } - - public function testShouldCheckAllowlistShouldBeCheckedIfHasAtLeastOneIp() - { - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1']); - $this->assertTrue($this->allowlist->shouldCheckAllowlist()); - } - - public function testShouldCheckAllowlistShouldNotBeCheckedIfExecutedFromCLI() - { - Common::$isCliMode = true; - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1']); - $this->assertFalse($this->allowlist->shouldCheckAllowlist()); - } - - public function testShouldCheckWhitelistShouldBeCheckedIfHasAtLeastOneIpForBC() - { - $this->setGeneralConfig('login_whitelist_ip', ['192.168.33.1']); - $this->assertTrue($this->allowlist->shouldCheckAllowlist()); - } - - public function testShouldCheckWhitelistShouldNotBeCheckedIfExecutedFromCLIForBC() - { - Common::$isCliMode = true; - $this->setGeneralConfig('login_whitelist_ip', ['192.168.33.1']); - $this->assertFalse($this->allowlist->shouldCheckAllowlist()); - } - - public function testShouldCheckWhitelistShouldNotBeCheckedIfOnlyEmptyEntries() - { - $this->setGeneralConfig('login_allowlist_ip', ['', ' ']); - $this->assertFalse($this->allowlist->shouldCheckAllowlist()); - } - - public function testGetAllowlistedLoginIpsShouldReturnEmptyArrayByDefault() - { - $this->assertSame($this->allowlist->getAllowlistedLoginIps(), []); - } - - public function testGetAllowlistedLoginIpsShouldReturnIpsAndTrimIfNeeded() - { - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1', ' 127.0.0.1 ', '2001:0db8:85a3:0000:0000:8a2e:0370:7334']); - $this->assertSame(['192.168.33.1', '127.0.0.1', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'], $this->allowlist->getAllowlistedLoginIps()); - } - - public function testGetAllowlistedLoginIpsShouldResolveIp() - { - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1', 'origin.matomo.org', '127.0.0.1']); - $this->assertSame(['192.168.33.1', '185.31.40.177', '2a00:b6e0:1:200:177::1', '127.0.0.1'], $this->allowlist->getAllowlistedLoginIps()); - } - - public function testGetAllowlistedLoginIpsShouldResolveIpv6Only() - { - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1', 'integration-test-do-not-delete.media-analytics.net', '127.0.0.1']); - $this->assertSame(['192.168.33.1', '::1', '127.0.0.1'], $this->allowlist->getAllowlistedLoginIps()); - } - - public function testGetAllowlistedLoginIpsShouldReturnRanges() - { - $this->setGeneralConfig('login_allowlist_ip', ['192.168.33.1', '204.93.177.0/25', '2001:db9::/48', '127.0.0.1']); - $this->assertSame(['192.168.33.1', '204.93.177.0/25', '2001:db9::/48', '127.0.0.1'], $this->allowlist->getAllowlistedLoginIps()); - } - - public function testGetAllowlistedLoginIpsShouldNotBeCheckedIfOnlyEmptyEntries() - { - $this->setGeneralConfig('login_allowlist_ip', ['', '192.168.33.1 ', ' ']); - $this->assertSame(['192.168.33.1'], $this->allowlist->getAllowlistedLoginIps()); - } - - public function testGetAllowlistedLoginIpsShouldNotReturnDuplicates() - { - $this->setGeneralConfig('login_allowlist_ip', [' 192.168.33.1', '192.168.33.1 ', ' 192.168.33.1 ', '192.168.33.1']); - $this->assertSame(['192.168.33.1'], $this->allowlist->getAllowlistedLoginIps()); - } - - /** - * @dataProvider getIpAllowlistedTests - */ - public function testIsIpAllowlisted($expectedIsAllowlisted, $ipString) - { - $ipsAllowlisted = [ - '127.0.0.1', - '192.168.33.1', - '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - '204.93.240.*', - '204.93.177.0/25', - '2001:db9::/48', - ]; - $this->setGeneralConfig('login_allowlist_ip', $ipsAllowlisted); - $this->assertSame($expectedIsAllowlisted, $this->allowlist->isIpAllowed($ipString)); - } - - /** - * @dataProvider getIpAllowlistedTests - */ - public function testIsIpAllowedWhenNoIpsConfiguredAllIpsAreAllowed($expectedIsWhitelisted, $ipString) - { - $this->assertFalse($this->allowlist->isIpAllowed($ipString)); - } - - /** - * @dataProvider getIpAllowlistedTests - */ - public function testCheckIsAllowed($expectedIsAllowed, $ipString) - { - $ipsAllowed = [ - '127.0.0.1', - '192.168.33.1', - '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - '204.93.240.*', - '204.93.177.0/25', - '2001:db9::/48', - ]; - $this->setGeneralConfig('login_allowlist_ip', $ipsAllowed); - - if ($expectedIsAllowed) { - self::expectNotToPerformAssertions(); - - $this->allowlist->checkIsAllowed($ipString); - } else { - self::expectException(NoAccessException::class); - - $this->allowlist->checkIsAllowed($ipString); - } - } - - public function getIpAllowlistedTests() - { - return array( - array(true, '127.0.0.1'), - array(true, '192.168.33.1'), - array(true, '2001:0db8:85a3:0000:0000:8a2e:0370:7334'), - array(true, '204.93.240.5'), - array(true, '204.93.177.5'), - array(true, '2001:db9:0000:ffff:ffff:ffff:ffff:ffff'), - - - array(false, '127.0.0.2'), - array(false, '192.168.33.2'), - array(false, '2001:0db8:85a3:0000:0000:8a2e:0370:7333'), - array(false, '204.93.239.5'), - array(false, '204.93.177.255'), - array(false, '2001:db8:0000:ffff:ffff:ffff:ffff:ffff'), - ); - } - - private function setGeneralConfig($name, $value) - { - $config = Config::getInstance(); - $general = $config->General; - $general[$name] = $value; - $config->General = $general; - $config->forceSave(); - } - - public function provideContainerConfig() - { - return array( - 'Piwik\Access' => new FakeAccess(), - ); - } -} diff --git a/plugins/CoreHome/tests/Integration/ReportingMenuGroupsTest.php b/plugins/CoreHome/tests/Integration/ReportingMenuGroupsTest.php deleted file mode 100644 index a26f9c9f47193739a7567a4f0af91314e4e2b0a3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/ReportingMenuGroupsTest.php +++ /dev/null @@ -1,114 +0,0 @@ -addObserver('Category.addSubcategories', function (&$subcategories) { - $subcategory = new Subcategory(); - $subcategory->setId('CoreHome_TestAiInsightsSub'); - $subcategory->setCategoryId('General_AIAssistants'); - $subcategory->setOrder(1); - $subcategories[] = $subcategory; - }); - - MenuTop::unsetInstance(); - } - - public function tearDown(): void - { - unset($_GET['idSite']); - MenuTop::unsetInstance(); - parent::tearDown(); - } - - public function testTopMenuContainsAnEntryForTheAiInsightsReportingGroup() - { - $menu = MenuTop::getInstance()->getMenu(); - - $this->assertArrayHasKey('CoreHome_AIInsights', $menu); - - // The section is carried in the URL hash (not the query string) so it does not leak into other - // links; category/subcategory are resolved client-side by the reporting SPA. - $url = $menu['CoreHome_AIInsights']['_url']; - $this->assertIsString($url); - $this->assertStringStartsWith('index.php?', $url); - - [$queryPart, $hashPart] = explode('#', $url, 2); - $this->assertStringContainsString('module=CoreHome', $queryPart); - $this->assertStringContainsString('action=index', $queryPart); - $this->assertStringNotContainsString('group=', $queryPart); - $this->assertStringContainsString('group=CoreHome_AIInsights', $hashPart); - - // the entry is tagged so the active highlight can be synced client-side from the hash - $this->assertSame('data-reporting-group="CoreHome_AIInsights"', $menu['CoreHome_AIInsights']['_attribute']); - } - - public function testCategoryListExposesGroupsWithoutTrackingRequirement() - { - // AI Insights is exempt from the tracker-setup screen, the default Analytics group is not. - $groups = CategoryList::get()->getGroupsWithoutTrackingRequirement(); - - $this->assertContains('CoreHome_AIInsights', $groups); - $this->assertNotContains('', $groups); - } - - public function testTopMenuDoesNotCreateEntriesForDefaultGroupCategories() - { - $menu = MenuTop::getInstance()->getMenu(); - - // Regular (Analytics) categories must not get their own top-menu entry. - $this->assertArrayNotHasKey('General_Visitors', $menu); - $this->assertArrayNotHasKey('General_Actions', $menu); - } - - public function testAnalyticsTopMenuEntryCarriesTheDefaultReportingGroupInTheHashOnly() - { - $menu = MenuTop::getInstance()->getMenu(); - - $this->assertArrayHasKey('Dashboard_TopMenuTitle', $menu); - - // The (default) section is carried in the hash with an empty group id, not in the query string. - $url = $menu['Dashboard_TopMenuTitle']['_url']; - $this->assertIsString($url); - $this->assertStringStartsWith('index.php?', $url); - - [$queryPart, $hashPart] = explode('#', $url, 2); - $this->assertStringContainsString('module=CoreHome', $queryPart); - $this->assertStringContainsString('action=index', $queryPart); - $this->assertStringNotContainsString('group=', $queryPart); - $this->assertStringContainsString('group=', $hashPart); - $this->assertStringNotContainsString('group=CoreHome', $hashPart); - - // the entry is tagged as the default section so the active highlight can be synced client-side - $this->assertSame('data-reporting-group=""', $menu['Dashboard_TopMenuTitle']['_attribute']); - } -} diff --git a/plugins/CoreHome/tests/Integration/Tracker/VisitRequestProcessorTest.php b/plugins/CoreHome/tests/Integration/Tracker/VisitRequestProcessorTest.php deleted file mode 100644 index 456fce7e56d8f94f837edf62e709193d79256252..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Integration/Tracker/VisitRequestProcessorTest.php +++ /dev/null @@ -1,231 +0,0 @@ -setDimensionsWithOnNewVisit([false, false, false]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-02 08:08:34', - $thisActionTime = '2012-01-02 08:12:45', - $isVisitorKnown = true, - [ 'trackerAlwaysNewVisitor' => true ] - ); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsTrueIfNewVisitQueryParamIsSet() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-02 08:08:34', - $thisActionTime = '2012-01-02 08:12:45', - $isVisitorKnown = true, - [], - ['new_visit' => '1'] - ); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsFalseIfLastActionTimestampIsWithinVisitTimeLengthAndNoDimensionForcesVisitAndVisitorKnown() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-02 08:08:34', - $thisActionTime = '2012-01-02 08:12:45', - $isVisitorKnown = true - ); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertFalse($result); - } - - public function testIsVisitNewReturnsTrueIfLastActionTimestampWasYesterday() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - - // test same day - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-01 23:59:58', - $thisActionTime = '2012-01-01 23:59:59', - $isVisitorKnown = true - ); - $result = $visit->isVisitNew($visitProperties, $request, null); - $this->assertFalse($result); - - // test different day - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-01 23:59:58', - $thisActionTime = '2012-01-02 00:00:01', - $isVisitorKnown = true - ); - $result = $visit->isVisitNew($visitProperties, $request, null); - $this->assertTrue($result); - } - - - public function testIsVisitNewReturnsTrueIfLastActionTimestampIsNotWithinVisitTimeLengthAndNoDimensionForcesVisitAndVisitorNotKnown() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction($lastActionTime = '2012-01-02 08:08:34', $thisActionTime = '2012-01-02 09:12:45'); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsTrueIfLastActionTimestampIsWithinVisitTimeLengthAndDimensionForcesVisit() - { - $this->setDimensionsWithOnNewVisit([false, false, true]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction($lastActionTime = '2012-01-02 08:08:34', $thisActionTime = '2012-01-02 08:12:45'); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsTrueIfDimensionForcesVisitAndVisitorKnown() - { - $this->setDimensionsWithOnNewVisit([false, false, true]); - - /** @var VisitRequestProcessor $visit */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction($lastActionTime = '2012-01-02 08:08:34', $thisActionTime = '2012-01-02 08:12:45'); - - $result = $visit->isVisitNew($visitProperties, $request, null); - - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsTrueWhenUserIdChanges() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - - /** @var VisitRequestProcessor $visit */ - /** @var Request $request */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-02 08:08:34', - $thisActionTime = '2012-01-02 08:12:45', - $isVisitorKnown = true - ); - - $visitProperties->setProperty('user_id', 'foo_different'); - $request->setParam('uid', 'foo'); - $result = $visit->isVisitNew($visitProperties, $request, null); - $this->assertTrue($result); - } - - public function testIsVisitNewReturnsTrueWhenUserChangesAndUserIdNotOverwritesVisitorId() - { - $this->setDimensionsWithOnNewVisit([false, false, false]); - $config = Config::getInstance(); - $tracker = $config->Tracker; - $tracker['enable_userid_overwrites_visitorid'] = 0; - $config->Tracker = $tracker; - - /** @var VisitRequestProcessor $visit */ - /** @var VisitProperties $visitProperties */ - /** @var Request $request */ - [$visit, $visitProperties, $request] = $this->makeVisitorAndAction( - $lastActionTime = '2012-01-02 08:08:34', - $thisActionTime = '2012-01-02 08:12:45', - $isVisitorKnown = true - ); - - $visitProperties->setProperty('user_id', 'foo_different'); - $request->setParam('uid', 'foo'); - $result = $visit->isVisitNew($visitProperties, $request, null); - $this->assertTrue($result); - } - - private function makeVisitorAndAction( - $lastActionTimestamp, - $currentActionTime, - $isVisitorKnown = false, - $processorParams = [], - $extraRequestParams = [] - ) { - $idsite = API::getInstance()->addSite("name", "http://piwik.net/"); - - /** @var Request $request */ - [$visit, $request] = $this->prepareVisitWithRequest( - array_merge(['idsite' => $idsite], $extraRequestParams), - $currentActionTime, - $processorParams - ); - - $visitProperties = new VisitProperties(); - $visitProperties->setProperty('visit_last_action_time', Date::factory($lastActionTimestamp)->getTimestamp()); - $request->setMetadata('CoreHome', 'isVisitorKnown', $isVisitorKnown); - - return [$visit, $visitProperties, $request]; - } - - private function setDimensionsWithOnNewVisit($dimensionOnNewVisitResults) - { - $dimensions = []; - foreach ($dimensionOnNewVisitResults as $onNewVisitResult) { - $dim = $this->getMockBuilder(VisitDimension::class) - ->onlyMethods(['shouldForceNewVisit', 'getColumnName']) - ->getMock(); - $dim->expects($this->any())->method('shouldForceNewVisit')->will($this->returnValue($onNewVisitResult)); - $dimensions[] = $dim; - } - - $cache = Cache::getTransientCache(); - $cache->save(CacheId::pluginAware('VisitDimensions'), $dimensions); - Visit::$dimensions = null; - } - - private function prepareVisitWithRequest($requestParams, $requestDate, $params = []) - { - $request = new Request($requestParams); - $request->setCurrentTimestamp(Date::factory($requestDate)->getTimestamp()); - - $visit = self::$fixture->piwikEnvironment->getContainer()->make('Piwik\Plugins\CoreHome\Tracker\VisitRequestProcessor', $params); - - return [$visit, $request]; - } -} diff --git a/plugins/CoreHome/tests/UI/AjaxHelperSessionTimeout_spec.js b/plugins/CoreHome/tests/UI/AjaxHelperSessionTimeout_spec.js deleted file mode 100644 index 21b11c4b68d01f24208115463e3989442d4bec56..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/AjaxHelperSessionTimeout_spec.js +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * AjaxHelper session timeout UI test. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('AjaxHelperSessionTimeout', function () { - this.fixture = "Piwik\\Tests\\Fixtures\\OneVisitorTwoVisits"; - - const reportUrl = '?module=CoreHome&action=index&idSite=1&period=day&date=yesterday'; - - async function loadReportPage() { - await page.goto(reportUrl); - await page.waitForNetworkIdle(); - await page.waitForFunction(() => window.ajaxHelper && window.piwikHelper); - } - - const cases = [ - { - name: 'should refresh when a request indicates the session has timed out', - headerValue: '1', - expectedRefresh: true, - }, - { - name: 'should not refresh when the session timeout header is missing', - headerValue: null, - expectedRefresh: false, - }, - ]; - - cases.forEach(({ name, headerValue, expectedRefresh }) => { - it(name, async function () { - await loadReportPage(); - - const refreshCalled = await page.evaluate((value) => { - document.cookie = 'matomo_session_timed_out=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; - window._ajaxSessionTimedOutRefresh = false; - const originalRefresh = window.piwikHelper.refreshAfter; - const originalAjax = window.$.ajax; - - window.piwikHelper.refreshAfter = (timeout) => { - window._ajaxSessionTimedOutRefresh = timeout === 0; - }; - - const mockXhr = { - status: 401, - statusText: 'error', - getResponseHeader: (name) => (name === 'X-Matomo-Session-Timed-Out' ? value : null), - then() { - return this; - }, - fail(callback) { - this._fail = callback; - return this; - }, - }; - - window.$.ajax = () => mockXhr; - - const helper = new window.ajaxHelper(); - helper.send(); - if (typeof mockXhr._fail === 'function') { - mockXhr._fail(mockXhr); - } - - window.$.ajax = originalAjax; - window.piwikHelper.refreshAfter = originalRefresh; - - return window._ajaxSessionTimedOutRefresh; - }, headerValue); - - expect(refreshCalled).to.equal(expectedRefresh); - }); - }); -}); diff --git a/plugins/CoreHome/tests/UI/ChangeTitle_spec.js b/plugins/CoreHome/tests/UI/ChangeTitle_spec.js deleted file mode 100644 index 98cd93b7bd35deee4e664aa9f93008a17ae99bc4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/ChangeTitle_spec.js +++ /dev/null @@ -1,199 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * ChangeTitle UI tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('ChangeTitle', function () { - const generalParams = '?module=CoreHome&action=index&idSite=1&period=day&date=2025-11-11'; - let url = generalParams+ "&category=Dashboard_Dashboard&subcategory=1"; - - /** - * Get the query parameters from a URL string. - * We will use this to create the expected title - * @param urlString - * @returns {{category, subcategory, date, segment}} - */ - function extractFilters(urlString) { - const url = new URL(urlString); - - // base query params - const params = url.searchParams; - // Matomo sometimes stores params in the hash (`#?foo=bar`), so merge those too. - if (url.hash && url.hash.startsWith('#?')) { - for (const [key, value] of new URLSearchParams(url.hash.slice(2))) { - params.set(key, value); // prefer hash values when present - } - } - return { - category: params.get('category') || '', - subcategory: params.get('subcategory') || '', - date: params.get('date') || '', - segment: params.get('segment') || '' - }; - } - - /** - * Adding a mapping of category and subcategory ids to their names. - * We just fake/hard-code the names for expected titles. - * @param categoryId - * @param subCategoryId - * @returns {{categoryName: string, subcategoryName: string}} - */ - function getActiveMenuNames(categoryId, subCategoryId) { - let catNameMap = { - 'Dashboard_Dashboard': 'Dashboard', - 'General_Visitors': 'Visitors', - 'General_Actions': 'Behaviour', - }; - let subCatNameMap = { - '1': 'D4', - 'General_Overview': 'Overview ', - 'Actions_SubmenuPagesEntry' : 'Entry pages', - 'UserCountryMap_RealTimeMap': 'Real-time Map', - }; - let catName = '' , subCatName = ''; - if (categoryId !=='') { - catName = catNameMap[categoryId]; - } - if (subCategoryId !=='') { - subCatName = subCatNameMap[subCategoryId]; - } - return {categoryName: catName, subcategoryName: subCatName}; - } - - /** - * Adding a mapping of segment ids to their names. - * We just fake/hard-code the names for expected titles. - * @param segmentId - * @returns {string} - */ - function getSegment(segmentId) { - if (!segmentId || segmentId === '') { - return ' - All visits'; - } - const segments = { - 'browserCode==FF': '', - 'continentCode==eur': 'From Europe {{_Vue.h.constructor`_x(51)`()}}', - 'actions>=2' : 'Multiple actions', - }; - return ` - ${segments[segmentId]}`; - } - async function escapeHtml(page, str) { - return await page.evaluate((raw) => window.piwikHelper.htmlEntities(raw), str); - } - - /** - * This will try to create the expected title based on what we get from the URL. - * @param catId - * @param subCatId - * @param date - * @param segment - * @returns {Promise} - */ - async function makeTitle(catId, subCatId, date, segment) { - let titleSuffix = 'Web Analytics Reports - Matomo'; - let {categoryName, subcategoryName} = getActiveMenuNames(catId, subCatId); - categoryName = await escapeHtml(page, categoryName ?? ''); - subcategoryName = await escapeHtml(page, subcategoryName ?? ''); - const siteName = await page.evaluate(() => window.piwik.siteName); - if (categoryName === subcategoryName) { - subcategoryName = null; - } - const catTitle = subcategoryName ? ` - ${categoryName} > ${subcategoryName}` : categoryName; - segment = await getSegment(segment); - segment = await escapeHtml(page, segment); - return `${siteName} - ${date}${catTitle}${segment} - ${titleSuffix}`; - } - - it ('should show the default title', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#dashboard', {visible: true}); - const { category, subcategory, date, segment } = extractFilters(page.url()); - let currentTitle = await page.title(); - let title = await makeTitle(category, subcategory, date, segment); - expect(currentTitle).to.equal(title); - }); - - /** We just go through some known categories and subcategories to make sure the title changes accordingly. */ - it ('should change the title based on new category and subcategory when clicking pages', async function () { - await page.click('div.reportingMenu ul.navbar li[data-category-id="General_Actions"]'); - await page.waitForNetworkIdle(); - await page.click('div.reportingMenu ul.navbar li[data-category-id="General_Actions"] ul li:nth-of-type(2)'); - await page.waitForNetworkIdle(); - let { category, subcategory, date, segment } = extractFilters(page.url()); - let title = await makeTitle(category, subcategory, date, segment); - let currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - - await page.click('div.reportingMenu ul.navbar li[data-category-id="General_Visitors"]'); - await page.waitForNetworkIdle(); - await page.click('div.reportingMenu ul.navbar li[data-category-id="General_Visitors"] ul li:nth-of-type(4)'); - await page.waitForNetworkIdle(); - let { category: category2, subcategory: subcategory2, date: date2, segment: segment2 } = extractFilters(page.url()); - title = await makeTitle(category2, subcategory2, date2, segment2); - currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - }); - - it ('should change the title if date changes', async function () { - let newdate = '2025-04-15'; - await page.goto(`${url}#?date=${newdate}`); - await page.waitForNetworkIdle(); - let theUrl = new URL(page.url()); - const { category, subcategory, date, segment } = extractFilters(page.url()); - let title = await makeTitle(category, subcategory, date, segment); - let currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - }); - - /** We go through the segments and make sure the title changes accordingly. */ - it ('should change the title if new segment is chosen', async function () { - await page.click('div.segmentEditorPanel div.segmentListContainer div.segmentationContainer a.title'); - await page.waitForNetworkIdle(); - let segmentDataDef = 'continentCode==eur'; - let me = await page.waitForSelector(`div.segmentationContainer div.segmentList ul li:nth-of-type(3)`); - await me.click(); - await page.waitForNetworkIdle(); - const { category, subcategory, date, segment } = extractFilters(page.url()); - let title = await makeTitle(category, subcategory, date, segment); - let currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - - await page.click('div.segmentEditorPanel div.segmentListContainer div.segmentationContainer a.title'); - await page.waitForNetworkIdle(); - segmentDataDef = 'browserCode==FF'; - me = await page.waitForSelector(`div.segmentationContainer div.segmentList ul li:nth-of-type(2)`); - await me.click(); - await page.waitForNetworkIdle(); - let { category: category2, subcategory: subcategory2, date: date2, segment: segment2 } = extractFilters(page.url()); - title = await makeTitle(category2, subcategory2, date2, segment2); - currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - - await page.click('div.segmentEditorPanel div.segmentListContainer div.segmentationContainer a.title'); - await page.waitForNetworkIdle(); - me = await page.waitForSelector(`div.segmentationContainer div.segmentList ul li:nth-of-type(1)`); - await me.click(); - await page.waitForNetworkIdle(); - let { category: category3, subcategory: subcategory3, date: date3, segment: segment3 } = extractFilters(page.url()); - title = await makeTitle(category3, subcategory3, date3, segment3); - currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - - await page.click('div.segmentEditorPanel div.segmentListContainer div.segmentationContainer a.title'); - await page.waitForNetworkIdle(); - me = await page.waitForSelector(`div.segmentationContainer div.segmentList ul li:nth-of-type(4)`); - await me.click(); - await page.waitForNetworkIdle(); - let { category: category4, subcategory: subcategory4, date: date4, segment: segment4 } = extractFilters(page.url()); - title = await makeTitle(category4, subcategory4, date4, segment4); - currentTitle = await page.title(); - expect(currentTitle).to.equal(title); - }); - -}); diff --git a/plugins/CoreHome/tests/UI/DataTable_spec.js b/plugins/CoreHome/tests/UI/DataTable_spec.js deleted file mode 100644 index ad9e259635aba9ad1b656e63739fd569225f29e1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/DataTable_spec.js +++ /dev/null @@ -1,179 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * UI regression for DataTable sorting & AJAX reloading. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('DataTable', function () { - this.optionsOverride = { - 'persist-fixture-data': false - }; - - const devicesUrl = "?module=CoreHome&action=index&idSite=3&period=day&date=yesterday&category=General_Visitors&subcategory=DevicesDetection_Devices"; - const widgetSelector = '#widgetDevicesDetectiongetType'; - const selectors = { - metricColumn: `${widgetSelector} #nb_uniq_visitors`, - limitDropdownTrigger: `${widgetSelector} .limitSelection .select-wrapper input.select-dropdown`, - limitDropdownMenu: `${widgetSelector} .limitSelection .select-wrapper ul.select-dropdown`, - visualizationTrigger: `${widgetSelector} .dataTableHeaderControls .dataTableControls a.activateVisualizationSelection`, - visualizationTriggerIcon: `${widgetSelector} .dataTableHeaderControls .dataTableControls a.activateVisualizationSelection > span, ${widgetSelector} .dataTableHeaderControls .dataTableControls a.activateVisualizationSelection > img`, - visualizationMenu: `${widgetSelector} .dataTableHeaderControls .dataTableControls ul.dropdown-content.dataTableFooterIcons`, - visualizationButtons: `${widgetSelector} .dataTableHeaderControls .dataTableControls ul.dropdown-content.dataTableFooterIcons li .tableIcon[data-footer-icon-id]`, - configureTrigger: `${widgetSelector} .dataTableHeaderControls .dataTableControls a.dropdownConfigureIcon`, - totalsRowToggle: '.dataTableShowTotalsRow', - }; - - async function openDevicesDetectionWidget() { - await page.goto(devicesUrl); - await page.waitForNetworkIdle(); - await page.waitForSelector(widgetSelector, { visible: true }); - await page.waitForNetworkIdle(); - } - - async function loadWidget() { - await openDevicesDetectionWidget(); - const widget = await page.$(widgetSelector); - expect(widget).to.be.ok; - return widget; - } - - async function trackViewDataTableRequests(action) { - let ajaxRequestCount = 0; - const requestHandler = (request) => { - if (request.resourceType() === 'xhr' && request.url().indexOf('saveViewDataTableParameters') !== -1) { - ajaxRequestCount += 1; - } - }; - page.webpage.on('request', requestHandler); - try { - await action(); - } finally { - page.webpage.removeListener('request', requestHandler); - } - return ajaxRequestCount; - } - - async function interactWithColumnSortingAndLimit() { - await page.waitForSelector(selectors.metricColumn, { visible: true }); - await page.click(selectors.metricColumn); - await page.waitForNetworkIdle(); - await page.click(selectors.metricColumn); - await page.waitForNetworkIdle(); - - await page.waitForSelector(selectors.limitDropdownTrigger, { visible: true }); - await page.click(selectors.limitDropdownTrigger); - - await page.waitForSelector(selectors.limitDropdownMenu, { visible: true }); - const dropdown = await page.$(selectors.limitDropdownMenu); - expect(dropdown).to.be.ok; - await page.click(`${selectors.limitDropdownMenu} li:nth-child(1)`); - await page.waitForNetworkIdle(); - } - - async function changeVisualization() { - await page.waitForSelector(selectors.visualizationTriggerIcon, { visible: true }); - await page.click(selectors.visualizationTriggerIcon); - await page.waitForSelector(selectors.visualizationMenu, { visible: true }); - - await page.waitForFunction((selector) => document.querySelectorAll(selector).length >= 2, {}, selectors.visualizationButtons); - await page.$$eval(selectors.visualizationButtons, (buttons) => { - if (buttons.length < 2) { - throw new Error('Not enough visualization buttons found'); - } - buttons[1].click(); - }); - await page.waitForNetworkIdle(); - } - - async function toggleTotalsRow(times = 1) { - await page.waitForSelector(selectors.configureTrigger, { visible: true }); - for (let i = 0; i < times; i += 1) { - await page.click(selectors.configureTrigger); - await page.waitForSelector(selectors.totalsRowToggle, { visible: true }); - await page.click(selectors.totalsRowToggle); - await page.waitForNetworkIdle(); - } - } - - it('should allow saving of preference for normal user when changing sorting and table limits', async function () { - await loadWidget(); - const reportPage = await page.$('.reporting-page'); - expect(reportPage).to.be.ok; - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await interactWithColumnSortingAndLimit(); - }); - - expect(ajaxRequestCount).to.be.equal(3); - }); - - it('should allow saving preference when changing the visualization of the devices widget', async function () { - await loadWidget(); - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await changeVisualization(); - }); - - expect(ajaxRequestCount).to.be.equal(1); - }); - - it('should allow saving preference when toggling the totals row via the configuration menu', async function () { - await loadWidget(); - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await toggleTotalsRow(2); - }); - - expect(ajaxRequestCount).to.be.equal(2); - }); - - describe('As anonymous user', function () { - before(async function () { - await testEnvironment.callApi('UsersManager.setUserAccess', { - userLogin: 'anonymous', - access: 'view', - idSites: [3], - }); - testEnvironment.testUseMockAuth = 0; - await testEnvironment.save(); - }); - - after(async function () { - testEnvironment.testUseMockAuth = 1; - await testEnvironment.save(); - }); - - it('should not save preferences when anonymous user performs datatable actions', async function () { - await loadWidget(); - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await interactWithColumnSortingAndLimit(); - }); - - expect(ajaxRequestCount).to.be.equal(0); - }); - - it('should not save preferences when anonymous user changes visualization', async function () { - await loadWidget(); - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await changeVisualization(); - }); - - expect(ajaxRequestCount).to.be.equal(0); - }); - - it('should not save preferences when anonymous user toggles totals row', async function () { - await loadWidget(); - - const ajaxRequestCount = await trackViewDataTableRequests(async () => { - await toggleTotalsRow(2); - }); - - expect(ajaxRequestCount).to.be.equal(0); - }); - }); -}); diff --git a/plugins/CoreHome/tests/UI/Notifications_spec.js b/plugins/CoreHome/tests/UI/Notifications_spec.js deleted file mode 100644 index b26ea896df81bf9e2e9ebe41d25acef44c4ef968..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/Notifications_spec.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * Dashboard screenshot tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('Notifications', function () { - this.fixture = "Piwik\\Tests\\Fixtures\\OneVisit"; - - var url = "?module=CoreAdminHome&action=home&idSite=1&period=day&date=yesterday"; - - it('should show notifications', async function () { - await page.goto(url + '&setNotifications=1'); - await page.waitForNetworkIdle(); - - var elem = await page.waitForSelector('#notificationContainer'); - - expect(await elem.screenshot()).to.matchImage('loaded'); - }); - - it('should still show persistent notifications on reload', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - - var elem = await page.waitForSelector('#notificationContainer'); - - expect(await elem.screenshot()).to.matchImage('reloaded'); - }); - - it('should close a notification', async function () { - await page.click('.notification:first-child .close'); - await page.waitForNetworkIdle(); - - var elem = await page.waitForSelector('#notificationContainer'); - - expect(await elem.screenshot()).to.matchImage('close'); - }); - - it('should still be closed on reload', async function () { - await page.reload(); - await page.waitForNetworkIdle(); - - var elem = await page.waitForSelector('#notificationContainer'); - - expect(await elem.screenshot()).to.matchImage('close_reload'); - }); -}); diff --git a/plugins/CoreHome/tests/UI/ReportExportPopover_spec.js b/plugins/CoreHome/tests/UI/ReportExportPopover_spec.js deleted file mode 100644 index 4b93eee6cd76690bcfb414179cfadbe76a659e63..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/ReportExportPopover_spec.js +++ /dev/null @@ -1,414 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * ReportExportPopover UI tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('ReportExportPopover', function () { - this.fixture = "Piwik\\Tests\\Fixtures\\UITestFixture"; - - const url = "?module=CoreHome&action=index&idSite=1&period=day&date=2012-08-09" - + "#?idSite=1&period=day&date=2012-08-09&category=General_Actions&subcategory=General_Pages"; - - async function isOptionExpandSubtableVisible() { - return await page.evaluate(() => ( - $('#reportExport div[name="option_expanded"] div.form-group.matomo-form-field').is(':visible') - )); - } - async function isOptionVisible(optionName) { - return await page.evaluate((nameValue) => ( - $(`#reportExport div[name="${nameValue}"] div.form-group.matomo-form-field`).is(':visible') - ), optionName); - } - async function clickFormat(format){ - await page.evaluate((formatValue) => { - const selector = `#reportExport input[name="format"][value="${formatValue}"]`; - const input = document.querySelector(selector); - if (input) { - input.click(); - } - }, format); - } - async function clickOption(optionName) { - await page.evaluate((nameValue) => { - const selector = `#reportExport div[name="${nameValue}"] input[type="checkbox"][name="${nameValue}"]`; - const input = document.querySelector(selector); - if (input) { - input.click(); - } - }, optionName); - } - async function expectOptionChecked(optionName, expected) { - const selector = `#reportExport div[name="${optionName}"] input[type="checkbox"]`; - await page.waitForSelector(selector); - const actual = await page.evaluate((sel) => { - const input = document.querySelector(sel); - return input ? input.checked : null; - }, selector); - expect(actual, `option ${optionName} checked state`).to.equal(expected); - } - async function expectExportLinkContains(substring) { - const href = await page.evaluate(() => ( - document.querySelector('#reportExport a.btn')?.getAttribute('href') || '' - )); - expect(href).to.contain(substring); - } - - async function expectExportLinkNotContains(substring) { - const href = await page.evaluate(() => ( - document.querySelector('#reportExport a.btn')?.getAttribute('href') || '' - )); - expect(href).to.not.contain(substring); - } - - it('should hide expanded option when CSV, TSV or HTML format is selected and show it for everything else', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - const formatsToCheck = ['CSV', 'JSON', 'TSV', 'HTML', 'RSS', 'XML']; - const formatsToHideExpanded = ['CSV', 'TSV', 'HTML']; - - for (const format of formatsToCheck) { - await clickFormat(format); - const shouldShowExpanded = !formatsToHideExpanded.includes(format); - await page.waitForFunction( - (formatValue) => ( - document.querySelector(`#reportExport input[name="format"][value="${formatValue}"]`)?.checked === true - ), - {}, - format, - ); - const optionIsExpanded = await isOptionExpandSubtableVisible(); - expect(optionIsExpanded, `format ${format} should ${shouldShowExpanded ? 'show' : 'hide'} expanded option`) - .to.equal(shouldShowExpanded); - } - - }); - - it('should default to TSV with flat selected on open, then keep user subtable selection when switching formats', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="TSV"]')?.checked === true - )); - // Intended default on open: TSV + flat (when flat export is available). - await expectOptionChecked('option_flat', true); - await expectOptionChecked('option_expanded', false); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('JSON'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="JSON"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', true); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkContains('expanded=1'); - - // CSV/TSV do not support expanded. In default mode, CSV/TSV keep flat checked. - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', true); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('JSON'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="JSON"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', true); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkContains('expanded=1'); - - // Clear both options and make sure this preference is remembered across format switches. - await clickOption('option_expanded'); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('TSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="TSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('JSON'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="JSON"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - // Switch to flat preference and verify it is remembered across format switches. - await clickOption('option_flat'); - await expectOptionChecked('option_flat', true); - await expectOptionChecked('option_expanded', false); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', true); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - // Unticking in CSV should immediately remove flat=1 and be remembered across formats. - await clickOption('option_flat'); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('XML'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="XML"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - }); - - it('should keep subtable controls available when table is flat and subtables count is zero', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const reportElement = document.querySelector('#widgetActionsgetPageUrls [data-report]'); - if (!reportElement) { - return; - } - - const $reportElement = window.$(reportElement); - const uiControlObject = $reportElement.data('uiControlObject'); - if (!uiControlObject || !uiControlObject.param) { - return; - } - - uiControlObject.numberOfSubtables = 0; - uiControlObject.param.flat = 1; - $reportElement.data('uiControlObject', uiControlObject); - - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - - expect(await isOptionVisible('option_flat')).to.equal(true); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickOption('option_flat'); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - - await clickFormat('TSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="TSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - }); - - it('should keep flat export available but hide expanded export when a flattenable report has no current subtables', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const reportElement = document.querySelector('#widgetActionsgetPageUrls [data-report]'); - if (!reportElement) { - return; - } - - const $reportElement = window.$(reportElement); - const uiControlObject = $reportElement.data('uiControlObject'); - if (!uiControlObject || !uiControlObject.param) { - return; - } - - uiControlObject.numberOfSubtables = 0; - uiControlObject.param.flat = 0; - $reportElement.data('uiControlObject', uiControlObject); - - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - - expect(await isOptionVisible('option_flat')).to.equal(true); - expect(await isOptionVisible('option_show_dimensions')).to.equal(false); - expect(await isOptionExpandSubtableVisible()).to.equal(false); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - - await clickFormat('TSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="TSV"]')?.checked === true - )); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - }); - - it('should keep flat export available even when the table flatten action was hidden after initialization', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const reportElement = document.querySelector('#widgetActionsgetPageUrls [data-report]'); - const actionsElement = document.querySelector('#widgetActionsgetPageUrls [vue-entry="CoreHome.DataTableActions"]'); - if (!reportElement || !actionsElement) { - return; - } - - const $reportElement = window.$(reportElement); - const $actionsElement = window.$(actionsElement); - const uiControlObject = $reportElement.data('uiControlObject'); - const actionsApp = $actionsElement.data('vueAppInstance'); - if (!uiControlObject || !uiControlObject.param || !actionsApp) { - return; - } - - uiControlObject.numberOfSubtables = 0; - uiControlObject.param.flat = 0; - $reportElement.data('uiControlObject', uiControlObject); - actionsApp.showFlattenTable_ = false; - - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - - expect(await isOptionVisible('option_flat')).to.equal(true); - expect(await isOptionExpandSubtableVisible()).to.equal(false); - await expectExportLinkContains('flat=1'); - await expectExportLinkNotContains('expanded=1'); - }); - - it('should not restore flat when it was unchecked after being initially enabled', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - await page.waitForSelector('#widgetActionsgetPageUrls', { visible: true }); - await page.waitForSelector('#widgetActionsgetPageUrls .dataTable', { visible: true }); - await page.waitForFunction(() => ( - !!document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection') - )); - await page.evaluate(() => { - const reportElement = document.querySelector('#widgetActionsgetPageUrls [data-report]'); - if (!reportElement) { - return; - } - - const $reportElement = window.$(reportElement); - const uiControlObject = $reportElement.data('uiControlObject'); - if (!uiControlObject || !uiControlObject.param) { - return; - } - - uiControlObject.param.flat = 1; - $reportElement.data('uiControlObject', uiControlObject); - - const button = document.querySelector('#widgetActionsgetPageUrls .dataTableAction.activateExportSelection'); - if (button) { - button.click(); - } - }); - await page.waitForSelector('#reportExport', { visible: true }); - - await expectOptionChecked('option_flat', true); - await clickOption('option_flat'); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', false); - - await clickFormat('CSV'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="CSV"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectExportLinkNotContains('flat=1'); - - await clickFormat('JSON'); - await page.waitForFunction(() => ( - document.querySelector('#reportExport input[name="format"][value="JSON"]')?.checked === true - )); - await expectOptionChecked('option_flat', false); - await expectOptionChecked('option_expanded', false); - await expectExportLinkNotContains('flat=1'); - }); -}); diff --git a/plugins/CoreHome/tests/UI/SingleMetricView_spec.js b/plugins/CoreHome/tests/UI/SingleMetricView_spec.js deleted file mode 100644 index 368e11b2e1963f7c34a2747cf570050ec8935d2d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/SingleMetricView_spec.js +++ /dev/null @@ -1,145 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * Dashboard screenshot tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('SingleMetricView', function () { - var url = "?module=Widgetize&action=iframe&idSite=1&period=year&date=2012-08-09&moduleToWidgetize=Dashboard&" - + "actionToWidgetize=index&idDashboard=1"; - var rangeUrl = "?module=Widgetize&action=iframe&idSite=1&period=range&date=2012-08-07,2012-08-10&moduleToWidgetize=Dashboard&" - + "actionToWidgetize=index&idDashboard=1"; - - it('should load correctly', async function () { - await page.goto(url); - await page.waitForNetworkIdle(); - - // Add the Single Metric (KPI Metric) widget directly instead of going - // through the Add Widget modal so the screenshot stays focused on the - // widget itself rather than the surrounding picker flow. - await page.evaluate(function () { - return new Promise(function (resolve) { - window.widgetsHelper.getWidgetObjectFromUniqueId( - 'widgetCoreVisualizationssingleMetricViewcolumn', - function (widget) { - $('#dashboardWidgetsArea').dashboard( - 'addWidget', widget.uniqueId, 1, widget.parameters, true, false - ); - resolve(); - } - ); - }); - }); - - var elem = await page.waitForSelector('#widgetCoreVisualizationssingleMetricViewcolumn'); - await page.waitForNetworkIdle(); - await page.waitForTimeout(250); - - expect(await elem.screenshot()).to.matchImage('loaded'); - }); - - it('should handle formatted metrics properly', async function () { - await page.evaluate(() => { - $('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .jqplot-seriespicker').trigger('mouseenter'); - }); - await page.webpage.evaluate(function(){ - $('#dashboardWidgetsArea .jqplot-seriespicker-popover label:contains(Revenue):eq(0)').click(); - }); - await page.waitForNetworkIdle(); - await page.waitForTimeout(250); - - var elem = await page.waitForSelector('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn'); - expect(await elem.screenshot()).to.matchImage('formatted_metric'); - }); - - it('should handle individual goal metrics properly', async function () { - await page.evaluate(function(){ - $('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .jqplot-seriespicker').last().trigger('mouseenter'); - }); - await page.waitForTimeout(250); - await page.evaluate(function(){ - $('#dashboardWidgetsArea .jqplot-seriespicker-popover label:contains(_x):eq(0)').click() - }); - await page.waitForNetworkIdle(); - await page.waitForTimeout(250); - - var elem = await page.$('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn'); - expect(await elem.screenshot()).to.matchImage('goal_metric'); - }); - - it('should handle range periods correctly', async function () { - await page.goto(rangeUrl); - await page.evaluate(function(){ - $('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .jqplot-seriespicker').trigger('mouseenter'); - }); - await page.waitForTimeout(250); - await page.evaluate(function(){ - $('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .jqplot-seriespicker-popover label:contains(Revenue):eq(0)').click() - }); - await page.waitForNetworkIdle(); - await page.waitForTimeout(250); - - var elem = await page.$('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn'); - expect(await elem.screenshot()).to.matchImage('range'); - }); - - // selects a metric in the widget's series picker and returns the evolution - // indicator's css classes + label so we can assert on them - async function selectMetricAndReadEvolution(metricLabel) { - await page.waitForSelector('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn'); - await page.evaluate(function () { - $('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .jqplot-seriespicker').trigger('mouseenter'); - }); - await page.waitForTimeout(250); - await page.evaluate(function (label) { - $('#dashboardWidgetsArea .jqplot-seriespicker-popover label:contains(' + label + '):eq(0)').click(); - }, metricLabel); - await page.waitForNetworkIdle(); - await page.waitForTimeout(250); - - return page.evaluate(function () { - var el = document.querySelector('#dashboardWidgetsArea #widgetCoreVisualizationssingleMetricViewcolumn .metricEvolution > span'); - return el ? { className: el.className, text: el.textContent.trim() } : null; - }); - } - - it('should show an increase of a lower-is-better metric as a negative evolution', async function () { - // bounce rate is a "lower is better" metric, so an increasing value must be - // shown as a negative (red) evolution and a decrease as a positive (green) one - await page.goto(url); - await page.waitForNetworkIdle(); - - var evolution = await selectMetricAndReadEvolution('Bounce Rate'); - - expect(evolution).to.not.equal(null); - var hasUp = evolution.className.indexOf('evolution-up') !== -1; - var hasDown = evolution.className.indexOf('evolution-down') !== -1; - expect(hasUp || hasDown).to.equal(true); - - if (hasUp) { - expect(evolution.className).to.contain('negative-evolution'); - expect(evolution.className).to.not.contain('positive-evolution'); - } else { - expect(evolution.className).to.contain('positive-evolution'); - expect(evolution.className).to.not.contain('negative-evolution'); - } - }); - - it('should show a -100% evolution when the current value dropped to zero', async function () { - // March 2012 has visits, April 2012 has none, so the current value is zero - // while the previous period has data: the evolution must read as -100% - var zeroUrl = "?module=Widgetize&action=iframe&idSite=1&period=month&date=2012-04-15&moduleToWidgetize=Dashboard&" - + "actionToWidgetize=index&idDashboard=1"; - await page.goto(zeroUrl); - await page.waitForNetworkIdle(); - - var evolution = await selectMetricAndReadEvolution('Visits'); - - expect(evolution).to.not.equal(null); - expect(evolution.text).to.contain('-100'); - expect(evolution.className).to.contain('evolution-down'); - }); -}); diff --git a/plugins/CoreHome/tests/UI/VersionInfoHeaderMessage_spec.js b/plugins/CoreHome/tests/UI/VersionInfoHeaderMessage_spec.js deleted file mode 100644 index 5fbd10b137fbba42744a4a488e6b506e5208566f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/VersionInfoHeaderMessage_spec.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * Dashboard screenshot tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe('VersionInfoHeaderMessage', function() { - const parentSuite = this; - this.fixture = "Piwik\\Tests\\Fixtures\\OneVisit"; - - const selectorComponent = 'div[vue-entry="CoreHome.VersionInfoHeaderMessage"]'; - const selectorMessage = '#header_message'; - const selectorMessageTitle = '#header_message .title'; - const selectorMessageDropdown = '#header_message .dropdown'; - const selectorUpdateLink = '#updateCheckLinkContainer'; - const selectorUpdateButtonIcon = '#header_message .title .icon-reload'; - - const urlAdminHome = '?idSite=1&period=year&date=2012-08-09&module=CoreAdminHome&action=home'; - const urlHome = '?idSite=1&period=year&date=2012-08-09&module=CoreHome&action=index'; - - const getMessageTitleText = async function() { - const messageTitle = await page.$(selectorMessageTitle); - const titleText = await messageTitle.getProperty('textContent'); - - return await titleText.jsonValue(); - }; - - const afterAsRegularUser = function() { - delete testEnvironment.idSitesAdminAccess; - testEnvironment.save(); - }; - - const beforeAsRegularUser = function() { - testEnvironment.idSitesAdminAccess = [1]; - testEnvironment.save(); - }; - - const getUpdateLinkText = async function() { - const updateLink = await page.$(selectorUpdateLink); - const linkText = await updateLink.getProperty('textContent'); - - return await linkText.jsonValue(); - }; - - const makeUpdateAvailable = function() { - testEnvironment.optionsOverride['UpdateCheck_LatestVersion'] = '99.99.99'; - testEnvironment.optionsOverride['UpdateCheck_LastCheckFailed'] = false; - testEnvironment.save(); - }; - - const makeUpdateFail = function() { - testEnvironment.optionsOverride['UpdateCheck_LatestVersion'] = ''; - testEnvironment.optionsOverride['UpdateCheck_LastCheckFailed'] = true; - testEnvironment.save(); - }; - - beforeEach(() => { - // otherwise #header_message.title will be hidden - testEnvironment.useOverrideCss = false; - - testEnvironment.optionsOverride = { - UpdateCheck_LastCheckFailed: false, - UpdateCheck_LastTimeChecked: 2147468400, - UpdateCheck_LatestVersion: '', - }; - testEnvironment.save(); - }); - - describe('CoreHome', function() { - it('should not render without update', async function() { - await page.goto(urlHome); - await page.waitForNetworkIdle(); - - expect(await page.$(selectorComponent)).to.be.null; - expect(await page.$(selectorMessage)).to.be.null; - }); - - it('should display an available update', async function() { - makeUpdateAvailable(); - - await page.goto(urlHome); - await page.waitForNetworkIdle(); - - expect(await getMessageTitleText()).to.match(/New Update: Matomo 99.99.99/); - }); - }); - - describe('CoreAdminHome', function() { - describe('without superuser permissions', function() { - before(beforeAsRegularUser); - after(afterAsRegularUser); - - it('should not render', async function() { - await page.goto(urlAdminHome); - await page.waitForNetworkIdle(); - - expect(await page.$(selectorComponent)).to.be.null; - expect(await page.$(selectorMessage)).to.be.null; - }); - }); - - describe('with superuser permissions', function() { - it('should always render', async function() { - await page.goto(urlAdminHome); - await page.waitForNetworkIdle(); - - expect(await getUpdateLinkText()).to.match(/Check for updates/); - }); - - it('should tell if no new version is available', async function() { - await page.click(selectorUpdateLink); - await page.waitForNetworkIdle(); - - expect(await getMessageTitleText()).to.match(/latest version of Matomo/); - }); - - it('should check for a new version when clicking the full title anchor', async function() { - await page.goto(urlAdminHome); - await page.waitForNetworkIdle(); - - expect(await getUpdateLinkText()).to.match(/Check for updates/); - - await page.click(selectorMessageTitle); - await page.waitForNetworkIdle(); - - expect(await getMessageTitleText()).to.match(/latest version of Matomo/); - }); - - it('should check for a new version when clicking the icon inside the title anchor', async function() { - await page.goto(urlAdminHome); - await page.waitForNetworkIdle(); - - expect(await getUpdateLinkText()).to.match(/Check for updates/); - - await page.click(selectorUpdateButtonIcon); - await page.waitForNetworkIdle(); - - expect(await getMessageTitleText()).to.match(/latest version of Matomo/); - }); - - it('should check for a new version on request', async function() { - await page.goto(urlAdminHome); - await page.waitForNetworkIdle(); - - expect(await getUpdateLinkText()).to.match(/Check for updates/); - - makeUpdateFail(); - - await page.click(selectorUpdateLink); - await page.waitForNetworkIdle(); - - expect(await getUpdateLinkText()).to.match(/Please try again/); - - makeUpdateAvailable(); - - await page.click(selectorUpdateLink); - await page.waitForNetworkIdle(); - - expect(await getMessageTitleText()).to.match(/New Update: Matomo 99.99.99/); - }); - - describe('rendering', function() { - this.title = parentSuite.title; // to make sure the screenshot prefix is the same - - it('looks great', async function() { - await page.evaluate(function(selectorComponent, selectorMessageDropdown) { - const component = document.querySelector(selectorComponent); - const messageDropdown = document.querySelector(selectorMessageDropdown); - const matomoVersion = JSON.parse(component.getAttribute('piwik-version')); - - messageDropdown.innerHTML = messageDropdown.innerHTML.replace(matomoVersion, '5.x-uitest'); - }, selectorComponent, selectorMessageDropdown); - - await page.mouse.move(-10, -10); - await page.hover(selectorMessage); - await page.waitForSelector(selectorMessageDropdown, {visible: true, timeout: 250}); - - expect( - await page.screenshotSelector(`${selectorMessage}, ${selectorMessageDropdown}`) - ).to.matchImage('update_available'); - }); - }); - }); - }); -}); diff --git a/plugins/CoreHome/tests/UI/WhatIsNew_spec.js b/plugins/CoreHome/tests/UI/WhatIsNew_spec.js deleted file mode 100644 index d567e37f93b8412e00a66e36445b6255230e5ba4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/UI/WhatIsNew_spec.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * Screenshot integration tests. - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -describe("WhatIsNew", function () { - this.fixture = 'Piwik\\Tests\\Fixtures\\CreateChanges'; - this.optionsOverride = { - 'persist-fixture-data': false - }; - - before(function () { - testEnvironment.loadChanges = 1; - testEnvironment.overrideConfig('General', { - enable_internet_features: 0 - }); - - testEnvironment.save(); - }); - - it('should show the what is new changes popup', async function () { - await page.goto('?module=CoreHome&action=index&idSite=1&period=day&date=today'); - await page.waitForSelector('.whatisnew', {visible: true}); - await page.waitForNetworkIdle(); - - const popup = await page.$('.what-is-new-popup'); - expect(await popup.screenshot()).to.matchImage('what_is_new'); - }); - - it('should show a badge with count in menu', async function () { - await page.click('.ui-dialog-titlebar-close'); - await page.waitForSelector('.ui-widget-overlay', {hidden: true}); - const menu = await page.$('.nav-wrapper .right'); - expect(await menu.screenshot()).to.matchImage('menu'); - }); - - it('should open the overlay again when clicking the icon', async function () { - await page.click('.right a[onclick*="action=whatIsNew"]'); - await page.waitForNetworkIdle(); - const popup = await page.waitForSelector('.whatisnew', {visible: true}); - expect(popup).to.be.ok; - }); -}); diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close.png b/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close.png deleted file mode 100644 index de5a42948a57b308e9114ad5840bf26925a7e994..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close_reload.png b/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close_reload.png deleted file mode 100644 index de5a42948a57b308e9114ad5840bf26925a7e994..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_close_reload.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_loaded.png b/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_loaded.png deleted file mode 100644 index 8ca4e4d480a281e9bd541059c7af24d3cc7d44d7..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_loaded.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_reloaded.png b/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_reloaded.png deleted file mode 100644 index e1afc3b88a97a7c3843d77266b0d948d0949dd57..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/Notifications_reloaded.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/ShowChanges_view.png b/plugins/CoreHome/tests/UI/expected-screenshots/ShowChanges_view.png deleted file mode 100644 index 85521fb909839e1362c17846816bb46cf503c199..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/ShowChanges_view.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_formatted_metric.png b/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_formatted_metric.png deleted file mode 100644 index 890e015197d15a7d221f95afb8b2ea2ee98b7a94..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_formatted_metric.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_goal_metric.png b/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_goal_metric.png deleted file mode 100644 index af5ec3e74a23d71d5f6f48949343365b5c8d6e71..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_goal_metric.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_loaded.png b/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_loaded.png deleted file mode 100644 index 3c09746a4c5881f1e6b696052075a336d6572ffc..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_loaded.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_range.png b/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_range.png deleted file mode 100644 index 3d88cc18658971b900f182f4cddec33e5bd1ae24..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/SingleMetricView_range.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/VersionInfoHeaderMessage_update_available.png b/plugins/CoreHome/tests/UI/expected-screenshots/VersionInfoHeaderMessage_update_available.png deleted file mode 100644 index 7a0907460c7460bcf0d6a6ef93887682b929a1a3..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/VersionInfoHeaderMessage_update_available.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_menu.png b/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_menu.png deleted file mode 100644 index 1c8c393662a939fdebb33a3b163205dd10e3bad8..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_menu.png and /dev/null differ diff --git a/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_what_is_new.png b/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_what_is_new.png deleted file mode 100644 index 77fb32d7a7bdfc78a98cd91aaad682844670aa69..0000000000000000000000000000000000000000 Binary files a/plugins/CoreHome/tests/UI/expected-screenshots/WhatIsNew_what_is_new.png and /dev/null differ diff --git a/plugins/CoreHome/tests/Unit/Columns/VisitorReturningTest.php b/plugins/CoreHome/tests/Unit/Columns/VisitorReturningTest.php deleted file mode 100644 index 8d6a081cbc3f8c2083e65c0037709bdff75a0e1f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/Columns/VisitorReturningTest.php +++ /dev/null @@ -1,82 +0,0 @@ -onNewVisit($this->makeMockRequest([ 'ec_id' => 'abcdefg' ]), $this->makeMockVisitor(true), null); - $this->assertEquals(VisitorReturning::IS_RETURNING_CUSTOMER, $result); - } - - public function testOnNewVisitReturnsReturningCustomerIfVisitHasSecondsSinceLastOrder() - { - $dim = new VisitorReturning(); - $result = $dim->onNewVisit($this->makeMockRequest(), $this->makeMockVisitor(true, [ 'visitor_seconds_since_order' => 1234 ]), null); - $this->assertEquals(VisitorReturning::IS_RETURNING_CUSTOMER, $result); - } - - public function testOnNewVisitReturnsReturningCustomerIfPrevVisitHasSecondsSinceLastOrder() - { - $dim = new VisitorReturning(); - $result = $dim->onNewVisit($this->makeMockRequest(), $this->makeMockVisitor(true, [], [ 'visitor_seconds_since_order' => 5678 ]), null); - $this->assertEquals(VisitorReturning::IS_RETURNING_CUSTOMER, $result); - } - - public function testOnNewVisitReturnsReturningVisitorIfVisitorIsKnown() - { - $dim = new VisitorReturning(); - $result = $dim->onNewVisit($this->makeMockRequest(), $this->makeMockVisitor(true), null); - $this->assertEquals(VisitorReturning::IS_RETURNING, $result); - } - - public function testOnNewVisitReturnsNewVisitIfVisitorIsNotKnown() - { - $dim = new VisitorReturning(); - $result = $dim->onNewVisit($this->makeMockRequest(), $this->makeMockVisitor(false), null); - $this->assertEquals(VisitorReturning::IS_NEW, $result); - } - - /** - * @return Request - */ - private function makeMockRequest($params = [], $currentTime = null) - { - $mockBuilder = $this->getMockBuilder(Request::class)->disableOriginalConstructor(); - if ($currentTime) { - $mockBuilder->onlyMethods(['getCurrentTimestamp']); - } - $mock = $mockBuilder->getMock(); - if ($currentTime) { - $mock->method('getCurrentTimestamp')->willReturn($currentTime); - } - $mock->method('getParam')->willReturnCallback(function ($name) use ($params) { - return isset($params[$name]) ? $params[$name] : false; - }); - - /** @var Request $mock */ - $result = $mock; - return $result; - } - - private function makeMockVisitor($isKnown, $visitProps = [], $previousVisitProps = []) - { - $visitor = new Visitor(new VisitProperties($visitProps), $isKnown, new VisitProperties($previousVisitProps)); - return $visitor; - } -} diff --git a/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceFirstTest.php b/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceFirstTest.php deleted file mode 100644 index e9a7df7ff558941e466b1033e6908ea5d3ffac93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceFirstTest.php +++ /dev/null @@ -1,140 +0,0 @@ -makeMockRequest(); - $visitor = $this->makeMockVisitor(false); - - $dim = new VisitorSecondsSinceFirst(); - $result = $dim->onNewVisit($request, $visitor, null); - - $this->assertEquals(0, $result); - } - - /** - * @dataProvider getInvalidTestDataForOnNewVisit - */ - public function testOnNewVisitReturnsNullIfPreviousColumnValueOrCurrentColumnValueIsInvalid($currentProps, $oldProps) - { - $request = $this->makeMockRequest(); - $visitor = $this->makeMockVisitor(true, $currentProps, $oldProps); - - $dim = new VisitorSecondsSinceFirst(); - $result = $dim->onNewVisit($request, $visitor, null); - - $this->assertNull($result); - } - - public function getInvalidTestDataForOnNewVisit() - { - return [ - [ - ['visit_first_action_time' => ''], - ['visit_first_action_time' => '2016-02-03 00:00:00', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => 0], - ['visit_first_action_time' => '2016-02-03 00:00:00', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => null], - ['visit_first_action_time' => '2016-02-03 00:00:00', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => 'asdlfj alskdjf'], - ['visit_first_action_time' => '2016-02-03 00:00:00', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => '', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => 0, 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => null, 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => 'asdlfj alskdjf', 'visitor_seconds_since_first' => '250'], - ], - - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => '2016-04-05 00:00:00', 'visitor_seconds_since_first' => ''], - ], - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => '2016-04-05 00:00:00', 'visitor_seconds_since_first' => null], - ], - [ - ['visit_first_action_time' => '2016-02-03 00:00:00'], - ['visit_first_action_time' => '2016-04-05 00:00:00', 'visitor_seconds_since_first' => false], - ], - ]; - } - - public function testOnNewVisitReturnsCorrectValueWhenVisitorIsKnownAndAllFirstActionTimesPresent() - { - $currentTime = time(); - - $request = $this->makeMockRequest($currentTime); - $visitor = $this->makeMockVisitor(true, ['visit_first_action_time' => $currentTime - 200], ['visit_first_action_time' => $currentTime - 300, 'visitor_seconds_since_first' => 500]); - - $dim = new VisitorSecondsSinceFirst(); - $result = $dim->onNewVisit($request, $visitor, null); - - $this->assertEquals($result, 600); - } - - /** - * @return Request - */ - private function makeMockRequest($currentTime = null) - { - $mockBuilder = $this->getMockBuilder(Request::class)->disableOriginalConstructor(); - if ($currentTime) { - $mockBuilder->onlyMethods(['getCurrentTimestamp']); - } - $mock = $mockBuilder->getMock(); - if ($currentTime) { - $mock->method('getCurrentTimestamp')->willReturn($currentTime); - } - - /** @var Request $mock */ - $result = $mock; - return $result; - } - - private function makeMockVisitor($isKnown, $visitProps = [], $previousVisitProps = []) - { - $visitor = new Visitor(new VisitProperties($visitProps), $isKnown, new VisitProperties($previousVisitProps)); - return $visitor; - } -} diff --git a/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceOrderTest.php b/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceOrderTest.php deleted file mode 100644 index 4d308775abf47dc80ce2b5807f8e46012406105e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/Columns/VisitorSecondsSinceOrderTest.php +++ /dev/null @@ -1,86 +0,0 @@ -onExistingVisit($this->makeMockRequest([ 'ec_id' => 'abljasdf' ]), $this->makeMockVisitor(true), null); - $this->assertEquals(0, $result); - } - - public function testOnExistingVisitReturnsTheExistingValueIfThereIsOne() - { - $dim = new VisitorSecondsSinceOrder(); - $result = $dim->onExistingVisit($this->makeMockRequest(), $this->makeMockVisitor(true, [ 'visitor_seconds_since_order' => 20 ]), null); - $this->assertEquals(20, $result); - } - - public function testOnExistingVisitReturnsNullIfDimensionValueIsNotSetForPreviousVisit() - { - $dim = new VisitorSecondsSinceOrder(); - $result = $dim->onExistingVisit($this->makeMockRequest(), $this->makeMockVisitor(true), null); - $this->assertEquals(null, $result); - } - - public function testOnExistingVisitReturnsCorrectValueIfPreviousValueWasForOrder() - { - $dim = new VisitorSecondsSinceOrder(); - $result = $dim->onExistingVisit($this->makeMockRequest([], '2020-03-04 03:04:28'), $this->makeMockVisitor(true, [], [ 'visitor_seconds_since_order' => 0, 'visit_first_action_time' => '2020-03-04 03:04:20' ]), null); - $this->assertEquals(8, $result); - } - - public function testOnExistingVisitReturnsCorrectValueIfPreviousValueWasAfterOrder() - { - $dim = new VisitorSecondsSinceOrder(); - $result = $dim->onExistingVisit($this->makeMockRequest([], '2020-03-04 03:04:28'), $this->makeMockVisitor(true, [], [ 'visitor_seconds_since_order' => 45, 'visit_first_action_time' => '2020-03-04 03:04:20' ]), null); - $this->assertEquals(53, $result); - } - - /** - * @return Request - */ - private function makeMockRequest($params = [], $currentTime = null) - { - if (is_string($currentTime)) { - $currentTime = strtotime($currentTime); - } - - $mockBuilder = $this->getMockBuilder(Request::class)->disableOriginalConstructor(); - if ($currentTime) { - $mockBuilder->onlyMethods(['getCurrentTimestamp', 'getParam']); - } - $mock = $mockBuilder->getMock(); - if ($currentTime) { - $mock->method('getCurrentTimestamp')->willReturn($currentTime); - } - $mock->method('getParam')->willReturnCallback(function ($name) use ($params) { - return isset($params[$name]) ? $params[$name] : false; - }); - - /** @var Request $mock */ - $result = $mock; - return $result; - } - - private function makeMockVisitor($isKnown, $visitProps = [], $previousVisitProps = []) - { - $visitor = new Visitor(new VisitProperties($visitProps), $isKnown, new VisitProperties($previousVisitProps)); - return $visitor; - } -} diff --git a/plugins/CoreHome/tests/Unit/Columns/VisitsCountTest.php b/plugins/CoreHome/tests/Unit/Columns/VisitsCountTest.php deleted file mode 100644 index 15d40e890041f765c7078bba18b814c84839d637..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/Columns/VisitsCountTest.php +++ /dev/null @@ -1,66 +0,0 @@ -makeMockRequest(); - $visitor = $this->makeMockVisitor(false); - - $dim = new VisitsCount(); - $visitCount = $dim->onNewVisit($request, $visitor, null); - - $this->assertEquals(1, $visitCount); - } - - public function testOnNewVisitReturnsIncrementedValueIfPreviousVisitCountIsPresent() - { - $request = $this->makeMockRequest(); - $visitor = $this->makeMockVisitor(false, [], ['visitor_count_visits' => 10]); - - $dim = new VisitsCount(); - $visitCount = $dim->onNewVisit($request, $visitor, null); - - $this->assertEquals(11, $visitCount); - } - - /** - * @return Request - */ - private function makeMockRequest($currentTime = null) - { - $mockBuilder = $this->getMockBuilder(Request::class)->disableOriginalConstructor(); - if ($currentTime) { - $mockBuilder->onlyMethods(['getCurrentTimestamp']); - } - $mock = $mockBuilder->getMock(); - if ($currentTime) { - $mock->method('getCurrentTimestamp')->willReturn($currentTime); - } - - /** @var Request $mock */ - $result = $mock; - return $result; - } - - private function makeMockVisitor($isKnown, $visitProps = [], $previousVisitProps = []) - { - $visitor = new Visitor(new VisitProperties($visitProps), $isKnown, new VisitProperties($previousVisitProps)); - return $visitor; - } -} diff --git a/plugins/CoreHome/tests/Unit/CoreHomeTest.php b/plugins/CoreHome/tests/Unit/CoreHomeTest.php deleted file mode 100644 index dd97fe8ae006a23a46b4340a934d2ca865475af5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/CoreHomeTest.php +++ /dev/null @@ -1,116 +0,0 @@ -coreHome = new CoreHome(); - } - - /** - * @dataProvider getJavaScriptsContainingNoSourceMapDefinition - */ - public function testFilterMergedJavaScriptsShouldNotChangeAnythingIfJsDoesNotContainAnySourceMap($content) - { - $expectedContent = $content; - - $this->coreHome->filterMergedJavaScripts($content); - - $this->assertSame($expectedContent, $content); - } - - /** - * @dataProvider getJavaScriptsContainingSourceMapDefinition - */ - public function testFilterMergedJavaScriptsShouldRemoveSourceMapIfDefinedInJs($content, $expectedContent) - { - $this->coreHome->filterMergedJavaScripts($content); - - $this->assertSame($expectedContent, $content); - } - - public function testFilterMergedJavaScriptsShouldRemoveMultipleSourceMapDefinitionsInOneContent() - { - $content = 'var x = 5; -//# sourceMappingURL=whatever.js.map .map -init(); -x = 6; -//# sourceMappingURL=js.map -foo("bar"); -'; - $expected = 'var x = 5; -//# .map -init(); -x = 6; -//# -foo("bar"); -'; - $this->coreHome->filterMergedJavaScripts($content); - - $this->assertSame($expected, $content); - } - - public function testAddStylesheetsPrependsModeAgnosticThemeStyles() - { - $originalContent = '.existing { color: red; }'; - $content = $originalContent; - - $this->coreHome->addStylesheets($content); - - $this->assertSame(ThemeStyles::get()->toLessCode() . "\n" . $originalContent, $content); - } - - public function getJavaScriptsContainingNoSourceMapDefinition() - { - $js = array(); - - $js[] = array(''); - $js[] = array('var x = 5; init();'); - $js[] = array('//# sourceMappingURL'); - $js[] = array('//# sourceMappingURL='); - $js[] = array('//# sourceMappingURL.map'); - $js[] = array('sourceMappingURL= -cc.map'); - - return $js; - } - - public function getJavaScriptsContainingSourceMapDefinition() - { - $js = array(); - - $js[] = array('//# sourceMappingURL=55.map', '//# '); - $js[] = array('//# sourceMappingURL=.map', '//# '); - $js[] = array('sourceMappingURL=whatever.js.map', ''); - $js[] = array('sourceMappingURL=whatever.js.map .map', ' .map'); - $js[] = array('var x = 5; -//# sourceMappingURL=whatever.js.map .map', 'var x = 5; -//# .map'); - - return $js; - } -} diff --git a/plugins/CoreHome/tests/Unit/EntityDuplicator/DuplicateRequestResponseTest.php b/plugins/CoreHome/tests/Unit/EntityDuplicator/DuplicateRequestResponseTest.php deleted file mode 100644 index 75dc6cde014dfa8ae5a9c5f9c5d3ac24a888759d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/EntityDuplicator/DuplicateRequestResponseTest.php +++ /dev/null @@ -1,110 +0,0 @@ -duplicateRequestResponse = new DuplicateRequestResponse(); - } - - public function testHasResponseBeenModified() - { - $this->assertFalse($this->duplicateRequestResponse->hasResponseBeenModified()); - } - - /** - * @dataProvider getPropertyNames - */ - public function testHasResponseBeenModifiedSetValue($methodName, $value) - { - $this->assertTrue(method_exists($this->duplicateRequestResponse, $methodName)); - - $this->duplicateRequestResponse->$methodName($value); - - $this->assertTrue($this->duplicateRequestResponse->hasResponseBeenModified()); - } - - public function testGetJsonResponseNoChanges() - { - $this->expectException(\Exception::class); - $this->expectExceptionMessage('No duplicate request response properties were set.'); - - $this->duplicateRequestResponse->getJsonResponse(); - } - - public function testGetResponseArraySuccess() - { - $this->duplicateRequestResponse->setSuccess(true); - $this->duplicateRequestResponse->setMessage('Item copied!'); - - $this->assertSame(['success' => true, 'message' => 'Item copied!'], $this->duplicateRequestResponse->getResponseArray()); - } - - public function testGetResponseArraySuccessFail() - { - $this->duplicateRequestResponse->setSuccess(false); - $this->duplicateRequestResponse->setMessage('Item duplication failed!'); - - $this->assertSame(['success' => false, 'message' => 'Item duplication failed!'], $this->duplicateRequestResponse->getResponseArray()); - } - - public function testGetJsonResponseSuccess() - { - $this->duplicateRequestResponse->setSuccess(true); - $this->duplicateRequestResponse->setMessage('Item copied!'); - - $this->assertSame('{"success":true,"message":"Item copied!"}', $this->duplicateRequestResponse->getJsonResponse()); - } - - public function testGetJsonResponseSuccessWithData() - { - $this->duplicateRequestResponse->setSuccess(true); - $this->duplicateRequestResponse->setMessage('Item copied!'); - $this->duplicateRequestResponse->setAdditionalData(['foo' => 'bar']); - - $this->assertSame('{"success":true,"message":"Item copied!","additionalData":{"foo":"bar"}}', $this->duplicateRequestResponse->getJsonResponse()); - } - - public function testGetJsonResponseSuccessFail() - { - $this->duplicateRequestResponse->setSuccess(false); - $this->duplicateRequestResponse->setMessage('Item duplication failed!'); - - $this->assertSame('{"success":false,"message":"Item duplication failed!"}', $this->duplicateRequestResponse->getJsonResponse()); - } - - public function getPropertyNames(): array - { - return [ - ['setSuccess', false], - ['setSuccess', true], - ['setMessage', ''], - ['setMessage', 'Some message'], - ['setMessage', 'Another message'], - ['setAdditionalData', []], - ['setAdditionalData', ['key' => 'value']], - ]; - } -} diff --git a/plugins/CoreHome/tests/Unit/EntityDuplicator/EntityDuplicatorHelperTest.php b/plugins/CoreHome/tests/Unit/EntityDuplicator/EntityDuplicatorHelperTest.php deleted file mode 100644 index 10d9c032c7c7923af521d00f743e3a16091f9074..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/EntityDuplicator/EntityDuplicatorHelperTest.php +++ /dev/null @@ -1,240 +0,0 @@ -expectException(\Exception::class); - $this->expectExceptionMessage('The maximum name length cannot be less than the length of the suffix.'); - } - - if ($maxLength === '') { - $this->assertSame($expected, EntityDuplicatorHelper::incrementNameWithNumericalSuffix($name), "Name '$name' should be equal to '$expected' when not providing max length."); - return; - } - $maxLength = intval($maxLength); - - $this->assertSame($expected, EntityDuplicatorHelper::incrementNameWithNumericalSuffix($name, $maxLength), "Name '$name' should be equal to '$expected' when max length is set to '$maxLength'."); - } - - public function getGetIncrementNameWithNumericalSuffixData(): array - { - return [ - ['Foo', 'Foo (1)', '', false], - ['Foo (1)', 'Foo (2)', '', false], - ['Foo (2)', 'Foo (3)', '', false], - ['Foo (3)', 'Foo (4)', '', false], - ['SomeOtherName', 'SomeOtherName (1)', '', false], - ['SomeOtherName (1)', 'SomeOtherName (2)', '', false], - ['SomeOtherName', '', '-2', true], - ['SomeOtherName', 'SomeOtherName (1)', '-1', false], - ['SomeOtherName', '', '0', true], - ['SomeOtherName', '', '1', true], - ['SomeOtherName', '', '2', true], - ['SomeOtherName', '', '3', true], - ['SomeOtherName', '', '4', true], - ['SomeOtherName', 'S (1)', '5', false], - ['SomeOtherName', 'SomeOt (1)', '10', false], - ['SomeOtherName (1)', '', '-2', true], - ['SomeOtherName (1)', 'SomeOtherName (2)', '-1', false], - ['SomeOtherName (1)', '', '0', true], - ['SomeOtherName (1)', '', '1', true], - ['SomeOtherName (1)', '', '2', true], - ['SomeOtherName (1)', '', '3', true], - ['SomeOtherName (1)', '', '4', true], - ['SomeOtherName (1)', 'S (2)', '5', false], - ['SomeOtherName (1)', 'SomeOt (2)', '10', false], - ['SomeOtherName (9)', '', '-2', true], - ['SomeOtherName (9)', 'SomeOtherName (10)', '-1', false], - ['SomeOtherName (9)', '', '0', true], - ['SomeOtherName (9)', '', '1', true], - ['SomeOtherName (9)', '', '2', true], - ['SomeOtherName (9)', '', '3', true], - ['SomeOtherName (9)', '', '4', true], - ['SomeOtherName (9)', '', '5', true], - ['SomeOtherName (9)', 'SomeO (10)', '10', false], - ['Some1Name', 'Some1Name (1)', '', false], - ['Some1Name (1)', 'Some1Name (2)', '', false], - ['NameContainingMultiple12Digits', 'NameContainingMultiple12Digits (1)', '', false], - ['NameContainingMultiple12Digits (1)', 'NameContainingMultiple12Digits (2)', '', false], - ['AnotherNameContainingMultiple12Digits34', 'AnotherNameContainingMultiple12Digits34 (1)', '', false], - ['AnotherNameContainingMultiple12Digits34 (1)', 'AnotherNameContainingMultiple12Digits34 (2)', '', false], - ['AnotherNameContainingMultiple12Digits34 (2)', 'AnotherNameContainingMultiple12Digits34 (3)', '', false], - ['AnotherNameContainingMultiple12Digits34 (3)', 'AnotherNameContainingMultiple12Digits34 (4)', '', false], - ['AnotherNameContainingMultiple12Digits34 (4)', 'AnotherNameContainingMultiple12Digits34 (5)', '', false], - ]; - } - - /** - * @dataProvider getGetUniqueNameComparedToListData - * @param array $names - * @param string $maxLength String to allow empty string to indicate using the default max length - * @return void - */ - public function testGetUniqueNameComparedToList(string $name, array $names, string $expected, string $maxLength, bool $expectException) - { - if ($expectException) { - $this->expectException(\Exception::class); - if ($maxLength !== '-1' && intval($maxLength) < 1) { - $this->expectExceptionMessage('The maximum name length cannot be less than 1 character.'); - } else { - $this->expectExceptionMessage('The maximum name length cannot be less than the length of the suffix.'); - } - } - - if ($maxLength === '') { - $this->assertSame($expected, EntityDuplicatorHelper::getUniqueNameComparedToList($name, $names), "Name '$name' should be equal to '$expected' when not providing max length for existing names:" . implode(', ', $names)); - return; - } - $maxLength = intval($maxLength); - - $this->assertSame($expected, EntityDuplicatorHelper::getUniqueNameComparedToList($name, $names, $maxLength), "Name '$name' should be equal to '$expected' when max length is set to '$maxLength' for existing names:" . implode(', ', $names)); - } - - public function getGetUniqueNameComparedToListData(): array - { - return [ - ['Foo', [], 'Foo', '', false], - ['Foo', ['Foo (2)'], 'Foo', '', false], - ['Foo', ['Foo (1)'], 'Foo', '', false], - ['Foo', ['Foo (1)', 'Foo (2)'], 'Foo', '', false], - ['Foo', ['Foo (1)', 'Foo (2)', 'Foo (3)'], 'Foo', '', false], - ['Foo', ['Foo (1)', 'Foo (2)', 'Foo (3)'], 'Foo', '', false], - ['Foo (1)', [], 'Foo (1)', '', false], - ['Foo (1)', ['Foo (2)'], 'Foo (1)', '', false], - ['Foo (1)', ['Foo (1)'], 'Foo (2)', '', false], - ['Foo (1)', ['Foo (1)', 'Foo (2)'], 'Foo (3)', '', false], - ['Foo (1)', ['Foo (1)', 'Foo (2)', 'Foo (3)'], 'Foo (4)', '', false], - ['Foo (2)', [], 'Foo (2)', '', false], - ['Foo (2)', ['Foo (1)'], 'Foo (2)', '', false], - ['Foo (2)', ['Foo (3)'], 'Foo (2)', '', false], - ['Foo (2)', ['Foo (1)', 'Foo (2)'], 'Foo (3)', '', false], - ['Foo (2)', ['Foo (1)', 'Foo (2)', 'Foo (3)'], 'Foo (4)', '', false], - ['Foo (3)', [], 'Foo (3)', '', false], - ['Foo (3)', ['Foo (1)'], 'Foo (3)', '', false], - ['Foo (3)', ['Foo (2)'], 'Foo (3)', '', false], - ['Foo (3)', ['Foo (3)'], 'Foo (4)', '', false], - ['Foo (3)', ['Foo (1)', 'Foo (2)'], 'Foo (3)', '', false], - ['Foo (3)', ['Foo (1)', 'Foo (2)', 'Foo (3)'], 'Foo (4)', '', false], - ['SomeOtherName', [], 'SomeOtherName', '', false], - ['SomeOtherName', ['SomeOtherName'], 'SomeOtherName (1)', '', false], - ['SomeOtherName (1)', [], 'SomeOtherName (1)', '', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'SomeOtherName (2)', '', false], - ['SomeOtherName', [], '', '-2', true], - ['SomeOtherName', ['SomeOtherName'], '', '-2', true], - ['SomeOtherName', [], 'SomeOtherName', '-1', false], - ['SomeOtherName', ['SomeOtherName'], 'SomeOtherName (1)', '-1', false], - ['SomeOtherName', [], 'SomeOtherName', '-1', false], - ['SomeOtherName', ['SomeOtherName'], 'SomeOtherName (1)', '-1', false], - ['SomeOtherName', [], '', '0', true], - ['SomeOtherName', ['SomeOtherName'], '', '0', true], - ['SomeOtherName', [], 'S', '1', false], - ['SomeOtherName', ['SomeOtherName'], 'S', '1', false], - ['SomeOtherName', ['S'], '', '1', true], - ['SomeOtherName', [], 'So', '2', false], - ['SomeOtherName', ['SomeOtherName'], 'So', '2', false], - ['SomeOtherName', ['So'], '', '2', true], - ['SomeOtherName', [], 'Som', '3', false], - ['SomeOtherName', ['SomeOtherName'], 'Som', '3', false], - ['SomeOtherName', ['Som'], '', '3', true], - ['SomeOtherName', [], 'Some', '4', false], - ['SomeOtherName', ['SomeOtherName'], 'Some', '4', false], - ['SomeOtherName', ['Some'], '', '4', true], - ['SomeOtherName', [], 'SomeO', '5', false], - ['SomeOtherName', ['SomeOtherName'], 'SomeO', '5', false], - ['SomeOtherName', ['SomeO'], 'S (1)', '5', false], - ['SomeOtherName', [], 'SomeOtherN', '10', false], - ['SomeOtherName', ['SomeOtherName'], 'SomeOtherN', '10', false], - ['SomeOtherName', ['SomeOtherN'], 'SomeOt (1)', '10', false], - ['SomeOtherName (1)', [], '', '-2', true], - ['SomeOtherName (1)', ['SomeOtherName (1)'], '', '-2', true], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'SomeOtherName (2)', '-1', false], - ['SomeOtherName (1)', [], '', '0', true], - ['SomeOtherName (1)', ['SomeOtherName (1)'], '', '0', true], - ['SomeOtherName (1)', [], 'S', '1', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'S', '1', false], - ['SomeOtherName (1)', ['S'], '', '1', true], - ['SomeOtherName (1)', [], 'So', '2', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'So', '2', false], - ['SomeOtherName (1)', ['So'], '', '2', true], - ['SomeOtherName (1)', [], 'Som', '3', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'Som', '3', false], - ['SomeOtherName (1)', ['Som'], '', '3', true], - ['SomeOtherName (1)', [], 'Some', '4', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'Some', '4', false], - ['SomeOtherName (1)', ['Some'], '', '4', true], - ['SomeOtherName (1)', [], 'SomeO', '5', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'SomeO', '5', false], - ['SomeOtherName (1)', ['SomeO'], 'S (1)', '5', false], - ['S (1)', ['S (1)'], 'S (2)', '5', false], - ['SomeOtherName (1)', [], 'SomeOtherN', '10', false], - ['SomeOtherName (1)', ['SomeOtherName (1)'], 'SomeOtherN', '10', false], - ['SomeOtherName (1)', ['SomeOtherN'], 'SomeOt (1)', '10', false], - ['SomeOt (1)', ['SomeOt (1)'], 'SomeOt (2)', '10', false], - ['SomeOtherName (9)', [], '', '-2', true], - ['SomeOtherName (9)', [], 'SomeOtherName (9)', '-1', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'SomeOtherName (10)', '-1', false], - ['SomeOtherName (9)', [], '', '0', true], - ['SomeOtherName (9)', [], 'S', '1', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'S', '1', false], - ['SomeOtherName (9)', ['S'], '', '1', true], - ['SomeOtherName (9)', [], 'So', '2', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'So', '2', false], - ['SomeOtherName (9)', ['So'], '', '2', true], - ['SomeOtherName (9)', [], 'Som', '3', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'Som', '3', false], - ['SomeOtherName (9)', ['Som'], '', '3', true], - ['SomeOtherName (9)', [], 'Some', '4', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'Some', '4', false], - ['SomeOtherName (9)', ['Some'], '', '4', true], - ['SomeOtherName (9)', [], 'SomeO', '5', false], - ['SomeOtherName (9)', ['SomeOtherName (9)'], 'SomeO', '5', false], - ['SomeOtherName (9)', ['SomeO'], 'S (1)', '5', false], - ['S (9)', ['S (9)'], 'S (1)', '5', true], - ['SomeOtherName (9)', [], 'SomeOtherN', '10', false], - ['SomeOtherName (9)', ['SomeOtherN'], 'SomeOt (1)', '10', false], - ['SomeOt (9)', ['SomeOt (9)'], 'SomeO (10)', '10', false], - ['Some1Name', [], 'Some1Name', '', false], - ['Some1Name', ['Some1Name'], 'Some1Name (1)', '', false], - ['Some1Name (1)', [], 'Some1Name (1)', '', false], - ['Some1Name (1)', ['Some1Name (1)'], 'Some1Name (2)', '', false], - ['NameContainingMultiple12Digits', [], 'NameContainingMultiple12Digits', '', false], - ['NameContainingMultiple12Digits', ['NameContainingMultiple12Digits'], 'NameContainingMultiple12Digits (1)', '', false], - ['NameContainingMultiple12Digits (1)', [], 'NameContainingMultiple12Digits (1)', '', false], - ['NameContainingMultiple12Digits (1)', ['NameContainingMultiple12Digits (1)'], 'NameContainingMultiple12Digits (2)', '', false], - ['AnotherNameContainingMultiple12Digits34', [], 'AnotherNameContainingMultiple12Digits34', '', false], - ['AnotherNameContainingMultiple12Digits34', ['AnotherNameContainingMultiple12Digits34'], 'AnotherNameContainingMultiple12Digits34 (1)', '', false], - ['AnotherNameContainingMultiple12Digits34 (1)', [], 'AnotherNameContainingMultiple12Digits34 (1)', '', false], - ['AnotherNameContainingMultiple12Digits34 (1)', ['AnotherNameContainingMultiple12Digits34 (1)'], 'AnotherNameContainingMultiple12Digits34 (2)', '', false], - ['AnotherNameContainingMultiple12Digits34 (2)', [], 'AnotherNameContainingMultiple12Digits34 (2)', '', false], - ['AnotherNameContainingMultiple12Digits34 (2)', ['AnotherNameContainingMultiple12Digits34 (2)'], 'AnotherNameContainingMultiple12Digits34 (3)', '', false], - ['AnotherNameContainingMultiple12Digits34 (3)', [], 'AnotherNameContainingMultiple12Digits34 (3)', '', false], - ['AnotherNameContainingMultiple12Digits34 (3)', ['AnotherNameContainingMultiple12Digits34 (3)'], 'AnotherNameContainingMultiple12Digits34 (4)', '', false], - ['AnotherNameContainingMultiple12Digits34 (4)', [], 'AnotherNameContainingMultiple12Digits34 (4)', '', false], - ['AnotherNameContainingMultiple12Digits34 (4)', ['AnotherNameContainingMultiple12Digits34 (4)'], 'AnotherNameContainingMultiple12Digits34 (5)', '', false], - ]; - } -} diff --git a/plugins/CoreHome/tests/Unit/EvolutionMetricTest.php b/plugins/CoreHome/tests/Unit/EvolutionMetricTest.php deleted file mode 100644 index 8b6b95495c40eae16113e5f127f60ac0d0e3081b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/Unit/EvolutionMetricTest.php +++ /dev/null @@ -1,61 +0,0 @@ -setMetadata('period', $cPeriod); - - // If the archived date meta data value exists on the row then it will be used - // as the current date for calculation purposes, we can use this to consistently test the - // ratio calculation by supplying a fixed set of dates that should result in a 0.5 ratio - - $row = new Row(); - $row->setMetadata(DataTable::ARCHIVED_DATE_METADATA_NAME, '2021-10-07 00:00:00'); - - $pastData = new DataTable(); - $sPeriod = new \Piwik\Period\Week(Date::factory('2021-10-03')); - $pastData->setMetadata('period', $sPeriod); - - $ratio = EvolutionMetric::getRatio($currentData, $pastData, $row); - - $this->assertEquals(0.429, $ratio); - } - - public function testShouldNotDoProportionalComparisionIfCurrentPeriodComplete() - { - $currentData = new DataTable(); - $cPeriod = new \Piwik\Period\Week(Date::factory('2021-10-10')); - $currentData->setMetadata('period', $cPeriod); - - $pastData = new DataTable(); - $sPeriod = new \Piwik\Period\Week(Date::factory('2021-10-03')); - $pastData->setMetadata('period', $sPeriod); - - $ratio = EvolutionMetric::getRatio($currentData, $pastData, new Row()); - - $this->assertEquals(1, $ratio); - } -} diff --git a/plugins/CoreHome/tests/resources/sparkline/SparklineDouble.php b/plugins/CoreHome/tests/resources/sparkline/SparklineDouble.php deleted file mode 100644 index 66574e5ab6f79d3ebe6dc079d11c474e41347c80..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/tests/resources/sparkline/SparklineDouble.php +++ /dev/null @@ -1,43 +0,0 @@ -backgroundColor = $color; - } - - public function deactivateBackgroundColor() - { - $this->backgroundDeactivated = true; - } - - public function setLineColorHex($color, $seriesIndex = null) - { - $this->lineColors[] = [$color, $seriesIndex]; - } - - public function setFillColorHex($color) - { - $this->fillColor = $color; - } - - public function deactivateFillColor() - { - $this->fillDeactivated = true; - } - - public function addPoint($type, $size, $color, $seriesIndex) - { - $this->points[] = [$type, $size, $color, $seriesIndex]; - } -} diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js deleted file mode 100644 index 329e6b8096465c4319f4b6124f952d7833a3c622..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ /dev/null @@ -1,14208 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("vue")); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["CoreHome"] = factory(require("vue")); - else - root["CoreHome"] = factory(root["Vue"]); -})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "plugins/CoreHome/vue/dist/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "fae3"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "2342": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker -window.hasBlockedContent = false; - -/***/ }), - -/***/ "8bbf": -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; - -/***/ }), - -/***/ "fae3": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "createVueApp", function() { return /* reexport */ createVueApp; }); -__webpack_require__.d(__webpack_exports__, "importPluginUmd", function() { return /* reexport */ importPluginUmd; }); -__webpack_require__.d(__webpack_exports__, "useExternalPluginComponent", function() { return /* reexport */ useExternalPluginComponent; }); -__webpack_require__.d(__webpack_exports__, "DirectiveUtilities", function() { return /* reexport */ directiveUtilities; }); -__webpack_require__.d(__webpack_exports__, "debounce", function() { return /* reexport */ debounce; }); -__webpack_require__.d(__webpack_exports__, "clone", function() { return /* reexport */ clone; }); -__webpack_require__.d(__webpack_exports__, "VueEntryContainer", function() { return /* reexport */ VueEntryContainer; }); -__webpack_require__.d(__webpack_exports__, "ActivityIndicator", function() { return /* reexport */ ActivityIndicator; }); -__webpack_require__.d(__webpack_exports__, "MatomoLoader", function() { return /* reexport */ MatomoLoader; }); -__webpack_require__.d(__webpack_exports__, "translate", function() { return /* reexport */ translate; }); -__webpack_require__.d(__webpack_exports__, "translateOrDefault", function() { return /* reexport */ translateOrDefault; }); -__webpack_require__.d(__webpack_exports__, "externalRawLink", function() { return /* reexport */ externalRawLink; }); -__webpack_require__.d(__webpack_exports__, "externalLink", function() { return /* reexport */ externalLink; }); -__webpack_require__.d(__webpack_exports__, "Alert", function() { return /* reexport */ Alert; }); -__webpack_require__.d(__webpack_exports__, "AjaxHelper", function() { return /* reexport */ AjaxHelper_AjaxHelper; }); -__webpack_require__.d(__webpack_exports__, "setCookie", function() { return /* reexport */ setCookie; }); -__webpack_require__.d(__webpack_exports__, "getCookie", function() { return /* reexport */ getCookie; }); -__webpack_require__.d(__webpack_exports__, "deleteCookie", function() { return /* reexport */ deleteCookie; }); -__webpack_require__.d(__webpack_exports__, "MatomoUrl", function() { return /* reexport */ src_MatomoUrl_MatomoUrl; }); -__webpack_require__.d(__webpack_exports__, "Matomo", function() { return /* reexport */ Matomo_Matomo; }); -__webpack_require__.d(__webpack_exports__, "Periods", function() { return /* reexport */ Periods_Periods; }); -__webpack_require__.d(__webpack_exports__, "Day", function() { return /* reexport */ Day_DayPeriod; }); -__webpack_require__.d(__webpack_exports__, "Week", function() { return /* reexport */ Week_WeekPeriod; }); -__webpack_require__.d(__webpack_exports__, "Month", function() { return /* reexport */ Month_MonthPeriod; }); -__webpack_require__.d(__webpack_exports__, "Year", function() { return /* reexport */ Year_YearPeriod; }); -__webpack_require__.d(__webpack_exports__, "Range", function() { return /* reexport */ Range_RangePeriod; }); -__webpack_require__.d(__webpack_exports__, "format", function() { return /* reexport */ format; }); -__webpack_require__.d(__webpack_exports__, "getToday", function() { return /* reexport */ getToday; }); -__webpack_require__.d(__webpack_exports__, "parseDate", function() { return /* reexport */ parseDate; }); -__webpack_require__.d(__webpack_exports__, "todayIsInRange", function() { return /* reexport */ todayIsInRange; }); -__webpack_require__.d(__webpack_exports__, "getWeekNumber", function() { return /* reexport */ getWeekNumber; }); -__webpack_require__.d(__webpack_exports__, "datesAreInTheSamePeriod", function() { return /* reexport */ datesAreInTheSamePeriod; }); -__webpack_require__.d(__webpack_exports__, "NumberFormatter", function() { return /* reexport */ src_NumberFormatter_NumberFormatter; }); -__webpack_require__.d(__webpack_exports__, "formatNumber", function() { return /* reexport */ formatNumber; }); -__webpack_require__.d(__webpack_exports__, "formatPercent", function() { return /* reexport */ formatPercent; }); -__webpack_require__.d(__webpack_exports__, "formatCurrency", function() { return /* reexport */ formatCurrency; }); -__webpack_require__.d(__webpack_exports__, "formatEvolution", function() { return /* reexport */ formatEvolution; }); -__webpack_require__.d(__webpack_exports__, "calculateAndFormatEvolution", function() { return /* reexport */ calculateAndFormatEvolution; }); -__webpack_require__.d(__webpack_exports__, "DropdownMenu", function() { return /* reexport */ DropdownMenu; }); -__webpack_require__.d(__webpack_exports__, "FocusAnywhereButHere", function() { return /* reexport */ FocusAnywhereButHere; }); -__webpack_require__.d(__webpack_exports__, "FocusIf", function() { return /* reexport */ FocusIf; }); -__webpack_require__.d(__webpack_exports__, "Tooltips", function() { return /* reexport */ Tooltips; }); -__webpack_require__.d(__webpack_exports__, "MatomoDialog", function() { return /* reexport */ MatomoDialog; }); -__webpack_require__.d(__webpack_exports__, "MatomoModal", function() { return /* reexport */ MatomoModal; }); -__webpack_require__.d(__webpack_exports__, "ExpandOnClick", function() { return /* reexport */ ExpandOnClick; }); -__webpack_require__.d(__webpack_exports__, "ExpandOnHover", function() { return /* reexport */ ExpandOnHover; }); -__webpack_require__.d(__webpack_exports__, "ShowSensitiveData", function() { return /* reexport */ ShowSensitiveData; }); -__webpack_require__.d(__webpack_exports__, "DropdownButton", function() { return /* reexport */ DropdownButton; }); -__webpack_require__.d(__webpack_exports__, "DraggableList", function() { return /* reexport */ DraggableList; }); -__webpack_require__.d(__webpack_exports__, "SelectOnFocus", function() { return /* reexport */ SelectOnFocus; }); -__webpack_require__.d(__webpack_exports__, "CopyToClipboard", function() { return /* reexport */ CopyToClipboard; }); -__webpack_require__.d(__webpack_exports__, "SideNav", function() { return /* reexport */ SideNav; }); -__webpack_require__.d(__webpack_exports__, "EnrichedHeadline", function() { return /* reexport */ EnrichedHeadline; }); -__webpack_require__.d(__webpack_exports__, "ContentBlock", function() { return /* reexport */ ContentBlock; }); -__webpack_require__.d(__webpack_exports__, "Comparisons", function() { return /* reexport */ Comparisons; }); -__webpack_require__.d(__webpack_exports__, "ComparisonsStore", function() { return /* reexport */ Comparisons_store_ComparisonsStore; }); -__webpack_require__.d(__webpack_exports__, "ComparisonsStoreInstance", function() { return /* reexport */ Comparisons_store_instance; }); -__webpack_require__.d(__webpack_exports__, "MenuItemsDropdown", function() { return /* reexport */ MenuItemsDropdown; }); -__webpack_require__.d(__webpack_exports__, "DatePicker", function() { return /* reexport */ DatePicker; }); -__webpack_require__.d(__webpack_exports__, "DateRangePicker", function() { return /* reexport */ DateRangePicker; }); -__webpack_require__.d(__webpack_exports__, "PeriodDatePicker", function() { return /* reexport */ PeriodDatePicker; }); -__webpack_require__.d(__webpack_exports__, "Notification", function() { return /* reexport */ Notification; }); -__webpack_require__.d(__webpack_exports__, "NotificationGroup", function() { return /* reexport */ Notification_NotificationGroup; }); -__webpack_require__.d(__webpack_exports__, "NotificationsStore", function() { return /* reexport */ Notifications_store; }); -__webpack_require__.d(__webpack_exports__, "ShowHelpLink", function() { return /* reexport */ ShowHelpLink; }); -__webpack_require__.d(__webpack_exports__, "SitesStore", function() { return /* reexport */ SiteSelector_SitesStore; }); -__webpack_require__.d(__webpack_exports__, "SiteSelector", function() { return /* reexport */ SiteSelector; }); -__webpack_require__.d(__webpack_exports__, "QuickAccess", function() { return /* reexport */ QuickAccess; }); -__webpack_require__.d(__webpack_exports__, "SearchInput", function() { return /* reexport */ SearchInput; }); -__webpack_require__.d(__webpack_exports__, "FieldArray", function() { return /* reexport */ FieldArray; }); -__webpack_require__.d(__webpack_exports__, "MultiPairField", function() { return /* reexport */ MultiPairField; }); -__webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return /* reexport */ PeriodSelector; }); -__webpack_require__.d(__webpack_exports__, "ReportingMenu", function() { return /* reexport */ ReportingMenu; }); -__webpack_require__.d(__webpack_exports__, "ReportingMenuStore", function() { return /* reexport */ ReportingMenu_store; }); -__webpack_require__.d(__webpack_exports__, "ReportingPagesStore", function() { return /* reexport */ ReportingPages_store; }); -__webpack_require__.d(__webpack_exports__, "ReportMetadataStore", function() { return /* reexport */ ReportMetadata_store; }); -__webpack_require__.d(__webpack_exports__, "WidgetsStore", function() { return /* reexport */ Widgets_store; }); -__webpack_require__.d(__webpack_exports__, "WidgetLoader", function() { return /* reexport */ WidgetLoader; }); -__webpack_require__.d(__webpack_exports__, "ClientWidgetRenderer", function() { return /* reexport */ ClientWidgetRenderer; }); -__webpack_require__.d(__webpack_exports__, "WidgetContainer", function() { return /* reexport */ WidgetContainer; }); -__webpack_require__.d(__webpack_exports__, "WidgetByDimensionContainer", function() { return /* reexport */ WidgetByDimensionContainer; }); -__webpack_require__.d(__webpack_exports__, "Widget", function() { return /* reexport */ Widget_Widget; }); -__webpack_require__.d(__webpack_exports__, "ReportingPage", function() { return /* reexport */ ReportingPage; }); -__webpack_require__.d(__webpack_exports__, "ReportExport", function() { return /* reexport */ ReportExport; }); -__webpack_require__.d(__webpack_exports__, "Sparkline", function() { return /* reexport */ Sparkline; }); -__webpack_require__.d(__webpack_exports__, "Progressbar", function() { return /* reexport */ Progressbar; }); -__webpack_require__.d(__webpack_exports__, "ContentIntro", function() { return /* reexport */ ContentIntro; }); -__webpack_require__.d(__webpack_exports__, "ContentTable", function() { return /* reexport */ ContentTable; }); -__webpack_require__.d(__webpack_exports__, "AjaxForm", function() { return /* reexport */ AjaxForm; }); -__webpack_require__.d(__webpack_exports__, "Passthrough", function() { return /* reexport */ Passthrough; }); -__webpack_require__.d(__webpack_exports__, "DataTableActions", function() { return /* reexport */ DataTableActions; }); -__webpack_require__.d(__webpack_exports__, "VersionInfoHeaderMessage", function() { return /* reexport */ VersionInfoHeaderMessage; }); -__webpack_require__.d(__webpack_exports__, "MobileLeftMenu", function() { return /* reexport */ MobileLeftMenu; }); -__webpack_require__.d(__webpack_exports__, "scrollToAnchorInUrl", function() { return /* reexport */ scrollToAnchorInUrl; }); -__webpack_require__.d(__webpack_exports__, "SearchFiltersPersistenceStore", function() { return /* reexport */ SearchFiltersPersistence_store; }); -__webpack_require__.d(__webpack_exports__, "AutoClearPassword", function() { return /* reexport */ AutoClearPassword; }); -__webpack_require__.d(__webpack_exports__, "PasswordStrength", function() { return /* reexport */ PasswordStrength; }); -__webpack_require__.d(__webpack_exports__, "EntityDuplicatorModal", function() { return /* reexport */ EntityDuplicatorModal; }); -__webpack_require__.d(__webpack_exports__, "EntityDuplicatorAction", function() { return /* reexport */ EntityDuplicatorAction; }); -__webpack_require__.d(__webpack_exports__, "EntityDuplicatorStore", function() { return /* reexport */ EntityDuplicatorStore_EntityDuplicatorStore; }); -__webpack_require__.d(__webpack_exports__, "BaseDuplicatorAdapter", function() { return /* reexport */ EntityDuplicatorAdapter_BaseDuplicatorAdapter; }); - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js -// This file is imported into lib/wc client bundles. - -if (typeof window !== 'undefined') { - var currentScript = window.document.currentScript - if (false) { var getCurrentScript; } - - var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/) - if (src) { - __webpack_require__.p = src[1] // eslint-disable-line - } -} - -// Indicate to webpack that this file can be concatenated -/* harmony default export */ var setPublicPath = (null); - -// EXTERNAL MODULE: ./plugins/CoreHome/vue/src/noAdblockFlag.ts -var noAdblockFlag = __webpack_require__("2342"); - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/translate.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function translate(translationStringId, ...values) { - if (!translationStringId) { - return ''; - } - let pkArgs = values; - // handle variadic args AND single array of values (to match _pk_translate signature) - if (values.length === 1 && values[0] && Array.isArray(values[0])) { - [pkArgs] = values; - } - return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line -} -function translateOrDefault(translationStringIdOrText, ...values) { - if (!translationStringIdOrText || !window.piwik_translations[translationStringIdOrText]) { - return translationStringIdOrText; - } - return translate(translationStringIdOrText, ...values); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Periods.ts -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/** - * Matomo period management service for the frontend. - * - * Usage: - * - * var DayPeriod = matomoPeriods.get('day'); - * var day = new DayPeriod(new Date()); - * - * or - * - * var day = matomoPeriods.parse('day', '2013-04-05'); - * - * Adding custom periods: - * - * To add your own period to the frontend, create a period class for it - * w/ the following methods: - * - * - **getPrettyString()**: returns a human readable display string for the period. - * - **getDateRange()**: returns an array w/ two elements, the first being the start - * Date of the period, the second being the end Date. The dates - * must be Date objects, not strings, and are inclusive. - * - **containsToday()**: returns true if the date period contains today. False if not. - * - (_static_) **parse(strDate)**: creates a new instance of this period from the - * value of the 'date' query parameter. - * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month', - * 'week', etc. - * - * Then call Periods.addCustomPeriod w/ your period class: - * - * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod); - * - * NOTE: currently only single date periods like day, week, month year can - * be extended. Other types of periods that require a special UI to - * view/edit aren't, since there is currently no way to use a - * custom UI for a custom period. - */ -class Periods { - constructor() { - _defineProperty(this, "periods", {}); - _defineProperty(this, "periodOrder", []); - } - addCustomPeriod(name, periodClass) { - if (this.periods[name]) { - throw new Error(`The "${name}" period already exists! It cannot be overridden.`); - } - this.periods[name] = periodClass; - this.periodOrder.push(name); - } - getAllLabels() { - return Array().concat(this.periodOrder); - } - get(strPeriod) { - const periodClass = this.periods[strPeriod]; - if (!periodClass) { - throw new Error(`Invalid period label: ${strPeriod}`); - } - return periodClass; - } - parse(strPeriod, strDate) { - return this.get(strPeriod).parse(strDate); - } - isRecognizedPeriod(strPeriod) { - return !!this.periods[strPeriod]; - } -} -/* harmony default export */ var Periods_Periods = (new Periods()); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/utilities.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function format(date) { - return $.datepicker.formatDate('yy-mm-dd', date); -} -function getToday() { - const date = new Date(Date.now()); - // undo browser timezone - date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000); - // apply Matomo site timezone (if it exists) - date.setHours(date.getHours() + (window.piwik.timezoneOffset || 0) / 3600); - // get rid of hours/minutes/seconds/etc. - date.setHours(0); - date.setMinutes(0); - date.setSeconds(0); - date.setMilliseconds(0); - return date; -} -function parseDate(date) { - if (date instanceof Date) { - return date; - } - const strDate = decodeURIComponent(date).trim(); - if (strDate === '') { - throw new Error('Invalid date, empty string.'); - } - if (strDate === 'today' || strDate === 'now') { - return getToday(); - } - if (strDate === 'yesterday' - // note: ignoring the 'same time' part since the frontend doesn't care about the time - || strDate === 'yesterdaySameTime') { - const yesterday = getToday(); - yesterday.setDate(yesterday.getDate() - 1); - return yesterday; - } - if (strDate.match(/^last[ -]?week$/i)) { - const lastWeek = getToday(); - lastWeek.setDate(lastWeek.getDate() - 7); - return lastWeek; - } - if (strDate.match(/^last[ -]?month$/i)) { - const lastMonth = getToday(); - lastMonth.setDate(1); - lastMonth.setMonth(lastMonth.getMonth() - 1); - return lastMonth; - } - if (strDate.match(/^last[ -]?year$/i)) { - const lastYear = getToday(); - lastYear.setFullYear(lastYear.getFullYear() - 1); - return lastYear; - } - return $.datepicker.parseDate('yy-mm-dd', strDate); -} -function todayIsInRange(dateRange) { - if (dateRange.length !== 2) { - return false; - } - if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) { - return true; - } - return false; -} -function getWeekNumber(date) { - // Algorithm from https://www.w3resource.com/javascript-exercises/javascript-date-exercise-24.php - // and updated based on https://www.java2s.com/example/nodejs/date/get-the-iso-week-date-week-number.html - // for legibility - // Create a copy of the date object - const dt = new Date(date.valueOf()); - // ISO week date weeks start on Monday so correct the day number - const dayNr = (date.getDay() + 6) % 7; - // ISO 8601 states that week 1 is the week with the first thursday of that year. - // Set the target date to the thursday in the target week - dt.setDate(dt.getDate() - dayNr + 3); - // Store the millisecond value of the target date - const firstThursdayUTC = dt.valueOf(); - // Set the target to the first Thursday of the year - // First set the target to january first - dt.setMonth(0, 1); - // Not a Thursday? Correct the date to the next Thursday - if (dt.getDay() !== 4) { - const daysToNextThursday = (4 - dt.getDay() + 7) % 7; - dt.setMonth(0, 1 + daysToNextThursday); - } - // The week number is the number of weeks between the - // first Thursday of the year and the Thursday in the target week - return 1 + Math.ceil((firstThursdayUTC - dt.valueOf()) / (7 * 24 * 3600 * 1000 /* 1 week */)); -} -// check whether two dates are in the same period, e.g. a week, a month or a year -function datesAreInTheSamePeriod(date1, date2, period) { - const year1 = date1.getFullYear(); - const month1 = date1.getMonth(); - const day1 = date1.getDate(); - const week1 = getWeekNumber(date1); - const year2 = date2.getFullYear(); - const month2 = date2.getMonth(); - const day2 = date2.getDate(); - const week2 = getWeekNumber(date2); - switch (period) { - case 'day': - return year1 === year2 && month1 === month2 && day1 === day2; - case 'week': - return year1 === year2 && week1 === week2; - case 'month': - return year1 === year2 && month1 === month2; - case 'year': - return year1 === year2; - default: - return false; - } -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Day.ts -function Day_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class Day_DayPeriod { - constructor(dateInPeriod) { - Day_defineProperty(this, "dateInPeriod", void 0); - this.dateInPeriod = dateInPeriod; - } - static parse(strDate) { - return new Day_DayPeriod(parseDate(strDate)); - } - static getDisplayText() { - return translate('Intl_PeriodDay'); - } - getPrettyString() { - return format(this.dateInPeriod); - } - getDateRange() { - return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())]; - } - containsToday() { - return todayIsInRange(this.getDateRange()); - } -} -Periods_Periods.addCustomPeriod('day', Day_DayPeriod); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Week.ts -function Week_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class Week_WeekPeriod { - constructor(dateInPeriod) { - Week_defineProperty(this, "dateInPeriod", void 0); - this.dateInPeriod = dateInPeriod; - } - static parse(strDate) { - return new Week_WeekPeriod(parseDate(strDate)); - } - static getDisplayText() { - return translate('Intl_PeriodWeek'); - } - getPrettyString() { - const weekDates = this.getDateRange(); - const startWeek = format(weekDates[0]); - const endWeek = format(weekDates[1]); - return translate('General_DateRangeFromTo', [startWeek, endWeek]); - } - getDateRange() { - const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7; - const startWeek = new Date(this.dateInPeriod.getTime()); - startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday); - const endWeek = new Date(startWeek.getTime()); - endWeek.setDate(startWeek.getDate() + 6); - return [startWeek, endWeek]; - } - containsToday() { - return todayIsInRange(this.getDateRange()); - } -} -Periods_Periods.addCustomPeriod('week', Week_WeekPeriod); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Month.ts -function Month_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class Month_MonthPeriod { - constructor(dateInPeriod) { - Month_defineProperty(this, "dateInPeriod", void 0); - this.dateInPeriod = dateInPeriod; - } - static parse(strDate) { - return new Month_MonthPeriod(parseDate(strDate)); - } - static getDisplayText() { - return translate('Intl_PeriodMonth'); - } - getPrettyString() { - const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`); - return `${month} ${this.dateInPeriod.getFullYear()}`; - } - getDateRange() { - const startMonth = new Date(this.dateInPeriod.getTime()); - startMonth.setDate(1); - const endMonth = new Date(this.dateInPeriod.getTime()); - endMonth.setDate(1); - endMonth.setMonth(endMonth.getMonth() + 1); - endMonth.setDate(0); - return [startMonth, endMonth]; - } - containsToday() { - return todayIsInRange(this.getDateRange()); - } -} -Periods_Periods.addCustomPeriod('month', Month_MonthPeriod); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Year.ts -function Year_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class Year_YearPeriod { - constructor(dateInPeriod) { - Year_defineProperty(this, "dateInPeriod", void 0); - this.dateInPeriod = dateInPeriod; - } - static parse(strDate) { - return new Year_YearPeriod(parseDate(strDate)); - } - static getDisplayText() { - return translate('Intl_PeriodYear'); - } - getPrettyString() { - return this.dateInPeriod.getFullYear().toString(); - } - getDateRange() { - const startYear = new Date(this.dateInPeriod.getTime()); - startYear.setMonth(0); - startYear.setDate(1); - const endYear = new Date(this.dateInPeriod.getTime()); - endYear.setMonth(12); - endYear.setDate(0); - return [startYear, endYear]; - } - containsToday() { - return todayIsInRange(this.getDateRange()); - } -} -Periods_Periods.addCustomPeriod('year', Year_YearPeriod); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Range.ts -function Range_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class Range_RangePeriod { - constructor(startDate, endDate, childPeriodType) { - Range_defineProperty(this, "startDate", void 0); - Range_defineProperty(this, "endDate", void 0); - Range_defineProperty(this, "childPeriodType", void 0); - this.startDate = startDate; - this.endDate = endDate; - this.childPeriodType = childPeriodType; - } - /** - * Returns a range representing the last N childPeriodType periods, including the current one. - */ - static getLastNRange(childPeriodType, strAmount, strEndDate) { - const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0); - if (Number.isNaN(nAmount)) { - throw new Error('Invalid range strAmount'); - } - let endDate = strEndDate ? parseDate(strEndDate) : getToday(); - let startDate = new Date(endDate.getTime()); - if (childPeriodType === 'day') { - startDate.setDate(startDate.getDate() - nAmount); - } else if (childPeriodType === 'week') { - startDate.setDate(startDate.getDate() - nAmount * 7); - } else if (childPeriodType === 'month') { - startDate.setDate(1); - startDate.setMonth(startDate.getMonth() - nAmount); - } else if (childPeriodType === 'year') { - startDate.setFullYear(startDate.getFullYear() - nAmount); - } else { - throw new Error(`Unknown period type '${childPeriodType}'.`); - } - if (childPeriodType !== 'day') { - const startPeriod = Periods_Periods.periods[childPeriodType].parse(startDate); - const endPeriod = Periods_Periods.periods[childPeriodType].parse(endDate); - [startDate] = startPeriod.getDateRange(); - [, endDate] = endPeriod.getDateRange(); - } - const firstWebsiteDate = new Date(1991, 7, 6); - if (startDate.getTime() - firstWebsiteDate.getTime() < 0) { - switch (childPeriodType) { - case 'year': - startDate = new Date(1992, 0, 1); - break; - case 'month': - startDate = new Date(1991, 8, 1); - break; - case 'week': - startDate = new Date(1991, 8, 12); - break; - case 'day': - default: - startDate = firstWebsiteDate; - break; - } - } - return new Range_RangePeriod(startDate, endDate, childPeriodType); - } - /** - * Returns a range representing a specific child date range counted back from the end date - * - * @param childPeriodType Type of the period, eg. day, week, year - * @param rangeEndDate - * @param countBack Return only the child date range for this specific period number - * @returns {RangePeriod} - */ - static getLastNRangeChild(childPeriodType, rangeEndDate, countBack) { - const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday(); - let startDate = new Date(ed.getTime()); - let endDate = new Date(ed.getTime()); - if (childPeriodType === 'day') { - startDate.setDate(startDate.getDate() - countBack); - endDate.setDate(endDate.getDate() - countBack); - } else if (childPeriodType === 'week') { - startDate.setDate(startDate.getDate() - countBack * 7); - endDate.setDate(endDate.getDate() - countBack * 7); - } else if (childPeriodType === 'month') { - startDate.setDate(1); - startDate.setMonth(startDate.getMonth() - countBack); - endDate.setDate(1); - endDate.setMonth(endDate.getMonth() - countBack); - } else if (childPeriodType === 'year') { - startDate.setFullYear(startDate.getFullYear() - countBack); - endDate.setFullYear(endDate.getFullYear() - countBack); - } else { - throw new Error(`Unknown period type '${childPeriodType}'.`); - } - if (childPeriodType !== 'day') { - const startPeriod = Periods_Periods.periods[childPeriodType].parse(startDate); - const endPeriod = Periods_Periods.periods[childPeriodType].parse(endDate); - [startDate] = startPeriod.getDateRange(); - [, endDate] = endPeriod.getDateRange(); - } - const firstWebsiteDate = new Date(1991, 7, 6); - if (startDate.getTime() - firstWebsiteDate.getTime() < 0) { - switch (childPeriodType) { - case 'year': - startDate = new Date(1992, 0, 1); - break; - case 'month': - startDate = new Date(1991, 8, 1); - break; - case 'week': - startDate = new Date(1991, 8, 12); - break; - case 'day': - default: - startDate = firstWebsiteDate; - break; - } - } - return new Range_RangePeriod(startDate, endDate, childPeriodType); - } - static parse(strDate, childPeriodType = 'day') { - if (/^previous/.test(strDate)) { - const endDate = Range_RangePeriod.getLastNRange(childPeriodType, '2').startDate; - return Range_RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate); - } - if (/^last/.test(strDate)) { - return Range_RangePeriod.getLastNRange(childPeriodType, strDate.substring(4)); - } - const parts = decodeURIComponent(strDate).split(','); - return new Range_RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType); - } - static getDisplayText() { - return translate('General_DateRangeInPeriodList'); - } - getPrettyString() { - const start = format(this.startDate); - const end = format(this.endDate); - return translate('General_DateRangeFromTo', [start, end]); - } - getDateRange() { - return [this.startDate, this.endDate]; - } - containsToday() { - return todayIsInRange(this.getDateRange()); - } - getDayCount() { - return Math.ceil((this.endDate.getTime() - this.startDate.getTime()) / (1000 * 3600 * 24)) + 1; - } -} -Periods_Periods.addCustomPeriod('range', Range_RangePeriod); -// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} -var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Matomo/Matomo.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -const { - piwik, - broadcast: Matomo_broadcast, - piwikHelper: Matomo_piwikHelper -} = window; -function normalizeLoginModule(value) { - if (typeof value !== 'string') { - return undefined; - } - const trimmed = value.trim(); - if (!trimmed) { - return undefined; - } - if (!/^[A-Za-z0-9_]+$/.test(trimmed)) { - return undefined; - } - return trimmed; -} -piwik.helper = Matomo_piwikHelper; -piwik.broadcast = Matomo_broadcast; -function getReportingMenuStore() { - const { - CoreHome - } = window; - return CoreHome === null || CoreHome === void 0 ? void 0 : CoreHome.ReportingMenuStore; -} -function getComparisonsStore() { - const { - CoreHome - } = window; - return CoreHome === null || CoreHome === void 0 ? void 0 : CoreHome.ComparisonStoreInstance; -} -function getActiveSegmentLabel(segment) { - var _segmentationTitle$te; - if (typeof segment !== 'string') { - return undefined; - } - const trimmedSegment = segment.trim(); - const comparisonsStore = getComparisonsStore(); - if (comparisonsStore) { - const comparisons = comparisonsStore.getSegmentComparisons(); - if (!trimmedSegment && comparisons.length) { - return comparisons[0].title; - } - const found = comparisons.find(comparison => comparison.params.segment === segment); - if (found) { - return found.title; - } - } - if (!trimmedSegment) { - return translate('SegmentEditor_DefaultAllVisits'); - } - const segmentationTitle = document.querySelector('.segmentEditorPanel .segmentationTitle'); - const fallbackName = segmentationTitle === null || segmentationTitle === void 0 || (_segmentationTitle$te = segmentationTitle.textContent) === null || _segmentationTitle$te === void 0 ? void 0 : _segmentationTitle$te.trim(); - if (fallbackName) { - return fallbackName; - } - return translate('SegmentEditor_CustomSegment'); -} -piwik.updateTitle = async function updateTitle(date, period, category, subcategory, segment) { - let categoryName = ''; - let subcategoryName = ''; - let dateString = ''; - if (period !== '' && date !== '') { - dateString = Periods_Periods.parse(period, date).getPrettyString(); - } - const titleSuffix = `${translate('CoreHome_WebAnalyticsReports')} - Matomo`; - const store = getReportingMenuStore(); - if (store && category && subcategory) { - var _found$category$name, _found, _found$subcategory$na, _found2; - let found = store.findSubcategory(category, subcategory); - if (!found.category) { - await store.fetchMenuItems(); - found = store.findSubcategory(category, subcategory); - } - categoryName = (_found$category$name = (_found = found) === null || _found === void 0 || (_found = _found.category) === null || _found === void 0 ? void 0 : _found.name) !== null && _found$category$name !== void 0 ? _found$category$name : ''; - subcategoryName = (_found$subcategory$na = (_found2 = found) === null || _found2 === void 0 || (_found2 = _found2.subcategory) === null || _found2 === void 0 ? void 0 : _found2.name) !== null && _found$subcategory$na !== void 0 ? _found$subcategory$na : ''; - if (categoryName === subcategoryName) { - subcategoryName = ''; - } - categoryName = Matomo_piwikHelper.htmlEntities(categoryName); - subcategoryName = Matomo_piwikHelper.htmlEntities(subcategoryName); - // Try to get the correct title by combining the category and subcategory names - const categorySubcategoryString = categoryName ? `${categoryName} ${subcategoryName ? `> ${subcategoryName}` : ''}` : ''; - const segmentLabel = getActiveSegmentLabel(segment); - const segmentString = segmentLabel ? Matomo_piwikHelper.htmlEntities(segmentLabel) : ''; - document.title = [piwik.siteName, dateString, categorySubcategoryString, segmentString, titleSuffix].filter(Boolean).join(' - '); - } -}; -piwik.hasUserCapability = function hasUserCapability(capability) { - return Array.isArray(piwik.userCapabilities) && piwik.userCapabilities.indexOf(capability) !== -1; -}; -piwik.on = function addMatomoEventListener(eventName, listener) { - function listenerWrapper(evt) { - listener(...evt.detail); // eslint-disable-line - } - listener.wrapper = listenerWrapper; - window.addEventListener(eventName, listenerWrapper); -}; -piwik.off = function removeMatomoEventListener(eventName, listener) { - if (listener.wrapper) { - window.removeEventListener(eventName, listener.wrapper); - } -}; -piwik.postEvent = function postMatomoEvent(eventName, ...args // eslint-disable-line -) { - const event = new CustomEvent(eventName, { - detail: args - }); - window.dispatchEvent(event); -}; -piwik.getLoginModule = function getLoginModule() { - const fromPiwikConfig = normalizeLoginModule(piwik.loginModule); - if (fromPiwikConfig) { - return fromPiwikConfig; - } - const fromWindow = normalizeLoginModule(window.loginModule); - if (fromWindow) { - return fromWindow; - } - return 'Login'; -}; -const Matomo = piwik; -/* harmony default export */ var Matomo_Matomo = (Matomo); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/index.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - - - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts -function MatomoUrl_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - // important to load all periods here -const { - piwik: MatomoUrl_piwik, - broadcast: MatomoUrl_broadcast -} = window; -function isValidPeriod(periodStr, dateStr) { - try { - Periods_Periods.parse(periodStr, dateStr); - return true; - } catch (e) { - return false; - } -} -/** - * URL store and helper functions. - */ -class MatomoUrl_MatomoUrl { - constructor() { - MatomoUrl_defineProperty(this, "url", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null)); - MatomoUrl_defineProperty(this, "urlQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.url.value ? this.url.value.search.replace(/^\?/, '') : '')); - MatomoUrl_defineProperty(this, "hashQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.url.value ? this.url.value.hash.replace(/^[#/?]+/, '') : '')); - MatomoUrl_defineProperty(this, "urlParsed", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.parse(this.urlQuery.value)))); - MatomoUrl_defineProperty(this, "hashParsed", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.parse(this.hashQuery.value)))); - MatomoUrl_defineProperty(this, "parsed", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(Object.assign(Object.assign({}, this.urlParsed.value), this.hashParsed.value)))); - this.url.value = new URL(window.location.href); - window.addEventListener('hashchange', event => { - this.url.value = new URL(event.newURL); - this.updatePeriodParamsFromUrl(); - this.updatePageTitle(); - }); - this.updatePeriodParamsFromUrl(); - this.updatePageTitle(); - } - updateHashToUrl(urlWithoutLeadingHash) { - const wholeHash = `#${urlWithoutLeadingHash}`; - if (window.location.hash === wholeHash) { - // trigger event manually since the url is the same - window.dispatchEvent(new HashChangeEvent('hashchange', { - newURL: window.location.href, - oldURL: window.location.href - })); - } else { - window.location.hash = wholeHash; - } - } - updateHash(params) { - const modifiedParams = this.getFinalHashParams(params); - const serializedParams = this.stringify(modifiedParams); - this.updateHashToUrl(`?${serializedParams}`); - } - updateUrl(params, hashParams = {}) { - const serializedParams = typeof params !== 'string' ? this.stringify(params) : params; - const modifiedHashParams = Object.keys(hashParams).length ? this.getFinalHashParams(hashParams, params) : {}; - const serializedHashParams = this.stringify(modifiedHashParams); - let url = `?${serializedParams}`; - if (serializedHashParams.length) { - url = `${url}#?${serializedHashParams}`; - } - window.broadcast.propagateNewPage('', undefined, undefined, undefined, url); - } - getFinalHashParams(params, urlParams = {}) { - const paramsObj = typeof params !== 'string' ? params : this.parse(params); - const urlParamsObj = typeof params !== 'string' ? urlParams : this.parse(urlParams); - return Object.assign({ - // these params must always be present in the hash - period: urlParamsObj.period || this.parsed.value.period, - date: urlParamsObj.date || this.parsed.value.date, - segment: urlParamsObj.segment || this.parsed.value.segment - }, paramsObj); - } - // if we're in an embedded context, loads an entire new URL, otherwise updates the hash - updateLocation(params) { - if (Matomo_Matomo.helper.isReportingPage()) { - this.updateHash(params); - return; - } - this.updateUrl(params); - } - getSearchParam(paramName) { - const hash = window.location.href.split('#'); - const regex = new RegExp(`${paramName}(\\[]|=)`); - if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) { - const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href); - // for date, period and idsite fall back to parameter from url, if non in hash was provided - if (valueFromHash || paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite') { - return valueFromHash; - } - } - return window.broadcast.getValueFromUrl(paramName, window.location.search); - } - parse(query) { - return MatomoUrl_broadcast.getValuesFromUrl(`?${query}`, true); - } - stringify(search) { - const searchWithoutEmpty = Object.fromEntries(Object.entries(search).filter(([, value]) => value !== '' && value !== null && value !== undefined)); - // using jQuery since URLSearchParams does not handle array params the way Matomo uses them - return $.param(searchWithoutEmpty).replace(/%5B%5D/g, '[]') - // some browsers treat URLs w/ date=a,b differently from date=a%2Cb, causing multiple - // entries to show up in the browser history. - .replace(/%2C/g, ',') - // jquery seems to encode space characters as '+', but certain parts of matomo won't - // decode it correctly, so we make sure to use %20 instead - .replace(/\+/g, '%20'); - } - getMenuPathSuffix() { - const category = this.getSearchParam('category'); - const subcategory = this.getSearchParam('subcategory'); - return { - category: decodeURIComponent(category), - subcategory: decodeURIComponent(subcategory) - }; - } - getDateAndPeriodFromUrl() { - return { - date: this.getSearchParam('date') || '', - period: this.getSearchParam('period') || '' - }; - } - updatePageTitle() { - const { - period, - date - } = this.getDateAndPeriodFromUrl(); - const { - category, - subcategory - } = this.getMenuPathSuffix(); - const segment = this.getSearchParam('segment') || ''; - MatomoUrl_piwik.updateTitle(date, period, category, subcategory, segment); - } - updatePeriodParamsFromUrl() { - const { - period, - date: initialDate - } = this.getDateAndPeriodFromUrl(); - let date = initialDate; - if (!isValidPeriod(period, date)) { - // invalid data in URL - return; - } - if (MatomoUrl_piwik.period === period && MatomoUrl_piwik.currentDateString === date) { - // this period / date is already loaded - return; - } - MatomoUrl_piwik.period = period; - const dateRange = Periods_Periods.parse(period, date).getDateRange(); - MatomoUrl_piwik.startDateString = format(dateRange[0]); - MatomoUrl_piwik.endDateString = format(dateRange[1]); - // do not set anything to previousN/lastN, as it's more useful to plugins - // to have the dates than previousN/lastN. - if (MatomoUrl_piwik.period === 'range') { - date = `${MatomoUrl_piwik.startDateString},${MatomoUrl_piwik.endDateString}`; - } - MatomoUrl_piwik.currentDateString = date; - } -} -const instance = new MatomoUrl_MatomoUrl(); -/* harmony default export */ var src_MatomoUrl_MatomoUrl = (instance); -MatomoUrl_piwik.updatePeriodParamsFromUrl = instance.updatePeriodParamsFromUrl.bind(instance); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/CookieHelper/CookieHelper.ts -/* - * General utils for managing cookies in Typescript. - */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -function setCookie(name, val, seconds) { - const date = new Date(); - // set default day to 3 days - if (!seconds) { - // eslint-disable-next-line no-param-reassign - seconds = 3 * 24 * 60 * 1000; - } - // Set it expire in n days - date.setTime(date.getTime() + seconds); - // Set it - document.cookie = `${name}=${val}; expires=${date.toUTCString()}; path=/`; -} -// eslint-disable-next-line consistent-return,@typescript-eslint/explicit-module-boundary-types -function getCookie(name) { - const value = `; ${document.cookie}`; - const parts = value.split(`; ${name}=`); - // if cookie not exist return null - // eslint-disable-next-line eqeqeq - if (parts.length == 2) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - const data = parts.pop().split(';').shift(); - if (typeof data !== 'undefined') { - return data; - } - } - return null; -} -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -function deleteCookie(name) { - const date = new Date(); - // Set it expire in -1 days - date.setTime(date.getTime() + -1 * 24 * 60 * 60 * 1000); - // Set it - document.cookie = `${name}=; expires=${date.toUTCString()}; path=/`; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts -function AjaxHelper_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - -const { - $: AjaxHelper_$ -} = window; -window.globalAjaxQueue = []; -window.globalAjaxQueue.active = 0; -window.globalAjaxQueue.clean = function globalAjaxQueueClean() { - for (let i = this.length; i >= 0; i -= 1) { - if (!this[i] || this[i].readyState === 4) { - this.splice(i, 1); - } - } -}; -window.globalAjaxQueue.push = function globalAjaxQueuePush(...args) { - this.active += args.length; - // cleanup ajax queue - this.clean(); - // call original array push - return Array.prototype.push.call(this, ...args); -}; -window.globalAjaxQueue.abort = function globalAjaxQueueAbort() { - // abort all queued requests if possible - this.forEach(x => x && x.abort && x.abort()); - // remove all elements from array - this.splice(0, this.length); - this.active = 0; -}; -/** - * error callback to use by default - */ -function defaultErrorCallback(deferred, status) { - // do not display error message if request was aborted - if (status === 'abort' || !deferred || deferred.status === 0) { - return; - } - if (typeof Piwik_Popover === 'undefined') { - console.log(`Request failed: ${deferred.responseText}`); // mostly for tests - return; - } - if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) { - AjaxHelper_$(document.body).html(piwikHelper.escape(deferred.responseText)); - } else { - AjaxHelper_$('#loadingError').show(); - } -} -function hasExplicitSegmentParam(params) { - return Object.prototype.hasOwnProperty.call(params, 'segment') && typeof params.segment !== 'undefined'; -} -class ApiResponseError extends Error {} -class ChunkedBulkRequestError extends Error { - constructor(xhr, status, errorThrown) { - super('Chunked bulk request failed.'); - AjaxHelper_defineProperty(this, "xhr", void 0); - AjaxHelper_defineProperty(this, "status", void 0); - AjaxHelper_defineProperty(this, "errorThrown", void 0); - this.xhr = xhr; - this.status = status; - this.errorThrown = errorThrown; - } -} -class ChunkedBulkAbortError extends Error { - constructor() { - super('Chunked bulk request was aborted.'); - } -} -class ChunkedBulkSessionTimeoutError extends Error { - constructor() { - super('Chunked bulk request timed out due to session expiration.'); - } -} -/** - * Global ajax helper to handle requests within Matomo - */ -class AjaxHelper_AjaxHelper { - // helper method entry point - static fetch( - // eslint-disable-line - params, options = {}) { - if (Array.isArray(params)) { - if (options.returnResponseObject) { - throw new Error(this.UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR); - } - } - const helper = new AjaxHelper_AjaxHelper(); - if (options.withTokenInUrl) { - helper.withTokenInUrl(); - } - if (options.errorElement) { - helper.setErrorElement(options.errorElement); - } - if (options.redirectOnSuccess) { - helper.redirectOnSuccess(options.redirectOnSuccess !== true ? options.redirectOnSuccess : undefined); - } - helper.setFormat(options.format || 'json'); - if (Array.isArray(params)) { - helper.setBulkRequests(...params); - } else { - Object.keys(params).forEach(key => { - if (/password/i.test(key)) { - throw new Error(`Password parameters are not allowed to be sent as GET parameter. Please send ${key} as POST parameter instead.`); - } - }); - /* - * ajax helper does not encode the segment parameter assuming it is already encoded. this is - * probably for pre-angularjs code, so we don't want to do this now, but just treat segment - * as a normal query parameter input (so it will have double encoded values in input params - * object, then naturally triple encoded in the URL after a $.param call), however we need - * to support any existing uses of the old code, so instead we do a manual encode here. new - * code that uses .fetch() will not need to pre-encode the parameter, while old code - * can pre-encode it. - * - * If a segment value is explicitly provided, then that is added to the request params. - * otherwise the request will use the segment value present in the current URL, if - * available. - */ - const hasExplicitSegment = hasExplicitSegmentParam(params); - let segmentParam = {}; - if (hasExplicitSegment) { - let segmentVal = null; - if (params.segment !== null) { - segmentVal = encodeURIComponent(params.segment); - } - segmentParam = { - segment: segmentVal - }; - } - helper.addParams(Object.assign(Object.assign({ - module: 'API', - format: options.format || 'json' - }, params), segmentParam), 'get'); - } - if (options.postParams) { - helper.addParams(options.postParams, 'post'); - } - if (options.headers) { - helper.headers = Object.assign(Object.assign({}, helper.headers), options.headers); - } - let createErrorNotification = true; - if (typeof options.createErrorNotification !== 'undefined' && !options.createErrorNotification) { - helper.useCallbackInCaseOfError(); - helper.setErrorCallback(null); - createErrorNotification = false; - } - if (options.abortController) { - helper.abortController = options.abortController; - } - if (options.returnResponseObject) { - helper.resolveWithHelper = true; - } - if (options.abortable === false) { - helper.abortable = false; - } - return helper.send().then(result => { - const data = result instanceof AjaxHelper_AjaxHelper ? result.requestHandle.responseJSON : result; - // check for error if not using default notification behavior - const results = helper.postParams.method === 'API.getBulkRequest' && Array.isArray(data) ? data : [data]; - const errors = results.filter(r => r.result === 'error').map(r => r.message); - if (errors.length) { - throw new ApiResponseError(errors.filter(e => e.length).join('\n')); - } - return result; - }).catch(error => { - if (createErrorNotification || error instanceof ApiResponseError) { - throw error; - } - let message = 'Something went wrong'; - if (error instanceof ChunkedBulkAbortError) { - message = 'Request was possibly aborted'; - } - if (error instanceof ChunkedBulkSessionTimeoutError) { - message = 'Session timed out'; - } - const status = typeof error === 'object' && error !== null && 'status' in error ? error.status : null; - if (status === 504) { - message = 'Request was possibly aborted'; - } - if (status === 429) { - message = 'Rate Limit was exceed'; - } - throw new Error(message); - }); - } - static getBulkRequestLimit() { - const bulkRequestLimit = parseInt(`${Matomo_Matomo.apiBulkRequestLimit}`, 10); - if (Number.isNaN(bulkRequestLimit)) { - return -1; - } - return bulkRequestLimit; - } - static splitIntoChunks(elements, chunkSize) { - const chunks = []; - for (let i = 0; i < elements.length; i += chunkSize) { - chunks.push(elements.slice(i, i + chunkSize)); - } - return chunks; - } - hideLoadingElement() { - if (this.loadingElement) { - AjaxHelper_$(this.loadingElement).hide(); - } - } - handleApiErrorResponseOrCallback(response, - // eslint-disable-line @typescript-eslint/no-explicit-any - status, request) { - this.hideLoadingElement(); - const results = this.postParams.method === 'API.getBulkRequest' && Array.isArray(response) ? response : [response]; - const errors = results.filter(r => r.result === 'error').map(r => r.message).filter(e => e.length) - // count occurrences of error messages - .reduce((acc, e) => { - acc[e] = (acc[e] || 0) + 1; - return acc; - }, {}); - if (errors && Object.keys(errors).length && !this.useRegularCallbackInCaseOfError) { - let errorMessage = ''; - Object.keys(errors).forEach(error => { - if (errorMessage.length) { - errorMessage += '
'; - } - // append error count if it occurred more than once - if (errors[error] > 1) { - errorMessage += `${error} (${errors[error]}x)`; - } else { - errorMessage += error; - } - }); - let placeAt = null; - let type = 'toast'; - if (AjaxHelper_$(this.errorElement).length && errorMessage.length) { - AjaxHelper_$(this.errorElement).show(); - placeAt = this.errorElement; - type = null; - } - const isLoggedIn = !document.querySelector('#login_form'); - if (errorMessage && isLoggedIn) { - const UI = window['require']('piwik/UI'); // eslint-disable-line - const notification = new UI.Notification(); - notification.show(errorMessage, { - placeat: placeAt, - context: 'error', - type, - id: 'ajaxHelper' - }); - notification.scrollToNotification(); - } - } else if (this.callback) { - this.callback(response, status, request); - } - } - buildRequestUrl(getParameters) { - const parameters = this.mixinDefaultGetParams(getParameters); - let url = this.getUrl; - if (url[url.length - 1] !== '?') { - url += '&'; - } - if (Object.prototype.hasOwnProperty.call(parameters, 'segment')) { - const segmentValue = parameters.segment; - delete parameters.segment; - if (segmentValue !== null && typeof segmentValue !== 'undefined') { - // We can't run the segment through a full encode helper here, as legacy callers may - // already pass a pre-encoded value and we would double-encode it. So we manually escape - // the few characters that carry query-string meaning to keep the value a single - // parameter. A correctly encoded segment never contains these literally, so this leaves - // already-encoded values untouched. - const safeSegmentValue = `${segmentValue}`.replace(/&/g, '%26').replace(/#/g, '%23').replace(/\?/g, '%3F'); - url = `${url}segment=${safeSegmentValue}&`; - } - } - if (parameters.date) { - const dateStr = parameters.date.toString(); - const period = parameters.period; - // Bound the date string to the character set Matomo date syntax uses. - // This runs unconditionally, so even requests without a recognized period can't - // push unexpected characters into the query string. - if (!/^[a-z0-9, -]+$/i.test(dateStr)) { - throw new Error(`Invalid date '${dateStr}'.`); - } - // Reject date values that don't match the selected period. Skip when no period is present - // (some API requests omit it) and skip unrecognized periods so we don't reject periods the - // backend supports but the frontend doesn't register. - if (period && Periods_Periods.isRecognizedPeriod(period)) { - // only the numeric lastN/previousN and comma-range forms are multiple-period requests. - const isMultiplePeriod = /^(last|previous)\d/i.test(dateStr) || dateStr.indexOf(',') !== -1; - try { - if (isMultiplePeriod && period !== 'range') { - Range_RangePeriod.parse(dateStr, period); - } else { - Periods_Periods.parse(period, dateStr); - } - } catch (e) { - throw new Error(`Invalid date '${dateStr}' for period '${period}'.`); - } - } - url = `${url}date=${encodeURIComponent(dateStr).replace(/%2C/g, ',')}&`; - delete parameters.date; - } - url += AjaxHelper_$.param(parameters); - return url; - } - buildChunkedBulkAjaxCall(urls) { - const url = this.buildRequestUrl(Object.assign({}, this.getParams)); - const urlsProcessed = urls.map(bulkUrl => typeof bulkUrl === 'string' ? bulkUrl : AjaxHelper_$.param(bulkUrl)); - return AjaxHelper_$.ajax({ - type: 'POST', - async: true, - url, - dataType: this.format || 'json', - headers: this.headers ? this.headers : undefined, - data: this.mixinDefaultPostParams(Object.assign(Object.assign({}, this.postParams), {}, { - urls: urlsProcessed - })), - timeout: this.timeout !== null ? this.timeout : undefined - }); - } - getBulkRequestUrls() { - if (this.postParams.method !== 'API.getBulkRequest' || !Array.isArray(this.postParams.urls)) { - return null; - } - return this.postParams.urls; - } - shouldSendBulkRequestInChunks() { - const bulkRequestUrls = this.getBulkRequestUrls(); - if (!bulkRequestUrls) { - return false; - } - const bulkRequestLimit = AjaxHelper_AjaxHelper.getBulkRequestLimit(); - return bulkRequestLimit > 0 && bulkRequestUrls.length > bulkRequestLimit; - } - shouldRejectBulkResponseObjectRequest() { - return !!this.getBulkRequestUrls() && this.resolveWithHelper; - } - sendBulkRequestInChunks() { - const bulkRequestUrls = this.getBulkRequestUrls(); - if (!bulkRequestUrls) { - return Promise.resolve([]); - } - const bulkRequestLimit = AjaxHelper_AjaxHelper.getBulkRequestLimit(); - if (bulkRequestLimit <= 0) { - return Promise.resolve([]); - } - // Validate before queueing so invalid requests reject without consuming a queue slot. - try { - this.buildRequestUrl(Object.assign({}, this.getParams)); - } catch (e) { - this.hideLoadingElement(); - return Promise.reject(e); - } - const chunkedAbortController = this.abortController || new AbortController(); - this.abortController = chunkedAbortController; - let activeChunkRequest = null; - let isQueueFinalized = false; - let hasCompleteCallbackRun = false; - const finalizeQueue = () => { - if (isQueueFinalized || !this.abortable) { - return; - } - window.globalAjaxQueue.active -= 1; - isQueueFinalized = true; - }; - const runCompleteCallback = (request, status) => { - if (hasCompleteCallbackRun || !this.completeCallback) { - return; - } - hasCompleteCallbackRun = true; - this.completeCallback(request, status); - }; - const requestHandle = { - readyState: 1, - status: 0, - statusText: '', - responseJSON: [], - abort: () => { - chunkedAbortController.abort(); - } - }; - const requestHandleAsJqXHR = requestHandle; - let callbackRequest = requestHandleAsJqXHR; - this.requestHandle = requestHandleAsJqXHR; - if (this.abortable) { - window.globalAjaxQueue.push(requestHandleAsJqXHR); - } - chunkedAbortController.signal.addEventListener('abort', () => { - if (activeChunkRequest) { - activeChunkRequest.abort(); - } - }); - const chunks = AjaxHelper_AjaxHelper.splitIntoChunks(bulkRequestUrls, bulkRequestLimit); - const results = []; - const sendChunk = chunkIndex => { - if (chunkIndex >= chunks.length) { - return Promise.resolve(results); - } - activeChunkRequest = this.buildChunkedBulkAjaxCall(chunks[chunkIndex]); - return new Promise((resolve, reject) => { - activeChunkRequest.then((chunkResult, status, xhr) => { - callbackRequest = xhr; - requestHandle.readyState = xhr.readyState; - requestHandle.status = xhr.status; - requestHandle.statusText = xhr.statusText || status; - if (Array.isArray(chunkResult)) { - results.push(...chunkResult); - } else { - results.push(chunkResult); - } - resolve(results); - }).fail((xhr, status, errorThrown) => { - requestHandle.readyState = xhr.readyState; - requestHandle.status = xhr.status; - requestHandle.statusText = xhr.statusText || status; - reject(new ChunkedBulkRequestError(xhr, status, errorThrown)); - }); - }).then(() => sendChunk(chunkIndex + 1)); - }; - return sendChunk(0).then(chunkResults => { - requestHandle.readyState = 4; - requestHandle.responseJSON = chunkResults; - this.handleApiErrorResponseOrCallback(chunkResults, 'success', callbackRequest); - finalizeQueue(); - runCompleteCallback(callbackRequest, 'success'); - if (Matomo_Matomo.ajaxRequestFinished) { - Matomo_Matomo.ajaxRequestFinished(); - } - return chunkResults; - }).catch(error => { - if (!(error instanceof ChunkedBulkRequestError)) { - throw error; - } - const { - xhr, - status, - errorThrown - } = error; - finalizeQueue(); - if (this.errorCallback) { - this.errorCallback.apply(this, [xhr, status, errorThrown]); - } - runCompleteCallback(xhr, status); - if (xhr.status === 429) { - console.log(`Warning: the '${AjaxHelper_$.param(this.getParams)}' request was rate limited!`); - throw xhr; - } - if (xhr.statusText === 'abort' || xhr.status === 0) { - throw new ChunkedBulkAbortError(); - } - const isInApp = !document.querySelector('#login_form'); - const sessionTimedOut = xhr.getResponseHeader('X-Matomo-Session-Timed-Out') === '1'; - if (sessionTimedOut && isInApp) { - setCookie('matomo_session_timed_out', '1', 60 * 1000); - Matomo_Matomo.helper.refreshAfter(0); - throw new ChunkedBulkSessionTimeoutError(); - } - console.log(`Warning: the ${AjaxHelper_$.param(this.getParams)} request failed!`); - throw xhr; - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static post(params, - // eslint-disable-next-line - postParams = {}, options = {}) { - return AjaxHelper_AjaxHelper.fetch(params, Object.assign(Object.assign({}, options), {}, { - postParams - })); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static oneAtATime(method, options) { - let abortController = null; - return (params, postParams) => { - if (abortController) { - abortController.abort(); - } - abortController = new AbortController(); - return AjaxHelper_AjaxHelper.post(Object.assign(Object.assign({}, params), {}, { - method - }), postParams, Object.assign(Object.assign({}, options), {}, { - abortController - })).finally(() => { - abortController = null; - }); - }; - } - constructor() { - /** - * Format of response - */ - AjaxHelper_defineProperty(this, "format", 'json'); - /** - * A timeout for the request which will override any global timeout - */ - AjaxHelper_defineProperty(this, "timeout", null); - /** - * Callback function to be executed on success - */ - AjaxHelper_defineProperty(this, "callback", null); - /** - * Use this.callback if an error is returned - */ - AjaxHelper_defineProperty(this, "useRegularCallbackInCaseOfError", false); - /** - * Callback function to be executed on error - * - * @deprecated use the jquery promise API - */ - AjaxHelper_defineProperty(this, "errorCallback", void 0); - AjaxHelper_defineProperty(this, "withToken", false); - /** - * Callback function to be executed on complete (after error or success) - * - * @deprecated use the jquery promise API - */ - AjaxHelper_defineProperty(this, "completeCallback", void 0); - /** - * Params to be passed as GET params - * @see ajaxHelper.mixinDefaultGetParams - */ - AjaxHelper_defineProperty(this, "getParams", {}); - /** - * Base URL used in the AJAX request. Can be set by setUrl. - * - * It is set to '?' rather than 'index.php?' to increase chances that it works - * including for users who have an automatic 301 redirection from index.php? to ? - * POST values are missing when there is such 301 redirection. So by by-passing - * this 301 redirection, we avoid this issue. - * - * @see ajaxHelper.setUrl - */ - AjaxHelper_defineProperty(this, "getUrl", '?'); - /** - * Params to be passed as GET params - * @see ajaxHelper.mixinDefaultPostParams - */ - AjaxHelper_defineProperty(this, "postParams", {}); - /** - * Element to be displayed while loading - */ - AjaxHelper_defineProperty(this, "loadingElement", null); - /** - * Element to be displayed on error - */ - AjaxHelper_defineProperty(this, "errorElement", '#ajaxError'); - /** - * Extra headers to add to the request. - */ - AjaxHelper_defineProperty(this, "headers", { - 'X-Requested-With': 'XMLHttpRequest' - }); - /** - * Handle for current request - */ - AjaxHelper_defineProperty(this, "requestHandle", null); - AjaxHelper_defineProperty(this, "abortController", null); - AjaxHelper_defineProperty(this, "abortable", true); - AjaxHelper_defineProperty(this, "defaultParams", ['idSite', 'period', 'date', 'segment']); - AjaxHelper_defineProperty(this, "resolveWithHelper", false); - this.errorCallback = defaultErrorCallback; - } - /** - * Adds params to the request. - * If params are given more then once, the latest given value is used for the request - * - * @param initialParams - * @param type type of given parameters (POST or GET) - * @return {void} - */ - addParams(initialParams, type) { - const params = typeof initialParams === 'string' ? window.broadcast.getValuesFromUrl(initialParams) : initialParams; - const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates']; - Object.keys(params).forEach(key => { - let value = params[key]; - if (arrayParams.indexOf(key) !== -1 && !value) { - return; - } - if (typeof value === 'boolean') { - value = value ? 1 : 0; - } - if (type.toLowerCase() === 'get') { - this.getParams[key] = value; - } else if (type.toLowerCase() === 'post') { - this.postParams[key] = value; - } - }); - } - withTokenInUrl() { - this.withToken = true; - } - /** - * Sets the base URL to use in the AJAX request. - */ - setUrl(url) { - this.addParams(broadcast.getValuesFromUrl(url), 'GET'); - } - /** - * Gets this helper instance ready to send a bulk request. Each argument to this - * function is a single request to use. - */ - setBulkRequests(...urls) { - const urlsProcessed = urls.map(u => typeof u === 'string' ? u : AjaxHelper_$.param(u)); - this.addParams({ - module: 'API', - method: 'API.getBulkRequest', - urls: urlsProcessed, - format: 'json' - }, 'post'); - } - /** - * Set a timeout (in milliseconds) for the request. This will override any global timeout. - * - * @param timeout Timeout in milliseconds - */ - setTimeout(timeout) { - this.timeout = timeout; - } - /** - * Sets the callback called after the request finishes - * - * @param callback Callback function - * @deprecated use the jquery promise API - */ - setCallback(callback) { - this.callback = callback; - } - /** - * Set that the callback passed to setCallback() should be used if an application error (i.e. an - * Exception in PHP) is returned. - */ - useCallbackInCaseOfError() { - this.useRegularCallbackInCaseOfError = true; - } - /** - * Set callback to redirect on success handler - * &update=1(+x) will be appended to the current url - * - * @param [params] to modify in redirect url - * @return {void} - */ - redirectOnSuccess(params) { - this.setCallback(() => { - piwikHelper.redirect(params); - }); - } - /** - * Sets the callback called in case of an error within the request - * - * @deprecated use the jquery promise API - */ - setErrorCallback(callback) { - this.errorCallback = callback; - } - /** - * Sets the complete callback which is called after an error or success callback. - * - * @deprecated use the jquery promise API - */ - setCompleteCallback(callback) { - this.completeCallback = callback; - } - /** - * Sets the response format for the request - * - * @param format response format (e.g. json, html, ...) - */ - setFormat(format) { - this.format = format; - } - /** - * Set the div element to show while request is loading - * - * @param [element] selector for the loading element - */ - setLoadingElement(element) { - this.loadingElement = element || '#ajaxLoadingDiv'; - } - /** - * Set the div element to show on error - * - * @param element selector for the error element - */ - setErrorElement(element) { - if (!element) { - return; - } - this.errorElement = element; - } - /** - * Detect whether are allowed to use the given default parameter or not - */ - useGETDefaultParameter(parameter) { - if (parameter && this.defaultParams) { - for (let i = 0; i < this.defaultParams.length; i += 1) { - if (this.defaultParams[i] === parameter) { - return true; - } - } - } - return false; - } - /** - * Removes a default parameter that is usually send automatically along the request. - * - * @param parameter A name such as "period", "date", "segment". - */ - removeDefaultParameter(parameter) { - if (parameter && this.defaultParams) { - for (let i = 0; i < this.defaultParams.length; i += 1) { - if (this.defaultParams[i] === parameter) { - this.defaultParams.splice(i, 1); - } - } - } - } - /** - * Send the request - */ - send() { - if (AjaxHelper_$(this.errorElement).length) { - AjaxHelper_$(this.errorElement).hide(); - } - if (this.shouldRejectBulkResponseObjectRequest()) { - throw new Error(AjaxHelper_AjaxHelper.UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR); - } - if (this.loadingElement) { - AjaxHelper_$(this.loadingElement).fadeIn(); - } - if (this.shouldSendBulkRequestInChunks()) { - return this.sendBulkRequestInChunks(); - } - try { - this.requestHandle = this.buildAjaxCall(); - } catch (e) { - this.hideLoadingElement(); - return Promise.reject(e); - } - if (this.abortable) { - window.globalAjaxQueue.push(this.requestHandle); - } - if (this.abortController) { - this.abortController.signal.addEventListener('abort', () => { - if (this.requestHandle) { - this.requestHandle.abort(); - } - }); - } - const result = new Promise((resolve, reject) => { - this.requestHandle.then(data => { - if (this.resolveWithHelper) { - // NOTE: we can't resolve w/ the jquery xhr, because it's a promise, and will - // just result in following the promise chain back to 'data' - resolve(this); // casting hack here - } else { - resolve(data); // ignoring textStatus/jqXHR - } - }).fail(xhr => { - if (xhr.status === 429) { - console.log(`Warning: the '${AjaxHelper_$.param(this.getParams)}' request was rate limited!`); - reject(xhr); - return; - } - if (xhr.statusText === 'abort' || xhr.status === 0) { - return; - } - const isInApp = !document.querySelector('#login_form'); - const sessionTimedOut = xhr.getResponseHeader('X-Matomo-Session-Timed-Out') === '1'; - if (sessionTimedOut && isInApp) { - setCookie('matomo_session_timed_out', '1', 60 * 1000); - Matomo_Matomo.helper.refreshAfter(0); - return; - } - console.log(`Warning: the ${AjaxHelper_$.param(this.getParams)} request failed!`); - reject(xhr); - }); - }); - return result; - } - /** - * Aborts the current request if it is (still) running - */ - abort() { - if (this.requestHandle && typeof this.requestHandle.abort === 'function') { - this.requestHandle.abort(); - this.requestHandle = null; - } - } - /** - * Builds and sends the ajax requests - */ - buildAjaxCall() { - const self = this; - const url = this.buildRequestUrl(this.getParams); - const ajaxCall = { - type: 'POST', - async: true, - url, - dataType: this.format || 'json', - complete: this.completeCallback, - headers: this.headers ? this.headers : undefined, - error: function errorCallback(...args) { - if (self.abortable) { - window.globalAjaxQueue.active -= 1; - } - if (self.errorCallback) { - self.errorCallback.apply(this, args); - } - }, - success: (response, status, request) => { - this.handleApiErrorResponseOrCallback(response, status, request); - if (self.abortable) { - window.globalAjaxQueue.active -= 1; - } - if (Matomo_Matomo.ajaxRequestFinished) { - Matomo_Matomo.ajaxRequestFinished(); - } - }, - data: this.mixinDefaultPostParams(this.postParams), - timeout: this.timeout !== null ? this.timeout : undefined - }; - return AjaxHelper_$.ajax(ajaxCall); - } - isRequestToApiMethod() { - return this.getParams && this.getParams.module === 'API' && this.getParams.method || this.postParams && this.postParams.module === 'API' && this.postParams.method; - } - isWidgetizedRequest() { - return broadcast.getValueFromUrl('module') === 'Widgetize'; - } - getDefaultPostParams() { - if (this.withToken || this.isRequestToApiMethod() || Matomo_Matomo.shouldPropagateTokenAuth) { - return { - token_auth: Matomo_Matomo.token_auth, - // When viewing a widgetized report there won't be any session that can be used, so don't - // force session usage - force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1 - }; - } - return {}; - } - /** - * Mixin the default parameters to send as POST - * - * @param params parameter object - */ - mixinDefaultPostParams(params) { - const defaultParams = this.getDefaultPostParams(); - const mergedParams = Object.assign(Object.assign({}, defaultParams), params); - return mergedParams; - } - /** - * Mixin the default parameters to send as GET - * - * @param params parameter object - */ - mixinDefaultGetParams(originalParams) { - const segment = src_MatomoUrl_MatomoUrl.getSearchParam('segment'); - const defaultParams = { - idSite: Matomo_Matomo.idSite ? Matomo_Matomo.idSite.toString() : broadcast.getValueFromUrl('idSite'), - period: Matomo_Matomo.period || broadcast.getValueFromUrl('period'), - segment - }; - const params = originalParams; - const hasExplicitSegment = hasExplicitSegmentParam(params) || hasExplicitSegmentParam(this.postParams); - // never append token_auth to url - if (params.token_auth) { - params.token_auth = null; - delete params.token_auth; - } - Object.keys(defaultParams).forEach(key => { - if (this.useGETDefaultParameter(key) && !(key === 'segment' && hasExplicitSegment) && (params[key] === null || typeof params[key] === 'undefined' || params[key] === '') && (this.postParams[key] === null || typeof this.postParams[key] === 'undefined' || this.postParams[key] === '') && defaultParams[key]) { - params[key] = defaultParams[key]; - } - }); - // handle default date & period if not already set - if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) { - params.date = Matomo_Matomo.currentDateString; - } - return params; - } - getRequestHandle() { - return this.requestHandle; - } -} -AjaxHelper_defineProperty(AjaxHelper_AjaxHelper, "UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR", 'AjaxHelper returnResponseObject is not supported for bulk requests.'); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts - -window.ajaxHelper = AjaxHelper_AjaxHelper; -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts -function NumberFormatter_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -const { - $: NumberFormatter_$ -} = window; -class NumberFormatter_NumberFormatter { - constructor() { - NumberFormatter_defineProperty(this, "defaultMinFractionDigits", 0); - NumberFormatter_defineProperty(this, "defaultMaxFractionDigits", 2); - } - format(val, formatPattern, maxFractionDigits, minFractionDigits) { - if (!NumberFormatter_$.isNumeric(val)) { - return String(val); - } - let value = val; - let pattern = formatPattern || Matomo_Matomo.numbers.patternNumber; - const patterns = pattern.split(';'); - if (patterns.length === 1) { - // No explicit negative pattern was provided, construct it. - patterns.push(`-${patterns[0]}`); - } - // Ensure that the value is positive and has the right number of digits. - const negative = value < 0; - pattern = negative ? patterns[1] : patterns[0]; - value = Math.abs(value); - // round value to maximal number of fraction digits - if (maxFractionDigits >= 0) { - const factionFactor = 10 ** maxFractionDigits; - value = Math.round(value * factionFactor) / factionFactor; - } - // Split the number into major and minor digits. - const valueParts = value.toString().split('.'); - let majorDigits = valueParts[0]; - // Account for maxFractionDigits = 0, where the number won't - // have a decimal point, and $valueParts[1] won't be set. - let minorDigits = valueParts[1] || ''; - const usesGrouping = pattern.indexOf(',') !== -1; - // if pattern has number groups, parse them. - if (usesGrouping) { - const primaryGroupMatches = pattern.match(/#+0/); - const primaryGroupSize = (primaryGroupMatches === null || primaryGroupMatches === void 0 ? void 0 : primaryGroupMatches[0].length) || 0; - let secondaryGroupSize = (primaryGroupMatches === null || primaryGroupMatches === void 0 ? void 0 : primaryGroupMatches[0].length) || 0; - const numberGroups = pattern.split(','); - // check for distinct secondary group size. - if (numberGroups.length > 2) { - secondaryGroupSize = numberGroups[1].length; - } - // Reverse the major digits, since they are grouped from the right. - const digits = majorDigits.split('').reverse(); - // Group the major digits. - let groups = []; - groups.push(digits.splice(0, primaryGroupSize).reverse().join('')); - while (digits.length) { - groups.push(digits.splice(0, secondaryGroupSize).reverse().join('')); - } - // Reverse the groups and the digits inside of them. - groups = groups.reverse(); - // Reconstruct the major digits. - majorDigits = groups.join(','); - } - if (minFractionDigits > 0) { - // Strip any trailing zeroes. - minorDigits = minorDigits.replace(/0+$/, ''); - if (minorDigits.length < minFractionDigits && minorDigits.length < maxFractionDigits) { - // Now there are too few digits, re-add trailing zeroes - // until the desired length is reached. - const neededZeroes = minFractionDigits - minorDigits.length; - minorDigits += new Array(neededZeroes + 1).join('0'); - } - } - // Assemble the final number and insert it into the pattern. - let result = minorDigits ? `${majorDigits}.${minorDigits}` : majorDigits; - result = pattern.replace(/#(?:[.,]#+)*0(?:[,.][0#]+)*/, result); - // Localize the number. - return this.replaceSymbols(result); - } - replaceSymbols(value) { - const replacements = { - '.': Matomo_Matomo.numbers.symbolDecimal, - ',': Matomo_Matomo.numbers.symbolGroup, - '+': Matomo_Matomo.numbers.symbolPlus, - '-': Matomo_Matomo.numbers.symbolMinus, - '%': Matomo_Matomo.numbers.symbolPercent - }; - let newValue = ''; - const valueParts = value.split(''); - valueParts.forEach(val => { - let valueReplaced = val; - Object.entries(replacements).some(([char, replacement]) => { - if (valueReplaced.indexOf(char) !== -1) { - valueReplaced = valueReplaced.replace(char, replacement); - return true; - } - return false; - }); - newValue += valueReplaced; - }); - return newValue; - } - valOrDefault(val, def) { - if (typeof val === 'undefined') { - return def; - } - return val; - } - getMaxFractionDigitsForCompactFormat(valueLength) { - return valueLength === 1 ? 1 : 0; - } - determineCorrectCompactPattern(patterns, value) { - let factor = 0; - let finalFactor = 0; - let patternId = ''; - if (Math.round(value) < 1000) { - return ['0', 1]; - } - for (factor = 1000; factor <= 10000000000000000000; factor *= 10) { - const patternOne = `${factor}One`; - const patternOther = `${factor}Other`; - if (Math.round(value / factor) === 1 && (patterns === null || patterns === void 0 ? void 0 : patterns[patternOne]) !== '') { - finalFactor = factor; - patternId = patternOne; - } else if (Math.round(value / factor) >= 1 && (patterns === null || patterns === void 0 ? void 0 : patterns[patternOther]) !== '') { - finalFactor = factor; - patternId = patternOther; - } - if (patterns !== null && patterns !== void 0 && patterns[patternId]) { - var _patterns$patternId$m; - const charCount = (patterns === null || patterns === void 0 || (_patterns$patternId$m = patterns[patternId].match(/0/g)) === null || _patterns$patternId$m === void 0 ? void 0 : _patterns$patternId$m.length) || 1; - if (Math.round(value * 10 ** charCount / (factor * 10)) < 10 ** charCount) { - break; - } - } - } - return [(patterns === null || patterns === void 0 ? void 0 : patterns[patternId]) || '0', finalFactor]; - } - formatCompact(pattern, factor, value) { - var _pattern$match; - const charCount = ((_pattern$match = pattern.match(/0/g)) === null || _pattern$match === void 0 ? void 0 : _pattern$match.length) || 0; - let finalFactor = factor; - if (charCount > 1) { - finalFactor /= 10 ** (charCount - 1); - } - const maximumFractionDigits = this.getMaxFractionDigitsForCompactFormat(charCount); - // cut off numbers after a certain decimal, as formatNumber would round otherwise - const digitCountFactor = 10 ** maximumFractionDigits; - const finalValue = Math.round(value / finalFactor * digitCountFactor) / digitCountFactor; - const formattedNumber = this.formatNumber(finalValue, maximumFractionDigits, 0); - return pattern.replace(/(0+)/, formattedNumber).replace(/('\.')/, '.'); - } - parseFormattedNumber(value) { - const isNegative = value.indexOf(Matomo_Matomo.numbers.symbolMinus) > -1 || value.startsWith('-'); - const numberParts = value.split(Matomo_Matomo.numbers.symbolDecimal); - numberParts.forEach((val, index) => { - numberParts[index] = val.replace(/[^0-9]/g, ''); - }); - return (isNegative ? -1 : 1) * parseFloat(numberParts.join('.')); - } - formatNumber(value, maxFractionDigits, minFractionDigits) { - return this.format(value, Matomo_Matomo.numbers.patternNumber, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); - } - formatPercent(value, maxFractionDigits, minFractionDigits) { - return this.format(value, Matomo_Matomo.numbers.patternPercent, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); - } - formatCurrency(value, currency, maxFractionDigits, minFractionDigits) { - const formatted = this.format(value, Matomo_Matomo.numbers.patternCurrency, this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits)); - return formatted.replace('¤', currency); - } - formatNumberCompact(value) { - const val = value; - const [compactPattern, factor] = this.determineCorrectCompactPattern(Matomo_Matomo.numbers.patternsCompactNumber || [], val); - // In case no special formatting should be used, we use the default number format - if (Math.round(val) < 1000 || compactPattern === '0') { - return this.formatNumber(val, this.getMaxFractionDigitsForCompactFormat(Math.round(val)), 0); - } - return this.formatCompact(compactPattern, factor, val); - } - formatCurrencyCompact(value, currency) { - const val = value; - const [compactPattern, factor] = this.determineCorrectCompactPattern(Matomo_Matomo.numbers.patternsCompactCurrency || [], val); - // In case no special formatting should be used, we use the default number format - if (Math.round(val) < 1000 || compactPattern === '0') { - return this.formatCurrency(val, currency, this.getMaxFractionDigitsForCompactFormat(Math.round(val)), 0); - } - return this.formatCompact(compactPattern, factor, val).replace('¤', currency); - } - formatEvolution(evolution, maxFractionDigits, minFractionDigits, noSign) { - if (noSign) { - return this.formatPercent(Math.abs(evolution), maxFractionDigits, minFractionDigits); - } - const formattedEvolution = this.formatPercent(evolution, maxFractionDigits, minFractionDigits); - return `${evolution > 0 ? Matomo_Matomo.numbers.symbolPlus : ''}${formattedEvolution}`; - } - calculateAndFormatEvolution(currentValue, pastValue, noSign) { - const pastValueParsed = parseInt(pastValue, 10); - const currentValueParsed = parseInt(currentValue, 10) - pastValueParsed; - let evolution; - if (currentValueParsed === 0 || Number.isNaN(currentValueParsed)) { - evolution = 0; - } else if (pastValueParsed === 0 || Number.isNaN(pastValueParsed)) { - evolution = 100; - } else { - evolution = currentValueParsed / pastValueParsed * 100; - } - let maxFractionDigits = 3; - if (Math.abs(evolution) > 100) { - maxFractionDigits = 0; - } else if (Math.abs(evolution) > 10) { - maxFractionDigits = 1; - } else if (Math.abs(evolution) > 1) { - maxFractionDigits = 2; - } - return this.formatEvolution(evolution, maxFractionDigits, 0, noSign); - } -} -/* harmony default export */ var src_NumberFormatter_NumberFormatter = (new NumberFormatter_NumberFormatter()); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.adapter.ts - -window.NumberFormatter = src_NumberFormatter_NumberFormatter; -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -const { - $: PopoverHandler_$ -} = window; -class PopoverHandler_PopoverHandler { - constructor() { - this.setup(); - } - setup() { - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => src_MatomoUrl_MatomoUrl.parsed.value.popover, () => this.onPopoverParamChanged()); - if (src_MatomoUrl_MatomoUrl.parsed.value.popover) { - this.onPopoverParamChangedInitial(); - } - } - // don't initiate the handler until the page had a chance to render, - // since some rowactions depend on what's been loaded. - onPopoverParamChangedInitial() { - PopoverHandler_$(() => { - setTimeout(() => { - this.openOrClose(); - }); - }); - } - onPopoverParamChanged() { - // make sure all popover handles were registered - PopoverHandler_$(() => { - this.openOrClose(); - }); - } - openOrClose() { - this.close(); - // should be rather done by routing - const popoverParam = src_MatomoUrl_MatomoUrl.parsed.value.popover; - if (popoverParam) { - this.open(popoverParam); - } else { - // the URL should only be set to an empty popover if there are no popovers in the stack. - // to avoid avoid any strange inconsistent states, we reset the popover stack here. - window.broadcast.resetPopoverStack(); - } - } - close() { - window.Piwik_Popover.close(); - } - open(thePopoverParam) { - // in case the $ was encoded (e.g. when using copy&paste on urls in some browsers) - let popoverParam = decodeURIComponent(thePopoverParam); - // revert special encoding from broadcast.propagateNewPopoverParameter() - popoverParam = popoverParam.replace(/\$/g, '%'); - popoverParam = decodeURIComponent(popoverParam); - const popoverParamParts = popoverParam.split(':'); - const handlerName = popoverParamParts[0]; - popoverParamParts.shift(); - const param = popoverParamParts.join(':'); - if (typeof window.broadcast.popoverHandlers[handlerName] !== 'undefined' && !window.broadcast.isLoginPage()) { - window.broadcast.popoverHandlers[handlerName](param); - } - } -} -/* harmony default export */ var src_PopoverHandler_PopoverHandler = (new PopoverHandler_PopoverHandler()); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/zenMode.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -const { - $: zenMode_$ -} = window; -let zenModeShortcutRegistered = false; -function handleZenMode() { - let zenMode = !!parseInt(getCookie('zenMode'), 10); - const iconSwitcher = zenMode_$('.top_controls .zenModeToggle'); - function updateZenMode() { - if (zenMode) { - zenMode_$('body').addClass('zenMode'); - iconSwitcher.addClass('icon-arrowdown').removeClass('icon-arrowup'); - iconSwitcher.prop('title', translate('CoreHome_ExitZenMode')); - } else { - zenMode_$('body').removeClass('zenMode'); - iconSwitcher.removeClass('icon-arrowdown').addClass('icon-arrowup'); - iconSwitcher.prop('title', translate('CoreHome_EnterZenMode')); - } - } - if (!zenModeShortcutRegistered) { - Matomo_Matomo.helper.registerShortcut('z', translate('CoreHome_ShortcutZenMode'), event => { - if (event.altKey) { - return; - } - zenMode = !zenMode; - setCookie('zenMode', zenMode ? '1' : '0'); - updateZenMode(); - }); - zenModeShortcutRegistered = true; - } - iconSwitcher.off('click.matomoZenMode').on('click.matomoZenMode', () => { - window.Mousetrap.trigger('z'); - }); - updateZenMode(); -} -zenMode_$(handleZenMode); -Matomo_Matomo.on('Matomo.topControlsRendered', () => { - handleZenMode(); -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/externalLink.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/** - * Takes a raw URL and returns an HTML link tag for the URL, if the URL is for a matomo.org - * domain then the URL will be modified to include campaign parameters - * - * @param url URL to process - * @param values Optional [campaignOverride, sourceOverride, mediumOverride] - * @return string - */ -function externalRawLink(url, ...values) { - const pkArgs = values; - if (!window._pk_externalRawLink) { - // eslint-disable-line - return url; - } - return window._pk_externalRawLink(url, pkArgs); // eslint-disable-line -} -/** - * Takes a raw URL and returns an HTML link tag for the URL, if the URL is for a matomo.org - * domain then the URL will be modified to include campaign parameters - * - * @param url URL to process - * @param values Optional [campaignOverride, sourceOverride, mediumOverride] - * @return string - */ -function externalLink(url, ...values) { - if (!url) { - return ''; - } - const campaignOverride = values.length > 0 && values[0] ? values[0] : null; - const sourceOverride = values.length > 1 && values[1] ? values[1] : null; - const mediumOverride = values.length > 2 && values[2] ? values[2] : null; - const returnUrl = externalRawLink(url, campaignOverride, sourceOverride, mediumOverride); - /* eslint-disable prefer-template */ - return ''; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/NumberFormatter/utilities.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -function formatNumber(val, maxFractionDigits, minFractionDigits) { - return src_NumberFormatter_NumberFormatter.formatNumber(val, maxFractionDigits, minFractionDigits); -} -function formatPercent(val, maxFractionDigits, minFractionDigits) { - return src_NumberFormatter_NumberFormatter.formatPercent(val, maxFractionDigits, minFractionDigits); -} -function formatCurrency(val, cur, maxFractionDigits, minFractionDigits) { - return src_NumberFormatter_NumberFormatter.formatCurrency(val, cur, maxFractionDigits, minFractionDigits); -} -function formatEvolution(val, maxFractionDigits, minFractionDigits, noSign) { - return src_NumberFormatter_NumberFormatter.formatEvolution(val, maxFractionDigits, minFractionDigits, noSign); -} -function calculateAndFormatEvolution(valCur, valPrev, noSign) { - return src_NumberFormatter_NumberFormatter.calculateAndFormatEvolution(valCur, valPrev, noSign); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/NumberFormatter/index.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/createVueApp.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - -function createVueApp(...args) { - const app = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createApp"])(...args); - app.config.globalProperties.$sanitize = window.vueSanitize; - app.config.globalProperties.$sanitizeUrl = window.vueSanitizeUrl; - app.config.globalProperties.translate = translate; - app.config.globalProperties.translateOrDefault = translateOrDefault; - app.config.globalProperties.externalLink = externalLink; - app.config.globalProperties.externalRawLink = externalRawLink; - app.config.globalProperties.formatNumber = formatNumber; - app.config.globalProperties.formatPercent = formatPercent; - app.config.globalProperties.formatCurrency = formatCurrency; - app.config.globalProperties.formatEvolution = formatEvolution; - app.config.globalProperties.calculateAndFormatEvolution = calculateAndFormatEvolution; - return app; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/importPluginUmd.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -const pluginLoadingPromises = {}; -const PLUGIN_LOAD_TIMEOUT = 120; -const POLL_INTERVAL = 50; -const POLL_LIMIT = 1000; -// code based off webpack's generated code for import() -// currently does not load styles on demand -function importPluginUmd(plugin) { - if (pluginLoadingPromises[plugin]) { - return pluginLoadingPromises[plugin]; - } - if (window[plugin]) { - return Promise.resolve(window[plugin]); - } - const pluginUmdPath = `?module=Proxy&action=getPluginUmdJs&plugin=${plugin}`; - let promiseReject; - let promiseResolve; - const script = document.createElement('script'); - script.charset = 'utf-8'; - script.timeout = PLUGIN_LOAD_TIMEOUT; - script.src = pluginUmdPath; - let timeout; - // create error before stack unwound to get useful stacktrace later - const error = new Error(); - const onScriptComplete = event => { - // avoid mem leaks in IE. - script.onerror = null; - script.onload = null; - clearTimeout(timeout); - // the script may not load entirely at the time onload is called, so we poll for a small - // amount of time until the window.PluginName object appears - let pollProgress = 0; - function checkPluginInWindow() { - pollProgress += POLL_INTERVAL; - // promise was already handled - if (!promiseReject || !promiseResolve) { - return; - } - // promise was not resolved, and window object exists - if (window[plugin] && promiseResolve) { - try { - promiseResolve(window[plugin]); - } finally { - promiseReject = undefined; - promiseResolve = undefined; - } - return; - } - // script took too long to execute or failed to execute, and no plugin object appeared in - // window, so we report an error - if (pollProgress > POLL_LIMIT) { - try { - const errorType = event && (event.type === 'load' ? 'missing' : event.type); - const realSrc = event && event.target && event.target.src; - error.message = `Loading plugin ${plugin} on demand failed.\n(${errorType}: ${realSrc})`; - error.name = 'PluginOnDemandLoadError'; - error.type = errorType; - error.request = realSrc; - promiseReject(error); - } finally { - promiseReject = undefined; - promiseResolve = undefined; - } - return; - } - setTimeout(checkPluginInWindow, POLL_INTERVAL); - } - setTimeout(checkPluginInWindow, POLL_INTERVAL); - }; - timeout = setTimeout(() => { - onScriptComplete({ - type: 'timeout', - target: script - }); - }, PLUGIN_LOAD_TIMEOUT); - script.onerror = onScriptComplete; - script.onload = onScriptComplete; - document.head.appendChild(script); - return new Promise((resolve, reject) => { - promiseResolve = resolve; - promiseReject = reject; - }); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/useExternalPluginComponent.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ - - -function useExternalPluginComponent(plugin, component) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineAsyncComponent"])(() => importPluginUmd(plugin).then(module => { - if (!module) { - // @ts-ignore - resolve(null); // plugin not loaded - } - return module[component]; - })); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/directiveUtilities.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function getRef(expander, binding) { - var _binding$instance; - return expander instanceof HTMLElement ? expander : (_binding$instance = binding.instance) === null || _binding$instance === void 0 ? void 0 : _binding$instance.$refs[expander]; -} -/* harmony default export */ var directiveUtilities = ({ - getRef -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/debounce.ts -const DEFAULT_DEBOUNCE_DELAY = 300; -function debounce(fn, delayInMs = DEFAULT_DEBOUNCE_DELAY) { - let timeout; - return function wrapper(...args) { - if (timeout) { - clearTimeout(timeout); - } - timeout = setTimeout(() => { - fn.call(this, ...args); - }, delayInMs); - }; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/clone.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function clone(p) { - if (typeof p === 'undefined') { - return p; - } - return JSON.parse(JSON.stringify(p)); -} -// 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/CoreHome/vue/src/VueEntryContainer/VueEntryContainer.vue?vue&type=template&id=6cb9164b - -const _hoisted_1 = { - ref: "root" -}; -function render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [_ctx.componentWrapper ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(_ctx.componentWrapper), { - key: 0 - })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VueEntryContainer/VueEntryContainer.vue?vue&type=template&id=6cb9164b - -// 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/CoreHome/vue/src/VueEntryContainer/VueEntryContainer.vue?vue&type=script&lang=ts - - -/* harmony default export */ var VueEntryContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - html: String - }, - mounted() { - Matomo_Matomo.helper.compileVueEntryComponents(this.$refs.root); - }, - beforeUnmount() { - Matomo_Matomo.helper.destroyVueComponent(this.$refs.root); - }, - computed: { - componentWrapper() { - if (!this.html) { - return null; - } - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["markRaw"])({ - template: this.html - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VueEntryContainer/VueEntryContainer.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VueEntryContainer/VueEntryContainer.vue - - - -VueEntryContainervue_type_script_lang_ts.render = render - -/* harmony default export */ var VueEntryContainer = (VueEntryContainervue_type_script_lang_ts); -// 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/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=3f6d8e16 - -const ActivityIndicatorvue_type_template_id_3f6d8e16_hoisted_1 = { - class: "loadingPiwik" -}; -function ActivityIndicatorvue_type_template_id_3f6d8e16_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); - return 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"])("div", ActivityIndicatorvue_type_template_id_3f6d8e16_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.loadingMessage), 1)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loading]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=3f6d8e16 - -// 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/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue?vue&type=template&id=74f456c7 - -const MatomoLoadervue_type_template_id_74f456c7_hoisted_1 = { - class: "matomo-loader" -}; -const _hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, null, -1); -const _hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, null, -1); -const _hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, null, -1); -const _hoisted_5 = [_hoisted_2, _hoisted_3, _hoisted_4]; -function MatomoLoadervue_type_template_id_74f456c7_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", MatomoLoadervue_type_template_id_74f456c7_hoisted_1, _hoisted_5); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue?vue&type=template&id=74f456c7 - -// 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/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue?vue&type=script&lang=ts - -/* harmony default export */ var MatomoLoadervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue - - - -MatomoLoadervue_type_script_lang_ts.render = MatomoLoadervue_type_template_id_74f456c7_render - -/* harmony default export */ var MatomoLoader = (MatomoLoadervue_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/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=script&lang=ts - - - -/* harmony default export */ var ActivityIndicatorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - components: { - MatomoLoader: MatomoLoader - }, - props: { - loading: { - type: Boolean, - required: true, - default: false - }, - loadingMessage: { - type: String, - required: false, - default: translate('General_LoadingData') - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue - - - -ActivityIndicatorvue_type_script_lang_ts.render = ActivityIndicatorvue_type_template_id_3f6d8e16_render - -/* harmony default export */ var ActivityIndicator = (ActivityIndicatorvue_type_script_lang_ts); -// 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/CoreHome/vue/src/Alert/Alert.vue?vue&type=template&id=32dc7f1c - -function Alertvue_type_template_id_32dc7f1c_render(_ctx, _cache, $props, $setup, $data, $options) { - 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"])(["alert", { - [`alert-${_ctx.severity}`]: true - }]) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 2); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Alert/Alert.vue?vue&type=template&id=32dc7f1c - -// 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/CoreHome/vue/src/Alert/Alert.vue?vue&type=script&lang=ts - -/* harmony default export */ var Alertvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - severity: { - type: String, - required: true - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Alert/Alert.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Alert/Alert.vue - - - -Alertvue_type_script_lang_ts.render = Alertvue_type_template_id_32dc7f1c_render - -/* harmony default export */ var Alert = (Alertvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * A materializecss dropdown menu that supports submenus. - * - * To use a submenu, just use this directive within another dropdown. - * - * Note: if submenus are used, then dropdowns will never scroll. - * - * Usage: - * Menu - * - */ -/* harmony default export */ var DropdownMenu = ({ - mounted(element, binding) { - let options = {}; - $(element).addClass('matomo-dropdown-menu'); - const isSubmenu = !!$(element).parent().closest('.dropdown-content').length; - if (isSubmenu) { - var _binding$value; - options = { - hover: true - }; - $(element).addClass('submenu'); - $(((_binding$value = binding.value) === null || _binding$value === void 0 ? void 0 : _binding$value.activates) || $(element).data('target')).addClass('submenu-dropdown-content'); - // if a submenu is used, the dropdown will never scroll - $(element).parents('.dropdown-content').addClass('submenu-container'); - } - $(element).dropdown(options); - }, - updated(element) { - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => { - $(element).addClass('matomo-dropdown-menu'); - }); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function onClickOutsideElement(element, binding, event) { - const hadUsedScrollbar = binding.value.isMouseDown && binding.value.hasScrolled; - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - if (hadUsedScrollbar) { - return; - } - if (!element.contains(event.target)) { - if (binding.value) { - binding.value.blur(); - } - } -} -function onScroll(element, binding) { - binding.value.hasScrolled = true; -} -function onMouseDown(element, binding) { - binding.value.isMouseDown = true; - binding.value.hasScrolled = false; -} -function onEscapeHandler(element, binding, event) { - if (event.which === 27) { - setTimeout(() => { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - if (binding.value.blur) { - binding.value.blur(); - } - }, 0); - } -} -const doc = document.documentElement; -/** - * Usage (in a component): - * - * directives: { - * // function call is important since we store state in this directive - * FocusAnywhereButHere: FocusAnywhereButHere(), - * } - * - * Note: the binding data needs to be static, changes will not be handled. - */ -/* harmony default export */ var FocusAnywhereButHere = ({ - mounted(el, binding) { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - binding.value.onEscapeHandler = onEscapeHandler.bind(null, el, binding); - binding.value.onMouseDown = onMouseDown.bind(null, el, binding); - binding.value.onClickOutsideElement = onClickOutsideElement.bind(null, el, binding); - binding.value.onScroll = onScroll.bind(null, el, binding); - doc.addEventListener('keyup', binding.value.onEscapeHandler); - doc.addEventListener('mousedown', binding.value.onMouseDown); - doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - doc.addEventListener('scroll', binding.value.onScroll); - }, - unmounted(el, binding) { - doc.removeEventListener('keyup', binding.value.onEscapeHandler); - doc.removeEventListener('mousedown', binding.value.onMouseDown); - doc.removeEventListener('mouseup', binding.value.onClickOutsideElement); - doc.removeEventListener('scroll', binding.value.onScroll); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FocusIf/FocusIf.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function doFocusIf(el, binding) { - var _binding$value, _binding$oldValue; - if ((_binding$value = binding.value) !== null && _binding$value !== void 0 && _binding$value.focused && !((_binding$oldValue = binding.oldValue) !== null && _binding$oldValue !== void 0 && _binding$oldValue.focused)) { - setTimeout(() => { - el.focus(); - if (binding.value.afterFocus) { - binding.value.afterFocus(); - } - }, 5); - } -} -/* harmony default export */ var FocusIf = ({ - mounted(el, binding) { - doFocusIf(el, binding); - }, - updated(el, binding) { - doFocusIf(el, binding); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Tooltips/Tooltips.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const { - $: Tooltips_$ -} = window; -// Tracks the MutationObserver attached to each tooltip host so it can be -// disconnected again when the host element is unmounted. -const observers = new WeakMap(); -function defaultContentTransform() { - const title = Tooltips_$(this).attr('title') || ''; - return window.vueSanitize(title.replace(/\n/g, '
')); -} -/** - * jQuery UI shows a single, delegated tooltip for every descendant of the host - * element that has a `title`. It only auto-closes a tooltip when its target - * receives mouseleave/focusout, or when the target is removed through jQuery's - * own `remove` event. Vue removes elements natively (eg. a v-if swap on an - * inline action button), which triggers neither - so a tooltip that was open - * over a now-removed element is left orphaned on screen. - * - * After any descendant is removed, close every open tooltip whose target is no - * longer attached to the document. Triggering mouseleave/focusout routes to the - * close handlers jQuery UI bound on the target, and the `ui-tooltip-id` data it - * stored survives native removal, so the orphaned tooltip is cleaned up. - */ -function closeOrphanedTooltips(el) { - if (!document.querySelector('.ui-tooltip')) { - return; // nothing open, so there's nothing to check - } - let instance; - try { - instance = Tooltips_$(el).tooltip('instance'); - } catch (e) { - return; // tooltip not initialised (or already destroyed) - } - if (!instance || !instance.tooltips) { - return; - } - // Snapshot the ids first - closing a tooltip mutates instance.tooltips. - Object.keys(instance.tooltips).forEach(id => { - var _instance; - const target = (_instance = instance) === null || _instance === void 0 || (_instance = _instance.tooltips[id]) === null || _instance === void 0 || (_instance = _instance.element) === null || _instance === void 0 ? void 0 : _instance[0]; - if (target && !target.isConnected) { - Tooltips_$(target).trigger('mouseleave').trigger('focusout'); - } - }); -} -function setupTooltips(el, binding) { - var _binding$value, _binding$value2, _binding$value3, _binding$value4, _binding$value5, _binding$value6; - if (!el.isConnected) { - return; - } - Tooltips_$(el).tooltip({ - track: true, - content: ((_binding$value = binding.value) === null || _binding$value === void 0 ? void 0 : _binding$value.content) || defaultContentTransform, - show: typeof ((_binding$value2 = binding.value) === null || _binding$value2 === void 0 ? void 0 : _binding$value2.show) !== 'undefined' ? (_binding$value3 = binding.value) === null || _binding$value3 === void 0 ? void 0 : _binding$value3.show : { - delay: ((_binding$value4 = binding.value) === null || _binding$value4 === void 0 ? void 0 : _binding$value4.delay) || 700, - duration: ((_binding$value5 = binding.value) === null || _binding$value5 === void 0 ? void 0 : _binding$value5.duration) || 200 - }, - hide: false, - tooltipClass: (_binding$value6 = binding.value) === null || _binding$value6 === void 0 ? void 0 : _binding$value6.tooltipClass - }); - if (!observers.has(el)) { - const observer = new MutationObserver(mutations => { - if (mutations.some(mutation => mutation.removedNodes.length > 0)) { - closeOrphanedTooltips(el); - } - }); - observer.observe(el, { - childList: true, - subtree: true - }); - observers.set(el, observer); - } -} -/* harmony default export */ var Tooltips = ({ - mounted(el, binding) { - setTimeout(() => setupTooltips(el, binding)); - }, - updated(el, binding) { - setTimeout(() => setupTooltips(el, binding)); - }, - beforeUnmount(el) { - const observer = observers.get(el); - if (observer) { - observer.disconnect(); - observers.delete(el); - } - try { - window.$(el).tooltip('destroy'); - } catch (e) { - // ignore - } - } -}); -// 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/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=1791e7fd - -const MatomoDialogvue_type_template_id_1791e7fd_hoisted_1 = { - ref: "root" -}; -function MatomoDialogvue_type_template_id_1791e7fd_render(_ctx, _cache, $props, $setup, $data, $options) { - return 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"])("div", MatomoDialogvue_type_template_id_1791e7fd_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=1791e7fd - -// 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/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=script&lang=ts - - -/* harmony default export */ var MatomoDialogvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - /** - * Whether the modal is displayed or not; - */ - modelValue: { - type: Boolean, - required: true - }, - options: { - type: Object, - required: false, - default: () => ({}) - } - }, - emits: ['yes', 'no', 'closeEnd', 'close', 'validation', 'update:modelValue'], - activated() { - this.$emit('update:modelValue', false); - }, - watch: { - modelValue(newValue, oldValue) { - if (newValue) { - const slotElement = this.$refs.root.firstElementChild; - Matomo_Matomo.helper.modalConfirm(slotElement, { - yes: () => { - this.$emit('yes'); - }, - no: () => { - this.$emit('no'); - }, - validation: () => { - this.$emit('validation'); - } - }, Object.assign({ - onCloseEnd: () => { - // materialize removes the child element, so we move it back to the slot - this.$refs.root.appendChild(slotElement); - this.$emit('update:modelValue', false); - this.$emit('closeEnd'); - } - }, this.options)); - } else if (newValue === false && oldValue === true) { - // the user closed the dialog, e.g. by pressing Esc or clicking away from it - $('.modal.open').modal('close'); - this.$emit('close'); - } - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue - - - -MatomoDialogvue_type_script_lang_ts.render = MatomoDialogvue_type_template_id_1791e7fd_render - -/* harmony default export */ var MatomoDialog = (MatomoDialogvue_type_script_lang_ts); -// 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/CoreHome/vue/src/MatomoModal/MatomoModal.vue?vue&type=template&id=7a1657f1 - -const MatomoModalvue_type_template_id_7a1657f1_hoisted_1 = ["aria-label"]; -const MatomoModalvue_type_template_id_7a1657f1_hoisted_2 = { - key: 0, - class: "modal-footer matomo-modal-footer" -}; -function MatomoModalvue_type_template_id_7a1657f1_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], { - to: "body" - }, [_ctx.modelValue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: 0, - class: "modal-overlay matomo-modal-overlay open", - onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args)) - })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - ref: "root", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["modal matomo-modal", _ctx.modalClasses]), - role: "dialog", - "aria-modal": "true", - "aria-label": _ctx.ariaLabel, - tabindex: "-1" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["modal-content matomo-modal-content", _ctx.contentClass]) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 2), _ctx.$slots.footer ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MatomoModalvue_type_template_id_7a1657f1_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "footer")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, MatomoModalvue_type_template_id_7a1657f1_hoisted_1), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]])]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue?vue&type=template&id=7a1657f1 - -// 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/CoreHome/vue/src/MatomoModal/MatomoModal.vue?vue&type=script&lang=ts - -/** - * Vue-native modal shell. The forward direction for Matomo modals — the older - * `MatomoDialog` (which wraps Materialize's `modalConfirm`) will be migrated - * to this format in a follow-up and eventually removed. - */ -/* harmony default export */ var MatomoModalvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'MatomoModal', - props: { - modelValue: { - type: Boolean, - required: true - }, - // Extra classes applied to the modal root, in the same shape Vue accepts - // for `:class`. Use this to opt into modal-specific styling. - classes: { - type: [String, Array, Object], - default: '' - }, - // Extra classes applied to the inner `.modal-content` wrapper. - contentClass: { - type: [String, Array, Object], - default: '' - }, - ariaLabel: { - type: String - } - }, - emits: ['update:modelValue', 'opened', 'closed'], - data() { - return { - previousBodyOverflow: '', - previousFocus: null - }; - }, - computed: { - modalClasses() { - return [{ - open: this.modelValue - }, this.classes]; - } - }, - methods: { - close() { - if (!this.modelValue) { - return; - } - this.$emit('update:modelValue', false); - }, - onKeydown(event) { - if (event.key !== 'Escape') { - return; - } - this.close(); - }, - activate() { - const rootElement = this.$refs.root; - this.previousBodyOverflow = document.body.style.overflow; - this.previousFocus = document.activeElement; - document.body.style.overflow = 'hidden'; - document.addEventListener('keydown', this.onKeydown); - this.$nextTick(() => rootElement.focus()); - this.$emit('opened', rootElement); - }, - deactivate() { - document.body.style.overflow = this.previousBodyOverflow; - this.previousBodyOverflow = ''; - document.removeEventListener('keydown', this.onKeydown); - if (this.previousFocus) { - this.previousFocus.focus(); - } - this.previousFocus = null; - this.$emit('closed'); - } - }, - watch: { - modelValue(open, wasOpen) { - if (open && !wasOpen) { - this.activate(); - } else if (!open && wasOpen) { - this.deactivate(); - } - } - }, - mounted() { - if (this.modelValue) { - this.activate(); - } - }, - unmounted() { - if (this.modelValue) { - this.deactivate(); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue - - - -MatomoModalvue_type_script_lang_ts.render = MatomoModalvue_type_template_id_7a1657f1_render - -/* harmony default export */ var MatomoModal = (MatomoModalvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -function expand(element, binding, event) { - var _binding$value; - element.classList.add('expanded'); - if ((_binding$value = binding.value) !== null && _binding$value !== void 0 && _binding$value.onExpand) { - binding.value.onExpand(event); - } - const positionElement = element.querySelector('.dropdown.positionInViewport'); - if (positionElement) { - Matomo_Matomo.helper.setMarginLeftToBeInViewport(positionElement); - } -} -function ExpandOnClick_close(element, binding, event) { - var _binding$value2; - if (!element.classList.contains('expanded')) { - return; - } - element.classList.remove('expanded'); - if ((_binding$value2 = binding.value) !== null && _binding$value2 !== void 0 && _binding$value2.onClosed) { - binding.value.onClosed(event); - } -} -function onClickOnExpander(element, binding, event) { - if (element.classList.contains('expanded')) { - ExpandOnClick_close(element, binding, event); - } else { - expand(element, binding, event); - } -} -function ExpandOnClick_onClickOutsideElement(element, binding, event) { - const hadUsedScrollbar = binding.value.isMouseDown && binding.value.hasScrolled; - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - if (hadUsedScrollbar) { - return; - } - if (!element.contains(event.target)) { - ExpandOnClick_close(element, binding, event); - } -} -function ExpandOnClick_onScroll(binding) { - binding.value.hasScrolled = true; -} -function ExpandOnClick_onMouseDown(binding) { - binding.value.isMouseDown = true; - binding.value.hasScrolled = false; -} -function ExpandOnClick_onEscapeHandler(element, binding, event) { - if (event.key === 'Escape') { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - ExpandOnClick_close(element, binding, event); - } -} -const ExpandOnClick_doc = document.documentElement; -/** - * Usage (in a component): - * - * directives: { - * ExpandOnClick: ExpandOnClick(), // function call is important since we store state - * // in this directive - * } - */ -/* harmony default export */ var ExpandOnClick = ({ - mounted(el, binding) { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - binding.value.onClickOnExpander = onClickOnExpander.bind(null, el, binding); - binding.value.onEscapeHandler = ExpandOnClick_onEscapeHandler.bind(null, el, binding); - binding.value.onMouseDown = ExpandOnClick_onMouseDown.bind(null, binding); - binding.value.onClickOutsideElement = ExpandOnClick_onClickOutsideElement.bind(null, el, binding); - binding.value.onScroll = ExpandOnClick_onScroll.bind(null, binding); - setTimeout(() => { - const expander = directiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.addEventListener('click', binding.value.onClickOnExpander); - } - }); - ExpandOnClick_doc.addEventListener('keyup', binding.value.onEscapeHandler); - ExpandOnClick_doc.addEventListener('mousedown', binding.value.onMouseDown); - ExpandOnClick_doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - ExpandOnClick_doc.addEventListener('scroll', binding.value.onScroll); - }, - unmounted(el, binding) { - const expander = directiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - ExpandOnClick_doc.removeEventListener('click', binding.value.onClickOnExpander); - } - ExpandOnClick_doc.removeEventListener('keyup', binding.value.onEscapeHandler); - ExpandOnClick_doc.removeEventListener('mousedown', binding.value.onMouseDown); - ExpandOnClick_doc.removeEventListener('mouseup', binding.value.onClickOutsideElement); - ExpandOnClick_doc.removeEventListener('scroll', binding.value.onScroll); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -function onMouseEnter(element) { - element.classList.add('expanded'); - const positionElement = element.querySelector('.dropdown.positionInViewport'); - if (positionElement) { - Matomo_Matomo.helper.setMarginLeftToBeInViewport(positionElement); - } -} -function onMouseLeave(element) { - element.classList.remove('expanded'); -} -function ExpandOnHover_onClickOutsideElement(element, event) { - if (!element.contains(event.target)) { - element.classList.remove('expanded'); - } -} -function ExpandOnHover_onEscapeHandler(element, event) { - if (event.which === 27) { - element.classList.remove('expanded'); - } -} -const ExpandOnHover_doc = document.documentElement; -/** - * Usage (in a component): - * - * directives: { - * ExpandOnHover: ExpandOnHover(), // function call is important since we store state - * // in this directive - * } - */ -/* harmony default export */ var ExpandOnHover = ({ - mounted(el, binding) { - binding.value.onMouseEnter = onMouseEnter.bind(null, el); - binding.value.onMouseLeave = onMouseLeave.bind(null, el); - binding.value.onClickOutsideElement = ExpandOnHover_onClickOutsideElement.bind(null, el); - binding.value.onEscapeHandler = ExpandOnHover_onEscapeHandler.bind(null, el); - setTimeout(() => { - const expander = directiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.addEventListener('mouseenter', binding.value.onMouseEnter); - } - }); - el.addEventListener('mouseleave', binding.value.onMouseLeave); - ExpandOnHover_doc.addEventListener('keyup', binding.value.onEscapeHandler); - ExpandOnHover_doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - }, - unmounted(el, binding) { - const expander = directiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.removeEventListener('mouseenter', binding.value.onMouseEnter); - } - el.removeEventListener('mouseleave', binding.value.onMouseLeave); - document.removeEventListener('keyup', binding.value.onEscapeHandler); - document.removeEventListener('mouseup', binding.value.onClickOutsideElement); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -const { - $: ShowSensitiveData_$ -} = window; -/** - * Handles visibility of sensitive data. By default data will be shown replaced with stars (*) - * On click on the element the full data will be shown - * - * Configuration attributes: - * data-show-characters number of characters to show in clear text (defaults to 6) - * data-click-element-selector selector for element that will show the full data on click - * (defaults to element) - * - * Example: - *
- */ -/* harmony default export */ var ShowSensitiveData = ({ - mounted(el, binding) { - const element = ShowSensitiveData_$(el); - const { - sensitiveData - } = binding.value; - const showCharacters = binding.value.showCharacters || 6; - const clickElement = binding.value.clickElementSelector || element; - let protectedData = ''; - if (showCharacters > 0) { - protectedData += sensitiveData.slice(0, showCharacters); - } - protectedData += sensitiveData.slice(showCharacters).replace(/./g, '*'); - element.html(protectedData); - function onClickHandler() { - element.html(sensitiveData); - ShowSensitiveData_$(clickElement).css({ - cursor: '' - }); - ShowSensitiveData_$(clickElement).tooltip('destroy'); - } - ShowSensitiveData_$(clickElement).tooltip({ - content: translate('CoreHome_ClickToSeeFullInformation'), - items: '*', - track: true - }); - ShowSensitiveData_$(clickElement).one('click', onClickHandler); - ShowSensitiveData_$(clickElement).css({ - cursor: 'pointer' - }); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const { - $: DropdownButton_$ -} = window; -/* harmony default export */ var DropdownButton = ({ - mounted(el) { - const element = DropdownButton_$(el); - // BC for materializecss 0.97 => 1.0 - if (!element.attr('data-target') && element.attr('data-activates')) { - element.attr('data-target', element.attr('data-activates')); - } - const target = element.attr('data-target'); - if (target && DropdownButton_$(`#${target}`).length) { - element.dropdown({ - inDuration: 300, - outDuration: 225, - constrainWidth: false, - // hover: true, // Activate on hover - belowOrigin: true // Displays dropdown below the button - }); - } - } -}); -// 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/CoreHome/vue/src/DraggableList/DraggableList.vue?vue&type=script&setup=true&lang=ts - - -const DraggableListvue_type_script_setup_true_lang_ts_hoisted_1 = ["data-item-id", "draggable", "aria-grabbed", "onDragstart", "onDragover"]; - -/* harmony default export */ var DraggableListvue_type_script_setup_true_lang_ts = (/*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - __name: 'DraggableList', - props: { - items: null, - itemKey: null, - disabled: { - type: Boolean, - default: false - }, - handle: { - default: '' - }, - axis: { - default: 'y' - } - }, - emits: ["reorder"], - setup(__props, { - emit - }) { - const props = __props; - const SORT_TRIGGER_OFFSET = 0.1; - const orderedItems = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]); - const draggedId = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); - const dragTargetId = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); - const placeholderId = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); - const dropSucceeded = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false); - const canDrag = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => !props.disabled && props.items.length > 1); - function getItemKey(item, index) { - if (typeof props.itemKey === 'function') return props.itemKey(item, index); - if (!item || typeof item !== 'object') return index; - const value = item[props.itemKey]; - if (typeof value === 'string' || typeof value === 'number') return value; - return index; - } - const sourceItems = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => props.items.map((item, index) => ({ - id: String(getItemKey(item, index)), - item, - sourceIndex: index - }))); - const itemKeySignature = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => sourceItems.value.map(entry => entry.id).join('\u0000')); - function syncOrderedItems() { - orderedItems.value = sourceItems.value.slice(); - } - function clearDragVisualState() { - draggedId.value = null; - dragTargetId.value = null; - placeholderId.value = null; - } - function resetDragState(shouldSync = false) { - clearDragVisualState(); - dropSucceeded.value = false; - if (shouldSync) syncOrderedItems(); - } - function matchesHandle(target, currentTarget) { - if (!props.handle) return true; - if (!(target instanceof Element)) return false; - const handleElement = target.closest(props.handle); - return !!handleElement && currentTarget.contains(handleElement); - } - function getOrderedIndex(itemId) { - return orderedItems.value.findIndex(entry => entry.id === itemId); - } - function getOrderedItemAt(index) { - return orderedItems.value[typeof index === 'number' ? index : Number(index)]; - } - function getDropPosition(event, element) { - const rect = element.getBoundingClientRect(); - const draggedIndex = draggedId.value ? getOrderedIndex(draggedId.value) : -1; - const hoveredIndex = dragTargetId.value ? getOrderedIndex(dragTargetId.value) : -1; - const isMovingForward = draggedIndex !== -1 && hoveredIndex !== -1 && draggedIndex < hoveredIndex; - const triggerOffset = isMovingForward ? SORT_TRIGGER_OFFSET : 1 - SORT_TRIGGER_OFFSET; - if (props.axis === 'x') { - return event.clientX < rect.left + rect.width * triggerOffset ? 'before' : 'after'; - } - return event.clientY < rect.top + rect.height * triggerOffset ? 'before' : 'after'; - } - function moveDraggedItem(targetId, position) { - if (!draggedId.value || draggedId.value === targetId) return; - const currentIndex = getOrderedIndex(draggedId.value); - const targetIndex = getOrderedIndex(targetId); - if (currentIndex === -1 || targetIndex === -1) return; - let insertionIndex = targetIndex + (position === 'after' ? 1 : 0); - if (currentIndex < insertionIndex) { - insertionIndex -= 1; - } - if (insertionIndex === currentIndex) return; - const nextItems = orderedItems.value.slice(); - const [movedItem] = nextItems.splice(currentIndex, 1); - nextItems.splice(insertionIndex, 0, movedItem); - orderedItems.value = nextItems; - } - function onDragStart(event, itemId) { - const itemElement = event.currentTarget; - if (!itemElement || !canDrag.value || !matchesHandle(event.target, itemElement)) { - event.preventDefault(); - return; - } - draggedId.value = itemId; - dragTargetId.value = itemId; - dropSucceeded.value = false; - placeholderId.value = null; - if (event.dataTransfer) { - event.dataTransfer.effectAllowed = 'move'; - event.dataTransfer.setData('text/plain', itemId); - } - // Delay the placeholder styling so the browser creates the native drag ghost - // from the original item instead of the emptied placeholder - window.setTimeout(() => { - if (draggedId.value === itemId) placeholderId.value = itemId; - }, 0); - } - function onDragStartForIndex(event, index) { - const orderedItem = getOrderedItemAt(index); - if (!orderedItem) { - event.preventDefault(); - return; - } - onDragStart(event, orderedItem.id); - } - function onDragOver(event, itemId) { - if (!draggedId.value || !canDrag.value) return; - event.preventDefault(); - const itemElement = event.currentTarget; - if (!itemElement) return; - dragTargetId.value = itemId; - moveDraggedItem(itemId, getDropPosition(event, itemElement)); - if (event.dataTransfer) event.dataTransfer.dropEffect = 'move'; - } - function onDragOverForIndex(event, index) { - const orderedItem = getOrderedItemAt(index); - if (!orderedItem) return; - onDragOver(event, orderedItem.id); - } - function onDrop(event) { - if (!draggedId.value) return; - event.preventDefault(); - const reorderedIds = orderedItems.value.map(entry => entry.id); - if (reorderedIds && reorderedIds.join('\u0000') !== itemKeySignature.value) { - dropSucceeded.value = true; - emit('reorder', reorderedIds); - } - clearDragVisualState(); - } - function onDragEnd() { - if (dropSucceeded.value) { - dropSucceeded.value = false; - return; - } - resetDragState(true); - } - // Refresh the local list if the parent sends new items - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])([sourceItems, () => props.disabled], () => resetDragState(true), { - immediate: true - }); - return (_ctx, _cache) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["draggableList", { - isDragging: draggedId.value !== null, - isDisabled: __props.disabled - }]) - }, [(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"])(orderedItems.value, (orderedItem, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: orderedItem.id, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["draggableListItem", { - isDragged: orderedItem.id === placeholderId.value - }]), - "data-item-id": orderedItem.id, - draggable: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["unref"])(canDrag), - "aria-grabbed": orderedItem.id === draggedId.value, - onDragstart: $event => onDragStartForIndex($event, index), - onDragover: $event => onDragOverForIndex($event, index), - onDrop: onDrop, - onDragend: onDragEnd - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { - item: orderedItem.item, - index: orderedItem.sourceIndex - })], 42, DraggableListvue_type_script_setup_true_lang_ts_hoisted_1); - }), 128))], 2); - }; - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DraggableList/DraggableList.vue?vue&type=script&setup=true&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DraggableList/DraggableList.vue - - - -/* harmony default export */ var DraggableList = (DraggableListvue_type_script_setup_true_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const { - $: SelectOnFocus_$ -} = window; -function onFocusHandler(binding, event) { - if (binding.value.focusedElement !== event.target) { - binding.value.focusedElement = event.target; - SelectOnFocus_$(event.target).select(); - } -} -function SelectOnFocus_onClickHandler(event) { - // .select() + focus and blur seems to not work on pre elements - const range = document.createRange(); - range.selectNode(event.target); - const selection = window.getSelection(); - if (selection && selection.rangeCount > 0) { - selection.removeAllRanges(); - } - if (selection) { - selection.addRange(range); - } -} -function onBlurHandler(binding) { - delete binding.value.focusedElement; -} -/* harmony default export */ var SelectOnFocus = ({ - mounted(el, binding) { - const tagName = el.tagName.toLowerCase(); - binding.value.elementSupportsSelect = tagName === 'textarea'; - if (binding.value.elementSupportsSelect) { - binding.value.onFocusHandler = onFocusHandler.bind(null, binding); - binding.value.onBlurHandler = onBlurHandler.bind(null, binding); - el.addEventListener('focus', binding.value.onFocusHandler); - el.addEventListener('blur', binding.value.onBlurHandler); - } else { - binding.value.onClickHandler = SelectOnFocus_onClickHandler; - el.addEventListener('click', binding.value.onClickHandler); - } - }, - unmounted(el, binding) { - if (binding.value.elementSupportsSelect) { - el.removeEventListener('focus', binding.value.onFocusHandler); - el.removeEventListener('blur', binding.value.onBlurHandler); - } else { - el.removeEventListener('click', binding.value.onClickHandler); - } - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/CopyToClipboard/CopyToClipboard.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -function CopyToClipboard_onClickHandler(pre) { - if (pre) { - const textarea = document.createElement('textarea'); - textarea.value = pre.innerText; - textarea.setAttribute('readonly', ''); - textarea.style.position = 'absolute'; - textarea.style.left = '-9999px'; - document.body.appendChild(textarea); - textarea.select(); - textarea.focus(); - document.execCommand('copy'); - document.body.removeChild(textarea); - const btn = pre.parentElement; - if (btn) { - const icon = btn.getElementsByTagName('i')[0]; - if (icon) { - icon.classList.remove('copyToClipboardIcon'); - icon.classList.add('copyToClipboardIconCheck'); - } - const copied = btn.getElementsByClassName('copyToClipboardCopiedDiv')[0]; - if (copied) { - copied.style.display = 'inline-block'; - setTimeout(() => { - copied.style.display = 'none'; - }, 2500); - } - } - } -} -function onTransitionEndHandler(el, binding) { - if (binding.value.transitionOpen) { - const btn = el.parentElement; - if (btn) { - const icon = btn.getElementsByTagName('i')[0]; - if (icon) { - icon.classList.remove('copyToClipboardIconCheck'); - icon.classList.add('copyToClipboardIcon'); - } - } - binding.value.transitionOpen = false; - } else { - binding.value.transitionOpen = true; - } -} -/* harmony default export */ var CopyToClipboard = ({ - mounted(el, binding) { - const tagName = el.tagName.toLowerCase(); - if (tagName === 'pre') { - const btn = document.createElement('button'); - btn.setAttribute('type', 'button'); - btn.className = 'copyToClipboardButton'; - const positionDiv = document.createElement('div'); - positionDiv.className = 'copyToClipboardPositionDiv'; - const icon = document.createElement('i'); - icon.className = 'copyToClipboardIcon'; - btn.appendChild(icon); - const sp = document.createElement('span'); - sp.className = 'copyToClipboardSpan'; - sp.innerHTML = translate('General_Copy'); - btn.appendChild(sp); - positionDiv.appendChild(btn); - const cdiv = document.createElement('div'); - cdiv.className = 'copyToClipboardCopiedDiv'; - cdiv.innerHTML = translate('General_CopiedToClipboard'); - positionDiv.appendChild(cdiv); - const pe = el.parentElement; - if (pe) { - pe.classList.add('copyToClipboardWrapper'); - pe.appendChild(positionDiv); - } - binding.value.onClickHandler = CopyToClipboard_onClickHandler.bind(null, el); - btn.addEventListener('click', binding.value.onClickHandler); - binding.value.onTransitionEndHandler = onTransitionEndHandler.bind(null, el, binding); - btn.addEventListener('transitionend', binding.value.onTransitionEndHandler); - } - }, - unmounted(el, binding) { - el.removeEventListener('click', binding.value.onClickHandler); - el.removeEventListener('transitionend', binding.value.onTransitionEndHandler); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SideNav/SideNav.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -function openMobileLeftMenu() { - const mobileLeftMenu = document.getElementById('mobile-left-menu'); - if (!mobileLeftMenu) { - return; - } - try { - window.$(mobileLeftMenu).sidenav('open'); - } catch (e) { - // Not initialized outside mobile layouts. - } -} -function closeMobileLeftMenu() { - const secondNavBar = document.getElementById('secondNavBar'); - if (!(secondNavBar !== null && secondNavBar !== void 0 && secondNavBar.classList.contains('mobileLeftMenuOpen'))) { - return; - } - const mobileLeftMenu = document.getElementById('mobile-left-menu'); - if (!mobileLeftMenu) { - return; - } - try { - window.$(mobileLeftMenu).sidenav('close'); - } catch (e) { - // The mobile sidenav is not initialized outside mobile layouts. - } -} -/** - * Will activate the materialize side nav feature once rendered. We use this directive as - * it makes sure the actual left menu is rendered at the time we init the side nav. - * - * Has to be set on a collaapsible element - * - * Example: - *
...
- */ -/* harmony default export */ var SideNav = ({ - mounted(el, binding) { - if (!binding.value.activator) { - return; - } - const secondNavBar = document.getElementById('secondNavBar'); - const setSecondNavBarMenuState = isOpen => { - if (secondNavBar) { - secondNavBar.classList.toggle('mobileLeftMenuOpen', isOpen); - } - }; - setTimeout(() => { - if (!binding.value.initialized) { - binding.value.initialized = true; - const sideNavActivator = directiveUtilities.getRef(binding.value.activator, binding); - if (sideNavActivator) { - window.$(sideNavActivator).show(); - const targetSelector = sideNavActivator.getAttribute('data-target'); - // @ts-ignore - window.$(`#${targetSelector}`).sidenav({ - closeOnClick: true, - onOpenStart: () => { - setSecondNavBarMenuState(true); - }, - onCloseStart: () => { - setSecondNavBarMenuState(false); - } - }); - } - } - if (el.classList.contains('collapsible')) { - window.$(el).collapsible(); - } - }); - } -}); -// 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/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=65383a0a - -const EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_1 = { - key: 0, - class: "title", - tabindex: "6" -}; -const EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_2 = ["href", "title"]; -const EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_3 = { - class: "iconsBar" -}; -const EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_4 = ["href", "title"]; -const EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-help" -}, null, -1); -const _hoisted_6 = [EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_5]; -const _hoisted_7 = ["title"]; -const _hoisted_8 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-info" -}, null, -1); -const _hoisted_9 = [_hoisted_8]; -const _hoisted_10 = { - key: 2, - class: "ratingIcons" -}; -const _hoisted_11 = { - class: "inlineHelp" -}; -const _hoisted_12 = ["innerHTML"]; -const _hoisted_13 = ["innerHTML"]; -const _hoisted_14 = ["href"]; -function EnrichedHeadlinevue_type_template_id_65383a0a_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "enrichedHeadline", - onMouseenter: _cache[1] || (_cache[1] = $event => _ctx.showIcons = true), - onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.showIcons = false), - ref: "root" - }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - class: "title", - href: _ctx.editUrl, - title: _ctx.translate('CoreHome_ClickToEditX', _ctx.htmlEntities(_ctx.actualFeatureName)) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 8, EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_3, [_ctx.helpUrl && !_ctx.actualInlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 0, - rel: "noreferrer noopener", - target: "_blank", - class: "helpIcon", - href: _ctx.helpUrl, - title: _ctx.translate('CoreHome_ExternalHelp') - }, _hoisted_6, 8, EnrichedHeadlinevue_type_template_id_65383a0a_hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualInlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - onClick: _cache[0] || (_cache[0] = $event => _ctx.showInlineHelp = !_ctx.showInlineHelp), - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["helpIcon", { - 'active': _ctx.showInlineHelp - }]), - title: _ctx.translate(_ctx.reportGenerated ? 'General_HelpReport' : 'General_Help') - }, _hoisted_9, 10, _hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showRateFeature ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_10, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(_ctx.rateFeature), { - title: _ctx.actualFeatureName - }, null, 8, ["title"]))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showIcons || _ctx.showInlineHelp]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - innerHTML: _ctx.$sanitize(_ctx.actualInlineHelp) - }, null, 8, _hoisted_12), _ctx.reportGenerated != '' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - class: "helpDate", - innerHTML: _ctx.$sanitize(_ctx.reportGenerated) - }, null, 8, _hoisted_13)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.helpUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - rel: "noreferrer noopener", - target: "_blank", - class: "readMore", - href: _ctx.helpUrl - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_MoreDetails')), 9, _hoisted_14)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showInlineHelp]])], 544); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=65383a0a - -// 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/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts - - - - - -/** - * Usage: - * - *

All Websites Dashboard

- * -> uses "All Websites Dashboard" as featurename - * - *

All Websites Dashboard (Total: - * 309 Visits)

- * -> custom featurename - * - *

All Websites Dashboard

- * -> shows help icon and links to external url - * - *

All Websites - * Dashboard

- * -> makes the headline clickable linking to the specified url - * - *

Pages report

- * -> inlineHelp specified via a attribute shows help icon on headline hover - * - *

All Websites Dashboard - *
My inline help
- *

- * -> alternative definition for inline help - * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url - * - * *

Pages report

- * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which - * activated by hover - * -> the tooltip shows the value of the attribute - */ -/* harmony default export */ var EnrichedHeadlinevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - helpUrl: { - type: String, - default: '' - }, - editUrl: { - type: String, - default: '' - }, - reportGenerated: String, - featureName: String, - inlineHelp: String - }, - data() { - return { - showIcons: false, - showInlineHelp: false, - actualFeatureName: this.featureName, - actualInlineHelp: this.inlineHelp - }; - }, - watch: { - inlineHelp(newValue) { - this.actualInlineHelp = newValue; - }, - featureName(newValue) { - this.actualFeatureName = newValue; - } - }, - mounted() { - const root = this.$refs.root; - if (!this.actualInlineHelp) { - var _root$parentElement; - let helpNode = root.querySelector('.title .inlineHelp'); - if (!helpNode && (_root$parentElement = root.parentElement) !== null && _root$parentElement !== void 0 && _root$parentElement.nextElementSibling) { - // hack for reports :( - helpNode = root.parentElement.nextElementSibling.querySelector('.reportDocumentation'); - } - if (helpNode) { - var _helpNode$getAttribut; - // hackish solution to get binded html of p tag within the help node - // at this point the ng-bind-html is not yet converted into html when report is not - // initially loaded. Using $compile doesn't work. So get and set it manually - const helpDocs = (_helpNode$getAttribut = helpNode.getAttribute('data-content')) === null || _helpNode$getAttribut === void 0 ? void 0 : _helpNode$getAttribut.trim(); - if (helpDocs && helpDocs.length) { - this.actualInlineHelp = `

${helpDocs}

`; - setTimeout(() => helpNode.remove(), 0); - } - } - } - if (!this.actualFeatureName) { - var _root$querySelector; - this.actualFeatureName = (_root$querySelector = root.querySelector('.title')) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.textContent; - } - if (Matomo_Matomo.period && Matomo_Matomo.currentDateString) { - const currentPeriod = Periods_Periods.parse(Matomo_Matomo.period, Matomo_Matomo.currentDateString); - if (this.reportGenerated && currentPeriod.containsToday()) { - window.$(root.querySelector('.report-generated')).tooltip({ - track: true, - content: this.reportGenerated, - items: 'div', - show: false, - hide: false - }); - } - } - }, - methods: { - htmlEntities(v) { - return Matomo_Matomo.helper.htmlEntities(v); - } - }, - computed: { - showRateFeature() { - return translateOrDefault('Feedback_SendFeedback') !== 'Feedback_SendFeedback'; - }, - rateFeature() { - if (this.showRateFeature) { - return useExternalPluginComponent('Feedback', 'RateFeature'); - } - return ''; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue - - - -EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_65383a0a_render - -/* harmony default export */ var EnrichedHeadline = (EnrichedHeadlinevue_type_script_lang_ts); -// 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/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=template&id=7546a849 - -const ContentBlockvue_type_template_id_7546a849_hoisted_1 = { - class: "card-content" -}; -const ContentBlockvue_type_template_id_7546a849_hoisted_2 = { - key: 0, - class: "card-title" -}; -const ContentBlockvue_type_template_id_7546a849_hoisted_3 = { - key: 1, - class: "card-title" -}; -const ContentBlockvue_type_template_id_7546a849_hoisted_4 = { - ref: "content" -}; -const ContentBlockvue_type_template_id_7546a849_hoisted_5 = { - key: 0, - class: "card-image hide-on-med-and-down" -}; -const ContentBlockvue_type_template_id_7546a849_hoisted_6 = ["src", "alt"]; -function ContentBlockvue_type_template_id_7546a849_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); - 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"])({ - card: true, - 'card-with-image': !!this.imageUrl - }), - ref: "root" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_7546a849_hoisted_1, [_ctx.contentTitle && !_ctx.actualFeature && !_ctx.helpUrl && !_ctx.actualHelpText && !_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_7546a849_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.decode(_ctx.contentTitle)), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.contentTitle && (_ctx.actualFeature || _ctx.helpUrl || _ctx.actualHelpText || _ctx.editUrl) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_7546a849_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { - "feature-name": _ctx.actualFeature, - "help-url": _ctx.helpUrl, - "edit-url": _ctx.editUrl, - "inline-help": _ctx.actualHelpText - }, { - 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.decode(_ctx.contentTitle)), 1)]), - _: 1 - }, 8, ["feature-name", "help-url", "edit-url", "inline-help"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_7546a849_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)]), _ctx.imageUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContentBlockvue_type_template_id_7546a849_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { - src: _ctx.imageUrl, - alt: _ctx.actualImageAltText - }, null, 8, ContentBlockvue_type_template_id_7546a849_hoisted_6)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=template&id=7546a849 - -// 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/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts - - - -let adminContent = null; -const { - $: ContentBlockvue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var ContentBlockvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - contentTitle: String, - feature: String, - helpUrl: String, - editUrl: String, - helpText: String, - anchor: String, - imageUrl: String, - imageAltText: String - }, - components: { - EnrichedHeadline: EnrichedHeadline - }, - data() { - return { - actualFeature: this.feature, - actualHelpText: this.helpText, - actualImageAltText: this.imageAltText ? this.imageAltText : this.contentTitle - }; - }, - watch: { - feature(newValue) { - this.actualFeature = newValue; - }, - helpText(newValue) { - this.actualHelpText = newValue; - } - }, - mounted() { - const root = this.$refs.root; - const content = this.$refs.content; - if (this.anchor && root && root.parentElement) { - const anchorElement = document.createElement('a'); - anchorElement.id = this.anchor; - ContentBlockvue_type_script_lang_ts_$(root.parentElement).prepend(anchorElement); - } - setTimeout(() => { - const inlineHelp = content.querySelector('.contentHelp'); - if (inlineHelp) { - this.actualHelpText = inlineHelp.innerHTML; - inlineHelp.remove(); - } - }, 0); - if (this.actualFeature && this.actualFeature === 'true') { - this.actualFeature = this.contentTitle; - } - if (adminContent === null) { - // cache admin node for further content blocks - adminContent = document.querySelector('#content.admin'); - } - let contentTopPosition = null; - if (adminContent) { - contentTopPosition = adminContent.offsetTop; - } - if (contentTopPosition || contentTopPosition === 0) { - const parents = root.closest('.widgetLoader'); - // when shown within the widget loader, we need to get the offset of that element - // as the widget loader might be still shown. Would otherwise not position correctly - // the widgets on the admin home page - const topThis = parents ? parents.offsetTop : root.offsetTop; - if (topThis - contentTopPosition < 17) { - // we make sure to display the first card with no margin-top to have it on same as line as - // navigation - root.style.marginTop = '0'; - } - } - }, - methods: { - decode(s) { - return Matomo_Matomo.helper.htmlDecode(s); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue - - - -ContentBlockvue_type_script_lang_ts.render = ContentBlockvue_type_template_id_7546a849_render - -/* harmony default export */ var ContentBlock = (ContentBlockvue_type_script_lang_ts); -// 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/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=50602006 - -const Comparisonsvue_type_template_id_50602006_hoisted_1 = { - key: 0, - ref: "root", - class: "matomo-comparisons" -}; -const Comparisonsvue_type_template_id_50602006_hoisted_2 = { - class: "comparison-type" -}; -const Comparisonsvue_type_template_id_50602006_hoisted_3 = ["title"]; -const Comparisonsvue_type_template_id_50602006_hoisted_4 = ["href"]; -const Comparisonsvue_type_template_id_50602006_hoisted_5 = ["title"]; -const Comparisonsvue_type_template_id_50602006_hoisted_6 = { - class: "comparison-period-label" -}; -const Comparisonsvue_type_template_id_50602006_hoisted_7 = ["onClick"]; -const Comparisonsvue_type_template_id_50602006_hoisted_8 = ["title"]; -const Comparisonsvue_type_template_id_50602006_hoisted_9 = { - class: "loadingPiwik", - style: { - "display": "none" - } -}; -function Comparisonsvue_type_template_id_50602006_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return _ctx.isComparing ? 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"])("div", Comparisonsvue_type_template_id_50602006_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Comparisons')), 1), (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.segmentComparisons, (comparison, $index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "comparison card", - key: comparison.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_50602006_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Segment')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "title", - title: _ctx.getTitleTooltip(comparison) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - target: "_blank", - href: _ctx.getUrlToSegment(comparison.params.segment) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(comparison.title), 9, Comparisonsvue_type_template_id_50602006_hoisted_4)], 8, Comparisonsvue_type_template_id_50602006_hoisted_3), (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.periodComparisons, periodComparison => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "comparison-period", - key: periodComparison.index, - title: _ctx.getComparisonTooltip(comparison, periodComparison) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "comparison-dot", - style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({ - 'background-color': _ctx.getSeriesColor(comparison, periodComparison) - }) - }, null, 4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Comparisonsvue_type_template_id_50602006_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(periodComparison.title) + " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getComparisonPeriodType(periodComparison)) + ") ", 1)], 8, Comparisonsvue_type_template_id_50602006_hoisted_5); - }), 128)), _ctx.segmentComparisons.length > 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 0, - class: "remove-button", - onClick: $event => _ctx.removeSegmentComparison($index) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon icon-close", - title: _ctx.translate('General_ClickToRemoveComp') - }, null, 8, Comparisonsvue_type_template_id_50602006_hoisted_8)], 8, Comparisonsvue_type_template_id_50602006_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_50602006_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])), [[_directive_tooltips, { - duration: 200, - delay: 200, - content: _ctx.transformTooltipContent - }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=50602006 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Segmentation/Segments.store.ts -function Segments_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -class Segments_store_SegmentsStore { - get state() { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.segmentState); - } - constructor() { - Segments_store_defineProperty(this, "segmentState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - availableSegments: [] - })); - Matomo_Matomo.on('piwikSegmentationInited', () => this.setSegmentState()); - } - setSegmentState() { - try { - const uiControlObject = $('.segmentEditorPanel').data('uiControlObject'); - this.segmentState.availableSegments = uiControlObject.impl.availableSegments || []; - } catch (e) { - // segment editor is not initialized yet - } - } -} -/* harmony default export */ var Segments_store = (new Segments_store_SegmentsStore()); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts -function Comparisons_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - - - -const SERIES_COLOR_COUNT = 8; -const SERIES_SHADE_COUNT = 3; -function wrapArray(values) { - if (!values) { - return []; - } - return Array.isArray(values) ? values : [values]; -} -function normalizeUrlState(value) { - if (Array.isArray(value)) { - return value.map(normalizeUrlState); - } - if (value && typeof value === 'object') { - return Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([key, nestedValue]) => [key, normalizeUrlState(nestedValue)])); - } - return value; -} -class Comparisons_store_ComparisonsStore { - constructor() { - Comparisons_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - comparisonsDisabledFor: [] - })); - Comparisons_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState)); - // for tests - Comparisons_store_defineProperty(this, "colors", {}); - Comparisons_store_defineProperty(this, "segmentComparisons", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.parseSegmentComparisons())); - Comparisons_store_defineProperty(this, "periodComparisons", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.parsePeriodComparisons())); - Comparisons_store_defineProperty(this, "isEnabled", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.checkEnabledForCurrentPage())); - if (document.readyState === 'complete' || document.readyState === 'interactive') { - this.loadComparisonsDisabledFor(); - } else { - document.addEventListener('DOMContentLoaded', () => { - this.loadComparisonsDisabledFor(); - }); - } - $(() => { - this.colors = this.getAllSeriesColors(); - }); - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => this.getUrlStateWithoutPopoverKey(), () => Matomo_Matomo.postEvent('piwikComparisonsChanged')); - } - getUrlStateWithoutPopoverKey() { - const parsedWithoutPopover = Object.fromEntries(Object.entries(src_MatomoUrl_MatomoUrl.parsed.value).filter(([key]) => key !== 'popover')); - return JSON.stringify(normalizeUrlState(parsedWithoutPopover)); - } - getComparisons() { - return this.getSegmentComparisons().concat(this.getPeriodComparisons()); - } - isComparing() { - return this.isComparisonEnabled() - // first two in each array are for the currently selected segment/period - && (this.segmentComparisons.value.length > 1 || this.periodComparisons.value.length > 1); - } - isComparingPeriods() { - return this.getPeriodComparisons().length > 1; // first is currently selected period - } - getSegmentComparisons() { - if (!this.isComparisonEnabled()) { - return []; - } - return this.segmentComparisons.value; - } - getPeriodComparisons() { - if (!this.isComparisonEnabled()) { - return []; - } - return this.periodComparisons.value; - } - getSeriesColor(segmentComparison, periodComparison, metricIndex = 0) { - const seriesIndex = this.getComparisonSeriesIndex(periodComparison.index, segmentComparison.index) % SERIES_COLOR_COUNT; - if (metricIndex === 0) { - return this.colors[`series${seriesIndex}`]; - } - const shadeIndex = metricIndex % SERIES_SHADE_COUNT; - return this.colors[`series${seriesIndex}-shade${shadeIndex}`]; - } - getSeriesColorName(seriesIndex, metricIndex) { - let colorName = `series${seriesIndex % SERIES_COLOR_COUNT}`; - if (metricIndex > 0) { - colorName += `-shade${metricIndex % SERIES_SHADE_COUNT}`; - } - return colorName; - } - isComparisonEnabled() { - return this.isEnabled.value; - } - getIndividualComparisonRowIndices(seriesIndex) { - const segmentCount = this.getSegmentComparisons().length; - const segmentIndex = seriesIndex % segmentCount; - const periodIndex = Math.floor(seriesIndex / segmentCount); - return { - segmentIndex, - periodIndex - }; - } - getComparisonSeriesIndex(periodIndex, segmentIndex) { - const segmentCount = this.getSegmentComparisons().length; - return periodIndex * segmentCount + segmentIndex; - } - getAllComparisonSeries() { - const seriesInfo = []; - let seriesIndex = 0; - this.getPeriodComparisons().forEach(periodComp => { - this.getSegmentComparisons().forEach(segmentComp => { - seriesInfo.push({ - index: seriesIndex, - params: Object.assign(Object.assign({}, segmentComp.params), periodComp.params), - color: this.colors[`series${seriesIndex}`] - }); - seriesIndex += 1; - }); - }); - return seriesInfo; - } - removeSegmentComparison(index) { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - const newComparisons = [...this.segmentComparisons.value]; - newComparisons.splice(index, 1); - const extraParams = {}; - if (index === 0) { - extraParams.segment = newComparisons[0].params.segment; - } - this.updateQueryParamsFromComparisons(newComparisons, this.periodComparisons.value, extraParams); - } - removeSegmentComparisonByDefinition(segmentDefinition) { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - let segmentIndex = null; - this.getSegmentComparisons().forEach((segment, index) => { - if (segment && segment.params && segment.params.segment === segmentDefinition) { - segmentIndex = index; - } - }); - if (segmentIndex !== null) { - this.removeSegmentComparison(segmentIndex); - } - } - addSegmentComparison(params) { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - const newComparisons = this.segmentComparisons.value.concat([{ - params, - index: -1, - title: '' - }]); - this.updateQueryParamsFromComparisons(newComparisons, this.periodComparisons.value); - } - updateQueryParamsFromComparisons(segmentComparisons, periodComparisons, extraParams = {}) { - // get unique segments/periods/dates from new Comparisons - const compareSegments = {}; - const comparePeriodDatePairs = {}; - let firstSegment = false; - let firstPeriod = false; - segmentComparisons.forEach(comparison => { - if (firstSegment) { - compareSegments[comparison.params.segment] = true; - } else { - firstSegment = true; - } - }); - periodComparisons.forEach(comparison => { - if (firstPeriod) { - comparePeriodDatePairs[`${comparison.params.period}|${comparison.params.date}`] = true; - } else { - firstPeriod = true; - } - }); - const comparePeriods = []; - const compareDates = []; - Object.keys(comparePeriodDatePairs).forEach(pair => { - const parts = pair.split('|'); - comparePeriods.push(parts[0]); - compareDates.push(parts[1]); - }); - const compareParams = { - compareSegments: Object.keys(compareSegments), - comparePeriods, - compareDates - }; - // change the page w/ these new param values - const baseParams = Matomo_Matomo.helper.isReportingPage() ? src_MatomoUrl_MatomoUrl.hashParsed.value : src_MatomoUrl_MatomoUrl.urlParsed.value; - src_MatomoUrl_MatomoUrl.updateLocation(Object.assign(Object.assign(Object.assign({}, baseParams), compareParams), extraParams)); - } - getAllSeriesColors() { - const { - ColorManager - } = Matomo_Matomo; - if (!ColorManager) { - return []; - } - const seriesColorNames = []; - for (let i = 0; i < SERIES_COLOR_COUNT; i += 1) { - seriesColorNames.push(`series${i}`); - for (let j = 0; j < SERIES_SHADE_COUNT; j += 1) { - seriesColorNames.push(`series${i}-shade${j}`); - } - } - return ColorManager.getColors('comparison-series-color', seriesColorNames); - } - loadComparisonsDisabledFor() { - const matomoModule = src_MatomoUrl_MatomoUrl.parsed.value.module; - // Skip while installing, updating or logging in - if (matomoModule === 'CoreUpdater' || matomoModule === 'Installation' || matomoModule === 'Overlay' || window.piwik.isPagesComparisonApiDisabled || window.piwik.installation || window.broadcast.isLoginPage()) { - this.privateState.comparisonsDisabledFor = []; - return; - } - AjaxHelper_AjaxHelper.fetch({ - module: 'API', - method: 'API.getPagesComparisonsDisabledFor' - }).then(result => { - this.privateState.comparisonsDisabledFor = result; - }); - } - parseSegmentComparisons() { - const { - availableSegments - } = Segments_store.state; - const compareSegments = [...wrapArray(src_MatomoUrl_MatomoUrl.parsed.value.compareSegments)]; - // add base comparisons - compareSegments.unshift(src_MatomoUrl_MatomoUrl.parsed.value.segment || ''); - const newSegmentComparisons = []; - compareSegments.forEach((segment, idx) => { - let storedSegment; - availableSegments.forEach(s => { - if (s.definition === segment || s.definition === decodeURIComponent(segment) || decodeURIComponent(s.definition) === segment) { - storedSegment = s; - } - }); - let segmentTitle = storedSegment ? storedSegment.name : translate('General_Unknown'); - if (segment.trim() === '') { - segmentTitle = translate('SegmentEditor_DefaultAllVisits'); - } - newSegmentComparisons.push({ - params: { - segment - }, - title: Matomo_Matomo.helper.htmlDecode(segmentTitle), - index: idx - }); - }); - return newSegmentComparisons; - } - parsePeriodComparisons() { - const comparePeriods = [...wrapArray(src_MatomoUrl_MatomoUrl.parsed.value.comparePeriods)]; - const compareDates = [...wrapArray(src_MatomoUrl_MatomoUrl.parsed.value.compareDates)]; - comparePeriods.unshift(src_MatomoUrl_MatomoUrl.parsed.value.period); - compareDates.unshift(src_MatomoUrl_MatomoUrl.parsed.value.date); - const newPeriodComparisons = []; - for (let i = 0; i < Math.min(compareDates.length, comparePeriods.length); i += 1) { - let title; - try { - title = Periods_Periods.parse(comparePeriods[i], compareDates[i]).getPrettyString(); - } catch (e) { - title = translate('General_Error'); - } - newPeriodComparisons.push({ - params: { - date: compareDates[i], - period: comparePeriods[i] - }, - title, - index: i - }); - } - return newPeriodComparisons; - } - checkEnabledForCurrentPage() { - // category/subcategory is not included on top bar pages, so in that case we use module/action - const category = src_MatomoUrl_MatomoUrl.parsed.value.category || src_MatomoUrl_MatomoUrl.parsed.value.module; - const subcategory = src_MatomoUrl_MatomoUrl.parsed.value.subcategory || src_MatomoUrl_MatomoUrl.parsed.value.action; - const id = `${category}.${subcategory}`; - const isEnabled = this.privateState.comparisonsDisabledFor.indexOf(id) === -1 && this.privateState.comparisonsDisabledFor.indexOf(`${category}.*`) === -1; - document.documentElement.classList.toggle('comparisonsDisabled', !isEnabled); - return isEnabled; - } -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts - -/* harmony default export */ var Comparisons_store_instance = (new Comparisons_store_ComparisonsStore()); -// 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/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=script&lang=ts - - - - - - - - -/* harmony default export */ var Comparisonsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: {}, - components: { - MatomoLoader: MatomoLoader - }, - directives: { - Tooltips: Tooltips - }, - data() { - return { - comparisonTooltips: null - }; - }, - setup() { - // accessing has to be done through a computed property so we can use the computed - // instance directly in the template. unfortunately, vue won't register to changes. - const isComparing = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Comparisons_store_instance.isComparing() && !window.broadcast.isNoDataPage()); - const segmentComparisons = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Comparisons_store_instance.getSegmentComparisons()); - const periodComparisons = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Comparisons_store_instance.getPeriodComparisons()); - const getSeriesColor = Comparisons_store_instance.getSeriesColor.bind(Comparisons_store_instance); - function transformTooltipContent() { - const title = window.$(this).attr('title'); - if (!title) { - return title; - } - return window.vueSanitize(title.replace(/\n/g, '
')); - } - return { - isComparing, - segmentComparisons, - periodComparisons, - getSeriesColor, - transformTooltipContent - }; - }, - methods: { - comparisonHasSegment(comparison) { - return typeof comparison.params.segment !== 'undefined'; - }, - removeSegmentComparison(index) { - // otherwise the tooltip will be stuck on the screen - window.$(this.$refs.root).tooltip('destroy'); - Comparisons_store_instance.removeSegmentComparison(index); - }, - getComparisonPeriodType(comparison) { - const { - period - } = comparison.params; - if (period === 'range') { - return translate('CoreHome_PeriodRange'); - } - const periodStr = translate(`Intl_Period${period.substring(0, 1).toUpperCase()}${period.substring(1)}`); - return periodStr.substring(0, 1).toUpperCase() + periodStr.substring(1); - }, - getComparisonTooltip(segmentComparison, periodComparison) { - if (!this.comparisonTooltips || !Object.keys(this.comparisonTooltips).length) { - return undefined; - } - return (this.comparisonTooltips[periodComparison.index] || {})[segmentComparison.index]; - }, - getTitleTooltip(comparison) { - return `${this.htmlentities(comparison.title)}
` + `${this.htmlentities(decodeURIComponent(comparison.params.segment))}`; - }, - getUrlToSegment(segment) { - const hash = Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value); - delete hash.comparePeriods; - delete hash.compareDates; - delete hash.compareSegments; - hash.segment = segment; - return `${window.location.search}#?${src_MatomoUrl_MatomoUrl.stringify(hash)}`; - }, - onComparisonsChanged() { - this.comparisonTooltips = null; - if (!Comparisons_store_instance.isComparing()) { - return; - } - const periodComparisons = Comparisons_store_instance.getPeriodComparisons(); - const segmentComparisons = Comparisons_store_instance.getSegmentComparisons(); - AjaxHelper_AjaxHelper.fetch({ - method: 'API.getProcessedReport', - apiModule: 'VisitsSummary', - apiAction: 'get', - compare: '1', - compareSegments: src_MatomoUrl_MatomoUrl.getSearchParam('compareSegments'), - comparePeriods: src_MatomoUrl_MatomoUrl.getSearchParam('comparePeriods'), - compareDates: src_MatomoUrl_MatomoUrl.getSearchParam('compareDates'), - format_metrics: '1' - }).then(report => { - this.comparisonTooltips = {}; - periodComparisons.forEach(periodComp => { - this.comparisonTooltips[periodComp.index] = {}; - segmentComparisons.forEach(segmentComp => { - const tooltip = this.generateComparisonTooltip(report, periodComp, segmentComp); - this.comparisonTooltips[periodComp.index][segmentComp.index] = tooltip; - }); - }); - }); - }, - generateComparisonTooltip(visitsSummary, periodComp, segmentComp) { - if (!visitsSummary.reportData.comparisons) { - // sanity check - return ''; - } - const firstRowIndex = Comparisons_store_instance.getComparisonSeriesIndex(periodComp.index, 0); - const firstRow = visitsSummary.reportData.comparisons[firstRowIndex]; - const comparisonRowIndex = Comparisons_store_instance.getComparisonSeriesIndex(periodComp.index, segmentComp.index); - const comparisonRow = visitsSummary.reportData.comparisons[comparisonRowIndex]; - const firstPeriodRow = visitsSummary.reportData.comparisons[segmentComp.index]; - let tooltip = '
'; - let visitsPercent = (comparisonRow.nb_visits / firstRow.nb_visits * 100).toFixed(2); - visitsPercent = `${visitsPercent}%`; - tooltip += translate('General_ComparisonCardTooltip1', [`'${this.htmlentities(comparisonRow.compareSegmentPretty)}'`, comparisonRow.comparePeriodPretty, visitsPercent, comparisonRow.nb_visits.toString(), firstRow.nb_visits.toString()]); - if (periodComp.index > 0) { - tooltip += '

'; - tooltip += translate('General_ComparisonCardTooltip2', [comparisonRow.nb_visits_change.toString(), this.htmlentities(firstPeriodRow.compareSegmentPretty), firstPeriodRow.comparePeriodPretty]); - } - tooltip += '
'; - return tooltip; - }, - htmlentities(str) { - return Matomo_Matomo.helper.htmlEntities(str); - } - }, - mounted() { - Matomo_Matomo.on('piwikComparisonsChanged', () => { - this.onComparisonsChanged(); - }); - this.onComparisonsChanged(); - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue - - - -Comparisonsvue_type_script_lang_ts.render = Comparisonsvue_type_template_id_50602006_render - -/* harmony default export */ var Comparisons = (Comparisonsvue_type_script_lang_ts); -// 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/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue?vue&type=template&id=2ca24410 - -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_1 = { - ref: "root", - class: "menuDropdown" -}; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_2 = ["title"]; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_3 = ["innerHTML"]; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-chevron-down reporting-menu-sub-icon" -}, null, -1); -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_5 = { - class: "items" -}; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_6 = { - key: 0, - class: "search" -}; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_7 = ["placeholder"]; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_8 = ["title"]; -const MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_9 = ["title"]; -function MenuItemsDropdownvue_type_template_id_2ca24410_render(_ctx, _cache, $props, $setup, $data, $options) { - const _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if"); - const _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here"); - return 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"])("div", MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "title", - onClick: _cache[0] || (_cache[0] = $event => _ctx.showItems = !_ctx.showItems), - title: _ctx.tooltip - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "title-label", - innerHTML: _ctx.$sanitize(this.actualMenuTitle) - }, null, 8, MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_3), MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_4], 8, MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_5, [_ctx.showSearch && _ctx.showItems ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "text", - "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.searchTerm = $event), - onKeydown: _cache[2] || (_cache[2] = $event => _ctx.onSearchTermKeydown($event)), - placeholder: _ctx.translate('General_Search') - }, null, 40, MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, { - focused: _ctx.showItems - }]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "search_ico icon-search", - title: _ctx.translate('General_Search') - }, null, 8, MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - onClick: _cache[3] || (_cache[3] = $event => { - _ctx.searchTerm = ''; - _ctx.searchItems(''); - }), - class: "reset icon-close", - title: _ctx.translate('General_Clear') - }, null, 8, MenuItemsDropdownvue_type_template_id_2ca24410_hoisted_9), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - onClick: _cache[4] || (_cache[4] = $event => _ctx.selectItem($event)) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showItems]])])), [[_directive_focus_anywhere_but_here, { - blur: _ctx.lostFocus - }]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue?vue&type=template&id=2ca24410 - -// 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/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue?vue&type=script&lang=ts - - - -const { - $: MenuItemsDropdownvue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var MenuItemsDropdownvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - menuTitle: String, - tooltip: String, - showSearch: Boolean, - menuTitleChangeOnClick: Boolean - }, - directives: { - FocusAnywhereButHere: FocusAnywhereButHere, - FocusIf: FocusIf - }, - emits: ['afterSelect'], - watch: { - menuTitle() { - this.actualMenuTitle = this.menuTitle; - } - }, - data() { - return { - showItems: false, - searchTerm: '', - actualMenuTitle: this.menuTitle - }; - }, - methods: { - lostFocus() { - this.showItems = false; - }, - selectItem(event) { - const targetClasses = event.target.classList; - if (!targetClasses.contains('item') || targetClasses.contains('disabled') || targetClasses.contains('separator')) { - return; - } - if (this.menuTitleChangeOnClick) { - this.actualMenuTitle = (event.target.textContent || '').replace(/[\u0000-\u2666]/g, c => `&#${c.charCodeAt(0)};`); // eslint-disable-line - } - this.showItems = false; - MenuItemsDropdownvue_type_script_lang_ts_$(this.$slots.default()[0].el).find('.item').removeClass('active'); - targetClasses.add('active'); - this.$emit('afterSelect', event.target); - }, - onSearchTermKeydown() { - setTimeout(() => { - this.searchItems(this.searchTerm); - }); - }, - searchItems(unprocessedSearchTerm) { - const searchTerm = unprocessedSearchTerm.toLowerCase(); - MenuItemsDropdownvue_type_script_lang_ts_$(this.$refs.root).find('.item').each((index, node) => { - const $node = MenuItemsDropdownvue_type_script_lang_ts_$(node); - if ($node.text().toLowerCase().indexOf(searchTerm) === -1) { - $node.hide(); - } else { - $node.show(); - } - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue - - - -MenuItemsDropdownvue_type_script_lang_ts.render = MenuItemsDropdownvue_type_template_id_2ca24410_render - -/* harmony default export */ var MenuItemsDropdown = (MenuItemsDropdownvue_type_script_lang_ts); -// 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/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=template&id=9385dcb6 - -const DatePickervue_type_template_id_9385dcb6_hoisted_1 = { - ref: "root" -}; -function DatePickervue_type_template_id_9385dcb6_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DatePickervue_type_template_id_9385dcb6_hoisted_1, null, 512); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=template&id=9385dcb6 - -// 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/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=script&lang=ts - - - -const DEFAULT_STEP_MONTHS = 1; -const { - $: DatePickervue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var DatePickervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - selectedDateStart: Date, - selectedDateEnd: Date, - persistentHighlightedDateStart: Date, - persistentHighlightedDateEnd: Date, - highlightedDateStart: Date, - highlightedDateEnd: Date, - viewDate: [String, Date], - stepMonths: Number, - disableMonthDropdown: Boolean, - disabled: Boolean, - options: Object - }, - emits: ['cellHover', 'cellHoverLeave', 'dateSelect'], - setup(props, context) { - const root = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); - function setDateCellColor($dateCell, dateValue) { - const $dateCellLink = $dateCell.children('a'); - const { - selectedDateStart, - selectedDateEnd - } = props; - const dateValueTime = dateValue.getTime(); - const isPersistentlyHighlightedDate = !!(props.persistentHighlightedDateStart && props.persistentHighlightedDateEnd && dateValue >= props.persistentHighlightedDateStart && dateValue <= props.persistentHighlightedDateEnd); - // Intentional UX: in custom range mode we only persistently style the boundary dates. - // Keeping the whole span highlighted can make the currently visible month look fully - // selected when navigating, which is misleading for an arbitrary custom range. - const isBoundarySelectedDate = !!(selectedDateStart && selectedDateEnd && (dateValueTime === selectedDateStart.getTime() || dateValueTime === selectedDateEnd.getTime())); - if (isBoundarySelectedDate) { - $dateCell.addClass('ui-datepicker-current-period'); - } else { - $dateCell.removeClass('ui-datepicker-current-period'); - } - if (props.highlightedDateStart && props.highlightedDateEnd && dateValue >= props.highlightedDateStart && dateValue <= props.highlightedDateEnd) { - // Always mark the td so hover can fill full cell area (including horizontal padding). - $dateCell.addClass('ui-state-hover'); - // Keep anchor class too for existing link-focused hover styling. - if ($dateCellLink.length) { - $dateCellLink.addClass('ui-state-hover'); - } - } else { - $dateCell.removeClass('ui-state-hover'); - $dateCellLink.removeClass('ui-state-hover'); - } - if (isPersistentlyHighlightedDate) { - $dateCell.addClass('ui-datepicker-persistent-highlight'); - if ($dateCellLink.length) { - $dateCellLink.addClass('ui-datepicker-persistent-highlight'); - } - } else { - $dateCell.removeClass('ui-datepicker-persistent-highlight'); - $dateCellLink.removeClass('ui-datepicker-persistent-highlight'); - } - } - function getCellDate($dateCell, month, year) { - if ($dateCell.hasClass('ui-datepicker-other-month')) { - return getOtherMonthDate($dateCell, month, year); // eslint-disable-line - } - const day = parseInt($dateCell.children('a,span').text(), 10); - return new Date(year, month, day); - } - function getOtherMonthDate($dateCell, month, year) { - let date; - const $row = $dateCell.parent(); - const $rowCells = $row.children('td'); - // if in the first row, the date cell is before the current month - if ($row.is(':first-child')) { - const $firstDateInMonth = $row.children('td:not(.ui-datepicker-other-month)').first(); - date = getCellDate($firstDateInMonth, month, year); - date.setDate($rowCells.index($dateCell) - $rowCells.index($firstDateInMonth) + 1); - return date; - } - // the date cell is after the current month - const $lastDateInMonth = $row.children('td:not(.ui-datepicker-other-month)').last(); - date = getCellDate($lastDateInMonth, month, year); - date.setDate(date.getDate() + $rowCells.index($dateCell) - $rowCells.index($lastDateInMonth)); - return date; - } - function getMonthYearDisplayed() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const $firstCellWithMonth = element.find('td[data-month]'); - const month = parseInt($firstCellWithMonth.attr('data-month'), 10); - const year = parseInt($firstCellWithMonth.attr('data-year'), 10); - return [month, year]; - } - function setDatePickerCellColors() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const $calendarTable = element.find('.ui-datepicker-calendar'); - const monthYear = getMonthYearDisplayed(); - // highlight the rest of the cells by first getting the date for the first cell - // in the calendar, then just incrementing by one for the rest of the cells. - const $cells = $calendarTable.find('td'); - const $firstDateCell = $cells.first(); - const currentDate = getCellDate($firstDateCell, monthYear[0], monthYear[1]); - $cells.each(function setCellColor() { - setDateCellColor(DatePickervue_type_script_lang_ts_$(this), currentDate); - currentDate.setDate(currentDate.getDate() + 1); - }); - } - function viewDateChanged() { - if (!props.viewDate) { - return false; - } - let date; - if (typeof props.viewDate === 'string') { - try { - date = parseDate(props.viewDate); - } catch (e) { - return false; - } - } else { - date = props.viewDate; - } - const element = DatePickervue_type_script_lang_ts_$(root.value); - // only change the datepicker date if the date is outside of the current month/year. - // this avoids a re-render in other cases. - const monthYear = getMonthYearDisplayed(); - if (monthYear[0] !== date.getMonth() || monthYear[1] !== date.getFullYear()) { - element.datepicker('setDate', date); - return true; - } - return false; - } - function enableDisableMonthDropdown() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const monthPicker = element.find('.ui-datepicker-month')[0]; - if (monthPicker) { - monthPicker.disabled = props.disableMonthDropdown || !!props.disabled; - } - const yearPicker = element.find('.ui-datepicker-year')[0]; - if (yearPicker) { - yearPicker.disabled = !!props.disabled; - } - } - function updateKeyboardAccessibility() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const tabIndex = props.disabled ? -1 : 0; - element.find('a, select').attr('tabindex', tabIndex); - element.attr('aria-disabled', props.disabled ? 'true' : 'false'); - if (props.disabled) { - element.find('a').attr('aria-disabled', 'true'); - } else { - element.find('a').removeAttr('aria-disabled'); - } - } - // remove the ui-state-active class & click handlers for every cell. we bypass - // the datepicker's date selection logic for smoother browser rendering. - function onJqueryUiRenderedPicker() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - element.find('td[data-event]').off('click'); - element.find('.ui-state-active').removeClass('ui-state-active'); - element.find('.ui-datepicker-current-day').removeClass('ui-datepicker-current-day'); - // add href to left/right nav in calendar so they can be accessed via keyboard - element.find('.ui-datepicker-prev,.ui-datepicker-next').attr('href', ''); - // Use explicit chevron classes so scoped styles can render modern nav icons. - element.find('.ui-datepicker-prev .ui-icon').removeClass('ui-icon-circle-triangle-w').addClass('icon-chevron-left'); - element.find('.ui-datepicker-next .ui-icon').removeClass('ui-icon-circle-triangle-e').addClass('icon-chevron-right'); - updateKeyboardAccessibility(); - } - function stepMonthsChanged() { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const stepMonths = props.stepMonths || DEFAULT_STEP_MONTHS; - if (element.datepicker('option', 'stepMonths') === stepMonths) { - return false; - } - // setting stepMonths will change the month in view back to the selected date. to avoid - // we set the selected date to the month in view. - const currentMonth = DatePickervue_type_script_lang_ts_$('.ui-datepicker-month', element).val(); - const currentYear = DatePickervue_type_script_lang_ts_$('.ui-datepicker-year', element).val(); - element.datepicker('option', 'stepMonths', stepMonths).datepicker('setDate', new Date(currentYear, currentMonth)); - onJqueryUiRenderedPicker(); - return true; - } - function handleOtherMonthClick() { - if (!DatePickervue_type_script_lang_ts_$(this).hasClass('ui-state-hover')) { - return; - } - const $row = DatePickervue_type_script_lang_ts_$(this).parent(); - const $tbody = $row.parent(); - if ($row.is(':first-child')) { - // click on first of the month - $tbody.find('a').first().click(); - } else { - // click on last of month - $tbody.find('a').last().click(); - } - } - function onCalendarViewChange() { - // clicking left/right re-enables the month dropdown, so we disable it again - enableDisableMonthDropdown(); - updateKeyboardAccessibility(); - setDatePickerCellColors(); - } - // on a prop change (NOTE: we can't watch just `props`, since then newProps and oldProps will - // have the same values (since it is a proxy object). Using a copy doesn't quite work, the - // object it returns will always be different, BUT, since we check what changes it works - // for our purposes. The only downside is that it runs on every tick basically, but since - // that is within the context of the date picker component, it's bearable. - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => Object.assign({}, props), (newProps, oldProps) => { - let redraw = false; - [x => x.selectedDateStart, x => x.selectedDateEnd, x => x.persistentHighlightedDateStart, x => x.persistentHighlightedDateEnd, x => x.highlightedDateStart, x => x.highlightedDateEnd].forEach(selector => { - if (redraw) { - return; - } - const newProp = selector(newProps); - const oldProp = selector(oldProps); - if (!newProp && oldProp) { - redraw = true; - } - if (newProp && !oldProp) { - redraw = true; - } - if (newProp && oldProp && newProp.getTime() !== oldProp.getTime()) { - redraw = true; - } - }); - if (newProps.viewDate !== oldProps.viewDate && viewDateChanged()) { - redraw = true; - } - if (newProps.stepMonths !== oldProps.stepMonths) { - stepMonthsChanged(); - } - if (newProps.disableMonthDropdown !== oldProps.disableMonthDropdown) { - enableDisableMonthDropdown(); - } - if (newProps.disabled !== oldProps.disabled) { - enableDisableMonthDropdown(); - updateKeyboardAccessibility(); - } - // redraw when selected or highlighted date props change - if (redraw) { - setDatePickerCellColors(); - } - }); - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => { - const element = DatePickervue_type_script_lang_ts_$(root.value); - const customOptions = props.options || {}; - const datePickerOptions = Object.assign(Object.assign(Object.assign({}, Matomo_Matomo.getBaseDatePickerOptions()), customOptions), {}, { - onChangeMonthYear: () => { - // datepicker renders the HTML after this hook is called, so we use setTimeout - // to run some code after the render. - setTimeout(() => { - onJqueryUiRenderedPicker(); - }); - } - }); - element.datepicker(datePickerOptions); - element.on('mouseover', 'tbody td a', event => { - // this event is triggered when a user clicks a date as well. in that case, - // the originalEvent is null. we don't need to redraw again for that, so - // we ignore events like that. - if (event.originalEvent) { - setDatePickerCellColors(); - } - }); - // on hover cell, execute scope.cellHover() - element.on('mouseenter', 'tbody td', function onMouseEnter() { - const monthYear = getMonthYearDisplayed(); - const $dateCell = DatePickervue_type_script_lang_ts_$(this); - const dateValue = getCellDate($dateCell, monthYear[0], monthYear[1]); - context.emit('cellHover', { - date: dateValue, - $cell: $dateCell - }); - }); - // overrides jquery UI handler that unhighlights a cell when the mouse leaves it - element.on('mouseout', 'tbody td a', () => { - setDatePickerCellColors(); - }); - // call scope.cellHoverLeave() when mouse leaves table body (can't do event on tbody, for - // some reason that fails, so we do two events, one on the table & one on thead) - element.on('mouseleave', 'table', () => context.emit('cellHoverLeave')).on('mouseenter', 'thead', () => context.emit('cellHoverLeave')); - // make sure whitespace is clickable when the period makes it appropriate - element.on('click', 'tbody td.ui-datepicker-other-month', handleOtherMonthClick); - // NOTE: using a selector w/ .on() doesn't seem to work for some reason... - element.on('click', e => { - e.preventDefault(); - const $target = DatePickervue_type_script_lang_ts_$(e.target).closest('a'); - if (!$target.is('.ui-datepicker-next') && !$target.is('.ui-datepicker-prev')) { - return; - } - onCalendarViewChange(); - }); - // when a cell is clicked, invoke the onDateSelected function. this, in conjunction - // with onJqueryUiRenderedPicker(), overrides the date picker's click behavior. - element.on('click', 'td[data-month]', event => { - const $cell = DatePickervue_type_script_lang_ts_$(event.target).closest('td'); - const month = parseInt($cell.attr('data-month'), 10); - const year = parseInt($cell.attr('data-year'), 10); - const day = parseInt($cell.children('a,span').text(), 10); - context.emit('dateSelect', { - date: new Date(year, month, day) - }); - }); - const renderPostProcessed = stepMonthsChanged(); - viewDateChanged(); - enableDisableMonthDropdown(); - if (!renderPostProcessed) { - onJqueryUiRenderedPicker(); - } - updateKeyboardAccessibility(); - setDatePickerCellColors(); - }); - return { - root - }; - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.vue - - - -DatePickervue_type_script_lang_ts.render = DatePickervue_type_template_id_9385dcb6_render - -/* harmony default export */ var DatePicker = (DatePickervue_type_script_lang_ts); -// 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/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=template&id=5a8c141e - -const DateRangePickervue_type_template_id_5a8c141e_hoisted_1 = { - class: "dateRangePicker" -}; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_2 = { - id: "calendarRangeFrom" -}; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_3 = { - class: "dateRangePicker-label" -}; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_4 = ["disabled"]; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_5 = { - id: "calendarRangeTo" -}; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_6 = { - class: "dateRangePicker-label" -}; -const DateRangePickervue_type_template_id_5a8c141e_hoisted_7 = ["disabled"]; -function DateRangePickervue_type_template_id_5a8c141e_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_DatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DatePicker"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DateRangePickervue_type_template_id_5a8c141e_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_5a8c141e_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", DateRangePickervue_type_template_id_5a8c141e_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeFrom')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "text", - id: "inputCalendarFrom", - name: "inputCalendarFrom", - class: "browser-default dateRangePicker-field", - disabled: _ctx.disabled, - "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.startDateText = $event), - onKeydown: _cache[1] || (_cache[1] = $event => _ctx.onRangeInputChanged('from', $event)), - onKeyup: _cache[2] || (_cache[2] = $event => _ctx.handleEnterPress($event)) - }, null, 40, DateRangePickervue_type_template_id_5a8c141e_hoisted_4), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.startDateText]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DatePicker, { - id: "calendarFrom", - "view-date": _ctx.startDate, - "selected-date-start": _ctx.fromPickerSelectedDate, - "selected-date-end": _ctx.fromPickerSelectedDate, - "highlighted-date-start": _ctx.fromPickerHoveredDate, - "highlighted-date-end": _ctx.fromPickerHoveredDate, - disabled: _ctx.disabled, - onDateSelect: _cache[3] || (_cache[3] = $event => _ctx.setStartRangeDate($event.date)), - onCellHover: _cache[4] || (_cache[4] = $event => _ctx.fromPickerHoveredDate = _ctx.getNewHoveredDate($event.date, $event.$cell)), - onCellHoverLeave: _cache[5] || (_cache[5] = $event => _ctx.fromPickerHoveredDate = null) - }, null, 8, ["view-date", "selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end", "disabled"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_5a8c141e_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", DateRangePickervue_type_template_id_5a8c141e_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeTo')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "text", - id: "inputCalendarTo", - name: "inputCalendarTo", - class: "browser-default dateRangePicker-field", - disabled: _ctx.disabled, - "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.endDateText = $event), - onKeydown: _cache[7] || (_cache[7] = $event => _ctx.onRangeInputChanged('to', $event)), - onKeyup: _cache[8] || (_cache[8] = $event => _ctx.handleEnterPress($event)) - }, null, 40, DateRangePickervue_type_template_id_5a8c141e_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.endDateText]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DatePicker, { - id: "calendarTo", - "view-date": _ctx.endDate, - "selected-date-start": _ctx.toPickerSelectedDate, - "selected-date-end": _ctx.toPickerSelectedDate, - "highlighted-date-start": _ctx.toPickerHoveredDate, - "highlighted-date-end": _ctx.toPickerHoveredDate, - disabled: _ctx.disabled, - onDateSelect: _cache[9] || (_cache[9] = $event => _ctx.setEndRangeDate($event.date)), - onCellHover: _cache[10] || (_cache[10] = $event => _ctx.toPickerHoveredDate = _ctx.getNewHoveredDate($event.date, $event.$cell)), - onCellHoverLeave: _cache[11] || (_cache[11] = $event => _ctx.toPickerHoveredDate = null) - }, null, 8, ["view-date", "selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end", "disabled"])])]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=template&id=5a8c141e - -// 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/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=script&lang=ts - - - -const DATE_FORMAT = 'YYYY-MM-DD'; -/* harmony default export */ var DateRangePickervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'DateRangePicker', - props: { - startDate: String, - endDate: String, - disabled: Boolean - }, - components: { - DatePicker: DatePicker - }, - data() { - let startDate = null; - try { - if (this.startDate) { - startDate = parseDate(this.startDate); - } - } catch (e) { - // ignore - } - let endDate = null; - try { - if (this.endDate) { - endDate = parseDate(this.endDate); - } - } catch (e) { - // ignore - } - return { - fromPickerSelectedDate: startDate, - toPickerSelectedDate: endDate, - fromPickerHoveredDate: null, - toPickerHoveredDate: null, - startDateText: this.startDate, - endDateText: this.endDate, - startDateInvalid: false, - endDateInvalid: false - }; - }, - emits: ['rangeChange', 'submit'], - watch: { - startDate() { - this.startDateText = this.startDate; - this.syncStartRangeDateFromProp(this.startDate); - }, - endDate() { - this.endDateText = this.endDate; - this.syncEndRangeDateFromProp(this.endDate); - } - }, - methods: { - setStartRangeDate(date) { - this.fromPickerSelectedDate = date; - this.rangeChanged(); - }, - setEndRangeDate(date) { - this.toPickerSelectedDate = date; - this.rangeChanged(); - }, - onRangeInputChanged(source, event) { - setTimeout(() => { - if (source === 'from') { - this.setStartRangeDateFromStr(event.target.value); - } else { - this.setEndRangeDateFromStr(event.target.value); - } - }); - }, - getNewHoveredDate(date, $cell) { - if ($cell.hasClass('ui-datepicker-unselectable')) { - return null; - } - return date; - }, - handleEnterPress($event) { - if ($event.keyCode !== 13) { - return; - } - this.$emit('submit', { - start: this.startDate, - end: this.endDate - }); - }, - syncStartRangeDateFromProp(dateStr) { - this.startDateInvalid = true; - let startDateParsed = null; - try { - if (dateStr && dateStr.length === DATE_FORMAT.length) { - startDateParsed = parseDate(dateStr); - } - } catch (e) { - // ignore - } - if (startDateParsed) { - this.fromPickerSelectedDate = startDateParsed; - this.startDateInvalid = false; - } - }, - setStartRangeDateFromStr(dateStr) { - this.syncStartRangeDateFromProp(dateStr); - if (!this.startDateInvalid) { - this.rangeChanged(); - } - }, - syncEndRangeDateFromProp(dateStr) { - this.endDateInvalid = true; - let endDateParsed = null; - try { - if (dateStr && dateStr.length === DATE_FORMAT.length) { - endDateParsed = parseDate(dateStr); - } - } catch (e) { - // ignore - } - if (endDateParsed) { - this.toPickerSelectedDate = endDateParsed; - this.endDateInvalid = false; - } - }, - setEndRangeDateFromStr(dateStr) { - this.syncEndRangeDateFromProp(dateStr); - if (!this.endDateInvalid) { - this.rangeChanged(); - } - }, - rangeChanged() { - this.$emit('rangeChange', { - start: this.fromPickerSelectedDate ? format(this.fromPickerSelectedDate) : null, - end: this.toPickerSelectedDate ? format(this.toPickerSelectedDate) : null - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue - - - -DateRangePickervue_type_script_lang_ts.render = DateRangePickervue_type_template_id_5a8c141e_render - -/* harmony default export */ var DateRangePicker = (DateRangePickervue_type_script_lang_ts); -// 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/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=ff54072c - -function PeriodDatePickervue_type_template_id_ff54072c_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_DatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DatePicker"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_DatePicker, { - "selected-date-start": _ctx.selectedDates[0], - "selected-date-end": _ctx.selectedDates[1], - "persistent-highlighted-date-start": _ctx.committedBetweenHighlightDates[0], - "persistent-highlighted-date-end": _ctx.committedBetweenHighlightDates[1], - "highlighted-date-start": _ctx.highlightedDates ? _ctx.highlightedDates[0] : null, - "highlighted-date-end": _ctx.highlightedDates ? _ctx.highlightedDates[1] : null, - "view-date": _ctx.viewDate, - "step-months": _ctx.period === 'year' ? 12 : 1, - "disable-month-dropdown": _ctx.period === 'year', - disabled: _ctx.disabled, - onCellHover: _cache[0] || (_cache[0] = $event => _ctx.onHoverNormalCell($event.date, $event.$cell)), - onCellHoverLeave: _cache[1] || (_cache[1] = $event => _ctx.onHoverLeaveNormalCells()), - onDateSelect: _cache[2] || (_cache[2] = $event => _ctx.onDateSelected($event.date)) - }, null, 8, ["selected-date-start", "selected-date-end", "persistent-highlighted-date-start", "persistent-highlighted-date-end", "highlighted-date-start", "highlighted-date-end", "view-date", "step-months", "disable-month-dropdown", "disabled"]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=ff54072c - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.types.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -const NBSP = '\u00A0'; -const COMPARE_PERIOD_TYPES = ['custom', 'previousPeriod', 'previousYear']; -const COMPARE_PERIOD_OPTIONS = [{ - key: 'custom', - value: translate('General_Custom') -}, { - key: 'previousPeriod', - value: translate('General_PreviousPeriod').replace(/\s+/, NBSP) -}, { - key: 'previousYear', - value: translate('General_PreviousYear').replace(/\s+/, NBSP) -}]; -function getSiteMinAllowedDate() { - return new Date(window.piwik.minDateYear, window.piwik.minDateMonth - 1, window.piwik.minDateDay); -} -function getSiteMaxAllowedDate() { - return new Date(window.piwik.maxDateYear, window.piwik.maxDateMonth - 1, window.piwik.maxDateDay); -} -const RANGE_PERIOD = 'range'; -function isValidDate(candidateDate) { - if (Object.prototype.toString.call(candidateDate) !== '[object Date]') { - return false; - } - return !Number.isNaN(candidateDate.getTime()); -} -function isSingleCalendarPeriod(period) { - return period === 'day' || period === 'week' || period === 'month' || period === 'year'; -} -// 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/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=script&lang=ts - - - - -/* harmony default export */ var PeriodDatePickervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - period: { - type: String, - required: true - }, - date: [String, Date], - disabled: Boolean - }, - components: { - DatePicker: DatePicker - }, - emits: ['select'], - setup(props, context) { - const viewDate = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.date); - const selectedDates = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([null, null]); - const committedBetweenHighlightDates = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([null, null]); - const highlightedDates = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); - const piwikMinDate = getSiteMinAllowedDate(); - const piwikMaxDate = getSiteMaxAllowedDate(); - function getBoundedDateRange(date) { - const dates = Periods_Periods.get(props.period).parse(date).getDateRange(); - // make sure highlighted date range is within min/max date range - dates[0] = piwikMinDate < dates[0] ? dates[0] : piwikMinDate; - dates[1] = piwikMaxDate > dates[1] ? dates[1] : piwikMaxDate; - return dates; - } - function getExclusiveBetweenRange(startDate, endDate) { - if (!startDate || !endDate || startDate.getTime() >= endDate.getTime()) { - return [null, null]; - } - const betweenStart = new Date(startDate); - betweenStart.setDate(betweenStart.getDate() + 1); - const betweenEnd = new Date(endDate); - betweenEnd.setDate(betweenEnd.getDate() - 1); - if (betweenStart.getTime() > betweenEnd.getTime()) { - return [null, null]; - } - return [betweenStart, betweenEnd]; - } - function refreshCommittedBetweenHighlightFromDate(date) { - if (!date) { - committedBetweenHighlightDates.value = [null, null]; - return; - } - const boundedDateRange = getBoundedDateRange(date); - committedBetweenHighlightDates.value = getExclusiveBetweenRange(boundedDateRange[0], boundedDateRange[1]); - } - function onHoverNormalCell(cellDate, $cell) { - const isOutOfMinMaxDateRange = cellDate < piwikMinDate || cellDate > piwikMaxDate; - // don't highlight anything if the period is month or day, and we're hovering over calendar - // whitespace. since there are no dates, it's doesn't make sense what you're selecting. - const shouldNotHighlightFromWhitespace = $cell.hasClass('ui-datepicker-other-month') && (props.period === 'month' || props.period === 'day'); - if (isOutOfMinMaxDateRange || shouldNotHighlightFromWhitespace) { - highlightedDates.value = [null, null]; - return; - } - // Keep hover preview inclusive (start/end + in-between) for parity with historical UX. - highlightedDates.value = getBoundedDateRange(cellDate); - } - function onHoverLeaveNormalCells() { - highlightedDates.value = null; - } - function onDateSelected(date) { - context.emit('select', { - date - }); - } - function onChanges() { - if (!props.period || !props.date) { - selectedDates.value = [null, null]; - committedBetweenHighlightDates.value = [null, null]; - highlightedDates.value = null; - viewDate.value = null; - return; - } - selectedDates.value = getBoundedDateRange(props.date); - refreshCommittedBetweenHighlightFromDate(props.date); - highlightedDates.value = null; - viewDate.value = parseDate(props.date); - } - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(props, onChanges); - onChanges(); - return { - selectedDates, - committedBetweenHighlightDates, - highlightedDates, - viewDate, - onHoverNormalCell, - onHoverLeaveNormalCells, - onDateSelected - }; - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue - - - -PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_template_id_ff54072c_render - -/* harmony default export */ var PeriodDatePicker = (PeriodDatePickervue_type_script_lang_ts); -// 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/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=50cb1ca6 - -const Notificationvue_type_template_id_50cb1ca6_hoisted_1 = { - key: 0 -}; -const Notificationvue_type_template_id_50cb1ca6_hoisted_2 = ["data-notification-instance-id"]; -const Notificationvue_type_template_id_50cb1ca6_hoisted_3 = { - key: 1 -}; -const Notificationvue_type_template_id_50cb1ca6_hoisted_4 = { - class: "notification-body" -}; -const Notificationvue_type_template_id_50cb1ca6_hoisted_5 = ["innerHTML"]; -const Notificationvue_type_template_id_50cb1ca6_hoisted_6 = { - key: 1 -}; -function Notificationvue_type_template_id_50cb1ca6_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], { - name: _ctx.type === 'toast' ? 'slow-fade-out' : undefined, - onAfterLeave: _cache[1] || (_cache[1] = $event => _ctx.toastClosed()) - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [!_ctx.deleted ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Notificationvue_type_template_id_50cb1ca6_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], { - name: _ctx.type === 'toast' ? 'toast-slide-up' : undefined, - appear: "" - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], { - name: _ctx.animate ? 'fade-in' : undefined, - appear: "" - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["notification system", _ctx.cssClasses]), - style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.style), - ref: "root", - "data-notification-instance-id": _ctx.notificationInstanceId - }, [_ctx.canClose ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", { - key: 0, - type: "button", - class: "close", - "data-dismiss": "alert", - onClick: _cache[0] || (_cache[0] = $event => _ctx.closeNotification($event)) - }, " × ")) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.title ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("strong", Notificationvue_type_template_id_50cb1ca6_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.title), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Notificationvue_type_template_id_50cb1ca6_hoisted_4, [_ctx.message ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: 0, - innerHTML: _ctx.$sanitize(_ctx.message) - }, null, 8, Notificationvue_type_template_id_50cb1ca6_hoisted_5)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.message ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Notificationvue_type_template_id_50cb1ca6_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 14, Notificationvue_type_template_id_50cb1ca6_hoisted_2)]), - _: 3 - }, 8, ["name"])])]), - _: 3 - }, 8, ["name"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), - _: 3 - }, 8, ["name"]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=50cb1ca6 - -// 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/CoreHome/vue/src/Notification/Notification.vue?vue&type=script&lang=ts - - -const { - $: Notificationvue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var Notificationvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - notificationId: String, - // NOTE: notificationId refers to server side ID for notifications stored in the session. - // this ID is just so it can be selected outside of this component (just for scrolling). - notificationInstanceId: String, - title: String, - context: String, - type: String, - noclear: Boolean, - toastLength: { - type: Number, - default: 12 * 1000 - }, - style: [String, Object], - animate: Boolean, - message: String, - cssClass: String - }, - computed: { - cssClasses() { - const result = {}; - if (this.context) { - result[`notification-${this.context}`] = true; - } - if (this.cssClass) { - result[this.cssClass] = true; - } - return result; - }, - canClose() { - if (this.type === 'persistent') { - // otherwise it is never possible to dismiss the notification - return true; - } - return !this.noclear; - } - }, - emits: ['closed'], - data() { - return { - deleted: false - }; - }, - mounted() { - const addToastEvent = () => { - setTimeout(() => { - this.deleted = true; - }, this.toastLength); - }; - if (this.type === 'toast') { - addToastEvent(); - } - if (this.style) { - Notificationvue_type_script_lang_ts_$(this.$refs.root).css(this.style); - } - }, - methods: { - toastClosed() { - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => { - this.$emit('closed'); - }); - }, - closeNotification(event) { - if (this.canClose && event && event.target) { - this.deleted = true; - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => { - this.$emit('closed'); - }); - } - this.markNotificationAsRead(); - }, - markNotificationAsRead() { - if (!this.notificationId) { - return; - } - AjaxHelper_AjaxHelper.post({ - module: 'CoreHome', - action: 'markNotificationAsRead' - }, { - notificationId: this.notificationId - }, { - withTokenInUrl: true - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue - - - -Notificationvue_type_script_lang_ts.render = Notificationvue_type_template_id_50cb1ca6_render - -/* harmony default export */ var Notification = (Notificationvue_type_script_lang_ts); -// 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/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=template&id=148c8a5e - -const NotificationGroupvue_type_template_id_148c8a5e_hoisted_1 = { - class: "notification-group" -}; -const NotificationGroupvue_type_template_id_148c8a5e_hoisted_2 = ["innerHTML"]; -function NotificationGroupvue_type_template_id_148c8a5e_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Notification = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Notification"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", NotificationGroupvue_type_template_id_148c8a5e_hoisted_1, [(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.notifications, (notification, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Notification, { - key: notification.id || `no-id-${index}`, - "notification-id": notification.id, - title: notification.title, - context: notification.context, - type: notification.type, - noclear: notification.noclear, - "toast-length": notification.toastLength, - style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(notification.style), - animate: notification.animate, - message: notification.message, - "notification-instance-id": notification.notificationInstanceId, - "css-class": notification.class, - onClosed: $event => _ctx.removeNotification(notification.id) - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - innerHTML: _ctx.$sanitize(notification.message) - }, null, 8, NotificationGroupvue_type_template_id_148c8a5e_hoisted_2)]), - _: 2 - }, 1032, ["notification-id", "title", "context", "type", "noclear", "toast-length", "style", "animate", "message", "notification-instance-id", "css-class", "onClosed"]); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=template&id=148c8a5e - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notifications.store.ts -function Notifications_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - -const { - $: Notifications_store_$ -} = window; -class Notifications_store_NotificationsStore { - constructor() { - Notifications_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - notifications: [] - })); - Notifications_store_defineProperty(this, "nextNotificationId", 0); - } - get state() { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState); - } - appendNotification(notification) { - this.checkMessage(notification.message); - // remove existing notification before adding - if (notification.id) { - this.remove(notification.id); - } - this.privateState.notifications.push(notification); - } - prependNotification(notification) { - this.checkMessage(notification.message); - // remove existing notification before adding - if (notification.id) { - this.remove(notification.id); - } - this.privateState.notifications.unshift(notification); - } - /** - * Removes a previously shown notification having the given notification id. - */ - remove(id) { - this.privateState.notifications = this.privateState.notifications.filter(n => n.id !== id); - } - parseNotificationDivs() { - const $notificationNodes = Notifications_store_$('[data-role="notification"]'); - const notificationsToShow = []; - $notificationNodes.each((index, notificationNode) => { - const $notificationNode = Notifications_store_$(notificationNode); - const attributes = $notificationNode.data(); - const message = $notificationNode.html(); - if (message) { - notificationsToShow.push(Object.assign(Object.assign({}, attributes), {}, { - message, - animate: false - })); - } - $notificationNodes.remove(); - }); - notificationsToShow.forEach(n => this.show(n)); - } - clearTransientNotifications() { - this.privateState.notifications = this.privateState.notifications.filter(n => n.type !== 'transient'); - } - /** - * Creates a notification and shows it to the user. - */ - show(notification) { - this.checkMessage(notification.message); - let addMethod = notification.prepend ? this.prependNotification : this.appendNotification; - let notificationPosition = '#notificationContainer'; - if (notification.placeat) { - notificationPosition = notification.placeat; - } else { - // If a modal is open, we want to make sure the error message is visible and therefore - // show it within the opened modal - const modalSelector = '.modal.open .modal-content'; - const modal = document.querySelector(modalSelector); - if (modal) { - if (!modal.querySelector('#modalNotificationContainer')) { - Notifications_store_$(modal).prepend('
'); - } - notificationPosition = `${modalSelector} #modalNotificationContainer`; - addMethod = this.prependNotification; - } - } - const group = notification.group || (notificationPosition ? notificationPosition.toString() : ''); - this.initializeNotificationContainer(notificationPosition, group); - const notificationInstanceId = (this.nextNotificationId += 1).toString(); - addMethod.call(this, Object.assign(Object.assign({}, notification), {}, { - noclear: !!notification.noclear, - group, - notificationId: notification.id, - notificationInstanceId, - type: notification.type || 'transient' - })); - return notificationInstanceId; - } - scrollToNotification(notificationInstanceId) { - setTimeout(() => { - const element = document.querySelector(`[data-notification-instance-id='${notificationInstanceId}']`); - if (element) { - Matomo_Matomo.helper.lazyScrollTo(element, 250); - } - }); - } - /** - * Shows a notification at a certain point with a quick upwards animation. - */ - toast(notification) { - this.checkMessage(notification.message); - const $placeat = notification.placeat ? Notifications_store_$(notification.placeat) : undefined; - if (!$placeat || !$placeat.length) { - throw new Error('A valid selector is required for the placeat option when using Notification.toast().'); - } - const toastElement = document.createElement('div'); - toastElement.style.position = 'absolute'; - toastElement.style.top = `${$placeat.offset().top}px`; - toastElement.style.left = `${$placeat.offset().left}px`; - toastElement.style.zIndex = '1000'; - document.body.appendChild(toastElement); - const app = createVueApp({ - render: () => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(Notification, Object.assign(Object.assign({}, notification), {}, { - notificationId: notification.id, - type: 'toast', - onClosed: () => { - app.unmount(); - } - })) - }); - app.mount(toastElement); - } - initializeNotificationContainer(notificationPosition, group) { - if (!notificationPosition) { - return; - } - const $container = Notifications_store_$(notificationPosition); - if ($container.children('.notification-group').length) { - return; - } - // avoiding a dependency cycle. won't need to do this when NotificationGroup's do not need - // to be dynamically initialized. - const NotificationGroup = window.CoreHome.NotificationGroup; // eslint-disable-line - const app = createVueApp({ - template: '', - data: () => ({ - group - }) - }); - app.component('NotificationGroup', NotificationGroup); - app.mount($container[0]); - } - checkMessage(message) { - if (!message) { - throw new Error('No message given, cannot display notification'); - } - } -} -const Notifications_store_instance = new Notifications_store_NotificationsStore(); -/* harmony default export */ var Notifications_store = (Notifications_store_instance); -// parse notifications on dom load -Notifications_store_$(() => Notifications_store_instance.parseNotificationDivs()); -// 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/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=script&lang=ts - - - -/* harmony default export */ var NotificationGroupvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - group: String - }, - components: { - Notification: Notification - }, - computed: { - notifications() { - return Notifications_store.state.notifications.filter(n => { - if (this.group) { - return this.group === n.group; - } - return !n.group; - }); - } - }, - methods: { - removeNotification(id) { - Notifications_store.remove(id); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue - - - -NotificationGroupvue_type_script_lang_ts.render = NotificationGroupvue_type_template_id_148c8a5e_render - -/* harmony default export */ var Notification_NotificationGroup = (NotificationGroupvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/index.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -// 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/CoreHome/vue/src/ShowHelpLink/ShowHelpLink.vue?vue&type=template&id=34147ede - -const ShowHelpLinkvue_type_template_id_34147ede_hoisted_1 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-help" -}, null, -1); -const ShowHelpLinkvue_type_template_id_34147ede_hoisted_2 = [ShowHelpLinkvue_type_template_id_34147ede_hoisted_1]; -function ShowHelpLinkvue_type_template_id_34147ede_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - class: "item-help-icon", - tabindex: "5", - href: "javascript:", - onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showHelp && _ctx.showHelp(...args)) - }, ShowHelpLinkvue_type_template_id_34147ede_hoisted_2); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ShowHelpLink/ShowHelpLink.vue?vue&type=template&id=34147ede - -// 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/CoreHome/vue/src/ShowHelpLink/ShowHelpLink.vue?vue&type=script&lang=ts - - -const REPORTING_HELP_NOTIFICATION_ID = 'reportingMenu-help'; -/* harmony default export */ var ShowHelpLinkvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - message: { - type: String, - required: true - }, - name: { - type: String, - required: true - } - }, - data() { - return { - currentName: '' - }; - }, - methods: { - showHelp() { - if (this.currentName !== '') { - Notifications_store.remove(REPORTING_HELP_NOTIFICATION_ID); - this.currentName = ''; - return; - } - Notifications_store.show({ - context: 'info', - id: REPORTING_HELP_NOTIFICATION_ID, - type: 'help', - noclear: true, - class: 'help-notification', - message: this.message, - placeat: '#notificationContainer', - prepend: true - }); - if (this.name !== '') { - this.currentName = this.name; - } - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ShowHelpLink/ShowHelpLink.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ShowHelpLink/ShowHelpLink.vue - - - -ShowHelpLinkvue_type_script_lang_ts.render = ShowHelpLinkvue_type_template_id_34147ede_render - -/* harmony default export */ var ShowHelpLink = (ShowHelpLinkvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SitesStore.ts -function SitesStore_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class SitesStore_SitesStore { - constructor() { - SitesStore_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - initialSites: [], - isInitialized: false - })); - SitesStore_defineProperty(this, "stateFiltered", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - initialSites: [], - isInitialized: false, - excludedSites: [], - onlySitesWithAdminAccess: false, - onlySitesWithAtLeastWriteAccess: false, - siteTypesToExclude: [] - })); - SitesStore_defineProperty(this, "currentRequestAbort", null); - SitesStore_defineProperty(this, "limitRequest", void 0); - SitesStore_defineProperty(this, "initialSites", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.state.initialSites))); - SitesStore_defineProperty(this, "initialSitesFiltered", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.stateFiltered.initialSites))); - } - isFiltered(onlySitesWithAdminAccess = false, sitesToExclude = [], onlySitesWithAtLeastWriteAccess = false, siteTypesToExclude = []) { - return sitesToExclude.length > 0 || onlySitesWithAdminAccess || onlySitesWithAtLeastWriteAccess || siteTypesToExclude.length > 0; - } - matchesCurrentFilteredState(onlySitesWithAdminAccess = false, sitesToExclude = [], onlySitesWithAtLeastWriteAccess = false, siteTypesToExclude = []) { - // If the filtered state hasn't been initialised yet and no filters are applied, return true - if (!this.stateFiltered.isInitialized && !this.isFiltered(onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude)) { - return true; - } - // Run deep comparison to ensure the filters are actually the same - return this.stateFiltered.isInitialized && sitesToExclude.length === this.stateFiltered.excludedSites.length && sitesToExclude.every((val, index) => val === this.stateFiltered.excludedSites[index]) && onlySitesWithAdminAccess === this.stateFiltered.onlySitesWithAdminAccess && onlySitesWithAtLeastWriteAccess === this.stateFiltered.onlySitesWithAtLeastWriteAccess && siteTypesToExclude.length === this.stateFiltered.siteTypesToExclude.length && siteTypesToExclude.every((val, index) => val === this.stateFiltered.siteTypesToExclude[index]); - } - loadInitialSites(onlySitesWithAdminAccess = false, sitesToExclude = [], onlySitesWithAtLeastWriteAccess = false, siteTypesToExclude = []) { - if (this.state.isInitialized && !this.isFiltered(onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude)) { - return Promise.resolve(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.state.initialSites)); - } - // If the filtered state has already been initialized with the same sites, return that. - if (this.stateFiltered.isInitialized && this.matchesCurrentFilteredState(onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude)) { - return Promise.resolve(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.stateFiltered.initialSites)); - } - // If we want to exclude certain sites, perform the search for that. - if (this.isFiltered(onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude)) { - return this.searchSite('%', onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude).then(sites => { - this.stateFiltered.isInitialized = true; - this.stateFiltered.excludedSites = sitesToExclude; - this.stateFiltered.onlySitesWithAdminAccess = onlySitesWithAdminAccess; - this.stateFiltered.onlySitesWithAtLeastWriteAccess = onlySitesWithAtLeastWriteAccess; - this.stateFiltered.siteTypesToExclude = siteTypesToExclude; - if (sites !== null) { - this.stateFiltered.initialSites = sites; - } - return sites; - }); - } - // If the main state has already been initialized, no need to continue. - if (this.state.isInitialized) { - return Promise.resolve(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.state.initialSites)); - } - return this.searchSite('%', onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude).then(sites => { - this.state.isInitialized = true; - if (sites !== null) { - this.state.initialSites = sites; - } - return sites; - }); - } - loadSite(idSite) { - if (idSite === 'all') { - src_MatomoUrl_MatomoUrl.updateUrl(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.urlParsed.value), {}, { - module: 'MultiSites', - action: 'index', - date: src_MatomoUrl_MatomoUrl.parsed.value.date, - period: src_MatomoUrl_MatomoUrl.parsed.value.period - })); - } else { - src_MatomoUrl_MatomoUrl.updateUrl(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.urlParsed.value), {}, { - segment: '', - idSite - }), Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - segment: '', - idSite - })); - } - } - searchSite(term, onlySitesWithAdminAccess = false, sitesToExclude = [], onlySitesWithAtLeastWriteAccess = false, siteTypesToExclude = []) { - if (!term) { - return this.loadInitialSites(onlySitesWithAdminAccess, sitesToExclude, onlySitesWithAtLeastWriteAccess, siteTypesToExclude); - } - if (this.currentRequestAbort) { - this.currentRequestAbort.abort(); - } - if (!this.limitRequest) { - this.limitRequest = AjaxHelper_AjaxHelper.fetch({ - method: 'SitesManager.getNumWebsitesToDisplayPerPage' - }); - } - return this.limitRequest.then(response => { - const limit = response.value; - let permission = 'view'; - if (onlySitesWithAdminAccess) { - permission = 'admin'; - } else if (onlySitesWithAtLeastWriteAccess) { - permission = 'write'; - } - this.currentRequestAbort = new AbortController(); - return AjaxHelper_AjaxHelper.fetch({ - method: 'SitesManager.getSitesWithMinimumAccess', - permission, - limit, - pattern: term, - sitesToExclude, - siteTypesToExclude - }, { - abortController: this.currentRequestAbort, - abortable: false - }); - }).then(response => { - if (response) { - return this.processWebsitesList(response); - } - return null; - }).finally(() => { - this.currentRequestAbort = null; - }); - } - processWebsitesList(response) { - let sites = response; - if (!sites || !sites.length) { - return []; - } - sites = sites.map(s => Object.assign(Object.assign({}, s), {}, { - name: s.group ? `[${s.group}] ${s.name}` : s.name - })); - sites.sort((lhs, rhs) => { - if (lhs.name.toLowerCase() < rhs.name.toLowerCase()) { - return -1; - } - return lhs.name.toLowerCase() > rhs.name.toLowerCase() ? 1 : 0; - }); - return sites; - } -} -/* harmony default export */ var SiteSelector_SitesStore = (new SitesStore_SitesStore()); -// 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/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=20ed25a7 - -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_1 = ["value", "name"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_2 = ["title"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_3 = ["textContent"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_4 = { - key: 1, - class: "placeholder" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_5 = { - class: "dropdown" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_6 = { - class: "custom_select_search" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_7 = ["placeholder"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_8 = { - key: 0 -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_9 = { - class: "custom_select_container" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_10 = ["onClick"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_11 = ["innerHTML", "href", "title"]; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_12 = { - class: "custom_select_ul_list" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_13 = { - class: "noresult" -}; -const SiteSelectorvue_type_template_id_20ed25a7_hoisted_14 = { - key: 1 -}; -function SiteSelectorvue_type_template_id_20ed25a7_render(_ctx, _cache, $props, $setup, $data, $options) { - var _ctx$displayedModelVa, _ctx$displayedModelVa2, _ctx$displayedModelVa3, _ctx$displayedModelVa4; - const _component_AllSitesLink = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("AllSitesLink"); - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - const _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if"); - const _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here"); - return 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"])("div", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["siteSelector piwikSelector borderedControl", { - 'expanded': _ctx.showSitesList, - 'disabled': !_ctx.hasMultipleSites - }]) - }, [_ctx.name ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("input", { - key: 0, - type: "hidden", - value: (_ctx$displayedModelVa = _ctx.displayedModelValue) === null || _ctx$displayedModelVa === void 0 ? void 0 : _ctx$displayedModelVa.id, - name: _ctx.name - }, null, 8, SiteSelectorvue_type_template_id_20ed25a7_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - ref: "selectorLink", - onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickSelector && _ctx.onClickSelector(...args)), - onKeydown: _cache[1] || (_cache[1] = $event => _ctx.onPressEnter($event)), - href: "javascript:void(0)", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ - 'loading': _ctx.isLoading - }, "title"]), - tabindex: "4", - title: _ctx.selectorLinkTitle - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [(_ctx$displayedModelVa2 = _ctx.displayedModelValue) !== null && _ctx$displayedModelVa2 !== void 0 && _ctx$displayedModelVa2.name || !_ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(((_ctx$displayedModelVa3 = _ctx.displayedModelValue) === null || _ctx$displayedModelVa3 === void 0 ? void 0 : _ctx$displayedModelVa3.name) || _ctx.firstSiteName) - }, null, 8, SiteSelectorvue_type_template_id_20ed25a7_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$displayedModelVa4 = _ctx.displayedModelValue) !== null && _ctx$displayedModelVa4 !== void 0 && _ctx$displayedModelVa4.name) && _ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SiteSelectorvue_type_template_id_20ed25a7_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["icon icon-chevron-down", { - 'iconHidden': _ctx.isLoading, - 'collapsed': !_ctx.showSitesList - }]) - }, null, 2)], 42, SiteSelectorvue_type_template_id_20ed25a7_hoisted_2)), [[_directive_tooltips]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "text", - onClick: _cache[2] || (_cache[2] = $event => { - _ctx.searchTerm = ''; - _ctx.loadInitialSites(); - }), - "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.searchTerm = $event), - tabindex: "4", - class: "websiteSearch inp browser-default", - placeholder: _ctx.translate('General_Search') - }, null, 8, SiteSelectorvue_type_template_id_20ed25a7_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, { - focused: _ctx.shouldFocusOnSearch - }]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { - title: "Clear", - onClick: _cache[4] || (_cache[4] = $event => { - _ctx.searchTerm = ''; - _ctx.loadInitialSites(); - }), - class: "reset", - src: "plugins/CoreHome/images/reset_search.png" - }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.autocompleteMinSites <= _ctx.sites.length || _ctx.searchTerm]]), _ctx.allSitesLocation === 'top' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { - href: _ctx.urlAllSites, - "all-sites-text": _ctx.allSitesText, - onClick: _cache[5] || (_cache[5] = $event => _ctx.onAllSitesClick($event)) - }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { - class: "custom_select_ul_list", - onClick: _cache[7] || (_cache[7] = $event => _ctx.showSitesList = false) - }, [(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.sites, (site, index) => { - return 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"])("li", { - onClick: $event => _ctx.switchSite(Object.assign(Object.assign({}, site), {}, { - id: site.idsite - }), $event), - key: index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - onClick: _cache[6] || (_cache[6] = $event => $event.preventDefault()), - innerHTML: _ctx.$sanitize(_ctx.getMatchedSiteName(site.name)), - tabindex: "4", - href: _ctx.getUrlForSiteId(site.idsite), - title: site.name - }, null, 8, SiteSelectorvue_type_template_id_20ed25a7_hoisted_11)], 8, SiteSelectorvue_type_template_id_20ed25a7_hoisted_10)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(!_ctx.showSelectedSite && `${_ctx.activeSiteId}` === `${site.idsite}`)]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", SiteSelectorvue_type_template_id_20ed25a7_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_NotFound') + ' ' + _ctx.searchTerm), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.sites.length && _ctx.searchTerm]])])), [[_directive_tooltips, { - content: _ctx.tooltipContent - }]]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_20ed25a7_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { - href: _ctx.urlAllSites, - "all-sites-text": _ctx.allSitesText, - onClick: _cache[8] || (_cache[8] = $event => _ctx.onAllSitesClick($event)) - }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showSitesList]])], 2)), [[_directive_focus_anywhere_but_here, { - blur: _ctx.onBlur - }]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=20ed25a7 - -// 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/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=template&id=77d1c93d - -const AllSitesLinkvue_type_template_id_77d1c93d_hoisted_1 = ["innerHTML", "href"]; -function AllSitesLinkvue_type_template_id_77d1c93d_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - onClick: _cache[1] || (_cache[1] = $event => this.onClick($event)), - class: "custom_select_all" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - onClick: _cache[0] || (_cache[0] = $event => $event.preventDefault()), - innerHTML: _ctx.$sanitize(_ctx.allSitesText), - tabindex: "4", - href: _ctx.href - }, null, 8, AllSitesLinkvue_type_template_id_77d1c93d_hoisted_1)]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=template&id=77d1c93d - -// 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/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=script&lang=ts - -/* harmony default export */ var AllSitesLinkvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - href: String, - allSitesText: String - }, - emits: ['click'], - methods: { - onClick(event) { - this.$emit('click', event); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/AllSitesLink.vue - - - -AllSitesLinkvue_type_script_lang_ts.render = AllSitesLinkvue_type_template_id_77d1c93d_render - -/* harmony default export */ var AllSitesLink = (AllSitesLinkvue_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/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=script&lang=ts - - - - - - - - - - -/* harmony default export */ var SiteSelectorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - modelValue: Object, - showSelectedSite: { - type: Boolean, - default: false - }, - showAllSitesItem: { - type: Boolean, - default: true - }, - switchSiteOnSelect: { - type: Boolean, - default: true - }, - onlySitesWithAdminAccess: { - type: Boolean, - default: false - }, - name: { - type: String, - default: '' - }, - allSitesText: { - type: String, - default: translate('General_MultiSitesSummary') - }, - allSitesLocation: { - type: String, - default: 'bottom' - }, - placeholder: String, - defaultToFirstSite: Boolean, - sitesToExclude: { - type: Array, - default: () => [] - }, - onlySitesWithAtLeastWriteAccess: { - type: Boolean, - default: false - }, - siteTypesToExclude: { - type: Array, - default: () => [] - } - }, - emits: ['update:modelValue', 'blur'], - components: { - AllSitesLink: AllSitesLink - }, - directives: { - FocusAnywhereButHere: FocusAnywhereButHere, - FocusIf: FocusIf, - Tooltips: Tooltips - }, - watch: { - searchTerm() { - this.onSearchTermChanged(); - } - }, - data() { - return { - searchTerm: '', - activeSiteId: `${Matomo_Matomo.idSite}`, - showSitesList: false, - isLoading: false, - sites: [], - autocompleteMinSites: parseInt(Matomo_Matomo.config.autocomplete_min_sites, 10) - }; - }, - created() { - this.searchSite = debounce(this.searchSite); - if (!this.modelValue && Matomo_Matomo.idSite) { - this.$emit('update:modelValue', { - id: Matomo_Matomo.idSite, - name: Matomo_Matomo.helper.htmlDecode(Matomo_Matomo.siteName) - }); - } - }, - mounted() { - window.initTopControls(); - this.loadInitialSites().then(() => { - if (this.shouldDefaultToFirstSite) { - this.$emit('update:modelValue', { - id: this.sites[0].idsite, - name: this.sites[0].name - }); - } - }); - const shortcutTitle = translate('CoreHome_ShortcutWebsiteSelector'); - Matomo_Matomo.helper.registerShortcut('w', shortcutTitle, event => { - if (event.altKey) { - return; - } - if (event.preventDefault) { - event.preventDefault(); - } else { - event.returnValue = false; // IE - } - const selectorLink = this.$refs.selectorLink; - if (selectorLink) { - selectorLink.click(); - selectorLink.focus(); - } - }); - }, - computed: { - shouldFocusOnSearch() { - return this.showSitesList && this.autocompleteMinSites <= this.sites.length || this.searchTerm; - }, - selectorLinkTitle() { - return this.hasMultipleSites && this.displayedModelValue ? translate('CoreHome_ChangeCurrentWebsite', this.htmlEntities(this.displayedModelValue.name)) : ''; - }, - hasMultipleSites() { - const initialSites = SiteSelector_SitesStore.matchesCurrentFilteredState(this.onlySitesWithAdminAccess, this.sitesToExclude ? this.sitesToExclude : [], this.onlySitesWithAtLeastWriteAccess, this.siteTypesToExclude ? this.siteTypesToExclude : []) && SiteSelector_SitesStore.initialSitesFiltered.value && SiteSelector_SitesStore.initialSitesFiltered.value.length ? SiteSelector_SitesStore.initialSitesFiltered.value : SiteSelector_SitesStore.initialSites.value; - return initialSites && initialSites.length > 1; - }, - firstSiteName() { - const initialSites = SiteSelector_SitesStore.initialSitesFiltered.value && SiteSelector_SitesStore.initialSitesFiltered.value.length ? SiteSelector_SitesStore.initialSitesFiltered.value : SiteSelector_SitesStore.initialSites.value; - return initialSites && initialSites.length > 0 ? initialSites[0].name : ''; - }, - urlAllSites() { - const newQuery = src_MatomoUrl_MatomoUrl.stringify(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.urlParsed.value), {}, { - module: 'MultiSites', - action: 'index', - date: src_MatomoUrl_MatomoUrl.parsed.value.date, - period: src_MatomoUrl_MatomoUrl.parsed.value.period - })); - return `?${newQuery}`; - }, - shouldDefaultToFirstSite() { - var _this$modelValue; - return !((_this$modelValue = this.modelValue) !== null && _this$modelValue !== void 0 && _this$modelValue.id) && (!this.hasMultipleSites || this.defaultToFirstSite) && this.sites[0]; - }, - // using an extra computed property in case SiteSelector is used directly - // in a vue-entry, and there is no parent component with state to respond - // to update:modelValue events - displayedModelValue() { - if (this.modelValue) { - return this.modelValue; - } - if (Matomo_Matomo.idSite) { - return { - id: Matomo_Matomo.idSite, - name: Matomo_Matomo.helper.htmlDecode(Matomo_Matomo.siteName) - }; - } - if (this.shouldDefaultToFirstSite) { - return { - id: this.sites[0].idsite, - name: this.sites[0].name - }; - } - return null; - }, - tooltipContent() { - return function tooltipContent() { - const title = $(this).attr('title') || ''; - return Matomo_Matomo.helper.htmlEntities(title); - }; - } - }, - methods: { - onSearchTermChanged() { - if (!this.searchTerm) { - this.isLoading = false; - this.loadInitialSites(); - } else { - this.isLoading = true; - this.searchSite(this.searchTerm); - } - }, - onAllSitesClick(event) { - this.switchSite({ - id: 'all', - name: this.$props.allSitesText - }, event); - this.showSitesList = false; - }, - switchSite(site, event) { - // for Mac OS cmd key needs to be pressed, ctrl key on other systems - const controlKey = navigator.userAgent.indexOf('Mac OS X') !== -1 ? event.metaKey : event.ctrlKey; - if (event && controlKey && event.target && event.target.href) { - window.open(event.target.href, '_blank'); - return; - } - this.$emit('update:modelValue', { - id: site.id, - name: site.name - }); - if (!this.switchSiteOnSelect || this.activeSiteId === site.id) { - return; - } - SiteSelector_SitesStore.loadSite(site.id); - }, - onBlur() { - this.showSitesList = false; - this.$emit('blur'); - }, - onClickSelector() { - if (this.hasMultipleSites) { - this.showSitesList = !this.showSitesList; - if (!this.isLoading && !this.searchTerm) { - this.loadInitialSites(); - } - } - }, - onPressEnter(event) { - if (event.key !== 'Enter') { - return; - } - event.preventDefault(); - this.showSitesList = !this.showSitesList; - if (this.showSitesList && !this.isLoading) { - this.loadInitialSites(); - } - }, - getMatchedSiteName(siteName) { - const index = siteName.toUpperCase().indexOf(this.searchTerm.toUpperCase()); - if (index === -1 || this.isLoading // only highlight when we know the displayed results are for a search - ) { - return this.htmlEntities(siteName); - } - const previousPart = this.htmlEntities(siteName.substring(0, index)); - const lastPart = this.htmlEntities(siteName.substring(index + this.searchTerm.length)); - return `${previousPart}${this.searchTerm}${lastPart}`; - }, - loadInitialSites() { - return SiteSelector_SitesStore.loadInitialSites(this.onlySitesWithAdminAccess, this.sitesToExclude ? this.sitesToExclude : [], this.onlySitesWithAtLeastWriteAccess, this.siteTypesToExclude ? this.siteTypesToExclude : []).then(sites => { - this.sites = sites || []; - }); - }, - searchSite(term) { - this.isLoading = true; - SiteSelector_SitesStore.searchSite(term, this.onlySitesWithAdminAccess, this.sitesToExclude ? this.sitesToExclude : [], this.onlySitesWithAtLeastWriteAccess, this.siteTypesToExclude ? this.siteTypesToExclude : []).then(sites => { - if (term !== this.searchTerm) { - return; // search term changed in the meantime - } - if (sites) { - this.sites = sites; - } - }).finally(() => { - this.isLoading = false; - }); - }, - getUrlForSiteId(idSite) { - const newQuery = src_MatomoUrl_MatomoUrl.stringify(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.urlParsed.value), {}, { - segment: '', - idSite - })); - const newHash = src_MatomoUrl_MatomoUrl.stringify(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - segment: '', - idSite - })); - return `?${newQuery}#?${newHash}`; - }, - htmlEntities(v) { - return Matomo_Matomo.helper.htmlEntities(v); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue - - - -SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_20ed25a7_render - -/* harmony default export */ var SiteSelector = (SiteSelectorvue_type_script_lang_ts); -// 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/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=3ee88360 - -const QuickAccessvue_type_template_id_3ee88360_hoisted_1 = { - ref: "root", - class: "quickAccessInside" -}; -const QuickAccessvue_type_template_id_3ee88360_hoisted_2 = ["title", "placeholder"]; -const QuickAccessvue_type_template_id_3ee88360_hoisted_3 = { - class: "dropdown quickAccessDropdown" -}; -const QuickAccessvue_type_template_id_3ee88360_hoisted_4 = { - class: "no-result" -}; -const QuickAccessvue_type_template_id_3ee88360_hoisted_5 = ["onClick"]; -const QuickAccessvue_type_template_id_3ee88360_hoisted_6 = ["onMouseenter", "onClick"]; -const QuickAccessvue_type_template_id_3ee88360_hoisted_7 = { - class: "quickAccessMatomoSearch" -}; -const QuickAccessvue_type_template_id_3ee88360_hoisted_8 = ["onMouseenter", "onClick"]; -const QuickAccessvue_type_template_id_3ee88360_hoisted_9 = ["textContent"]; -const QuickAccessvue_type_template_id_3ee88360_hoisted_10 = { - class: "quick-access-category helpCategory" -}; -const QuickAccessvue_type_template_id_3ee88360_hoisted_11 = ["href"]; -function QuickAccessvue_type_template_id_3ee88360_render(_ctx, _cache, $props, $setup, $data, $options) { - const _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if"); - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - const _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here"); - return 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"])("div", QuickAccessvue_type_template_id_3ee88360_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-search", - onMouseenter: _cache[0] || (_cache[0] = $event => _ctx.searchActive = true) - }, null, 32), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - class: "quickAccessInput browser-default", - onKeydown: _cache[1] || (_cache[1] = $event => _ctx.onKeypress($event)), - onFocus: _cache[2] || (_cache[2] = $event => _ctx.searchActive = true), - "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.searchTerm = $event), - type: "text", - tabindex: "5", - title: _ctx.quickAccessTitle, - placeholder: _ctx.translate('General_Search'), - ref: "input" - }, null, 40, QuickAccessvue_type_template_id_3ee88360_hoisted_2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, { - focused: _ctx.searchActive - }], [_directive_tooltips]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", QuickAccessvue_type_template_id_3ee88360_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_3ee88360_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_SearchNoResults')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.numMenuItems > 0 || _ctx.sites.length)]]), (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.menuItems, subcategory => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { - key: subcategory.title - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: "quick-access-category", - onClick: $event => { - _ctx.searchTerm = subcategory.title; - _ctx.searchMenu(_ctx.searchTerm); - } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_3ee88360_hoisted_5), (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"])(subcategory.items, submenuEntry => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["result", { - selected: submenuEntry.menuIndex === _ctx.searchIndex - }]), - onMouseenter: $event => _ctx.searchIndex = submenuEntry.menuIndex, - onClick: $event => _ctx.selectMenuItem(submenuEntry), - key: submenuEntry.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(submenuEntry.name.trim()), 1)], 42, QuickAccessvue_type_template_id_3ee88360_hoisted_6); - }), 128))]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_3ee88360_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: "quick-access-category websiteCategory" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_Sites')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && _ctx.sites.length || _ctx.isLoading]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: "no-result" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('MultiSites_LoadingWebsites')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && _ctx.isLoading]]), (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.sites, (site, index) => { - return 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"])("li", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["result", { - selected: _ctx.numMenuItems + index === _ctx.searchIndex - }]), - onMouseenter: $event => _ctx.searchIndex = _ctx.numMenuItems + index, - onClick: $event => _ctx.selectSite(site.idsite), - key: site.idsite - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(site.name) - }, null, 8, QuickAccessvue_type_template_id_3ee88360_hoisted_9)], 42, QuickAccessvue_type_template_id_3ee88360_hoisted_8)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && !_ctx.isLoading]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_3ee88360_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_HelpResources')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ - selected: _ctx.searchIndex === 'help' - }, "quick-access-help"]), - onMouseenter: _cache[4] || (_cache[4] = $event => _ctx.searchIndex = 'help') - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - href: `https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=${encodeURIComponent(_ctx.searchTerm)}`, - target: "_blank" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SearchOnMatomo', _ctx.searchTerm)), 9, QuickAccessvue_type_template_id_3ee88360_hoisted_11)], 34)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm && _ctx.searchActive]])])), [[_directive_focus_anywhere_but_here, { - blur: _ctx.onBlur - }]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=3ee88360 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts -function ReportingPages_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -class ReportingPages_store_ReportingPagesStore { - constructor() { - ReportingPages_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - pages: [] - })); - ReportingPages_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState))); - ReportingPages_store_defineProperty(this, "fetchAllPagesPromise", void 0); - ReportingPages_store_defineProperty(this, "pages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.state.value.pages)); - } - findPageInCategory(categoryId) { - // happens when user switches between sites, in this case check if the same category exists and - // if so, select first entry from that category - return this.pages.value.find(p => p && p.category && p.category.id === categoryId && p.subcategory && p.subcategory.id); - } - findPage(categoryId, subcategoryId) { - return this.pages.value.find(p => p && p.category && p.subcategory && p.category.id === categoryId && `${p.subcategory.id}` === subcategoryId); - } - reloadAllPages() { - delete this.fetchAllPagesPromise; - return this.getAllPages(); - } - getAllPages() { - if (!this.fetchAllPagesPromise) { - this.fetchAllPagesPromise = AjaxHelper_AjaxHelper.fetch({ - method: 'API.getReportPagesMetadata', - filter_limit: '-1' - }).then(response => { - this.privateState.pages = response; - return this.pages.value; - }); - } - return this.fetchAllPagesPromise.then(() => this.pages.value); - } -} -/* harmony default export */ var ReportingPages_store = (new ReportingPages_store_ReportingPagesStore()); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Orderable.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function sortOrderables(menu) { - const result = [...(menu || [])]; - result.sort((lhs, rhs) => { - if (lhs.order < rhs.order) { - return -1; - } - if (lhs.order > rhs.order) { - return 1; - } - return 0; - }); - return result; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/Category.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function getCategoryChildren(category) { - const container = category; - if (container.subcategories) { - return container.subcategories; - } - return []; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function getSubcategoryChildren(subcategory) { - const container = subcategory; - if (container.subcategories) { - return container.subcategories; - } - return []; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts -function ReportingMenu_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - - - -function isNumeric(text) { - const n = parseFloat(text); - return !Number.isNaN(n) && Number.isFinite(n); -} -/** - * Identifier of the default reporting menu group (the main "Analytics" reporting menu). Must match - * Piwik\Category\Category::DEFAULT_GROUP on the backend. - */ -const DEFAULT_GROUP = ''; -function getCategoryGroupIds(category) { - const { - groups - } = category; - return groups && groups.length ? groups : [DEFAULT_GROUP]; -} -class ReportingMenu_store_ReportingMenuStore { - constructor() { - ReportingMenu_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - activeSubcategoryId: null, - activeSubsubcategoryId: null - })); - ReportingMenu_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState))); - ReportingMenu_store_defineProperty(this, "activeCategory", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => typeof this.state.value.activeCategoryId !== 'undefined' ? this.state.value.activeCategoryId : src_MatomoUrl_MatomoUrl.parsed.value.category)); - ReportingMenu_store_defineProperty(this, "activeSubcategory", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.state.value.activeSubcategoryId || src_MatomoUrl_MatomoUrl.parsed.value.subcategory)); - ReportingMenu_store_defineProperty(this, "activeSubsubcategory", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => { - const manuallySetId = this.state.value.activeSubsubcategoryId; - if (manuallySetId) { - return manuallySetId; - } - // default to activeSubcategory if the activeSubcategory is part of a group - const foundCategory = this.findSubcategory(this.activeCategory.value, this.activeSubcategory.value); - if (foundCategory.subsubcategory && foundCategory.subsubcategory.id === this.activeSubcategory.value) { - return foundCategory.subsubcategory.id; - } - return null; - })); - ReportingMenu_store_defineProperty(this, "menu", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.buildMenuFromPages(src_MatomoUrl_MatomoUrl.parsed.value.group || DEFAULT_GROUP))); - /** - * The full reporting menu across all top-level sections (groups), ignoring the active group - * filter. Used by quick search so users can find any reporting page regardless of the section - * they are currently in. - */ - ReportingMenu_store_defineProperty(this, "fullMenu", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.buildMenuFromPages(null))); - } - fetchMenuItems() { - return ReportingPages_store.getAllPages().then(() => this.menu.value); - } - reloadMenuItems() { - return ReportingPages_store.reloadAllPages().then(() => this.menu.value); - } - findSubcategory(categoryId, subcategoryId) { - let foundCategory = undefined; - let foundSubcategory = undefined; - let foundSubSubcategory = undefined; - this.menu.value.forEach(category => { - if (category.id !== categoryId) { - return; - } - (getCategoryChildren(category) || []).forEach(subcategory => { - if (subcategory.id === subcategoryId) { - foundCategory = category; - foundSubcategory = subcategory; - } - if (subcategory.isGroup) { - (getSubcategoryChildren(subcategory) || []).forEach(subcat => { - if (subcat.id === subcategoryId) { - foundCategory = category; - foundSubcategory = subcategory; - foundSubSubcategory = subcat; - } - }); - } - }); - }); - return { - category: foundCategory, - subcategory: foundSubcategory, - subsubcategory: foundSubSubcategory - }; - } - /** - * Builds the reporting menu from the available pages. When `activeGroup` is a string, only - * categories belonging to that top-level section ("Analytics", "AI Insights", ...) are included; - * passing `null` returns the full menu across all sections (used by quick search). - */ - buildMenuFromPages(activeGroup) { - const menu = []; - const displayedCategory = src_MatomoUrl_MatomoUrl.parsed.value.category; - const displayedSubcategory = src_MatomoUrl_MatomoUrl.parsed.value.subcategory; - const pages = ReportingPages_store.pages.value; - const categoriesHandled = {}; - pages.forEach(page => { - const category = Object.assign({}, page.category); - const categoryId = category.id; - const isCategoryDisplayed = categoryId === displayedCategory; - if (categoriesHandled[categoryId]) { - return; - } - if (activeGroup !== null && !getCategoryGroupIds(category).includes(activeGroup)) { - return; - } - categoriesHandled[categoryId] = true; - category.subcategories = []; - let categoryGroups = null; - const pagesWithCategory = pages.filter(p => p.category.id === categoryId); - pagesWithCategory.forEach(p => { - const subcategory = Object.assign({}, p.subcategory); - const isSubcategoryDisplayed = subcategory.id === displayedSubcategory && isCategoryDisplayed; - if (p.widgets && p.widgets[0] && isNumeric(p.subcategory.id)) { - // we handle a goal or something like it - if (!categoryGroups) { - categoryGroups = Object.assign({}, subcategory); - categoryGroups.name = translate('CoreHome_ChooseX', [category.name]); - categoryGroups.isGroup = true; - categoryGroups.subcategories = []; - categoryGroups.order = 10; - } - if (isSubcategoryDisplayed) { - categoryGroups.name = subcategory.name; - } - const entityId = subcategory.id; - subcategory.tooltip = `${subcategory.name} (id = ${entityId})`; - categoryGroups.subcategories.push(subcategory); - return; - } - category.subcategories.push(subcategory); - }); - if (categoryGroups && categoryGroups.subcategories && categoryGroups.subcategories.length <= 5) { - categoryGroups.subcategories.forEach(sub => category.subcategories.push(sub)); - } else if (categoryGroups) { - category.subcategories.push(categoryGroups); - } - category.subcategories = sortOrderables(getCategoryChildren(category)); - menu.push(category); - }); - return sortOrderables(menu); - } - toggleCategory(category) { - this.privateState.activeSubcategoryId = null; - this.privateState.activeSubsubcategoryId = null; - if (this.activeCategory.value === category.id) { - this.privateState.activeCategoryId = null; - return false; - } - this.privateState.activeCategoryId = category.id; - return true; - } - enterSubcategory(category, subcategory, subsubcategory) { - if (!category || !subcategory) { - return; - } - this.privateState.activeCategoryId = category.id; - this.privateState.activeSubcategoryId = subcategory.id; - if (subsubcategory) { - this.privateState.activeSubsubcategoryId = subsubcategory.id; - } - } -} -/* harmony default export */ var ReportingMenu_store = (new ReportingMenu_store_ReportingMenuStore()); -// 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/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=script&lang=ts - - - - - - - - - - - - - - -const { - ListingFormatter -} = window; -function isElementInViewport(element) { - const rect = element.getBoundingClientRect(); - const $window = window.$(window); - return rect.top >= 0 && rect.left >= 0 && rect.bottom <= $window.height() && rect.right <= $window.width(); -} -function scrollFirstElementIntoView(element) { - if (element && element.scrollIntoView) { - // make sure search is visible - element.scrollIntoView(); - } -} -/* harmony default export */ var QuickAccessvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'QuickAccess', - directives: { - FocusAnywhereButHere: FocusAnywhereButHere, - FocusIf: FocusIf, - Tooltips: Tooltips - }, - watch: { - searchActive(newValue) { - const root = this.$refs.root; - if (!root || !root.parentElement) { - return; - } - const classes = root.parentElement.classList; - classes.toggle('active', newValue); - classes.toggle('expanded', newValue); - }, - reportingGroup() { - // Switching reporting section only changes the URL hash, so this component is not - // remounted and its scraped menu cache stays pointed at the previous section. Drop it - // (re-scraped on the next search) and reset the search. - this.topMenuItems = null; - this.leftMenuItems = null; - this.segmentItems = null; - this.deactivateSearch(); - } - }, - mounted() { - const root = this.$refs.root; - // this is currently needed since vue-entry code will render a div, then vue will render a div - // within it, but the top controls and CSS expect to have certain CSS classes in the root - // element. - // same applies to above watch for searchActive() - if (root && root.parentElement) { - root.parentElement.classList.add('quick-access', 'piwikSelector'); - } - Matomo_Matomo.helper.registerShortcut('f', translate('CoreHome_ShortcutSearch'), event => { - if (event.altKey) { - return; - } - event.preventDefault(); - const mobileMenuTrigger = document.querySelector('nav .activateLeftMenu'); - if (mobileMenuTrigger && window.$(mobileMenuTrigger).is(':visible')) { - openMobileLeftMenu(); - } - scrollFirstElementIntoView(this.$refs.root); - this.activateSearch(); - }); - }, - data() { - const hasSegmentSelector = !!document.querySelector('.segmentEditorPanel'); - return { - menuItems: [], - numMenuItems: 0, - searchActive: false, - searchTerm: '', - searchIndex: 0, - menuIndexCounter: -1, - topMenuItems: null, - leftMenuItems: null, - segmentItems: null, - hasSegmentSelector, - sites: [], - isLoading: false - }; - }, - created() { - this.searchMenu = debounce(this.searchMenu.bind(this)); - }, - computed: { - reportingGroup() { - return src_MatomoUrl_MatomoUrl.parsed.value.group || DEFAULT_GROUP; - }, - hasSitesSelector() { - return !!document.querySelector('.top_controls .siteSelector,.top_controls [vue-entry="CoreHome.SiteSelector"]'); - }, - quickAccessTitle() { - const searchAreas = [translate('CoreHome_MenuEntries')]; - if (this.hasSegmentSelector) { - searchAreas.push(translate('CoreHome_Segments')); - } - if (this.hasSitesSelector) { - searchAreas.push(translate('SitesManager_Sites')); - } - return translate('CoreHome_QuickAccessTitle', ListingFormatter.formatAnd(searchAreas)); - } - }, - emits: ['itemSelected', 'blur'], - methods: { - onKeypress(event) { - const areSearchResultsDisplayed = this.searchTerm && this.searchActive; - const isTabKey = event.which === 9; - const isEscKey = event.which === 27; - if (event.which === 38) { - this.highlightPreviousItem(); - event.preventDefault(); - } else if (event.which === 40) { - this.highlightNextItem(); - event.preventDefault(); - } else if (event.which === 13) { - this.clickQuickAccessMenuItem(); - } else if (isTabKey && areSearchResultsDisplayed) { - this.deactivateSearch(); - } else if (isEscKey && areSearchResultsDisplayed) { - this.deactivateSearch(); - } else if (isTabKey) { - this.searchActive = false; - } else { - setTimeout(() => { - this.searchActive = true; - this.searchMenu(this.searchTerm); - }); - } - }, - highlightPreviousItem() { - if (this.searchIndex - 1 < 0) { - this.searchIndex = 0; - } else { - this.searchIndex -= 1; - } - this.makeSureSelectedItemIsInViewport(); - }, - highlightNextItem() { - const numTotal = this.$refs.root.querySelectorAll('li.result').length; - if (numTotal <= this.searchIndex + 1) { - this.searchIndex = numTotal - 1; - } else { - this.searchIndex += 1; - } - this.makeSureSelectedItemIsInViewport(); - }, - clickQuickAccessMenuItem() { - const selectedMenuElement = this.getCurrentlySelectedElement(); - if (selectedMenuElement) { - setTimeout(() => { - selectedMenuElement.click(); - this.$emit('itemSelected', selectedMenuElement); - }, 20); - } - }, - deactivateSearch() { - this.searchTerm = ''; - this.searchActive = false; - if (this.$refs.input) { - this.$refs.input.blur(); - } - }, - makeSureSelectedItemIsInViewport() { - const element = this.getCurrentlySelectedElement(); - if (element && !isElementInViewport(element)) { - scrollFirstElementIntoView(element); - } - }, - getCurrentlySelectedElement() { - const results = this.$refs.root.querySelectorAll('li.result'); - if (results && results.length && results.item(this.searchIndex)) { - return results.item(this.searchIndex); - } - return undefined; - }, - searchMenu(unprocessedSearchTerm) { - const searchTerm = unprocessedSearchTerm.toLowerCase(); - let index = -1; - const menuItemsIndex = {}; - const menuItems = []; - const moveToCategory = theSubmenuItem => { - // force rerender of element to prevent weird side effects - const submenuItem = Object.assign({}, theSubmenuItem); - // needed for proper highlighting with arrow keys - index += 1; - submenuItem.menuIndex = index; - const { - category - } = submenuItem; - if (!(category in menuItemsIndex)) { - menuItems.push({ - title: category, - items: [] - }); - menuItemsIndex[category] = menuItems.length - 1; - } - const indexOfCategory = menuItemsIndex[category]; - menuItems[indexOfCategory].items.push(submenuItem); - }; - this.resetSearchIndex(); - if (this.hasSitesSelector) { - this.isLoading = true; - SiteSelector_SitesStore.searchSite(searchTerm).then(sites => { - if (sites) { - this.sites = sites; - } - }).finally(() => { - this.isLoading = false; - }); - } - const menuItemMatches = i => i.name.toLowerCase().indexOf(searchTerm) !== -1 || i.category.toLowerCase().indexOf(searchTerm) !== -1; - // get the menu items on first search since this component can be mounted - // before the menus are - if (this.topMenuItems === null) { - this.topMenuItems = this.getTopMenuItems(); - } - if (this.leftMenuItems === null) { - this.leftMenuItems = this.getLeftMenuItems(); - } - if (this.segmentItems === null) { - this.segmentItems = this.getSegmentItems(); - } - const topMenuItems = this.topMenuItems.filter(menuItemMatches); - const leftMenuItems = this.leftMenuItems.filter(menuItemMatches); - const segmentItems = this.segmentItems.filter(menuItemMatches); - // Reporting pages of the other sections (e.g. "AI Insights" while in "Analytics", or vice - // versa) are not in the rendered left menu, so they are pulled from the reporting menu store - // directly. This keeps quick search spanning the whole reporting menu, not just the active - // section. Recomputed each search so it also covers pages that loaded after the first search. - const otherGroupItems = this.getReportingMenuItemsFromOtherGroups().filter(menuItemMatches); - topMenuItems.forEach(moveToCategory); - leftMenuItems.forEach(moveToCategory); - segmentItems.forEach(moveToCategory); - otherGroupItems.forEach(moveToCategory); - this.numMenuItems = topMenuItems.length + leftMenuItems.length + segmentItems.length + otherGroupItems.length; - this.menuItems = menuItems; - }, - resetSearchIndex() { - this.searchIndex = 0; - this.makeSureSelectedItemIsInViewport(); - }, - selectSite(idSite) { - this.deactivateSearch(); - closeMobileLeftMenu(); - SiteSelector_SitesStore.loadSite(idSite); - }, - selectMenuItem(submenuEntry) { - if (submenuEntry.page) { - this.navigateToReportingPage(submenuEntry.page); - return; - } - const target = document.querySelector(`[quick_access='${submenuEntry.index}']`); - if (target) { - this.deactivateSearch(); - closeMobileLeftMenu(); - const href = target.getAttribute('href'); - if (href && href.length > 10 && target && target.click) { - try { - target.click(); - } catch (e) { - window.$(target).click(); - } - } else { - // not sure why jquery is used here and above, but only sometimes. keeping for BC. - window.$(target).click(); - } - } - }, - onBlur() { - this.searchActive = false; - this.$emit('blur'); - }, - activateSearch() { - this.searchActive = true; - }, - getTopMenuItems() { - const category = translate('CoreHome_Menu'); - const topMenuItems = []; - document.querySelectorAll('nav .sidenav li > a, nav .sidenav li > div > a').forEach(element => { - var _element$textContent; - let text = (_element$textContent = element.textContent) === null || _element$textContent === void 0 ? void 0 : _element$textContent.trim(); - if (!text || element.parentElement != null && element.parentElement.tagName != null && element.parentElement.tagName === 'DIV') { - var _element$getAttribute; - text = (_element$getAttribute = element.getAttribute('title')) === null || _element$getAttribute === void 0 ? void 0 : _element$getAttribute.trim(); // possibly a icon, use title instead - } - if (text) { - topMenuItems.push({ - name: text, - index: this.menuIndexCounter += 1, - category - }); - element.setAttribute('quick_access', `${this.menuIndexCounter}`); - } - }); - return topMenuItems; - }, - getLeftMenuItems() { - const leftMenuItems = []; - document.querySelectorAll('#secondNavBar .menuTab').forEach(element => { - var _categoryElement$; - const categoryElement = window.$(element).find('> .item'); - let category = ((_categoryElement$ = categoryElement[0]) === null || _categoryElement$ === void 0 ? void 0 : _categoryElement$.innerText.trim()) || ''; - if (category && category.lastIndexOf('\n') !== -1) { - // remove "\n\nMenu" - category = category.slice(0, category.lastIndexOf('\n')).trim(); - } - window.$(element).find('li .item').each((i, subElement) => { - var _subElement$textConte; - const text = (_subElement$textConte = subElement.textContent) === null || _subElement$textConte === void 0 ? void 0 : _subElement$textConte.trim(); - if (text) { - leftMenuItems.push({ - name: text, - category, - index: this.menuIndexCounter += 1 - }); - subElement.setAttribute('quick_access', `${this.menuIndexCounter}`); - } - }); - }); - return leftMenuItems; - }, - getSegmentItems() { - if (!this.hasSegmentSelector) { - return []; - } - const category = translate('CoreHome_Segments'); - const segmentItems = []; - document.querySelectorAll('.segmentList [data-idsegment]').forEach(element => { - var _element$querySelecto; - const text = (_element$querySelecto = element.querySelector('.segname')) === null || _element$querySelecto === void 0 || (_element$querySelecto = _element$querySelecto.textContent) === null || _element$querySelecto === void 0 ? void 0 : _element$querySelecto.trim(); - if (text) { - segmentItems.push({ - name: text, - category, - index: this.menuIndexCounter += 1 - }); - element.setAttribute('quick_access', `${this.menuIndexCounter}`); - } - }); - return segmentItems; - }, - getReportingMenuItemsFromOtherGroups() { - // only relevant in the reporting area, where the reporting pages have been loaded - if (!ReportingPages_store.pages.value.length) { - return []; - } - const activeGroup = src_MatomoUrl_MatomoUrl.parsed.value.group || DEFAULT_GROUP; - const items = []; - ReportingMenu_store.fullMenu.value.forEach(category => { - const groups = getCategoryGroupIds(category); - // categories of the active section are already in the rendered left menu (scraped above) - if (groups.includes(activeGroup)) { - return; - } - const navGroup = groups[0]; - const addItem = subcategory => { - var _subcategory$name; - const name = (_subcategory$name = subcategory.name) === null || _subcategory$name === void 0 ? void 0 : _subcategory$name.trim(); - if (!name) { - return; - } - items.push({ - name, - category: category.name, - index: this.menuIndexCounter += 1, - page: { - category: category.id, - subcategory: subcategory.id, - group: navGroup - } - }); - }; - getCategoryChildren(category).forEach(subcategory => { - if (subcategory.isGroup) { - getSubcategoryChildren(subcategory).forEach(addItem); - } else { - addItem(subcategory); - } - }); - }); - return items; - }, - navigateToReportingPage(page) { - this.deactivateSearch(); - closeMobileLeftMenu(); - const { - idSite, - period, - date, - segment, - comparePeriods, - compareDates, - compareSegments - } = src_MatomoUrl_MatomoUrl.parsed.value; - const params = { - idSite, - period, - date, - segment, - comparePeriods, - compareDates, - compareSegments, - category: page.category, - subcategory: page.subcategory - }; - // switch the active reporting section so the destination page's menu is shown - if (page.group) { - params.group = page.group; - } - src_MatomoUrl_MatomoUrl.updateHash(params); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue - - - -QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_3ee88360_render - -/* harmony default export */ var QuickAccess = (QuickAccessvue_type_script_lang_ts); -// 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/CoreHome/vue/src/SearchInput/SearchInput.vue?vue&type=template&id=627c78d1 - -const SearchInputvue_type_template_id_627c78d1_hoisted_1 = { - class: "searchInputContainer" -}; -const SearchInputvue_type_template_id_627c78d1_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-search" -}, null, -1); -const SearchInputvue_type_template_id_627c78d1_hoisted_3 = ["value", "placeholder"]; -function SearchInputvue_type_template_id_627c78d1_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SearchInputvue_type_template_id_627c78d1_hoisted_1, [SearchInputvue_type_template_id_627c78d1_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ - class: "searchInputField browser-default", - type: "text", - value: _ctx.modelValue, - placeholder: _ctx.resolvedPlaceholder - }, _ctx.$attrs, { - onInput: _cache[0] || (_cache[0] = $event => _ctx.onInput($event)) - }), null, 16, SearchInputvue_type_template_id_627c78d1_hoisted_3), _ctx.showClear && _ctx.modelValue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", { - key: 0, - type: "button", - class: "searchInputClear", - onClick: _cache[1] || (_cache[1] = $event => _ctx.onClear()) - })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SearchInput/SearchInput.vue?vue&type=template&id=627c78d1 - -// 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/CoreHome/vue/src/SearchInput/SearchInput.vue?vue&type=script&lang=ts - - -/* harmony default export */ var SearchInputvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'SearchInput', - inheritAttrs: false, - props: { - modelValue: { - type: String, - required: true - }, - placeholder: { - type: String, - default: '' - }, - showClear: { - type: Boolean, - default: false - } - }, - emits: ['update:modelValue'], - computed: { - resolvedPlaceholder() { - return this.placeholder || translate('General_Search'); - } - }, - methods: { - translate: translate, - onInput(event) { - this.$emit('update:modelValue', event.target.value); - }, - onClear() { - this.$emit('update:modelValue', ''); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SearchInput/SearchInput.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SearchInput/SearchInput.vue - - - -SearchInputvue_type_script_lang_ts.render = SearchInputvue_type_template_id_627c78d1_render - -/* harmony default export */ var SearchInput = (SearchInputvue_type_script_lang_ts); -// 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/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=template&id=d3908e40 - -const FieldArrayvue_type_template_id_d3908e40_hoisted_1 = { - class: "fieldArray form-group" -}; -const FieldArrayvue_type_template_id_d3908e40_hoisted_2 = { - key: 0, - class: "fieldUiControl" -}; -const FieldArrayvue_type_template_id_d3908e40_hoisted_3 = ["onClick", "title"]; -function FieldArrayvue_type_template_id_d3908e40_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_d3908e40_hoisted_1, [(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.modelValue, (item, 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"])(["fieldArrayTable multiple valign-wrapper", { - [`fieldArrayTable${index}`]: true - }]), - key: index - }, [_ctx.field.uiControl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_d3908e40_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "full-width": true, - "model-value": item, - options: _ctx.field.availableValues, - "onUpdate:modelValue": $event => _ctx.onEntryChange($event, index), - "model-modifiers": _ctx.field.modelModifiers, - placeholder: ' ', - uicontrol: _ctx.field.uiControl, - title: _ctx.field.title, - name: `${_ctx.name}-${index}`, - id: `${_ctx.id}-${index}`, - "template-file": _ctx.field.templateFile, - component: _ctx.field.component - }, null, 8, ["model-value", "options", "onUpdate:modelValue", "model-modifiers", "uicontrol", "title", "name", "id", "template-file", "component"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - onClick: $event => _ctx.removeEntry(index), - class: "icon-minus valign", - title: _ctx.translate('General_Remove') - }, null, 8, FieldArrayvue_type_template_id_d3908e40_hoisted_3), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=template&id=d3908e40 - -// 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/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=script&lang=ts - - -// async since this is a recursive component -const Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -/* harmony default export */ var FieldArrayvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - modelValue: Array, - name: String, - id: String, - field: Object, - rows: String - }, - components: { - Field - }, - emits: ['update:modelValue'], - watch: { - modelValue(newValue) { - this.checkEmptyModelValue(newValue); - } - }, - mounted() { - this.checkEmptyModelValue(this.modelValue); - }, - methods: { - checkEmptyModelValue(newValue) { - // make sure there is always an empty new value - if ((!newValue || !newValue.length || newValue.slice(-1)[0] !== '') && (!this.rows || (this.modelValue || []).length < parseInt(this.rows, 10))) { - this.$emit('update:modelValue', [...(newValue || []), '']); - } - }, - onEntryChange(newValue, index) { - const newArrayValue = [...(this.modelValue || [])]; - newArrayValue[index] = newValue; - this.$emit('update:modelValue', newArrayValue); - }, - removeEntry(index) { - if (index > -1 && this.modelValue) { - const newValue = this.modelValue.filter((x, i) => i !== index); - this.$emit('update:modelValue', newValue); - } - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.vue - - - -FieldArrayvue_type_script_lang_ts.render = FieldArrayvue_type_template_id_d3908e40_render - -/* harmony default export */ var FieldArray = (FieldArrayvue_type_script_lang_ts); -// 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/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=template&id=31708da0 - -const MultiPairFieldvue_type_template_id_31708da0_hoisted_1 = { - class: "multiPairField form-group" -}; -const MultiPairFieldvue_type_template_id_31708da0_hoisted_2 = { - key: 1, - class: "fieldUiControl fieldUiControl2" -}; -const MultiPairFieldvue_type_template_id_31708da0_hoisted_3 = { - key: 2, - class: "fieldUiControl fieldUiControl3" -}; -const MultiPairFieldvue_type_template_id_31708da0_hoisted_4 = { - key: 3, - class: "fieldUiControl fieldUiControl4" -}; -const MultiPairFieldvue_type_template_id_31708da0_hoisted_5 = ["onClick", "title"]; -function MultiPairFieldvue_type_template_id_31708da0_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_31708da0_hoisted_1, [(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.modelValue, (item, 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"])(["multiPairFieldTable multiple valign-wrapper", { - [`multiPairFieldTable${index}`]: true, - [`has${_ctx.fieldCount}Fields`]: true - }]), - key: index - }, [_ctx.field1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: 0, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["fieldUiControl fieldUiControl1", { - hasMultiFields: _ctx.field1.type && _ctx.field2.type - }]) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "full-width": true, - "model-value": item[_ctx.field1.key], - options: _ctx.field1.availableValues, - "onUpdate:modelValue": $event => _ctx.onEntryChange(index, _ctx.field1.key, $event), - "model-modifiers": _ctx.field1.modelModifiers, - placeholder: ' ', - uicontrol: _ctx.field1.uiControl, - name: `${_ctx.name}-p1-${index}`, - id: `${_ctx.id}-p1-${index}`, - title: _ctx.field1.title, - "template-file": _ctx.field1.templateFile, - component: _ctx.field1.component - }, null, 8, ["model-value", "options", "onUpdate:modelValue", "model-modifiers", "uicontrol", "name", "id", "title", "template-file", "component"])], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field2 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_31708da0_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "full-width": true, - options: _ctx.field2.availableValues, - "onUpdate:modelValue": $event => _ctx.onEntryChange(index, _ctx.field2.key, $event), - "model-value": item[_ctx.field2.key], - "model-modifiers": _ctx.field2.modelModifiers, - placeholder: ' ', - uicontrol: _ctx.field2.uiControl, - name: `${_ctx.name}-p2-${index}`, - id: `${_ctx.id}-p2-${index}`, - title: _ctx.field2.title, - "template-file": _ctx.field2.templateFile, - component: _ctx.field2.component - }, null, 8, ["options", "onUpdate:modelValue", "model-value", "model-modifiers", "uicontrol", "name", "id", "title", "template-file", "component"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field3 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_31708da0_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "full-width": true, - options: _ctx.field3.availableValues, - "onUpdate:modelValue": $event => _ctx.onEntryChange(index, _ctx.field3.key, $event), - "model-value": item[_ctx.field3.key], - "model-modifiers": _ctx.field3.modelModifiers, - placeholder: ' ', - uicontrol: _ctx.field3.uiControl, - name: `${_ctx.name}-p3-${index}`, - id: `${_ctx.id}-p3-${index}`, - title: _ctx.field3.title, - "template-file": _ctx.field3.templateFile, - component: _ctx.field3.component - }, null, 8, ["options", "onUpdate:modelValue", "model-value", "model-modifiers", "uicontrol", "name", "id", "title", "template-file", "component"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field4 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_31708da0_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "full-width": true, - options: _ctx.field4.availableValues, - "onUpdate:modelValue": $event => _ctx.onEntryChange(index, _ctx.field4.key, $event), - "model-value": item[_ctx.field4.key], - "model-modifiers": _ctx.field4.modelModifiers, - placeholder: ' ', - uicontrol: _ctx.field4.uiControl, - name: `${_ctx.name}-p4-${index}`, - id: `${_ctx.id}-p4-${index}`, - title: _ctx.field4.title, - "template-file": _ctx.field4.templateFile, - component: _ctx.field4.component - }, null, 8, ["options", "onUpdate:modelValue", "model-value", "model-modifiers", "uicontrol", "name", "id", "title", "template-file", "component"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - onClick: $event => _ctx.removeEntry(index), - class: "icon-minus valign", - title: _ctx.translate('General_Remove') - }, null, 8, MultiPairFieldvue_type_template_id_31708da0_hoisted_5), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=template&id=31708da0 - -// 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/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=script&lang=ts - - -// async since this is a recursive component -const MultiPairFieldvue_type_script_lang_ts_Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -/* harmony default export */ var MultiPairFieldvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - modelValue: Array, - name: String, - id: String, - field1: Object, - field2: Object, - field3: Object, - field4: Object, - rows: Number - }, - components: { - Field: MultiPairFieldvue_type_script_lang_ts_Field - }, - computed: { - fieldCount() { - if (this.field1 && this.field2 && this.field3 && this.field4) { - return 4; - } - if (this.field1 && this.field2 && this.field3) { - return 3; - } - if (this.field1 && this.field2) { - return 2; - } - if (this.field1) { - return 1; - } - return 0; - } - }, - emits: ['update:modelValue'], - watch: { - modelValue(newValue) { - this.checkEmptyModelValue(newValue); - } - }, - mounted() { - this.checkEmptyModelValue(this.modelValue); - }, - methods: { - checkEmptyModelValue(newValue) { - // make sure there is always an empty new value - if ((!newValue || !newValue.length || this.isEmptyValue(newValue.slice(-1)[0])) && (!this.rows || this.modelValue.length < this.rows)) { - this.$emit('update:modelValue', [...(newValue || []), this.makeEmptyValue()]); - } - }, - onEntryChange(index, key, newValue) { - const newWholeValue = [...this.modelValue]; - newWholeValue[index] = Object.assign(Object.assign({}, newWholeValue[index]), {}, { - [key]: newValue - }); - this.$emit('update:modelValue', newWholeValue); - }, - removeEntry(index) { - if (index > -1 && this.modelValue) { - const newValue = this.modelValue.filter((x, i) => i !== index); - this.$emit('update:modelValue', newValue); - } - }, - isEmptyValue(value) { - const { - fieldCount - } = this; - if (fieldCount === 4) { - if (!value[this.field1.key] && !value[this.field2.key] && !value[this.field3.key] && !value[this.field4.key]) { - return false; - } - } else if (fieldCount === 3) { - if (!value[this.field1.key] && !value[this.field2.key] && !value[this.field3.key]) { - return false; - } - } else if (fieldCount === 2) { - if (!value[this.field1.key] && !value[this.field2.key]) { - return false; - } - } else if (fieldCount === 1) { - if (!value[this.field1.key]) { - return false; - } - } - return true; - }, - makeEmptyValue() { - const result = {}; - if (this.field1 && this.field1.key) { - result[this.field1.key] = ''; - } - if (this.field2 && this.field2.key) { - result[this.field2.key] = ''; - } - if (this.field3 && this.field3.key) { - result[this.field3.key] = ''; - } - if (this.field4 && this.field4.key) { - result[this.field4.key] = ''; - } - return result; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue - - - -MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_id_31708da0_render - -/* harmony default export */ var MultiPairField = (MultiPairFieldvue_type_script_lang_ts); -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=90748800 - -const PeriodSelectorvue_type_template_id_90748800_hoisted_1 = ["disabled"]; -const PeriodSelectorvue_type_template_id_90748800_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-chevron-left" -}, null, -1); -const PeriodSelectorvue_type_template_id_90748800_hoisted_3 = [PeriodSelectorvue_type_template_id_90748800_hoisted_2]; -const PeriodSelectorvue_type_template_id_90748800_hoisted_4 = ["title"]; -const PeriodSelectorvue_type_template_id_90748800_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon icon-calendar" -}, null, -1); -const PeriodSelectorvue_type_template_id_90748800_hoisted_6 = { - class: "flex" -}; -const PeriodSelectorvue_type_template_id_90748800_hoisted_7 = { - key: 0, - id: "ajaxLoadingCalendar" -}; -const PeriodSelectorvue_type_template_id_90748800_hoisted_8 = { - class: "loadingSegment" -}; -const PeriodSelectorvue_type_template_id_90748800_hoisted_9 = ["disabled"]; -const PeriodSelectorvue_type_template_id_90748800_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-chevron-right" -}, null, -1); -const PeriodSelectorvue_type_template_id_90748800_hoisted_11 = [PeriodSelectorvue_type_template_id_90748800_hoisted_10]; -function PeriodSelectorvue_type_template_id_90748800_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_PeriodSelectorOptionsColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodSelectorOptionsColumn"); - const _component_PeriodSelectorCalendarColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodSelectorCalendarColumn"); - const _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - const _directive_expand_on_click = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("expand-on-click"); - return 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"])("div", { - ref: "root", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["periodSelector piwikSelector", { - 'periodSelector-withPrevNext': _ctx.canShowMovePeriod - }]) - }, [_ctx.canShowMovePeriod ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", { - key: 0, - class: "move-period move-period-prev", - onClick: _cache[0] || (_cache[0] = $event => _ctx.movePeriod(-1)), - disabled: _ctx.isPeriodMoveDisabled(-1) - }, PeriodSelectorvue_type_template_id_90748800_hoisted_3, 8, PeriodSelectorvue_type_template_id_90748800_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", { - ref: "title", - id: "date", - class: "title", - tabindex: "4", - title: _ctx.translate('General_ChooseDate', _ctx.currentlyViewingText) - }, [PeriodSelectorvue_type_template_id_90748800_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.currentlyViewingText), 1)], 8, PeriodSelectorvue_type_template_id_90748800_hoisted_4)), [[_directive_tooltips]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - id: "periodMore", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["dropdown", _ctx.selectedPeriod === 'range' ? 'dual-calendar' : 'single-calendar']) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_90748800_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodSelectorOptionsColumn, { - "ui-selected-period": _ctx.selectedPeriod, - "periods-filtered": _ctx.periodsFiltered, - "applied-period": _ctx.committedPeriod, - "active-preset-id": _ctx.activePresetId, - "min-allowed-date": _ctx.minAllowedDate, - "max-allowed-date": _ctx.maxAllowedDate, - "onUpdate:uiSelectedPeriod": _cache[1] || (_cache[1] = $event => _ctx.selectedPeriod = $event), - onPeriodSelect: _cache[2] || (_cache[2] = $event => _ctx.onPeriodOptionSelected($event)), - onPeriodDblclick: _cache[3] || (_cache[3] = $event => _ctx.onPeriodOptionDblClick($event)), - onPresetSelect: _cache[4] || (_cache[4] = $event => _ctx.onPresetDateRangeSelected($event)), - onPresetDblclick: _cache[5] || (_cache[5] = $event => _ctx.onPresetDateRangeDblClick($event)) - }, null, 8, ["ui-selected-period", "periods-filtered", "applied-period", "active-preset-id", "min-allowed-date", "max-allowed-date"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodSelectorCalendarColumn, { - "ui-selection": _ctx.uiSelection, - "calendar-viewport": _ctx.calendarViewport, - "display-range-start-date": _ctx.displayRangeStartDate, - "display-range-end-date": _ctx.displayRangeEndDate, - "single-calendar-period": _ctx.singleCalendarPeriod, - "single-calendar-selected-date": _ctx.singleCalendarSelectedDate, - "is-comparison-enabled": _ctx.isComparisonEnabled, - "is-comparing": _ctx.isComparing, - "compare-period-type": _ctx.comparePeriodType, - "compare-start-date": _ctx.compareStartDate, - "compare-end-date": _ctx.compareEndDate, - "compare-period-dropdown-options": _ctx.comparePeriodDropdownOptions, - "show-invalid-comparison-message": _ctx.shouldDisplayInvalidComparisonMessage(), - "is-apply-enabled": _ctx.isApplyEnabled(), - onRangeChange: _cache[6] || (_cache[6] = $event => _ctx.onRangeChange($event.start, $event.end)), - onSingleDateSelect: _cache[7] || (_cache[7] = $event => _ctx.onDatePickerSelected($event)), - onApplyClick: _cache[8] || (_cache[8] = $event => _ctx.onApplyClicked()), - onDisabledApplyInteraction: _cache[9] || (_cache[9] = $event => _ctx.onDisabledApplyInteraction()), - "onUpdate:isComparing": _cache[10] || (_cache[10] = $event => _ctx.onCompareToggleUpdated($event)), - "onUpdate:comparePeriodType": _cache[11] || (_cache[11] = $event => _ctx.onComparePeriodTypeUpdated($event)), - "onUpdate:compareStartDate": _cache[12] || (_cache[12] = $event => _ctx.onCompareStartDateUpdated($event)), - "onUpdate:compareEndDate": _cache[13] || (_cache[13] = $event => _ctx.onCompareEndDateUpdated($event)) - }, null, 8, ["ui-selection", "calendar-viewport", "display-range-start-date", "display-range-end-date", "single-calendar-period", "single-calendar-selected-date", "is-comparison-enabled", "is-comparing", "compare-period-type", "compare-start-date", "compare-end-date", "compare-period-dropdown-options", "show-invalid-comparison-message", "is-apply-enabled"])]), _ctx.isLoadingNewPage ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_90748800_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { - loading: true - }), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_90748800_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SegmentEditor_LoadingSegmentedDataMayTakeSomeTime')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2), _ctx.canShowMovePeriod ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", { - key: 1, - class: "move-period move-period-next", - onClick: _cache[14] || (_cache[14] = $event => _ctx.movePeriod(1)), - disabled: _ctx.isPeriodMoveDisabled(1) - }, PeriodSelectorvue_type_template_id_90748800_hoisted_11, 8, PeriodSelectorvue_type_template_id_90748800_hoisted_9)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2)), [[_directive_expand_on_click, { - expander: 'title', - onExpand: _ctx.onExpand, - onClosed: _ctx.onClosed - }]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=90748800 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.applyButton.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -function isApplyButtonEnabled(state) { - if (state.hasPendingNonRangePeriodChange) { - return false; - } - if (state.uiSelectionType === 'period' && state.uiSelectedPeriod !== RANGE_PERIOD && !state.isCompareDirty) { - return true; - } - if (state.uiSelectedPeriod === RANGE_PERIOD && !state.hasPendingPresetSelection && !state.isRangeValid) { - return false; - } - if (state.isComparing && state.comparePeriodType === 'custom' && !state.isCompareRangeValid) { - return false; - } - return true; -} -function getApplyButtonAction(state) { - if (state.hasPendingNonRangePeriodChange) { - return { - type: 'stop' - }; - } - if (!state.isCompareDirty) { - return state.shouldCloseSelectorWithoutApplying ? { - type: 'close' - } : { - type: 'stop' - }; - } - if (state.appliedPeriod === RANGE_PERIOD) { - if (!state.hasCommittedRangeBounds) { - return { - type: 'stop' - }; - } - const rangeDateValue = `${state.appliedRangeStartDate},${state.appliedRangeEndDate}`; - return { - type: 'commit', - date: state.rollingDateParam || rangeDateValue, - period: RANGE_PERIOD - }; - } - if (!state.formattedAppliedAnchorDate) { - return { - type: 'stop' - }; - } - return { - type: 'commit', - date: state.rollingDateParam || state.formattedAppliedAnchorDate, - period: state.appliedPeriod - }; -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.helpers.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function isKeyboardExpandEvent(event) { - return event.detail === 0; -} -function stripCompareDateParams(baseUrlParams) { - const paramsWithoutCompare = Object.assign({}, baseUrlParams); - // Intentionally keep compareSegments. Only date-period compare params are reset here. - delete paramsWithoutCompare.comparePeriods; - delete paramsWithoutCompare.comparePeriodType; - delete paramsWithoutCompare.compareDates; - return paramsWithoutCompare; -} -function shiftDateByPeriod(sourceDate, period, direction) { - const shiftedDate = new Date(sourceDate.getTime()); - switch (period) { - case 'day': - shiftedDate.setDate(shiftedDate.getDate() + direction); - break; - case 'week': - shiftedDate.setDate(shiftedDate.getDate() + direction * 7); - break; - case 'month': - shiftedDate.setMonth(shiftedDate.getMonth() + direction); - break; - case 'year': - shiftedDate.setFullYear(shiftedDate.getFullYear() + direction); - break; - default: - break; - } - return shiftedDate; -} -function clampDateToBounds(date, minDate, maxDate) { - const clampedDate = new Date(date.getTime()); - if (clampedDate < minDate) { - clampedDate.setTime(minDate.getTime()); - } - if (clampedDate > maxDate) { - clampedDate.setTime(maxDate.getTime()); - } - return clampedDate; -} -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue?vue&type=template&id=a84ec282 - -const PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_hoisted_1 = { - class: "period-type period-selector-options-column" -}; -const PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_hoisted_2 = { - id: "otherPeriods" -}; -function PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_PeriodOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodOptions"); - const _component_PresetDateRanges = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PresetDateRanges"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("b", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ChoosePeriod')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodOptions, { - "model-value": _ctx.uiSelectedPeriod, - periods: _ctx.periodsFiltered, - "checked-period-id": _ctx.uiSelectedPeriod, - "active-date-period": _ctx.appliedPeriod, - "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.$emit('update:uiSelectedPeriod', $event)), - onSelect: _cache[1] || (_cache[1] = $event => _ctx.$emit('period-select', $event)), - onDblclick: _cache[2] || (_cache[2] = $event => _ctx.$emit('period-dblclick', $event)) - }, null, 8, ["model-value", "periods", "checked-period-id", "active-date-period"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PresetDateRanges, { - "checked-preset-id": _ctx.activePresetId, - "allowed-periods": _ctx.periodsFiltered, - "min-date": _ctx.minAllowedDate, - "max-date": _ctx.maxAllowedDate, - onSelect: _cache[3] || (_cache[3] = $event => _ctx.$emit('preset-select', $event)), - onDblclick: _cache[4] || (_cache[4] = $event => _ctx.$emit('preset-dblclick', $event)) - }, null, 8, ["checked-preset-id", "allowed-periods", "min-date", "max-date"])])]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue?vue&type=template&id=a84ec282 - -// 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/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue?vue&type=template&id=0818a606 - -const PresetDateRangesvue_type_template_id_0818a606_hoisted_1 = { - class: "presetDateRanges" -}; -const PresetDateRangesvue_type_template_id_0818a606_hoisted_2 = { - key: 0, - class: "preset-date-range-group-separator" -}; -const PresetDateRangesvue_type_template_id_0818a606_hoisted_3 = ["title", "onDblclick"]; -const PresetDateRangesvue_type_template_id_0818a606_hoisted_4 = ["name", "id", "checked", "onClick", "onChange"]; -const PresetDateRangesvue_type_template_id_0818a606_hoisted_5 = { - class: "preset-option-text" -}; -function PresetDateRangesvue_type_template_id_0818a606_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PresetDateRangesvue_type_template_id_0818a606_hoisted_1, [(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.groupedPresetDateRanges, (group, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: index, - class: "preset-date-range-group" - }, [index > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PresetDateRangesvue_type_template_id_0818a606_hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (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"])(group, preset => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", { - key: preset.id - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ - 'selected-period-label': _ctx.checkedPresetId === preset.id - }), - title: _ctx.checkedPresetId === preset.id ? '' : _ctx.translate('General_DoubleClickToChangePeriod'), - onDblclick: $event => _ctx.handlePresetDoubleClick(preset.id) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "radio", - class: "preset-option-input", - name: _ctx.presetInputName, - id: `preset_date_${preset.id}`, - checked: _ctx.checkedPresetId === preset.id, - onClick: $event => _ctx.handlePresetClick(preset.id), - onChange: $event => _ctx.handlePresetSelected(preset.id) - }, null, 40, PresetDateRangesvue_type_template_id_0818a606_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", PresetDateRangesvue_type_template_id_0818a606_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(preset.labelKey)), 1)], 42, PresetDateRangesvue_type_template_id_0818a606_hoisted_3)]); - }), 128))]); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue?vue&type=template&id=0818a606 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -const PRESET_DATE_RANGE_PERIODS = { - today: 'day', - yesterday: 'day', - last7days: 'range', - last30days: 'range', - last90days: 'range', - lastWeekMonSun: 'week', - lastMonth: 'month', - lastQuarter: 'range', - lastYear: 'year', - thisWeekMonToday: 'week', - thisMonth: 'month', - thisQuarter: 'range', - thisYear: 'year' -}; -const PRESET_DATE_RANGES = [{ - id: 'today', - labelKey: 'CoreHome_PresetDateToday' -}, { - id: 'yesterday', - labelKey: 'CoreHome_PresetDateYesterday' -}, { - id: 'last7days', - labelKey: 'CoreHome_PresetDateLast7Days' -}, { - id: 'last30days', - labelKey: 'CoreHome_PresetDateLast30Days' -}, { - id: 'last90days', - labelKey: 'CoreHome_PresetDateLast90Days' -}, { - id: 'lastWeekMonSun', - labelKey: 'CoreHome_PresetDateLastWeekMonSun' -}, { - id: 'lastMonth', - labelKey: 'CoreHome_PresetDateLastMonth' -}, { - id: 'lastQuarter', - labelKey: 'CoreHome_PresetDateLastQuarter' -}, { - id: 'lastYear', - labelKey: 'CoreHome_PresetDateLastYear' -}, { - id: 'thisWeekMonToday', - labelKey: 'CoreHome_PresetDateThisWeekMonToday' -}, { - id: 'thisMonth', - labelKey: 'CoreHome_PresetDateThisMonth' -}, { - id: 'thisQuarter', - labelKey: 'CoreHome_PresetDateThisQuarter' -}, { - id: 'thisYear', - labelKey: 'CoreHome_PresetDateThisYear' -}]; -const PRESET_TOKEN_TO_ID_MAP = { - 'day|today': 'today', - 'day|yesterday': 'yesterday', - 'range|last7': 'last7days', - 'range|last30': 'last30days', - 'range|last90': 'last90days', - 'week|lastweek': 'lastWeekMonSun', - 'month|lastmonth': 'lastMonth', - 'year|lastyear': 'lastYear', - 'week|today': 'thisWeekMonToday', - 'month|today': 'thisMonth', - 'year|today': 'thisYear' -}; -const PRESET_ID_TO_URL_DATE_MAP = { - today: 'today', - yesterday: 'yesterday', - last7days: 'last7', - last30days: 'last30', - last90days: 'last90', - lastWeekMonSun: 'lastweek', - lastMonth: 'lastmonth', - lastYear: 'lastyear', - thisWeekMonToday: 'today', - thisMonth: 'today', - thisYear: 'today' -}; -function getTokenPresetIdFromPeriodAndDate(period, date) { - return PRESET_TOKEN_TO_ID_MAP[`${period}|${date}`] || null; -} -function cloneDate(date) { - return new Date(date.getTime()); -} -function addDays(date, days) { - const nextDate = cloneDate(date); - nextDate.setDate(nextDate.getDate() + days); - return nextDate; -} -function startOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth(), 1); -} -function endOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth() + 1, 0); -} -function startOfWeekMonday(date) { - const daysToMonday = (date.getDay() + 6) % 7; - return addDays(date, -daysToMonday); -} -function startOfQuarter(date) { - const month = date.getMonth(); - const quarterStartMonth = month - month % 3; - return new Date(date.getFullYear(), quarterStartMonth, 1); -} -function makeRangeDateParam(startDate, endDate) { - return `${format(startDate)},${format(endDate)}`; -} -function PresetDateRangeResolver_clampDateToBounds(date, minDate, maxDate) { - if (date < minDate) { - return new Date(minDate.getTime()); - } - if (date > maxDate) { - return new Date(maxDate.getTime()); - } - return date; -} -function resolvePresetDateRange(presetId, todayInput) { - const today = cloneDate(todayInput); - const withUrlDate = selection => Object.assign(Object.assign({}, selection), {}, { - urlDate: PRESET_ID_TO_URL_DATE_MAP[presetId] || selection.date - }); - switch (presetId) { - case 'today': - return withUrlDate({ - id: presetId, - period: 'day', - date: format(today), - selectedDate: today, - startDate: today, - endDate: today - }); - case 'yesterday': - { - const yesterday = addDays(today, -1); - return withUrlDate({ - id: presetId, - period: 'day', - date: format(yesterday), - selectedDate: yesterday, - startDate: yesterday, - endDate: yesterday - }); - } - case 'last7days': - { - const startDate = addDays(today, -6); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'last30days': - { - const startDate = addDays(today, -29); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'last90days': - { - const startDate = addDays(today, -89); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'lastWeekMonSun': - { - const thisWeekStart = startOfWeekMonday(today); - const startDate = addDays(thisWeekStart, -7); - const endDate = addDays(startDate, 6); - return withUrlDate({ - id: presetId, - period: 'week', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate - }); - } - case 'lastMonth': - { - const lastMonthDate = new Date(today.getFullYear(), today.getMonth() - 1, 1); - const startDate = startOfMonth(lastMonthDate); - const endDate = endOfMonth(lastMonthDate); - return withUrlDate({ - id: presetId, - period: 'month', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate - }); - } - case 'lastQuarter': - { - const thisQuarterStart = startOfQuarter(today); - const endDate = addDays(thisQuarterStart, -1); - const startDate = startOfQuarter(endDate); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, endDate), - selectedDate: endDate, - startDate, - endDate - }); - } - case 'lastYear': - { - const year = today.getFullYear() - 1; - const startDate = new Date(year, 0, 1); - const endDate = new Date(year, 11, 31); - return withUrlDate({ - id: presetId, - period: 'year', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate - }); - } - case 'thisWeekMonToday': - { - const startDate = startOfWeekMonday(today); - return withUrlDate({ - id: presetId, - period: 'week', - date: format(today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'thisMonth': - { - const startDate = startOfMonth(today); - return withUrlDate({ - id: presetId, - period: 'month', - date: format(today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'thisQuarter': - { - const startDate = startOfQuarter(today); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today - }); - } - case 'thisYear': - { - const startDate = new Date(today.getFullYear(), 0, 1); - return withUrlDate({ - id: presetId, - period: 'year', - date: format(today), - selectedDate: today, - startDate, - endDate: today - }); - } - default: - throw new Error(`Unknown preset date range: ${presetId}`); - } -} -function getPresetIdFromPeriodAndDate(period, date, todayInput = getToday()) { - try { - let selectedDate = null; - let selectedDateRange = null; - const matchingPreset = PRESET_DATE_RANGES.find(preset => { - const resolvedPreset = resolvePresetDateRange(preset.id, todayInput); - if (resolvedPreset.period !== period) { - return false; - } - if (resolvedPreset.date === date) { - return true; - } - if (period !== 'range') { - selectedDate = selectedDate || parseDate(date); - return datesAreInTheSamePeriod(selectedDate, resolvedPreset.selectedDate, period); - } - selectedDateRange = selectedDateRange || Periods_Periods.parse(period, date).getDateRange(); - const presetDateRange = [resolvedPreset.startDate, resolvedPreset.endDate]; - return selectedDateRange[0].getTime() === presetDateRange[0].getTime() && selectedDateRange[1].getTime() === presetDateRange[1].getTime(); - }); - return (matchingPreset === null || matchingPreset === void 0 ? void 0 : matchingPreset.id) || getTokenPresetIdFromPeriodAndDate(period, date); - } catch (_unused) { - return getTokenPresetIdFromPeriodAndDate(period, date); - } -} -// 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/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue?vue&type=script&lang=ts - - - - -const PRESET_DATE_RANGE_GROUPS = [['today', 'yesterday'], ['last7days', 'last30days', 'last90days'], ['lastWeekMonSun', 'lastMonth', 'lastQuarter', 'lastYear'], ['thisWeekMonToday', 'thisMonth', 'thisQuarter', 'thisYear']]; -let nextPresetDateRangeGroupId = 0; -/* harmony default export */ var PresetDateRangesvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - checkedPresetId: { - type: String, - default: null - }, - minDate: { - type: Date, - required: true - }, - maxDate: { - type: Date, - required: true - }, - today: { - type: Date, - default: () => getToday() - }, - allowedPeriods: { - type: Array, - required: true - } - }, - data() { - const presetInputName = `preset-date-range-${nextPresetDateRangeGroupId}`; - nextPresetDateRangeGroupId += 1; - return { - presetInputName - }; - }, - emits: ['select', 'dblclick'], - computed: { - presetDateRanges() { - return PRESET_DATE_RANGES.filter(preset => this.allowedPeriods.includes(PRESET_DATE_RANGE_PERIODS[preset.id])); - }, - groupedPresetDateRanges() { - const presetDateRangeById = new Map(this.presetDateRanges.map(preset => [preset.id, preset])); - return PRESET_DATE_RANGE_GROUPS.map(group => group.map(presetId => presetDateRangeById.get(presetId)).filter(preset => !!preset)).filter(group => group.length); - } - }, - methods: { - translate: translate, - handlePresetClick(presetId) { - if (this.checkedPresetId !== presetId) { - return; - } - this.handlePresetSelected(presetId); - }, - handlePresetSelected(presetId) { - const resolvedPreset = resolvePresetDateRange(presetId, this.today); - this.$emit('select', Object.assign(Object.assign({}, resolvedPreset), {}, { - startDate: PresetDateRangeResolver_clampDateToBounds(resolvedPreset.startDate, this.minDate, this.maxDate), - endDate: PresetDateRangeResolver_clampDateToBounds(resolvedPreset.endDate, this.minDate, this.maxDate) - })); - }, - handlePresetDoubleClick(presetId) { - const resolvedPreset = resolvePresetDateRange(presetId, this.today); - this.$emit('dblclick', Object.assign(Object.assign({}, resolvedPreset), {}, { - startDate: PresetDateRangeResolver_clampDateToBounds(resolvedPreset.startDate, this.minDate, this.maxDate), - endDate: PresetDateRangeResolver_clampDateToBounds(resolvedPreset.endDate, this.minDate, this.maxDate) - })); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue - - - -PresetDateRangesvue_type_script_lang_ts.render = PresetDateRangesvue_type_template_id_0818a606_render - -/* harmony default export */ var PresetDateRanges = (PresetDateRangesvue_type_script_lang_ts); -// 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/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue?vue&type=template&id=878f3d3a - -const PeriodOptionsvue_type_template_id_878f3d3a_hoisted_1 = ["aria-label"]; -const PeriodOptionsvue_type_template_id_878f3d3a_hoisted_2 = ["title", "onDblclick"]; -const PeriodOptionsvue_type_template_id_878f3d3a_hoisted_3 = ["name", "id", "checked", "onChange", "onKeydown"]; -const PeriodOptionsvue_type_template_id_878f3d3a_hoisted_4 = { - class: "period-option-text" -}; -function PeriodOptionsvue_type_template_id_878f3d3a_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "periodOptions", - role: "radiogroup", - "aria-label": _ctx.translate('General_ChoosePeriod') - }, [(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.displayPeriods, period => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", { - key: period - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["period-option-label", { - 'selected-period-label': _ctx.checkedPeriodId === period - }]), - title: period === _ctx.activeDatePeriod ? '' : _ctx.translate('General_DoubleClickToChangePeriod'), - onDblclick: $event => _ctx.handlePeriodDoubleClick(period) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - class: "period-option-input", - type: "radio", - name: _ctx.periodInputName, - id: `period_id_${period}`, - checked: _ctx.checkedPeriodId === period, - onChange: $event => _ctx.handlePeriodSelected(period), - onKeydown: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])($event => _ctx.handlePeriodEnter(period), ["prevent"]), ["enter"]) - }, null, 40, PeriodOptionsvue_type_template_id_878f3d3a_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", PeriodOptionsvue_type_template_id_878f3d3a_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getPeriodDisplayText(period)), 1)], 42, PeriodOptionsvue_type_template_id_878f3d3a_hoisted_2)]); - }), 128))], 8, PeriodOptionsvue_type_template_id_878f3d3a_hoisted_1); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue?vue&type=template&id=878f3d3a - -// 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/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue?vue&type=script&lang=ts - - - -let nextPeriodOptionsGroupId = 0; -/* harmony default export */ var PeriodOptionsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'PeriodOptions', - props: { - modelValue: { - type: String, - default: null - }, - periods: { - type: Array, - required: true - }, - checkedPeriodId: { - type: String, - default: null - }, - activeDatePeriod: { - type: String, - required: true - } - }, - data() { - const periodInputName = `period-${nextPeriodOptionsGroupId}`; - nextPeriodOptionsGroupId += 1; - return { - periodInputName - }; - }, - emits: ['update:modelValue', 'select', 'dblclick'], - computed: { - displayPeriods() { - if (!this.periods.includes('range')) { - return this.periods; - } - return ['range'].concat(this.periods.filter(period => period !== 'range')); - } - }, - methods: { - translate: translate, - getPeriodDisplayText(periodLabel) { - const displayText = periodLabel === 'range' ? `${translate('General_Custom')} ${translate('General_DateRangeInPeriodList')}` : Periods_Periods.get(periodLabel).getDisplayText(); - return displayText.charAt(0).toUpperCase() + displayText.slice(1); - }, - handlePeriodSelected(period) { - const payload = { - period - }; - this.$emit('update:modelValue', period); - this.$emit('select', payload); - }, - handlePeriodEnter(period) { - this.handlePeriodSelected(period); - }, - handlePeriodDoubleClick(period) { - const payload = { - period - }; - this.$emit('dblclick', payload); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue - - - -PeriodOptionsvue_type_script_lang_ts.render = PeriodOptionsvue_type_template_id_878f3d3a_render - -/* harmony default export */ var PeriodOptions = (PeriodOptionsvue_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/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue?vue&type=script&lang=ts - - - - -/* harmony default export */ var PeriodSelectorOptionsColumnvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'PeriodSelectorOptionsColumn', - components: { - PresetDateRanges: PresetDateRanges, - PeriodOptions: PeriodOptions - }, - props: { - uiSelectedPeriod: { - type: String, - required: true - }, - periodsFiltered: { - type: Array, - required: true - }, - appliedPeriod: { - type: String, - required: true - }, - activePresetId: { - type: String, - default: null - }, - minAllowedDate: { - type: Date, - required: true - }, - maxAllowedDate: { - type: Date, - required: true - } - }, - emits: ['update:uiSelectedPeriod', 'period-select', 'period-dblclick', 'preset-select', 'preset-dblclick'], - methods: { - translate: translate - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue - - - -PeriodSelectorOptionsColumnvue_type_script_lang_ts.render = PeriodSelectorOptionsColumnvue_type_template_id_a84ec282_render - -/* harmony default export */ var PeriodSelectorOptionsColumn = (PeriodSelectorOptionsColumnvue_type_script_lang_ts); -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue?vue&type=template&id=770252e1 - -const PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_1 = { - class: "period-selector-calendar-column" -}; -const PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_2 = { - class: "period-date" -}; -const PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_3 = ["disabled", "value"]; -function PeriodSelectorCalendarColumnvue_type_template_id_770252e1_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_DateRangePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DateRangePicker"); - const _component_PeriodDatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodDatePicker"); - const _component_PeriodSelectorCompareControls = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodSelectorCompareControls"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DateRangePicker, { - class: "period-range", - "start-date": _ctx.displayRangeStartDate, - "end-date": _ctx.displayRangeEndDate, - onRangeChange: _cache[0] || (_cache[0] = $event => _ctx.$emit('range-change', $event)), - onSubmit: _cache[1] || (_cache[1] = $event => _ctx.$emit('apply-click')) - }, null, 8, ["start-date", "end-date"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.calendarViewport === 'range']])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodDatePicker, { - id: "datepicker", - period: _ctx.singleCalendarPeriod, - date: _ctx.singleCalendarSelectedDate, - onSelect: _cache[2] || (_cache[2] = $event => _ctx.$emit('single-date-select', $event.date)) - }, null, 8, ["period", "date"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.calendarViewport === 'single']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodSelectorCompareControls, { - "is-comparison-enabled": _ctx.isComparisonEnabled, - "is-comparing": _ctx.isComparing, - "compare-period-type": _ctx.comparePeriodType, - "compare-start-date": _ctx.compareStartDate, - "compare-end-date": _ctx.compareEndDate, - "compare-period-dropdown-options": _ctx.comparePeriodDropdownOptions, - "show-invalid-comparison-message": _ctx.showInvalidComparisonMessage, - "onUpdate:isComparing": _cache[3] || (_cache[3] = $event => _ctx.$emit('update:isComparing', $event)), - "onUpdate:comparePeriodType": _cache[4] || (_cache[4] = $event => _ctx.$emit('update:comparePeriodType', $event)), - "onUpdate:compareStartDate": _cache[5] || (_cache[5] = $event => _ctx.$emit('update:compareStartDate', $event)), - "onUpdate:compareEndDate": _cache[6] || (_cache[6] = $event => _ctx.$emit('update:compareEndDate', $event)) - }, null, 8, ["is-comparison-enabled", "is-comparing", "compare-period-type", "compare-start-date", "compare-end-date", "compare-period-dropdown-options", "show-invalid-comparison-message"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "apply-button-container", - onMousedownCapture: _cache[8] || (_cache[8] = (...args) => _ctx.onApplyButtonInteraction && _ctx.onApplyButtonInteraction(...args)) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - type: "submit", - id: "calendarApply", - class: "btn", - onClick: _cache[7] || (_cache[7] = $event => _ctx.$emit('apply-click')), - disabled: !_ctx.isApplyEnabled, - value: _ctx.translate('General_Apply') - }, null, 8, PeriodSelectorCalendarColumnvue_type_template_id_770252e1_hoisted_3)], 32)]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue?vue&type=template&id=770252e1 - -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue?vue&type=template&id=3e1dc862 - -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_1 = { - key: 0, - class: "compare-checkbox" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_2 = { - class: "compare-checkbox-label" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_3 = ["checked"]; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_4 = { - class: "compare-checkbox-text" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_5 = { - id: "comparePeriodToDropdown" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_6 = { - key: 1, - class: "compare-date-range" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_7 = { - id: "comparePeriodStartDate" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_8 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "compare-dates-separator" -}, null, -1); -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_9 = { - id: "comparePeriodEndDate" -}; -const PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_10 = { - key: 0, - class: "compare-validation-message" -}; -function PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - 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.isComparisonEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - class: "compare-checkbox-input", - id: "comparePeriodTo", - type: "checkbox", - checked: !!_ctx.isComparing, - onChange: _cache[0] || (_cache[0] = $event => _ctx.onCompareToggle($event)) - }, null, 40, PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CompareTo')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "model-value": _ctx.comparePeriodType, - "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.$emit('update:comparePeriodType', $event)), - style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({ - 'visibility': _ctx.isComparing ? 'visible' : 'hidden' - }), - name: 'comparePeriodToDropdown', - uicontrol: 'select', - options: _ctx.comparePeriodDropdownOptions, - "full-width": true, - disabled: !_ctx.isComparing - }, null, 8, ["model-value", "style", "options", "disabled"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.isComparing && _ctx.comparePeriodType === 'custom' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "model-value": _ctx.compareStartDate, - "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.$emit('update:compareStartDate', $event)), - name: 'comparePeriodStartDate', - uicontrol: 'text', - "full-width": true, - title: _ctx.translate('CoreHome_StartDate'), - placeholder: 'YYYY-MM-DD' - }, null, 8, ["model-value", "title"])])]), PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - "model-value": _ctx.compareEndDate, - "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.$emit('update:compareEndDate', $event)), - name: 'comparePeriodEndDate', - uicontrol: 'text', - "full-width": true, - title: _ctx.translate('CoreHome_EndDate'), - placeholder: 'YYYY-MM-DD' - }, null, 8, ["model-value", "title"])])])]), _ctx.showInvalidComparisonMessage ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_InvalidComparisonDateRange')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue?vue&type=template&id=3e1dc862 - -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue?vue&type=script&lang=ts - - - -const PeriodSelectorCompareControlsvue_type_script_lang_ts_Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -/* harmony default export */ var PeriodSelectorCompareControlsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'PeriodSelectorCompareControls', - components: { - Field: PeriodSelectorCompareControlsvue_type_script_lang_ts_Field - }, - props: { - isComparisonEnabled: { - type: Boolean, - required: true - }, - isComparing: { - type: Boolean, - default: null - }, - comparePeriodType: { - type: String, - required: true - }, - compareStartDate: { - type: String, - required: true - }, - compareEndDate: { - type: String, - required: true - }, - comparePeriodDropdownOptions: { - type: Array, - required: true - }, - showInvalidComparisonMessage: { - type: Boolean, - default: false - } - }, - emits: ['update:isComparing', 'update:comparePeriodType', 'update:compareStartDate', 'update:compareEndDate'], - methods: { - translate: translate, - onCompareToggle(event) { - this.$emit('update:isComparing', event.target.checked); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue - - - -PeriodSelectorCompareControlsvue_type_script_lang_ts.render = PeriodSelectorCompareControlsvue_type_template_id_3e1dc862_render - -/* harmony default export */ var PeriodSelectorCompareControls = (PeriodSelectorCompareControlsvue_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/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue?vue&type=script&lang=ts - - - - - -/* harmony default export */ var PeriodSelectorCalendarColumnvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'PeriodSelectorCalendarColumn', - components: { - DateRangePicker: DateRangePicker, - PeriodDatePicker: PeriodDatePicker, - PeriodSelectorCompareControls: PeriodSelectorCompareControls - }, - props: { - uiSelection: { - type: Object, - required: true - }, - calendarViewport: { - type: String, - required: true - }, - displayRangeStartDate: { - type: String, - default: null - }, - displayRangeEndDate: { - type: String, - default: null - }, - singleCalendarPeriod: { - type: String, - required: true - }, - singleCalendarSelectedDate: { - type: Date, - default: null - }, - isComparisonEnabled: { - type: Boolean, - required: true - }, - isComparing: { - type: Boolean, - default: null - }, - comparePeriodType: { - type: String, - required: true - }, - compareStartDate: { - type: String, - required: true - }, - compareEndDate: { - type: String, - required: true - }, - comparePeriodDropdownOptions: { - type: Array, - required: true - }, - showInvalidComparisonMessage: { - type: Boolean, - default: false - }, - isApplyEnabled: { - type: Boolean, - required: true - } - }, - emits: ['range-change', 'single-date-select', 'apply-click', 'disabled-apply-interaction', 'update:isComparing', 'update:comparePeriodType', 'update:compareStartDate', 'update:compareEndDate'], - methods: { - translate: translate, - onApplyButtonInteraction() { - if (!this.isApplyEnabled) { - this.$emit('disabled-apply-interaction'); - } - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue - - - -PeriodSelectorCalendarColumnvue_type_script_lang_ts.render = PeriodSelectorCalendarColumnvue_type_template_id_770252e1_render - -/* harmony default export */ var PeriodSelectorCalendarColumn = (PeriodSelectorCalendarColumnvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const CONTEXT_KEY_IGNORED_PARAMS = ['date', 'period', 'comparePeriods', 'comparePeriodType', 'compareDates', 'compareSegments']; -function getSelectionKey(period, date) { - return `${period}|${date}`; -} -function getContextKeyFromParsed(parsed) { - const normalizedContext = {}; - Object.keys(parsed).filter(key => !CONTEXT_KEY_IGNORED_PARAMS.includes(key)).sort().forEach(key => { - normalizedContext[key] = parsed[key]; - }); - return JSON.stringify(normalizedContext); -} -function shouldSkipHashSync(currentSelectionKey, currentContextKey, nextHashUiSelection, lastKnownHashSelectionKey, lastKnownHashContextKey) { - return !nextHashUiSelection && currentSelectionKey === lastKnownHashSelectionKey && currentContextKey === lastKnownHashContextKey; -} -function resolveSyncedUiSelection(currentSelectionKey, currentContextKey, nextHashUiSelection, nextHashSelectionKey) { - const isExpectedHashUpdate = !!nextHashUiSelection && nextHashSelectionKey === currentSelectionKey; - const syncedUiSelection = isExpectedHashUpdate && nextHashUiSelection ? Object.assign({}, nextHashUiSelection) : null; - return { - syncedUiSelection, - lastKnownHashSelectionKey: currentSelectionKey, - lastKnownHashContextKey: currentContextKey, - nextHashUiSelection: null, - nextHashSelectionKey: null, - lastInteractionSource: null - }; -} -// 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/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=script&lang=ts - - - - - - - - - - - - - - - - -// Ownership model: -// - uiSelection tracks what currently owns Apply/focus behavior: either a period option -// or a staged preset shortcut. -// - pendingPresetSelection stores the unapplied preset payload while a preset owns the UI. -// - activePresetId is derived display state only. It may match a staged preset, or it may -// highlight a preset that happens to match the committed concrete selection. -// Keep these roles separate so calendar interactions can switch ownership back to period -// mode without losing the "this selection matches a preset" highlight. -function resolveActivePresetIdFromSelection(state) { - if (state.pendingPresetSelection) { - return state.pendingPresetSelection.id; - } - let currentDate = null; - if (state.selectedPeriod === RANGE_PERIOD) { - if (state.appliedRangeStartDate && state.appliedRangeEndDate) { - currentDate = `${state.appliedRangeStartDate},${state.appliedRangeEndDate}`; - } - } else if (state.committedAnchorDate) { - currentDate = format(state.committedAnchorDate); - } - if (!currentDate) { - return null; - } - return getPresetIdFromPeriodAndDate(state.selectedPeriod, currentDate, getToday()); -} -function syncSelectionDisplayState(state) { - state.calendarViewport = state.selectedPeriod === RANGE_PERIOD ? 'range' : 'single'; - if (isSingleCalendarPeriod(state.selectedPeriod)) { - state.singleCalendarPeriod = state.selectedPeriod; - } else if (!isSingleCalendarPeriod(state.singleCalendarPeriod)) { - state.singleCalendarPeriod = 'day'; - } - if (state.selectedPeriod === RANGE_PERIOD) { - state.singleCalendarSelectedDate = null; - return; - } - if (state.pendingPresetSelection && isSingleCalendarPeriod(state.pendingPresetSelection.period)) { - state.singleCalendarSelectedDate = state.pendingPresetSelection.selectedDate; - return; - } - state.singleCalendarSelectedDate = state.committedPeriod === state.selectedPeriod ? state.committedAnchorDate : null; -} -/* harmony default export */ var PeriodSelectorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'PeriodSelector', - props: { - periods: Array - }, - components: { - PeriodSelectorOptionsColumn: PeriodSelectorOptionsColumn, - PeriodSelectorCalendarColumn: PeriodSelectorCalendarColumn, - ActivityIndicator: ActivityIndicator - }, - directives: { - ExpandOnClick: ExpandOnClick, - Tooltips: Tooltips - }, - data() { - const selectedPeriod = src_MatomoUrl_MatomoUrl.parsed.value.period; - const initialSinglePeriod = isSingleCalendarPeriod(selectedPeriod) ? selectedPeriod : 'day'; - const siteMinAllowedDate = getSiteMinAllowedDate(); - const siteMaxAllowedDate = getSiteMaxAllowedDate(); - return { - uiSelection: { - type: 'period', - id: selectedPeriod - }, - lastInteractionSource: null, - nextHashUiSelection: null, - nextHashSelectionKey: null, - lastKnownHashSelectionKey: null, - lastKnownHashContextKey: null, - minAllowedDate: siteMinAllowedDate, - maxAllowedDate: siteMaxAllowedDate, - pendingPresetSelection: null, - committedPeriod: selectedPeriod, - committedAnchorDate: null, - selectedPeriod, - calendarViewport: selectedPeriod === RANGE_PERIOD ? 'range' : 'single', - singleCalendarPeriod: initialSinglePeriod, - singleCalendarSelectedDate: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - isRangeValid: null, - isLoadingNewPage: false, - isComparing: null, - comparePeriodType: 'previousPeriod', - compareStartDate: '', - compareEndDate: '', - compareAppliedSignature: '', - shouldShowInvalidComparisonMessage: false - }; - }, - mounted() { - Matomo_Matomo.on('hidePeriodSelector', () => { - window.$(this.$refs.root).parent('#periodString').hide(); - }); - // some widgets might hide the period selector using the event above, so ensure it's - // shown again when switching the page - Matomo_Matomo.on('matomoPageChange', () => { - window.$(this.$refs.root).parent('#periodString').show(); - }); - window.initTopControls(); // must be called when a top control changes width - this.handleZIndexPositionRelativeCompareDropdownIssue(); - }, - computed: { - activePresetId() { - return resolveActivePresetIdFromSelection(this); - }, - matomoParsed() { - return src_MatomoUrl_MatomoUrl.parsed.value; - }, - isComparingStoreValue() { - return Comparisons_store_instance.isComparingPeriods(); - }, - periodComparisonsStoreValue() { - return Comparisons_store_instance.getPeriodComparisons(); - }, - comparePeriodDropdownOptions() { - return COMPARE_PERIOD_OPTIONS; - }, - currentlyViewingText() { - let date; - if (this.committedPeriod === 'range') { - if (!this.appliedRangeStartDate || !this.appliedRangeEndDate) { - return translate('General_Error'); - } - date = `${this.appliedRangeStartDate},${this.appliedRangeEndDate}`; - } else { - if (!this.committedAnchorDate) { - return translate('General_Error'); - } - date = format(this.committedAnchorDate); - } - try { - return Periods_Periods.parse(this.committedPeriod, date).getPrettyString(); - } catch (e) { - return translate('General_Error'); - } - }, - isComparisonEnabled() { - return Comparisons_store_instance.isComparisonEnabled(); - }, - periodsFiltered() { - return (this.periods || []).filter(periodLabel => Periods_Periods.isRecognizedPeriod(periodLabel)); - }, - selectedComparisonParams() { - if (!this.isComparing) { - return {}; - } - if (this.comparePeriodType === 'custom') { - return { - comparePeriods: ['range'], - comparePeriodType: 'custom', - compareDates: [`${this.compareStartDate},${this.compareEndDate}`] - }; - } - if (this.comparePeriodType === 'previousPeriod') { - return { - comparePeriods: [this.selectedPeriod], - comparePeriodType: 'previousPeriod', - compareDates: [this.previousPeriodDateToSelectedPeriod] - }; - } - if (this.comparePeriodType === 'previousYear') { - const dateStr = this.selectedPeriod === 'range' ? `${this.appliedRangeStartDate},${this.appliedRangeEndDate}` : format(this.committedAnchorDate); - const currentDateRange = Periods_Periods.parse(this.selectedPeriod, dateStr).getDateRange(); - currentDateRange[0].setFullYear(currentDateRange[0].getFullYear() - 1); - currentDateRange[1].setFullYear(currentDateRange[1].getFullYear() - 1); - if (this.selectedPeriod === 'range') { - return { - comparePeriods: ['range'], - comparePeriodType: 'previousYear', - compareDates: [`${format(currentDateRange[0])},${format(currentDateRange[1])}`] - }; - } - return { - comparePeriods: [this.selectedPeriod], - comparePeriodType: 'previousYear', - compareDates: [format(currentDateRange[0])] - }; - } - console.warn(`Unknown compare period type: ${this.comparePeriodType}`); - return {}; - }, - previousPeriodDateToSelectedPeriod() { - if (this.selectedPeriod === 'range') { - const currentStartRange = parseDate(this.appliedRangeStartDate); - const currentEndRange = parseDate(this.appliedRangeEndDate); - const newEndDate = Range_RangePeriod.getLastNRange('day', 2, currentStartRange).startDate; - const rangeSize = Math.floor((currentEndRange.valueOf() - currentStartRange.valueOf()) / 86400000); - const newRange = Range_RangePeriod.getLastNRange('day', 1 + rangeSize, newEndDate); - return `${format(newRange.startDate)},${format(newRange.endDate)}`; - } - const newStartDate = Range_RangePeriod.getLastNRange(this.selectedPeriod, 2, this.committedAnchorDate).startDate; - return format(newStartDate); - }, - selectedDateString() { - if (this.selectedPeriod === 'range') { - const dateFrom = this.appliedRangeStartDate; - const dateTo = this.appliedRangeEndDate; - const oDateFrom = parseDate(dateFrom); - const oDateTo = parseDate(dateTo); - if (!isValidDate(oDateFrom) || !isValidDate(oDateTo) || oDateFrom > oDateTo) { - // TODO: use a notification instead? - window.$('#alert').find('h2').text(translate('General_InvalidDateRange')); - Matomo_Matomo.helper.modalConfirm('#alert', {}); - return null; - } - return `${dateFrom},${dateTo}`; - } - return format(this.committedAnchorDate); - }, - isErrorDisplayed() { - return this.currentlyViewingText === translate('General_Error'); - }, - isRangeSelection() { - return this.committedPeriod === 'range'; - }, - canShowMovePeriod() { - return !this.isRangeSelection && !this.isErrorDisplayed; - }, - compareCurrentSignature() { - return JSON.stringify({ - isComparing: !!this.isComparing, - comparePeriodType: this.comparePeriodType || '', - compareStartDate: this.compareStartDate || '', - compareEndDate: this.compareEndDate || '' - }); - }, - isCompareDirty() { - return this.compareCurrentSignature !== this.compareAppliedSignature; - }, - hasPendingNonRangePeriodChange() { - return this.uiSelection.type === 'period' && this.lastInteractionSource === 'period' && this.selectedPeriod !== RANGE_PERIOD && this.selectedPeriod !== this.committedPeriod; - }, - isRangePresetSelection() { - return this.uiSelection.type === 'preset' && this.selectedPeriod === RANGE_PERIOD; - }, - displayRangeStartDate() { - if (this.isRangePresetSelection && this.pendingPresetSelection) { - return format(this.pendingPresetSelection.startDate); - } - return this.appliedRangeStartDate; - }, - displayRangeEndDate() { - if (this.isRangePresetSelection && this.pendingPresetSelection) { - return format(this.pendingPresetSelection.endDate); - } - return this.appliedRangeEndDate; - } - }, - watch: { - isComparingStoreValue: { - immediate: true, - handler(newVal) { - this.isComparing = newVal; - } - }, - matomoParsed: { - immediate: true, - handler() { - this.updateSelectedValuesFromHash(); - } - }, - periodComparisonsStoreValue: { - immediate: true, - handler() { - this.updateComparisonValuesFromStore(); - this.compareAppliedSignature = this.compareCurrentSignature; - } - } - }, - methods: { - onExpand(event) { - if (isKeyboardExpandEvent(event)) { - const root = this.$refs.root; - const selector = this.uiSelection.type === 'preset' ? `#preset_date_${this.uiSelection.id}` : `#period_id_${this.uiSelection.id}`; - const focusTarget = root.querySelector(selector) || root.querySelector('#preset_date_today'); - if (focusTarget instanceof HTMLElement) { - focusTarget.focus(); - } - } - }, - onClosed(event) { - if (isKeyboardExpandEvent(event)) { - window.$(this.$refs.title).focus(); - } - }, - handleZIndexPositionRelativeCompareDropdownIssue() { - const $element = window.$(this.$refs.root); - $element.on('focus', '#comparePeriodToDropdown .select-dropdown', () => { - $element.addClass('compare-dropdown-open'); - }).on('blur', '#comparePeriodToDropdown .select-dropdown', () => { - $element.removeClass('compare-dropdown-open'); - }); - }, - setUiSelection(selection, source) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - setPendingPeriodAndDate(period, date) { - this.committedPeriod = period; - this.selectedPeriod = period; - this.committedAnchorDate = date; - this.setRangeStartEndFromPeriod(period, format(date)); - syncSelectionDisplayState(this); - }, - setPiwikPeriodAndDate(period, date) { - this.setPendingPeriodAndDate(period, date); - this.setUiSelection({ - type: 'period', - id: period - }, 'period'); - const currentDateString = format(date); - this.clearPresetSelection(); - this.commitSelectionToUrl(currentDateString, this.selectedPeriod); - }, - commitSelectionToUrl(date, period) { - this.nextHashUiSelection = Object.assign({}, this.uiSelection); - this.nextHashSelectionKey = getSelectionKey(period, date); - this.compareAppliedSignature = this.compareCurrentSignature; - this.propagateNewUrlParams(date, period); - window.initTopControls(); - }, - onPeriodOptionSelected(payload) { - this.setUiSelection({ - type: 'period', - id: payload.period - }, 'period'); - this.selectedPeriod = payload.period; - // Selecting a period option exits preset ownership and discards any unapplied preset staging. - // After this point, Apply commits period-owned state only. - this.clearPresetSelection(); - syncSelectionDisplayState(this); - if (payload.period === RANGE_PERIOD) { - this.isRangeValid = true; - } - }, - onPeriodOptionDblClick(payload) { - this.onPeriodOptionSelected(payload); - if (this.hasInvalidCustomComparison()) { - this.showInvalidComparisonMessage(); - return; - } - if (payload.period === RANGE_PERIOD || payload.period === this.committedPeriod || !this.committedAnchorDate) { - return; - } - this.setPiwikPeriodAndDate(payload.period, this.committedAnchorDate); - }, - canInteractWithSingleCalendar() { - return this.calendarViewport === 'single' && this.selectedPeriod !== RANGE_PERIOD; - }, - onDatePickerSelected(date) { - if (!this.canInteractWithSingleCalendar()) { - return; - } - this.setUiSelection({ - type: 'period', - id: this.selectedPeriod - }, 'calendar'); - this.setPendingPeriodAndDate(this.selectedPeriod, date); - this.clearPresetSelection(); - syncSelectionDisplayState(this); - this.commitSelectionToUrl(format(date), this.selectedPeriod); - }, - onPresetDateRangeSelected(selection) { - if (!this.periodsFiltered.includes(selection.period)) { - return; - } - this.selectedPeriod = selection.period; - this.pendingPresetSelection = selection; - this.isRangeValid = selection.period === RANGE_PERIOD ? true : this.isRangeValid; - this.setUiSelection({ - type: 'preset', - id: selection.id - }, 'preset'); - syncSelectionDisplayState(this); - }, - onPresetDateRangeDblClick(selection) { - this.onPresetDateRangeSelected(selection); - if (this.hasInvalidCustomComparison()) { - this.showInvalidComparisonMessage(); - return; - } - this.onApplyClicked(); - }, - propagateNewUrlParams(date, period) { - const compareParams = this.selectedComparisonParams; - let baseParams; - if (Matomo_Matomo.helper.isReportingPage()) { - this.closePeriodSelector(); - baseParams = src_MatomoUrl_MatomoUrl.hashParsed.value; - } else { - this.isLoadingNewPage = true; - baseParams = src_MatomoUrl_MatomoUrl.parsed.value; - } - src_MatomoUrl_MatomoUrl.updateLocation(Object.assign(Object.assign({}, stripCompareDateParams(baseParams)), {}, { - date, - period - }, compareParams)); - }, - hasPendingPresetSelectionOwnedByUi() { - return !!this.pendingPresetSelection && this.uiSelection.type === 'preset' && this.pendingPresetSelection.id === this.uiSelection.id; - }, - shouldCloseSelectorWithoutApplying() { - return this.selectedPeriod !== RANGE_PERIOD && !this.hasPendingNonRangePeriodChange; - }, - hasCommittedRangeBounds() { - return !!this.appliedRangeStartDate && !!this.appliedRangeEndDate; - }, - applyPendingPresetSelection() { - if (!this.hasPendingPresetSelectionOwnedByUi()) { - return false; - } - const pendingPreset = this.pendingPresetSelection; - this.committedPeriod = pendingPreset.period; - this.committedAnchorDate = pendingPreset.selectedDate; - this.appliedRangeStartDate = format(pendingPreset.startDate); - this.appliedRangeEndDate = format(pendingPreset.endDate); - this.setUiSelection({ - type: 'period', - id: pendingPreset.period - }, 'preset'); - // Keep relative preset tokens in the URL (for example, "last7") so bookmarks stay rolling. - // Staged start/end dates can be clamped for current UI bounds, - // but URL semantics stay relative. - this.pendingPresetSelection = null; - syncSelectionDisplayState(this); - this.commitSelectionToUrl(pendingPreset.urlDate, pendingPreset.period); - return true; - }, - applyRangeSelection() { - if (this.selectedPeriod !== RANGE_PERIOD) { - return false; - } - const dateString = this.selectedDateString; - if (!dateString) { - return true; - } - this.committedPeriod = RANGE_PERIOD; - this.commitSelectionToUrl(this.getCurrentRollingDateParamIfOwnedByPreset() || dateString, RANGE_PERIOD); - return true; - }, - applyNonRangeOrCompareChanges() { - const action = getApplyButtonAction({ - hasPendingNonRangePeriodChange: this.hasPendingNonRangePeriodChange, - isCompareDirty: this.isCompareDirty, - shouldCloseSelectorWithoutApplying: this.shouldCloseSelectorWithoutApplying(), - appliedPeriod: this.committedPeriod, - hasCommittedRangeBounds: this.hasCommittedRangeBounds(), - rollingDateParam: this.getCurrentRollingDateParamIfOwnedByPreset(), - appliedRangeStartDate: this.appliedRangeStartDate, - appliedRangeEndDate: this.appliedRangeEndDate, - formattedAppliedAnchorDate: this.committedAnchorDate ? format(this.committedAnchorDate) : null - }); - if (action.type === 'stop') { - return; - } - if (action.type === 'close') { - this.closePeriodSelector(); - return; - } - this.commitSelectionToUrl(action.date, action.period); - }, - // Non-range period mode keeps the concrete selected date as the commit target. - // Reopening the selector should let Apply close unchanged state, or commit compare-only - // edits against that existing date, without forcing another calendar click. - onApplyClicked() { - if (this.applyPendingPresetSelection()) { - return; - } - if (this.applyRangeSelection()) { - return; - } - this.applyNonRangeOrCompareChanges(); - }, - updateComparisonValuesFromStore() { - this.comparePeriodType = 'previousPeriod'; - this.compareStartDate = ''; - this.compareEndDate = ''; - // first is selected period, second is period to compare to - const comparePeriods = Comparisons_store_instance.getPeriodComparisons(); - if (comparePeriods.length < 2) { - return; - } - const comparePeriodType = src_MatomoUrl_MatomoUrl.parsed.value.comparePeriodType; - if (!COMPARE_PERIOD_TYPES.includes(comparePeriodType)) { - return; - } - this.comparePeriodType = comparePeriodType; - if (this.comparePeriodType !== 'custom' || comparePeriods[1].params.period !== 'range') { - return; - } - let periodObj; - try { - periodObj = Periods_Periods.parse(comparePeriods[1].params.period, comparePeriods[1].params.date); - } catch (_unused) { - return; - } - const [startDate, endDate] = periodObj.getDateRange(); - this.compareStartDate = format(startDate); - this.compareEndDate = format(endDate); - }, - getCurrentContextKey() { - return getContextKeyFromParsed(src_MatomoUrl_MatomoUrl.parsed.value); - }, - applyUiSelectionFromHash(period, date, syncedUiSelection) { - if (syncedUiSelection) { - if (syncedUiSelection.type === 'preset') { - this.uiSelection = syncedUiSelection; - return; - } - const presetId = getTokenPresetIdFromPeriodAndDate(period, date); - if (presetId && this.periodsFiltered.includes(period)) { - this.uiSelection = { - type: 'preset', - id: presetId - }; - return; - } - this.uiSelection = syncedUiSelection; - return; - } - const presetId = getTokenPresetIdFromPeriodAndDate(period, date); - if (presetId && this.periodsFiltered.includes(period)) { - this.uiSelection = { - type: 'preset', - id: presetId - }; - this.pendingPresetSelection = null; - return; - } - this.setUiSelection({ - type: 'period', - id: period - }, null); - this.clearPresetSelection(); - }, - getCurrentRollingDateParamIfOwnedByPreset() { - if (this.uiSelection.type !== 'preset') { - return null; - } - const parsedPeriod = src_MatomoUrl_MatomoUrl.parsed.value.period || ''; - const parsedDate = src_MatomoUrl_MatomoUrl.parsed.value.date || ''; - if (parsedPeriod !== this.committedPeriod || !parsedDate) { - return null; - } - const presetId = getTokenPresetIdFromPeriodAndDate(parsedPeriod, parsedDate); - if (presetId !== this.uiSelection.id) { - return null; - } - return parsedDate; - }, - resetSelectedDateValues() { - this.committedAnchorDate = null; - this.appliedRangeStartDate = null; - this.appliedRangeEndDate = null; - }, - applyDateValuesFromHash(period, date) { - if (period === RANGE_PERIOD) { - const periodObj = Periods_Periods.get(period).parse(date); - const [startDate, endDate] = periodObj.getDateRange(); - this.committedAnchorDate = startDate; - this.appliedRangeStartDate = format(startDate); - this.appliedRangeEndDate = format(endDate); - return; - } - this.committedAnchorDate = parseDate(date); - this.setRangeStartEndFromPeriod(period, date); - if (isSingleCalendarPeriod(period)) { - this.singleCalendarPeriod = period; - } - this.singleCalendarSelectedDate = this.committedAnchorDate; - }, - updateSelectedValuesFromHash() { - const date = src_MatomoUrl_MatomoUrl.parsed.value.date || ''; - const period = src_MatomoUrl_MatomoUrl.parsed.value.period || ''; - const currentSelectionKey = getSelectionKey(period, date); - const currentContextKey = this.getCurrentContextKey(); - if (shouldSkipHashSync(currentSelectionKey, currentContextKey, this.nextHashUiSelection, this.lastKnownHashSelectionKey, this.lastKnownHashContextKey)) { - return; - } - const hashSyncState = resolveSyncedUiSelection(currentSelectionKey, currentContextKey, this.nextHashUiSelection, this.nextHashSelectionKey); - this.nextHashUiSelection = hashSyncState.nextHashUiSelection; - this.nextHashSelectionKey = hashSyncState.nextHashSelectionKey; - this.lastInteractionSource = hashSyncState.lastInteractionSource; - this.lastKnownHashSelectionKey = hashSyncState.lastKnownHashSelectionKey; - this.lastKnownHashContextKey = hashSyncState.lastKnownHashContextKey; - this.applyUiSelectionFromHash(period, date, hashSyncState.syncedUiSelection); - this.committedPeriod = period; - this.selectedPeriod = period; - this.resetSelectedDateValues(); - try { - Periods_Periods.parse(period, date); - } catch (e) { - if (period === RANGE_PERIOD) { - this.isRangeValid = false; - } else { - this.isRangeValid = null; - } - return; - } - this.applyDateValuesFromHash(period, date); - this.isRangeValid = period === RANGE_PERIOD ? true : null; - this.pendingPresetSelection = null; - syncSelectionDisplayState(this); - this.compareAppliedSignature = this.compareCurrentSignature; - }, - setRangeStartEndFromPeriod(period, dateStr) { - const dateRange = Periods_Periods.parse(period, dateStr).getDateRange(); - this.appliedRangeStartDate = format(dateRange[0] < this.minAllowedDate ? this.minAllowedDate : dateRange[0]); - this.appliedRangeEndDate = format(dateRange[1] > this.maxAllowedDate ? this.maxAllowedDate : dateRange[1]); - }, - canInteractWithRangeCalendar() { - return this.calendarViewport === 'range' && this.selectedPeriod === RANGE_PERIOD; - }, - onRangeChange(start, end) { - if (!this.canInteractWithRangeCalendar()) { - return; - } - if (!start || !end) { - this.isRangeValid = false; - return; - } - this.isRangeValid = true; - this.appliedRangeStartDate = start; - this.appliedRangeEndDate = end; - this.setUiSelection({ - type: 'period', - id: RANGE_PERIOD - }, 'range'); - this.clearPresetSelection(); - }, - isApplyEnabled() { - return isApplyButtonEnabled({ - uiSelectionType: this.uiSelection.type, - uiSelectedPeriod: this.selectedPeriod, - hasPendingNonRangePeriodChange: this.hasPendingNonRangePeriodChange, - hasPendingPresetSelection: !!this.pendingPresetSelection, - isRangeValid: this.isRangeValid, - isCompareDirty: this.isCompareDirty, - isComparing: this.isComparing, - comparePeriodType: this.comparePeriodType, - isCompareRangeValid: this.isCompareRangeValid() - }); - }, - shouldDisplayInvalidComparisonMessage() { - return this.shouldShowInvalidComparisonMessage && this.hasInvalidCustomComparison(); - }, - hasInvalidCustomComparison() { - return !!this.isComparing && this.comparePeriodType === 'custom' && !this.isCompareRangeValid(); - }, - showInvalidComparisonMessage() { - if (!this.hasInvalidCustomComparison()) { - return; - } - this.shouldShowInvalidComparisonMessage = true; - }, - dismissInvalidComparisonMessage() { - this.shouldShowInvalidComparisonMessage = false; - }, - onDisabledApplyInteraction() { - this.showInvalidComparisonMessage(); - }, - onCompareToggleUpdated(value) { - this.isComparing = value; - this.dismissInvalidComparisonMessage(); - }, - onComparePeriodTypeUpdated(value) { - this.comparePeriodType = value; - this.dismissInvalidComparisonMessage(); - }, - onCompareStartDateUpdated(value) { - this.compareStartDate = value; - this.dismissInvalidComparisonMessage(); - }, - onCompareEndDateUpdated(value) { - this.compareEndDate = value; - this.dismissInvalidComparisonMessage(); - }, - closePeriodSelector() { - this.$refs.root.classList.remove('expanded'); - }, - isCompareRangeValid() { - try { - parseDate(this.compareStartDate); - } catch (e) { - return false; - } - try { - parseDate(this.compareEndDate); - } catch (e) { - return false; - } - return true; - }, - movePeriod(direction) { - if (!this.canMovePeriod(direction)) { - return; - } - const baseDate = this.committedAnchorDate || new Date(); - const shiftedDate = shiftDateByPeriod(baseDate, this.committedPeriod, direction); - const clampedDate = clampDateToBounds(shiftedDate, this.minAllowedDate, this.maxAllowedDate); - this.setPiwikPeriodAndDate(this.committedPeriod, clampedDate); - }, - isPeriodMoveDisabled(direction) { - // disable period move when date range is used or when we would go out of the min/max dates - if (this.committedAnchorDate === null) { - return this.isRangeSelection; - } - return this.isRangeSelection || !this.canMovePeriod(direction); - }, - canMovePeriod(direction) { - if (this.committedAnchorDate === null) { - return false; - } - const boundaryDate = direction === -1 ? this.minAllowedDate : this.maxAllowedDate; - return !datesAreInTheSamePeriod(this.committedAnchorDate, boundaryDate, this.committedPeriod); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue - - - -PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_90748800_render - -/* harmony default export */ var PeriodSelector = (PeriodSelectorvue_type_script_lang_ts); -// 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/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=544d8f10 - -const ReportingMenuvue_type_template_id_544d8f10_hoisted_1 = { - class: "reportingMenu" -}; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_2 = ["aria-label"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_3 = ["data-category-id"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_4 = ["onClick"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_5 = { - class: "hidden" -}; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_6 = { - key: 2, - role: "menu" -}; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_7 = ["href", "onClick", "title"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_8 = ["href", "onClick"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_9 = ["onClick"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-help" -}, null, -1); -const ReportingMenuvue_type_template_id_544d8f10_hoisted_11 = [ReportingMenuvue_type_template_id_544d8f10_hoisted_10]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_12 = { - id: "mobile-left-menu", - class: "sidenav sidenav--reporting-menu-mobile hide-on-large-only" -}; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_13 = ["data-category-id"]; -const ReportingMenuvue_type_template_id_544d8f10_hoisted_14 = { - key: 1, - class: "collapsible collapsible-accordion" -}; -const _hoisted_15 = { - class: "collapsible-header" -}; -const _hoisted_16 = { - class: "collapsible-body" -}; -const _hoisted_17 = ["onClick", "href"]; -const _hoisted_18 = ["onClick", "href"]; -function ReportingMenuvue_type_template_id_544d8f10_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_MenuItemsDropdown = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MenuItemsDropdown"); - const _directive_side_nav = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("side-nav"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingMenuvue_type_template_id_544d8f10_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { - class: "navbar hide-on-med-and-down collapsible", - role: "menu", - "aria-label": _ctx.translate('CoreHome_MainNavigation') - }, [(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.menu, category => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["menuTab", { - 'active': category.id === _ctx.activeCategory - }]), - role: "menuitem", - key: category.id, - "data-category-id": category.id - }, [category.component ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(category.component), { - key: 0, - onAction: $event => _ctx.loadCategory(category) - }, null, 40, ["onAction"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !category.component ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - class: "item", - tabindex: "5", - href: "", - onClick: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])($event => _ctx.loadCategory(category), ["prevent"]) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`menu-icon ${category.icon ? category.icon : category.subcategories && category.id === _ctx.activeCategory ? 'icon-chevron-down' : 'icon-chevron-right'}`) - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ReportingMenuvue_type_template_id_544d8f10_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_544d8f10_hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !category.component ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", ReportingMenuvue_type_template_id_544d8f10_hoisted_6, [(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"])(category.subcategories, subcategory => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - role: "menuitem", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ - 'active': (subcategory.id === _ctx.displayedSubcategory || subcategory.isGroup && _ctx.activeSubsubcategory === _ctx.displayedSubcategory) && category.id === _ctx.displayedCategory - }), - key: subcategory.id - }, [subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_MenuItemsDropdown, { - key: 0, - "show-search": true, - "menu-title": _ctx.htmlEntities(subcategory.name) - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [(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"])(subcategory.subcategories, subcat => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["item", { - active: subcat.id === _ctx.activeSubsubcategory && subcategory.id === _ctx.displayedSubcategory && category.id === _ctx.displayedCategory - }]), - tabindex: "5", - href: `#?${_ctx.makeUrl(category, subcat)}`, - onClick: $event => _ctx.loadSubcategory(category, subcat, $event), - title: subcat.tooltip, - key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_544d8f10_hoisted_7); - }), 128))]), - _: 2 - }, 1032, ["menu-title"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - href: `#?${_ctx.makeUrl(category, subcategory)}`, - class: "item", - onClick: $event => _ctx.loadSubcategory(category, subcategory, $event), - tabindex: "5" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_544d8f10_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), subcategory.help ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 2, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["item-help-icon", { - active: _ctx.helpShownCategory && _ctx.helpShownCategory.subcategory === subcategory.id && _ctx.helpShownCategory.category === category.id && subcategory.help - }]), - tabindex: "5", - href: "javascript:", - onClick: $event => _ctx.showHelp(category, subcategory, $event) - }, ReportingMenuvue_type_template_id_544d8f10_hoisted_11, 10, ReportingMenuvue_type_template_id_544d8f10_hoisted_9)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, ReportingMenuvue_type_template_id_544d8f10_hoisted_3); - }), 128))], 8, ReportingMenuvue_type_template_id_544d8f10_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_544d8f10_hoisted_12, [(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.menu, category => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - class: "no-padding", - key: category.id, - "data-category-id": category.id - }, [category.component ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(category.component), { - key: 0, - onAction: $event => _ctx.loadCategory(category) - }, null, 40, ["onAction"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !category.component ? 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"])("ul", ReportingMenuvue_type_template_id_544d8f10_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(category.icon ? category.icon : 'icon-chevron-down') - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", 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"])(category.subcategories, subcategory => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: subcategory.id - }, [subcategory.isGroup ? (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"], { - key: 0 - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(subcategory.subcategories, subcat => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - onClick: $event => _ctx.loadSubcategory(category, subcat), - href: `#?${_ctx.makeUrl(category, subcat)}`, - key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, _hoisted_17); - }), 128)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - onClick: $event => _ctx.loadSubcategory(category, subcategory), - href: `#?${_ctx.makeUrl(category, subcategory)}` - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, _hoisted_18)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); - }), 128))])])])])), [[_directive_side_nav, { - activator: _ctx.sideNavActivator - }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, ReportingMenuvue_type_template_id_544d8f10_hoisted_13); - }), 128))])]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=544d8f10 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widgets.store.ts -function Widgets_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -function getWidgetChildren(widget) { - const container = widget; - if (container.widgets) { - return container.widgets; - } - return []; -} -class Widgets_store_WidgetsStore { - constructor() { - Widgets_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - isFetchedFirstTime: false, - categorizedWidgets: {} - })); - Widgets_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => { - if (!this.privateState.isFetchedFirstTime) { - // initiating a side effect in a computed property seems wrong, but it needs to be - // executed after knowing a user's logged in and it will succeed. - this.fetchAvailableWidgets(); - } - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState); - })); - Widgets_store_defineProperty(this, "widgets", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.state.value.categorizedWidgets)); - } - fetchAvailableWidgets() { - // if there's no idSite, don't make the request since it will just fail - if (!src_MatomoUrl_MatomoUrl.parsed.value.idSite) { - return Promise.resolve(this.widgets.value); - } - this.privateState.isFetchedFirstTime = true; - return new Promise((resolve, reject) => { - try { - window.widgetsHelper.getAvailableWidgets(widgets => { - const casted = widgets; - this.privateState.categorizedWidgets = casted; - resolve(this.widgets.value); - }); - } catch (e) { - reject(e); - } - }); - } - reloadAvailableWidgets() { - // Let's also update widgetslist so will be easier to update list of available widgets in - // dashboard selector immediately - window.widgetsHelper.clearAvailableWidgets(); - const fetchPromise = this.fetchAvailableWidgets(); - fetchPromise.then(() => { - Matomo_Matomo.postEvent('WidgetsStore.reloaded'); - }); - return fetchPromise; - } -} -/* harmony default export */ var Widgets_store = (new Widgets_store_WidgetsStore()); -// 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/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=script&lang=ts - - - - - - - - - - -const ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; -/* harmony default export */ var ReportingMenuvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - components: { - MenuItemsDropdown: MenuItemsDropdown - }, - directives: { - SideNav: SideNav - }, - props: {}, - data() { - return { - showSubcategoryHelpOnLoad: null, - initialLoad: true, - helpShownCategory: null - }; - }, - computed: { - sideNavActivator() { - return document.querySelector('nav .activateLeftMenu'); - }, - menu() { - const categories = ReportingMenu_store.menu.value; - categories.forEach(category => { - if (category.widget && category.widget.indexOf('.') > 0) { - const [widgetPlugin, widgetComponent] = category.widget.split('.'); - category.component = useExternalPluginComponent(widgetPlugin, widgetComponent); - } - }); - return categories; - }, - activeCategory() { - return ReportingMenu_store.activeCategory.value; - }, - activeSubcategory() { - return ReportingMenu_store.activeSubcategory.value; - }, - activeSubsubcategory() { - return ReportingMenu_store.activeSubsubcategory.value; - }, - displayedCategory() { - return src_MatomoUrl_MatomoUrl.parsed.value.category; - }, - displayedSubcategory() { - return src_MatomoUrl_MatomoUrl.parsed.value.subcategory; - } - }, - created() { - ReportingMenu_store.fetchMenuItems().then(() => { - // load first, initial page if no subcategory is present - if (!src_MatomoUrl_MatomoUrl.parsed.value.subcategory) { - this.loadFirstPageOfActiveSection(); - } - }); - // Keep the active top-menu section highlighted in sync with the active group. The group lives - // in the URL hash (to avoid leaking into other links), so the server cannot set this active - // state; we do it here, which only runs within the reporting SPA. - this.updateTopMenuActiveState(); - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => src_MatomoUrl_MatomoUrl.parsed.value, query => { - // When no subcategory is in the URL - e.g. right after switching section via the top menu, - // which only changes the URL hash - load the active section's first page so the displayed - // report switches too, not just the menu. - if (!query.subcategory) { - this.loadFirstPageOfActiveSection(); - this.updateTopMenuActiveState(); - return; - } - const found = ReportingMenu_store.findSubcategory(query.category, query.subcategory); - ReportingMenu_store.enterSubcategory(found.category, found.subcategory, found.subsubcategory); - this.updateTopMenuActiveState(); - }); - Matomo_Matomo.on('matomoPageChange', () => { - if (!this.initialLoad) { - window.globalAjaxQueue.abort(); - } - this.helpShownCategory = null; - if (this.showSubcategoryHelpOnLoad) { - this.showHelp(this.showSubcategoryHelpOnLoad.category, this.showSubcategoryHelpOnLoad.subcategory); - this.showSubcategoryHelpOnLoad = null; - } - window.$('#loadingError,#loadingRateLimitError').hide(); - this.initialLoad = false; - }); - Matomo_Matomo.on('updateReportingMenu', () => { - ReportingMenu_store.reloadMenuItems().then(() => { - const category = src_MatomoUrl_MatomoUrl.parsed.value.category; - const subcategory = src_MatomoUrl_MatomoUrl.parsed.value.subcategory; - // we need to make sure to select same categories again - if (category && subcategory) { - const found = ReportingMenu_store.findSubcategory(category, subcategory); - if (found.category) { - ReportingMenu_store.enterSubcategory(found.category, found.subcategory, found.subsubcategory); - } - } - }); - Widgets_store.reloadAvailableWidgets(); - }); - }, - methods: { - loadFirstPageOfActiveSection() { - const menu = ReportingMenu_store.menu.value; - const categoryToLoad = menu[0]; - if (!categoryToLoad) { - return; - } - const subcategoryToLoad = categoryToLoad.subcategories[0]; - if (!subcategoryToLoad) { - return; - } - ReportingMenu_store.enterSubcategory(categoryToLoad, subcategoryToLoad); - this.propagateUrlChange(categoryToLoad, subcategoryToLoad); - }, - updateTopMenuActiveState() { - const activeGroup = src_MatomoUrl_MatomoUrl.parsed.value.group || ''; - // Top-menu entries for reporting sections carry their group as a data attribute (empty for - // the default "Analytics" section). Toggle the active state of the matching entry. - document.querySelectorAll('[data-reporting-group]').forEach(link => { - const listItem = link.closest('li'); - if (!listItem) { - return; - } - const group = link.getAttribute('data-reporting-group') || ''; - listItem.classList.toggle('active', group === activeGroup); - }); - }, - propagateUrlChange(category, subcategory) { - const queryParams = src_MatomoUrl_MatomoUrl.parsed.value; - if (queryParams.category === category.id && queryParams.subcategory === subcategory.id) { - // we need to manually trigger change as URL would not change and therefore page would not - // be reloaded - this.loadSubcategory(category, subcategory); - } else { - src_MatomoUrl_MatomoUrl.updateHash(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - category: category.id, - subcategory: subcategory.id - })); - } - }, - loadCategory(category) { - Notifications_store.remove(ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID); - const isActive = ReportingMenu_store.toggleCategory(category); - // one subcategory or a widget and some subcategories to allow to load the category - const { - subcategories - } = category; - const categoryCanLoad = subcategories && subcategories.length === 1 || category.widget && subcategories && subcategories.length; - if (isActive && categoryCanLoad) { - this.helpShownCategory = null; - const subcategory = category.subcategories[0]; - this.propagateUrlChange(category, subcategory); - } - }, - loadSubcategory(category, subcategory, event) { - if (event && (event.shiftKey || event.ctrlKey || event.metaKey)) { - return; - } - Notifications_store.remove(ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID); - if (subcategory && subcategory.id === src_MatomoUrl_MatomoUrl.parsed.value.subcategory && category.id === src_MatomoUrl_MatomoUrl.parsed.value.category) { - this.helpShownCategory = null; - // this menu item is already active, a location change success would not be triggered, - // instead trigger an event (after the URL changes) - setTimeout(() => { - Matomo_Matomo.postEvent('loadPage', category.id, subcategory.id); - }); - } - }, - makeUrl(category, subcategory) { - const { - idSite, - period, - date, - segment, - comparePeriods, - compareDates, - compareSegments, - group - } = src_MatomoUrl_MatomoUrl.parsed.value; - const params = { - idSite, - period, - date, - segment, - comparePeriods, - compareDates, - compareSegments, - category: category.id, - subcategory: subcategory.id - }; - // keep the active reporting section (e.g. "AI Insights") while navigating within it - if (group) { - params.group = group; - } - return src_MatomoUrl_MatomoUrl.stringify(params); - }, - htmlEntities(v) { - return Matomo_Matomo.helper.htmlEntities(v); - }, - showHelp(category, subcategory, event) { - const parsedUrl = src_MatomoUrl_MatomoUrl.parsed.value; - const currentCategory = parsedUrl.category; - const currentSubcategory = parsedUrl.subcategory; - if ((currentCategory !== category.id || currentSubcategory !== subcategory.id) && event) { - this.showSubcategoryHelpOnLoad = { - category, - subcategory - }; - src_MatomoUrl_MatomoUrl.updateHash(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - category: category.id, - subcategory: subcategory.id - })); - return; - } - if (this.helpShownCategory && category.id === this.helpShownCategory.category && subcategory.id === this.helpShownCategory.subcategory) { - Notifications_store.remove(ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID); - this.helpShownCategory = null; - return; - } - const prefixText = translate('CoreHome_ReportingCategoryHelpPrefix', category.name, subcategory.name); - const prefix = `${prefixText}
`; - Notifications_store.show({ - context: 'info', - id: ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID, - type: 'help', - noclear: true, - class: 'help-notification', - message: prefix + subcategory.help, - placeat: '#notificationContainer', - prepend: true - }); - this.helpShownCategory = { - category: category.id, - subcategory: subcategory.id - }; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue - - - -ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_544d8f10_render - -/* harmony default export */ var ReportingMenu = (ReportingMenuvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts -function ReportMetadata_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - -class ReportMetadata_store_ReportMetadataStore { - constructor() { - ReportMetadata_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - reports: [] - })); - ReportMetadata_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState)); - ReportMetadata_store_defineProperty(this, "reports", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.state.reports)); - ReportMetadata_store_defineProperty(this, "reportsPromise", void 0); - } - // TODO: it used to return an empty array when nothing was found, will that be an issue? - findReport(reportModule, reportAction) { - return this.reports.value.find(r => r.module === reportModule && r.action === reportAction); - } - fetchReportMetadata() { - if (!this.reportsPromise) { - this.reportsPromise = AjaxHelper_AjaxHelper.fetch({ - method: 'API.getReportMetadata', - filter_limit: '-1', - idSite: Matomo_Matomo.idSite || src_MatomoUrl_MatomoUrl.parsed.value.idSite - }).then(response => { - this.privateState.reports = response; - return response; - }); - } - return this.reportsPromise.then(() => this.reports.value); - } -} -/* harmony default export */ var ReportMetadata_store = (new ReportMetadata_store_ReportMetadataStore()); -// 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/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=24b8f926 - -const WidgetLoadervue_type_template_id_24b8f926_hoisted_1 = { - class: "widgetLoader" -}; -const WidgetLoadervue_type_template_id_24b8f926_hoisted_2 = { - key: 0 -}; -const WidgetLoadervue_type_template_id_24b8f926_hoisted_3 = { - key: 1, - class: "notification system notification-error" -}; -const WidgetLoadervue_type_template_id_24b8f926_hoisted_4 = ["href"]; -const WidgetLoadervue_type_template_id_24b8f926_hoisted_5 = { - key: 2, - class: "notification system notification-error" -}; -const WidgetLoadervue_type_template_id_24b8f926_hoisted_6 = { - class: "theWidgetContent", - ref: "widgetContent" -}; -function WidgetLoadervue_type_template_id_24b8f926_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetLoadervue_type_template_id_24b8f926_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { - "loading-message": _ctx.finalLoadingMessage, - loading: _ctx.loading - }, null, 8, ["loading-message", "loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_ctx.widgetName ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", WidgetLoadervue_type_template_id_24b8f926_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.widgetName), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.loadingFailedRateLimit ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetLoadervue_type_template_id_24b8f926_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _ctx.hasErrorFaqLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 0, - rel: "noreferrer noopener", - target: "_blank", - href: _ctx.externalRawLink('https://matomo.org/faq/troubleshooting/faq_19489/') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequestFaqLink')), 9, WidgetLoadervue_type_template_id_24b8f926_hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetLoadervue_type_template_id_24b8f926_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRateLimit')), 1))], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loadingFailed]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_24b8f926_hoisted_6, null, 512)]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=24b8f926 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SearchFiltersPersistence/SearchFiltersPersistence.store.ts -function SearchFiltersPersistence_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - -class SearchFiltersPersistence_store_SearchFiltersPersistenceStore { - constructor() { - SearchFiltersPersistence_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - module: '', - action: '', - category: '', - subcategory: '', - idSite: '', - widgetSearchFilters: {} - })); - SearchFiltersPersistence_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState))); - Matomo_Matomo.on('matomoPageChange', () => { - if (!this.isCurrentPage()) { - this.resetSearchFilters(); - } - this.updateCurrentRoutingFromUrl(); - }); - } - resetSearchFilters() { - this.privateState.widgetSearchFilters = {}; - } - getSearchFilters(widgetId) { - return this.state.value.widgetSearchFilters[widgetId] || {}; - } - setSearchFilters(widgetId, filters) { - if (widgetId) { - this.privateState.widgetSearchFilters[widgetId] = filters; - } - } - updateCurrentRoutingFromUrl() { - const url = src_MatomoUrl_MatomoUrl.parsed.value; - this.privateState.module = url.module; - this.privateState.action = url.action; - this.privateState.category = url.category; - this.privateState.subcategory = url.subcategory; - this.privateState.idSite = url.idSite; - } - isCurrentPage() { - const url = src_MatomoUrl_MatomoUrl.parsed.value; - return this.state.value.module === url.module && this.state.value.action === url.action && this.state.value.category === url.category && this.state.value.subcategory === url.subcategory && this.state.value.idSite === url.idSite; - } -} -/* harmony default export */ var SearchFiltersPersistence_store = (new SearchFiltersPersistence_store_SearchFiltersPersistenceStore()); -// 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/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=script&lang=ts - - - - - - - - - -/** - * Loads any custom widget or URL based on the given parameters. - * - * The currently active idSite, period, date and segment (if needed) is automatically - * appended to the parameters. If this widget is removed from the DOM and requests are in - * progress, these requests will be aborted. A loading message or an error message on failure - * is shown as well. It's kinda similar to ng-include but there it is not possible to - * listen to HTTP errors etc. - * - * Example: - * - */ -/* harmony default export */ var WidgetLoadervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - widgetParams: Object, - widgetName: String, - loadingMessage: String, - suppressNotifications: Boolean - }, - components: { - ActivityIndicator: ActivityIndicator - }, - data() { - return { - loading: false, - loadingFailed: false, - loadingFailedRateLimit: false, - changeCounter: 0, - lastWidgetAbortController: null - }; - }, - watch: { - widgetParams(parameters) { - if (parameters) { - this.loadWidgetUrl(parameters, this.changeCounter += 1); - } - } - }, - computed: { - finalLoadingMessage() { - if (this.loadingMessage) { - return this.loadingMessage; - } - if (!this.widgetName) { - return translate('General_LoadingData'); - } - return translate('General_LoadingPopover', this.widgetName); - }, - hasErrorFaqLink() { - const isGeneralSettingsAdminEnabled = Matomo_Matomo.config.enable_general_settings_admin; - const isPluginsAdminEnabled = Matomo_Matomo.config.enable_plugins_admin; - return Matomo_Matomo.hasSuperUserAccess && (isGeneralSettingsAdminEnabled || isPluginsAdminEnabled); - } - }, - mounted() { - if (this.widgetParams) { - this.loadWidgetUrl(this.widgetParams, this.changeCounter += 1); - } - }, - beforeUnmount() { - this.cleanupLastWidgetContent(); - }, - methods: { - abortHttpRequestIfNeeded() { - if (this.lastWidgetAbortController) { - this.lastWidgetAbortController.abort(); - this.lastWidgetAbortController = null; - } - }, - cleanupLastWidgetContent() { - const widgetContent = this.$refs.widgetContent; - Matomo_Matomo.helper.destroyVueComponent(widgetContent); - if (widgetContent) { - widgetContent.innerHTML = ''; - } - }, - getWidgetUrl(parameters) { - const urlParams = src_MatomoUrl_MatomoUrl.parsed.value; - let fullParameters = Object.assign({}, parameters || {}); - const paramsToForward = Object.keys(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - idSite: '', - period: '', - date: '', - segment: '', - widget: '' - })); - paramsToForward.forEach(key => { - if (key === 'category' || key === 'subcategory') { - return; - } - if (!(key in fullParameters)) { - fullParameters[key] = urlParams[key]; - } - }); - if (Comparisons_store_instance.isComparisonEnabled()) { - fullParameters = Object.assign(Object.assign({}, fullParameters), {}, { - comparePeriods: urlParams.comparePeriods, - compareDates: urlParams.compareDates, - compareSegments: urlParams.compareSegments - }); - } - if (!parameters || !('showtitle' in parameters)) { - fullParameters.showtitle = '1'; - } - if (Matomo_Matomo.shouldPropagateTokenAuth && urlParams.token_auth) { - if (!Matomo_Matomo.broadcast.isWidgetizeRequestWithoutSession()) { - fullParameters.force_api_session = '1'; - } - fullParameters.token_auth = urlParams.token_auth; - } - fullParameters.random = Math.floor(Math.random() * 10000); - return fullParameters; - }, - loadWidgetUrl(parameters, thisChangeId) { - this.loading = true; - this.abortHttpRequestIfNeeded(); - this.cleanupLastWidgetContent(); - this.lastWidgetAbortController = new AbortController(); - let searchFilters = {}; - if (parameters.uniqueId) { - searchFilters = SearchFiltersPersistence_store.getSearchFilters(parameters.uniqueId); - } - AjaxHelper_AjaxHelper.fetch(this.getWidgetUrl(Object.assign(parameters, searchFilters)), { - format: 'html', - abortController: this.lastWidgetAbortController - }).then(response => { - if (thisChangeId !== this.changeCounter || typeof response !== 'string') { - // another widget was requested meanwhile, ignore this response - return; - } - this.lastWidgetAbortController = null; - this.loading = false; - this.loadingFailed = false; - const widgetContent = this.$refs.widgetContent; - window.$(widgetContent).html(response); - const $content = window.$(widgetContent).children(); - if (this.widgetName) { - // we need to respect the widget title, which overwrites a possibly set report title - let $title = $content.find('> .card-content .card-title'); - if (!$title.length) { - $title = $content.find('> h2'); - } - if ($title.length) { - // required to use htmlEntities since it also escapes '{{' format items - $title.html(Matomo_Matomo.helper.htmlEntities(this.widgetName)); - } - } - Matomo_Matomo.helper.compileVueEntryComponents($content); - if (!this.suppressNotifications) { - Notifications_store.parseNotificationDivs(); - } - setTimeout(() => { - Matomo_Matomo.postEvent('widget:loaded', { - parameters, - element: $content - }); - }); - }).catch(response => { - if (thisChangeId !== this.changeCounter) { - // another widget was requested meanwhile, ignore this response - return; - } - this.lastWidgetAbortController = null; - this.cleanupLastWidgetContent(); - this.loading = false; - if (response.xhrStatus === 'abort') { - return; - } - if (response.status === 429) { - this.loadingFailedRateLimit = true; - } - this.loadingFailed = true; - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue - - - -WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_24b8f926_render - -/* harmony default export */ var WidgetLoader = (WidgetLoadervue_type_script_lang_ts); -// 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/CoreHome/vue/src/Widget/ClientWidgetRenderer.vue?vue&type=template&id=d4ca1a74 - -function ClientWidgetRenderervue_type_template_id_d4ca1a74_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); - const _component_Alert = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Alert"); - return _ctx.loading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_ActivityIndicator, { - key: 0, - loading: true, - "loading-message": _ctx.translate('General_LoadingData') - }, null, 8, ["loading-message"])) : _ctx.loadingFailed ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Alert, { - key: 1, - severity: "danger" - }, { - 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('General_ErrorRequest', '', '')), 1)]), - _: 1 - })) : _ctx.componentToRender ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(_ctx.componentToRender), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeProps"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ - key: 2 - }, _ctx.componentProps)), null, 16)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/ClientWidgetRenderer.vue?vue&type=template&id=d4ca1a74 - -// 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/CoreHome/vue/src/Widget/ClientWidgetRenderer.vue?vue&type=script&lang=ts - - - - -/* harmony default export */ var ClientWidgetRenderervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - widget: { - type: Object, - required: true - }, - widgetized: Boolean - }, - components: { - ActivityIndicator: ActivityIndicator, - Alert: Alert - }, - data() { - return { - componentToRender: null, - loading: false, - loadingFailed: false - }; - }, - watch: { - widget: { - handler() { - this.loadComponent(); - }, - immediate: true - } - }, - computed: { - componentProps() { - var _widget$clientCompone; - const widget = this.widget; - return Object.assign(Object.assign({}, ((_widget$clientCompone = widget.clientComponent) === null || _widget$clientCompone === void 0 ? void 0 : _widget$clientCompone.props) || {}), {}, { - uniqueId: widget.uniqueId, - widgetName: widget.name, - widgetized: this.widgetized, - isWidget: this.widgetized, - isWide: widget.isWide - }); - } - }, - methods: { - async loadComponent() { - const widget = this.widget; - const { - clientComponent - } = widget; - this.loading = true; - this.loadingFailed = false; - this.componentToRender = null; - try { - if (!clientComponent) { - throw new Error('Missing client-rendered widget metadata'); - } - const pluginModule = await importPluginUmd(clientComponent.plugin); - const component = pluginModule === null || pluginModule === void 0 ? void 0 : pluginModule[clientComponent.name]; - if (!component) { - throw new Error(`Unknown widget component ${clientComponent.plugin}.${clientComponent.name}`); - } - this.componentToRender = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["markRaw"])(component); - } catch (e) { - console.error(e); - this.loadingFailed = true; - } finally { - this.loading = false; - } - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/ClientWidgetRenderer.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/ClientWidgetRenderer.vue - - - -ClientWidgetRenderervue_type_script_lang_ts.render = ClientWidgetRenderervue_type_template_id_d4ca1a74_render - -/* harmony default export */ var ClientWidgetRenderer = (ClientWidgetRenderervue_type_script_lang_ts); -// 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/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=template&id=73071e47 - -const WidgetContainervue_type_template_id_73071e47_hoisted_1 = { - class: "widget-container" -}; -function WidgetContainervue_type_template_id_73071e47_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Widget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Widget"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetContainervue_type_template_id_73071e47_hoisted_1, [(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.actualContainer, (widget, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Widget, { - widget: widget, - "prevent-recursion": true - }, null, 8, ["widget"])])]); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=template&id=73071e47 - -// 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/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=script&lang=ts - - -// since we're recursing, don't import the plugin directly -const Widget = useExternalPluginComponent('CoreHome', 'Widget'); -/* harmony default export */ var WidgetContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - container: { - type: Array, - required: true - } - }, - components: { - Widget - }, - computed: { - actualContainer() { - var _container$, _widget$parameters, _widget$parameters2; - const container = this.container; - if (!(container !== null && container !== void 0 && (_container$ = container[0]) !== null && _container$ !== void 0 && _container$.parameters)) { - return container; - } - const [widget] = container; - const isWidgetized = ((_widget$parameters = widget.parameters) === null || _widget$parameters === void 0 ? void 0 : _widget$parameters.widget) === '1' || ((_widget$parameters2 = widget.parameters) === null || _widget$parameters2 === void 0 ? void 0 : _widget$parameters2.widget) === 1; - const isGraphEvolution = isWidgetized && widget.viewDataTable === 'graphEvolution'; - // we hide the first title for Visits Overview with Graph and Goal Overview - const firstWidget = isGraphEvolution ? Object.assign(Object.assign({}, widget), {}, { - parameters: Object.assign(Object.assign({}, widget.parameters), {}, { - showtitle: '0' - }) - }) : widget; - return [firstWidget, ...container.slice(1)]; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue - - - -WidgetContainervue_type_script_lang_ts.render = WidgetContainervue_type_template_id_73071e47_render - -/* harmony default export */ var WidgetContainer = (WidgetContainervue_type_script_lang_ts); -// 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/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=ad0a8c4a - -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_1 = { - class: "reportsByDimensionView" -}; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_2 = { - class: "entityList" -}; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_3 = { - class: "listCircle" -}; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_4 = ["onClick"]; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_5 = { - class: "dimension" -}; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_6 = { - class: "reportContainer" -}; -const WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "clear" -}, null, -1); -function WidgetByDimensionContainervue_type_template_id_ad0a8c4a_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_WidgetLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetLoader"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_2, [(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.widgetsByCategory, category => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "dimensionCategory", - key: category.name - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_3, [(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"])(category.widgets, widget => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["reportDimension", { - activeDimension: _ctx.selectedWidget.uniqueId === widget.uniqueId - }]), - key: widget.uniqueId, - onClick: $event => _ctx.selectWidget(widget) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(widget.name), 1)], 10, WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_4); - }), 128))])]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_6, [_ctx.selectedWidget.parameters ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_WidgetLoader, { - key: 0, - "widget-params": _ctx.selectedWidget.parameters, - class: "dimensionReport" - }, null, 8, ["widget-params"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), WidgetByDimensionContainervue_type_template_id_ad0a8c4a_hoisted_7]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=ad0a8c4a - -// 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/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=script&lang=ts - - - -/* harmony default export */ var WidgetByDimensionContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - widgets: Array - }, - components: { - WidgetLoader: WidgetLoader - }, - data() { - return { - selectedWidget: null - }; - }, - created() { - [this.selectedWidget] = this.widgetsSorted; - }, - computed: { - widgetsSorted() { - return sortOrderables(this.widgets); - }, - widgetsByCategory() { - const byCategory = {}; - this.widgetsSorted.forEach(widget => { - var _widget$subcategory; - const category = (_widget$subcategory = widget.subcategory) === null || _widget$subcategory === void 0 ? void 0 : _widget$subcategory.name; - if (!category) { - return; - } - if (!byCategory[category]) { - byCategory[category] = { - name: category, - order: widget.order, - widgets: [] - }; - } - byCategory[category].widgets.push(widget); - }); - return sortOrderables(Object.values(byCategory)); - } - }, - methods: { - selectWidget(widget) { - // we copy to force rerender if selecting same widget - this.selectedWidget = Object.assign({}, widget); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue - - - -WidgetByDimensionContainervue_type_script_lang_ts.render = WidgetByDimensionContainervue_type_template_id_ad0a8c4a_render - -/* harmony default export */ var WidgetByDimensionContainer = (WidgetByDimensionContainervue_type_script_lang_ts); -// 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/CoreHome/vue/src/Widget/Widget.vue?vue&type=template&id=17541248 - -const Widgetvue_type_template_id_17541248_hoisted_1 = ["id"]; -const Widgetvue_type_template_id_17541248_hoisted_2 = { - key: 2 -}; -const Widgetvue_type_template_id_17541248_hoisted_3 = { - key: 3 -}; -function Widgetvue_type_template_id_17541248_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_WidgetLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetLoader"); - const _component_ClientWidgetRenderer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ClientWidgetRenderer"); - const _component_WidgetContainer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetContainer"); - const _component_WidgetByDimensionContainer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetByDimensionContainer"); - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return _ctx.actualWidget && _ctx.showWidget ? 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"])("div", { - key: 0, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["matomo-widget", { - 'isFirstWidgetInPage': _ctx.actualWidget.isFirstInPage - }]), - id: _ctx.actualWidget.uniqueId - }, [!_ctx.actualWidget.isContainer && _ctx.actualWidget.parameters && !_ctx.actualWidget.clientComponent ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_WidgetLoader, { - key: 0, - "widget-params": _ctx.actualWidget.parameters, - "widget-name": _ctx.actualWidget.name, - "suppress-notifications": _ctx.suppressNotifications - }, null, 8, ["widget-params", "widget-name", "suppress-notifications"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.actualWidget.isContainer && _ctx.actualWidget.clientComponent ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_ClientWidgetRenderer, { - key: 1, - widget: _ctx.actualWidget, - widgetized: _ctx.widgetized - }, null, 8, ["widget", "widgetized"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout !== 'ByDimension' && !this.preventRecursion ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_17541248_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetContainer, { - container: _ctx.actualWidget.widgets - }, null, 8, ["container"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout === 'ByDimension' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_17541248_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetByDimensionContainer, { - widgets: _ctx.actualWidget.widgets - }, null, 8, ["widgets"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, Widgetvue_type_template_id_17541248_hoisted_1)), [[_directive_tooltips, { - content: _ctx.tooltipContent - }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.vue?vue&type=template&id=17541248 - -// 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/CoreHome/vue/src/Widget/Widget.vue?vue&type=script&lang=ts - - - - - - - - - -function findContainer(widgetsByCategory, containerId) { - let widget = undefined; - Object.values(widgetsByCategory || {}).some(widgets => { - widget = widgets.find(w => { - var _w$parameters; - return w && w.isContainer && ((_w$parameters = w.parameters) === null || _w$parameters === void 0 ? void 0 : _w$parameters.containerId) === containerId; - }); - return widget; - }); - return widget; -} -/** - * Renders any kind of widget. If you have a widget and you want to have it rendered, use this - * directive. It will display a name on top and the actual widget below. It can handle any kind - * of widget, no matter whether it is a regular widget or a container. - * - * @param {Object} piwikWidget A widget object as returned by the WidgetMetadata API. - * @param {Object} piwikWidget.middlewareParameters If present, we will request a URL using the - * given parameters and only if this URL - * returns a JSON `true` the widget will be - * shown. Otherwise the widget won't be shown. - * @param {String} containerId If you do not have a widget object but a containerId we will find - * the correct widget object based on the given containerId. Be aware - * that we might not find the widget if it is for example not - * available for the current user or period/date. - * @param {Boolean} widgetized true if the widget is widgetized (eg in Dashboard or exported). - * In this case we will add a URL parameter widget=1 to all widgets. - * Eg sparklines will be then displayed one after another - * (vertically aligned) instead of two next to each other. - * - * Example: - * - * // in this case we will find the correct widget automatically - * - * // disables rating feature, no initial headline - * - */ -/* harmony default export */ var Widgetvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - widget: Object, - widgetized: Boolean, - containerid: String, - preventRecursion: Boolean, - suppressNotifications: Boolean - }, - components: { - WidgetLoader: WidgetLoader, - WidgetContainer: WidgetContainer, - WidgetByDimensionContainer: WidgetByDimensionContainer, - ClientWidgetRenderer: ClientWidgetRenderer - }, - directives: { - Tooltips: Tooltips - }, - data() { - return { - showWidget: false - }; - }, - setup() { - function tooltipContent() { - const $this = window.$(this); - if ($this.hasClass('matomo-form-field')) { - // do not show it for form fields - return ''; - } - const title = window.$(this).attr('title') || ''; - return window.vueSanitize(title.replace(/\n/g, '
')); - } - return { - tooltipContent - }; - }, - created() { - const { - actualWidget - } = this; - if (actualWidget && actualWidget.middlewareParameters) { - const params = actualWidget.middlewareParameters; - AjaxHelper_AjaxHelper.fetch(params).then(response => { - this.showWidget = !!response; - }); - } else { - this.showWidget = true; - } - }, - computed: { - allWidgets() { - return Widgets_store.widgets.value; - }, - actualWidget() { - const widget = this.widget; - if (widget) { - const result = Object.assign({}, widget); - if (widget && widget.isReport && !widget.documentation) { - const report = ReportMetadata_store.findReport(widget.module, widget.action); - if (report && report.documentation) { - result.documentation = report.documentation; - } - } - if (widget.uniqueId) { - result.parameters = Object.assign(Object.assign({}, result.parameters), {}, { - uniqueId: widget.uniqueId - }); - } - return result; - } - if (this.containerid) { - const containerWidget = findContainer(this.allWidgets, this.containerid); - if (containerWidget) { - const result = Object.assign({}, containerWidget); - if (this.widgetized) { - result.isFirstInPage = true; - result.parameters = Object.assign(Object.assign({}, result.parameters), {}, { - widget: '1' - }); - const widgets = getWidgetChildren(result); - if (widgets) { - result.widgets = widgets.map(w => Object.assign(Object.assign({}, w), {}, { - parameters: Object.assign(Object.assign({}, w.parameters), {}, { - widget: '1', - containerId: this.containerid - }) - })); - } - } - return result; - } - } - return null; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.vue - - - -Widgetvue_type_script_lang_ts.render = Widgetvue_type_template_id_17541248_render - -/* harmony default export */ var Widget_Widget = (Widgetvue_type_script_lang_ts); -// 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/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=f759ac26 - -const ReportingPagevue_type_template_id_f759ac26_hoisted_1 = { - class: "reporting-page" -}; -const ReportingPagevue_type_template_id_f759ac26_hoisted_2 = { - key: 1, - class: "col s12 l6 leftWidgetColumn" -}; -const ReportingPagevue_type_template_id_f759ac26_hoisted_3 = { - key: 2, - class: "col s12 l6 rightWidgetColumn" -}; -function ReportingPagevue_type_template_id_f759ac26_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_SiteWithoutData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SiteWithoutData"); - const _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); - const _component_Widget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Widget"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_f759ac26_hoisted_1, [_ctx.showEmptySiteScreen ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_SiteWithoutData, { - key: 0, - "embedded-in-reporting": true, - onDismissed: _ctx.onNoDataDismissed - }, null, 8, ["onDismissed"])) : (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"], { - key: 1 - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { - loading: _ctx.loading - }, null, 8, ["loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_NoSuchPage')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasNoPage]]), (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.widgets, widget => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: "row", - key: widget.uniqueId - }, [!widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { - key: 0, - class: "col s12 fullWidgetColumn", - widget: widget - }, null, 8, ["widget"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_f759ac26_hoisted_2, [(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"])(widget.left, widgetInGroup => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { - widget: widgetInGroup, - key: widgetInGroup.uniqueId - }, null, 8, ["widget"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_f759ac26_hoisted_3, [(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"])(widget.right, widgetInGroup => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { - widget: widgetInGroup, - key: widgetInGroup.uniqueId - }, null, 8, ["widget"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); - }), 128))], 64))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=f759ac26 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts -function ReportingPage_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - -function shouldBeRenderedWithFullWidth(widget) { - // rather controller logic - if (widget.isContainer && widget.layout && widget.layout === 'ByDimension' || widget.viewDataTable === 'bydimension') { - return true; - } - if (widget.isWide) { - return true; - } - return widget.viewDataTable && (widget.viewDataTable === 'tableAllColumns' || widget.viewDataTable === 'sparklines' || widget.viewDataTable === 'graphEvolution'); -} -function markWidgetsInFirstRowOfPage(widgets) { - if (widgets && widgets[0]) { - const newWidgets = [...widgets]; - const groupedWidgets = widgets[0]; - if (groupedWidgets.group) { - newWidgets[0] = Object.assign(Object.assign({}, newWidgets[0]), {}, { - left: markWidgetsInFirstRowOfPage(groupedWidgets.left || []), - right: markWidgetsInFirstRowOfPage(groupedWidgets.right || []) - }); - } else { - newWidgets[0] = Object.assign(Object.assign({}, newWidgets[0]), {}, { - isFirstInPage: true - }); - } - return newWidgets; - } - return widgets; -} -class ReportingPage_store_ReportingPageStore { - constructor() { - ReportingPage_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({})); - ReportingPage_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState))); - ReportingPage_store_defineProperty(this, "page", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => this.state.value.page)); - ReportingPage_store_defineProperty(this, "widgets", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => { - const page = this.page.value; - if (!page) { - return []; - } - let widgets = []; - const reportsToIgnore = {}; - const isIgnoredReport = widget => widget.isReport && reportsToIgnore[`${widget.module}.${widget.action}`]; - const getRelatedReports = widget => { - if (!widget.isReport) { - return []; - } - const report = ReportMetadata_store.findReport(widget.module, widget.action); - if (!report || !report.relatedReports) { - return []; - } - return report.relatedReports; - }; - (page.widgets || []).forEach(widget => { - if (isIgnoredReport(widget)) { - return; - } - getRelatedReports(widget).forEach(report => { - reportsToIgnore[`${report.module}.${report.action}`] = true; - }); - widgets.push(widget); - }); - widgets = sortOrderables(widgets); - if (widgets.length === 1) { - // if there is only one widget, we always display it full width - return markWidgetsInFirstRowOfPage(widgets); - } - const groupedWidgets = []; - for (let i = 0; i < widgets.length; i += 1) { - const widget = widgets[i]; - if (shouldBeRenderedWithFullWidth(widget) || widgets[i + 1] && shouldBeRenderedWithFullWidth(widgets[i + 1])) { - groupedWidgets.push(Object.assign(Object.assign({}, widget), {}, { - widgets: sortOrderables(getWidgetChildren(widget)) - })); - } else { - let counter = 0; - const left = [widget]; - const right = []; - while (widgets[i + 1] && !shouldBeRenderedWithFullWidth(widgets[i + 1])) { - i += 1; - counter += 1; - if (counter % 2 === 0) { - left.push(widgets[i]); - } else { - right.push(widgets[i]); - } - } - groupedWidgets.push({ - group: true, - left, - right - }); - } - } - const sortedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); - return sortedWidgets; - })); - } - fetchPage(category, subcategory) { - this.resetPage(); - return Promise.all([ReportingPages_store.getAllPages(), ReportMetadata_store.fetchReportMetadata()]).then(() => { - this.privateState.page = ReportingPages_store.findPage(category, subcategory); - return this.page.value; - }); - } - resetPage() { - this.privateState.page = undefined; - } -} -/* harmony default export */ var ReportingPage_store = (new ReportingPage_store_ReportingPageStore()); -// 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/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=script&lang=ts - - - - - - - - - - - - - -const SiteWithoutData = useExternalPluginComponent('SitesManager', 'SiteWithoutData'); -// Reuse the standalone page's id so its styling (SitesManager.less) and detection -// (broadcast.isNoDataPage, UI tests) also apply to the in-SPA gate. -const SITE_WITHOUT_DATA_BODY_ID = 'site-without-data'; -function showOnlyRawDataNotification() { - const params = 'category=General_Visitors&subcategory=Live_VisitorLog'; - const url = window.broadcast.buildReportingUrl(params); - let message = translate('CoreHome_PeriodHasOnlyRawData', ``, ''); - if (!Matomo_Matomo.visitorLogEnabled) { - message = translate('CoreHome_PeriodHasOnlyRawDataNoVisitsLog'); - } - Notifications_store.show({ - id: 'onlyRawData', - animate: false, - context: 'info', - message, - type: 'transient' - }); -} -function hideOnlyRawDataNoticifation() { - Notifications_store.remove('onlyRawData'); -} -/* harmony default export */ var ReportingPagevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - components: { - ActivityIndicator: ActivityIndicator, - Widget: Widget_Widget, - SiteWithoutData - }, - props: { - // groups the empty-site gate is skipped for (e.g. AI Insights), resolved server-side - groupsWithoutTrackingRequirement: { - type: Array, - default: () => [] - } - }, - data() { - return { - loading: false, - hasRawData: false, - hasNoVisits: false, - dateLastChecked: null, - hasNoPage: false, - siteHasNoData: false, - noDataDismissed: false - }; - }, - created() { - ReportingPage_store.resetPage(); - this.loading = true; // we only set loading on initial load - this.renderInitialPage(); - // Fetched in parallel (not awaited) so the common has-data case isn't delayed by a round-trip. - // A no-data site therefore starts rendering the report first; the gate replaces it once this - // resolves. The discarded fetch is cheap (a no-data site has nothing to archive). - this.fetchSiteEmptyState(); - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => this.showEmptySiteScreen, active => { - this.updateSiteWithoutDataBodyId(active); - }); - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => src_MatomoUrl_MatomoUrl.parsed.value, (newValue, oldValue) => { - if (newValue.category === oldValue.category && newValue.subcategory === oldValue.subcategory && newValue.period === oldValue.period && newValue.date === oldValue.date && newValue.segment === oldValue.segment && JSON.stringify(newValue.compareDates) === JSON.stringify(oldValue.compareDates) && JSON.stringify(newValue.comparePeriods) === JSON.stringify(oldValue.comparePeriods) && JSON.stringify(newValue.compareSegments) === JSON.stringify(oldValue.compareSegments) && JSON.stringify(newValue.columns || '') === JSON.stringify(oldValue.columns || '')) { - // this page is already loaded - return; - } - if (newValue.date !== oldValue.date || newValue.period !== oldValue.period) { - hideOnlyRawDataNoticifation(); - this.dateLastChecked = null; - this.hasRawData = false; - this.hasNoVisits = false; - } - this.renderPage(newValue.category, newValue.subcategory, newValue.period, newValue.date, newValue.segment); - }); - Matomo_Matomo.on('loadPage', (category, subcategory) => { - const parsedUrl = src_MatomoUrl_MatomoUrl.parsed.value; - this.renderPage(category, subcategory, parsedUrl.period, parsedUrl.date, parsedUrl.segment); - }); - }, - unmounted() { - this.updateSiteWithoutDataBodyId(false); - }, - computed: { - widgets() { - return ReportingPage_store.widgets.value; - }, - showEmptySiteScreen() { - if (!this.siteHasNoData || this.noDataDismissed) { - return false; - } - const activeGroup = src_MatomoUrl_MatomoUrl.parsed.value.group || DEFAULT_GROUP; - return !this.groupsWithoutTrackingRequirement.includes(activeGroup); - } - }, - methods: { - fetchSiteEmptyState() { - AjaxHelper_AjaxHelper.fetch({ - module: 'SitesManager', - action: 'getSiteEmptyState', - idSite: Matomo_Matomo.idSite - }, { - createErrorNotification: false - }).then(response => { - this.siteHasNoData = response === true; - }).catch(() => { - // ignore errors - don't block the dashboard on the empty-site check - this.siteHasNoData = false; - }); - }, - onNoDataDismissed() { - // stay on the current page and load it now that the screen is gone - this.noDataDismissed = true; - this.renderInitialPage(); - }, - updateSiteWithoutDataBodyId(active) { - if (active) { - document.body.id = SITE_WITHOUT_DATA_BODY_ID; - } else if (document.body.id === SITE_WITHOUT_DATA_BODY_ID) { - document.body.id = ''; - } - }, - renderPage(category, subcategory, period, date, segment) { - // No report to render while the gate is shown; rendering would emit matomoPageChange and - // abort the requests the just-mounted SiteWithoutData component fired. Still clear transient - // notifications from the page we navigated away from (e.g. an archiving notice). - if (this.showEmptySiteScreen) { - Notifications_store.clearTransientNotifications(); - this.loading = false; - return; - } - if (!category || !subcategory) { - ReportingPage_store.resetPage(); - this.loading = false; - return; - } - try { - Periods_Periods.parse(period, date); - } catch (e) { - Notifications_store.show({ - id: 'invalidDate', - animate: false, - context: 'error', - message: translate('CoreHome_DateInvalid'), - type: 'transient' - }); - ReportingPage_store.resetPage(); - this.loading = false; - return; - } - Notifications_store.remove('invalidDate'); - Matomo_Matomo.postEvent('matomoPageChange', {}); - Notifications_store.clearTransientNotifications(); - if (Periods_Periods.parse(period, date).containsToday()) { - this.showOnlyRawDataMessageIfRequired(category, subcategory, period, date, segment); - } - const params = { - category, - subcategory - }; - Matomo_Matomo.postEvent('ReportingPage.loadPage', params); - if (params.promise) { - this.loading = true; - Promise.resolve(params.promise).finally(() => { - this.loading = false; - }); - return; - } - ReportingPage_store.fetchPage(category, subcategory).then(() => { - const hasNoPage = !ReportingPage_store.page.value; - if (hasNoPage) { - const page = ReportingPages_store.findPageInCategory(category); - if (page && page.subcategory) { - src_MatomoUrl_MatomoUrl.updateHash(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - subcategory: page.subcategory.id - })); - return; - } - } - this.hasNoPage = hasNoPage; - this.loading = false; - }); - }, - renderInitialPage() { - const parsed = src_MatomoUrl_MatomoUrl.parsed.value; - this.renderPage(parsed.category, parsed.subcategory, parsed.period, parsed.date, parsed.segment); - }, - showOnlyRawDataMessageIfRequired(category, subcategory, period, date, segment) { - if (this.hasRawData && this.hasNoVisits) { - showOnlyRawDataNotification(); - } - if (segment) { - hideOnlyRawDataNoticifation(); - return; - } - const subcategoryExceptions = ['Live_VisitorLog', 'General_RealTime', 'UserCountryMap_RealTimeMap', 'MediaAnalytics_TypeAudienceLog', 'MediaAnalytics_TypeRealTime', 'FormAnalytics_TypeRealTime', 'Goals_AddNewGoal']; - const categoryExceptions = ['HeatmapSessionRecording_Heatmaps', 'HeatmapSessionRecording_SessionRecordings', 'Marketplace_Marketplace']; - if (subcategoryExceptions.indexOf(subcategory) !== -1 || categoryExceptions.indexOf(category) !== -1 || subcategory.toLowerCase().indexOf('manage') !== -1) { - hideOnlyRawDataNoticifation(); - return; - } - const minuteInMilliseconds = 60000; - if (this.dateLastChecked && new Date().valueOf() - this.dateLastChecked.valueOf() < minuteInMilliseconds) { - return; - } - AjaxHelper_AjaxHelper.fetch({ - method: 'VisitsSummary.getVisits', - date, - period, - segment - }).then(json => { - this.dateLastChecked = new Date(); - if (json.value > 0) { - this.hasNoVisits = false; - hideOnlyRawDataNoticifation(); - return undefined; - } - this.hasNoVisits = true; - if (this.hasRawData) { - showOnlyRawDataNotification(); - return undefined; - } - return AjaxHelper_AjaxHelper.fetch({ - method: 'Live.getMostRecentVisitsDateTime', - date, - period - }).then(lastVisits => { - if (!lastVisits || lastVisits.value === '') { - this.hasRawData = false; - hideOnlyRawDataNoticifation(); - return; - } - this.hasRawData = true; - showOnlyRawDataNotification(); - }); - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue - - - -ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_f759ac26_render - -/* harmony default export */ var ReportingPage = (ReportingPagevue_type_script_lang_ts); -// 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/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=67216619 - -const ReportExportPopovervue_type_template_id_67216619_hoisted_1 = { - class: "report-export-popover row", - id: "reportExport" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_2 = { - class: "col l6" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_3 = { - name: "format" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_4 = { - name: "option_flat" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_5 = { - name: "option_show_dimensions" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_6 = { - name: "option_expanded" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_7 = { - name: "option_format_metrics" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_8 = { - class: "col l6" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_9 = { - name: "filter_type" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_10 = { - class: "filter_limit" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_11 = { - name: "filter_limit_all" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_12 = { - key: 0, - name: "filter_limit" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_13 = { - key: 1, - name: "filter_limit" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_14 = { - class: "col l12" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_15 = ["value"]; -const ReportExportPopovervue_type_template_id_67216619_hoisted_16 = ["innerHTML"]; -const ReportExportPopovervue_type_template_id_67216619_hoisted_17 = { - class: "col l12" -}; -const ReportExportPopovervue_type_template_id_67216619_hoisted_18 = ["href", "title"]; -const _hoisted_19 = ["innerHTML"]; -function ReportExportPopovervue_type_template_id_67216619_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - const _directive_select_on_focus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("select-on-focus"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'radio', - name: 'format', - title: _ctx.translate('CoreHome_ExportFormat'), - modelValue: _ctx.reportFormat, - "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.reportFormat = $event), - "full-width": true, - options: _ctx.availableReportFormats[_ctx.reportType] - }, null, 8, ["title", "modelValue", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'checkbox', - name: 'option_flat', - title: _ctx.translate('CoreHome_FlattenReport'), - modelValue: _ctx.optionFlatModel, - "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.optionFlatModel = $event) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canExportFlat]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'checkbox', - name: 'option_show_dimensions', - title: _ctx.translate('CoreHome_IncludeDimensionsSeparately'), - modelValue: _ctx.optionShowDimensions, - "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.optionShowDimensions = $event) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canExportFlat && _ctx.hasMultipleDimensions && _ctx.optionFlatModel]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'checkbox', - name: 'option_expanded', - title: _ctx.translate('CoreHome_ExpandSubtables'), - modelValue: _ctx.optionExpandedModel, - "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.optionExpandedModel = $event) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables && _ctx.canExpand]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'checkbox', - name: 'option_format_metrics', - title: _ctx.translate('CoreHome_FormatMetrics'), - modelValue: _ctx.optionFormatMetrics, - "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.optionFormatMetrics = $event) - }, null, 8, ["title", "modelValue"])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'radio', - name: 'filter_type', - title: _ctx.translate('CoreHome_ReportType'), - modelValue: _ctx.reportType, - "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => _ctx.reportType = $event), - "full-width": true, - options: _ctx.availableReportTypes - }, null, 8, ["title", "modelValue", "options"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'radio', - name: 'filter_limit_all', - title: _ctx.translate('CoreHome_RowLimit'), - modelValue: _ctx.reportLimitAll, - "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.reportLimitAll = $event), - "full-width": true, - options: _ctx.limitAllOptions - }, null, 8, ["title", "modelValue", "options"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.maxFilterLimit || _ctx.maxFilterLimit <= 0]]), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit <= 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'number', - name: "filter_limit", - min: 1, - modelValue: _ctx.reportLimit, - "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => _ctx.reportLimit = $event), - "full-width": true - }, null, 8, ["modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: 'number', - name: 'filter_limit', - min: 1, - max: _ctx.maxFilterLimit, - modelValue: _ctx.reportLimit, - "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => _ctx.reportLimit = $event), - value: _ctx.reportLimit, - "full-width": true, - title: _ctx.filterLimitTooltip - }, null, 8, ["max", "modelValue", "value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_14, [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"])("textarea", { - readonly: "", - class: "exportFullUrl", - value: _ctx.exportLinkWithoutToken - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("\n ")], 8, ReportExportPopovervue_type_template_id_67216619_hoisted_15)), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "tooltip", - innerHTML: _ctx.$sanitize(_ctx.translate('CoreHome_ExportTooltipWithLink', '', '', 'ENTER_YOUR_TOKEN_AUTH_HERE')) - }, null, 8, ReportExportPopovervue_type_template_id_67216619_hoisted_16)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_67216619_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - class: "btn", - href: _ctx.exportLink, - target: "_new", - title: _ctx.translate('CoreHome_ExportTooltip') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Export')), 9, ReportExportPopovervue_type_template_id_67216619_hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - href: "javascript:", - onClick: _cache[9] || (_cache[9] = $event => _ctx.showUrl = !_ctx.showUrl), - class: "toggle-export-url" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_ShowExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_HideExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]])])]), _ctx.additionalContent ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: 0, - class: "col l12 report-export-popover-footer", - innerHTML: _ctx.$sanitize(_ctx.additionalContent) - }, null, 8, _hoisted_19)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=67216619 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const FORMATS_WITHOUT_EXPANDED = ['CSV', 'TSV', 'HTML']; -function isFormatWithoutExpanded(format) { - return FORMATS_WITHOUT_EXPANDED.includes(format); -} -function resolveInitialSubtablePreference(initialOptionFlat, initialOptionExpanded, initialReportFormat) { - // `hasUserPreference=false` means "use the product default behavior": - // TSV/CSV start flat, and non-TSV/CSV start expanded. - if (initialOptionFlat) { - if (isFormatWithoutExpanded(initialReportFormat)) { - return { - hasUserPreference: false, - preferredMode: null - }; - } - return { - hasUserPreference: true, - preferredMode: 'flat' - }; - } - if (initialOptionExpanded) { - return { - hasUserPreference: true, - preferredMode: 'expanded' - }; - } - return { - hasUserPreference: true, - preferredMode: null - }; -} -function resolveEffectiveSubtableOptions(hasSubtables, canExportFlat, reportFormat, subtablePreference) { - const { - hasUserPreference, - preferredMode - } = subtablePreference; - if (!hasSubtables && !canExportFlat) { - return { - optionFlat: false, - optionExpanded: false - }; - } - if (isFormatWithoutExpanded(reportFormat)) { - if (!canExportFlat) { - return { - optionFlat: false, - optionExpanded: false - }; - } - return { - optionFlat: !hasUserPreference || preferredMode === 'flat', - optionExpanded: false - }; - } - if (!hasSubtables) { - return canExportFlat ? { - optionFlat: preferredMode === 'flat', - optionExpanded: false - } : { - optionFlat: false, - optionExpanded: false - }; - } - if (!hasUserPreference) { - return { - optionFlat: false, - optionExpanded: true - }; - } - if (preferredMode === 'flat') { - return canExportFlat ? { - optionFlat: true, - optionExpanded: false - } : { - optionFlat: false, - optionExpanded: true - }; - } - if (preferredMode === 'expanded') { - return { - optionFlat: false, - optionExpanded: true - }; - } - return { - optionFlat: false, - optionExpanded: false - }; -} -// 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/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=script&lang=ts - - - - - - - -const ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -/* harmony default export */ var ReportExportPopovervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - components: { - Field: ReportExportPopovervue_type_script_lang_ts_Field - }, - directives: { - SelectOnFocus: SelectOnFocus - }, - props: { - hasSubtables: Boolean, - canExportFlat: { - type: Boolean, - default: false - }, - availableReportTypes: Object, - availableReportFormats: { - type: Object, - required: true - }, - maxFilterLimit: Number, - limitAllOptions: Object, - dataTable: { - type: Object, - required: true - }, - requestParams: [Object, String], - apiMethod: { - type: String, - required: true - }, - initialReportType: { - type: String, - default: 'default' - }, - initialReportLimit: { - type: [String, Number], - default: 100 - }, - initialReportLimitAll: { - type: String, - default: 'yes' - }, - initialOptionFlat: { - type: Boolean, - default: false - }, - initialOptionShowDimensions: { - type: Boolean, - default: false - }, - initialOptionExpanded: { - type: Boolean, - default: true - }, - initialOptionFormatMetrics: { - type: Boolean, - default: false - }, - initialReportFormat: { - type: String, - default: 'TSV' - } - }, - mounted() { - // pass data as object, so it can be manipulated by subscribers - const parameters = { - content: this.additionalContent, - dataTable: this.dataTable - }; - Matomo_Matomo.postEvent('ReportExportPopover.additionalContent', parameters); - this.additionalContent = parameters.content; - }, - data() { - return { - showUrl: false, - reportFormat: this.initialReportFormat, - optionShowDimensions: this.initialOptionShowDimensions, - // Keep explicit preference separate from default behavior: - // default means CSV/TSV/HTML flat and other formats expanded. - subtablePreference: resolveInitialSubtablePreference(this.initialOptionFlat, this.initialOptionExpanded, this.initialReportFormat), - optionFormatMetrics: this.initialOptionFormatMetrics, - reportType: this.initialReportType, - reportLimitAll: this.initialReportLimitAll, - reportLimit: typeof this.initialReportLimit === 'string' ? parseInt(this.initialReportLimit, 10) : this.initialReportLimit, - additionalContent: '' - }; - }, - watch: { - reportType(newVal) { - if (!this.availableReportFormats[newVal][this.reportFormat]) { - this.reportFormat = 'JSON'; - } - }, - reportLimit(newVal, oldVal) { - if (this.maxFilterLimit && this.maxFilterLimit > 0 && newVal > this.maxFilterLimit) { - this.reportLimit = oldVal; - } - } - }, - computed: { - hasMultipleDimensions() { - var _this$dataTable, _this$dataTable2; - if (typeof ((_this$dataTable = this.dataTable) === null || _this$dataTable === void 0 ? void 0 : _this$dataTable.getReportMetadata) !== 'function') { - return false; - } - return Object.keys(((_this$dataTable2 = this.dataTable) === null || _this$dataTable2 === void 0 ? void 0 : _this$dataTable2.getReportMetadata().dimensions) || {}).length > 1; - }, - filterLimitTooltip() { - const rowLimit = translate('CoreHome_RowLimit'); - const computedMetricMax = this.maxFilterLimit ? translate('General_ComputedMetricMax', this.maxFilterLimit.toString()) : ''; - return `${rowLimit} (${computedMetricMax})`; - }, - canExpand() { - return !isFormatWithoutExpanded(this.reportFormat); - }, - effectiveSubtableOptions() { - return resolveEffectiveSubtableOptions(this.hasSubtables, this.canExportFlat, this.reportFormat, this.subtablePreference); - }, - optionFlatModel: { - get() { - return this.effectiveSubtableOptions.optionFlat; - }, - set(newVal) { - if (!this.canExportFlat) { - return; - } - if (newVal) { - this.subtablePreference = { - hasUserPreference: true, - preferredMode: 'flat' - }; - } else if (!this.optionExpandedModel) { - this.subtablePreference = { - hasUserPreference: true, - preferredMode: null - }; - } - } - }, - optionExpandedModel: { - get() { - return this.effectiveSubtableOptions.optionExpanded; - }, - set(newVal) { - if (!this.hasSubtables || isFormatWithoutExpanded(this.reportFormat)) { - return; - } - if (newVal) { - this.subtablePreference = { - hasUserPreference: true, - preferredMode: 'expanded' - }; - } else if (!this.optionFlatModel) { - this.subtablePreference = { - hasUserPreference: true, - preferredMode: null - }; - } - } - }, - exportLink() { - return this.getExportLink(true); - }, - exportLinkWithoutToken() { - return this.getExportLink(false); - } - }, - methods: { - getExportLink(withToken = true) { - const { - reportFormat, - apiMethod, - reportType - } = this; - const dataTable = this.dataTable; - if (!reportFormat) { - return undefined; - } - let requestParams = {}; - const limit = this.reportLimitAll === 'yes' ? -1 : this.reportLimit; - if (this.requestParams && typeof this.requestParams === 'string') { - requestParams = JSON.parse(this.requestParams); - } else if (this.requestParams && typeof this.requestParams === 'object') { - requestParams = this.requestParams; - } - const { - segment, - label, - idGoal, - idDimension, - idSite - } = dataTable.param; - let { - date, - period - } = dataTable.param; - if (reportFormat === 'RSS') { - date = 'last10'; - } - if (typeof dataTable.param.dateUsedInGraph !== 'undefined') { - date = dataTable.param.dateUsedInGraph; - } - const formatsUseDayNotRange = Matomo_Matomo.config.datatable_export_range_as_day.toLowerCase(); - if (formatsUseDayNotRange.indexOf(reportFormat.toLowerCase()) !== -1 && dataTable.param.period === 'range') { - period = 'day'; - } - // Below evolution graph, show daily exports - if (dataTable.param.period === 'range' && dataTable.param.viewDataTable === 'graphEvolution') { - period = 'day'; - } - const exportUrlParams = { - module: 'API', - format: reportFormat, - idSite, - period, - date - }; - if (reportType === 'processed') { - exportUrlParams.method = 'API.getProcessedReport'; - [exportUrlParams.apiModule, exportUrlParams.apiAction] = apiMethod.split('.'); - } else { - exportUrlParams.method = apiMethod; - } - if (dataTable.param.compareDates && dataTable.param.compareDates.length) { - exportUrlParams.compareDates = dataTable.param.compareDates; - exportUrlParams.compare = '1'; - } - if (dataTable.param.comparePeriods && dataTable.param.comparePeriods.length) { - exportUrlParams.comparePeriods = dataTable.param.comparePeriods; - exportUrlParams.compare = '1'; - } - if (dataTable.param.compareSegments && dataTable.param.compareSegments.length) { - exportUrlParams.compareSegments = dataTable.param.compareSegments; - exportUrlParams.compare = '1'; - } - if (typeof dataTable.param.filter_pattern !== 'undefined') { - exportUrlParams.filter_pattern = dataTable.param.filter_pattern; - } - if (typeof dataTable.param.filter_pattern_recursive !== 'undefined') { - exportUrlParams.filter_pattern_recursive = dataTable.param.filter_pattern_recursive; - } - if (window.$.isPlainObject(requestParams)) { - Object.entries(requestParams).forEach(([index, param]) => { - let value = param; - if (value === true) { - value = 1; - } else if (value === false) { - value = 0; - } - exportUrlParams[index] = value; - }); - } - const { - optionFlat: effectiveOptionFlat, - optionExpanded: effectiveOptionExpanded - } = this.effectiveSubtableOptions; - if (effectiveOptionFlat) { - exportUrlParams.flat = 1; - if (this.optionShowDimensions) { - exportUrlParams.show_dimensions = 1; - } - if (typeof dataTable.param.include_aggregate_rows !== 'undefined' && dataTable.param.include_aggregate_rows === '1') { - exportUrlParams.include_aggregate_rows = 1; - } - } - if (this.hasSubtables && !effectiveOptionFlat && effectiveOptionExpanded) { - exportUrlParams.expanded = 1; - } - if (this.optionFormatMetrics) { - exportUrlParams.format_metrics = 1; - } - if (dataTable.param.pivotBy) { - exportUrlParams.pivotBy = dataTable.param.pivotBy; - exportUrlParams.pivotByColumnLimit = 20; - if (dataTable.props.pivot_by_column) { - exportUrlParams.pivotByColumn = dataTable.props.pivot_by_column; - } - } - if (reportFormat === 'CSV' || reportFormat === 'TSV' || reportFormat === 'RSS') { - exportUrlParams.translateColumnNames = 1; - exportUrlParams.language = Matomo_Matomo.language; - } - if (typeof segment !== 'undefined') { - exportUrlParams.segment = decodeURIComponent(segment); - } - // Export Goals specific reports - if (typeof idGoal !== 'undefined' && idGoal !== '-1') { - exportUrlParams.idGoal = idGoal; - } - // Export Dimension specific reports - if (typeof idDimension !== 'undefined' && idDimension !== '-1') { - exportUrlParams.idDimension = idDimension; - } - if (label) { - const labelParts = label.split(','); - if (labelParts.length > 1) { - exportUrlParams.label = labelParts; - } else { - [exportUrlParams.label] = labelParts; - } - } - exportUrlParams.showMetadata = 0; - exportUrlParams.token_auth = 'ENTER_YOUR_TOKEN_AUTH_HERE'; - if (withToken === true) { - exportUrlParams.token_auth = Matomo_Matomo.token_auth; - exportUrlParams.force_api_session = 1; - } - exportUrlParams.filter_limit = limit; - const prefix = window.location.href.split('?')[0]; - return `${prefix}?${src_MatomoUrl_MatomoUrl.stringify(exportUrlParams)}`; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue - - - -ReportExportPopovervue_type_script_lang_ts.render = ReportExportPopovervue_type_template_id_67216619_render - -/* harmony default export */ var ReportExportPopover = (ReportExportPopovervue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExport.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - -const { - $: ReportExport_$ -} = window; -/* harmony default export */ var ReportExport = ({ - mounted(el, binding) { - el.addEventListener('click', () => { - var _binding$value$canExp; - const popoverParamBackup = src_MatomoUrl_MatomoUrl.hashParsed.value.popover; - const dataTable = ReportExport_$(el).closest('[data-report]').data('uiControlObject'); - const popover = window.Piwik_Popover.showLoading('Export'); - const formats = binding.value.reportFormats; - let reportLimit = dataTable.param.filter_limit; - if (binding.value.maxFilterLimit > 0) { - reportLimit = Math.min(reportLimit, binding.value.maxFilterLimit); - } - const isDataTableFlat = dataTable.param.flat === true || dataTable.param.flat === 1 || dataTable.param.flat === '1'; - const optionShowDimensions = dataTable.param.show_dimensions === true || dataTable.param.show_dimensions === 1 || dataTable.param.show_dimensions === '1'; - const hasSubtables = isDataTableFlat || dataTable.numberOfSubtables > 0; - const canExportFlat = (_binding$value$canExp = binding.value.canExportFlat) !== null && _binding$value$canExp !== void 0 ? _binding$value$canExp : hasSubtables; - // Intentional product behaviour: - // when flat export is available, open the popover with TSV + flat selected. - const defaultFlatOnOpen = canExportFlat; - const defaultExpandedOnOpen = false; - const props = { - initialReportType: 'default', - initialReportFormat: 'TSV', - initialReportLimit: reportLimit > 0 ? reportLimit : 100, - initialReportLimitAll: reportLimit === -1 ? 'yes' : 'no', - initialOptionFlat: defaultFlatOnOpen, - initialOptionShowDimensions: optionShowDimensions, - initialOptionExpanded: defaultExpandedOnOpen, - initialOptionFormatMetrics: false, - hasSubtables, - canExportFlat, - availableReportFormats: { - default: formats, - processed: { - JSON: formats.JSON, - XML: formats.XML - } - }, - availableReportTypes: { - default: translate('CoreHome_StandardReport'), - processed: translate('CoreHome_ReportWithMetadata') - }, - limitAllOptions: { - yes: translate('General_All'), - no: translate('CoreHome_CustomLimit') - }, - maxFilterLimit: binding.value.maxFilterLimit, - dataTable, - requestParams: binding.value.requestParams, - apiMethod: binding.value.apiMethod - }; - const app = createVueApp({ - template: ` - `, - data() { - return { - bind: props - }; - } - }); - app.component('popover', ReportExportPopover); - const mountPoint = document.createElement('div'); - app.mount(mountPoint); - const { - reportTitle - } = binding.value; - window.Piwik_Popover.setTitle(`${translate('General_Export')} ${Matomo_Matomo.helper.htmlEntities(reportTitle)}`); - window.Piwik_Popover.setContent(mountPoint); - window.Piwik_Popover.onClose(() => { - app.unmount(); - if (popoverParamBackup !== '') { - setTimeout(() => { - src_MatomoUrl_MatomoUrl.updateHash(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.hashParsed.value), {}, { - popover: popoverParamBackup - })); - if (binding.value.onClose) { - binding.value.onClose(); - } - }, 100); - } - }); - setTimeout(() => { - popover.dialog(); - ReportExport_$('.exportFullUrl, .btn', popover).tooltip({ - track: true, - show: false, - hide: false - }); - }, 100); - }); - } -}); -// 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/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=template&id=6902c51a - -const Sparklinevue_type_template_id_6902c51a_hoisted_1 = ["src", "width", "height"]; -function Sparklinevue_type_template_id_6902c51a_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("img", { - class: "sparklineImg", - loading: "lazy", - alt: "", - src: _ctx.sparklineUrl, - width: _ctx.width, - height: _ctx.height - }, null, 8, Sparklinevue_type_template_id_6902c51a_hoisted_1); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=template&id=6902c51a - -// 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/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=script&lang=ts - - - - - - -/* harmony default export */ var Sparklinevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - name: 'Sparkline', - props: { - seriesIndices: Array, - params: [Object, String], - width: Number, - height: Number - }, - data() { - return { - isWidget: false, - themeMode: Matomo_Matomo.getThemeMode() - }; - }, - mounted() { - this.isWidget = !!this.$el.closest('[widgetId]'); - window.addEventListener('themeModeChange', this.onThemeModeChange); - }, - beforeUnmount() { - window.removeEventListener('themeModeChange', this.onThemeModeChange); - }, - computed: { - sparklineUrl() { - const { - seriesIndices, - params, - themeMode - } = this; - const sparklineColors = Matomo_Matomo.getSparklineColors(); - if (seriesIndices) { - sparklineColors.lineColor = sparklineColors.lineColor.filter((c, index) => seriesIndices.indexOf(index) !== -1); - } - const colors = JSON.stringify(sparklineColors); - // The redesign lets sparklines be rendered server-side at a custom size; without it the - // width/height props only control the displayed size and the server uses its defaults. - // The width/height props are the displayed size; the PNG is rendered at twice that so it - // stays crisp on hi-DPI screens (matching the legacy 200x50-render / 100x25-display ratio). - const redesignEnabled = document.body.classList.contains('sparklines-redesign-enabled'); - const sizeParams = redesignEnabled ? Object.assign(Object.assign({}, typeof this.width === 'number' ? { - width: this.width * 2 - } : {}), typeof this.height === 'number' ? { - height: this.height * 2 - } : {}) : {}; - const defaultParams = Object.assign(Object.assign({ - forceView: '1', - viewDataTable: 'sparkline', - widget: this.isWidget ? '1' : '0', - showtitle: '1', - colors, - random: Date.now(), - date: this.defaultDate - }, sizeParams), {}, { - // mixinDefaultGetParams() will use the raw, encoded value from the URL (legacy behavior), - // which means MatomoUrl.stringify() will end up double encoding it if we don't set it - // ourselves here. - segment: src_MatomoUrl_MatomoUrl.parsed.value.segment - }); - const givenParams = typeof params === 'object' ? params : src_MatomoUrl_MatomoUrl.parse(params.substring(params.indexOf('?') + 1)); - const helper = new AjaxHelper_AjaxHelper(); - const urlParams = helper.mixinDefaultGetParams(Object.assign(Object.assign({}, defaultParams), givenParams)); - // Append the token_auth to the URL if it was set (eg. embed dashboard) - const token_auth = src_MatomoUrl_MatomoUrl.parsed.value.token_auth; - if (token_auth && token_auth.length && Matomo_Matomo.shouldPropagateTokenAuth) { - urlParams.token_auth = token_auth; - } - urlParams.themeMode = themeMode; - return `?${src_MatomoUrl_MatomoUrl.stringify(urlParams)}`; - }, - defaultDate() { - if (Matomo_Matomo.period === 'range') { - return `${Matomo_Matomo.startDateString},${Matomo_Matomo.endDateString}`; - } - const dateRange = Range_RangePeriod.getLastNRange(Matomo_Matomo.period, 30, Matomo_Matomo.currentDateString).getDateRange(); - const piwikMinDate = new Date(Matomo_Matomo.minDateYear, Matomo_Matomo.minDateMonth - 1, Matomo_Matomo.minDateDay); - if (dateRange[0] < piwikMinDate) { - dateRange[0] = piwikMinDate; - } - const startDateStr = format(dateRange[0]); - const endDateStr = format(dateRange[1]); - return `${startDateStr},${endDateStr}`; - } - }, - methods: { - onThemeModeChange() { - this.themeMode = Matomo_Matomo.getThemeMode(); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.vue - - - -Sparklinevue_type_script_lang_ts.render = Sparklinevue_type_template_id_6902c51a_render - -/* harmony default export */ var Sparkline = (Sparklinevue_type_script_lang_ts); -// 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/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=template&id=f800d6ec - -const Progressbarvue_type_template_id_f800d6ec_hoisted_1 = { - class: "progressbar" -}; -const Progressbarvue_type_template_id_f800d6ec_hoisted_2 = { - class: "progress" -}; -const Progressbarvue_type_template_id_f800d6ec_hoisted_3 = ["innerHTML"]; -function Progressbarvue_type_template_id_f800d6ec_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Progressbarvue_type_template_id_f800d6ec_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Progressbarvue_type_template_id_f800d6ec_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "determinate", - style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])([{ - "width": "0" - }, { - width: `${_ctx.actualProgress}%` - }]) - }, null, 4)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "label", - innerHTML: _ctx.$sanitize(_ctx.label) - }, null, 8, Progressbarvue_type_template_id_f800d6ec_hoisted_3)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !!_ctx.label]])]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=template&id=f800d6ec - -// 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/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=script&lang=ts - - -/* harmony default export */ var Progressbarvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - components: { - MatomoLoader: MatomoLoader - }, - props: { - progress: { - type: Number, - required: true - }, - label: String - }, - computed: { - actualProgress() { - if (this.progress > 100) { - return 100; - } - if (this.progress < 0) { - return 0; - } - return this.progress; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.vue - - - -Progressbarvue_type_script_lang_ts.render = Progressbarvue_type_template_id_f800d6ec_render - -/* harmony default export */ var Progressbar = (Progressbarvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentIntro/ContentIntro.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/* harmony default export */ var ContentIntro = ({ - mounted(el) { - el.classList.add('piwik-content-intro'); - }, - updated(el) { - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => { - el.classList.add('piwik-content-intro'); - }); - } -}); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentTable/contentTableUtils.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const MOBILE_BREAKPOINT = '(max-width: 767px)'; -const registrations = new WeakMap(); -function ensureOverflowWrapper(el) { - const parent = el.parentElement; - if (!parent || parent.classList.contains('contentTableWrapper')) { - return; - } - const wrapper = document.createElement('div'); - wrapper.className = 'contentTableWrapper'; - parent.insertBefore(wrapper, el); - wrapper.appendChild(el); -} -function removeOverflowWrapper(el) { - const parent = el.parentElement; - if (!parent || !parent.classList.contains('contentTableWrapper')) { - return; - } - const wrapperParent = parent.parentElement; - if (!wrapperParent) { - return; - } - wrapperParent.insertBefore(el, parent); - parent.remove(); -} -function shouldWrapTable(mediaQuery) { - return (mediaQuery || window.matchMedia(MOBILE_BREAKPOINT)).matches; -} -function addMediaQueryListener(mediaQuery, listener) { - mediaQuery.addEventListener('change', listener); -} -function removeMediaQueryListener(mediaQuery, listener) { - mediaQuery.removeEventListener('change', listener); -} -function applyResponsiveContentTable(el, mediaQuery) { - el.classList.add('card', 'card-table', 'entityTable'); - if (shouldWrapTable(mediaQuery)) { - ensureOverflowWrapper(el); - } else { - removeOverflowWrapper(el); - } -} -function unregisterResponsiveContentTable(el) { - const registration = registrations.get(el); - if (registration) { - removeMediaQueryListener(registration.mediaQuery, registration.listener); - registrations.delete(el); - } - removeOverflowWrapper(el); -} -function registerResponsiveContentTable(el) { - const existingRegistration = registrations.get(el); - if (existingRegistration) { - applyResponsiveContentTable(el, existingRegistration.mediaQuery); - return; - } - const mediaQuery = window.matchMedia(MOBILE_BREAKPOINT); - const listener = () => { - if (!el.isConnected) { - unregisterResponsiveContentTable(el); - return; - } - applyResponsiveContentTable(el, mediaQuery); - }; - addMediaQueryListener(mediaQuery, listener); - registrations.set(el, { - mediaQuery, - listener - }); - applyResponsiveContentTable(el, mediaQuery); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentTable/ContentTable.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -/* harmony default export */ var ContentTable = ({ - mounted(el, binding) { - var _binding$value; - if (binding !== null && binding !== void 0 && (_binding$value = binding.value) !== null && _binding$value !== void 0 && _binding$value.off) { - return; - } - registerResponsiveContentTable(el); - }, - updated(el, binding) { - var _binding$value2; - if (binding !== null && binding !== void 0 && (_binding$value2 = binding.value) !== null && _binding$value2 !== void 0 && _binding$value2.off) { - unregisterResponsiveContentTable(el); - return; - } - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => { - registerResponsiveContentTable(el); - }); - }, - beforeUnmount(el) { - unregisterResponsiveContentTable(el); - } -}); -// 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/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=04849007 - -const AjaxFormvue_type_template_id_04849007_hoisted_1 = { - ref: "root" -}; -function AjaxFormvue_type_template_id_04849007_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", AjaxFormvue_type_template_id_04849007_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { - formData: _ctx.formData, - submitApiMethod: _ctx.submitApiMethod, - sendJsonPayload: _ctx.sendJsonPayload, - noErrorNotification: _ctx.noErrorNotification, - noSuccessNotification: _ctx.noSuccessNotification, - submitForm: _ctx.submitForm, - isSubmitting: _ctx.isSubmitting, - successfulPostResponse: _ctx.successfulPostResponse, - errorPostResponse: _ctx.errorPostResponse - })], 512); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=04849007 - -// 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/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=script&lang=ts - - - - -const { - $: AjaxFormvue_type_script_lang_ts_$ -} = window; -/** - * Example usage: - * - * - * - * - * - * Data does not flow upwards in any way. :form-data is used for submitForm(), and the - * containing component binds to properties of the object in controls to fill the object. - */ -/* harmony default export */ var AjaxFormvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - formData: { - type: Object, - required: true - }, - submitApiMethod: { - type: String, - required: true - }, - sendJsonPayload: Boolean, - noErrorNotification: Boolean, - noSuccessNotification: Boolean - }, - data() { - return { - isSubmitting: false, - successfulPostResponse: null, - errorPostResponse: null - }; - }, - emits: ['update:modelValue'], - mounted() { - // on submit call controller submit method - AjaxFormvue_type_script_lang_ts_$(this.$refs.root).on('click', 'input[type=submit]', () => { - this.submitForm(); - }); - }, - methods: { - submitForm() { - this.successfulPostResponse = null; - this.errorPostResponse = null; - let postParams = this.formData; - if (this.sendJsonPayload) { - postParams = { - data: JSON.stringify(this.formData) - }; - } - this.isSubmitting = true; - AjaxHelper_AjaxHelper.post({ - module: 'API', - method: this.submitApiMethod - }, postParams, { - createErrorNotification: !this.noErrorNotification - }).then(response => { - this.successfulPostResponse = response; - if (!this.noSuccessNotification) { - const notificationInstanceId = Notifications_store.show({ - message: translate('General_YourChangesHaveBeenSaved'), - context: 'success', - type: 'toast', - id: 'ajaxHelper' - }); - Notifications_store.scrollToNotification(notificationInstanceId); - } - }).catch(error => { - this.errorPostResponse = error.message; - }).finally(() => { - this.isSubmitting = false; - }); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue - - - -AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_04849007_render - -/* harmony default export */ var AjaxForm = (AjaxFormvue_type_script_lang_ts); -// 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/CoreHome/vue/src/Passthrough/Passthrough.vue?vue&type=template&id=31c1d52c - -function Passthroughvue_type_template_id_31c1d52c_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default"); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Passthrough/Passthrough.vue?vue&type=template&id=31c1d52c - -// 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/CoreHome/vue/src/Passthrough/Passthrough.vue?vue&type=script&lang=ts - -/* harmony default export */ var Passthroughvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Passthrough/Passthrough.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Passthrough/Passthrough.vue - - - -Passthroughvue_type_script_lang_ts.render = Passthroughvue_type_template_id_31c1d52c_render - -/* harmony default export */ var Passthrough = (Passthroughvue_type_script_lang_ts); -// 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/CoreHome/vue/src/DataTable/DataTableActions.vue?vue&type=template&id=bc24b602 - -const DataTableActionsvue_type_template_id_bc24b602_hoisted_1 = { - key: 0 -}; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_2 = ["data-target", "title"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-configure" -}, null, -1); -const DataTableActionsvue_type_template_id_bc24b602_hoisted_4 = [DataTableActionsvue_type_template_id_bc24b602_hoisted_3]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_5 = ["data-target"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_6 = ["title"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_7 = ["title", "src"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_8 = ["id"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_9 = ["data-footer-icon-id"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_10 = ["title"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_11 = ["title", "src"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_12 = { - key: 2 -}; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_13 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: "divider" -}, null, -1); -const DataTableActionsvue_type_template_id_bc24b602_hoisted_14 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { - class: "divider" -}, null, -1); -const DataTableActionsvue_type_template_id_bc24b602_hoisted_15 = ["title"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_16 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-export" -}, null, -1); -const DataTableActionsvue_type_template_id_bc24b602_hoisted_17 = [DataTableActionsvue_type_template_id_bc24b602_hoisted_16]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_18 = ["title"]; -const DataTableActionsvue_type_template_id_bc24b602_hoisted_19 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-image" -}, null, -1); -const _hoisted_20 = [DataTableActionsvue_type_template_id_bc24b602_hoisted_19]; -const _hoisted_21 = ["title"]; -const _hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-annotation" -}, null, -1); -const _hoisted_23 = [_hoisted_22]; -const _hoisted_24 = ["title"]; -const _hoisted_25 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-search", - draggable: "false" -}, null, -1); -const _hoisted_26 = ["title"]; -const _hoisted_27 = ["id", "title"]; -const _hoisted_28 = ["title"]; -const _hoisted_29 = ["title", "src"]; -const _hoisted_30 = ["id"]; -const _hoisted_31 = { - key: 0 -}; -const _hoisted_32 = ["innerHTML"]; -const _hoisted_33 = { - key: 1 -}; -const _hoisted_34 = ["innerHTML"]; -const _hoisted_35 = { - key: 2 -}; -const _hoisted_36 = ["innerHTML"]; -const _hoisted_37 = { - key: 3 -}; -const _hoisted_38 = ["innerHTML"]; -const _hoisted_39 = { - key: 4 -}; -const _hoisted_40 = ["innerHTML"]; -const _hoisted_41 = { - key: 5 -}; -const _hoisted_42 = ["innerHTML"]; -const _hoisted_43 = ["title", "data-target"]; -const _hoisted_44 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-calendar" -}, null, -1); -const _hoisted_45 = { - class: "periodName" -}; -const _hoisted_46 = ["id"]; -const _hoisted_47 = ["data-period"]; -function DataTableActionsvue_type_template_id_bc24b602_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Passthrough = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Passthrough"); - const _directive_dropdown_button = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("dropdown-button"); - const _directive_report_export = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("report-export"); - return _ctx.showFooter && _ctx.showFooterIcons ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DataTableActionsvue_type_template_id_bc24b602_hoisted_1, [_ctx.hasConfigItems && (_ctx.isAnyConfigureIconHighlighted || _ctx.isTableView) ? 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"])("a", { - key: 0, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["dropdown-button dropdownConfigureIcon dataTableAction", { - highlighted: _ctx.isAnyConfigureIconHighlighted - }]), - href: "", - onClick: _cache[0] || (_cache[0] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])), - "data-target": `dropdownConfigure${_ctx.randomIdForDropdown}`, - title: _ctx.translate('CoreHome_ReportConfigure'), - style: { - "margin-right": "3.5px" - } - }, DataTableActionsvue_type_template_id_bc24b602_hoisted_4, 10, DataTableActionsvue_type_template_id_bc24b602_hoisted_2)), [[_directive_dropdown_button]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.hasFooterIconsToShow ? 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"])("a", { - key: 1, - class: "dropdown-button dataTableAction activateVisualizationSelection", - href: "", - "data-target": `dropdownVisualizations${_ctx.randomIdForDropdown}`, - style: { - "margin-right": "3.5px" - }, - onClick: _cache[1] || (_cache[1] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])) - }, [/^icon-/.test(_ctx.activeFooterIcon || '') ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - title: _ctx.translate('CoreHome_ChangeVisualization'), - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.activeFooterIcon) - }, null, 10, DataTableActionsvue_type_template_id_bc24b602_hoisted_6)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("img", { - key: 1, - title: _ctx.translate('CoreHome_ChangeVisualization'), - width: "16", - height: "16", - src: _ctx.activeFooterIcon - }, null, 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_7))], 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_5)), [[_directive_dropdown_button]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showFooterIcons ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { - key: 2, - id: `dropdownVisualizations${_ctx.randomIdForDropdown}`, - class: "dropdown-content dataTableFooterIcons" - }, [(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.footerIcons, (footerIconGroup, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Passthrough, { - key: index - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [(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"])(footerIconGroup.buttons.filter(i => !!i.icon), footerIcon => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: footerIcon.id - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`${footerIconGroup.class} tableIcon - ${_ctx.activeFooterIconIds.indexOf(footerIcon.id) !== -1 ? 'activeIcon' : ''}`), - "data-footer-icon-id": footerIcon.id - }, [/^icon-/.test(footerIcon.icon || '') ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - title: footerIcon.title, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(footerIcon.icon), - style: { - "margin-right": "5.5px" - } - }, null, 10, DataTableActionsvue_type_template_id_bc24b602_hoisted_10)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("img", { - key: 1, - width: "16", - height: "16", - title: footerIcon.title, - src: footerIcon.icon, - style: { - "margin-right": "5.5px" - } - }, null, 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_11)), footerIcon.title ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", DataTableActionsvue_type_template_id_bc24b602_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(footerIcon.title), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, DataTableActionsvue_type_template_id_bc24b602_hoisted_9)]); - }), 128)), DataTableActionsvue_type_template_id_bc24b602_hoisted_13]), - _: 2 - }, 1024); - }), 128)), DataTableActionsvue_type_template_id_bc24b602_hoisted_14], 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showExport ? 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"])("a", { - key: 3, - class: "dataTableAction activateExportSelection", - title: _ctx.translate('General_ExportThisReport'), - href: "", - style: { - "margin-right": "3.5px" - }, - onClick: _cache[2] || (_cache[2] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])) - }, DataTableActionsvue_type_template_id_bc24b602_hoisted_17, 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_15)), [[_directive_report_export, { - reportTitle: _ctx.reportTitle, - requestParams: _ctx.requestParams, - apiMethod: _ctx.apiMethodToRequestDataTable, - reportFormats: _ctx.reportFormats, - maxFilterLimit: _ctx.maxFilterLimit, - canExportFlat: _ctx.exportSupportsFlat - }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showExportAsImageIcon ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 4, - class: "dataTableAction tableIcon", - href: "", - id: "dataTableFooterExportAsImageIcon", - onClick: _cache[3] || (_cache[3] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])($event => _ctx.showExportImage($event), ["prevent"])), - title: _ctx.translate('General_ExportAsImage'), - style: { - "margin-right": "3.5px" - } - }, _hoisted_20, 8, DataTableActionsvue_type_template_id_bc24b602_hoisted_18)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showAnnotations ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 5, - class: "dataTableAction annotationView", - href: "", - title: _ctx.translate('Annotations_Annotations'), - onClick: _cache[4] || (_cache[4] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])), - style: { - "margin-right": "3.5px" - } - }, _hoisted_23, 8, _hoisted_21)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSearch ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 6, - class: "dropdown-button dataTableAction searchAction", - href: "", - title: _ctx.translate('General_Search'), - style: { - "margin-right": "3.5px" - }, - draggable: "false", - onClick: _cache[5] || (_cache[5] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])) - }, [_hoisted_25, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-close", - draggable: "false", - title: _ctx.translate('CoreHome_CloseSearch') - }, null, 8, _hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { - id: `widgetSearch_${_ctx.reportId}_${_ctx.placement}`, - title: _ctx.translate('CoreHome_DataTableHowToSearch'), - type: "text", - class: "dataTableSearchInput" - }, null, 8, _hoisted_27)], 8, _hoisted_24)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (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.dataTableActions, action => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: action.id, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`dataTableAction ${action.id}`), - href: "", - onClick: _cache[6] || (_cache[6] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])), - title: action.title, - style: { - "margin-right": "3.5px" - } - }, [/^icon-/.test(action.icon || '') ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(action.icon) - }, null, 2)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("img", { - key: 1, - width: "16", - height: "16", - title: action.title, - src: action.icon - }, null, 8, _hoisted_29))], 10, _hoisted_28); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { - id: `dropdownConfigure${_ctx.randomIdForDropdown}`, - class: "dropdown-content tableConfiguration" - }, [_ctx.showFlattenTable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_31, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTableFlatten", - innerHTML: _ctx.$sanitize(_ctx.flattenItemText) - }, null, 8, _hoisted_32)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showDimensionsConfigItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_33, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTableShowDimensions", - innerHTML: _ctx.$sanitize(_ctx.showDimensionsText) - }, null, 8, _hoisted_34)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showFlatConfigItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_35, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTableIncludeAggregateRows", - innerHTML: _ctx.$sanitize(_ctx.includeAggregateRowsText) - }, null, 8, _hoisted_36)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showTotalsConfigItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_37, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTableShowTotalsRow", - innerHTML: _ctx.$sanitize(_ctx.keepTotalsRowText) - }, null, 8, _hoisted_38)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showExcludeLowPopulation ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_39, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTableExcludeLowPopulation", - innerHTML: _ctx.$sanitize(_ctx.excludeLowPopText) - }, null, 8, _hoisted_40)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showPivotBySubtable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", _hoisted_41, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { - class: "configItem dataTablePivotBySubtable", - innerHTML: _ctx.$sanitize(_ctx.pivotByText) - }, null, 8, _hoisted_42)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, _hoisted_30), _ctx.showPeriods ? 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"])("a", { - key: 7, - class: "dropdown-button dataTableAction activatePeriodsSelection", - href: "", - onClick: _cache[7] || (_cache[7] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(() => {}, ["prevent"])), - title: _ctx.translate('CoreHome_ChangePeriod'), - "data-target": `dropdownPeriods${_ctx.randomIdForDropdown}` - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_hoisted_44, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_45, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translations[_ctx.clientSideParameters.period] || _ctx.clientSideParameters.period), 1)])], 8, _hoisted_43)), [[_directive_dropdown_button]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showPeriods ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { - key: 8, - id: `dropdownPeriods${_ctx.randomIdForDropdown}`, - class: "dropdown-content dataTablePeriods" - }, [(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.selectablePeriods, selectablePeriod => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: selectablePeriod - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - "data-period": selectablePeriod, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`tableIcon ${_ctx.clientSideParameters.period === selectablePeriod ? 'activeIcon' : ''}`) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translations[selectablePeriod] || selectablePeriod), 1)], 10, _hoisted_47)]); - }), 128))], 8, _hoisted_46)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DataTable/DataTableActions.vue?vue&type=template&id=bc24b602 - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function isBooleanLikeSet(value) { - return !!value && value !== '0'; -} -function resolveExportSupportsFlat(reportSupportsFlatten, flatParam) { - return reportSupportsFlatten || isBooleanLikeSet(flatParam); -} -// 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/CoreHome/vue/src/DataTable/DataTableActions.vue?vue&type=script&lang=ts - - - - - - -const { - $: DataTableActionsvue_type_script_lang_ts_$ -} = window; -function getSingleStateIconText(text, addDefault, replacement) { - if (/(%(.\$)?s+)/g.test(translate(text))) { - const values = ['
']; - if (replacement) { - values.push(replacement); - } - let result = translate(text, ...values); - if (addDefault) { - result += ` (${translate('CoreHome_Default')})`; - } - result += ''; - return result; - } - return translate(text); -} -function getToggledIconText(toggled, textToggled, textUntoggled) { - if (toggled) { - return getSingleStateIconText(textToggled, true); - } - return getSingleStateIconText(textUntoggled); -} -/* harmony default export */ var DataTableActionsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - showPeriods: Boolean, - showFooter: Boolean, - showFooterIcons: Boolean, - showSearch: Boolean, - showFlattenTable: Boolean, - reportSupportsFlatten: Boolean, - exportSupportsFlatten: Boolean, - footerIcons: { - type: Array, - required: true - }, - viewDataTable: { - type: String, - required: true - }, - reportTitle: String, - requestParams: { - type: Object, - required: true - }, - apiMethodToRequestDataTable: { - type: String, - required: true - }, - maxFilterLimit: { - type: Number, - required: true - }, - showExport: Boolean, - showExportAsImageIcon: Boolean, - showAnnotations: Boolean, - reportId: { - type: String, - required: true - }, - dataTableActions: { - type: Array, - required: true - }, - clientSideParameters: { - type: Object, - required: true - }, - hasMultipleDimensions: Boolean, - isDataTableEmpty: Boolean, - showTotalsRow: Boolean, - showExcludeLowPopulation: Boolean, - showPivotBySubtable: Boolean, - selectablePeriods: Array, - translations: { - type: Object, - required: true - }, - pivotDimensionName: String, - placement: { - type: String, - default: 'footer' - } - }, - components: { - Passthrough: Passthrough - }, - directives: { - DropdownButton: DropdownButton, - ReportExport: ReportExport - }, - methods: { - showExportImage(event) { - DataTableActionsvue_type_script_lang_ts_$(event.target).closest('.dataTable').find('div.jqplot-target').trigger('piwikExportAsImage'); - } - }, - computed: { - randomIdForDropdown() { - return Math.floor(Math.random() * 999999); - }, - allFooterIcons() { - return this.footerIcons.reduce((icons, footerIcon) => { - icons.push(...footerIcon.buttons); - return icons; - }, []); - }, - activeFooterIcons() { - const params = this.clientSideParameters; - const result = [this.viewDataTable]; - if (params.abandonedCarts === 0 || params.abandonedCarts === '0') { - result.push('ecommerceOrder'); - } else if (params.abandonedCarts === 1 || params.abandonedCarts === '1') { - result.push('ecommerceAbandonedCart'); - } - return result.map(id => this.allFooterIcons.find(button => button.id === id)).filter(icon => !!icon); - }, - activeFooterIcon() { - var _this$activeFooterIco; - return (_this$activeFooterIco = this.activeFooterIcons[0]) === null || _this$activeFooterIco === void 0 ? void 0 : _this$activeFooterIco.icon; - }, - activeFooterIconIds() { - return this.activeFooterIcons.map(icon => icon.id); - }, - numIcons() { - return this.allFooterIcons.length; - }, - hasFooterIconsToShow() { - return !!this.activeFooterIcons.length && this.numIcons > 1; - }, - reportFormats() { - const formats = { - TSV: 'TSV (Excel)', - HTML: 'HTML', - JSON: 'JSON', - XML: 'XML', - CSV: 'CSV', - RSS: 'RSS' - }; - return formats; - }, - exportSupportsFlat() { - return resolveExportSupportsFlat(!!this.exportSupportsFlatten, this.clientSideParameters.flat); - }, - showDimensionsConfigItem() { - return this.showFlattenTable && `${this.clientSideParameters.flat}` === '1' && this.hasMultipleDimensions; - }, - showFlatConfigItem() { - return this.showFlattenTable && `${this.clientSideParameters.flat}` === '1'; - }, - showTotalsConfigItem() { - return !this.isDataTableEmpty && this.showTotalsRow; - }, - hasConfigItems() { - return this.showFlattenTable || this.showDimensionsConfigItem || this.showFlatConfigItem || this.showTotalsConfigItem || this.showExcludeLowPopulation || this.showPivotBySubtable; - }, - flattenItemText() { - const params = this.clientSideParameters; - return getToggledIconText(isBooleanLikeSet(params.flat), 'CoreHome_UnFlattenDataTable', 'CoreHome_FlattenDataTable'); - }, - keepTotalsRowText() { - const params = this.clientSideParameters; - return getToggledIconText(isBooleanLikeSet(params.keep_totals_row), 'CoreHome_RemoveTotalsRowDataTable', 'CoreHome_AddTotalsRowDataTable'); - }, - includeAggregateRowsText() { - const params = this.clientSideParameters; - return getToggledIconText(isBooleanLikeSet(params.include_aggregate_rows), 'CoreHome_DataTableExcludeAggregateRows', 'CoreHome_DataTableIncludeAggregateRows'); - }, - showDimensionsText() { - const params = this.clientSideParameters; - return getToggledIconText(isBooleanLikeSet(params.show_dimensions), 'CoreHome_DataTableCombineDimensions', 'CoreHome_DataTableShowDimensions'); - }, - pivotByText() { - const params = this.clientSideParameters; - if (isBooleanLikeSet(params.pivotBy)) { - return getSingleStateIconText('CoreHome_UndoPivotBySubtable', true); - } - return getSingleStateIconText('CoreHome_PivotBySubtable', false, this.pivotDimensionName); - }, - excludeLowPopText() { - const params = this.clientSideParameters; - return getToggledIconText(isBooleanLikeSet(params.enable_filter_excludelowpop), 'CoreHome_IncludeRowsWithLowPopulation', 'CoreHome_ExcludeRowsWithLowPopulation'); - }, - isAnyConfigureIconHighlighted() { - const params = this.clientSideParameters; - return isBooleanLikeSet(params.flat) || isBooleanLikeSet(params.keep_totals_row) || isBooleanLikeSet(params.include_aggregate_rows) || isBooleanLikeSet(params.show_dimensions) || isBooleanLikeSet(params.pivotBy) || isBooleanLikeSet(params.enable_filter_excludelowpop); - }, - isTableView() { - return this.viewDataTable === 'table' || this.viewDataTable === 'tableAllColumns' || this.viewDataTable === 'tableGoals'; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DataTable/DataTableActions.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DataTable/DataTableActions.vue - - - -DataTableActionsvue_type_script_lang_ts.render = DataTableActionsvue_type_template_id_bc24b602_render - -/* harmony default export */ var DataTableActions = (DataTableActionsvue_type_script_lang_ts); -// 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/CoreHome/vue/src/VersionInfoHeaderMessage/VersionInfoHeaderMessage.vue?vue&type=template&id=23661bee - -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_1 = { - key: 0, - class: "title", - style: { - "cursor": "pointer" - }, - ref: "expander" -}; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-update" -}, null, -1); -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_3 = { - key: 1, - class: "title", - href: "?module=CoreUpdater&action=newVersionAvailable", - style: { - "cursor": "pointer" - }, - ref: "expander" -}; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "icon-update" -}, null, -1); -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_5 = ["innerHTML"]; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_6 = ["href"]; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_7 = { - id: "updateCheckLinkContainer" -}; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_8 = { - class: "dropdown positionInViewport" -}; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_9 = ["innerHTML"]; -const VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_10 = ["innerHTML"]; -function VersionInfoHeaderMessagevue_type_template_id_23661bee_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_Passthrough = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Passthrough"); - const _directive_expand_on_hover = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("expand-on-hover"); - return 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"])("div", { - id: "header_message", - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["piwikSelector", { - header_info: !_ctx.latestVersionAvailable || _ctx.lastUpdateCheckFailed, - update_available: _ctx.latestVersionAvailable - }]) - }, [_ctx.latestVersionAvailable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Passthrough, { - key: 0 - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [_ctx.isMultiServerEnvironment ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_1, [VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NewUpdatePiwikX', _ctx.latestVersionAvailable)), 1)], 512)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_3, [VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NewUpdatePiwikX', _ctx.latestVersionAvailable)), 1)], 512))]), - _: 1 - })) : _ctx.isSuperUser && (_ctx.isAdminArea || _ctx.lastUpdateCheckFailed) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Passthrough, { - key: 1 - }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [_ctx.isInternetEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 0, - class: "title", - innerHTML: _ctx.$sanitize(_ctx.updateCheck) - }, null, 8, VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_5)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { - key: 1, - class: "title", - href: _ctx.externalRawLink('https://matomo.org/changelog/'), - target: "_blank", - rel: "noreferrer noopener" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SeeAvailableVersions')), 1)], 8, VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_6))]), - _: 1 - })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_8, [_ctx.latestVersionAvailable && _ctx.isSuperUser ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - innerHTML: _ctx.$sanitize(_ctx.updateNowText) - }, null, 8, VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_9)) : _ctx.latestVersionAvailable && _ctx.hasSomeViewAccess && !_ctx.isAnonymous ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 1, - innerHTML: _ctx.$sanitize(_ctx.updateAvailableText) - }, null, 8, VersionInfoHeaderMessagevue_type_template_id_23661bee_hoisted_10)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_YouAreCurrentlyUsing', _ctx.piwikVersion)), 1)])], 2)), [[_directive_expand_on_hover, { - expander: 'expander' - }]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VersionInfoHeaderMessage/VersionInfoHeaderMessage.vue?vue&type=template&id=23661bee - -// 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/CoreHome/vue/src/VersionInfoHeaderMessage/VersionInfoHeaderMessage.vue?vue&type=script&lang=ts - - - - - -/* harmony default export */ var VersionInfoHeaderMessagevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - isMultiServerEnvironment: Boolean, - lastUpdateCheckFailed: Boolean, - latestVersionAvailable: String, - isSuperUser: Boolean, - isAdminArea: Boolean, - isInternetEnabled: Boolean, - updateCheck: String, - isAnonymous: Boolean, - hasSomeViewAccess: Boolean, - contactEmail: String, - piwikVersion: String - }, - components: { - Passthrough: Passthrough - }, - directives: { - ExpandOnHover: ExpandOnHover - }, - computed: { - updateNowText() { - let text = ''; - if (this.isMultiServerEnvironment) { - const link = externalRawLink(`https://builds.matomo.org/matomo-${this.latestVersionAvailable}.zip`); - text = translate('CoreHome_OneClickUpdateNotPossibleAsMultiServerEnvironment', `builds.matomo.org`); - } else { - text = translate('General_PiwikXIsAvailablePleaseUpdateNow', this.latestVersionAvailable || '', '
', '', externalLink('https://matomo.org/changelog/'), ''); - } - return `${text}
`; - }, - updateAvailableText() { - const updateSubject = translate('General_NewUpdatePiwikX', this.latestVersionAvailable || ''); - /* eslint-disable prefer-template */ - const matomoLink = externalLink('https://matomo.org/') + 'Matomo'; - const changelogLinkStart = externalLink('https://matomo.org/changelog/'); - const text = translate('General_PiwikXIsAvailablePleaseNotifyPiwikAdmin', `${matomoLink} ${changelogLinkStart}${this.latestVersionAvailable}`, ``, ''); - return `${text}
`; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VersionInfoHeaderMessage/VersionInfoHeaderMessage.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/VersionInfoHeaderMessage/VersionInfoHeaderMessage.vue - - - -VersionInfoHeaderMessagevue_type_script_lang_ts.render = VersionInfoHeaderMessagevue_type_template_id_23661bee_render - -/* harmony default export */ var VersionInfoHeaderMessage = (VersionInfoHeaderMessagevue_type_script_lang_ts); -// 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/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue?vue&type=template&id=49f29e13 - -const MobileLeftMenuvue_type_template_id_49f29e13_hoisted_1 = { - id: "mobile-left-menu", - class: "sidenav hide-on-large-only" -}; -const MobileLeftMenuvue_type_template_id_49f29e13_hoisted_2 = { - class: "collapsible collapsible-accordion" -}; -const MobileLeftMenuvue_type_template_id_49f29e13_hoisted_3 = { - class: "collapsible-header" -}; -const MobileLeftMenuvue_type_template_id_49f29e13_hoisted_4 = { - class: "collapsible-body" -}; -const MobileLeftMenuvue_type_template_id_49f29e13_hoisted_5 = ["title", "href"]; -function MobileLeftMenuvue_type_template_id_49f29e13_render(_ctx, _cache, $props, $setup, $data, $options) { - const _directive_side_nav = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("side-nav"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", MobileLeftMenuvue_type_template_id_49f29e13_hoisted_1, [(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.menuWithSubmenuItems, (level2, level1) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - class: "no-padding", - key: level1 - }, [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"])("ul", MobileLeftMenuvue_type_template_id_49f29e13_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", MobileLeftMenuvue_type_template_id_49f29e13_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translateOrDefault(level1)), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(level2._icon || 'icon-chevron-down') - }, null, 2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", MobileLeftMenuvue_type_template_id_49f29e13_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", 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"])(Object.entries(level2).filter(([n]) => n[0] !== '_'), ([name, params]) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: name - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { - title: params._tooltip ? _ctx.translateIfNecessary(params._tooltip) : '', - target: "_self", - href: _ctx.getMenuUrl(params._url) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translateIfNecessary(name)), 9, MobileLeftMenuvue_type_template_id_49f29e13_hoisted_5)]); - }), 128))])])])])), [[_directive_side_nav, { - activator: _ctx.activateLeftMenu - }]])]); - }), 128))]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue?vue&type=template&id=49f29e13 - -// 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/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue?vue&type=script&lang=ts - - - - -const { - $: MobileLeftMenuvue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var MobileLeftMenuvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - menu: { - type: Object, - required: true - } - }, - directives: { - SideNav: SideNav - }, - methods: { - getMenuUrl(params) { - return `?${src_MatomoUrl_MatomoUrl.stringify(Object.assign(Object.assign({}, src_MatomoUrl_MatomoUrl.urlParsed.value), params))}`; - }, - translateIfNecessary(name) { - if (name.includes('_')) { - return translate(name); - } - return name; - } - }, - computed: { - menuWithSubmenuItems() { - const menu = this.menu || {}; - return Object.fromEntries(Object.entries(menu) - // remove submenus that have no items that do not start w/ '_' - .filter(([, level2]) => { - const itemsWithoutUnderscore = Object.entries(level2).filter(([name]) => name[0] !== '_'); - return Object.keys(itemsWithoutUnderscore).length; - })); - }, - activateLeftMenu() { - return MobileLeftMenuvue_type_script_lang_ts_$('nav .activateLeftMenu')[0]; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue - - - -MobileLeftMenuvue_type_script_lang_ts.render = MobileLeftMenuvue_type_template_id_49f29e13_render - -/* harmony default export */ var MobileLeftMenu = (MobileLeftMenuvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/scrollToAnchorInUrl.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - -const { - $: scrollToAnchorInUrl_$ -} = window; -function scrollToAnchorNode($node) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - scrollToAnchorInUrl_$.scrollTo($node, 20); -} -function preventDefaultIfEventExists(event) { - if (event) { - event.preventDefault(); - } -} -function scrollToAnchorIfPossible(hash, event) { - var _$node, _$node2; - if (!hash) { - return; - } - if (hash.indexOf('&') !== -1) { - return; - } - let $node = null; - try { - $node = scrollToAnchorInUrl_$(`#${hash}`); - } catch (err) { - // on jquery syntax error, ignore so nothing is logged to the console - return; - } - if ((_$node = $node) !== null && _$node !== void 0 && _$node.length) { - scrollToAnchorNode($node); - preventDefaultIfEventExists(event); - return; - } - $node = scrollToAnchorInUrl_$(`a[name=${hash}]`); - if ((_$node2 = $node) !== null && _$node2 !== void 0 && _$node2.length) { - scrollToAnchorNode($node); - preventDefaultIfEventExists(event); - } -} -function isLinkWithinSamePage(location, newUrl) { - if (location && location.origin && newUrl.indexOf(location.origin) === -1) { - // link to different domain - return false; - } - if (location && location.pathname && newUrl.indexOf(location.pathname) === -1) { - // link to different path - return false; - } - if (location && location.search && newUrl.indexOf(location.search) === -1) { - // link with different search - return false; - } - return true; -} -function handleScrollToAnchorIfPresentOnPageLoad() { - if (window.location.hash.slice(0, 2) === '#/') { - const hash = window.location.hash.slice(2); - scrollToAnchorIfPossible(hash, null); - } -} -function handleScrollToAnchorAfterPageLoad() { - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => src_MatomoUrl_MatomoUrl.url.value, (newUrl, oldUrl) => { - if (!newUrl) { - return; - } - const hashPos = newUrl.href.indexOf('#/'); - if (hashPos === -1) { - return; - } - if (oldUrl && !isLinkWithinSamePage(oldUrl, newUrl.href)) { - return; - } - const hash = newUrl.href.slice(hashPos + 2); - scrollToAnchorIfPossible(hash, null); - }); -} -handleScrollToAnchorAfterPageLoad(); -scrollToAnchorInUrl_$(handleScrollToAnchorIfPresentOnPageLoad); -function scrollToAnchorInUrl() { - // may be called when page is only fully loaded after some additional requests - // timeout needed to ensure Vue rendered fully - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(handleScrollToAnchorIfPresentOnPageLoad); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AutoClearPassword/AutoClearPassword.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function collectPasswordInputs(el) { - const targets = []; - if (el.tagName === 'INPUT' && el.type === 'password') { - targets.push(el); - } else { - const nested = el.querySelectorAll('input[type="password"]'); - nested.forEach(nestedEl => targets.push(nestedEl)); - } - return targets; -} -function setupAutoClear(el, delay) { - let timeoutId; - let lastValue = el.value; - const clearValue = () => { - el.value = ''; - el.dispatchEvent(new Event('input')); - }; - const resetTimer = () => { - if (timeoutId) clearTimeout(timeoutId); - timeoutId = setTimeout(clearValue, delay * 1000); - }; - const inputListener = () => resetTimer(); - const changeListener = () => resetTimer(); - el.addEventListener('input', inputListener); - el.addEventListener('change', changeListener); - el.dataset.autoClearEnabled = 'true'; - const intervalId = setInterval(() => { - if (el.value !== lastValue) { - lastValue = el.value; - resetTimer(); - } - }, 300); - el.onUmounted = { - cleanup() { - clearTimeout(timeoutId); - clearInterval(intervalId); - el.removeEventListener('input', inputListener); - el.removeEventListener('change', changeListener); - delete el.dataset.autoClearEnabled; - } - }; -} -/* harmony default export */ var AutoClearPassword = ({ - mounted(el, binding) { - const delay = binding.value && binding.value.delay || 600; - const targets = collectPasswordInputs(el); - targets.forEach(input => setupAutoClear(input, delay)); - }, - unmounted(el) { - const targets = collectPasswordInputs(el); - targets.forEach(e => { - if (e.onUmounted && typeof e.onUmounted.cleanup === 'function') { - e.onUmounted.cleanup(); - delete e.onUmounted; - } - }); - } -}); -// 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/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue?vue&type=template&id=07fc5e99 - -const PasswordStrengthvue_type_template_id_07fc5e99_hoisted_1 = { - key: 0, - class: "password-strength row" -}; -function PasswordStrengthvue_type_template_id_07fc5e99_render(_ctx, _cache, $props, $setup, $data, $options) { - return _ctx.rules.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", PasswordStrengthvue_type_template_id_07fc5e99_hoisted_1, [(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.rules, rule => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: rule.ruleText, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(`col s12 xl6 rule rule-${_ctx.ruleStatus(rule)}`) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ - 'icon': true, - 'icon-ok': _ctx.ruleStatus(rule) === 'valid', - 'icon-close': _ctx.ruleStatus(rule) === 'invalid', - 'icon-circle': _ctx.ruleStatus(rule) === 'undefined' - }) - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(rule.ruleText), 1)], 2); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue?vue&type=template&id=07fc5e99 - -// 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/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue?vue&type=script&lang=ts - -/* harmony default export */ var PasswordStrengthvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - validationRules: { - type: Array, - required: true - }, - password: { - type: String, - default: '' - }, - externalInputSelector: { - type: String, - default: '' - } - }, - data() { - return { - pwd: '', - rules: [] - }; - }, - emits: ['check:isValid'], - watch: { - pwdValue: { - immediate: true, - handler(pwd) { - const rulesValidity = []; - this.rules.forEach(rule => { - if (!pwd.length && typeof rule.passed !== 'undefined') { - delete rule.passed; - return; - } - try { - const regex = new RegExp(rule.validationRegex.replace(/^\/|\/$/g, '')); - if (regex.test(pwd)) { - rule.passed = true; - rulesValidity.push(true); - } else { - rule.passed = false; - } - } catch (e) { - console.log('Invalid password validation pattern:', e); - } - }); - if (this.rules.length > 0 && rulesValidity.length === this.rules.length) { - this.$emit('check:isValid', true); - } - } - } - }, - computed: { - pwdValue() { - var _this$externalInputSe; - if ((_this$externalInputSe = this.externalInputSelector) !== null && _this$externalInputSe !== void 0 && _this$externalInputSe.length) { - return this.pwd; - } - return this.password; - } - }, - mounted() { - var _this$externalInputSe2; - this.rules = this.validationRules.length ? this.validationRules.map(rule => Object.assign({}, rule)) : []; - if ((_this$externalInputSe2 = this.externalInputSelector) !== null && _this$externalInputSe2 !== void 0 && _this$externalInputSe2.length) { - const input = document.querySelector(this.externalInputSelector); - if (input) { - input.addEventListener('input', this.handleExternalInput); - this.pwd = input.value; - } - } - }, - unmounted() { - var _this$externalInputSe3; - if ((_this$externalInputSe3 = this.externalInputSelector) !== null && _this$externalInputSe3 !== void 0 && _this$externalInputSe3.length) { - const input = document.querySelector(this.externalInputSelector); - if (input) { - input.removeEventListener('input', this.handleExternalInput); - } - } - }, - methods: { - ruleStatus(rule) { - if (typeof rule.passed === 'undefined') { - return 'undefined'; - } - return rule.passed ? 'valid' : 'invalid'; - }, - handleExternalInput(event) { - const target = event.target; - this.pwd = target.value; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue - - - -PasswordStrengthvue_type_script_lang_ts.render = PasswordStrengthvue_type_template_id_07fc5e99_render - -/* harmony default export */ var PasswordStrength = (PasswordStrengthvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -// 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/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue?vue&type=template&id=6c83e020 - -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_1 = { - class: "main-duplicator-modal-content" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_2 = { - class: "modal-header" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: "btn-close modal-close" -}, [/*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { - class: "icon-close" -})], -1); -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_4 = { - key: 0, - class: "modal-sub-header" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_5 = { - class: "loading-message" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_6 = { - key: 0, - class: "modal-sub-header" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_7 = ["innerHTML"]; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_8 = { - class: "modal-content" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_9 = { - class: "modal-inputs" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_10 = { - class: "modal-sub-footer" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_11 = ["innerHTML"]; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_12 = ["innerHTML"]; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_13 = { - class: "modal-footer" -}; -const EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_14 = ["disabled"]; -function EntityDuplicatorModalvue_type_template_id_6c83e020_render(_ctx, _cache, $props, $setup, $data, $options) { - const _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); - const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - const _directive_form = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("form"); - 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"])({ - 'modal': true, - 'entity-duplicator-modal': true, - 'slot-configured': _ctx.$slots.default - }), - ref: "root" - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_2, [EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getModalTitle), 1)]), _ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Loading')), 1)])) : (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"], { - key: 1 - }, [!_ctx.hideSiteSelector ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getDuplicateDescription) + " ", 1), _ctx.descriptionLearnMoreLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { - key: 0, - innerHTML: _ctx.$sanitize(_ctx.getLearnMoreLink) - }, null, 8, EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { - uicontrol: "site", - name: "siteSelector", - title: _ctx.translate('CoreHome_ChooseWebsite'), - modelValue: _ctx.destinationSite, - "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.destinationSite = $event), - "ui-control-attributes": { - onlySitesWithAtLeastWriteAccess: true, - siteTypesToExclude: ['rollup'] - } - }, null, 8, ["title", "modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_8, [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"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])), [[_directive_form]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_10, [_ctx.duplicationErrors.length > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - key: 0, - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ - 'alert': true, - 'alert-danger': true, - 'error-list': _ctx.duplicationErrors.length > 1 - }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", 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.duplicationErrors, (duplicationError, index) => { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { - key: index, - innerHTML: _ctx.$sanitize(duplicationError) - }, null, 8, EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_11); - }), 128))])], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { - class: "note-text", - innerHTML: _ctx.$sanitize(_ctx.getNoteText) - }, null, 8, EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_12)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader, null, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasBeenSubmitted]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { - class: "btn", - disabled: !_ctx.getIsValid || _ctx.hasBeenSubmitted, - onClick: _cache[1] || (_cache[1] = $event => _ctx.submitRequest()) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Copy')), 9, EntityDuplicatorModalvue_type_template_id_6c83e020_hoisted_14)])], 64))], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isModalVisible]])], 2); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue?vue&type=template&id=6c83e020 - -// 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/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue?vue&type=script&lang=ts - - - - - -// async since we're referencing a recursive component -const EntityDuplicatorModalvue_type_script_lang_ts_Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -const Form = useExternalPluginComponent('CorePluginsAdmin', 'Form'); -const { - $: EntityDuplicatorModalvue_type_script_lang_ts_$ -} = window; -/* harmony default export */ var EntityDuplicatorModalvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - directives: { - Form - }, - components: { - Field: EntityDuplicatorModalvue_type_script_lang_ts_Field, - MatomoLoader: MatomoLoader - }, - props: { - /** - * The reactive class for controlling the settings of the modal from multiple components. - */ - modalStore: { - type: Object, - required: true - }, - /** - * Option to hide the site selector when it's not needed. - */ - hideSiteSelector: { - type: Boolean, - default: false - }, - /** - * Optional "Learn more." link to append to the end of the description text if provided. - */ - descriptionLearnMoreLink: { - type: String, - default: '' - } - }, - data() { - return { - isLoading: true, - isValidated: false, - duplicationErrors: [], - destinationSite: null, - hasBeenSubmitted: false - }; - }, - watch: { - isModalVisible(newValue) { - if (!newValue) { - return; - } - // Call adapter's beforeShowModal if defined - let beforeShowModal; - if (this.modalStore.adapter.beforeShowModal) { - beforeShowModal = this.modalStore.adapter.beforeShowModal(); - } - // If a promise was returned, leave as loading until the promise is resolved - if (!beforeShowModal || typeof beforeShowModal === 'undefined') { - beforeShowModal = new Promise(resolve => resolve()); - } - this.showModal(); - // If a promise was returned, use that to set the state at the right time - beforeShowModal.then(() => { - this.isLoading = false; - }); - }, - destinationSite() { - // Reset flag since the data has changed since validation - this.isValidated = false; - } - }, - methods: { - closeModal() { - const root = this.$refs.root; - const $root = EntityDuplicatorModalvue_type_script_lang_ts_$(root); - $root.modal('close'); - }, - resetModal() { - this.modalStore.hideModal(); - this.destinationSite = null; - this.isLoading = true; - this.isValidated = false; - this.duplicationErrors = []; - this.hasBeenSubmitted = false; - }, - showModal() { - const root = this.$refs.root; - const $root = EntityDuplicatorModalvue_type_script_lang_ts_$(root); - $root.modal({ - dismissible: true, - onCloseEnd: () => { - this.resetModal(); - } - }).modal('open'); - }, - submitRequest() { - this.hasBeenSubmitted = true; - // Make sure the validation passes before making the server request - this.getValidationResultPromise().then(validationResult => { - var _this$destinationSite; - if (!validationResult.isValid && validationResult.errorMessages.length > 0) { - this.isValidated = true; - this.hasBeenSubmitted = false; - this.duplicationErrors = validationResult.errorMessages; - return; - } - // Use adapter to prepare API parameters - const params = this.modalStore.adapter.prepareApiParams(this.modalStore.getFormValues((_this$destinationSite = this.destinationSite) === null || _this$destinationSite === void 0 ? void 0 : _this$destinationSite.id)); - // Use adapter to submit the request - this.modalStore.adapter.submitRequest(params).then(response => { - if (!response || !response.success) { - this.setErrorMessages(response); - return; - } - // Call adapter's onSuccess if defined - if (this.modalStore.adapter.onSuccess) { - this.modalStore.adapter.onSuccess(response); - } - this.closeModal(); - }).catch(error => { - this.setErrorMessages(); - // Call adapter's onFailure if defined - if (this.modalStore.adapter.onFailure) { - this.modalStore.adapter.onFailure(error); - } - console.log('Unexpected server error during request.', error); - }).finally(() => { - this.hasBeenSubmitted = false; - }); - }); - }, - getValidationResultPromise() { - var _this$destinationSite2; - this.duplicationErrors = []; - // Use adapter for validation - const validationResultPromise = this.modalStore.adapter.validateFormFields(this.modalStore.getFormValues((_this$destinationSite2 = this.destinationSite) === null || _this$destinationSite2 === void 0 ? void 0 : _this$destinationSite2.id)); - // If a promise wasn't returned wrap the result with a promise for consistent processing - return 'isValid' in validationResultPromise ? new Promise(resolve => resolve(validationResultPromise)) : validationResultPromise; - }, - setErrorMessages(response = null) { - let message = (response === null || response === void 0 ? void 0 : response.message) || ''; - // If the error message wasn't set, set it to a generic error message - if (!message || message.length === 0) { - message = translate('General_ErrorRequest', '', ''); - } - this.duplicationErrors = []; - this.duplicationErrors.push(message); - } - }, - mounted() { - // Watch the formData object for any property changes to know whether current data was validated - Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => this.modalStore.state.entityFormData, () => { - this.isValidated = false; - }, { - deep: true - }); - }, - computed: { - isModalVisible() { - var _this$modalStore$stat; - return (_this$modalStore$stat = this.modalStore.state.isModalVisible) !== null && _this$modalStore$stat !== void 0 ? _this$modalStore$stat : false; - }, - getModalTitle() { - return translate('CoreHome_CopyX', this.modalStore.getEntityTypeTranslation); - }, - getNoteText() { - const noteText = translate('CoreHome_CopyModalNote', '', '', this.modalStore.getEntityTypeTranslation); - return `${noteText}`; - }, - getDuplicateDescription() { - return translate('CoreHome_CopyXDescription', this.modalStore.getEntityTypeTranslation); - }, - getLearnMoreLink() { - if (!this.descriptionLearnMoreLink) { - return ''; - } - const linkString = externalLink(this.descriptionLearnMoreLink); - return translate('CoreHome_LearnMoreFullStop', linkString, ''); - }, - getIsValid() { - // Show as valid until validation has actually been checked - if (!this.isValidated) { - return true; - } - return Array.isArray(this.duplicationErrors) && this.duplicationErrors.length === 0; - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue - - - -EntityDuplicatorModalvue_type_script_lang_ts.render = EntityDuplicatorModalvue_type_template_id_6c83e020_render - -/* harmony default export */ var EntityDuplicatorModal = (EntityDuplicatorModalvue_type_script_lang_ts); -// 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/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue?vue&type=template&id=4fcb6fd6 - -const EntityDuplicatorActionvue_type_template_id_4fcb6fd6_hoisted_1 = ["title", "aria-disabled"]; -function EntityDuplicatorActionvue_type_template_id_4fcb6fd6_render(_ctx, _cache, $props, $setup, $data, $options) { - const _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return 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"])("a", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ - 'entity-duplicator-action': true, - 'table-action': true, - 'icon-content-copy': true, - 'is-disabled': !_ctx.isActionEnabled - }, _ctx.extraClasses]), - title: _ctx.getActionTooltip, - "aria-disabled": !_ctx.isActionEnabled, - onClick: _cache[0] || (_cache[0] = $event => !_ctx.isActionEnabled || _ctx.handleClick()) - }, null, 10, EntityDuplicatorActionvue_type_template_id_4fcb6fd6_hoisted_1)), [[_directive_tooltips], [external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isActionVisible]]); -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue?vue&type=template&id=4fcb6fd6 - -// 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/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue?vue&type=script&lang=ts - - - -/* harmony default export */ var EntityDuplicatorActionvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: { - /** - * Useful data to pass to the modal, such as the ID for which entity this action triggers a copy - */ - actionFormData: { - type: Object, - required: true - }, - /** - * The reactive class for controlling the settings of the modal from multiple components. - */ - modalStore: { - type: Object, - required: true - }, - /** - * Indicates whether the action should be shown. - */ - isActionVisible: { - type: Boolean, - required: true - }, - /** - * Allows disabling the action (if you want it visible, but not active). - */ - isActionEnabled: { - type: Boolean, - default: false - }, - /** - * Allows setting custom tooltip text. The default is 'Copy {entityTypeTranslation}'. - */ - tooltipTextOverride: { - type: String, - default: '' - }, - /** - * Custom tooltip text used when the action is disabled, great for explaining why it's disabled. - */ - tooltipTextOverrideDisabled: { - type: String, - default: '' - }, - /** - * Optional property to provide any custom classes to the root of the action's anchor element - */ - extraClasses: { - type: [String, Array, Object], - default: '' - } - }, - directives: { - Tooltips: Tooltips - }, - methods: { - handleClick() { - this.modalStore.showModal(this.actionFormData); - } - }, - computed: { - getActionTooltip() { - if (this.isActionEnabled && this.tooltipTextOverride.length) { - return translateOrDefault(this.tooltipTextOverride); - } - if (!this.isActionEnabled && this.tooltipTextOverrideDisabled.length) { - return translateOrDefault(this.tooltipTextOverrideDisabled); - } - return translate('CoreHome_CopyX', this.modalStore.getEntityTypeTranslation); - } - } -})); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue?vue&type=script&lang=ts - -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue - - - -EntityDuplicatorActionvue_type_script_lang_ts.render = EntityDuplicatorActionvue_type_template_id_4fcb6fd6_render - -/* harmony default export */ var EntityDuplicatorAction = (EntityDuplicatorActionvue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAdapter.ts -function EntityDuplicatorAdapter_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - -class EntityDuplicatorAdapter_BaseDuplicatorAdapter { - constructor(properties) { - EntityDuplicatorAdapter_defineProperty(this, "module", void 0); - EntityDuplicatorAdapter_defineProperty(this, "method", void 0); - EntityDuplicatorAdapter_defineProperty(this, "format", void 0); - EntityDuplicatorAdapter_defineProperty(this, "requiredFields", void 0); - this.module = properties.module || 'API'; - this.method = properties.method; - this.format = properties.format || 'json'; - this.requiredFields = properties.requiredFields || ['idSite', 'idDestinationSites']; - } - async validateFormFields(formValues) { - const errorMessages = []; - this.requiredFields.forEach(fieldName => { - if (!(fieldName in formValues) || !formValues[fieldName]) { - errorMessages.push(translate('General_Required', fieldName)); - } - }); - return new Promise(resolve => resolve({ - errorMessages, - isValid: errorMessages.length === 0 - })); - } - prepareApiParams(formValues) { - return Object.assign({ - idSite: Matomo_Matomo.idSite || src_MatomoUrl_MatomoUrl.parsed.value.idSite, - idDestinationSites: [formValues.idDestinationSite] - }, formValues); - } - async submitRequest(params) { - // Override the defaults if provided in the params and then remove them from the params - this.module = params.module || this.module; - this.method = params.method || this.method; - this.format = params.format || this.format; - const postParams = params; - if (!this.method || this.method.length < 1) { - throw new Error('The POST method cannot be empty!'); - } - const ajax = new AjaxHelper_AjaxHelper(); - // Force callback but leave it empty so that API errors are only displayed in the modal - ajax.useCallbackInCaseOfError(); - ajax.setErrorCallback(null); - // Remove some default parameters as they aren't applicable to copying existing reports - ajax.removeDefaultParameter('date'); - ajax.removeDefaultParameter('period'); - ajax.removeDefaultParameter('segment'); - // Set the main params as part of the URL - ajax.addParams({ - module: this.module, - method: this.method, - format: this.format - }, 'GET'); - ajax.addParams(postParams, 'POST'); - ajax.setFormat(this.format); - return ajax.send(); - } - onSuccess(response) { - // In case a promise wasn't returned, wrap the result with a promise for consistent processing - let onSuccessCallbackPromise = new Promise(resolve => resolve()); - if (this.onSuccessCallback) { - onSuccessCallbackPromise = this.onSuccessCallback(response); - } - onSuccessCallbackPromise.then(() => { - // Show the success message returned by the API - setTimeout(() => { - const notificationInstanceId = Notifications_store.show({ - message: response.message, - context: response.success ? 'success' : 'error', - type: 'toast', - id: 'entityDuplicationResult' - }); - Notifications_store.scrollToNotification(notificationInstanceId); - }); - }); - } -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorStore.ts -function EntityDuplicatorStore_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - -class EntityDuplicatorStore_EntityDuplicatorStore { - /** - * Protected so that the buildStoreInstance has to be used. This ensures that the modal store is - * instantiated as a reactive object. See buildStoreInstance for more documentation. - * - * @param duplicateEntityTypeTranslation - * @param adapterDefinition - * @param commonFormData - * @protected - */ - constructor(duplicateEntityTypeTranslation, adapterDefinition, commonFormData) { - EntityDuplicatorStore_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - isModalVisible: false, - commonFormData: {}, - entityFormData: {}, - entityTypeTranslation: '' - })); - /** - * The adapter class defines the implementation/behaviour of common part of the duplication - * process such as validation, gathering parameters, posting to the API, and handling success. - */ - EntityDuplicatorStore_defineProperty(this, "adapter", void 0); - this.state.entityTypeTranslation = duplicateEntityTypeTranslation; - this.adapter = 'validateFormFields' in adapterDefinition ? adapterDefinition : new EntityDuplicatorAdapter_BaseDuplicatorAdapter(adapterDefinition); - this.state.commonFormData = commonFormData !== null && commonFormData !== void 0 ? commonFormData : {}; - } - /** - * Returns a reactive store object for the specific type of entity being copied so that it can be - * used to maintain the state of the modal across all the actions which trigger showing the modal. - * See the property descriptions of the EntityDuplicatorState interface for more information. - * - * @param duplicateEntityTypeTranslation Translation string or translated string of the item being - * duplicated. E.g. goal, funnel, heatmap,... - * @param adapterDefinition Either an instance of EntityDuplicatorAdapter or an object containing - * the properties necessary to instantiate an instance of the default BaseDuplicatorAdapter. This - * allows encapsulating the desired implementation of how the modal behaves such as validation - * and posting the API request. - * @param commonFormData Optional form data that's common to the type of entity being duplicated. - * E.g. status to set for the new copies or something similar. - */ - static buildStoreInstance(duplicateEntityTypeTranslation, adapterDefinition, commonFormData) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])(new EntityDuplicatorStore_EntityDuplicatorStore(duplicateEntityTypeTranslation, adapterDefinition, commonFormData)); - } - showModal(entityFormData) { - // Make sure that we start fresh - this.resetFormData(); - // Update the store with any provided form data - Object.entries(entityFormData !== null && entityFormData !== void 0 ? entityFormData : {}).forEach(([key, value]) => { - this.state.entityFormData[key] = value; - }); - this.state.isModalVisible = true; - } - hideModal() { - this.state.isModalVisible = false; - this.resetFormData(); - } - resetFormData() { - // Remove all properties (preserves the original object reference) - Object.keys(this.state.entityFormData).forEach(key => { - delete this.state.entityFormData[key]; - }); - } - getFormValues(idDestinationSites) { - const idDestinationSitesArray = Array.isArray(idDestinationSites) ? idDestinationSites : []; - if (idDestinationSites && !Array.isArray(idDestinationSites)) { - idDestinationSitesArray.push(idDestinationSites); - } - return Object.assign(Object.assign({ - idSite: Matomo_Matomo.idSite || src_MatomoUrl_MatomoUrl.parsed.value.idSite, - idDestinationSites: idDestinationSitesArray - }, this.state.commonFormData), this.state.entityFormData); - } - /** - * Uses the entityTypeTranslation property to return the translated entity type (e.g. - * goal, funnel, segment, ...), which can be a translated string or translation key. If the value - * is a translation key, the translated value will be returned. If no value is set, the default is - * the translation of 'report'. - */ - get getEntityTypeTranslation() { - // Default to 'report' if no value is provided via entityTypeTranslation - let translationKey = 'CoreHome_ReportLowercase'; - if (this.state.entityTypeTranslation) { - translationKey = this.state.entityTypeTranslation; - } - // Only translate if it's a translation key and not an already translated string - return translateOrDefault(translationKey); - } -} -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/index.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js - - - - -/***/ }) - -/******/ }); -}); -//# sourceMappingURL=CoreHome.umd.js.map \ No newline at end of file diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js deleted file mode 100644 index 6f952aa6c8dc205a2870fb55e34c91921f4ec060..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ /dev/null @@ -1,404 +0,0 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function o(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,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="plugins/CoreHome/vue/dist/",o(o.s="fae3")}({2342:function(e,t,o){"use strict"; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.hasBlockedContent=!1},"8bbf":function(t,o){t.exports=e},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"createVueApp",(function(){return ve})),o.d(t,"importPluginUmd",(function(){return Se})),o.d(t,"useExternalPluginComponent",(function(){return Ce})),o.d(t,"DirectiveUtilities",(function(){return De})),o.d(t,"debounce",(function(){return Pe})),o.d(t,"clone",(function(){return Te})),o.d(t,"VueEntryContainer",(function(){return Ne})),o.d(t,"ActivityIndicator",(function(){return We})),o.d(t,"MatomoLoader",(function(){return Ue})),o.d(t,"translate",(function(){return a})),o.d(t,"translateOrDefault",(function(){return r})),o.d(t,"externalRawLink",(function(){return ue})),o.d(t,"externalLink",(function(){return pe})),o.d(t,"Alert",(function(){return Ke})),o.d(t,"AjaxHelper",(function(){return te})),o.d(t,"setCookie",(function(){return q})),o.d(t,"getCookie",(function(){return W})),o.d(t,"deleteCookie",(function(){return z})),o.d(t,"MatomoUrl",(function(){return U})),o.d(t,"Matomo",(function(){return M})),o.d(t,"Periods",(function(){return c})),o.d(t,"Day",(function(){return f})),o.d(t,"Week",(function(){return O})),o.d(t,"Month",(function(){return j})),o.d(t,"Year",(function(){return S})),o.d(t,"Range",(function(){return k})),o.d(t,"format",(function(){return d})),o.d(t,"getToday",(function(){return u})),o.d(t,"parseDate",(function(){return p})),o.d(t,"todayIsInRange",(function(){return m})),o.d(t,"getWeekNumber",(function(){return h})),o.d(t,"datesAreInTheSamePeriod",(function(){return g})),o.d(t,"NumberFormatter",(function(){return ae})),o.d(t,"formatNumber",(function(){return me})),o.d(t,"formatPercent",(function(){return he})),o.d(t,"formatCurrency",(function(){return ge})),o.d(t,"formatEvolution",(function(){return be})),o.d(t,"calculateAndFormatEvolution",(function(){return fe})),o.d(t,"DropdownMenu",(function(){return Ye})),o.d(t,"FocusAnywhereButHere",(function(){return tt})),o.d(t,"FocusIf",(function(){return it})),o.d(t,"Tooltips",(function(){return ct})),o.d(t,"MatomoDialog",(function(){return mt})),o.d(t,"MatomoModal",(function(){return vt})),o.d(t,"ExpandOnClick",(function(){return Et})),o.d(t,"ExpandOnHover",(function(){return Nt})),o.d(t,"ShowSensitiveData",(function(){return Mt})),o.d(t,"DropdownButton",(function(){return Rt})),o.d(t,"DraggableList",(function(){return _t})),o.d(t,"SelectOnFocus",(function(){return Wt})),o.d(t,"CopyToClipboard",(function(){return Kt})),o.d(t,"SideNav",(function(){return Jt})),o.d(t,"EnrichedHeadline",(function(){return go})),o.d(t,"ContentBlock",(function(){return Do})),o.d(t,"Comparisons",(function(){return Ko})),o.d(t,"ComparisonsStore",(function(){return Wo})),o.d(t,"ComparisonsStoreInstance",(function(){return zo})),o.d(t,"MenuItemsDropdown",(function(){return si})),o.d(t,"DatePicker",(function(){return mi})),o.d(t,"DateRangePicker",(function(){return Ci})),o.d(t,"PeriodDatePicker",(function(){return Mi})),o.d(t,"Notification",(function(){return Wi})),o.d(t,"NotificationGroup",(function(){return tn})),o.d(t,"NotificationsStore",(function(){return Zi})),o.d(t,"ShowHelpLink",(function(){return ln})),o.d(t,"SitesStore",(function(){return un})),o.d(t,"SiteSelector",(function(){return Bn})),o.d(t,"QuickAccess",(function(){return sa})),o.d(t,"SearchInput",(function(){return ma})),o.d(t,"FieldArray",(function(){return ya})),o.d(t,"MultiPairField",(function(){return Ta})),o.d(t,"PeriodSelector",(function(){return rs})),o.d(t,"ReportingMenu",(function(){return Bs})),o.d(t,"ReportingMenuStore",(function(){return oa})),o.d(t,"ReportingPagesStore",(function(){return Gn})),o.d(t,"ReportMetadataStore",(function(){return Ms})),o.d(t,"WidgetsStore",(function(){return Ts})),o.d(t,"WidgetLoader",(function(){return Gs})),o.d(t,"ClientWidgetRenderer",(function(){return Qs})),o.d(t,"WidgetContainer",(function(){return tl})),o.d(t,"WidgetByDimensionContainer",(function(){return ul})),o.d(t,"Widget",(function(){return vl})),o.d(t,"ReportingPage",(function(){return Nl})),o.d(t,"ReportExport",(function(){return lc})),o.d(t,"Sparkline",(function(){return pc})),o.d(t,"Progressbar",(function(){return vc})),o.d(t,"ContentIntro",(function(){return Oc})),o.d(t,"ContentTable",(function(){return xc})),o.d(t,"AjaxForm",(function(){return Mc})),o.d(t,"Passthrough",(function(){return Lc})),o.d(t,"DataTableActions",(function(){return Ad})),o.d(t,"VersionInfoHeaderMessage",(function(){return Xd})),o.d(t,"MobileLeftMenu",(function(){return su})),o.d(t,"scrollToAnchorInUrl",(function(){return gu})),o.d(t,"SearchFiltersPersistenceStore",(function(){return Ws})),o.d(t,"AutoClearPassword",(function(){return vu})),o.d(t,"PasswordStrength",(function(){return wu})),o.d(t,"EntityDuplicatorModal",(function(){return $u})),o.d(t,"EntityDuplicatorAction",(function(){return zu})),o.d(t,"EntityDuplicatorStore",(function(){return Qu})),o.d(t,"BaseDuplicatorAdapter",(function(){return Ku})),"undefined"!==typeof window){var i=window.document.currentScript,n=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(o.p=n[1])}o("2342"); -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function a(e,...t){if(!e)return"";let o=t;return 1===t.length&&t[0]&&Array.isArray(t[0])&&([o]=t),window._pk_translate(e,o)}function r(e,...t){return e&&window.piwik_translations[e]?a(e,...t):e}function s(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class l{constructor(){s(this,"periods",{}),s(this,"periodOrder",[])}addCustomPeriod(e,t){if(this.periods[e])throw new Error(`The "${e}" period already exists! It cannot be overridden.`);this.periods[e]=t,this.periodOrder.push(e)}getAllLabels(){return Array().concat(this.periodOrder)}get(e){const t=this.periods[e];if(!t)throw new Error("Invalid period label: "+e);return t}parse(e,t){return this.get(e).parse(t)}isRecognizedPeriod(e){return!!this.periods[e]}}var c=new l; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function d(e){return $.datepicker.formatDate("yy-mm-dd",e)}function u(){const e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function p(e){if(e instanceof Date)return e;const t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return u();if("yesterday"===t||"yesterdaySameTime"===t){const e=u();return e.setDate(e.getDate()-1),e}if(t.match(/^last[ -]?week$/i)){const e=u();return e.setDate(e.getDate()-7),e}if(t.match(/^last[ -]?month$/i)){const e=u();return e.setDate(1),e.setMonth(e.getMonth()-1),e}if(t.match(/^last[ -]?year$/i)){const e=u();return e.setFullYear(e.getFullYear()-1),e}return $.datepicker.parseDate("yy-mm-dd",t)}function m(e){return 2===e.length&&(u()>=e[0]&&u()<=e[1])}function h(e){const t=new Date(e.valueOf()),o=(e.getDay()+6)%7;t.setDate(t.getDate()-o+3);const i=t.valueOf();if(t.setMonth(0,1),4!==t.getDay()){const e=(4-t.getDay()+7)%7;t.setMonth(0,1+e)}return 1+Math.ceil((i-t.valueOf())/6048e5)}function g(e,t,o){const i=e.getFullYear(),n=e.getMonth(),a=e.getDate(),r=h(e),s=t.getFullYear(),l=t.getMonth(),c=t.getDate(),d=h(t);switch(o){case"day":return i===s&&n===l&&a===c;case"week":return i===s&&r===d;case"month":return i===s&&n===l;case"year":return i===s;default:return!1}}function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class f{constructor(e){b(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new f(p(e))}static getDisplayText(){return a("Intl_PeriodDay")}getPrettyString(){return d(this.dateInPeriod)}getDateRange(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}containsToday(){return m(this.getDateRange())}}function v(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */c.addCustomPeriod("day",f);class O{constructor(e){v(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new O(p(e))}static getDisplayText(){return a("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=d(e[0]),o=d(e[1]);return a("General_DateRangeFromTo",[t,o])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const o=new Date(t.getTime());return o.setDate(t.getDate()+6),[t,o]}containsToday(){return m(this.getDateRange())}}function y(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */c.addCustomPeriod("week",O);class j{constructor(e){y(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new j(p(e))}static getDisplayText(){return a("Intl_PeriodMonth")}getPrettyString(){const e=a("Intl_Month_Long_StandAlone_"+(this.dateInPeriod.getMonth()+1));return`${e} ${this.dateInPeriod.getFullYear()}`}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function w(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */c.addCustomPeriod("month",j);class S{constructor(e){w(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new S(p(e))}static getDisplayText(){return a("Intl_PeriodYear")}getPrettyString(){return this.dateInPeriod.getFullYear().toString()}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function C(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */c.addCustomPeriod("year",S);class k{constructor(e,t,o){C(this,"startDate",void 0),C(this,"endDate",void 0),C(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=o}static getLastNRange(e,t,o){const i=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");let n=o?p(o):u(),a=new Date(n.getTime());if("day"===e)a.setDate(a.getDate()-i);else if("week"===e)a.setDate(a.getDate()-7*i);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-i);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-i)}if("day"!==e){const t=c.periods[e].parse(a),o=c.periods[e].parse(n);[a]=t.getDateRange(),[,n]=o.getDateRange()}const r=new Date(1991,7,6);if(a.getTime()-r.getTime()<0)switch(e){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=r;break}return new k(a,n,e)}static getLastNRangeChild(e,t,o){const i=t?p(t):u();let n=new Date(i.getTime()),a=new Date(i.getTime());if("day"===e)n.setDate(n.getDate()-o),a.setDate(a.getDate()-o);else if("week"===e)n.setDate(n.getDate()-7*o),a.setDate(a.getDate()-7*o);else if("month"===e)n.setDate(1),n.setMonth(n.getMonth()-o),a.setDate(1),a.setMonth(a.getMonth()-o);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);n.setFullYear(n.getFullYear()-o),a.setFullYear(a.getFullYear()-o)}if("day"!==e){const t=c.periods[e].parse(n),o=c.periods[e].parse(a);[n]=t.getDateRange(),[,a]=o.getDateRange()}const r=new Date(1991,7,6);if(n.getTime()-r.getTime()<0)switch(e){case"year":n=new Date(1992,0,1);break;case"month":n=new Date(1991,8,1);break;case"week":n=new Date(1991,8,12);break;case"day":default:n=r;break}return new k(n,a,e)}static parse(e,t="day"){if(/^previous/.test(e)){const o=k.getLastNRange(t,"2").startDate;return k.getLastNRange(t,e.substring(8),o)}if(/^last/.test(e))return k.getLastNRange(t,e.substring(4));const o=decodeURIComponent(e).split(",");return new k(p(o[0]),p(o[1]),t)}static getDisplayText(){return a("General_DateRangeInPeriodList")}getPrettyString(){const e=d(this.startDate),t=d(this.endDate);return a("General_DateRangeFromTo",[e,t])}getDateRange(){return[this.startDate,this.endDate]}containsToday(){return m(this.getDateRange())}getDayCount(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}c.addCustomPeriod("range",k);var D=o("8bbf"); -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{piwik:E,broadcast:P,piwikHelper:T}=window;function x(e){if("string"!==typeof e)return;const t=e.trim();return t&&/^[A-Za-z0-9_]+$/.test(t)?t:void 0}function V(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ReportingMenuStore}function B(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ComparisonStoreInstance}function N(e){var t;if("string"!==typeof e)return;const o=e.trim(),i=B();if(i){const t=i.getSegmentComparisons();if(!o&&t.length)return t[0].title;const n=t.find(t=>t.params.segment===e);if(n)return n.title}if(!o)return a("SegmentEditor_DefaultAllVisits");const n=document.querySelector(".segmentEditorPanel .segmentationTitle"),r=null===n||void 0===n||null===(t=n.textContent)||void 0===t?void 0:t.trim();return r||a("SegmentEditor_CustomSegment")}E.helper=T,E.broadcast=P,E.updateTitle=async function(e,t,o,i,n){let r="",s="",l="";""!==t&&""!==e&&(l=c.parse(t,e).getPrettyString());const d=a("CoreHome_WebAnalyticsReports")+" - Matomo",u=V();if(u&&o&&i){var p,m,h,g;let e=u.findSubcategory(o,i);e.category||(await u.fetchMenuItems(),e=u.findSubcategory(o,i)),r=null!==(p=null===(m=e)||void 0===m||null===(m=m.category)||void 0===m?void 0:m.name)&&void 0!==p?p:"",s=null!==(h=null===(g=e)||void 0===g||null===(g=g.subcategory)||void 0===g?void 0:g.name)&&void 0!==h?h:"",r===s&&(s=""),r=T.htmlEntities(r),s=T.htmlEntities(s);const t=r?`${r} ${s?"> "+s:""}`:"",a=N(n),c=a?T.htmlEntities(a):"";document.title=[E.siteName,l,t,c,d].filter(Boolean).join(" - ")}},E.hasUserCapability=function(e){return Array.isArray(E.userCapabilities)&&-1!==E.userCapabilities.indexOf(e)},E.on=function(e,t){function o(e){t(...e.detail)}t.wrapper=o,window.addEventListener(e,o)},E.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},E.postEvent=function(e,...t){const o=new CustomEvent(e,{detail:t});window.dispatchEvent(o)},E.getLoginModule=function(){const e=x(E.loginModule);if(e)return e;const t=x(window.loginModule);return t||"Login"};const I=E;var M=I; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function F(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{piwik:R,broadcast:L}=window;function A(e,t){try{return c.parse(e,t),!0}catch(o){return!1}}class _{constructor(){F(this,"url",Object(D["ref"])(null)),F(this,"urlQuery",Object(D["computed"])(()=>this.url.value?this.url.value.search.replace(/^\?/,""):"")),F(this,"hashQuery",Object(D["computed"])(()=>this.url.value?this.url.value.hash.replace(/^[#/?]+/,""):"")),F(this,"urlParsed",Object(D["computed"])(()=>Object(D["readonly"])(this.parse(this.urlQuery.value)))),F(this,"hashParsed",Object(D["computed"])(()=>Object(D["readonly"])(this.parse(this.hashQuery.value)))),F(this,"parsed",Object(D["computed"])(()=>Object(D["readonly"])(Object.assign(Object.assign({},this.urlParsed.value),this.hashParsed.value)))),this.url.value=new URL(window.location.href),window.addEventListener("hashchange",e=>{this.url.value=new URL(e.newURL),this.updatePeriodParamsFromUrl(),this.updatePageTitle()}),this.updatePeriodParamsFromUrl(),this.updatePageTitle()}updateHashToUrl(e){const t="#"+e;window.location.hash===t?window.dispatchEvent(new HashChangeEvent("hashchange",{newURL:window.location.href,oldURL:window.location.href})):window.location.hash=t}updateHash(e){const t=this.getFinalHashParams(e),o=this.stringify(t);this.updateHashToUrl("?"+o)}updateUrl(e,t={}){const o="string"!==typeof e?this.stringify(e):e,i=Object.keys(t).length?this.getFinalHashParams(t,e):{},n=this.stringify(i);let a="?"+o;n.length&&(a=`${a}#?${n}`),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}getFinalHashParams(e,t={}){const o="string"!==typeof e?e:this.parse(e),i="string"!==typeof e?t:this.parse(t);return Object.assign({period:i.period||this.parsed.value.period,date:i.date||this.parsed.value.date,segment:i.segment||this.parsed.value.segment},o)}updateLocation(e){M.helper.isReportingPage()?this.updateHash(e):this.updateUrl(e)}getSearchParam(e){const t=window.location.href.split("#"),o=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&o.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}parse(e){return L.getValuesFromUrl("?"+e,!0)}stringify(e){const t=Object.fromEntries(Object.entries(e).filter(([,e])=>""!==e&&null!==e&&void 0!==e));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",").replace(/\+/g,"%20")}getMenuPathSuffix(){const e=this.getSearchParam("category"),t=this.getSearchParam("subcategory");return{category:decodeURIComponent(e),subcategory:decodeURIComponent(t)}}getDateAndPeriodFromUrl(){return{date:this.getSearchParam("date")||"",period:this.getSearchParam("period")||""}}updatePageTitle(){const{period:e,date:t}=this.getDateAndPeriodFromUrl(),{category:o,subcategory:i}=this.getMenuPathSuffix(),n=this.getSearchParam("segment")||"";R.updateTitle(t,e,o,i,n)}updatePeriodParamsFromUrl(){const{period:e,date:t}=this.getDateAndPeriodFromUrl();let o=t;if(!A(e,o))return;if(R.period===e&&R.currentDateString===o)return;R.period=e;const i=c.parse(e,o).getDateRange();R.startDateString=d(i[0]),R.endDateString=d(i[1]),"range"===R.period&&(o=`${R.startDateString},${R.endDateString}`),R.currentDateString=o}}const H=new _;var U=H;function q(e,t,o){const i=new Date;o||(o=432e4),i.setTime(i.getTime()+o),document.cookie=`${e}=${t}; expires=${i.toUTCString()}; path=/`}function W(e){const t="; "+document.cookie,o=t.split(`; ${e}=`);if(2==o.length){const e=o.pop().split(";").shift();if("undefined"!==typeof e)return e}return null}function z(e){const t=new Date;t.setTime(t.getTime()+-864e5),document.cookie=`${e}=; expires=${t.toUTCString()}; path=/`}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */R.updatePeriodParamsFromUrl=H.updatePeriodParamsFromUrl.bind(H);const{$:K}=window;function Y(e,t){"abort"!==t&&e&&0!==e.status&&("undefined"!==typeof Piwik_Popover?Piwik_Popover.isOpen()&&e&&500===e.status?K(document.body).html(piwikHelper.escape(e.responseText)):K("#loadingError").show():console.log("Request failed: "+e.responseText))}function Q(e){return Object.prototype.hasOwnProperty.call(e,"segment")&&"undefined"!==typeof e.segment}window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(let e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(...e){return this.active+=e.length,this.clean(),Array.prototype.push.call(this,...e)},window.globalAjaxQueue.abort=function(){this.forEach(e=>e&&e.abort&&e.abort()),this.splice(0,this.length),this.active=0};class J extends Error{}class X extends Error{constructor(e,t,o){super("Chunked bulk request failed."),G(this,"xhr",void 0),G(this,"status",void 0),G(this,"errorThrown",void 0),this.xhr=e,this.status=t,this.errorThrown=o}}class Z extends Error{constructor(){super("Chunked bulk request was aborted.")}}class ee extends Error{constructor(){super("Chunked bulk request timed out due to session expiration.")}}class te{static fetch(e,t={}){if(Array.isArray(e)&&t.returnResponseObject)throw new Error(this.UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR);const o=new te;if(t.withTokenInUrl&&o.withTokenInUrl(),t.errorElement&&o.setErrorElement(t.errorElement),t.redirectOnSuccess&&o.redirectOnSuccess(!0!==t.redirectOnSuccess?t.redirectOnSuccess:void 0),o.setFormat(t.format||"json"),Array.isArray(e))o.setBulkRequests(...e);else{Object.keys(e).forEach(e=>{if(/password/i.test(e))throw new Error(`Password parameters are not allowed to be sent as GET parameter. Please send ${e} as POST parameter instead.`)});const i=Q(e);let n={};if(i){let t=null;null!==e.segment&&(t=encodeURIComponent(e.segment)),n={segment:t}}o.addParams(Object.assign(Object.assign({module:"API",format:t.format||"json"},e),n),"get")}t.postParams&&o.addParams(t.postParams,"post"),t.headers&&(o.headers=Object.assign(Object.assign({},o.headers),t.headers));let i=!0;return"undefined"===typeof t.createErrorNotification||t.createErrorNotification||(o.useCallbackInCaseOfError(),o.setErrorCallback(null),i=!1),t.abortController&&(o.abortController=t.abortController),t.returnResponseObject&&(o.resolveWithHelper=!0),!1===t.abortable&&(o.abortable=!1),o.send().then(e=>{const t=e instanceof te?e.requestHandle.responseJSON:e,i="API.getBulkRequest"===o.postParams.method&&Array.isArray(t)?t:[t],n=i.filter(e=>"error"===e.result).map(e=>e.message);if(n.length)throw new J(n.filter(e=>e.length).join("\n"));return e}).catch(e=>{if(i||e instanceof J)throw e;let t="Something went wrong";e instanceof Z&&(t="Request was possibly aborted"),e instanceof ee&&(t="Session timed out");const o="object"===typeof e&&null!==e&&"status"in e?e.status:null;throw 504===o&&(t="Request was possibly aborted"),429===o&&(t="Rate Limit was exceed"),new Error(t)})}static getBulkRequestLimit(){const e=parseInt(""+M.apiBulkRequestLimit,10);return Number.isNaN(e)?-1:e}static splitIntoChunks(e,t){const o=[];for(let i=0;i"error"===e.result).map(e=>e.message).filter(e=>e.length).reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{});if(n&&Object.keys(n).length&&!this.useRegularCallbackInCaseOfError){let e="";Object.keys(n).forEach(t=>{e.length&&(e+="
"),n[t]>1?e+=`${t} (${n[t]}x)`:e+=t});let t=null,o="toast";K(this.errorElement).length&&e.length&&(K(this.errorElement).show(),t=this.errorElement,o=null);const i=!document.querySelector("#login_form");if(e&&i){const i=window["require"]("piwik/UI"),n=new i.Notification;n.show(e,{placeat:t,context:"error",type:o,id:"ajaxHelper"}),n.scrollToNotification()}}else this.callback&&this.callback(e,t,o)}buildRequestUrl(e){const t=this.mixinDefaultGetParams(e);let o=this.getUrl;if("?"!==o[o.length-1]&&(o+="&"),Object.prototype.hasOwnProperty.call(t,"segment")){const e=t.segment;if(delete t.segment,null!==e&&"undefined"!==typeof e){const t=(""+e).replace(/&/g,"%26").replace(/#/g,"%23").replace(/\?/g,"%3F");o=`${o}segment=${t}&`}}if(t.date){const e=t.date.toString(),n=t.period;if(!/^[a-z0-9, -]+$/i.test(e))throw new Error(`Invalid date '${e}'.`);if(n&&c.isRecognizedPeriod(n)){const t=/^(last|previous)\d/i.test(e)||-1!==e.indexOf(",");try{t&&"range"!==n?k.parse(e,n):c.parse(n,e)}catch(i){throw new Error(`Invalid date '${e}' for period '${n}'.`)}}o=`${o}date=${encodeURIComponent(e).replace(/%2C/g,",")}&`,delete t.date}return o+=K.param(t),o}buildChunkedBulkAjaxCall(e){const t=this.buildRequestUrl(Object.assign({},this.getParams)),o=e.map(e=>"string"===typeof e?e:K.param(e));return K.ajax({type:"POST",async:!0,url:t,dataType:this.format||"json",headers:this.headers?this.headers:void 0,data:this.mixinDefaultPostParams(Object.assign(Object.assign({},this.postParams),{},{urls:o})),timeout:null!==this.timeout?this.timeout:void 0})}getBulkRequestUrls(){return"API.getBulkRequest"===this.postParams.method&&Array.isArray(this.postParams.urls)?this.postParams.urls:null}shouldSendBulkRequestInChunks(){const e=this.getBulkRequestUrls();if(!e)return!1;const t=te.getBulkRequestLimit();return t>0&&e.length>t}shouldRejectBulkResponseObjectRequest(){return!!this.getBulkRequestUrls()&&this.resolveWithHelper}sendBulkRequestInChunks(){const e=this.getBulkRequestUrls();if(!e)return Promise.resolve([]);const t=te.getBulkRequestLimit();if(t<=0)return Promise.resolve([]);try{this.buildRequestUrl(Object.assign({},this.getParams))}catch(h){return this.hideLoadingElement(),Promise.reject(h)}const o=this.abortController||new AbortController;this.abortController=o;let i=null,n=!1,a=!1;const r=()=>{!n&&this.abortable&&(window.globalAjaxQueue.active-=1,n=!0)},s=(e,t)=>{!a&&this.completeCallback&&(a=!0,this.completeCallback(e,t))},l={readyState:1,status:0,statusText:"",responseJSON:[],abort:()=>{o.abort()}},c=l;let d=c;this.requestHandle=c,this.abortable&&window.globalAjaxQueue.push(c),o.signal.addEventListener("abort",()=>{i&&i.abort()});const u=te.splitIntoChunks(e,t),p=[],m=e=>e>=u.length?Promise.resolve(p):(i=this.buildChunkedBulkAjaxCall(u[e]),new Promise((e,t)=>{i.then((t,o,i)=>{d=i,l.readyState=i.readyState,l.status=i.status,l.statusText=i.statusText||o,Array.isArray(t)?p.push(...t):p.push(t),e(p)}).fail((e,o,i)=>{l.readyState=e.readyState,l.status=e.status,l.statusText=e.statusText||o,t(new X(e,o,i))})}).then(()=>m(e+1)));return m(0).then(e=>(l.readyState=4,l.responseJSON=e,this.handleApiErrorResponseOrCallback(e,"success",d),r(),s(d,"success"),M.ajaxRequestFinished&&M.ajaxRequestFinished(),e)).catch(e=>{if(!(e instanceof X))throw e;const{xhr:t,status:o,errorThrown:i}=e;if(r(),this.errorCallback&&this.errorCallback.apply(this,[t,o,i]),s(t,o),429===t.status)throw console.log(`Warning: the '${K.param(this.getParams)}' request was rate limited!`),t;if("abort"===t.statusText||0===t.status)throw new Z;const n=!document.querySelector("#login_form"),a="1"===t.getResponseHeader("X-Matomo-Session-Timed-Out");if(a&&n)throw q("matomo_session_timed_out","1",6e4),M.helper.refreshAfter(0),new ee;throw console.log(`Warning: the ${K.param(this.getParams)} request failed!`),t})}static post(e,t={},o={}){return te.fetch(e,Object.assign(Object.assign({},o),{},{postParams:t}))}static oneAtATime(e,t){let o=null;return(i,n)=>(o&&o.abort(),o=new AbortController,te.post(Object.assign(Object.assign({},i),{},{method:e}),n,Object.assign(Object.assign({},t),{},{abortController:o})).finally(()=>{o=null}))}constructor(){G(this,"format","json"),G(this,"timeout",null),G(this,"callback",null),G(this,"useRegularCallbackInCaseOfError",!1),G(this,"errorCallback",void 0),G(this,"withToken",!1),G(this,"completeCallback",void 0),G(this,"getParams",{}),G(this,"getUrl","?"),G(this,"postParams",{}),G(this,"loadingElement",null),G(this,"errorElement","#ajaxError"),G(this,"headers",{"X-Requested-With":"XMLHttpRequest"}),G(this,"requestHandle",null),G(this,"abortController",null),G(this,"abortable",!0),G(this,"defaultParams",["idSite","period","date","segment"]),G(this,"resolveWithHelper",!1),this.errorCallback=Y}addParams(e,t){const o="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(o).forEach(e=>{let n=o[e];(-1===i.indexOf(e)||n)&&("boolean"===typeof n&&(n=n?1:0),"get"===t.toLowerCase()?this.getParams[e]=n:"post"===t.toLowerCase()&&(this.postParams[e]=n))})}withTokenInUrl(){this.withToken=!0}setUrl(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}setBulkRequests(...e){const t=e.map(e=>"string"===typeof e?e:K.param(e));this.addParams({module:"API",method:"API.getBulkRequest",urls:t,format:"json"},"post")}setTimeout(e){this.timeout=e}setCallback(e){this.callback=e}useCallbackInCaseOfError(){this.useRegularCallbackInCaseOfError=!0}redirectOnSuccess(e){this.setCallback(()=>{piwikHelper.redirect(e)})}setErrorCallback(e){this.errorCallback=e}setCompleteCallback(e){this.completeCallback=e}setFormat(e){this.format=e}setLoadingElement(e){this.loadingElement=e||"#ajaxLoadingDiv"}setErrorElement(e){e&&(this.errorElement=e)}useGETDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t{this.requestHandle&&this.requestHandle.abort()});const e=new Promise((e,t)=>{this.requestHandle.then(t=>{this.resolveWithHelper?e(this):e(t)}).fail(e=>{if(429===e.status)return console.log(`Warning: the '${K.param(this.getParams)}' request was rate limited!`),void t(e);if("abort"===e.statusText||0===e.status)return;const o=!document.querySelector("#login_form"),i="1"===e.getResponseHeader("X-Matomo-Session-Timed-Out");if(i&&o)return q("matomo_session_timed_out","1",6e4),void M.helper.refreshAfter(0);console.log(`Warning: the ${K.param(this.getParams)} request failed!`),t(e)})});return e}abort(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}buildAjaxCall(){const e=this,t=this.buildRequestUrl(this.getParams),o={type:"POST",async:!0,url:t,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(...t){e.abortable&&(window.globalAjaxQueue.active-=1),e.errorCallback&&e.errorCallback.apply(this,t)},success:(t,o,i)=>{this.handleApiErrorResponseOrCallback(t,o,i),e.abortable&&(window.globalAjaxQueue.active-=1),M.ajaxRequestFinished&&M.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return K.ajax(o)}isRequestToApiMethod(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}isWidgetizedRequest(){return"Widgetize"===broadcast.getValueFromUrl("module")}getDefaultPostParams(){return this.withToken||this.isRequestToApiMethod()||M.shouldPropagateTokenAuth?{token_auth:M.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}mixinDefaultPostParams(e){const t=this.getDefaultPostParams(),o=Object.assign(Object.assign({},t),e);return o}mixinDefaultGetParams(e){const t=U.getSearchParam("segment"),o={idSite:M.idSite?M.idSite.toString():broadcast.getValueFromUrl("idSite"),period:M.period||broadcast.getValueFromUrl("period"),segment:t},i=e,n=Q(i)||Q(this.postParams);return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(o).forEach(e=>{!this.useGETDefaultParameter(e)||"segment"===e&&n||null!==i[e]&&"undefined"!==typeof i[e]&&""!==i[e]||null!==this.postParams[e]&&"undefined"!==typeof this.postParams[e]&&""!==this.postParams[e]||!o[e]||(i[e]=o[e])}),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=M.currentDateString),i}getRequestHandle(){return this.requestHandle}}function oe(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */G(te,"UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR","AjaxHelper returnResponseObject is not supported for bulk requests."),window.ajaxHelper=te;const{$:ie}=window;class ne{constructor(){oe(this,"defaultMinFractionDigits",0),oe(this,"defaultMaxFractionDigits",2)}format(e,t,o,i){if(!ie.isNumeric(e))return String(e);let n=e,a=t||M.numbers.patternNumber;const r=a.split(";");1===r.length&&r.push("-"+r[0]);const s=n<0;if(a=s?r[1]:r[0],n=Math.abs(n),o>=0){const e=10**o;n=Math.round(n*e)/e}const l=n.toString().split(".");let c=l[0],d=l[1]||"";const u=-1!==a.indexOf(",");if(u){const e=a.match(/#+0/),t=(null===e||void 0===e?void 0:e[0].length)||0;let o=(null===e||void 0===e?void 0:e[0].length)||0;const i=a.split(",");i.length>2&&(o=i[1].length);const n=c.split("").reverse();let r=[];r.push(n.splice(0,t).reverse().join(""));while(n.length)r.push(n.splice(0,o).reverse().join(""));r=r.reverse(),c=r.join(",")}if(i>0&&(d=d.replace(/0+$/,""),d.length{let i=e;Object.entries(t).some(([e,t])=>-1!==i.indexOf(e)&&(i=i.replace(e,t),!0)),o+=i}),o}valOrDefault(e,t){return"undefined"===typeof e?t:e}getMaxFractionDigitsForCompactFormat(e){return 1===e?1:0}determineCorrectCompactPattern(e,t){let o=0,i=0,n="";if(Math.round(t)<1e3)return["0",1];for(o=1e3;o<=1e19;o*=10){const r=o+"One",s=o+"Other";if(1===Math.round(t/o)&&""!==(null===e||void 0===e?void 0:e[r])?(i=o,n=r):Math.round(t/o)>=1&&""!==(null===e||void 0===e?void 0:e[s])&&(i=o,n=s),null!==e&&void 0!==e&&e[n]){var a;const i=(null===e||void 0===e||null===(a=e[n].match(/0/g))||void 0===a?void 0:a.length)||1;if(Math.round(t*10**i/(10*o))<10**i)break}}return[(null===e||void 0===e?void 0:e[n])||"0",i]}formatCompact(e,t,o){var i;const n=(null===(i=e.match(/0/g))||void 0===i?void 0:i.length)||0;let a=t;n>1&&(a/=10**(n-1));const r=this.getMaxFractionDigitsForCompactFormat(n),s=10**r,l=Math.round(o/a*s)/s,c=this.formatNumber(l,r,0);return e.replace(/(0+)/,c).replace(/('\.')/,".")}parseFormattedNumber(e){const t=e.indexOf(M.numbers.symbolMinus)>-1||e.startsWith("-"),o=e.split(M.numbers.symbolDecimal);return o.forEach((e,t)=>{o[t]=e.replace(/[^0-9]/g,"")}),(t?-1:1)*parseFloat(o.join("."))}formatNumber(e,t,o){return this.format(e,M.numbers.patternNumber,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(o,this.defaultMinFractionDigits))}formatPercent(e,t,o){return this.format(e,M.numbers.patternPercent,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(o,this.defaultMinFractionDigits))}formatCurrency(e,t,o,i){const n=this.format(e,M.numbers.patternCurrency,this.valOrDefault(o,this.defaultMaxFractionDigits),this.valOrDefault(i,this.defaultMinFractionDigits));return n.replace("¤",t)}formatNumberCompact(e){const t=e,[o,i]=this.determineCorrectCompactPattern(M.numbers.patternsCompactNumber||[],t);return Math.round(t)<1e3||"0"===o?this.formatNumber(t,this.getMaxFractionDigitsForCompactFormat(Math.round(t)),0):this.formatCompact(o,i,t)}formatCurrencyCompact(e,t){const o=e,[i,n]=this.determineCorrectCompactPattern(M.numbers.patternsCompactCurrency||[],o);return Math.round(o)<1e3||"0"===i?this.formatCurrency(o,t,this.getMaxFractionDigitsForCompactFormat(Math.round(o)),0):this.formatCompact(i,n,o).replace("¤",t)}formatEvolution(e,t,o,i){if(i)return this.formatPercent(Math.abs(e),t,o);const n=this.formatPercent(e,t,o);return`${e>0?M.numbers.symbolPlus:""}${n}`}calculateAndFormatEvolution(e,t,o){const i=parseInt(t,10),n=parseInt(e,10)-i;let a;a=0===n||Number.isNaN(n)?0:0===i||Number.isNaN(i)?100:n/i*100;let r=3;return Math.abs(a)>100?r=0:Math.abs(a)>10?r=1:Math.abs(a)>1&&(r=2),this.formatEvolution(a,r,0,o)}}var ae=new ne;window.NumberFormatter=ae; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const{$:re}=window;class se{constructor(){this.setup()}setup(){Object(D["watch"])(()=>U.parsed.value.popover,()=>this.onPopoverParamChanged()),U.parsed.value.popover&&this.onPopoverParamChangedInitial()}onPopoverParamChangedInitial(){re(()=>{setTimeout(()=>{this.openOrClose()})})}onPopoverParamChanged(){re(()=>{this.openOrClose()})}openOrClose(){this.close();const e=U.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}close(){window.Piwik_Popover.close()}open(e){let t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);const o=t.split(":"),i=o[0];o.shift();const n=o.join(":");"undefined"===typeof window.broadcast.popoverHandlers[i]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[i](n)}}new se; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:le}=window;let ce=!1;function de(){let e=!!parseInt(W("zenMode"),10);const t=le(".top_controls .zenModeToggle");function o(){e?(le("body").addClass("zenMode"),t.addClass("icon-arrowdown").removeClass("icon-arrowup"),t.prop("title",a("CoreHome_ExitZenMode"))):(le("body").removeClass("zenMode"),t.removeClass("icon-arrowdown").addClass("icon-arrowup"),t.prop("title",a("CoreHome_EnterZenMode")))}ce||(M.helper.registerShortcut("z",a("CoreHome_ShortcutZenMode"),t=>{t.altKey||(e=!e,q("zenMode",e?"1":"0"),o())}),ce=!0),t.off("click.matomoZenMode").on("click.matomoZenMode",()=>{window.Mousetrap.trigger("z")}),o()} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function ue(e,...t){const o=t;return window._pk_externalRawLink?window._pk_externalRawLink(e,o):e}function pe(e,...t){if(!e)return"";const o=t.length>0&&t[0]?t[0]:null,i=t.length>1&&t[1]?t[1]:null,n=t.length>2&&t[2]?t[2]:null,a=ue(e,o,i,n);return''} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function me(e,t,o){return ae.formatNumber(e,t,o)}function he(e,t,o){return ae.formatPercent(e,t,o)}function ge(e,t,o,i){return ae.formatCurrency(e,t,o,i)}function be(e,t,o,i){return ae.formatEvolution(e,t,o,i)}function fe(e,t,o){return ae.calculateAndFormatEvolution(e,t,o)} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ve(...e){const t=Object(D["createApp"])(...e);return t.config.globalProperties.$sanitize=window.vueSanitize,t.config.globalProperties.$sanitizeUrl=window.vueSanitizeUrl,t.config.globalProperties.translate=a,t.config.globalProperties.translateOrDefault=r,t.config.globalProperties.externalLink=pe,t.config.globalProperties.externalRawLink=ue,t.config.globalProperties.formatNumber=me,t.config.globalProperties.formatPercent=he,t.config.globalProperties.formatCurrency=ge,t.config.globalProperties.formatEvolution=be,t.config.globalProperties.calculateAndFormatEvolution=fe,t} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */le(de),M.on("Matomo.topControlsRendered",()=>{de()});const Oe={},ye=120,je=50,we=1e3;function Se(e){if(Oe[e])return Oe[e];if(window[e])return Promise.resolve(window[e]);const t="?module=Proxy&action=getPluginUmdJs&plugin="+e;let o,i;const n=document.createElement("script");let a;n.charset="utf-8",n.timeout=ye,n.src=t;const r=new Error,s=t=>{n.onerror=null,n.onload=null,clearTimeout(a);let s=0;function l(){if(s+=je,o&&i)if(window[e]&&i)try{i(window[e])}finally{o=void 0,i=void 0}else if(s>we)try{const n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;r.message=`Loading plugin ${e} on demand failed.\n(${n}: ${a})`,r.name="PluginOnDemandLoadError",r.type=n,r.request=a,o(r)}finally{o=void 0,i=void 0}else setTimeout(l,je)}setTimeout(l,je)};return a=setTimeout(()=>{s({type:"timeout",target:n})},ye),n.onerror=s,n.onload=s,document.head.appendChild(n),new Promise((e,t)=>{i=e,o=t})} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ce(e,t){return Object(D["defineAsyncComponent"])(()=>Se(e).then(e=>(e||resolve(null),e[t])))} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ke(e,t){var o;return e instanceof HTMLElement?e:null===(o=t.instance)||void 0===o?void 0:o.$refs[e]}var De={getRef:ke};const Ee=300;function Pe(e,t=Ee){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{e.call(this,...i)},t)}} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Te(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}const xe={ref:"root"};function Ve(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",xe,[e.componentWrapper?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.componentWrapper),{key:0})):Object(D["createCommentVNode"])("",!0)],512)}var Be=Object(D["defineComponent"])({props:{html:String},mounted(){M.helper.compileVueEntryComponents(this.$refs.root)},beforeUnmount(){M.helper.destroyVueComponent(this.$refs.root)},computed:{componentWrapper(){return this.html?Object(D["markRaw"])({template:this.html}):null}}});Be.render=Ve;var Ne=Be;const Ie={class:"loadingPiwik"};function Me(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ie,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.loadingMessage),1)],512)),[[D["vShow"],e.loading]])}const Fe={class:"matomo-loader"},Re=Object(D["createElementVNode"])("span",null,null,-1),Le=Object(D["createElementVNode"])("span",null,null,-1),Ae=Object(D["createElementVNode"])("span",null,null,-1),_e=[Re,Le,Ae];function He(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("span",Fe,_e)}var $e=Object(D["defineComponent"])({});$e.render=He;var Ue=$e,qe=Object(D["defineComponent"])({components:{MatomoLoader:Ue},props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:a("General_LoadingData")}}});qe.render=Me;var We=qe;function ze(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["alert",{["alert-"+e.severity]:!0}])},[Object(D["renderSlot"])(e.$slots,"default")],2)}var Ge=Object(D["defineComponent"])({props:{severity:{type:String,required:!0}}});Ge.render=ze;var Ke=Ge,Ye={mounted(e,t){let o={};$(e).addClass("matomo-dropdown-menu");const i=!!$(e).parent().closest(".dropdown-content").length;var n;i&&(o={hover:!0},$(e).addClass("submenu"),$((null===(n=t.value)||void 0===n?void 0:n.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(o)},updated(e){Object(D["nextTick"])(()=>{$(e).addClass("matomo-dropdown-menu")})}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -function Qe(e,t,o){const i=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,i||e.contains(o.target)||t.value&&t.value.blur()}function Je(e,t){t.value.hasScrolled=!0}function Xe(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function Ze(e,t,o){27===o.which&&setTimeout(()=>{t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()},0)}const et=document.documentElement;var tt={mounted(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=Ze.bind(null,e,t),t.value.onMouseDown=Xe.bind(null,e,t),t.value.onClickOutsideElement=Qe.bind(null,e,t),t.value.onScroll=Je.bind(null,e,t),et.addEventListener("keyup",t.value.onEscapeHandler),et.addEventListener("mousedown",t.value.onMouseDown),et.addEventListener("mouseup",t.value.onClickOutsideElement),et.addEventListener("scroll",t.value.onScroll)},unmounted(e,t){et.removeEventListener("keyup",t.value.onEscapeHandler),et.removeEventListener("mousedown",t.value.onMouseDown),et.removeEventListener("mouseup",t.value.onClickOutsideElement),et.removeEventListener("scroll",t.value.onScroll)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ot(e,t){var o,i;null===(o=t.value)||void 0===o||!o.focused||null!==(i=t.oldValue)&&void 0!==i&&i.focused||setTimeout(()=>{e.focus(),t.value.afterFocus&&t.value.afterFocus()},5)}var it={mounted(e,t){ot(e,t)},updated(e,t){ot(e,t)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:nt}=window,at=new WeakMap;function rt(){const e=nt(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"
"))}function st(e){if(!document.querySelector(".ui-tooltip"))return;let t;try{t=nt(e).tooltip("instance")}catch(o){return}t&&t.tooltips&&Object.keys(t.tooltips).forEach(e=>{var o;const i=null===(o=t)||void 0===o||null===(o=o.tooltips[e])||void 0===o||null===(o=o.element)||void 0===o?void 0:o[0];i&&!i.isConnected&&nt(i).trigger("mouseleave").trigger("focusout")})}function lt(e,t){var o,i,n,a,r,s;if(e.isConnected&&(nt(e).tooltip({track:!0,content:(null===(o=t.value)||void 0===o?void 0:o.content)||rt,show:"undefined"!==typeof(null===(i=t.value)||void 0===i?void 0:i.show)?null===(n=t.value)||void 0===n?void 0:n.show:{delay:(null===(a=t.value)||void 0===a?void 0:a.delay)||700,duration:(null===(r=t.value)||void 0===r?void 0:r.duration)||200},hide:!1,tooltipClass:null===(s=t.value)||void 0===s?void 0:s.tooltipClass}),!at.has(e))){const t=new MutationObserver(t=>{t.some(e=>e.removedNodes.length>0)&&st(e)});t.observe(e,{childList:!0,subtree:!0}),at.set(e,t)}}var ct={mounted(e,t){setTimeout(()=>lt(e,t))},updated(e,t){setTimeout(()=>lt(e,t))},beforeUnmount(e){const t=at.get(e);t&&(t.disconnect(),at.delete(e));try{window.$(e).tooltip("destroy")}catch(o){}}};const dt={ref:"root"};function ut(e,t,o,i,n,a){return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",dt,[Object(D["renderSlot"])(e.$slots,"default")],512)),[[D["vShow"],e.modelValue]])}var pt=Object(D["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},options:{type:Object,required:!1,default:()=>({})}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated(){this.$emit("update:modelValue",!1)},watch:{modelValue(e,t){if(e){const e=this.$refs.root.firstElementChild;M.helper.modalConfirm(e,{yes:()=>{this.$emit("yes")},no:()=>{this.$emit("no")},validation:()=>{this.$emit("validation")}},Object.assign({onCloseEnd:()=>{this.$refs.root.appendChild(e),this.$emit("update:modelValue",!1),this.$emit("closeEnd")}},this.options))}else!1===e&&!0===t&&($(".modal.open").modal("close"),this.$emit("close"))}}});pt.render=ut;var mt=pt;const ht=["aria-label"],gt={key:0,class:"modal-footer matomo-modal-footer"};function bt(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createBlock"])(D["Teleport"],{to:"body"},[e.modelValue?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:"modal-overlay matomo-modal-overlay open",onClick:t[0]||(t[0]=(...t)=>e.close&&e.close(...t))})):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{ref:"root",class:Object(D["normalizeClass"])(["modal matomo-modal",e.modalClasses]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel,tabindex:"-1"},[Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])(["modal-content matomo-modal-content",e.contentClass])},[Object(D["renderSlot"])(e.$slots,"default")],2),e.$slots.footer?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",gt,[Object(D["renderSlot"])(e.$slots,"footer")])):Object(D["createCommentVNode"])("",!0)],10,ht),[[D["vShow"],e.modelValue]])])}var ft=Object(D["defineComponent"])({name:"MatomoModal",props:{modelValue:{type:Boolean,required:!0},classes:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},ariaLabel:{type:String}},emits:["update:modelValue","opened","closed"],data(){return{previousBodyOverflow:"",previousFocus:null}},computed:{modalClasses(){return[{open:this.modelValue},this.classes]}},methods:{close(){this.modelValue&&this.$emit("update:modelValue",!1)},onKeydown(e){"Escape"===e.key&&this.close()},activate(){const e=this.$refs.root;this.previousBodyOverflow=document.body.style.overflow,this.previousFocus=document.activeElement,document.body.style.overflow="hidden",document.addEventListener("keydown",this.onKeydown),this.$nextTick(()=>e.focus()),this.$emit("opened",e)},deactivate(){document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow="",document.removeEventListener("keydown",this.onKeydown),this.previousFocus&&this.previousFocus.focus(),this.previousFocus=null,this.$emit("closed")}},watch:{modelValue(e,t){e&&!t?this.activate():!e&&t&&this.deactivate()}},mounted(){this.modelValue&&this.activate()},unmounted(){this.modelValue&&this.deactivate()}});ft.render=bt;var vt=ft; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ot(e,t,o){var i;e.classList.add("expanded"),null!==(i=t.value)&&void 0!==i&&i.onExpand&&t.value.onExpand(o);const n=e.querySelector(".dropdown.positionInViewport");n&&M.helper.setMarginLeftToBeInViewport(n)}function yt(e,t,o){var i;e.classList.contains("expanded")&&(e.classList.remove("expanded"),null!==(i=t.value)&&void 0!==i&&i.onClosed&&t.value.onClosed(o))}function jt(e,t,o){e.classList.contains("expanded")?yt(e,t,o):Ot(e,t,o)}function wt(e,t,o){const i=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,i||e.contains(o.target)||yt(e,t,o)}function St(e){e.value.hasScrolled=!0}function Ct(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function kt(e,t,o){"Escape"===o.key&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,yt(e,t,o))}const Dt=document.documentElement;var Et={mounted(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onClickOnExpander=jt.bind(null,e,t),t.value.onEscapeHandler=kt.bind(null,e,t),t.value.onMouseDown=Ct.bind(null,t),t.value.onClickOutsideElement=wt.bind(null,e,t),t.value.onScroll=St.bind(null,t),setTimeout(()=>{const e=De.getRef(t.value.expander,t);e&&e.addEventListener("click",t.value.onClickOnExpander)}),Dt.addEventListener("keyup",t.value.onEscapeHandler),Dt.addEventListener("mousedown",t.value.onMouseDown),Dt.addEventListener("mouseup",t.value.onClickOutsideElement),Dt.addEventListener("scroll",t.value.onScroll)},unmounted(e,t){const o=De.getRef(t.value.expander,t);o&&Dt.removeEventListener("click",t.value.onClickOnExpander),Dt.removeEventListener("keyup",t.value.onEscapeHandler),Dt.removeEventListener("mousedown",t.value.onMouseDown),Dt.removeEventListener("mouseup",t.value.onClickOutsideElement),Dt.removeEventListener("scroll",t.value.onScroll)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Pt(e){e.classList.add("expanded");const t=e.querySelector(".dropdown.positionInViewport");t&&M.helper.setMarginLeftToBeInViewport(t)}function Tt(e){e.classList.remove("expanded")}function xt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function Vt(e,t){27===t.which&&e.classList.remove("expanded")}const Bt=document.documentElement;var Nt={mounted(e,t){t.value.onMouseEnter=Pt.bind(null,e),t.value.onMouseLeave=Tt.bind(null,e),t.value.onClickOutsideElement=xt.bind(null,e),t.value.onEscapeHandler=Vt.bind(null,e),setTimeout(()=>{const e=De.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)}),e.addEventListener("mouseleave",t.value.onMouseLeave),Bt.addEventListener("keyup",t.value.onEscapeHandler),Bt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted(e,t){const o=De.getRef(t.value.expander,t);o&&o.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:It}=window;var Mt={mounted(e,t){const o=It(e),{sensitiveData:i}=t.value,n=t.value.showCharacters||6,r=t.value.clickElementSelector||o;let s="";function l(){o.html(i),It(r).css({cursor:""}),It(r).tooltip("destroy")}n>0&&(s+=i.slice(0,n)),s+=i.slice(n).replace(/./g,"*"),o.html(s),It(r).tooltip({content:a("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),It(r).one("click",l),It(r).css({cursor:"pointer"})}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:Ft}=window;var Rt={mounted(e){const t=Ft(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));const o=t.attr("data-target");o&&Ft("#"+o).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}};const Lt=["data-item-id","draggable","aria-grabbed","onDragstart","onDragover"];var At=Object(D["defineComponent"])({__name:"DraggableList",props:{items:null,itemKey:null,disabled:{type:Boolean,default:!1},handle:{default:""},axis:{default:"y"}},emits:["reorder"],setup(e,{emit:t}){const o=e,i=.1,n=Object(D["ref"])([]),a=Object(D["ref"])(null),r=Object(D["ref"])(null),s=Object(D["ref"])(null),l=Object(D["ref"])(!1),c=Object(D["computed"])(()=>!o.disabled&&o.items.length>1);function d(e,t){if("function"===typeof o.itemKey)return o.itemKey(e,t);if(!e||"object"!==typeof e)return t;const i=e[o.itemKey];return"string"===typeof i||"number"===typeof i?i:t}const u=Object(D["computed"])(()=>o.items.map((e,t)=>({id:String(d(e,t)),item:e,sourceIndex:t}))),p=Object(D["computed"])(()=>u.value.map(e=>e.id).join("\0"));function m(){n.value=u.value.slice()}function h(){a.value=null,r.value=null,s.value=null}function g(e=!1){h(),l.value=!1,e&&m()}function b(e,t){if(!o.handle)return!0;if(!(e instanceof Element))return!1;const i=e.closest(o.handle);return!!i&&t.contains(i)}function f(e){return n.value.findIndex(t=>t.id===e)}function v(e){return n.value["number"===typeof e?e:Number(e)]}function O(e,t){const n=t.getBoundingClientRect(),s=a.value?f(a.value):-1,l=r.value?f(r.value):-1,c=-1!==s&&-1!==l&&s{a.value===t&&(s.value=t)},0)):e.preventDefault()}function w(e,t){const o=v(t);o?j(e,o.id):e.preventDefault()}function S(e,t){if(!a.value||!c.value)return;e.preventDefault();const o=e.currentTarget;o&&(r.value=t,y(t,O(e,o)),e.dataTransfer&&(e.dataTransfer.dropEffect="move"))}function C(e,t){const o=v(t);o&&S(e,o.id)}function k(e){if(!a.value)return;e.preventDefault();const o=n.value.map(e=>e.id);o&&o.join("\0")!==p.value&&(l.value=!0,t("reorder",o)),h()}function E(){l.value?l.value=!1:g(!0)}return Object(D["watch"])([u,()=>o.disabled],()=>g(!0),{immediate:!0}),(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{class:Object(D["normalizeClass"])(["draggableList",{isDragging:null!==a.value,isDisabled:e.disabled}])},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(n.value,(e,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:e.id,class:Object(D["normalizeClass"])(["draggableListItem",{isDragged:e.id===s.value}]),"data-item-id":e.id,draggable:Object(D["unref"])(c),"aria-grabbed":e.id===a.value,onDragstart:e=>w(e,o),onDragover:e=>C(e,o),onDrop:k,onDragend:E},[Object(D["renderSlot"])(t.$slots,"default",{item:e.item,index:e.sourceIndex})],42,Lt))),128))],2))}}),_t=At; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const{$:Ht}=window;function $t(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,Ht(t.target).select())}function Ut(e){const t=document.createRange();t.selectNode(e.target);const o=window.getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),o&&o.addRange(t)}function qt(e){delete e.value.focusedElement}var Wt={mounted(e,t){const o=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===o,t.value.elementSupportsSelect?(t.value.onFocusHandler=$t.bind(null,t),t.value.onBlurHandler=qt.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=Ut,e.addEventListener("click",t.value.onClickHandler))},unmounted(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function zt(e){if(e){const t=document.createElement("textarea");t.value=e.innerText,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.focus(),document.execCommand("copy"),document.body.removeChild(t);const o=e.parentElement;if(o){const e=o.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIcon"),e.classList.add("copyToClipboardIconCheck"));const t=o.getElementsByClassName("copyToClipboardCopiedDiv")[0];t&&(t.style.display="inline-block",setTimeout(()=>{t.style.display="none"},2500))}}}function Gt(e,t){if(t.value.transitionOpen){const o=e.parentElement;if(o){const e=o.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIconCheck"),e.classList.add("copyToClipboardIcon"))}t.value.transitionOpen=!1}else t.value.transitionOpen=!0}var Kt={mounted(e,t){const o=e.tagName.toLowerCase();if("pre"===o){const o=document.createElement("button");o.setAttribute("type","button"),o.className="copyToClipboardButton";const i=document.createElement("div");i.className="copyToClipboardPositionDiv";const n=document.createElement("i");n.className="copyToClipboardIcon",o.appendChild(n);const r=document.createElement("span");r.className="copyToClipboardSpan",r.innerHTML=a("General_Copy"),o.appendChild(r),i.appendChild(o);const s=document.createElement("div");s.className="copyToClipboardCopiedDiv",s.innerHTML=a("General_CopiedToClipboard"),i.appendChild(s);const l=e.parentElement;l&&(l.classList.add("copyToClipboardWrapper"),l.appendChild(i)),t.value.onClickHandler=zt.bind(null,e),o.addEventListener("click",t.value.onClickHandler),t.value.onTransitionEndHandler=Gt.bind(null,e,t),o.addEventListener("transitionend",t.value.onTransitionEndHandler)}},unmounted(e,t){e.removeEventListener("click",t.value.onClickHandler),e.removeEventListener("transitionend",t.value.onTransitionEndHandler)}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Yt(){const e=document.getElementById("mobile-left-menu");if(e)try{window.$(e).sidenav("open")}catch(t){}}function Qt(){const e=document.getElementById("secondNavBar");if(null===e||void 0===e||!e.classList.contains("mobileLeftMenuOpen"))return;const t=document.getElementById("mobile-left-menu");if(t)try{window.$(t).sidenav("close")}catch(o){}}var Jt={mounted(e,t){if(!t.value.activator)return;const o=document.getElementById("secondNavBar"),i=e=>{o&&o.classList.toggle("mobileLeftMenuOpen",e)};setTimeout(()=>{if(!t.value.initialized){t.value.initialized=!0;const e=De.getRef(t.value.activator,t);if(e){window.$(e).show();const t=e.getAttribute("data-target");window.$("#"+t).sidenav({closeOnClick:!0,onOpenStart:()=>{i(!0)},onCloseStart:()=>{i(!1)}})}}e.classList.contains("collapsible")&&window.$(e).collapsible()})}};const Xt={key:0,class:"title",tabindex:"6"},Zt=["href","title"],eo={class:"iconsBar"},to=["href","title"],oo=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),io=[oo],no=["title"],ao=Object(D["createElementVNode"])("span",{class:"icon-info"},null,-1),ro=[ao],so={key:2,class:"ratingIcons"},lo={class:"inlineHelp"},co=["innerHTML"],uo=["innerHTML"],po=["href"];function mo(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=t=>e.showIcons=!0),onMouseleave:t[2]||(t[2]=t=>e.showIcons=!1),ref:"root"},[e.editUrl?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Xt,[Object(D["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.htmlEntities(e.actualFeatureName))},[Object(D["renderSlot"])(e.$slots,"default")],8,Zt)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",eo,[e.helpUrl&&!e.actualInlineHelp?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},io,8,to)):Object(D["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=t=>e.showInlineHelp=!e.showInlineHelp),class:Object(D["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},ro,10,no)):Object(D["createCommentVNode"])("",!0),e.showRateFeature?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",so,[(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.rateFeature),{title:e.actualFeatureName},null,8,["title"]))])):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showIcons||e.showInlineHelp]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",lo,[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,co),""!=e.reportGenerated?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,uo)):Object(D["createCommentVNode"])("",!0),e.helpUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(D["toDisplayString"])(e.translate("General_MoreDetails")),9,po)):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showInlineHelp]])],544)}var ho=Object(D["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},data(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp(e){this.actualInlineHelp=e},featureName(e){this.actualFeatureName=e}},mounted(){const e=this.$refs.root;if(!this.actualInlineHelp){var t;let i=e.querySelector(".title .inlineHelp");if(!i&&null!==(t=e.parentElement)&&void 0!==t&&t.nextElementSibling&&(i=e.parentElement.nextElementSibling.querySelector(".reportDocumentation")),i){var o;const e=null===(o=i.getAttribute("data-content"))||void 0===o?void 0:o.trim();e&&e.length&&(this.actualInlineHelp=`

${e}

`,setTimeout(()=>i.remove(),0))}}var i;this.actualFeatureName||(this.actualFeatureName=null===(i=e.querySelector(".title"))||void 0===i?void 0:i.textContent);if(M.period&&M.currentDateString){const t=c.parse(M.period,M.currentDateString);this.reportGenerated&&t.containsToday()&&window.$(e.querySelector(".report-generated")).tooltip({track:!0,content:this.reportGenerated,items:"div",show:!1,hide:!1})}},methods:{htmlEntities(e){return M.helper.htmlEntities(e)}},computed:{showRateFeature(){return"Feedback_SendFeedback"!==r("Feedback_SendFeedback")},rateFeature(){return this.showRateFeature?Ce("Feedback","RateFeature"):""}}});ho.render=mo;var go=ho;const bo={class:"card-content"},fo={key:0,class:"card-title"},vo={key:1,class:"card-title"},Oo={ref:"content"},yo={key:0,class:"card-image hide-on-med-and-down"},jo=["src","alt"];function wo(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("EnrichedHeadline");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])({card:!0,"card-with-image":!!this.imageUrl}),ref:"root"},[Object(D["createElementVNode"])("div",bo,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText||e.editUrl?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",fo,Object(D["toDisplayString"])(e.decode(e.contentTitle)),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText||e.editUrl)?(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",vo,[Object(D["createVNode"])(r,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"edit-url":e.editUrl,"inline-help":e.actualHelpText},{default:Object(D["withCtx"])(()=>[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.decode(e.contentTitle)),1)]),_:1},8,["feature-name","help-url","edit-url","inline-help"])])):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Oo,[Object(D["renderSlot"])(e.$slots,"default")],512)]),e.imageUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yo,[Object(D["createElementVNode"])("img",{src:e.imageUrl,alt:e.actualImageAltText},null,8,jo)])):Object(D["createCommentVNode"])("",!0)],2)}let So=null;const{$:Co}=window;var ko=Object(D["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,editUrl:String,helpText:String,anchor:String,imageUrl:String,imageAltText:String},components:{EnrichedHeadline:go},data(){return{actualFeature:this.feature,actualHelpText:this.helpText,actualImageAltText:this.imageAltText?this.imageAltText:this.contentTitle}},watch:{feature(e){this.actualFeature=e},helpText(e){this.actualHelpText=e}},mounted(){const e=this.$refs.root,t=this.$refs.content;if(this.anchor&&e&&e.parentElement){const t=document.createElement("a");t.id=this.anchor,Co(e.parentElement).prepend(t)}setTimeout(()=>{const e=t.querySelector(".contentHelp");e&&(this.actualHelpText=e.innerHTML,e.remove())},0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===So&&(So=document.querySelector("#content.admin"));let o=null;if(So&&(o=So.offsetTop),o||0===o){const t=e.closest(".widgetLoader"),i=t?t.offsetTop:e.offsetTop;i-o<17&&(e.style.marginTop="0")}},methods:{decode(e){return M.helper.htmlDecode(e)}}});ko.render=wo;var Do=ko;const Eo={key:0,ref:"root",class:"matomo-comparisons"},Po={class:"comparison-type"},To=["title"],xo=["href"],Vo=["title"],Bo={class:"comparison-period-label"},No=["onClick"],Io=["title"],Mo={class:"loadingPiwik",style:{display:"none"}};function Fo(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader"),s=Object(D["resolveDirective"])("tooltips");return e.isComparing?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Eo,[Object(D["createElementVNode"])("h3",null,Object(D["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.segmentComparisons,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(D["createElementVNode"])("div",Po,Object(D["toDisplayString"])(e.translate("General_Segment")),1),Object(D["createElementVNode"])("div",{class:"title",title:e.getTitleTooltip(t)},[Object(D["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(D["toDisplayString"])(t.title),9,xo)],8,To),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.periodComparisons,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison-period",key:o.index,title:e.getComparisonTooltip(t,o)},[Object(D["createElementVNode"])("span",{class:"comparison-dot",style:Object(D["normalizeStyle"])({"background-color":e.getSeriesColor(t,o)})},null,4),Object(D["createElementVNode"])("span",Bo,Object(D["toDisplayString"])(o.title)+" ("+Object(D["toDisplayString"])(e.getComparisonPeriodType(o))+") ",1)],8,Vo))),128)),e.segmentComparisons.length>1?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:"remove-button",onClick:t=>e.removeSegmentComparison(o)},[Object(D["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Io)],8,No)):Object(D["createCommentVNode"])("",!0)]))),128)),Object(D["createElementVNode"])("div",Mo,[Object(D["createVNode"])(r),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_LoadingData")),1)])])),[[s,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(D["createCommentVNode"])("",!0)}function Ro(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class Lo{get state(){return Object(D["readonly"])(this.segmentState)}constructor(){Ro(this,"segmentState",Object(D["reactive"])({availableSegments:[]})),M.on("piwikSegmentationInited",()=>this.setSegmentState())}setSegmentState(){try{const e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(e){}}}var Ao=new Lo;function _o(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const Ho=8,$o=3;function Uo(e){return e?Array.isArray(e)?e:[e]:[]}function qo(e){return Array.isArray(e)?e.map(qo):e&&"object"===typeof e?Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,qo(t)])):e}class Wo{constructor(){_o(this,"privateState",Object(D["reactive"])({comparisonsDisabledFor:[]})),_o(this,"state",Object(D["readonly"])(this.privateState)),_o(this,"colors",{}),_o(this,"segmentComparisons",Object(D["computed"])(()=>this.parseSegmentComparisons())),_o(this,"periodComparisons",Object(D["computed"])(()=>this.parsePeriodComparisons())),_o(this,"isEnabled",Object(D["computed"])(()=>this.checkEnabledForCurrentPage())),"complete"===document.readyState||"interactive"===document.readyState?this.loadComparisonsDisabledFor():document.addEventListener("DOMContentLoaded",()=>{this.loadComparisonsDisabledFor()}),$(()=>{this.colors=this.getAllSeriesColors()}),Object(D["watch"])(()=>this.getUrlStateWithoutPopoverKey(),()=>M.postEvent("piwikComparisonsChanged"))}getUrlStateWithoutPopoverKey(){const e=Object.fromEntries(Object.entries(U.parsed.value).filter(([e])=>"popover"!==e));return JSON.stringify(qo(e))}getComparisons(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}isComparing(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}isComparingPeriods(){return this.getPeriodComparisons().length>1}getSegmentComparisons(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}getPeriodComparisons(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}getSeriesColor(e,t,o=0){const i=this.getComparisonSeriesIndex(t.index,e.index)%Ho;if(0===o)return this.colors["series"+i];const n=o%$o;return this.colors[`series${i}-shade${n}`]}getSeriesColorName(e,t){let o="series"+e%Ho;return t>0&&(o+="-shade"+t%$o),o}isComparisonEnabled(){return this.isEnabled.value}getIndividualComparisonRowIndices(e){const t=this.getSegmentComparisons().length,o=e%t,i=Math.floor(e/t);return{segmentIndex:o,periodIndex:i}}getComparisonSeriesIndex(e,t){const o=this.getSegmentComparisons().length;return e*o+t}getAllComparisonSeries(){const e=[];let t=0;return this.getPeriodComparisons().forEach(o=>{this.getSegmentComparisons().forEach(i=>{e.push({index:t,params:Object.assign(Object.assign({},i.params),o.params),color:this.colors["series"+t]}),t+=1})}),e}removeSegmentComparison(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");const t=[...this.segmentComparisons.value];t.splice(e,1);const o={};0===e&&(o.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,o)}removeSegmentComparisonByDefinition(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");let t=null;this.getSegmentComparisons().forEach((o,i)=>{o&&o.params&&o.params.segment===e&&(t=i)}),null!==t&&this.removeSegmentComparison(t)}addSegmentComparison(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");const t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}updateQueryParamsFromComparisons(e,t,o={}){const i={},n={};let a=!1,r=!1;e.forEach(e=>{a?i[e.params.segment]=!0:a=!0}),t.forEach(e=>{r?n[`${e.params.period}|${e.params.date}`]=!0:r=!0});const s=[],l=[];Object.keys(n).forEach(e=>{const t=e.split("|");s.push(t[0]),l.push(t[1])});const c={compareSegments:Object.keys(i),comparePeriods:s,compareDates:l},d=M.helper.isReportingPage()?U.hashParsed.value:U.urlParsed.value;U.updateLocation(Object.assign(Object.assign(Object.assign({},d),c),o))}getAllSeriesColors(){const{ColorManager:e}=M;if(!e)return[];const t=[];for(let o=0;o{this.privateState.comparisonsDisabledFor=e})}parseSegmentComparisons(){const{availableSegments:e}=Ao.state,t=[...Uo(U.parsed.value.compareSegments)];t.unshift(U.parsed.value.segment||"");const o=[];return t.forEach((t,i)=>{let n;e.forEach(e=>{e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(n=e)});let r=n?n.name:a("General_Unknown");""===t.trim()&&(r=a("SegmentEditor_DefaultAllVisits")),o.push({params:{segment:t},title:M.helper.htmlDecode(r),index:i})}),o}parsePeriodComparisons(){const e=[...Uo(U.parsed.value.comparePeriods)],t=[...Uo(U.parsed.value.compareDates)];e.unshift(U.parsed.value.period),t.unshift(U.parsed.value.date);const o=[];for(let n=0;nzo.isComparing()&&!window.broadcast.isNoDataPage()),t=Object(D["computed"])(()=>zo.getSegmentComparisons()),o=Object(D["computed"])(()=>zo.getPeriodComparisons()),i=zo.getSeriesColor.bind(zo);function n(){const e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"
")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:o,getSeriesColor:i,transformTooltipContent:n}},methods:{comparisonHasSegment(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison(e){window.$(this.$refs.root).tooltip("destroy"),zo.removeSegmentComparison(e)},getComparisonPeriodType(e){const{period:t}=e.params;if("range"===t)return a("CoreHome_PeriodRange");const o=a(`Intl_Period${t.substring(0,1).toUpperCase()}${t.substring(1)}`);return o.substring(0,1).toUpperCase()+o.substring(1)},getComparisonTooltip(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getTitleTooltip(e){return this.htmlentities(e.title)+"
"+this.htmlentities(decodeURIComponent(e.params.segment))},getUrlToSegment(e){const t=Object.assign({},U.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,`${window.location.search}#?${U.stringify(t)}`},onComparisonsChanged(){if(this.comparisonTooltips=null,!zo.isComparing())return;const e=zo.getPeriodComparisons(),t=zo.getSegmentComparisons();te.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:U.getSearchParam("compareSegments"),comparePeriods:U.getSearchParam("comparePeriods"),compareDates:U.getSearchParam("compareDates"),format_metrics:"1"}).then(o=>{this.comparisonTooltips={},e.forEach(e=>{this.comparisonTooltips[e.index]={},t.forEach(t=>{const i=this.generateComparisonTooltip(o,e,t);this.comparisonTooltips[e.index][t.index]=i})})})},generateComparisonTooltip(e,t,o){if(!e.reportData.comparisons)return"";const i=zo.getComparisonSeriesIndex(t.index,0),n=e.reportData.comparisons[i],r=zo.getComparisonSeriesIndex(t.index,o.index),s=e.reportData.comparisons[r],l=e.reportData.comparisons[o.index];let c='
',d=(s.nb_visits/n.nb_visits*100).toFixed(2);return d+="%",c+=a("General_ComparisonCardTooltip1",[`'${this.htmlentities(s.compareSegmentPretty)}'`,s.comparePeriodPretty,d,s.nb_visits.toString(),n.nb_visits.toString()]),t.index>0&&(c+="

",c+=a("General_ComparisonCardTooltip2",[s.nb_visits_change.toString(),this.htmlentities(l.compareSegmentPretty),l.comparePeriodPretty])),c+="
",c},htmlentities(e){return M.helper.htmlEntities(e)}},mounted(){M.on("piwikComparisonsChanged",()=>{this.onComparisonsChanged()}),this.onComparisonsChanged()}});Go.render=Fo;var Ko=Go;const Yo={ref:"root",class:"menuDropdown"},Qo=["title"],Jo=["innerHTML"],Xo=Object(D["createElementVNode"])("span",{class:"icon-chevron-down reporting-menu-sub-icon"},null,-1),Zo={class:"items"},ei={key:0,class:"search"},ti=["placeholder"],oi=["title"],ii=["title"];function ni(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("focus-if"),s=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Yo,[Object(D["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=t=>e.showItems=!e.showItems),title:e.tooltip},[Object(D["createElementVNode"])("span",{class:"title-label",innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Jo),Xo],8,Qo),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Zo,[e.showSearch&&e.showItems?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ei,[Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=t=>e.searchTerm=t),onKeydown:t[2]||(t[2]=t=>e.onSearchTermKeydown(t)),placeholder:e.translate("General_Search")},null,40,ti),[[D["vModelText"],e.searchTerm],[r,{focused:e.showItems}]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{class:"search_ico icon-search",title:e.translate("General_Search")},null,8,oi),[[D["vShow"],!e.searchTerm]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{onClick:t[3]||(t[3]=t=>{e.searchTerm="",e.searchItems("")}),class:"reset icon-close",title:e.translate("General_Clear")},null,8,ii),[[D["vShow"],e.searchTerm]])])):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",{onClick:t[4]||(t[4]=t=>e.selectItem(t))},[Object(D["renderSlot"])(e.$slots,"default")])],512),[[D["vShow"],e.showItems]])])),[[s,{blur:e.lostFocus}]])}const{$:ai}=window;var ri=Object(D["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:tt,FocusIf:it},emits:["afterSelect"],watch:{menuTitle(){this.actualMenuTitle=this.menuTitle}},data(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus(){this.showItems=!1},selectItem(e){const t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,e=>`&#${e.charCodeAt(0)};`)),this.showItems=!1,ai(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect",e.target))},onSearchTermKeydown(){setTimeout(()=>{this.searchItems(this.searchTerm)})},searchItems(e){const t=e.toLowerCase();ai(this.$refs.root).find(".item").each((e,o)=>{const i=ai(o);-1===i.text().toLowerCase().indexOf(t)?i.hide():i.show()})}}});ri.render=ni;var si=ri;const li={ref:"root"};function ci(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",li,null,512)}const di=1,{$:ui}=window;var pi=Object(D["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,persistentHighlightedDateStart:Date,persistentHighlightedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,disabled:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup(e,t){const o=Object(D["ref"])(null);function i(t,o){const i=t.children("a"),{selectedDateStart:n,selectedDateEnd:a}=e,r=o.getTime(),s=!!(e.persistentHighlightedDateStart&&e.persistentHighlightedDateEnd&&o>=e.persistentHighlightedDateStart&&o<=e.persistentHighlightedDateEnd),l=!(!n||!a||r!==n.getTime()&&r!==a.getTime());l?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&o>=e.highlightedDateStart&&o<=e.highlightedDateEnd?(t.addClass("ui-state-hover"),i.length&&i.addClass("ui-state-hover")):(t.removeClass("ui-state-hover"),i.removeClass("ui-state-hover")),s?(t.addClass("ui-datepicker-persistent-highlight"),i.length&&i.addClass("ui-datepicker-persistent-highlight")):(t.removeClass("ui-datepicker-persistent-highlight"),i.removeClass("ui-datepicker-persistent-highlight"))}function n(e,t,o){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,o);const i=parseInt(e.children("a,span").text(),10);return new Date(o,t,i)}function a(e,t,o){let i;const a=e.parent(),r=a.children("td");if(a.is(":first-child")){const s=a.children("td:not(.ui-datepicker-other-month)").first();return i=n(s,t,o),i.setDate(r.index(e)-r.index(s)+1),i}const s=a.children("td:not(.ui-datepicker-other-month)").last();return i=n(s,t,o),i.setDate(i.getDate()+r.index(e)-r.index(s)),i}function r(){const e=ui(o.value),t=e.find("td[data-month]"),i=parseInt(t.attr("data-month"),10),n=parseInt(t.attr("data-year"),10);return[i,n]}function s(){const e=ui(o.value),t=e.find(".ui-datepicker-calendar"),a=r(),s=t.find("td"),l=s.first(),c=n(l,a[0],a[1]);s.each((function(){i(ui(this),c),c.setDate(c.getDate()+1)}))}function l(){if(!e.viewDate)return!1;let t;if("string"===typeof e.viewDate)try{t=p(e.viewDate)}catch(a){return!1}else t=e.viewDate;const i=ui(o.value),n=r();return(n[0]!==t.getMonth()||n[1]!==t.getFullYear())&&(i.datepicker("setDate",t),!0)}function c(){const t=ui(o.value),i=t.find(".ui-datepicker-month")[0];i&&(i.disabled=e.disableMonthDropdown||!!e.disabled);const n=t.find(".ui-datepicker-year")[0];n&&(n.disabled=!!e.disabled)}function d(){const t=ui(o.value),i=e.disabled?-1:0;t.find("a, select").attr("tabindex",i),t.attr("aria-disabled",e.disabled?"true":"false"),e.disabled?t.find("a").attr("aria-disabled","true"):t.find("a").removeAttr("aria-disabled")}function u(){const e=ui(o.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href",""),e.find(".ui-datepicker-prev .ui-icon").removeClass("ui-icon-circle-triangle-w").addClass("icon-chevron-left"),e.find(".ui-datepicker-next .ui-icon").removeClass("ui-icon-circle-triangle-e").addClass("icon-chevron-right"),d()}function m(){const t=ui(o.value),i=e.stepMonths||di;if(t.datepicker("option","stepMonths")===i)return!1;const n=ui(".ui-datepicker-month",t).val(),a=ui(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",i).datepicker("setDate",new Date(a,n)),u(),!0}function h(){if(!ui(this).hasClass("ui-state-hover"))return;const e=ui(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}function g(){c(),d(),s()}return Object(D["watch"])(()=>Object.assign({},e),(e,t)=>{let o=!1;[e=>e.selectedDateStart,e=>e.selectedDateEnd,e=>e.persistentHighlightedDateStart,e=>e.persistentHighlightedDateEnd,e=>e.highlightedDateStart,e=>e.highlightedDateEnd].forEach(i=>{if(o)return;const n=i(e),a=i(t);!n&&a&&(o=!0),n&&!a&&(o=!0),n&&a&&n.getTime()!==a.getTime()&&(o=!0)}),e.viewDate!==t.viewDate&&l()&&(o=!0),e.stepMonths!==t.stepMonths&&m(),e.disableMonthDropdown!==t.disableMonthDropdown&&c(),e.disabled!==t.disabled&&(c(),d()),o&&s()}),Object(D["onMounted"])(()=>{const i=ui(o.value),a=e.options||{},p=Object.assign(Object.assign(Object.assign({},M.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:()=>{setTimeout(()=>{u()})}});i.datepicker(p),i.on("mouseover","tbody td a",e=>{e.originalEvent&&s()}),i.on("mouseenter","tbody td",(function(){const e=r(),o=ui(this),i=n(o,e[0],e[1]);t.emit("cellHover",{date:i,$cell:o})})),i.on("mouseout","tbody td a",()=>{s()}),i.on("mouseleave","table",()=>t.emit("cellHoverLeave")).on("mouseenter","thead",()=>t.emit("cellHoverLeave")),i.on("click","tbody td.ui-datepicker-other-month",h),i.on("click",e=>{e.preventDefault();const t=ui(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&g()}),i.on("click","td[data-month]",e=>{const o=ui(e.target).closest("td"),i=parseInt(o.attr("data-month"),10),n=parseInt(o.attr("data-year"),10),a=parseInt(o.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(n,i,a)})});const b=m();l(),c(),b||u(),d(),s()}),{root:o}}});pi.render=ci;var mi=pi;const hi={class:"dateRangePicker"},gi={id:"calendarRangeFrom"},bi={class:"dateRangePicker-label"},fi=["disabled"],vi={id:"calendarRangeTo"},Oi={class:"dateRangePicker-label"},yi=["disabled"];function ji(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DatePicker");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",hi,[Object(D["createElementVNode"])("div",gi,[Object(D["createElementVNode"])("h6",bi,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default dateRangePicker-field",disabled:e.disabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.startDateText=t),onKeydown:t[1]||(t[1]=t=>e.onRangeInputChanged("from",t)),onKeyup:t[2]||(t[2]=t=>e.handleEnterPress(t))},null,40,fi),[[D["vModelText"],e.startDateText]])]),Object(D["createVNode"])(r,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDate,"selected-date-end":e.fromPickerSelectedDate,"highlighted-date-start":e.fromPickerHoveredDate,"highlighted-date-end":e.fromPickerHoveredDate,disabled:e.disabled,onDateSelect:t[3]||(t[3]=t=>e.setStartRangeDate(t.date)),onCellHover:t[4]||(t[4]=t=>e.fromPickerHoveredDate=e.getNewHoveredDate(t.date,t.$cell)),onCellHoverLeave:t[5]||(t[5]=t=>e.fromPickerHoveredDate=null)},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","disabled"])]),Object(D["createElementVNode"])("div",vi,[Object(D["createElementVNode"])("h6",Oi,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default dateRangePicker-field",disabled:e.disabled,"onUpdate:modelValue":t[6]||(t[6]=t=>e.endDateText=t),onKeydown:t[7]||(t[7]=t=>e.onRangeInputChanged("to",t)),onKeyup:t[8]||(t[8]=t=>e.handleEnterPress(t))},null,40,yi),[[D["vModelText"],e.endDateText]])]),Object(D["createVNode"])(r,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDate,"selected-date-end":e.toPickerSelectedDate,"highlighted-date-start":e.toPickerHoveredDate,"highlighted-date-end":e.toPickerHoveredDate,disabled:e.disabled,onDateSelect:t[9]||(t[9]=t=>e.setEndRangeDate(t.date)),onCellHover:t[10]||(t[10]=t=>e.toPickerHoveredDate=e.getNewHoveredDate(t.date,t.$cell)),onCellHoverLeave:t[11]||(t[11]=t=>e.toPickerHoveredDate=null)},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","disabled"])])])}const wi="YYYY-MM-DD";var Si=Object(D["defineComponent"])({name:"DateRangePicker",props:{startDate:String,endDate:String,disabled:Boolean},components:{DatePicker:mi},data(){let e=null;try{this.startDate&&(e=p(this.startDate))}catch(o){}let t=null;try{this.endDate&&(t=p(this.endDate))}catch(o){}return{fromPickerSelectedDate:e,toPickerSelectedDate:t,fromPickerHoveredDate:null,toPickerHoveredDate:null,startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate(){this.startDateText=this.startDate,this.syncStartRangeDateFromProp(this.startDate)},endDate(){this.endDateText=this.endDate,this.syncEndRangeDateFromProp(this.endDate)}},methods:{setStartRangeDate(e){this.fromPickerSelectedDate=e,this.rangeChanged()},setEndRangeDate(e){this.toPickerSelectedDate=e,this.rangeChanged()},onRangeInputChanged(e,t){setTimeout(()=>{"from"===e?this.setStartRangeDateFromStr(t.target.value):this.setEndRangeDateFromStr(t.target.value)})},getNewHoveredDate(e,t){return t.hasClass("ui-datepicker-unselectable")?null:e},handleEnterPress(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},syncStartRangeDateFromProp(e){this.startDateInvalid=!0;let t=null;try{e&&e.length===wi.length&&(t=p(e))}catch(o){}t&&(this.fromPickerSelectedDate=t,this.startDateInvalid=!1)},setStartRangeDateFromStr(e){this.syncStartRangeDateFromProp(e),this.startDateInvalid||this.rangeChanged()},syncEndRangeDateFromProp(e){this.endDateInvalid=!0;let t=null;try{e&&e.length===wi.length&&(t=p(e))}catch(o){}t&&(this.toPickerSelectedDate=t,this.endDateInvalid=!1)},setEndRangeDateFromStr(e){this.syncEndRangeDateFromProp(e),this.endDateInvalid||this.rangeChanged()},rangeChanged(){this.$emit("rangeChange",{start:this.fromPickerSelectedDate?d(this.fromPickerSelectedDate):null,end:this.toPickerSelectedDate?d(this.toPickerSelectedDate):null})}}});Si.render=ji;var Ci=Si;function ki(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DatePicker");return Object(D["openBlock"])(),Object(D["createBlock"])(r,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"persistent-highlighted-date-start":e.committedBetweenHighlightDates[0],"persistent-highlighted-date-end":e.committedBetweenHighlightDates[1],"highlighted-date-start":e.highlightedDates?e.highlightedDates[0]:null,"highlighted-date-end":e.highlightedDates?e.highlightedDates[1]:null,"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,disabled:e.disabled,onCellHover:t[0]||(t[0]=t=>e.onHoverNormalCell(t.date,t.$cell)),onCellHoverLeave:t[1]||(t[1]=t=>e.onHoverLeaveNormalCells()),onDateSelect:t[2]||(t[2]=t=>e.onDateSelected(t.date))},null,8,["selected-date-start","selected-date-end","persistent-highlighted-date-start","persistent-highlighted-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown","disabled"])} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const Di=" ",Ei=["custom","previousPeriod","previousYear"],Pi=[{key:"custom",value:a("General_Custom")},{key:"previousPeriod",value:a("General_PreviousPeriod").replace(/\s+/,Di)},{key:"previousYear",value:a("General_PreviousYear").replace(/\s+/,Di)}];function Ti(){return new Date(window.piwik.minDateYear,window.piwik.minDateMonth-1,window.piwik.minDateDay)}function xi(){return new Date(window.piwik.maxDateYear,window.piwik.maxDateMonth-1,window.piwik.maxDateDay)}const Vi="range";function Bi(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}function Ni(e){return"day"===e||"week"===e||"month"===e||"year"===e}var Ii=Object(D["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date],disabled:Boolean},components:{DatePicker:mi},emits:["select"],setup(e,t){const o=Object(D["ref"])(e.date),i=Object(D["ref"])([null,null]),n=Object(D["ref"])([null,null]),a=Object(D["ref"])(null),r=Ti(),s=xi();function l(t){const o=c.get(e.period).parse(t).getDateRange();return o[0]=ro[1]?o[1]:s,o}function d(e,t){if(!e||!t||e.getTime()>=t.getTime())return[null,null];const o=new Date(e);o.setDate(o.getDate()+1);const i=new Date(t);return i.setDate(i.getDate()-1),o.getTime()>i.getTime()?[null,null]:[o,i]}function u(e){if(!e)return void(n.value=[null,null]);const t=l(e);n.value=d(t[0],t[1])}function m(t,o){const i=ts,n=o.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);a.value=i||n?[null,null]:l(t)}function h(){a.value=null}function g(e){t.emit("select",{date:e})}function b(){if(!e.period||!e.date)return i.value=[null,null],n.value=[null,null],a.value=null,void(o.value=null);i.value=l(e.date),u(e.date),a.value=null,o.value=p(e.date)}return Object(D["watch"])(e,b),b(),{selectedDates:i,committedBetweenHighlightDates:n,highlightedDates:a,viewDate:o,onHoverNormalCell:m,onHoverLeaveNormalCells:h,onDateSelected:g}}});Ii.render=ki;var Mi=Ii;const Fi={key:0},Ri=["data-notification-instance-id"],Li={key:1},Ai={class:"notification-body"},_i=["innerHTML"],Hi={key:1};function $i(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createBlock"])(D["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=t=>e.toastClosed())},{default:Object(D["withCtx"])(()=>[e.deleted?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fi,[Object(D["createVNode"])(D["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(D["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])(["notification system",e.cssClasses]),style:Object(D["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=t=>e.closeNotification(t))}," × ")):Object(D["createCommentVNode"])("",!0),e.title?(Object(D["openBlock"])(),Object(D["createElementBlock"])("strong",Li,Object(D["toDisplayString"])(e.title),1)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Ai,[e.message?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,_i)):Object(D["createCommentVNode"])("",!0),e.message?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Hi,[Object(D["renderSlot"])(e.$slots,"default")]))])],14,Ri)]),_:3},8,["name"])])]),_:3},8,["name"])]))]),_:3},8,["name"])}const{$:Ui}=window;var qi=Object(D["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses(){const e={};return this.context&&(e["notification-"+this.context]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data(){return{deleted:!1}},mounted(){const e=()=>{setTimeout(()=>{this.deleted=!0},this.toastLength)};"toast"===this.type&&e(),this.style&&Ui(this.$refs.root).css(this.style)},methods:{toastClosed(){Object(D["nextTick"])(()=>{this.$emit("closed")})},closeNotification(e){this.canClose&&e&&e.target&&(this.deleted=!0,Object(D["nextTick"])(()=>{this.$emit("closed")})),this.markNotificationAsRead()},markNotificationAsRead(){this.notificationId&&te.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});qi.render=$i;var Wi=qi;const zi={class:"notification-group"},Gi=["innerHTML"];function Ki(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Notification");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",zi,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.notifications,(t,o)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:t.id||"no-id-"+o,"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(D["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:o=>e.removeNotification(t.id)},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Gi)]),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"]))),128))])}function Yi(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:Qi}=window;class Ji{constructor(){Yi(this,"privateState",Object(D["reactive"])({notifications:[]})),Yi(this,"nextNotificationId",0)}get state(){return Object(D["readonly"])(this.privateState)}appendNotification(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}prependNotification(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}remove(e){this.privateState.notifications=this.privateState.notifications.filter(t=>t.id!==e)}parseNotificationDivs(){const e=Qi('[data-role="notification"]'),t=[];e.each((o,i)=>{const n=Qi(i),a=n.data(),r=n.html();r&&t.push(Object.assign(Object.assign({},a),{},{message:r,animate:!1})),e.remove()}),t.forEach(e=>this.show(e))}clearTransientNotifications(){this.privateState.notifications=this.privateState.notifications.filter(e=>"transient"!==e.type)}show(e){this.checkMessage(e.message);let t=e.prepend?this.prependNotification:this.appendNotification,o="#notificationContainer";if(e.placeat)o=e.placeat;else{const e=".modal.open .modal-content",i=document.querySelector(e);i&&(i.querySelector("#modalNotificationContainer")||Qi(i).prepend('
'),o=e+" #modalNotificationContainer",t=this.prependNotification)}const i=e.group||(o?o.toString():"");this.initializeNotificationContainer(o,i);const n=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:i,notificationId:e.id,notificationInstanceId:n,type:e.type||"transient"})),n}scrollToNotification(e){setTimeout(()=>{const t=document.querySelector(`[data-notification-instance-id='${e}']`);t&&M.helper.lazyScrollTo(t,250)})}toast(e){this.checkMessage(e.message);const t=e.placeat?Qi(e.placeat):void 0;if(!t||!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");const o=document.createElement("div");o.style.position="absolute",o.style.top=t.offset().top+"px",o.style.left=t.offset().left+"px",o.style.zIndex="1000",document.body.appendChild(o);const i=ve({render:()=>Object(D["createVNode"])(Wi,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:()=>{i.unmount()}}))});i.mount(o)}initializeNotificationContainer(e,t){if(!e)return;const o=Qi(e);if(o.children(".notification-group").length)return;const i=window.CoreHome.NotificationGroup,n=ve({template:'',data:()=>({group:t})});n.component("NotificationGroup",i),n.mount(o[0])}checkMessage(e){if(!e)throw new Error("No message given, cannot display notification")}}const Xi=new Ji;var Zi=Xi;Qi(()=>Xi.parseNotificationDivs());var en=Object(D["defineComponent"])({props:{group:String},components:{Notification:Wi},computed:{notifications(){return Zi.state.notifications.filter(e=>this.group?this.group===e.group:!e.group)}},methods:{removeNotification(e){Zi.remove(e)}}});en.render=Ki;var tn=en; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const on=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),nn=[on];function an(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:"item-help-icon",tabindex:"5",href:"javascript:",onClick:t[0]||(t[0]=(...t)=>e.showHelp&&e.showHelp(...t))},nn)}const rn="reportingMenu-help";var sn=Object(D["defineComponent"])({props:{message:{type:String,required:!0},name:{type:String,required:!0}},data(){return{currentName:""}},methods:{showHelp(){if(""!==this.currentName)return Zi.remove(rn),void(this.currentName="");Zi.show({context:"info",id:rn,type:"help",noclear:!0,class:"help-notification",message:this.message,placeat:"#notificationContainer",prepend:!0}),""!==this.name&&(this.currentName=this.name)}}});sn.render=an;var ln=sn;function cn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class dn{constructor(){cn(this,"state",Object(D["reactive"])({initialSites:[],isInitialized:!1})),cn(this,"stateFiltered",Object(D["reactive"])({initialSites:[],isInitialized:!1,excludedSites:[],onlySitesWithAdminAccess:!1,onlySitesWithAtLeastWriteAccess:!1,siteTypesToExclude:[]})),cn(this,"currentRequestAbort",null),cn(this,"limitRequest",void 0),cn(this,"initialSites",Object(D["computed"])(()=>Object(D["readonly"])(this.state.initialSites))),cn(this,"initialSitesFiltered",Object(D["computed"])(()=>Object(D["readonly"])(this.stateFiltered.initialSites)))}isFiltered(e=!1,t=[],o=!1,i=[]){return t.length>0||e||o||i.length>0}matchesCurrentFilteredState(e=!1,t=[],o=!1,i=[]){return!this.stateFiltered.isInitialized&&!this.isFiltered(e,t,o,i)||this.stateFiltered.isInitialized&&t.length===this.stateFiltered.excludedSites.length&&t.every((e,t)=>e===this.stateFiltered.excludedSites[t])&&e===this.stateFiltered.onlySitesWithAdminAccess&&o===this.stateFiltered.onlySitesWithAtLeastWriteAccess&&i.length===this.stateFiltered.siteTypesToExclude.length&&i.every((e,t)=>e===this.stateFiltered.siteTypesToExclude[t])}loadInitialSites(e=!1,t=[],o=!1,i=[]){return this.state.isInitialized&&!this.isFiltered(e,t,o,i)?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.stateFiltered.isInitialized&&this.matchesCurrentFilteredState(e,t,o,i)?Promise.resolve(Object(D["readonly"])(this.stateFiltered.initialSites)):this.isFiltered(e,t,o,i)?this.searchSite("%",e,t,o,i).then(n=>(this.stateFiltered.isInitialized=!0,this.stateFiltered.excludedSites=t,this.stateFiltered.onlySitesWithAdminAccess=e,this.stateFiltered.onlySitesWithAtLeastWriteAccess=o,this.stateFiltered.siteTypesToExclude=i,null!==n&&(this.stateFiltered.initialSites=n),n)):this.state.isInitialized?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.searchSite("%",e,t,o,i).then(e=>(this.state.isInitialized=!0,null!==e&&(this.state.initialSites=e),e))}loadSite(e){"all"===e?U.updateUrl(Object.assign(Object.assign({},U.urlParsed.value),{},{module:"MultiSites",action:"index",date:U.parsed.value.date,period:U.parsed.value.period})):U.updateUrl(Object.assign(Object.assign({},U.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},U.hashParsed.value),{},{segment:"",idSite:e}))}searchSite(e,t=!1,o=[],i=!1,n=[]){return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=te.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then(a=>{const r=a.value;let s="view";return t?s="admin":i&&(s="write"),this.currentRequestAbort=new AbortController,te.fetch({method:"SitesManager.getSitesWithMinimumAccess",permission:s,limit:r,pattern:e,sitesToExclude:o,siteTypesToExclude:n},{abortController:this.currentRequestAbort,abortable:!1})}).then(e=>e?this.processWebsitesList(e):null).finally(()=>{this.currentRequestAbort=null})):this.loadInitialSites(t,o,i,n)}processWebsitesList(e){let t=e;return t&&t.length?(t=t.map(e=>Object.assign(Object.assign({},e),{},{name:e.group?`[${e.group}] ${e.name}`:e.name})),t.sort((e,t)=>e.name.toLowerCase()t.name.toLowerCase()?1:0),t):[]}}var un=new dn;const pn=["value","name"],mn=["title"],hn=["textContent"],gn={key:1,class:"placeholder"},bn={class:"dropdown"},fn={class:"custom_select_search"},vn=["placeholder"],On={key:0},yn={class:"custom_select_container"},jn=["onClick"],wn=["innerHTML","href","title"],Sn={class:"custom_select_ul_list"},Cn={class:"noresult"},kn={key:1};function Dn(e,t,o,i,n,a){var r,s,l,c;const d=Object(D["resolveComponent"])("AllSitesLink"),u=Object(D["resolveDirective"])("tooltips"),p=Object(D["resolveDirective"])("focus-if"),m=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(D["openBlock"])(),Object(D["createElementBlock"])("input",{key:0,type:"hidden",value:null===(r=e.displayedModelValue)||void 0===r?void 0:r.id,name:e.name},null,8,pn)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=(...t)=>e.onClickSelector&&e.onClickSelector(...t)),onKeydown:t[1]||(t[1]=t=>e.onPressEnter(t)),href:"javascript:void(0)",class:Object(D["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(D["createElementVNode"])("span",null,[null!==(s=e.displayedModelValue)&&void 0!==s&&s.name||!e.placeholder?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,textContent:Object(D["toDisplayString"])((null===(l=e.displayedModelValue)||void 0===l?void 0:l.name)||e.firstSiteName)},null,8,hn)):Object(D["createCommentVNode"])("",!0),null!==(c=e.displayedModelValue)&&void 0!==c&&c.name||!e.placeholder?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",gn,Object(D["toDisplayString"])(e.placeholder),1))]),Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])(["icon icon-chevron-down",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2)],42,mn)),[[u]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",bn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",fn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=t=>{e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=t=>e.searchTerm=t),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,vn),[[D["vModelText"],e.searchTerm],[p,{focused:e.shouldFocusOnSearch}]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=t=>{e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[D["vShow"],e.searchTerm]])],512),[[D["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",On,[Object(D["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=t=>e.onAllSitesClick(t))},null,8,["href","all-sites-text"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yn,[Object(D["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=t=>e.showSitesList=!1)},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.sites,(o,i)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{onClick:t=>e.switchSite(Object.assign(Object.assign({},o),{},{id:o.idsite}),t),key:i},[Object(D["createElementVNode"])("a",{onClick:t[6]||(t[6]=e=>e.preventDefault()),innerHTML:e.$sanitize(e.getMatchedSiteName(o.name)),tabindex:"4",href:e.getUrlForSiteId(o.idsite),title:o.name},null,8,wn)],8,jn)),[[D["vShow"],!(!e.showSelectedSite&&""+e.activeSiteId===""+o.idsite)]])),128))]),Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",Sn,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("div",Cn,Object(D["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[D["vShow"],!e.sites.length&&e.searchTerm]])])),[[u,{content:e.tooltipContent}]]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",kn,[Object(D["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=t=>e.onAllSitesClick(t))},null,8,["href","all-sites-text"])])):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}const En=["innerHTML","href"];function Pn(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{onClick:t[1]||(t[1]=e=>this.onClick(e)),class:"custom_select_all"},[Object(D["createElementVNode"])("a",{onClick:t[0]||(t[0]=e=>e.preventDefault()),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,En)])}var Tn=Object(D["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick(e){this.$emit("click",e)}}});Tn.render=Pn;var xn=Tn,Vn=Object(D["defineComponent"])({props:{modelValue:Object,showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:a("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String,defaultToFirstSite:Boolean,sitesToExclude:{type:Array,default:()=>[]},onlySitesWithAtLeastWriteAccess:{type:Boolean,default:!1},siteTypesToExclude:{type:Array,default:()=>[]}},emits:["update:modelValue","blur"],components:{AllSitesLink:xn},directives:{FocusAnywhereButHere:tt,FocusIf:it,Tooltips:ct},watch:{searchTerm(){this.onSearchTermChanged()}},data(){return{searchTerm:"",activeSiteId:""+M.idSite,showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(M.config.autocomplete_min_sites,10)}},created(){this.searchSite=Pe(this.searchSite),!this.modelValue&&M.idSite&&this.$emit("update:modelValue",{id:M.idSite,name:M.helper.htmlDecode(M.siteName)})},mounted(){window.initTopControls(),this.loadInitialSites().then(()=>{this.shouldDefaultToFirstSite&&this.$emit("update:modelValue",{id:this.sites[0].idsite,name:this.sites[0].name})});const e=a("CoreHome_ShortcutWebsiteSelector");M.helper.registerShortcut("w",e,e=>{if(e.altKey)return;e.preventDefault?e.preventDefault():e.returnValue=!1;const t=this.$refs.selectorLink;t&&(t.click(),t.focus())})},computed:{shouldFocusOnSearch(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle(){return this.hasMultipleSites&&this.displayedModelValue?a("CoreHome_ChangeCurrentWebsite",this.htmlEntities(this.displayedModelValue.name)):""},hasMultipleSites(){const e=un.matchesCurrentFilteredState(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[])&&un.initialSitesFiltered.value&&un.initialSitesFiltered.value.length?un.initialSitesFiltered.value:un.initialSites.value;return e&&e.length>1},firstSiteName(){const e=un.initialSitesFiltered.value&&un.initialSitesFiltered.value.length?un.initialSitesFiltered.value:un.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites(){const e=U.stringify(Object.assign(Object.assign({},U.urlParsed.value),{},{module:"MultiSites",action:"index",date:U.parsed.value.date,period:U.parsed.value.period}));return"?"+e},shouldDefaultToFirstSite(){var e;return!(null!==(e=this.modelValue)&&void 0!==e&&e.id)&&(!this.hasMultipleSites||this.defaultToFirstSite)&&this.sites[0]},displayedModelValue(){return this.modelValue?this.modelValue:M.idSite?{id:M.idSite,name:M.helper.htmlDecode(M.siteName)}:this.shouldDefaultToFirstSite?{id:this.sites[0].idsite,name:this.sites[0].name}:null},tooltipContent(){return function(){const e=$(this).attr("title")||"";return M.helper.htmlEntities(e)}}},methods:{onSearchTermChanged(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite(e,t){const o=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&o&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.id,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.id&&un.loadSite(e.id))},onBlur(){this.showSitesList=!1,this.$emit("blur")},onClickSelector(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName(e){const t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return this.htmlEntities(e);const o=this.htmlEntities(e.substring(0,t)),i=this.htmlEntities(e.substring(t+this.searchTerm.length));return`${o}${this.searchTerm}${i}`},loadInitialSites(){return un.loadInitialSites(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[]).then(e=>{this.sites=e||[]})},searchSite(e){this.isLoading=!0,un.searchSite(e,this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[]).then(t=>{e===this.searchTerm&&t&&(this.sites=t)}).finally(()=>{this.isLoading=!1})},getUrlForSiteId(e){const t=U.stringify(Object.assign(Object.assign({},U.urlParsed.value),{},{segment:"",idSite:e})),o=U.stringify(Object.assign(Object.assign({},U.hashParsed.value),{},{segment:"",idSite:e}));return`?${t}#?${o}`},htmlEntities(e){return M.helper.htmlEntities(e)}}});Vn.render=Dn;var Bn=Vn;const Nn={ref:"root",class:"quickAccessInside"},In=["title","placeholder"],Mn={class:"dropdown quickAccessDropdown"},Fn={class:"no-result"},Rn=["onClick"],Ln=["onMouseenter","onClick"],An={class:"quickAccessMatomoSearch"},_n=["onMouseenter","onClick"],Hn=["textContent"],$n={class:"quick-access-category helpCategory"},Un=["href"];function qn(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("focus-if"),s=Object(D["resolveDirective"])("tooltips"),l=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Nn,[Object(D["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=t=>e.searchActive=!0)},null,32),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{class:"quickAccessInput browser-default",onKeydown:t[1]||(t[1]=t=>e.onKeypress(t)),onFocus:t[2]||(t[2]=t=>e.searchActive=!0),"onUpdate:modelValue":t[3]||(t[3]=t=>e.searchTerm=t),type:"text",tabindex:"5",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,In),[[D["vModelText"],e.searchTerm],[r,{focused:e.searchActive}],[s]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Mn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",Fn,Object(D["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[D["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menuItems,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:t.title},[Object(D["createElementVNode"])("li",{class:"quick-access-category",onClick:o=>{e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(D["toDisplayString"])(t.title),9,Rn),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.items,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:o=>e.searchIndex=t.menuIndex,onClick:o=>e.selectMenuItem(t),key:t.index},[Object(D["createElementVNode"])("a",null,Object(D["toDisplayString"])(t.name.trim()),1)],42,Ln))),128))]))),128)),Object(D["createElementVNode"])("ul",An,[Object(D["withDirectives"])(Object(D["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(D["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[D["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("li",{class:"no-result"},Object(D["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[D["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.sites,(t,o)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["result",{selected:e.numMenuItems+o===e.searchIndex}]),onMouseenter:t=>e.searchIndex=e.numMenuItems+o,onClick:o=>e.selectSite(t.idsite),key:t.idsite},[Object(D["createElementVNode"])("a",{textContent:Object(D["toDisplayString"])(t.name)},null,8,Hn)],42,_n)),[[D["vShow"],e.hasSitesSelector&&!e.isLoading]])),128))]),Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",$n,Object(D["toDisplayString"])(e.translate("General_HelpResources")),1),Object(D["createElementVNode"])("li",{class:Object(D["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=t=>e.searchIndex="help")},[Object(D["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s="+encodeURIComponent(e.searchTerm),target:"_blank"},Object(D["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Un)],34)])],512),[[D["vShow"],e.searchTerm&&e.searchActive]])])),[[l,{blur:e.onBlur}]])}function Wn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class zn{constructor(){Wn(this,"privateState",Object(D["reactive"])({pages:[]})),Wn(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Wn(this,"fetchAllPagesPromise",void 0),Wn(this,"pages",Object(D["computed"])(()=>this.state.value.pages))}findPageInCategory(e){return this.pages.value.find(t=>t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id)}findPage(e,t){return this.pages.value.find(o=>o&&o.category&&o.subcategory&&o.category.id===e&&""+o.subcategory.id===t)}reloadAllPages(){return delete this.fetchAllPagesPromise,this.getAllPages()}getAllPages(){return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=te.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then(e=>(this.privateState.pages=e,this.pages.value))),this.fetchAllPagesPromise.then(()=>this.pages.value)}}var Gn=new zn; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Kn(e){const t=[...e||[]];return t.sort((e,t)=>e.ordert.order?1:0),t} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Yn(e){const t=e;return t.subcategories?t.subcategories:[]} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Qn(e){const t=e;return t.subcategories?t.subcategories:[]}function Jn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Xn(e){const t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}const Zn="";function ea(e){const{groups:t}=e;return t&&t.length?t:[Zn]}class ta{constructor(){Jn(this,"privateState",Object(D["reactive"])({activeSubcategoryId:null,activeSubsubcategoryId:null})),Jn(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Jn(this,"activeCategory",Object(D["computed"])(()=>"undefined"!==typeof this.state.value.activeCategoryId?this.state.value.activeCategoryId:U.parsed.value.category)),Jn(this,"activeSubcategory",Object(D["computed"])(()=>this.state.value.activeSubcategoryId||U.parsed.value.subcategory)),Jn(this,"activeSubsubcategory",Object(D["computed"])(()=>{const e=this.state.value.activeSubsubcategoryId;if(e)return e;const t=this.findSubcategory(this.activeCategory.value,this.activeSubcategory.value);return t.subsubcategory&&t.subsubcategory.id===this.activeSubcategory.value?t.subsubcategory.id:null})),Jn(this,"menu",Object(D["computed"])(()=>this.buildMenuFromPages(U.parsed.value.group||Zn))),Jn(this,"fullMenu",Object(D["computed"])(()=>this.buildMenuFromPages(null)))}fetchMenuItems(){return Gn.getAllPages().then(()=>this.menu.value)}reloadMenuItems(){return Gn.reloadAllPages().then(()=>this.menu.value)}findSubcategory(e,t){let o=void 0,i=void 0,n=void 0;return this.menu.value.forEach(a=>{a.id===e&&(Yn(a)||[]).forEach(e=>{e.id===t&&(o=a,i=e),e.isGroup&&(Qn(e)||[]).forEach(r=>{r.id===t&&(o=a,i=e,n=r)})})}),{category:o,subcategory:i,subsubcategory:n}}buildMenuFromPages(e){const t=[],o=U.parsed.value.category,i=U.parsed.value.subcategory,n=Gn.pages.value,r={};return n.forEach(s=>{const l=Object.assign({},s.category),c=l.id,d=c===o;if(r[c])return;if(null!==e&&!ea(l).includes(e))return;r[c]=!0,l.subcategories=[];let u=null;const p=n.filter(e=>e.category.id===c);p.forEach(e=>{const t=Object.assign({},e.subcategory),o=t.id===i&&d;if(e.widgets&&e.widgets[0]&&Xn(e.subcategory.id)){u||(u=Object.assign({},t),u.name=a("CoreHome_ChooseX",[l.name]),u.isGroup=!0,u.subcategories=[],u.order=10),o&&(u.name=t.name);const e=t.id;return t.tooltip=`${t.name} (id = ${e})`,void u.subcategories.push(t)}l.subcategories.push(t)}),u&&u.subcategories&&u.subcategories.length<=5?u.subcategories.forEach(e=>l.subcategories.push(e)):u&&l.subcategories.push(u),l.subcategories=Kn(Yn(l)),t.push(l)}),Kn(t)}toggleCategory(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.activeCategory.value===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}enterSubcategory(e,t,o){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,o&&(this.privateState.activeSubsubcategoryId=o.id))}}var oa=new ta;const{ListingFormatter:ia}=window;function na(e){const t=e.getBoundingClientRect(),o=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=o.height()&&t.right<=o.width()}function aa(e){e&&e.scrollIntoView&&e.scrollIntoView()}var ra=Object(D["defineComponent"])({name:"QuickAccess",directives:{FocusAnywhereButHere:tt,FocusIf:it,Tooltips:ct},watch:{searchActive(e){const t=this.$refs.root;if(!t||!t.parentElement)return;const o=t.parentElement.classList;o.toggle("active",e),o.toggle("expanded",e)},reportingGroup(){this.topMenuItems=null,this.leftMenuItems=null,this.segmentItems=null,this.deactivateSearch()}},mounted(){const e=this.$refs.root;e&&e.parentElement&&e.parentElement.classList.add("quick-access","piwikSelector"),M.helper.registerShortcut("f",a("CoreHome_ShortcutSearch"),e=>{if(e.altKey)return;e.preventDefault();const t=document.querySelector("nav .activateLeftMenu");t&&window.$(t).is(":visible")&&Yt(),aa(this.$refs.root),this.activateSearch()})},data(){const e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created(){this.searchMenu=Pe(this.searchMenu.bind(this))},computed:{reportingGroup(){return U.parsed.value.group||Zn},hasSitesSelector(){return!!document.querySelector('.top_controls .siteSelector,.top_controls [vue-entry="CoreHome.SiteSelector"]')},quickAccessTitle(){const e=[a("CoreHome_MenuEntries")];return this.hasSegmentSelector&&e.push(a("CoreHome_Segments")),this.hasSitesSelector&&e.push(a("SitesManager_Sites")),a("CoreHome_QuickAccessTitle",ia.formatAnd(e))}},emits:["itemSelected","blur"],methods:{onKeypress(e){const t=this.searchTerm&&this.searchActive,o=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():o&&t||i&&t?this.deactivateSearch():o?this.searchActive=!1:setTimeout(()=>{this.searchActive=!0,this.searchMenu(this.searchTerm)})},highlightPreviousItem(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem(){const e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem(){const e=this.getCurrentlySelectedElement();e&&setTimeout(()=>{e.click(),this.$emit("itemSelected",e)},20)},deactivateSearch(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport(){const e=this.getCurrentlySelectedElement();e&&!na(e)&&aa(e)},getCurrentlySelectedElement(){const e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu(e){const t=e.toLowerCase();let o=-1;const i={},n=[],a=e=>{const t=Object.assign({},e);o+=1,t.menuIndex=o;const{category:a}=t;a in i||(n.push({title:a,items:[]}),i[a]=n.length-1);const r=i[a];n[r].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,un.searchSite(t).then(e=>{e&&(this.sites=e)}).finally(()=>{this.isLoading=!1}));const r=e=>-1!==e.name.toLowerCase().indexOf(t)||-1!==e.category.toLowerCase().indexOf(t);null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());const s=this.topMenuItems.filter(r),l=this.leftMenuItems.filter(r),c=this.segmentItems.filter(r),d=this.getReportingMenuItemsFromOtherGroups().filter(r);s.forEach(a),l.forEach(a),c.forEach(a),d.forEach(a),this.numMenuItems=s.length+l.length+c.length+d.length,this.menuItems=n},resetSearchIndex(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite(e){this.deactivateSearch(),Qt(),un.loadSite(e)},selectMenuItem(e){if(e.page)return void this.navigateToReportingPage(e.page);const t=document.querySelector(`[quick_access='${e.index}']`);if(t){this.deactivateSearch(),Qt();const e=t.getAttribute("href");if(e&&e.length>10&&t&&t.click)try{t.click()}catch(o){window.$(t).click()}else window.$(t).click()}},onBlur(){this.searchActive=!1,this.$emit("blur")},activateSearch(){this.searchActive=!0},getTopMenuItems(){const e=a("CoreHome_Menu"),t=[];return document.querySelectorAll("nav .sidenav li > a, nav .sidenav li > div > a").forEach(o=>{var i;let n=null===(i=o.textContent)||void 0===i?void 0:i.trim();var a;(!n||null!=o.parentElement&&null!=o.parentElement.tagName&&"DIV"===o.parentElement.tagName)&&(n=null===(a=o.getAttribute("title"))||void 0===a?void 0:a.trim());n&&(t.push({name:n,index:this.menuIndexCounter+=1,category:e}),o.setAttribute("quick_access",""+this.menuIndexCounter))}),t},getLeftMenuItems(){const e=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach(t=>{var o;const i=window.$(t).find("> .item");let n=(null===(o=i[0])||void 0===o?void 0:o.innerText.trim())||"";n&&-1!==n.lastIndexOf("\n")&&(n=n.slice(0,n.lastIndexOf("\n")).trim()),window.$(t).find("li .item").each((t,o)=>{var i;const a=null===(i=o.textContent)||void 0===i?void 0:i.trim();a&&(e.push({name:a,category:n,index:this.menuIndexCounter+=1}),o.setAttribute("quick_access",""+this.menuIndexCounter))})}),e},getSegmentItems(){if(!this.hasSegmentSelector)return[];const e=a("CoreHome_Segments"),t=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach(o=>{var i;const n=null===(i=o.querySelector(".segname"))||void 0===i||null===(i=i.textContent)||void 0===i?void 0:i.trim();n&&(t.push({name:n,category:e,index:this.menuIndexCounter+=1}),o.setAttribute("quick_access",""+this.menuIndexCounter))}),t},getReportingMenuItemsFromOtherGroups(){if(!Gn.pages.value.length)return[];const e=U.parsed.value.group||Zn,t=[];return oa.fullMenu.value.forEach(o=>{const i=ea(o);if(i.includes(e))return;const n=i[0],a=e=>{var i;const a=null===(i=e.name)||void 0===i?void 0:i.trim();a&&t.push({name:a,category:o.name,index:this.menuIndexCounter+=1,page:{category:o.id,subcategory:e.id,group:n}})};Yn(o).forEach(e=>{e.isGroup?Qn(e).forEach(a):a(e)})}),t},navigateToReportingPage(e){this.deactivateSearch(),Qt();const{idSite:t,period:o,date:i,segment:n,comparePeriods:a,compareDates:r,compareSegments:s}=U.parsed.value,l={idSite:t,period:o,date:i,segment:n,comparePeriods:a,compareDates:r,compareSegments:s,category:e.category,subcategory:e.subcategory};e.group&&(l.group=e.group),U.updateHash(l)}}});ra.render=qn;var sa=ra;const la={class:"searchInputContainer"},ca=Object(D["createElementVNode"])("span",{class:"icon-search"},null,-1),da=["value","placeholder"];function ua(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",la,[ca,Object(D["createElementVNode"])("input",Object(D["mergeProps"])({class:"searchInputField browser-default",type:"text",value:e.modelValue,placeholder:e.resolvedPlaceholder},e.$attrs,{onInput:t[0]||(t[0]=t=>e.onInput(t))}),null,16,da),e.showClear&&e.modelValue?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,type:"button",class:"searchInputClear",onClick:t[1]||(t[1]=t=>e.onClear())})):Object(D["createCommentVNode"])("",!0)])}var pa=Object(D["defineComponent"])({name:"SearchInput",inheritAttrs:!1,props:{modelValue:{type:String,required:!0},placeholder:{type:String,default:""},showClear:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{resolvedPlaceholder(){return this.placeholder||a("General_Search")}},methods:{translate:a,onInput(e){this.$emit("update:modelValue",e.target.value)},onClear(){this.$emit("update:modelValue","")}}});pa.render=ua;var ma=pa;const ha={class:"fieldArray form-group"},ga={key:0,class:"fieldUiControl"},ba=["onClick","title"];function fa(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ha,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",{["fieldArrayTable"+o]:!0}]),key:o},[e.field.uiControl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ga,[Object(D["createVNode"])(r,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(t,o),"model-modifiers":e.field.modelModifiers,placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:`${e.name}-${o}`,id:`${e.id}-${o}`,"template-file":e.field.templateFile,component:e.field.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","title","name","id","template-file","component"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",{onClick:t=>e.removeEntry(o),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ba),[[D["vShow"],o+1!==e.modelValue.length]])],2))),128))])}const va=Ce("CorePluginsAdmin","Field");var Oa=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field:Object,rows:String},components:{Field:va},emits:["update:modelValue"],watch:{modelValue(e){this.checkEmptyModelValue(e)}},mounted(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue(e){e&&e.length&&""===e.slice(-1)[0]||this.rows&&!((this.modelValue||[]).length-1&&this.modelValue){const t=this.modelValue.filter((t,o)=>o!==e);this.$emit("update:modelValue",t)}}}});Oa.render=fa;var ya=Oa;const ja={class:"multiPairField form-group"},wa={key:1,class:"fieldUiControl fieldUiControl2"},Sa={key:2,class:"fieldUiControl fieldUiControl3"},Ca={key:3,class:"fieldUiControl fieldUiControl4"},ka=["onClick","title"];function Da(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ja,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",{["multiPairFieldTable"+o]:!0,[`has${e.fieldCount}Fields`]:!0}]),key:o},[e.field1?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(D["createVNode"])(r,{"full-width":!0,"model-value":t[e.field1.key],options:e.field1.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field1.key,t),"model-modifiers":e.field1.modelModifiers,placeholder:" ",uicontrol:e.field1.uiControl,name:`${e.name}-p1-${o}`,id:`${e.id}-p1-${o}`,title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","name","id","title","template-file","component"])],2)):Object(D["createCommentVNode"])("",!0),e.field2?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",wa,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field2.key,t),"model-value":t[e.field2.key],"model-modifiers":e.field2.modelModifiers,placeholder:" ",uicontrol:e.field2.uiControl,name:`${e.name}-p2-${o}`,id:`${e.id}-p2-${o}`,title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),e.field3?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Sa,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field3.key,t),"model-value":t[e.field3.key],"model-modifiers":e.field3.modelModifiers,placeholder:" ",uicontrol:e.field3.uiControl,name:`${e.name}-p3-${o}`,id:`${e.id}-p3-${o}`,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),e.field4?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ca,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field4.key,t),"model-value":t[e.field4.key],"model-modifiers":e.field4.modelModifiers,placeholder:" ",uicontrol:e.field4.uiControl,name:`${e.name}-p4-${o}`,id:`${e.id}-p4-${o}`,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",{onClick:t=>e.removeEntry(o),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ka),[[D["vShow"],o+1!==e.modelValue.length]])],2))),128))])}const Ea=Ce("CorePluginsAdmin","Field");var Pa=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field1:Object,field2:Object,field3:Object,field4:Object,rows:Number},components:{Field:Ea},computed:{fieldCount(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue(e){this.checkEmptyModelValue(e)}},mounted(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.rows&&!(this.modelValue.length-1&&this.modelValue){const t=this.modelValue.filter((t,o)=>o!==e);this.$emit("update:modelValue",t)}},isEmptyValue(e){const{fieldCount:t}=this;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue(){const e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});Pa.render=Da;var Ta=Pa;const xa=["disabled"],Va=Object(D["createElementVNode"])("span",{class:"icon-chevron-left"},null,-1),Ba=[Va],Na=["title"],Ia=Object(D["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ma={class:"flex"},Fa={key:0,id:"ajaxLoadingCalendar"},Ra={class:"loadingSegment"},La=["disabled"],Aa=Object(D["createElementVNode"])("span",{class:"icon-chevron-right"},null,-1),_a=[Aa];function Ha(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("PeriodSelectorOptionsColumn"),s=Object(D["resolveComponent"])("PeriodSelectorCalendarColumn"),l=Object(D["resolveComponent"])("ActivityIndicator"),c=Object(D["resolveDirective"])("tooltips"),d=Object(D["resolveDirective"])("expand-on-click");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{ref:"root",class:Object(D["normalizeClass"])(["periodSelector piwikSelector",{"periodSelector-withPrevNext":e.canShowMovePeriod}])},[e.canShowMovePeriod?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,class:"move-period move-period-prev",onClick:t[0]||(t[0]=t=>e.movePeriod(-1)),disabled:e.isPeriodMoveDisabled(-1)},Ba,8,xa)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{ref:"title",id:"date",class:"title",tabindex:"4",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ia,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.currentlyViewingText),1)],8,Na)),[[c]]),Object(D["createElementVNode"])("div",{id:"periodMore",class:Object(D["normalizeClass"])(["dropdown","range"===e.selectedPeriod?"dual-calendar":"single-calendar"])},[Object(D["createElementVNode"])("div",Ma,[Object(D["createVNode"])(r,{"ui-selected-period":e.selectedPeriod,"periods-filtered":e.periodsFiltered,"applied-period":e.committedPeriod,"active-preset-id":e.activePresetId,"min-allowed-date":e.minAllowedDate,"max-allowed-date":e.maxAllowedDate,"onUpdate:uiSelectedPeriod":t[1]||(t[1]=t=>e.selectedPeriod=t),onPeriodSelect:t[2]||(t[2]=t=>e.onPeriodOptionSelected(t)),onPeriodDblclick:t[3]||(t[3]=t=>e.onPeriodOptionDblClick(t)),onPresetSelect:t[4]||(t[4]=t=>e.onPresetDateRangeSelected(t)),onPresetDblclick:t[5]||(t[5]=t=>e.onPresetDateRangeDblClick(t))},null,8,["ui-selected-period","periods-filtered","applied-period","active-preset-id","min-allowed-date","max-allowed-date"]),Object(D["createVNode"])(s,{"ui-selection":e.uiSelection,"calendar-viewport":e.calendarViewport,"display-range-start-date":e.displayRangeStartDate,"display-range-end-date":e.displayRangeEndDate,"single-calendar-period":e.singleCalendarPeriod,"single-calendar-selected-date":e.singleCalendarSelectedDate,"is-comparison-enabled":e.isComparisonEnabled,"is-comparing":e.isComparing,"compare-period-type":e.comparePeriodType,"compare-start-date":e.compareStartDate,"compare-end-date":e.compareEndDate,"compare-period-dropdown-options":e.comparePeriodDropdownOptions,"show-invalid-comparison-message":e.shouldDisplayInvalidComparisonMessage(),"is-apply-enabled":e.isApplyEnabled(),onRangeChange:t[6]||(t[6]=t=>e.onRangeChange(t.start,t.end)),onSingleDateSelect:t[7]||(t[7]=t=>e.onDatePickerSelected(t)),onApplyClick:t[8]||(t[8]=t=>e.onApplyClicked()),onDisabledApplyInteraction:t[9]||(t[9]=t=>e.onDisabledApplyInteraction()),"onUpdate:isComparing":t[10]||(t[10]=t=>e.onCompareToggleUpdated(t)),"onUpdate:comparePeriodType":t[11]||(t[11]=t=>e.onComparePeriodTypeUpdated(t)),"onUpdate:compareStartDate":t[12]||(t[12]=t=>e.onCompareStartDateUpdated(t)),"onUpdate:compareEndDate":t[13]||(t[13]=t=>e.onCompareEndDateUpdated(t))},null,8,["ui-selection","calendar-viewport","display-range-start-date","display-range-end-date","single-calendar-period","single-calendar-selected-date","is-comparison-enabled","is-comparing","compare-period-type","compare-start-date","compare-end-date","compare-period-dropdown-options","show-invalid-comparison-message","is-apply-enabled"])]),e.isLoadingNewPage?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fa,[Object(D["createVNode"])(l,{loading:!0}),Object(D["createElementVNode"])("div",Ra,Object(D["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(D["createCommentVNode"])("",!0)],2),e.canShowMovePeriod?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:1,class:"move-period move-period-next",onClick:t[14]||(t[14]=t=>e.movePeriod(1)),disabled:e.isPeriodMoveDisabled(1)},_a,8,La)):Object(D["createCommentVNode"])("",!0)],2)),[[d,{expander:"title",onExpand:e.onExpand,onClosed:e.onClosed}]])} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function $a(e){return!e.hasPendingNonRangePeriodChange&&("period"===e.uiSelectionType&&e.uiSelectedPeriod!==Vi&&!e.isCompareDirty||!(e.uiSelectedPeriod===Vi&&!e.hasPendingPresetSelection&&!e.isRangeValid)&&!(e.isComparing&&"custom"===e.comparePeriodType&&!e.isCompareRangeValid))}function Ua(e){if(e.hasPendingNonRangePeriodChange)return{type:"stop"};if(!e.isCompareDirty)return e.shouldCloseSelectorWithoutApplying?{type:"close"}:{type:"stop"};if(e.appliedPeriod===Vi){if(!e.hasCommittedRangeBounds)return{type:"stop"};const t=`${e.appliedRangeStartDate},${e.appliedRangeEndDate}`;return{type:"commit",date:e.rollingDateParam||t,period:Vi}}return e.formattedAppliedAnchorDate?{type:"commit",date:e.rollingDateParam||e.formattedAppliedAnchorDate,period:e.appliedPeriod}:{type:"stop"}} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function qa(e){return 0===e.detail}function Wa(e){const t=Object.assign({},e);return delete t.comparePeriods,delete t.comparePeriodType,delete t.compareDates,t}function za(e,t,o){const i=new Date(e.getTime());switch(t){case"day":i.setDate(i.getDate()+o);break;case"week":i.setDate(i.getDate()+7*o);break;case"month":i.setMonth(i.getMonth()+o);break;case"year":i.setFullYear(i.getFullYear()+o);break;default:break}return i}function Ga(e,t,o){const i=new Date(e.getTime());return io&&i.setTime(o.getTime()),i}const Ka={class:"period-type period-selector-options-column"},Ya={id:"otherPeriods"};function Qa(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("PeriodOptions"),s=Object(D["resolveComponent"])("PresetDateRanges");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ka,[Object(D["createElementVNode"])("h6",null,[Object(D["createElementVNode"])("b",null,Object(D["toDisplayString"])(e.translate("General_ChoosePeriod")),1)]),Object(D["createElementVNode"])("div",Ya,[Object(D["createVNode"])(r,{"model-value":e.uiSelectedPeriod,periods:e.periodsFiltered,"checked-period-id":e.uiSelectedPeriod,"active-date-period":e.appliedPeriod,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update:uiSelectedPeriod",t)),onSelect:t[1]||(t[1]=t=>e.$emit("period-select",t)),onDblclick:t[2]||(t[2]=t=>e.$emit("period-dblclick",t))},null,8,["model-value","periods","checked-period-id","active-date-period"]),Object(D["createVNode"])(s,{"checked-preset-id":e.activePresetId,"allowed-periods":e.periodsFiltered,"min-date":e.minAllowedDate,"max-date":e.maxAllowedDate,onSelect:t[3]||(t[3]=t=>e.$emit("preset-select",t)),onDblclick:t[4]||(t[4]=t=>e.$emit("preset-dblclick",t))},null,8,["checked-preset-id","allowed-periods","min-date","max-date"])])])}const Ja={class:"presetDateRanges"},Xa={key:0,class:"preset-date-range-group-separator"},Za=["title","onDblclick"],er=["name","id","checked","onClick","onChange"],tr={class:"preset-option-text"};function or(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ja,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.groupedPresetDateRanges,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:o,class:"preset-date-range-group"},[o>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Xa)):Object(D["createCommentVNode"])("",!0),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",{key:t.id},[Object(D["createElementVNode"])("label",{class:Object(D["normalizeClass"])({"selected-period-label":e.checkedPresetId===t.id}),title:e.checkedPresetId===t.id?"":e.translate("General_DoubleClickToChangePeriod"),onDblclick:o=>e.handlePresetDoubleClick(t.id)},[Object(D["createElementVNode"])("input",{type:"radio",class:"preset-option-input",name:e.presetInputName,id:"preset_date_"+t.id,checked:e.checkedPresetId===t.id,onClick:o=>e.handlePresetClick(t.id),onChange:o=>e.handlePresetSelected(t.id)},null,40,er),Object(D["createElementVNode"])("span",tr,Object(D["toDisplayString"])(e.translate(t.labelKey)),1)],42,Za)]))),128))]))),128))])} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const ir={today:"day",yesterday:"day",last7days:"range",last30days:"range",last90days:"range",lastWeekMonSun:"week",lastMonth:"month",lastQuarter:"range",lastYear:"year",thisWeekMonToday:"week",thisMonth:"month",thisQuarter:"range",thisYear:"year"},nr=[{id:"today",labelKey:"CoreHome_PresetDateToday"},{id:"yesterday",labelKey:"CoreHome_PresetDateYesterday"},{id:"last7days",labelKey:"CoreHome_PresetDateLast7Days"},{id:"last30days",labelKey:"CoreHome_PresetDateLast30Days"},{id:"last90days",labelKey:"CoreHome_PresetDateLast90Days"},{id:"lastWeekMonSun",labelKey:"CoreHome_PresetDateLastWeekMonSun"},{id:"lastMonth",labelKey:"CoreHome_PresetDateLastMonth"},{id:"lastQuarter",labelKey:"CoreHome_PresetDateLastQuarter"},{id:"lastYear",labelKey:"CoreHome_PresetDateLastYear"},{id:"thisWeekMonToday",labelKey:"CoreHome_PresetDateThisWeekMonToday"},{id:"thisMonth",labelKey:"CoreHome_PresetDateThisMonth"},{id:"thisQuarter",labelKey:"CoreHome_PresetDateThisQuarter"},{id:"thisYear",labelKey:"CoreHome_PresetDateThisYear"}],ar={"day|today":"today","day|yesterday":"yesterday","range|last7":"last7days","range|last30":"last30days","range|last90":"last90days","week|lastweek":"lastWeekMonSun","month|lastmonth":"lastMonth","year|lastyear":"lastYear","week|today":"thisWeekMonToday","month|today":"thisMonth","year|today":"thisYear"},rr={today:"today",yesterday:"yesterday",last7days:"last7",last30days:"last30",last90days:"last90",lastWeekMonSun:"lastweek",lastMonth:"lastmonth",lastYear:"lastyear",thisWeekMonToday:"today",thisMonth:"today",thisYear:"today"};function sr(e,t){return ar[`${e}|${t}`]||null}function lr(e){return new Date(e.getTime())}function cr(e,t){const o=lr(e);return o.setDate(o.getDate()+t),o}function dr(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ur(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function pr(e){const t=(e.getDay()+6)%7;return cr(e,-t)}function mr(e){const t=e.getMonth(),o=t-t%3;return new Date(e.getFullYear(),o,1)}function hr(e,t){return`${d(e)},${d(t)}`}function gr(e,t,o){return eo?new Date(o.getTime()):e}function br(e,t){const o=lr(t),i=t=>Object.assign(Object.assign({},t),{},{urlDate:rr[e]||t.date});switch(e){case"today":return i({id:e,period:"day",date:d(o),selectedDate:o,startDate:o,endDate:o});case"yesterday":{const t=cr(o,-1);return i({id:e,period:"day",date:d(t),selectedDate:t,startDate:t,endDate:t})}case"last7days":{const t=cr(o,-6);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"last30days":{const t=cr(o,-29);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"last90days":{const t=cr(o,-89);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"lastWeekMonSun":{const t=pr(o),n=cr(t,-7),a=cr(n,6);return i({id:e,period:"week",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"lastMonth":{const t=new Date(o.getFullYear(),o.getMonth()-1,1),n=dr(t),a=ur(t);return i({id:e,period:"month",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"lastQuarter":{const t=mr(o),n=cr(t,-1),a=mr(n);return i({id:e,period:"range",date:hr(a,n),selectedDate:n,startDate:a,endDate:n})}case"lastYear":{const t=o.getFullYear()-1,n=new Date(t,0,1),a=new Date(t,11,31);return i({id:e,period:"year",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"thisWeekMonToday":{const t=pr(o);return i({id:e,period:"week",date:d(o),selectedDate:o,startDate:t,endDate:o})}case"thisMonth":{const t=dr(o);return i({id:e,period:"month",date:d(o),selectedDate:o,startDate:t,endDate:o})}case"thisQuarter":{const t=mr(o);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"thisYear":{const t=new Date(o.getFullYear(),0,1);return i({id:e,period:"year",date:d(o),selectedDate:o,startDate:t,endDate:o})}default:throw new Error("Unknown preset date range: "+e)}}function fr(e,t,o=u()){try{let i=null,n=null;const a=nr.find(a=>{const r=br(a.id,o);if(r.period!==e)return!1;if(r.date===t)return!0;if("range"!==e)return i=i||p(t),g(i,r.selectedDate,e);n=n||c.parse(e,t).getDateRange();const s=[r.startDate,r.endDate];return n[0].getTime()===s[0].getTime()&&n[1].getTime()===s[1].getTime()});return(null===a||void 0===a?void 0:a.id)||sr(e,t)}catch(i){return sr(e,t)}}const vr=[["today","yesterday"],["last7days","last30days","last90days"],["lastWeekMonSun","lastMonth","lastQuarter","lastYear"],["thisWeekMonToday","thisMonth","thisQuarter","thisYear"]];let Or=0;var yr=Object(D["defineComponent"])({props:{checkedPresetId:{type:String,default:null},minDate:{type:Date,required:!0},maxDate:{type:Date,required:!0},today:{type:Date,default:()=>u()},allowedPeriods:{type:Array,required:!0}},data(){const e="preset-date-range-"+Or;return Or+=1,{presetInputName:e}},emits:["select","dblclick"],computed:{presetDateRanges(){return nr.filter(e=>this.allowedPeriods.includes(ir[e.id]))},groupedPresetDateRanges(){const e=new Map(this.presetDateRanges.map(e=>[e.id,e]));return vr.map(t=>t.map(t=>e.get(t)).filter(e=>!!e)).filter(e=>e.length)}},methods:{translate:a,handlePresetClick(e){this.checkedPresetId===e&&this.handlePresetSelected(e)},handlePresetSelected(e){const t=br(e,this.today);this.$emit("select",Object.assign(Object.assign({},t),{},{startDate:gr(t.startDate,this.minDate,this.maxDate),endDate:gr(t.endDate,this.minDate,this.maxDate)}))},handlePresetDoubleClick(e){const t=br(e,this.today);this.$emit("dblclick",Object.assign(Object.assign({},t),{},{startDate:gr(t.startDate,this.minDate,this.maxDate),endDate:gr(t.endDate,this.minDate,this.maxDate)}))}}});yr.render=or;var jr=yr;const wr=["aria-label"],Sr=["title","onDblclick"],Cr=["name","id","checked","onChange","onKeydown"],kr={class:"period-option-text"};function Dr(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"periodOptions",role:"radiogroup","aria-label":e.translate("General_ChoosePeriod")},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.displayPeriods,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",{key:t},[Object(D["createElementVNode"])("label",{class:Object(D["normalizeClass"])(["period-option-label",{"selected-period-label":e.checkedPeriodId===t}]),title:t===e.activeDatePeriod?"":e.translate("General_DoubleClickToChangePeriod"),onDblclick:o=>e.handlePeriodDoubleClick(t)},[Object(D["createElementVNode"])("input",{class:"period-option-input",type:"radio",name:e.periodInputName,id:"period_id_"+t,checked:e.checkedPeriodId===t,onChange:o=>e.handlePeriodSelected(t),onKeydown:Object(D["withKeys"])(Object(D["withModifiers"])(o=>e.handlePeriodEnter(t),["prevent"]),["enter"])},null,40,Cr),Object(D["createElementVNode"])("span",kr,Object(D["toDisplayString"])(e.getPeriodDisplayText(t)),1)],42,Sr)]))),128))],8,wr)}let Er=0;var Pr=Object(D["defineComponent"])({name:"PeriodOptions",props:{modelValue:{type:String,default:null},periods:{type:Array,required:!0},checkedPeriodId:{type:String,default:null},activeDatePeriod:{type:String,required:!0}},data(){const e="period-"+Er;return Er+=1,{periodInputName:e}},emits:["update:modelValue","select","dblclick"],computed:{displayPeriods(){return this.periods.includes("range")?["range"].concat(this.periods.filter(e=>"range"!==e)):this.periods}},methods:{translate:a,getPeriodDisplayText(e){const t="range"===e?`${a("General_Custom")} ${a("General_DateRangeInPeriodList")}`:c.get(e).getDisplayText();return t.charAt(0).toUpperCase()+t.slice(1)},handlePeriodSelected(e){const t={period:e};this.$emit("update:modelValue",e),this.$emit("select",t)},handlePeriodEnter(e){this.handlePeriodSelected(e)},handlePeriodDoubleClick(e){const t={period:e};this.$emit("dblclick",t)}}});Pr.render=Dr;var Tr=Pr,xr=Object(D["defineComponent"])({name:"PeriodSelectorOptionsColumn",components:{PresetDateRanges:jr,PeriodOptions:Tr},props:{uiSelectedPeriod:{type:String,required:!0},periodsFiltered:{type:Array,required:!0},appliedPeriod:{type:String,required:!0},activePresetId:{type:String,default:null},minAllowedDate:{type:Date,required:!0},maxAllowedDate:{type:Date,required:!0}},emits:["update:uiSelectedPeriod","period-select","period-dblclick","preset-select","preset-dblclick"],methods:{translate:a}});xr.render=Qa;var Vr=xr;const Br={class:"period-selector-calendar-column"},Nr={class:"period-date"},Ir=["disabled","value"];function Mr(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DateRangePicker"),s=Object(D["resolveComponent"])("PeriodDatePicker"),l=Object(D["resolveComponent"])("PeriodSelectorCompareControls");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Br,[Object(D["createElementVNode"])("div",null,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{class:"period-range","start-date":e.displayRangeStartDate,"end-date":e.displayRangeEndDate,onRangeChange:t[0]||(t[0]=t=>e.$emit("range-change",t)),onSubmit:t[1]||(t[1]=t=>e.$emit("apply-click"))},null,8,["start-date","end-date"]),[[D["vShow"],"range"===e.calendarViewport]])]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Nr,[Object(D["createVNode"])(s,{id:"datepicker",period:e.singleCalendarPeriod,date:e.singleCalendarSelectedDate,onSelect:t[2]||(t[2]=t=>e.$emit("single-date-select",t.date))},null,8,["period","date"])],512),[[D["vShow"],"single"===e.calendarViewport]]),Object(D["createVNode"])(l,{"is-comparison-enabled":e.isComparisonEnabled,"is-comparing":e.isComparing,"compare-period-type":e.comparePeriodType,"compare-start-date":e.compareStartDate,"compare-end-date":e.compareEndDate,"compare-period-dropdown-options":e.comparePeriodDropdownOptions,"show-invalid-comparison-message":e.showInvalidComparisonMessage,"onUpdate:isComparing":t[3]||(t[3]=t=>e.$emit("update:isComparing",t)),"onUpdate:comparePeriodType":t[4]||(t[4]=t=>e.$emit("update:comparePeriodType",t)),"onUpdate:compareStartDate":t[5]||(t[5]=t=>e.$emit("update:compareStartDate",t)),"onUpdate:compareEndDate":t[6]||(t[6]=t=>e.$emit("update:compareEndDate",t))},null,8,["is-comparison-enabled","is-comparing","compare-period-type","compare-start-date","compare-end-date","compare-period-dropdown-options","show-invalid-comparison-message"]),Object(D["createElementVNode"])("div",{class:"apply-button-container",onMousedownCapture:t[8]||(t[8]=(...t)=>e.onApplyButtonInteraction&&e.onApplyButtonInteraction(...t))},[Object(D["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[7]||(t[7]=t=>e.$emit("apply-click")),disabled:!e.isApplyEnabled,value:e.translate("General_Apply")},null,8,Ir)],32)])}const Fr={key:0,class:"compare-checkbox"},Rr={class:"compare-checkbox-label"},Lr=["checked"],Ar={class:"compare-checkbox-text"},_r={id:"comparePeriodToDropdown"},Hr={key:1,class:"compare-date-range"},$r={id:"comparePeriodStartDate"},Ur=Object(D["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),qr={id:"comparePeriodEndDate"},Wr={key:0,class:"compare-validation-message"};function zr(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],null,[e.isComparisonEnabled?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fr,[Object(D["createElementVNode"])("label",Rr,[Object(D["createElementVNode"])("input",{class:"compare-checkbox-input",id:"comparePeriodTo",type:"checkbox",checked:!!e.isComparing,onChange:t[0]||(t[0]=t=>e.onCompareToggle(t))},null,40,Lr),Object(D["createElementVNode"])("span",Ar,Object(D["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(D["createElementVNode"])("div",_r,[Object(D["createVNode"])(r,{"model-value":e.comparePeriodType,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:comparePeriodType",t)),style:Object(D["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["model-value","style","options","disabled"])])])):Object(D["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Hr,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",$r,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{"model-value":e.compareStartDate,"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update:compareStartDate",t)),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["model-value","title"])])]),Ur,Object(D["createElementVNode"])("div",qr,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{"model-value":e.compareEndDate,"onUpdate:modelValue":t[3]||(t[3]=t=>e.$emit("update:compareEndDate",t)),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["model-value","title"])])])]),e.showInvalidComparisonMessage?(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",Wr,Object(D["toDisplayString"])(e.translate("CoreHome_InvalidComparisonDateRange")),1)):Object(D["createCommentVNode"])("",!0)])):Object(D["createCommentVNode"])("",!0)],64)}const Gr=Ce("CorePluginsAdmin","Field");var Kr=Object(D["defineComponent"])({name:"PeriodSelectorCompareControls",components:{Field:Gr},props:{isComparisonEnabled:{type:Boolean,required:!0},isComparing:{type:Boolean,default:null},comparePeriodType:{type:String,required:!0},compareStartDate:{type:String,required:!0},compareEndDate:{type:String,required:!0},comparePeriodDropdownOptions:{type:Array,required:!0},showInvalidComparisonMessage:{type:Boolean,default:!1}},emits:["update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a,onCompareToggle(e){this.$emit("update:isComparing",e.target.checked)}}});Kr.render=zr;var Yr=Kr,Qr=Object(D["defineComponent"])({name:"PeriodSelectorCalendarColumn",components:{DateRangePicker:Ci,PeriodDatePicker:Mi,PeriodSelectorCompareControls:Yr},props:{uiSelection:{type:Object,required:!0},calendarViewport:{type:String,required:!0},displayRangeStartDate:{type:String,default:null},displayRangeEndDate:{type:String,default:null},singleCalendarPeriod:{type:String,required:!0},singleCalendarSelectedDate:{type:Date,default:null},isComparisonEnabled:{type:Boolean,required:!0},isComparing:{type:Boolean,default:null},comparePeriodType:{type:String,required:!0},compareStartDate:{type:String,required:!0},compareEndDate:{type:String,required:!0},comparePeriodDropdownOptions:{type:Array,required:!0},showInvalidComparisonMessage:{type:Boolean,default:!1},isApplyEnabled:{type:Boolean,required:!0}},emits:["range-change","single-date-select","apply-click","disabled-apply-interaction","update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a,onApplyButtonInteraction(){this.isApplyEnabled||this.$emit("disabled-apply-interaction")}}});Qr.render=Mr;var Jr=Qr; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const Xr=["date","period","comparePeriods","comparePeriodType","compareDates","compareSegments"];function Zr(e,t){return`${e}|${t}`}function es(e){const t={};return Object.keys(e).filter(e=>!Xr.includes(e)).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}function ts(e,t,o,i,n){return!o&&e===i&&t===n}function os(e,t,o,i){const n=!!o&&i===e,a=n&&o?Object.assign({},o):null;return{syncedUiSelection:a,lastKnownHashSelectionKey:e,lastKnownHashContextKey:t,nextHashUiSelection:null,nextHashSelectionKey:null,lastInteractionSource:null}}function is(e){if(e.pendingPresetSelection)return e.pendingPresetSelection.id;let t=null;return e.selectedPeriod===Vi?e.appliedRangeStartDate&&e.appliedRangeEndDate&&(t=`${e.appliedRangeStartDate},${e.appliedRangeEndDate}`):e.committedAnchorDate&&(t=d(e.committedAnchorDate)),t?fr(e.selectedPeriod,t,u()):null}function ns(e){e.calendarViewport=e.selectedPeriod===Vi?"range":"single",Ni(e.selectedPeriod)?e.singleCalendarPeriod=e.selectedPeriod:Ni(e.singleCalendarPeriod)||(e.singleCalendarPeriod="day"),e.selectedPeriod!==Vi?e.pendingPresetSelection&&Ni(e.pendingPresetSelection.period)?e.singleCalendarSelectedDate=e.pendingPresetSelection.selectedDate:e.singleCalendarSelectedDate=e.committedPeriod===e.selectedPeriod?e.committedAnchorDate:null:e.singleCalendarSelectedDate=null}var as=Object(D["defineComponent"])({name:"PeriodSelector",props:{periods:Array},components:{PeriodSelectorOptionsColumn:Vr,PeriodSelectorCalendarColumn:Jr,ActivityIndicator:We},directives:{ExpandOnClick:Et,Tooltips:ct},data(){const e=U.parsed.value.period,t=Ni(e)?e:"day",o=Ti(),i=xi();return{uiSelection:{type:"period",id:e},lastInteractionSource:null,nextHashUiSelection:null,nextHashSelectionKey:null,lastKnownHashSelectionKey:null,lastKnownHashContextKey:null,minAllowedDate:o,maxAllowedDate:i,pendingPresetSelection:null,committedPeriod:e,committedAnchorDate:null,selectedPeriod:e,calendarViewport:e===Vi?"range":"single",singleCalendarPeriod:t,singleCalendarSelectedDate:null,appliedRangeStartDate:null,appliedRangeEndDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:"",compareAppliedSignature:"",shouldShowInvalidComparisonMessage:!1}},mounted(){M.on("hidePeriodSelector",()=>{window.$(this.$refs.root).parent("#periodString").hide()}),M.on("matomoPageChange",()=>{window.$(this.$refs.root).parent("#periodString").show()}),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{activePresetId(){return is(this)},matomoParsed(){return U.parsed.value},isComparingStoreValue(){return zo.isComparingPeriods()},periodComparisonsStoreValue(){return zo.getPeriodComparisons()},comparePeriodDropdownOptions(){return Pi},currentlyViewingText(){let e;if("range"===this.committedPeriod){if(!this.appliedRangeStartDate||!this.appliedRangeEndDate)return a("General_Error");e=`${this.appliedRangeStartDate},${this.appliedRangeEndDate}`}else{if(!this.committedAnchorDate)return a("General_Error");e=d(this.committedAnchorDate)}try{return c.parse(this.committedPeriod,e).getPrettyString()}catch(t){return a("General_Error")}},isComparisonEnabled(){return zo.isComparisonEnabled()},periodsFiltered(){return(this.periods||[]).filter(e=>c.isRecognizedPeriod(e))},selectedComparisonParams(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],comparePeriodType:"custom",compareDates:[`${this.compareStartDate},${this.compareEndDate}`]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],comparePeriodType:"previousPeriod",compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){const e="range"===this.selectedPeriod?`${this.appliedRangeStartDate},${this.appliedRangeEndDate}`:d(this.committedAnchorDate),t=c.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],comparePeriodType:"previousYear",compareDates:[`${d(t[0])},${d(t[1])}`]}:{comparePeriods:[this.selectedPeriod],comparePeriodType:"previousYear",compareDates:[d(t[0])]}}return console.warn("Unknown compare period type: "+this.comparePeriodType),{}},previousPeriodDateToSelectedPeriod(){if("range"===this.selectedPeriod){const e=p(this.appliedRangeStartDate),t=p(this.appliedRangeEndDate),o=k.getLastNRange("day",2,e).startDate,i=Math.floor((t.valueOf()-e.valueOf())/864e5),n=k.getLastNRange("day",1+i,o);return`${d(n.startDate)},${d(n.endDate)}`}const e=k.getLastNRange(this.selectedPeriod,2,this.committedAnchorDate).startDate;return d(e)},selectedDateString(){if("range"===this.selectedPeriod){const e=this.appliedRangeStartDate,t=this.appliedRangeEndDate,o=p(e),i=p(t);return!Bi(o)||!Bi(i)||o>i?(window.$("#alert").find("h2").text(a("General_InvalidDateRange")),M.helper.modalConfirm("#alert",{}),null):`${e},${t}`}return d(this.committedAnchorDate)},isErrorDisplayed(){return this.currentlyViewingText===a("General_Error")},isRangeSelection(){return"range"===this.committedPeriod},canShowMovePeriod(){return!this.isRangeSelection&&!this.isErrorDisplayed},compareCurrentSignature(){return JSON.stringify({isComparing:!!this.isComparing,comparePeriodType:this.comparePeriodType||"",compareStartDate:this.compareStartDate||"",compareEndDate:this.compareEndDate||""})},isCompareDirty(){return this.compareCurrentSignature!==this.compareAppliedSignature},hasPendingNonRangePeriodChange(){return"period"===this.uiSelection.type&&"period"===this.lastInteractionSource&&this.selectedPeriod!==Vi&&this.selectedPeriod!==this.committedPeriod},isRangePresetSelection(){return"preset"===this.uiSelection.type&&this.selectedPeriod===Vi},displayRangeStartDate(){return this.isRangePresetSelection&&this.pendingPresetSelection?d(this.pendingPresetSelection.startDate):this.appliedRangeStartDate},displayRangeEndDate(){return this.isRangePresetSelection&&this.pendingPresetSelection?d(this.pendingPresetSelection.endDate):this.appliedRangeEndDate}},watch:{isComparingStoreValue:{immediate:!0,handler(e){this.isComparing=e}},matomoParsed:{immediate:!0,handler(){this.updateSelectedValuesFromHash()}},periodComparisonsStoreValue:{immediate:!0,handler(){this.updateComparisonValuesFromStore(),this.compareAppliedSignature=this.compareCurrentSignature}}},methods:{onExpand(e){if(qa(e)){const e=this.$refs.root,t="preset"===this.uiSelection.type?"#preset_date_"+this.uiSelection.id:"#period_id_"+this.uiSelection.id,o=e.querySelector(t)||e.querySelector("#preset_date_today");o instanceof HTMLElement&&o.focus()}},onClosed(e){qa(e)&&window.$(this.$refs.title).focus()},handleZIndexPositionRelativeCompareDropdownIssue(){const e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",()=>{e.addClass("compare-dropdown-open")}).on("blur","#comparePeriodToDropdown .select-dropdown",()=>{e.removeClass("compare-dropdown-open")})},setUiSelection(e,t){this.uiSelection=e,this.lastInteractionSource=t},clearPresetSelection(){this.pendingPresetSelection=null},setPendingPeriodAndDate(e,t){this.committedPeriod=e,this.selectedPeriod=e,this.committedAnchorDate=t,this.setRangeStartEndFromPeriod(e,d(t)),ns(this)},setPiwikPeriodAndDate(e,t){this.setPendingPeriodAndDate(e,t),this.setUiSelection({type:"period",id:e},"period");const o=d(t);this.clearPresetSelection(),this.commitSelectionToUrl(o,this.selectedPeriod)},commitSelectionToUrl(e,t){this.nextHashUiSelection=Object.assign({},this.uiSelection),this.nextHashSelectionKey=Zr(t,e),this.compareAppliedSignature=this.compareCurrentSignature,this.propagateNewUrlParams(e,t),window.initTopControls()},onPeriodOptionSelected(e){this.setUiSelection({type:"period",id:e.period},"period"),this.selectedPeriod=e.period,this.clearPresetSelection(),ns(this),e.period===Vi&&(this.isRangeValid=!0)},onPeriodOptionDblClick(e){this.onPeriodOptionSelected(e),this.hasInvalidCustomComparison()?this.showInvalidComparisonMessage():e.period!==Vi&&e.period!==this.committedPeriod&&this.committedAnchorDate&&this.setPiwikPeriodAndDate(e.period,this.committedAnchorDate)},canInteractWithSingleCalendar(){return"single"===this.calendarViewport&&this.selectedPeriod!==Vi},onDatePickerSelected(e){this.canInteractWithSingleCalendar()&&(this.setUiSelection({type:"period",id:this.selectedPeriod},"calendar"),this.setPendingPeriodAndDate(this.selectedPeriod,e),this.clearPresetSelection(),ns(this),this.commitSelectionToUrl(d(e),this.selectedPeriod))},onPresetDateRangeSelected(e){this.periodsFiltered.includes(e.period)&&(this.selectedPeriod=e.period,this.pendingPresetSelection=e,this.isRangeValid=e.period===Vi||this.isRangeValid,this.setUiSelection({type:"preset",id:e.id},"preset"),ns(this))},onPresetDateRangeDblClick(e){this.onPresetDateRangeSelected(e),this.hasInvalidCustomComparison()?this.showInvalidComparisonMessage():this.onApplyClicked()},propagateNewUrlParams(e,t){const o=this.selectedComparisonParams;let i;M.helper.isReportingPage()?(this.closePeriodSelector(),i=U.hashParsed.value):(this.isLoadingNewPage=!0,i=U.parsed.value),U.updateLocation(Object.assign(Object.assign({},Wa(i)),{},{date:e,period:t},o))},hasPendingPresetSelectionOwnedByUi(){return!!this.pendingPresetSelection&&"preset"===this.uiSelection.type&&this.pendingPresetSelection.id===this.uiSelection.id},shouldCloseSelectorWithoutApplying(){return this.selectedPeriod!==Vi&&!this.hasPendingNonRangePeriodChange},hasCommittedRangeBounds(){return!!this.appliedRangeStartDate&&!!this.appliedRangeEndDate},applyPendingPresetSelection(){if(!this.hasPendingPresetSelectionOwnedByUi())return!1;const e=this.pendingPresetSelection;return this.committedPeriod=e.period,this.committedAnchorDate=e.selectedDate,this.appliedRangeStartDate=d(e.startDate),this.appliedRangeEndDate=d(e.endDate),this.setUiSelection({type:"period",id:e.period},"preset"),this.pendingPresetSelection=null,ns(this),this.commitSelectionToUrl(e.urlDate,e.period),!0},applyRangeSelection(){if(this.selectedPeriod!==Vi)return!1;const e=this.selectedDateString;return!e||(this.committedPeriod=Vi,this.commitSelectionToUrl(this.getCurrentRollingDateParamIfOwnedByPreset()||e,Vi),!0)},applyNonRangeOrCompareChanges(){const e=Ua({hasPendingNonRangePeriodChange:this.hasPendingNonRangePeriodChange,isCompareDirty:this.isCompareDirty,shouldCloseSelectorWithoutApplying:this.shouldCloseSelectorWithoutApplying(),appliedPeriod:this.committedPeriod,hasCommittedRangeBounds:this.hasCommittedRangeBounds(),rollingDateParam:this.getCurrentRollingDateParamIfOwnedByPreset(),appliedRangeStartDate:this.appliedRangeStartDate,appliedRangeEndDate:this.appliedRangeEndDate,formattedAppliedAnchorDate:this.committedAnchorDate?d(this.committedAnchorDate):null});"stop"!==e.type&&("close"!==e.type?this.commitSelectionToUrl(e.date,e.period):this.closePeriodSelector())},onApplyClicked(){this.applyPendingPresetSelection()||this.applyRangeSelection()||this.applyNonRangeOrCompareChanges()},updateComparisonValuesFromStore(){this.comparePeriodType="previousPeriod",this.compareStartDate="",this.compareEndDate="";const e=zo.getPeriodComparisons();if(e.length<2)return;const t=U.parsed.value.comparePeriodType;if(!Ei.includes(t))return;if(this.comparePeriodType=t,"custom"!==this.comparePeriodType||"range"!==e[1].params.period)return;let o;try{o=c.parse(e[1].params.period,e[1].params.date)}catch(a){return}const[i,n]=o.getDateRange();this.compareStartDate=d(i),this.compareEndDate=d(n)},getCurrentContextKey(){return es(U.parsed.value)},applyUiSelectionFromHash(e,t,o){if(o){if("preset"===o.type)return void(this.uiSelection=o);const i=sr(e,t);return i&&this.periodsFiltered.includes(e)?void(this.uiSelection={type:"preset",id:i}):void(this.uiSelection=o)}const i=sr(e,t);if(i&&this.periodsFiltered.includes(e))return this.uiSelection={type:"preset",id:i},void(this.pendingPresetSelection=null);this.setUiSelection({type:"period",id:e},null),this.clearPresetSelection()},getCurrentRollingDateParamIfOwnedByPreset(){if("preset"!==this.uiSelection.type)return null;const e=U.parsed.value.period||"",t=U.parsed.value.date||"";if(e!==this.committedPeriod||!t)return null;const o=sr(e,t);return o!==this.uiSelection.id?null:t},resetSelectedDateValues(){this.committedAnchorDate=null,this.appliedRangeStartDate=null,this.appliedRangeEndDate=null},applyDateValuesFromHash(e,t){if(e===Vi){const o=c.get(e).parse(t),[i,n]=o.getDateRange();return this.committedAnchorDate=i,this.appliedRangeStartDate=d(i),void(this.appliedRangeEndDate=d(n))}this.committedAnchorDate=p(t),this.setRangeStartEndFromPeriod(e,t),Ni(e)&&(this.singleCalendarPeriod=e),this.singleCalendarSelectedDate=this.committedAnchorDate},updateSelectedValuesFromHash(){const e=U.parsed.value.date||"",t=U.parsed.value.period||"",o=Zr(t,e),i=this.getCurrentContextKey();if(ts(o,i,this.nextHashUiSelection,this.lastKnownHashSelectionKey,this.lastKnownHashContextKey))return;const n=os(o,i,this.nextHashUiSelection,this.nextHashSelectionKey);this.nextHashUiSelection=n.nextHashUiSelection,this.nextHashSelectionKey=n.nextHashSelectionKey,this.lastInteractionSource=n.lastInteractionSource,this.lastKnownHashSelectionKey=n.lastKnownHashSelectionKey,this.lastKnownHashContextKey=n.lastKnownHashContextKey,this.applyUiSelectionFromHash(t,e,n.syncedUiSelection),this.committedPeriod=t,this.selectedPeriod=t,this.resetSelectedDateValues();try{c.parse(t,e)}catch(a){return void(this.isRangeValid=t!==Vi&&null)}this.applyDateValuesFromHash(t,e),this.isRangeValid=t===Vi||null,this.pendingPresetSelection=null,ns(this),this.compareAppliedSignature=this.compareCurrentSignature},setRangeStartEndFromPeriod(e,t){const o=c.parse(e,t).getDateRange();this.appliedRangeStartDate=d(o[0]this.maxAllowedDate?this.maxAllowedDate:o[1])},canInteractWithRangeCalendar(){return"range"===this.calendarViewport&&this.selectedPeriod===Vi},onRangeChange(e,t){this.canInteractWithRangeCalendar()&&(e&&t?(this.isRangeValid=!0,this.appliedRangeStartDate=e,this.appliedRangeEndDate=t,this.setUiSelection({type:"period",id:Vi},"range"),this.clearPresetSelection()):this.isRangeValid=!1)},isApplyEnabled(){return $a({uiSelectionType:this.uiSelection.type,uiSelectedPeriod:this.selectedPeriod,hasPendingNonRangePeriodChange:this.hasPendingNonRangePeriodChange,hasPendingPresetSelection:!!this.pendingPresetSelection,isRangeValid:this.isRangeValid,isCompareDirty:this.isCompareDirty,isComparing:this.isComparing,comparePeriodType:this.comparePeriodType,isCompareRangeValid:this.isCompareRangeValid()})},shouldDisplayInvalidComparisonMessage(){return this.shouldShowInvalidComparisonMessage&&this.hasInvalidCustomComparison()},hasInvalidCustomComparison(){return!!this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid()},showInvalidComparisonMessage(){this.hasInvalidCustomComparison()&&(this.shouldShowInvalidComparisonMessage=!0)},dismissInvalidComparisonMessage(){this.shouldShowInvalidComparisonMessage=!1},onDisabledApplyInteraction(){this.showInvalidComparisonMessage()},onCompareToggleUpdated(e){this.isComparing=e,this.dismissInvalidComparisonMessage()},onComparePeriodTypeUpdated(e){this.comparePeriodType=e,this.dismissInvalidComparisonMessage()},onCompareStartDateUpdated(e){this.compareStartDate=e,this.dismissInvalidComparisonMessage()},onCompareEndDateUpdated(e){this.compareEndDate=e,this.dismissInvalidComparisonMessage()},closePeriodSelector(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid(){try{p(this.compareStartDate)}catch(e){return!1}try{p(this.compareEndDate)}catch(e){return!1}return!0},movePeriod(e){if(!this.canMovePeriod(e))return;const t=this.committedAnchorDate||new Date,o=za(t,this.committedPeriod,e),i=Ga(o,this.minAllowedDate,this.maxAllowedDate);this.setPiwikPeriodAndDate(this.committedPeriod,i)},isPeriodMoveDisabled(e){return null===this.committedAnchorDate?this.isRangeSelection:this.isRangeSelection||!this.canMovePeriod(e)},canMovePeriod(e){if(null===this.committedAnchorDate)return!1;const t=-1===e?this.minAllowedDate:this.maxAllowedDate;return!g(this.committedAnchorDate,t,this.committedPeriod)}}});as.render=Ha;var rs=as;const ss={class:"reportingMenu"},ls=["aria-label"],cs=["data-category-id"],ds=["onClick"],us={class:"hidden"},ps={key:2,role:"menu"},ms=["href","onClick","title"],hs=["href","onClick"],gs=["onClick"],bs=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),fs=[bs],vs={id:"mobile-left-menu",class:"sidenav sidenav--reporting-menu-mobile hide-on-large-only"},Os=["data-category-id"],ys={key:1,class:"collapsible collapsible-accordion"},js={class:"collapsible-header"},ws={class:"collapsible-body"},Ss=["onClick","href"],Cs=["onClick","href"];function ks(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MenuItemsDropdown"),s=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ss,[Object(D["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down collapsible",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menu,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id,"data-category-id":t.id},[t.component?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(t.component),{key:0,onAction:o=>e.loadCategory(t)},null,40,["onAction"])):Object(D["createCommentVNode"])("",!0),t.component?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"item",tabindex:"5",href:"",onClick:Object(D["withModifiers"])(o=>e.loadCategory(t),["prevent"])},[Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])("menu-icon "+(t.icon?t.icon:t.subcategories&&t.id===e.activeCategory?"icon-chevron-down":"icon-chevron-right"))},null,2),Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name)+" ",1),Object(D["createElementVNode"])("span",us,Object(D["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,ds)),t.component?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",ps,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{role:"menuitem",class:Object(D["normalizeClass"])({active:(o.id===e.displayedSubcategory||o.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:o.id},[o.isGroup?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"show-search":!0,"menu-title":e.htmlEntities(o.name)},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(o.subcategories,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:Object(D["normalizeClass"])(["item",{active:i.id===e.activeSubsubcategory&&o.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?"+e.makeUrl(t,i),onClick:o=>e.loadSubcategory(t,i,o),title:i.tooltip,key:i.id},Object(D["toDisplayString"])(i.name),11,ms))),128))]),_:2},1032,["menu-title"])):Object(D["createCommentVNode"])("",!0),o.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,href:"#?"+e.makeUrl(t,o),class:"item",onClick:i=>e.loadSubcategory(t,o,i),tabindex:"5"},Object(D["toDisplayString"])(o.name),9,hs)),o.help?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:2,class:Object(D["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===o.id&&e.helpShownCategory.category===t.id&&o.help}]),tabindex:"5",href:"javascript:",onClick:i=>e.showHelp(t,o,i)},fs,10,gs)):Object(D["createCommentVNode"])("",!0)],2))),128))]))],10,cs))),128))],8,ls),Object(D["createElementVNode"])("ul",vs,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menu,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:"no-padding",key:t.id,"data-category-id":t.id},[t.component?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(t.component),{key:0,onAction:o=>e.loadCategory(t)},null,40,["onAction"])):Object(D["createCommentVNode"])("",!0),t.component?Object(D["createCommentVNode"])("",!0):Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",ys,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",js,[Object(D["createElementVNode"])("i",{class:Object(D["normalizeClass"])(t.icon?t.icon:"icon-chevron-down")},null,2),Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name),1)]),Object(D["createElementVNode"])("div",ws,[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o.id},[o.isGroup?(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],{key:0},Object(D["renderList"])(o.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{onClick:i=>e.loadSubcategory(t,o),href:"#?"+e.makeUrl(t,o),key:o.id},Object(D["toDisplayString"])(o.name),9,Ss))),128)):Object(D["createCommentVNode"])("",!0),o.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,onClick:i=>e.loadSubcategory(t,o),href:"#?"+e.makeUrl(t,o)},Object(D["toDisplayString"])(o.name),9,Cs))]))),128))])])])])),[[s,{activator:e.sideNavActivator}]])],8,Os))),128))])])}function Ds(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Es(e){const t=e;return t.widgets?t.widgets:[]}class Ps{constructor(){Ds(this,"privateState",Object(D["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),Ds(this,"state",Object(D["computed"])(()=>(this.privateState.isFetchedFirstTime||this.fetchAvailableWidgets(),Object(D["readonly"])(this.privateState)))),Ds(this,"widgets",Object(D["computed"])(()=>this.state.value.categorizedWidgets))}fetchAvailableWidgets(){return U.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((e,t)=>{try{window.widgetsHelper.getAvailableWidgets(t=>{const o=t;this.privateState.categorizedWidgets=o,e(this.widgets.value)})}catch(o){t(o)}})):Promise.resolve(this.widgets.value)}reloadAvailableWidgets(){window.widgetsHelper.clearAvailableWidgets();const e=this.fetchAvailableWidgets();return e.then(()=>{M.postEvent("WidgetsStore.reloaded")}),e}}var Ts=new Ps;const xs="reportingmenu-help";var Vs=Object(D["defineComponent"])({components:{MenuItemsDropdown:si},directives:{SideNav:Jt},props:{},data(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator(){return document.querySelector("nav .activateLeftMenu")},menu(){const e=oa.menu.value;return e.forEach(e=>{if(e.widget&&e.widget.indexOf(".")>0){const[t,o]=e.widget.split(".");e.component=Ce(t,o)}}),e},activeCategory(){return oa.activeCategory.value},activeSubcategory(){return oa.activeSubcategory.value},activeSubsubcategory(){return oa.activeSubsubcategory.value},displayedCategory(){return U.parsed.value.category},displayedSubcategory(){return U.parsed.value.subcategory}},created(){oa.fetchMenuItems().then(()=>{U.parsed.value.subcategory||this.loadFirstPageOfActiveSection()}),this.updateTopMenuActiveState(),Object(D["watch"])(()=>U.parsed.value,e=>{if(!e.subcategory)return this.loadFirstPageOfActiveSection(),void this.updateTopMenuActiveState();const t=oa.findSubcategory(e.category,e.subcategory);oa.enterSubcategory(t.category,t.subcategory,t.subsubcategory),this.updateTopMenuActiveState()}),M.on("matomoPageChange",()=>{this.initialLoad||window.globalAjaxQueue.abort(),this.helpShownCategory=null,this.showSubcategoryHelpOnLoad&&(this.showHelp(this.showSubcategoryHelpOnLoad.category,this.showSubcategoryHelpOnLoad.subcategory),this.showSubcategoryHelpOnLoad=null),window.$("#loadingError,#loadingRateLimitError").hide(),this.initialLoad=!1}),M.on("updateReportingMenu",()=>{oa.reloadMenuItems().then(()=>{const e=U.parsed.value.category,t=U.parsed.value.subcategory;if(e&&t){const o=oa.findSubcategory(e,t);o.category&&oa.enterSubcategory(o.category,o.subcategory,o.subsubcategory)}}),Ts.reloadAvailableWidgets()})},methods:{loadFirstPageOfActiveSection(){const e=oa.menu.value,t=e[0];if(!t)return;const o=t.subcategories[0];o&&(oa.enterSubcategory(t,o),this.propagateUrlChange(t,o))},updateTopMenuActiveState(){const e=U.parsed.value.group||"";document.querySelectorAll("[data-reporting-group]").forEach(t=>{const o=t.closest("li");if(!o)return;const i=t.getAttribute("data-reporting-group")||"";o.classList.toggle("active",i===e)})},propagateUrlChange(e,t){const o=U.parsed.value;o.category===e.id&&o.subcategory===t.id?this.loadSubcategory(e,t):U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory(e){Zi.remove(xs);const t=oa.toggleCategory(e),{subcategories:o}=e,i=o&&1===o.length||e.widget&&o&&o.length;if(t&&i){this.helpShownCategory=null;const t=e.subcategories[0];this.propagateUrlChange(e,t)}},loadSubcategory(e,t,o){o&&(o.shiftKey||o.ctrlKey||o.metaKey)||(Zi.remove(xs),t&&t.id===U.parsed.value.subcategory&&e.id===U.parsed.value.category&&(this.helpShownCategory=null,setTimeout(()=>{M.postEvent("loadPage",e.id,t.id)})))},makeUrl(e,t){const{idSite:o,period:i,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l,group:c}=U.parsed.value,d={idSite:o,period:i,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l,category:e.id,subcategory:t.id};return c&&(d.group=c),U.stringify(d)},htmlEntities(e){return M.helper.htmlEntities(e)},showHelp(e,t,o){const i=U.parsed.value,n=i.category,r=i.subcategory;if((n!==e.id||r!==t.id)&&o)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return Zi.remove(xs),void(this.helpShownCategory=null);const s=a("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),l=`${s}
`;Zi.show({context:"info",id:xs,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Vs.render=ks;var Bs=Vs;function Ns(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class Is{constructor(){Ns(this,"privateState",Object(D["reactive"])({reports:[]})),Ns(this,"state",Object(D["readonly"])(this.privateState)),Ns(this,"reports",Object(D["computed"])(()=>this.state.reports)),Ns(this,"reportsPromise",void 0)}findReport(e,t){return this.reports.value.find(o=>o.module===e&&o.action===t)}fetchReportMetadata(){return this.reportsPromise||(this.reportsPromise=te.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:M.idSite||U.parsed.value.idSite}).then(e=>(this.privateState.reports=e,e))),this.reportsPromise.then(()=>this.reports.value)}}var Ms=new Is;const Fs={class:"widgetLoader"},Rs={key:0},Ls={key:1,class:"notification system notification-error"},As=["href"],_s={key:2,class:"notification system notification-error"},Hs={class:"theWidgetContent",ref:"widgetContent"};function $s(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fs,[Object(D["createVNode"])(r,{"loading-message":e.finalLoadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",null,[e.widgetName?(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",Rs,Object(D["toDisplayString"])(e.widgetName),1)):Object(D["createCommentVNode"])("",!0),e.loadingFailedRateLimit?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",_s,Object(D["toDisplayString"])(e.translate("General_ErrorRateLimit")),1)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ls,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(D["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),9,As)):Object(D["createCommentVNode"])("",!0)]))],512),[[D["vShow"],e.loadingFailed]]),Object(D["createElementVNode"])("div",Hs,null,512)])}function Us(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class qs{constructor(){Us(this,"privateState",Object(D["reactive"])({module:"",action:"",category:"",subcategory:"",idSite:"",widgetSearchFilters:{}})),Us(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),M.on("matomoPageChange",()=>{this.isCurrentPage()||this.resetSearchFilters(),this.updateCurrentRoutingFromUrl()})}resetSearchFilters(){this.privateState.widgetSearchFilters={}}getSearchFilters(e){return this.state.value.widgetSearchFilters[e]||{}}setSearchFilters(e,t){e&&(this.privateState.widgetSearchFilters[e]=t)}updateCurrentRoutingFromUrl(){const e=U.parsed.value;this.privateState.module=e.module,this.privateState.action=e.action,this.privateState.category=e.category,this.privateState.subcategory=e.subcategory,this.privateState.idSite=e.idSite}isCurrentPage(){const e=U.parsed.value;return this.state.value.module===e.module&&this.state.value.action===e.action&&this.state.value.category===e.category&&this.state.value.subcategory===e.subcategory&&this.state.value.idSite===e.idSite}}var Ws=new qs,zs=Object(D["defineComponent"])({props:{widgetParams:Object,widgetName:String,loadingMessage:String,suppressNotifications:Boolean},components:{ActivityIndicator:We},data(){return{loading:!1,loadingFailed:!1,loadingFailedRateLimit:!1,changeCounter:0,lastWidgetAbortController:null}},watch:{widgetParams(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{finalLoadingMessage(){return this.loadingMessage?this.loadingMessage:this.widgetName?a("General_LoadingPopover",this.widgetName):a("General_LoadingData")},hasErrorFaqLink(){const e=M.config.enable_general_settings_admin,t=M.config.enable_plugins_admin;return M.hasSuperUserAccess&&(e||t)}},mounted(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},beforeUnmount(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent(){const e=this.$refs.widgetContent;M.helper.destroyVueComponent(e),e&&(e.innerHTML="")},getWidgetUrl(e){const t=U.parsed.value;let o=Object.assign({},e||{});const i=Object.keys(Object.assign(Object.assign({},U.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return i.forEach(e=>{"category"!==e&&"subcategory"!==e&&(e in o||(o[e]=t[e]))}),zo.isComparisonEnabled()&&(o=Object.assign(Object.assign({},o),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(o.showtitle="1"),M.shouldPropagateTokenAuth&&t.token_auth&&(M.broadcast.isWidgetizeRequestWithoutSession()||(o.force_api_session="1"),o.token_auth=t.token_auth),o.random=Math.floor(1e4*Math.random()),o},loadWidgetUrl(e,t){this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController;let o={};e.uniqueId&&(o=Ws.getSearchFilters(e.uniqueId)),te.fetch(this.getWidgetUrl(Object.assign(e,o)),{format:"html",abortController:this.lastWidgetAbortController}).then(o=>{if(t!==this.changeCounter||"string"!==typeof o)return;this.lastWidgetAbortController=null,this.loading=!1,this.loadingFailed=!1;const i=this.$refs.widgetContent;window.$(i).html(o);const n=window.$(i).children();if(this.widgetName){let e=n.find("> .card-content .card-title");e.length||(e=n.find("> h2")),e.length&&e.html(M.helper.htmlEntities(this.widgetName))}M.helper.compileVueEntryComponents(n),this.suppressNotifications||Zi.parseNotificationDivs(),setTimeout(()=>{M.postEvent("widget:loaded",{parameters:e,element:n})})}).catch(e=>{t===this.changeCounter&&(this.lastWidgetAbortController=null,this.cleanupLastWidgetContent(),this.loading=!1,"abort"!==e.xhrStatus&&(429===e.status&&(this.loadingFailedRateLimit=!0),this.loadingFailed=!0))})}}});zs.render=$s;var Gs=zs;function Ks(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator"),s=Object(D["resolveComponent"])("Alert");return e.loading?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,loading:!0,"loading-message":e.translate("General_LoadingData")},null,8,["loading-message"])):e.loadingFailed?(Object(D["openBlock"])(),Object(D["createBlock"])(s,{key:1,severity:"danger"},{default:Object(D["withCtx"])(()=>[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_ErrorRequest","","")),1)]),_:1})):e.componentToRender?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.componentToRender),Object(D["normalizeProps"])(Object(D["mergeProps"])({key:2},e.componentProps)),null,16)):Object(D["createCommentVNode"])("",!0)}var Ys=Object(D["defineComponent"])({props:{widget:{type:Object,required:!0},widgetized:Boolean},components:{ActivityIndicator:We,Alert:Ke},data(){return{componentToRender:null,loading:!1,loadingFailed:!1}},watch:{widget:{handler(){this.loadComponent()},immediate:!0}},computed:{componentProps(){var e;const t=this.widget;return Object.assign(Object.assign({},(null===(e=t.clientComponent)||void 0===e?void 0:e.props)||{}),{},{uniqueId:t.uniqueId,widgetName:t.name,widgetized:this.widgetized,isWidget:this.widgetized,isWide:t.isWide})}},methods:{async loadComponent(){const e=this.widget,{clientComponent:t}=e;this.loading=!0,this.loadingFailed=!1,this.componentToRender=null;try{if(!t)throw new Error("Missing client-rendered widget metadata");const e=await Se(t.plugin),o=null===e||void 0===e?void 0:e[t.name];if(!o)throw new Error(`Unknown widget component ${t.plugin}.${t.name}`);this.componentToRender=Object(D["markRaw"])(o)}catch(o){console.error(o),this.loadingFailed=!0}finally{this.loading=!1}}}});Ys.render=Ks;var Qs=Ys;const Js={class:"widget-container"};function Xs(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Js,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.actualContainer,(e,t)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:t},[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{widget:e,"prevent-recursion":!0},null,8,["widget"])])]))),128))])}const Zs=Ce("CoreHome","Widget");var el=Object(D["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Zs},computed:{actualContainer(){var e,t,o;const i=this.container;if(null===i||void 0===i||null===(e=i[0])||void 0===e||!e.parameters)return i;const[n]=i,a="1"===(null===(t=n.parameters)||void 0===t?void 0:t.widget)||1===(null===(o=n.parameters)||void 0===o?void 0:o.widget),r=a&&"graphEvolution"===n.viewDataTable,s=r?Object.assign(Object.assign({},n),{},{parameters:Object.assign(Object.assign({},n.parameters),{},{showtitle:"0"})}):n;return[s,...i.slice(1)]}}});el.render=Xs;var tl=el;const ol={class:"reportsByDimensionView"},il={class:"entityList"},nl={class:"listCircle"},al=["onClick"],rl={class:"dimension"},sl={class:"reportContainer"},ll=Object(D["createElementVNode"])("div",{class:"clear"},null,-1);function cl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("WidgetLoader");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ol,[Object(D["createElementVNode"])("div",il,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.widgetsByCategory,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name)+" ",1),Object(D["createElementVNode"])("ul",nl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.widgets,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:o=>e.selectWidget(t)},[Object(D["createElementVNode"])("span",rl,Object(D["toDisplayString"])(t.name),1)],10,al))),128))])]))),128))]),Object(D["createElementVNode"])("div",sl,[e.selectedWidget.parameters?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(D["createCommentVNode"])("",!0)]),ll])}var dl=Object(D["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Gs},data(){return{selectedWidget:null}},created(){[this.selectedWidget]=this.widgetsSorted},computed:{widgetsSorted(){return Kn(this.widgets)},widgetsByCategory(){const e={};return this.widgetsSorted.forEach(t=>{var o;const i=null===(o=t.subcategory)||void 0===o?void 0:o.name;i&&(e[i]||(e[i]={name:i,order:t.order,widgets:[]}),e[i].widgets.push(t))}),Kn(Object.values(e))}},methods:{selectWidget(e){this.selectedWidget=Object.assign({},e)}}});dl.render=cl;var ul=dl;const pl=["id"],ml={key:2},hl={key:3};function gl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("WidgetLoader"),s=Object(D["resolveComponent"])("ClientWidgetRenderer"),l=Object(D["resolveComponent"])("WidgetContainer"),c=Object(D["resolveComponent"])("WidgetByDimensionContainer"),d=Object(D["resolveDirective"])("tooltips");return e.actualWidget&&e.showWidget?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[e.actualWidget.isContainer||!e.actualWidget.parameters||e.actualWidget.clientComponent?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name,"suppress-notifications":e.suppressNotifications},null,8,["widget-params","widget-name","suppress-notifications"])),!e.actualWidget.isContainer&&e.actualWidget.clientComponent?(Object(D["openBlock"])(),Object(D["createBlock"])(s,{key:1,widget:e.actualWidget,widgetized:e.widgetized},null,8,["widget","widgetized"])):Object(D["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ml,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(D["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",hl,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(c,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(D["createCommentVNode"])("",!0)],10,pl)),[[d,{content:e.tooltipContent}]]):Object(D["createCommentVNode"])("",!0)}function bl(e,t){let o=void 0;return Object.values(e||{}).some(e=>(o=e.find(e=>{var o;return e&&e.isContainer&&(null===(o=e.parameters)||void 0===o?void 0:o.containerId)===t}),o)),o}var fl=Object(D["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean,suppressNotifications:Boolean},components:{WidgetLoader:Gs,WidgetContainer:tl,WidgetByDimensionContainer:ul,ClientWidgetRenderer:Qs},directives:{Tooltips:ct},data(){return{showWidget:!1}},setup(){function e(){const e=window.$(this);if(e.hasClass("matomo-form-field"))return"";const t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"
"))}return{tooltipContent:e}},created(){const{actualWidget:e}=this;if(e&&e.middlewareParameters){const t=e.middlewareParameters;te.fetch(t).then(e=>{this.showWidget=!!e})}else this.showWidget=!0},computed:{allWidgets(){return Ts.widgets.value},actualWidget(){const e=this.widget;if(e){const t=Object.assign({},e);if(e&&e.isReport&&!e.documentation){const o=Ms.findReport(e.module,e.action);o&&o.documentation&&(t.documentation=o.documentation)}return e.uniqueId&&(t.parameters=Object.assign(Object.assign({},t.parameters),{},{uniqueId:e.uniqueId})),t}if(this.containerid){const e=bl(this.allWidgets,this.containerid);if(e){const t=Object.assign({},e);if(this.widgetized){t.isFirstInPage=!0,t.parameters=Object.assign(Object.assign({},t.parameters),{},{widget:"1"});const e=Es(t);e&&(t.widgets=e.map(e=>Object.assign(Object.assign({},e),{},{parameters:Object.assign(Object.assign({},e.parameters),{},{widget:"1",containerId:this.containerid})})))}return t}}return null}}});fl.render=gl;var vl=fl;const Ol={class:"reporting-page"},yl={key:1,class:"col s12 l6 leftWidgetColumn"},jl={key:2,class:"col s12 l6 rightWidgetColumn"};function wl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("SiteWithoutData"),s=Object(D["resolveComponent"])("ActivityIndicator"),l=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ol,[e.showEmptySiteScreen?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"embedded-in-reporting":!0,onDismissed:e.onNoDataDismissed},null,8,["onDismissed"])):(Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],{key:1},[Object(D["createVNode"])(s,{loading:e.loading},null,8,["loading"]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",null,Object(D["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[D["vShow"],e.hasNoPage]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.widgets,e=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.left,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",jl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.right,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0)]))),128))],64))])}function Sl(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Cl(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function kl(e){if(e&&e[0]){const t=[...e],o=e[0];return o.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:kl(o.left||[]),right:kl(o.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}class Dl{constructor(){Sl(this,"privateState",Object(D["reactive"])({})),Sl(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Sl(this,"page",Object(D["computed"])(()=>this.state.value.page)),Sl(this,"widgets",Object(D["computed"])(()=>{const e=this.page.value;if(!e)return[];let t=[];const o={},i=e=>e.isReport&&o[`${e.module}.${e.action}`],n=e=>{if(!e.isReport)return[];const t=Ms.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach(e=>{i(e)||(n(e).forEach(e=>{o[`${e.module}.${e.action}`]=!0}),t.push(e))}),t=Kn(t),1===t.length)return kl(t);const a=[];for(let s=0;s(this.privateState.page=Gn.findPage(e,t),this.page.value))}resetPage(){this.privateState.page=void 0}}var El=new Dl;const Pl=Ce("SitesManager","SiteWithoutData"),Tl="site-without-data";function xl(){const e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);let o=a("CoreHome_PeriodHasOnlyRawData",`
`,"");M.visitorLogEnabled||(o=a("CoreHome_PeriodHasOnlyRawDataNoVisitsLog")),Zi.show({id:"onlyRawData",animate:!1,context:"info",message:o,type:"transient"})}function Vl(){Zi.remove("onlyRawData")}var Bl=Object(D["defineComponent"])({components:{ActivityIndicator:We,Widget:vl,SiteWithoutData:Pl},props:{groupsWithoutTrackingRequirement:{type:Array,default:()=>[]}},data(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1,siteHasNoData:!1,noDataDismissed:!1}},created(){El.resetPage(),this.loading=!0,this.renderInitialPage(),this.fetchSiteEmptyState(),Object(D["watch"])(()=>this.showEmptySiteScreen,e=>{this.updateSiteWithoutDataBodyId(e)}),Object(D["watch"])(()=>U.parsed.value,(e,t)=>{e.category===t.category&&e.subcategory===t.subcategory&&e.period===t.period&&e.date===t.date&&e.segment===t.segment&&JSON.stringify(e.compareDates)===JSON.stringify(t.compareDates)&&JSON.stringify(e.comparePeriods)===JSON.stringify(t.comparePeriods)&&JSON.stringify(e.compareSegments)===JSON.stringify(t.compareSegments)&&JSON.stringify(e.columns||"")===JSON.stringify(t.columns||"")||(e.date===t.date&&e.period===t.period||(Vl(),this.dateLastChecked=null,this.hasRawData=!1,this.hasNoVisits=!1),this.renderPage(e.category,e.subcategory,e.period,e.date,e.segment))}),M.on("loadPage",(e,t)=>{const o=U.parsed.value;this.renderPage(e,t,o.period,o.date,o.segment)})},unmounted(){this.updateSiteWithoutDataBodyId(!1)},computed:{widgets(){return El.widgets.value},showEmptySiteScreen(){if(!this.siteHasNoData||this.noDataDismissed)return!1;const e=U.parsed.value.group||Zn;return!this.groupsWithoutTrackingRequirement.includes(e)}},methods:{fetchSiteEmptyState(){te.fetch({module:"SitesManager",action:"getSiteEmptyState",idSite:M.idSite},{createErrorNotification:!1}).then(e=>{this.siteHasNoData=!0===e}).catch(()=>{this.siteHasNoData=!1})},onNoDataDismissed(){this.noDataDismissed=!0,this.renderInitialPage()},updateSiteWithoutDataBodyId(e){e?document.body.id=Tl:document.body.id===Tl&&(document.body.id="")},renderPage(e,t,o,i,n){if(this.showEmptySiteScreen)return Zi.clearTransientNotifications(),void(this.loading=!1);if(!e||!t)return El.resetPage(),void(this.loading=!1);try{c.parse(o,i)}catch(s){return Zi.show({id:"invalidDate",animate:!1,context:"error",message:a("CoreHome_DateInvalid"),type:"transient"}),El.resetPage(),void(this.loading=!1)}Zi.remove("invalidDate"),M.postEvent("matomoPageChange",{}),Zi.clearTransientNotifications(),c.parse(o,i).containsToday()&&this.showOnlyRawDataMessageIfRequired(e,t,o,i,n);const r={category:e,subcategory:t};if(M.postEvent("ReportingPage.loadPage",r),r.promise)return this.loading=!0,void Promise.resolve(r.promise).finally(()=>{this.loading=!1});El.fetchPage(e,t).then(()=>{const t=!El.page.value;if(t){const t=Gn.findPageInCategory(e);if(t&&t.subcategory)return void U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{subcategory:t.subcategory.id}))}this.hasNoPage=t,this.loading=!1})},renderInitialPage(){const e=U.parsed.value;this.renderPage(e.category,e.subcategory,e.period,e.date,e.segment)},showOnlyRawDataMessageIfRequired(e,t,o,i,n){if(this.hasRawData&&this.hasNoVisits&&xl(),n)return void Vl();const a=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],r=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"];if(-1!==a.indexOf(t)||-1!==r.indexOf(e)||-1!==t.toLowerCase().indexOf("manage"))return void Vl();const s=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()(this.dateLastChecked=new Date,e.value>0?(this.hasNoVisits=!1,void Vl()):(this.hasNoVisits=!0,this.hasRawData?void xl():te.fetch({method:"Live.getMostRecentVisitsDateTime",date:i,period:o}).then(e=>{if(!e||""===e.value)return this.hasRawData=!1,void Vl();this.hasRawData=!0,xl()}))))}}});Bl.render=wl;var Nl=Bl;const Il={class:"report-export-popover row",id:"reportExport"},Ml={class:"col l6"},Fl={name:"format"},Rl={name:"option_flat"},Ll={name:"option_show_dimensions"},Al={name:"option_expanded"},_l={name:"option_format_metrics"},Hl={class:"col l6"},$l={name:"filter_type"},Ul={class:"filter_limit"},ql={name:"filter_limit_all"},Wl={key:0,name:"filter_limit"},zl={key:1,name:"filter_limit"},Gl={class:"col l12"},Kl=["value"],Yl=["innerHTML"],Ql={class:"col l12"},Jl=["href","title"],Xl=["innerHTML"];function Zl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field"),s=Object(D["resolveDirective"])("select-on-focus");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Il,[Object(D["createElementVNode"])("div",Ml,[Object(D["createElementVNode"])("div",Fl,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=t=>e.reportFormat=t),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Rl,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlatModel,"onUpdate:modelValue":t[1]||(t[1]=t=>e.optionFlatModel=t)},null,8,["title","modelValue"]),[[D["vShow"],e.canExportFlat]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Ll,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_show_dimensions",title:e.translate("CoreHome_IncludeDimensionsSeparately"),modelValue:e.optionShowDimensions,"onUpdate:modelValue":t[2]||(t[2]=t=>e.optionShowDimensions=t)},null,8,["title","modelValue"]),[[D["vShow"],e.canExportFlat&&e.hasMultipleDimensions&&e.optionFlatModel]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Al,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpandedModel,"onUpdate:modelValue":t[3]||(t[3]=t=>e.optionExpandedModel=t)},null,8,["title","modelValue"]),[[D["vShow"],e.hasSubtables&&e.canExpand]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",_l,[Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[4]||(t[4]=t=>e.optionFormatMetrics=t)},null,8,["title","modelValue"])])])]),Object(D["createElementVNode"])("div",Hl,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",$l,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[5]||(t[5]=t=>e.reportType=t),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(D["createElementVNode"])("div",Ul,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",ql,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[6]||(t[6]=t=>e.reportLimitAll=t),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[D["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Wl,[Object(D["createVNode"])(r,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=t=>e.reportLimit=t),"full-width":!0},null,8,["modelValue"])])):Object(D["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",zl,[Object(D["createVNode"])(r,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[8]||(t[8]=t=>e.reportLimit=t),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(D["createCommentVNode"])("",!0)])]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Gl,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},[Object(D["createTextVNode"])("\n ")],8,Kl)),[[s,{}]]),Object(D["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","","","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Yl)],512),[[D["vShow"],e.showUrl]]),Object(D["createElementVNode"])("div",Ql,[Object(D["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(D["toDisplayString"])(e.translate("General_Export")),9,Jl),Object(D["createElementVNode"])("a",{href:"javascript:",onClick:t[9]||(t[9]=t=>e.showUrl=!e.showUrl),class:"toggle-export-url"},[Object(D["withDirectives"])(Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[D["vShow"],!e.showUrl]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[D["vShow"],e.showUrl]])])]),e.additionalContent?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:"col l12 report-export-popover-footer",innerHTML:e.$sanitize(e.additionalContent)},null,8,Xl)):Object(D["createCommentVNode"])("",!0)])} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const ec=["CSV","TSV","HTML"];function tc(e){return ec.includes(e)}function oc(e,t,o){return e?tc(o)?{hasUserPreference:!1,preferredMode:null}:{hasUserPreference:!0,preferredMode:"flat"}:t?{hasUserPreference:!0,preferredMode:"expanded"}:{hasUserPreference:!0,preferredMode:null}}function ic(e,t,o,i){const{hasUserPreference:n,preferredMode:a}=i;return e||t?tc(o)?t?{optionFlat:!n||"flat"===a,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}:e?n?"flat"===a?t?{optionFlat:!0,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!0}:"expanded"===a?{optionFlat:!1,optionExpanded:!0}:{optionFlat:!1,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!0}:t?{optionFlat:"flat"===a,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}}const nc=Ce("CorePluginsAdmin","Field");var ac=Object(D["defineComponent"])({components:{Field:nc},directives:{SelectOnFocus:Wt},props:{hasSubtables:Boolean,canExportFlat:{type:Boolean,default:!1},availableReportTypes:Object,availableReportFormats:{type:Object,required:!0},maxFilterLimit:Number,limitAllOptions:Object,dataTable:{type:Object,required:!0},requestParams:[Object,String],apiMethod:{type:String,required:!0},initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionShowDimensions:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"TSV"}},mounted(){const e={content:this.additionalContent,dataTable:this.dataTable};M.postEvent("ReportExportPopover.additionalContent",e),this.additionalContent=e.content},data(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionShowDimensions:this.initialOptionShowDimensions,subtablePreference:oc(this.initialOptionFlat,this.initialOptionExpanded,this.initialReportFormat),optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit,additionalContent:""}},watch:{reportType(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="JSON")},reportLimit(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{hasMultipleDimensions(){var e,t;return"function"===typeof(null===(e=this.dataTable)||void 0===e?void 0:e.getReportMetadata)&&Object.keys((null===(t=this.dataTable)||void 0===t?void 0:t.getReportMetadata().dimensions)||{}).length>1},filterLimitTooltip(){const e=a("CoreHome_RowLimit"),t=this.maxFilterLimit?a("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return`${e} (${t})`},canExpand(){return!tc(this.reportFormat)},effectiveSubtableOptions(){return ic(this.hasSubtables,this.canExportFlat,this.reportFormat,this.subtablePreference)},optionFlatModel:{get(){return this.effectiveSubtableOptions.optionFlat},set(e){this.canExportFlat&&(e?this.subtablePreference={hasUserPreference:!0,preferredMode:"flat"}:this.optionExpandedModel||(this.subtablePreference={hasUserPreference:!0,preferredMode:null}))}},optionExpandedModel:{get(){return this.effectiveSubtableOptions.optionExpanded},set(e){this.hasSubtables&&!tc(this.reportFormat)&&(e?this.subtablePreference={hasUserPreference:!0,preferredMode:"expanded"}:this.optionFlatModel||(this.subtablePreference={hasUserPreference:!0,preferredMode:null}))}},exportLink(){return this.getExportLink(!0)},exportLinkWithoutToken(){return this.getExportLink(!1)}},methods:{getExportLink(e=!0){const{reportFormat:t,apiMethod:o,reportType:i}=this,n=this.dataTable;if(!t)return;let a={};const r="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams?a=JSON.parse(this.requestParams):this.requestParams&&"object"===typeof this.requestParams&&(a=this.requestParams);const{segment:s,label:l,idGoal:c,idDimension:d,idSite:u}=n.param;let{date:p,period:m}=n.param;"RSS"===t&&(p="last10"),"undefined"!==typeof n.param.dateUsedInGraph&&(p=n.param.dateUsedInGraph);const h=M.config.datatable_export_range_as_day.toLowerCase();-1!==h.indexOf(t.toLowerCase())&&"range"===n.param.period&&(m="day"),"range"===n.param.period&&"graphEvolution"===n.param.viewDataTable&&(m="day");const g={module:"API",format:t,idSite:u,period:m,date:p};"processed"===i?(g.method="API.getProcessedReport",[g.apiModule,g.apiAction]=o.split(".")):g.method=o,n.param.compareDates&&n.param.compareDates.length&&(g.compareDates=n.param.compareDates,g.compare="1"),n.param.comparePeriods&&n.param.comparePeriods.length&&(g.comparePeriods=n.param.comparePeriods,g.compare="1"),n.param.compareSegments&&n.param.compareSegments.length&&(g.compareSegments=n.param.compareSegments,g.compare="1"),"undefined"!==typeof n.param.filter_pattern&&(g.filter_pattern=n.param.filter_pattern),"undefined"!==typeof n.param.filter_pattern_recursive&&(g.filter_pattern_recursive=n.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach(([e,t])=>{let o=t;!0===o?o=1:!1===o&&(o=0),g[e]=o});const{optionFlat:b,optionExpanded:f}=this.effectiveSubtableOptions;if(b&&(g.flat=1,this.optionShowDimensions&&(g.show_dimensions=1),"undefined"!==typeof n.param.include_aggregate_rows&&"1"===n.param.include_aggregate_rows&&(g.include_aggregate_rows=1)),this.hasSubtables&&!b&&f&&(g.expanded=1),this.optionFormatMetrics&&(g.format_metrics=1),n.param.pivotBy&&(g.pivotBy=n.param.pivotBy,g.pivotByColumnLimit=20,n.props.pivot_by_column&&(g.pivotByColumn=n.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(g.translateColumnNames=1,g.language=M.language),"undefined"!==typeof s&&(g.segment=decodeURIComponent(s)),"undefined"!==typeof c&&"-1"!==c&&(g.idGoal=c),"undefined"!==typeof d&&"-1"!==d&&(g.idDimension=d),l){const e=l.split(",");e.length>1?g.label=e:[g.label]=e}g.showMetadata=0,g.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(g.token_auth=M.token_auth,g.force_api_session=1),g.filter_limit=r;const v=window.location.href.split("?")[0];return`${v}?${U.stringify(g)}`}}});ac.render=Zl;var rc=ac; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:sc}=window;var lc={mounted(e,t){e.addEventListener("click",()=>{var o;const i=U.hashParsed.value.popover,n=sc(e).closest("[data-report]").data("uiControlObject"),r=window.Piwik_Popover.showLoading("Export"),s=t.value.reportFormats;let l=n.param.filter_limit;t.value.maxFilterLimit>0&&(l=Math.min(l,t.value.maxFilterLimit));const c=!0===n.param.flat||1===n.param.flat||"1"===n.param.flat,d=!0===n.param.show_dimensions||1===n.param.show_dimensions||"1"===n.param.show_dimensions,u=c||n.numberOfSubtables>0,p=null!==(o=t.value.canExportFlat)&&void 0!==o?o:u,m=p,h=!1,g={initialReportType:"default",initialReportFormat:"TSV",initialReportLimit:l>0?l:100,initialReportLimitAll:-1===l?"yes":"no",initialOptionFlat:m,initialOptionShowDimensions:d,initialOptionExpanded:h,initialOptionFormatMetrics:!1,hasSubtables:u,canExportFlat:p,availableReportFormats:{default:s,processed:{JSON:s.JSON,XML:s.XML}},availableReportTypes:{default:a("CoreHome_StandardReport"),processed:a("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:a("General_All"),no:a("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:n,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},b=ve({template:'\n ',data(){return{bind:g}}});b.component("popover",rc);const f=document.createElement("div");b.mount(f);const{reportTitle:v}=t.value;window.Piwik_Popover.setTitle(`${a("General_Export")} ${M.helper.htmlEntities(v)}`),window.Piwik_Popover.setContent(f),window.Piwik_Popover.onClose(()=>{b.unmount(),""!==i&&setTimeout(()=>{U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{popover:i})),t.value.onClose&&t.value.onClose()},100)}),setTimeout(()=>{r.dialog(),sc(".exportFullUrl, .btn",r).tooltip({track:!0,show:!1,hide:!1})},100)})}};const cc=["src","width","height"];function dc(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{class:"sparklineImg",loading:"lazy",alt:"",src:e.sparklineUrl,width:e.width,height:e.height},null,8,cc)}var uc=Object(D["defineComponent"])({name:"Sparkline",props:{seriesIndices:Array,params:[Object,String],width:Number,height:Number},data(){return{isWidget:!1,themeMode:M.getThemeMode()}},mounted(){this.isWidget=!!this.$el.closest("[widgetId]"),window.addEventListener("themeModeChange",this.onThemeModeChange)},beforeUnmount(){window.removeEventListener("themeModeChange",this.onThemeModeChange)},computed:{sparklineUrl(){const{seriesIndices:e,params:t,themeMode:o}=this,i=M.getSparklineColors();e&&(i.lineColor=i.lineColor.filter((t,o)=>-1!==e.indexOf(o)));const n=JSON.stringify(i),a=document.body.classList.contains("sparklines-redesign-enabled"),r=a?Object.assign(Object.assign({},"number"===typeof this.width?{width:2*this.width}:{}),"number"===typeof this.height?{height:2*this.height}:{}):{},s=Object.assign(Object.assign({forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:n,random:Date.now(),date:this.defaultDate},r),{},{segment:U.parsed.value.segment}),l="object"===typeof t?t:U.parse(t.substring(t.indexOf("?")+1)),c=new te,d=c.mixinDefaultGetParams(Object.assign(Object.assign({},s),l)),u=U.parsed.value.token_auth;return u&&u.length&&M.shouldPropagateTokenAuth&&(d.token_auth=u),d.themeMode=o,"?"+U.stringify(d)},defaultDate(){if("range"===M.period)return`${M.startDateString},${M.endDateString}`;const e=k.getLastNRange(M.period,30,M.currentDateString).getDateRange(),t=new Date(M.minDateYear,M.minDateMonth-1,M.minDateDay);e[0]100?100:this.progress<0?0:this.progress}}});fc.render=bc;var vc=fc,Oc={mounted(e){e.classList.add("piwik-content-intro")},updated(e){Object(D["nextTick"])(()=>{e.classList.add("piwik-content-intro")})}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -const yc="(max-width: 767px)",jc=new WeakMap;function wc(e){const t=e.parentElement;if(!t||t.classList.contains("contentTableWrapper"))return;const o=document.createElement("div");o.className="contentTableWrapper",t.insertBefore(o,e),o.appendChild(e)}function Sc(e){const t=e.parentElement;if(!t||!t.classList.contains("contentTableWrapper"))return;const o=t.parentElement;o&&(o.insertBefore(e,t),t.remove())}function Cc(e){return(e||window.matchMedia(yc)).matches}function kc(e,t){e.addEventListener("change",t)}function Dc(e,t){e.removeEventListener("change",t)}function Ec(e,t){e.classList.add("card","card-table","entityTable"),Cc(t)?wc(e):Sc(e)}function Pc(e){const t=jc.get(e);t&&(Dc(t.mediaQuery,t.listener),jc.delete(e)),Sc(e)}function Tc(e){const t=jc.get(e);if(t)return void Ec(e,t.mediaQuery);const o=window.matchMedia(yc),i=()=>{e.isConnected?Ec(e,o):Pc(e)};kc(o,i),jc.set(e,{mediaQuery:o,listener:i}),Ec(e,o)} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var xc={mounted(e,t){var o;null!==t&&void 0!==t&&null!==(o=t.value)&&void 0!==o&&o.off||Tc(e)},updated(e,t){var o;null!==t&&void 0!==t&&null!==(o=t.value)&&void 0!==o&&o.off?Pc(e):Object(D["nextTick"])(()=>{Tc(e)})},beforeUnmount(e){Pc(e)}};const Vc={ref:"root"};function Bc(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Vc,[Object(D["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}const{$:Nc}=window;var Ic=Object(D["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted(){Nc(this.$refs.root).on("click","input[type=submit]",()=>{this.submitForm()})},methods:{submitForm(){this.successfulPostResponse=null,this.errorPostResponse=null;let e=this.formData;this.sendJsonPayload&&(e={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,te.post({module:"API",method:this.submitApiMethod},e,{createErrorNotification:!this.noErrorNotification}).then(e=>{if(this.successfulPostResponse=e,!this.noSuccessNotification){const e=Zi.show({message:a("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});Zi.scrollToNotification(e)}}).catch(e=>{this.errorPostResponse=e.message}).finally(()=>{this.isSubmitting=!1})}}});Ic.render=Bc;var Mc=Ic;function Fc(e,t,o,i,n,a){return Object(D["renderSlot"])(e.$slots,"default")}var Rc=Object(D["defineComponent"])({});Rc.render=Fc;var Lc=Rc;const Ac={key:0},_c=["data-target","title"],Hc=Object(D["createElementVNode"])("span",{class:"icon-configure"},null,-1),$c=[Hc],Uc=["data-target"],qc=["title"],Wc=["title","src"],zc=["id"],Gc=["data-footer-icon-id"],Kc=["title"],Yc=["title","src"],Qc={key:2},Jc=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Xc=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Zc=["title"],ed=Object(D["createElementVNode"])("span",{class:"icon-export"},null,-1),td=[ed],od=["title"],id=Object(D["createElementVNode"])("span",{class:"icon-image"},null,-1),nd=[id],ad=["title"],rd=Object(D["createElementVNode"])("span",{class:"icon-annotation"},null,-1),sd=[rd],ld=["title"],cd=Object(D["createElementVNode"])("span",{class:"icon-search",draggable:"false"},null,-1),dd=["title"],ud=["id","title"],pd=["title"],md=["title","src"],hd=["id"],gd={key:0},bd=["innerHTML"],fd={key:1},vd=["innerHTML"],Od={key:2},yd=["innerHTML"],jd={key:3},wd=["innerHTML"],Sd={key:4},Cd=["innerHTML"],kd={key:5},Dd=["innerHTML"],Ed=["title","data-target"],Pd=Object(D["createElementVNode"])("span",{class:"icon-calendar"},null,-1),Td={class:"periodName"},xd=["id"],Vd=["data-period"];function Bd(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Passthrough"),s=Object(D["resolveDirective"])("dropdown-button"),l=Object(D["resolveDirective"])("report-export");return e.showFooter&&e.showFooterIcons?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ac,[e.hasConfigItems&&(e.isAnyConfigureIconHighlighted||e.isTableView)?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:Object(D["normalizeClass"])(["dropdown-button dropdownConfigureIcon dataTableAction",{highlighted:e.isAnyConfigureIconHighlighted}]),href:"",onClick:t[0]||(t[0]=Object(D["withModifiers"])(()=>{},["prevent"])),"data-target":"dropdownConfigure"+e.randomIdForDropdown,title:e.translate("CoreHome_ReportConfigure"),style:{"margin-right":"3.5px"}},$c,10,_c)),[[s]]):Object(D["createCommentVNode"])("",!0),e.hasFooterIconsToShow?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"dropdown-button dataTableAction activateVisualizationSelection",href:"","data-target":"dropdownVisualizations"+e.randomIdForDropdown,style:{"margin-right":"3.5px"},onClick:t[1]||(t[1]=Object(D["withModifiers"])(()=>{},["prevent"]))},[/^icon-/.test(e.activeFooterIcon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,title:e.translate("CoreHome_ChangeVisualization"),class:Object(D["normalizeClass"])(e.activeFooterIcon)},null,10,qc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,title:e.translate("CoreHome_ChangeVisualization"),width:"16",height:"16",src:e.activeFooterIcon},null,8,Wc))],8,Uc)),[[s]]):Object(D["createCommentVNode"])("",!0),e.showFooterIcons?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:2,id:"dropdownVisualizations"+e.randomIdForDropdown,class:"dropdown-content dataTableFooterIcons"},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.footerIcons,(t,o)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:o},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.buttons.filter(e=>!!e.icon),o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o.id},[Object(D["createElementVNode"])("a",{class:Object(D["normalizeClass"])(`${t.class} tableIcon\n ${-1!==e.activeFooterIconIds.indexOf(o.id)?"activeIcon":""}`),"data-footer-icon-id":o.id},[/^icon-/.test(o.icon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,title:o.title,class:Object(D["normalizeClass"])(o.icon),style:{"margin-right":"5.5px"}},null,10,Kc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,width:"16",height:"16",title:o.title,src:o.icon,style:{"margin-right":"5.5px"}},null,8,Yc)),o.title?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",Qc,Object(D["toDisplayString"])(o.title),1)):Object(D["createCommentVNode"])("",!0)],10,Gc)]))),128)),Jc]),_:2},1024))),128)),Xc],8,zc)):Object(D["createCommentVNode"])("",!0),e.showExport?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:3,class:"dataTableAction activateExportSelection",title:e.translate("General_ExportThisReport"),href:"",style:{"margin-right":"3.5px"},onClick:t[2]||(t[2]=Object(D["withModifiers"])(()=>{},["prevent"]))},td,8,Zc)),[[l,{reportTitle:e.reportTitle,requestParams:e.requestParams,apiMethod:e.apiMethodToRequestDataTable,reportFormats:e.reportFormats,maxFilterLimit:e.maxFilterLimit,canExportFlat:e.exportSupportsFlat}]]):Object(D["createCommentVNode"])("",!0),e.showExportAsImageIcon?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:4,class:"dataTableAction tableIcon",href:"",id:"dataTableFooterExportAsImageIcon",onClick:t[3]||(t[3]=Object(D["withModifiers"])(t=>e.showExportImage(t),["prevent"])),title:e.translate("General_ExportAsImage"),style:{"margin-right":"3.5px"}},nd,8,od)):Object(D["createCommentVNode"])("",!0),e.showAnnotations?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:5,class:"dataTableAction annotationView",href:"",title:e.translate("Annotations_Annotations"),onClick:t[4]||(t[4]=Object(D["withModifiers"])(()=>{},["prevent"])),style:{"margin-right":"3.5px"}},sd,8,ad)):Object(D["createCommentVNode"])("",!0),e.showSearch?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:6,class:"dropdown-button dataTableAction searchAction",href:"",title:e.translate("General_Search"),style:{"margin-right":"3.5px"},draggable:"false",onClick:t[5]||(t[5]=Object(D["withModifiers"])(()=>{},["prevent"]))},[cd,Object(D["createElementVNode"])("span",{class:"icon-close",draggable:"false",title:e.translate("CoreHome_CloseSearch")},null,8,dd),Object(D["createElementVNode"])("input",{id:`widgetSearch_${e.reportId}_${e.placement}`,title:e.translate("CoreHome_DataTableHowToSearch"),type:"text",class:"dataTableSearchInput"},null,8,ud)],8,ld)):Object(D["createCommentVNode"])("",!0),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.dataTableActions,e=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:e.id,class:Object(D["normalizeClass"])("dataTableAction "+e.id),href:"",onClick:t[6]||(t[6]=Object(D["withModifiers"])(()=>{},["prevent"])),title:e.title,style:{"margin-right":"3.5px"}},[/^icon-/.test(e.icon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,class:Object(D["normalizeClass"])(e.icon)},null,2)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,width:"16",height:"16",title:e.title,src:e.icon},null,8,md))],10,pd))),128)),Object(D["createElementVNode"])("ul",{id:"dropdownConfigure"+e.randomIdForDropdown,class:"dropdown-content tableConfiguration"},[e.showFlattenTable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",gd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableFlatten",innerHTML:e.$sanitize(e.flattenItemText)},null,8,bd)])):Object(D["createCommentVNode"])("",!0),e.showDimensionsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",fd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowDimensions",innerHTML:e.$sanitize(e.showDimensionsText)},null,8,vd)])):Object(D["createCommentVNode"])("",!0),e.showFlatConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Od,[Object(D["createElementVNode"])("div",{class:"configItem dataTableIncludeAggregateRows",innerHTML:e.$sanitize(e.includeAggregateRowsText)},null,8,yd)])):Object(D["createCommentVNode"])("",!0),e.showTotalsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",jd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowTotalsRow",innerHTML:e.$sanitize(e.keepTotalsRowText)},null,8,wd)])):Object(D["createCommentVNode"])("",!0),e.showExcludeLowPopulation?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Sd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableExcludeLowPopulation",innerHTML:e.$sanitize(e.excludeLowPopText)},null,8,Cd)])):Object(D["createCommentVNode"])("",!0),e.showPivotBySubtable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",kd,[Object(D["createElementVNode"])("div",{class:"configItem dataTablePivotBySubtable",innerHTML:e.$sanitize(e.pivotByText)},null,8,Dd)])):Object(D["createCommentVNode"])("",!0)],8,hd),e.showPeriods?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:7,class:"dropdown-button dataTableAction activatePeriodsSelection",href:"",onClick:t[7]||(t[7]=Object(D["withModifiers"])(()=>{},["prevent"])),title:e.translate("CoreHome_ChangePeriod"),"data-target":"dropdownPeriods"+e.randomIdForDropdown},[Object(D["createElementVNode"])("div",null,[Pd,Object(D["createElementVNode"])("span",Td,Object(D["toDisplayString"])(e.translations[e.clientSideParameters.period]||e.clientSideParameters.period),1)])],8,Ed)),[[s]]):Object(D["createCommentVNode"])("",!0),e.showPeriods?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:8,id:"dropdownPeriods"+e.randomIdForDropdown,class:"dropdown-content dataTablePeriods"},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.selectablePeriods,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t},[Object(D["createElementVNode"])("a",{"data-period":t,class:Object(D["normalizeClass"])("tableIcon "+(e.clientSideParameters.period===t?"activeIcon":""))},[Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translations[t]||t),1)],10,Vd)]))),128))],8,xd)):Object(D["createCommentVNode"])("",!0)])):Object(D["createCommentVNode"])("",!0)} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Nd(e){return!!e&&"0"!==e}function Id(e,t){return e||Nd(t)}const{$:Md}=window;function Fd(e,t,o){if(/(%(.\$)?s+)/g.test(a(e))){const i=['
'];o&&i.push(o);let n=a(e,...i);return t&&(n+=` (${a("CoreHome_Default")})`),n+="",n}return a(e)}function Rd(e,t,o){return e?Fd(t,!0):Fd(o)}var Ld=Object(D["defineComponent"])({props:{showPeriods:Boolean,showFooter:Boolean,showFooterIcons:Boolean,showSearch:Boolean,showFlattenTable:Boolean,reportSupportsFlatten:Boolean,exportSupportsFlatten:Boolean,footerIcons:{type:Array,required:!0},viewDataTable:{type:String,required:!0},reportTitle:String,requestParams:{type:Object,required:!0},apiMethodToRequestDataTable:{type:String,required:!0},maxFilterLimit:{type:Number,required:!0},showExport:Boolean,showExportAsImageIcon:Boolean,showAnnotations:Boolean,reportId:{type:String,required:!0},dataTableActions:{type:Array,required:!0},clientSideParameters:{type:Object,required:!0},hasMultipleDimensions:Boolean,isDataTableEmpty:Boolean,showTotalsRow:Boolean,showExcludeLowPopulation:Boolean,showPivotBySubtable:Boolean,selectablePeriods:Array,translations:{type:Object,required:!0},pivotDimensionName:String,placement:{type:String,default:"footer"}},components:{Passthrough:Lc},directives:{DropdownButton:Rt,ReportExport:lc},methods:{showExportImage(e){Md(e.target).closest(".dataTable").find("div.jqplot-target").trigger("piwikExportAsImage")}},computed:{randomIdForDropdown(){return Math.floor(999999*Math.random())},allFooterIcons(){return this.footerIcons.reduce((e,t)=>(e.push(...t.buttons),e),[])},activeFooterIcons(){const e=this.clientSideParameters,t=[this.viewDataTable];return 0===e.abandonedCarts||"0"===e.abandonedCarts?t.push("ecommerceOrder"):1!==e.abandonedCarts&&"1"!==e.abandonedCarts||t.push("ecommerceAbandonedCart"),t.map(e=>this.allFooterIcons.find(t=>t.id===e)).filter(e=>!!e)},activeFooterIcon(){var e;return null===(e=this.activeFooterIcons[0])||void 0===e?void 0:e.icon},activeFooterIconIds(){return this.activeFooterIcons.map(e=>e.id)},numIcons(){return this.allFooterIcons.length},hasFooterIconsToShow(){return!!this.activeFooterIcons.length&&this.numIcons>1},reportFormats(){const e={TSV:"TSV (Excel)",HTML:"HTML",JSON:"JSON",XML:"XML",CSV:"CSV",RSS:"RSS"};return e},exportSupportsFlat(){return Id(!!this.exportSupportsFlatten,this.clientSideParameters.flat)},showDimensionsConfigItem(){return this.showFlattenTable&&""+this.clientSideParameters.flat==="1"&&this.hasMultipleDimensions},showFlatConfigItem(){return this.showFlattenTable&&""+this.clientSideParameters.flat==="1"},showTotalsConfigItem(){return!this.isDataTableEmpty&&this.showTotalsRow},hasConfigItems(){return this.showFlattenTable||this.showDimensionsConfigItem||this.showFlatConfigItem||this.showTotalsConfigItem||this.showExcludeLowPopulation||this.showPivotBySubtable},flattenItemText(){const e=this.clientSideParameters;return Rd(Nd(e.flat),"CoreHome_UnFlattenDataTable","CoreHome_FlattenDataTable")},keepTotalsRowText(){const e=this.clientSideParameters;return Rd(Nd(e.keep_totals_row),"CoreHome_RemoveTotalsRowDataTable","CoreHome_AddTotalsRowDataTable")},includeAggregateRowsText(){const e=this.clientSideParameters;return Rd(Nd(e.include_aggregate_rows),"CoreHome_DataTableExcludeAggregateRows","CoreHome_DataTableIncludeAggregateRows")},showDimensionsText(){const e=this.clientSideParameters;return Rd(Nd(e.show_dimensions),"CoreHome_DataTableCombineDimensions","CoreHome_DataTableShowDimensions")},pivotByText(){const e=this.clientSideParameters;return Nd(e.pivotBy)?Fd("CoreHome_UndoPivotBySubtable",!0):Fd("CoreHome_PivotBySubtable",!1,this.pivotDimensionName)},excludeLowPopText(){const e=this.clientSideParameters;return Rd(Nd(e.enable_filter_excludelowpop),"CoreHome_IncludeRowsWithLowPopulation","CoreHome_ExcludeRowsWithLowPopulation")},isAnyConfigureIconHighlighted(){const e=this.clientSideParameters;return Nd(e.flat)||Nd(e.keep_totals_row)||Nd(e.include_aggregate_rows)||Nd(e.show_dimensions)||Nd(e.pivotBy)||Nd(e.enable_filter_excludelowpop)},isTableView(){return"table"===this.viewDataTable||"tableAllColumns"===this.viewDataTable||"tableGoals"===this.viewDataTable}}});Ld.render=Bd;var Ad=Ld;const _d={key:0,class:"title",style:{cursor:"pointer"},ref:"expander"},Hd=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),$d={key:1,class:"title",href:"?module=CoreUpdater&action=newVersionAvailable",style:{cursor:"pointer"},ref:"expander"},Ud=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),qd=["innerHTML"],Wd=["href"],zd={id:"updateCheckLinkContainer"},Gd={class:"dropdown positionInViewport"},Kd=["innerHTML"],Yd=["innerHTML"];function Qd(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Passthrough"),s=Object(D["resolveDirective"])("expand-on-hover");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{id:"header_message",class:Object(D["normalizeClass"])(["piwikSelector",{header_info:!e.latestVersionAvailable||e.lastUpdateCheckFailed,update_available:e.latestVersionAvailable}])},[e.latestVersionAvailable?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0},{default:Object(D["withCtx"])(()=>[e.isMultiServerEnvironment?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",_d,[Hd,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_NewUpdatePiwikX",e.latestVersionAvailable)),1)],512)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",$d,[Ud,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_NewUpdatePiwikX",e.latestVersionAvailable)),1)],512))]),_:1})):e.isSuperUser&&(e.isAdminArea||e.lastUpdateCheckFailed)?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:1},{default:Object(D["withCtx"])(()=>[e.isInternetEnabled?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:"title",innerHTML:e.$sanitize(e.updateCheck)},null,8,qd)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"title",href:e.externalRawLink("https://matomo.org/changelog/"),target:"_blank",rel:"noreferrer noopener"},[Object(D["createElementVNode"])("span",zd,Object(D["toDisplayString"])(e.translate("CoreHome_SeeAvailableVersions")),1)],8,Wd))]),_:1})):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Gd,[e.latestVersionAvailable&&e.isSuperUser?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.updateNowText)},null,8,Kd)):e.latestVersionAvailable&&e.hasSomeViewAccess&&!e.isAnonymous?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.updateAvailableText)},null,8,Yd)):Object(D["createCommentVNode"])("",!0),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_YouAreCurrentlyUsing",e.piwikVersion)),1)])],2)),[[s,{expander:"expander"}]])}var Jd=Object(D["defineComponent"])({props:{isMultiServerEnvironment:Boolean,lastUpdateCheckFailed:Boolean,latestVersionAvailable:String,isSuperUser:Boolean,isAdminArea:Boolean,isInternetEnabled:Boolean,updateCheck:String,isAnonymous:Boolean,hasSomeViewAccess:Boolean,contactEmail:String,piwikVersion:String},components:{Passthrough:Lc},directives:{ExpandOnHover:Nt},computed:{updateNowText(){let e="";if(this.isMultiServerEnvironment){const t=ue(`https://builds.matomo.org/matomo-${this.latestVersionAvailable}.zip`);e=a("CoreHome_OneClickUpdateNotPossibleAsMultiServerEnvironment",`builds.matomo.org`)}else e=a("General_PiwikXIsAvailablePleaseUpdateNow",this.latestVersionAvailable||"",'
',"",pe("https://matomo.org/changelog/"),"");return e+"
"},updateAvailableText(){const e=a("General_NewUpdatePiwikX",this.latestVersionAvailable||""),t=pe("https://matomo.org/")+"Matomo",o=pe("https://matomo.org/changelog/"),i=a("General_PiwikXIsAvailablePleaseNotifyPiwikAdmin",`${t} ${o}${this.latestVersionAvailable}`,``,"");return i+"
"}}});Jd.render=Qd;var Xd=Jd;const Zd={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},eu={class:"collapsible collapsible-accordion"},tu={class:"collapsible-header"},ou={class:"collapsible-body"},iu=["title","href"];function nu(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Zd,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menuWithSubmenuItems,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:"no-padding",key:o},[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",eu,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",tu,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translateOrDefault(o)),1),Object(D["createElementVNode"])("i",{class:Object(D["normalizeClass"])(t._icon||"icon-chevron-down")},null,2)]),Object(D["createElementVNode"])("div",ou,[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(Object.entries(t).filter(([e])=>"_"!==e[0]),([t,o])=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t},[Object(D["createElementVNode"])("a",{title:o._tooltip?e.translateIfNecessary(o._tooltip):"",target:"_self",href:e.getMenuUrl(o._url)},Object(D["toDisplayString"])(e.translateIfNecessary(t)),9,iu)]))),128))])])])])),[[r,{activator:e.activateLeftMenu}]])]))),128))])}const{$:au}=window;var ru=Object(D["defineComponent"])({props:{menu:{type:Object,required:!0}},directives:{SideNav:Jt},methods:{getMenuUrl(e){return"?"+U.stringify(Object.assign(Object.assign({},U.urlParsed.value),e))},translateIfNecessary(e){return e.includes("_")?a(e):e}},computed:{menuWithSubmenuItems(){const e=this.menu||{};return Object.fromEntries(Object.entries(e).filter(([,e])=>{const t=Object.entries(e).filter(([e])=>"_"!==e[0]);return Object.keys(t).length}))},activateLeftMenu(){return au("nav .activateLeftMenu")[0]}}});ru.render=nu;var su=ru; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const{$:lu}=window;function cu(e){lu.scrollTo(e,20)}function du(e){e&&e.preventDefault()}function uu(e,t){var o,i;if(!e)return;if(-1!==e.indexOf("&"))return;let n=null;try{n=lu("#"+e)}catch(a){return}if(null!==(o=n)&&void 0!==o&&o.length)return cu(n),void du(t);n=lu(`a[name=${e}]`),null!==(i=n)&&void 0!==i&&i.length&&(cu(n),du(t))}function pu(e,t){return(!e||!e.origin||-1!==t.indexOf(e.origin))&&((!e||!e.pathname||-1!==t.indexOf(e.pathname))&&(!e||!e.search||-1!==t.indexOf(e.search)))}function mu(){if("#/"===window.location.hash.slice(0,2)){const e=window.location.hash.slice(2);uu(e,null)}}function hu(){Object(D["watch"])(()=>U.url.value,(e,t)=>{if(!e)return;const o=e.href.indexOf("#/");if(-1===o)return;if(t&&!pu(t,e.href))return;const i=e.href.slice(o+2);uu(i,null)})}function gu(){Object(D["nextTick"])(mu)} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function bu(e){const t=[];if("INPUT"===e.tagName&&"password"===e.type)t.push(e);else{const o=e.querySelectorAll('input[type="password"]');o.forEach(e=>t.push(e))}return t}function fu(e,t){let o,i=e.value;const n=()=>{e.value="",e.dispatchEvent(new Event("input"))},a=()=>{o&&clearTimeout(o),o=setTimeout(n,1e3*t)},r=()=>a(),s=()=>a();e.addEventListener("input",r),e.addEventListener("change",s),e.dataset.autoClearEnabled="true";const l=setInterval(()=>{e.value!==i&&(i=e.value,a())},300);e.onUmounted={cleanup(){clearTimeout(o),clearInterval(l),e.removeEventListener("input",r),e.removeEventListener("change",s),delete e.dataset.autoClearEnabled}}}hu(),lu(mu);var vu={mounted(e,t){const o=t.value&&t.value.delay||600,i=bu(e);i.forEach(e=>fu(e,o))},unmounted(e){const t=bu(e);t.forEach(e=>{e.onUmounted&&"function"===typeof e.onUmounted.cleanup&&(e.onUmounted.cleanup(),delete e.onUmounted)})}};const Ou={key:0,class:"password-strength row"};function yu(e,t,o,i,n,a){return e.rules.length?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Ou,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.rules,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t.ruleText,class:Object(D["normalizeClass"])("col s12 xl6 rule rule-"+e.ruleStatus(t))},[Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])({icon:!0,"icon-ok":"valid"===e.ruleStatus(t),"icon-close":"invalid"===e.ruleStatus(t),"icon-circle":"undefined"===e.ruleStatus(t)})},null,2),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(t.ruleText),1)],2))),128))])):Object(D["createCommentVNode"])("",!0)}var ju=Object(D["defineComponent"])({props:{validationRules:{type:Array,required:!0},password:{type:String,default:""},externalInputSelector:{type:String,default:""}},data(){return{pwd:"",rules:[]}},emits:["check:isValid"],watch:{pwdValue:{immediate:!0,handler(e){const t=[];this.rules.forEach(o=>{if(e.length||"undefined"===typeof o.passed)try{const i=new RegExp(o.validationRegex.replace(/^\/|\/$/g,""));i.test(e)?(o.passed=!0,t.push(!0)):o.passed=!1}catch(i){console.log("Invalid password validation pattern:",i)}else delete o.passed}),this.rules.length>0&&t.length===this.rules.length&&this.$emit("check:isValid",!0)}}},computed:{pwdValue(){var e;return null!==(e=this.externalInputSelector)&&void 0!==e&&e.length?this.pwd:this.password}},mounted(){var e;if(this.rules=this.validationRules.length?this.validationRules.map(e=>Object.assign({},e)):[],null!==(e=this.externalInputSelector)&&void 0!==e&&e.length){const e=document.querySelector(this.externalInputSelector);e&&(e.addEventListener("input",this.handleExternalInput),this.pwd=e.value)}},unmounted(){var e;if(null!==(e=this.externalInputSelector)&&void 0!==e&&e.length){const e=document.querySelector(this.externalInputSelector);e&&e.removeEventListener("input",this.handleExternalInput)}},methods:{ruleStatus(e){return"undefined"===typeof e.passed?"undefined":e.passed?"valid":"invalid"},handleExternalInput(e){const t=e.target;this.pwd=t.value}}});ju.render=yu;var wu=ju; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */const Su={class:"main-duplicator-modal-content"},Cu={class:"modal-header"},ku=Object(D["createElementVNode"])("span",{class:"btn-close modal-close"},[Object(D["createElementVNode"])("i",{class:"icon-close"})],-1),Du={key:0,class:"modal-sub-header"},Eu={class:"loading-message"},Pu={key:0,class:"modal-sub-header"},Tu=["innerHTML"],xu={class:"modal-content"},Vu={class:"modal-inputs"},Bu={class:"modal-sub-footer"},Nu=["innerHTML"],Iu=["innerHTML"],Mu={class:"modal-footer"},Fu=["disabled"];function Ru(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader"),s=Object(D["resolveComponent"])("Field"),l=Object(D["resolveDirective"])("form");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])({modal:!0,"entity-duplicator-modal":!0,"slot-configured":e.$slots.default}),ref:"root"},[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Su,[Object(D["createElementVNode"])("div",Cu,[ku,Object(D["createElementVNode"])("h2",null,Object(D["toDisplayString"])(e.getModalTitle),1)]),e.isLoading?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Du,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",Eu,Object(D["toDisplayString"])(e.translate("General_Loading")),1)])):(Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],{key:1},[e.hideSiteSelector?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Pu,[Object(D["createElementVNode"])("p",null,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.getDuplicateDescription)+" ",1),e.descriptionLearnMoreLink?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.getLearnMoreLink)},null,8,Tu)):Object(D["createCommentVNode"])("",!0)]),Object(D["createVNode"])(s,{uicontrol:"site",name:"siteSelector",title:e.translate("CoreHome_ChooseWebsite"),modelValue:e.destinationSite,"onUpdate:modelValue":t[0]||(t[0]=t=>e.destinationSite=t),"ui-control-attributes":{onlySitesWithAtLeastWriteAccess:!0,siteTypesToExclude:["rollup"]}},null,8,["title","modelValue"])])),Object(D["createElementVNode"])("div",xu,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Vu,[Object(D["renderSlot"])(e.$slots,"default")])),[[l]])]),Object(D["createElementVNode"])("div",Bu,[e.duplicationErrors.length>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])({alert:!0,"alert-danger":!0,"error-list":e.duplicationErrors.length>1})},[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.duplicationErrors,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o,innerHTML:e.$sanitize(t)},null,8,Nu))),128))])],2)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("p",{class:"note-text",innerHTML:e.$sanitize(e.getNoteText)},null,8,Iu)]),Object(D["createElementVNode"])("div",Mu,[Object(D["withDirectives"])(Object(D["createVNode"])(r,null,null,512),[[D["vShow"],e.hasBeenSubmitted]]),Object(D["createElementVNode"])("button",{class:"btn",disabled:!e.getIsValid||e.hasBeenSubmitted,onClick:t[1]||(t[1]=t=>e.submitRequest())},Object(D["toDisplayString"])(e.translate("General_Copy")),9,Fu)])],64))],512),[[D["vShow"],e.isModalVisible]])],2)}const Lu=Ce("CorePluginsAdmin","Field"),Au=Ce("CorePluginsAdmin","Form"),{$:_u}=window;var Hu=Object(D["defineComponent"])({directives:{Form:Au},components:{Field:Lu,MatomoLoader:Ue},props:{modalStore:{type:Object,required:!0},hideSiteSelector:{type:Boolean,default:!1},descriptionLearnMoreLink:{type:String,default:""}},data(){return{isLoading:!0,isValidated:!1,duplicationErrors:[],destinationSite:null,hasBeenSubmitted:!1}},watch:{isModalVisible(e){if(!e)return;let t;this.modalStore.adapter.beforeShowModal&&(t=this.modalStore.adapter.beforeShowModal()),t&&"undefined"!==typeof t||(t=new Promise(e=>e())),this.showModal(),t.then(()=>{this.isLoading=!1})},destinationSite(){this.isValidated=!1}},methods:{closeModal(){const e=this.$refs.root,t=_u(e);t.modal("close")},resetModal(){this.modalStore.hideModal(),this.destinationSite=null,this.isLoading=!0,this.isValidated=!1,this.duplicationErrors=[],this.hasBeenSubmitted=!1},showModal(){const e=this.$refs.root,t=_u(e);t.modal({dismissible:!0,onCloseEnd:()=>{this.resetModal()}}).modal("open")},submitRequest(){this.hasBeenSubmitted=!0,this.getValidationResultPromise().then(e=>{var t;if(!e.isValid&&e.errorMessages.length>0)return this.isValidated=!0,this.hasBeenSubmitted=!1,void(this.duplicationErrors=e.errorMessages);const o=this.modalStore.adapter.prepareApiParams(this.modalStore.getFormValues(null===(t=this.destinationSite)||void 0===t?void 0:t.id));this.modalStore.adapter.submitRequest(o).then(e=>{e&&e.success?(this.modalStore.adapter.onSuccess&&this.modalStore.adapter.onSuccess(e),this.closeModal()):this.setErrorMessages(e)}).catch(e=>{this.setErrorMessages(),this.modalStore.adapter.onFailure&&this.modalStore.adapter.onFailure(e),console.log("Unexpected server error during request.",e)}).finally(()=>{this.hasBeenSubmitted=!1})})},getValidationResultPromise(){var e;this.duplicationErrors=[];const t=this.modalStore.adapter.validateFormFields(this.modalStore.getFormValues(null===(e=this.destinationSite)||void 0===e?void 0:e.id));return"isValid"in t?new Promise(e=>e(t)):t},setErrorMessages(e=null){let t=(null===e||void 0===e?void 0:e.message)||"";t&&0!==t.length||(t=a("General_ErrorRequest","","")),this.duplicationErrors=[],this.duplicationErrors.push(t)}},mounted(){Object(D["watch"])(()=>this.modalStore.state.entityFormData,()=>{this.isValidated=!1},{deep:!0})},computed:{isModalVisible(){var e;return null!==(e=this.modalStore.state.isModalVisible)&&void 0!==e&&e},getModalTitle(){return a("CoreHome_CopyX",this.modalStore.getEntityTypeTranslation)},getNoteText(){const e=a("CoreHome_CopyModalNote","","",this.modalStore.getEntityTypeTranslation);return""+e},getDuplicateDescription(){return a("CoreHome_CopyXDescription",this.modalStore.getEntityTypeTranslation)},getLearnMoreLink(){if(!this.descriptionLearnMoreLink)return"";const e=pe(this.descriptionLearnMoreLink);return a("CoreHome_LearnMoreFullStop",e,"")},getIsValid(){return!this.isValidated||Array.isArray(this.duplicationErrors)&&0===this.duplicationErrors.length}}});Hu.render=Ru;var $u=Hu;const Uu=["title","aria-disabled"];function qu(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("tooltips");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:Object(D["normalizeClass"])([{"entity-duplicator-action":!0,"table-action":!0,"icon-content-copy":!0,"is-disabled":!e.isActionEnabled},e.extraClasses]),title:e.getActionTooltip,"aria-disabled":!e.isActionEnabled,onClick:t[0]||(t[0]=t=>!e.isActionEnabled||e.handleClick())},null,10,Uu)),[[r],[D["vShow"],e.isActionVisible]])}var Wu=Object(D["defineComponent"])({props:{actionFormData:{type:Object,required:!0},modalStore:{type:Object,required:!0},isActionVisible:{type:Boolean,required:!0},isActionEnabled:{type:Boolean,default:!1},tooltipTextOverride:{type:String,default:""},tooltipTextOverrideDisabled:{type:String,default:""},extraClasses:{type:[String,Array,Object],default:""}},directives:{Tooltips:ct},methods:{handleClick(){this.modalStore.showModal(this.actionFormData)}},computed:{getActionTooltip(){return this.isActionEnabled&&this.tooltipTextOverride.length?r(this.tooltipTextOverride):!this.isActionEnabled&&this.tooltipTextOverrideDisabled.length?r(this.tooltipTextOverrideDisabled):a("CoreHome_CopyX",this.modalStore.getEntityTypeTranslation)}}});Wu.render=qu;var zu=Wu;function Gu(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class Ku{constructor(e){Gu(this,"module",void 0),Gu(this,"method",void 0),Gu(this,"format",void 0),Gu(this,"requiredFields",void 0),this.module=e.module||"API",this.method=e.method,this.format=e.format||"json",this.requiredFields=e.requiredFields||["idSite","idDestinationSites"]}async validateFormFields(e){const t=[];return this.requiredFields.forEach(o=>{o in e&&e[o]||t.push(a("General_Required",o))}),new Promise(e=>e({errorMessages:t,isValid:0===t.length}))}prepareApiParams(e){return Object.assign({idSite:M.idSite||U.parsed.value.idSite,idDestinationSites:[e.idDestinationSite]},e)}async submitRequest(e){this.module=e.module||this.module,this.method=e.method||this.method,this.format=e.format||this.format;const t=e;if(!this.method||this.method.length<1)throw new Error("The POST method cannot be empty!");const o=new te;return o.useCallbackInCaseOfError(),o.setErrorCallback(null),o.removeDefaultParameter("date"),o.removeDefaultParameter("period"),o.removeDefaultParameter("segment"),o.addParams({module:this.module,method:this.method,format:this.format},"GET"),o.addParams(t,"POST"),o.setFormat(this.format),o.send()}onSuccess(e){let t=new Promise(e=>e());this.onSuccessCallback&&(t=this.onSuccessCallback(e)),t.then(()=>{setTimeout(()=>{const t=Zi.show({message:e.message,context:e.success?"success":"error",type:"toast",id:"entityDuplicationResult"});Zi.scrollToNotification(t)})})}}function Yu(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */class Qu{constructor(e,t,o){Yu(this,"state",Object(D["reactive"])({isModalVisible:!1,commonFormData:{},entityFormData:{},entityTypeTranslation:""})),Yu(this,"adapter",void 0),this.state.entityTypeTranslation=e,this.adapter="validateFormFields"in t?t:new Ku(t),this.state.commonFormData=null!==o&&void 0!==o?o:{}}static buildStoreInstance(e,t,o){return Object(D["reactive"])(new Qu(e,t,o))}showModal(e){this.resetFormData(),Object.entries(null!==e&&void 0!==e?e:{}).forEach(([e,t])=>{this.state.entityFormData[e]=t}),this.state.isModalVisible=!0}hideModal(){this.state.isModalVisible=!1,this.resetFormData()}resetFormData(){Object.keys(this.state.entityFormData).forEach(e=>{delete this.state.entityFormData[e]})}getFormValues(e){const t=Array.isArray(e)?e:[];return e&&!Array.isArray(e)&&t.push(e),Object.assign(Object.assign({idSite:M.idSite||U.parsed.value.idSite,idDestinationSites:t},this.state.commonFormData),this.state.entityFormData)}get getEntityTypeTranslation(){let e="CoreHome_ReportLowercase";return this.state.entityTypeTranslation&&(e=this.state.entityTypeTranslation),r(e)}} -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */}})})); -//# sourceMappingURL=CoreHome.umd.min.js.map \ No newline at end of file diff --git a/plugins/CoreHome/vue/dist/umd.metadata.json b/plugins/CoreHome/vue/dist/umd.metadata.json deleted file mode 100644 index c63babfe119c1c6e31658d563c66b805e8f84495..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/dist/umd.metadata.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dependsOn": [] -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue b/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue deleted file mode 100644 index 3f5f0bbc24afd0ea879c73e0d4d1dafc0b5a5a92..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue deleted file mode 100644 index 92ab8c441408a329cf569d1e174625f27f22747c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts deleted file mode 100644 index f9f4979e40d40b2af0489e94af577bf54bbc2440..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import AjaxHelper from './AjaxHelper'; - -declare global { - interface Window { - ajaxHelper: typeof AjaxHelper; - } -} - -window.ajaxHelper = AjaxHelper; diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.spec.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.spec.ts deleted file mode 100644 index 25996cf8f5a215e2103d6918240e03daa95f7aef..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.spec.ts +++ /dev/null @@ -1,502 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import AjaxHelper from './AjaxHelper'; - -type AjaxMode = 'success' | 'apiErrorEachChunk' | 'abort' | 'sessionTimeout'; -type JQueryXhr = JQuery.jqXHR; - -describe('CoreHome/AjaxHelper', () => { - const unsupportedBulkResponseObjectError = 'AjaxHelper returnResponseObject is not supported for bulk requests.'; - const originalAjax = window.$.ajax; - const originalRequire = window.require; - const originalRedirect = window.piwikHelper.redirect; - const originalRefreshAfter = window.piwikHelper.refreshAfter; - - let notificationCallCount = 0; - let consoleLogSpy: jest.SpyInstance; - - function makeBulkRequests(count: number): QueryParameters[] { - return Array.from({ length: count }, (_, index) => ({ - method: 'API.getMatomoVersion', - format: 'json', - index, - })); - } - - function installAjaxMock(mode: AjaxMode, chunkSizes: number[]): void { - (window.$ as JQueryStatic & { ajax: typeof window.$.ajax }).ajax = ((ajaxOptions: any) => { - const urls = Array.isArray(ajaxOptions?.data?.urls) ? ajaxOptions.data.urls : []; - const chunkOffset = chunkSizes.reduce((sum, chunkSize) => sum + chunkSize, 0); - chunkSizes.push(urls.length); - const chunkNumber = chunkSizes.length - 1; - - const data = urls.map((url: string, index: number) => { - if (mode === 'apiErrorEachChunk' && index === 0) { - return { - result: 'error', - message: `chunk-${chunkOffset + index}`, - }; - } - - return { - url, - index: chunkOffset + index, - }; - }); - - const xhr = { - readyState: 4, - status: 200, - statusText: 'success', - responseJSON: data, - abort: jest.fn(), - getResponseHeader(headerName: string) { - if (mode === 'sessionTimeout' && headerName === 'X-Matomo-Session-Timed-Out') { - return '1'; - } - if (headerName === 'X-Test-Header') { - return `chunk-${chunkNumber}`; - } - return null; - }, - then(callback: (response: unknown, status: string, request: JQueryXhr) => void) { - if (mode !== 'abort' && mode !== 'sessionTimeout') { - callback(data, 'success', this as unknown as JQueryXhr); - } - return this; - }, - fail(callback: (request: JQueryXhr, status: string, errorThrown: unknown) => void) { - if (mode === 'abort') { - this.status = 0; - this.statusText = 'abort'; - callback(this as unknown as JQueryXhr, 'abort', new Error('aborted')); - } - if (mode === 'sessionTimeout') { - this.status = 401; - this.statusText = 'error'; - callback(this as unknown as JQueryXhr, 'error', new Error('session timed out')); - } - return this; - }, - }; - - return xhr as unknown as JQueryXhr; - }) as typeof window.$.ajax; - } - - function installUrlCapturingAjaxMock(onRequest: (url: string) => void): void { - (window.$ as JQueryStatic & { ajax: typeof window.$.ajax }).ajax = ((ajaxOptions: any) => { - onRequest(ajaxOptions.url); - - const xhr = { - readyState: 4, - status: 200, - statusText: 'success', - responseJSON: [], - abort: jest.fn(), - getResponseHeader() { - return null; - }, - then(callback: (response: unknown) => void) { - callback([]); - return this; - }, - fail() { - return this; - }, - }; - - return xhr as unknown as JQueryXhr; - }) as typeof window.$.ajax; - } - - beforeEach(() => { - consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); - notificationCallCount = 0; - document.body.innerHTML = '
'; - - (window as Window & { require: (name: string) => any }).require = jest.fn().mockImplementation((moduleName: string) => { - if (moduleName !== 'piwik/UI') { - throw new Error(`unexpected module ${moduleName}`); - } - - return { - Notification: class Notification { - show() { - notificationCallCount += 1; - } - - scrollToNotification() { - } - }, - }; - }); - - window.piwikHelper.redirect = jest.fn(); - window.piwikHelper.refreshAfter = jest.fn(); - window.piwik.idSite = 1; - window.piwik.period = 'day'; - window.piwik.currentDateString = 'yesterday'; - window.piwik.token_auth = 'testtoken'; - window.piwik.shouldPropagateTokenAuth = false; - window.piwik.apiBulkRequestLimit = 2; - window.piwik.ajaxRequestFinished = undefined; - }); - - afterEach(() => { - consoleLogSpy.mockRestore(); - (window.$ as JQueryStatic & { ajax: typeof window.$.ajax }).ajax = originalAjax; - (window as Window & { require: (name: string) => any }).require = originalRequire; - window.piwikHelper.redirect = originalRedirect; - window.piwikHelper.refreshAfter = originalRefreshAfter; - }); - - it('should chunk bulk requests when request count is higher than configured limit', async () => { - const chunkSizes: number[] = []; - installAjaxMock('success', chunkSizes); - - const result = await AjaxHelper.fetch>(makeBulkRequests(5)); - - expect(chunkSizes).toEqual([2, 2, 1]); - expect(result.length).toBe(5); - expect(result[0].index).toBe(0); - expect(result[result.length - 1].index).toBe(4); - }); - - it('should not chunk bulk requests when bulk limit is disabled', async () => { - window.piwik.apiBulkRequestLimit = -1; - const chunkSizes: number[] = []; - installAjaxMock('success', chunkSizes); - - const result = await AjaxHelper.fetch>(makeBulkRequests(5)); - - expect(chunkSizes).toEqual([5]); - expect(result.length).toBe(5); - expect(result[0].index).toBe(0); - expect(result[result.length - 1].index).toBe(4); - }); - - it('should chunk bulk requests when using the helper instance API', async () => { - const chunkSizes: number[] = []; - installAjaxMock('success', chunkSizes); - - const helper = new AjaxHelper>(); - helper.setBulkRequests(...makeBulkRequests(5)); - const result = await helper.send(); - - expect(chunkSizes).toEqual([2, 2, 1]); - expect((result as Array<{ index: number }>).length).toBe(5); - expect((result as Array<{ index: number }>)[0].index).toBe(0); - expect((result as Array<{ index: number }>)[4].index).toBe(4); - }); - - it('should call complete callback once for chunked helper instance requests', async () => { - const chunkSizes: number[] = []; - installAjaxMock('success', chunkSizes); - let completeCallbackCallCount = 0; - let completeCallbackStatus = ''; - let completeCallbackHeaderValue: string|null = null; - - const helper = new AjaxHelper>(); - helper.setBulkRequests(...makeBulkRequests(5)); - helper.setCompleteCallback((xhr: JQueryXhr, status: string) => { - completeCallbackCallCount += 1; - completeCallbackStatus = status; - completeCallbackHeaderValue = xhr.getResponseHeader('X-Test-Header'); - }); - - await helper.send(); - - expect(chunkSizes).toEqual([2, 2, 1]); - expect(completeCallbackCallCount).toBe(1); - expect(completeCallbackStatus).toBe('success'); - expect(completeCallbackHeaderValue).toBe('chunk-2'); - }); - - it('should preserve useCallbackInCaseOfError for chunked helper instance requests', async () => { - const chunkSizes: number[] = []; - installAjaxMock('apiErrorEachChunk', chunkSizes); - let callbackCallCount = 0; - let callbackResultLength = 0; - - const helper = new AjaxHelper>(); - helper.setBulkRequests(...makeBulkRequests(5)); - helper.useCallbackInCaseOfError(); - helper.setCallback((result: Array<{ result?: string; message?: string }>) => { - callbackCallCount += 1; - callbackResultLength = Array.isArray(result) ? result.length : 0; - }); - - const result = await helper.send(); - - expect(chunkSizes).toEqual([2, 2, 1]); - expect((result as Array<{ result?: string; message?: string }>).length).toBe(5); - expect(callbackCallCount).toBe(1); - expect(callbackResultLength).toBe(5); - }); - - it('should process all chunks and show one notification before rejecting for API errors', async () => { - const chunkSizes: number[] = []; - installAjaxMock('apiErrorEachChunk', chunkSizes); - - let error: Error|null = null; - try { - await AjaxHelper.fetch(makeBulkRequests(5)); - } catch (caught) { - error = caught as Error; - } - - expect(chunkSizes).toEqual([2, 2, 1]); - expect(error).not.toBeNull(); - expect(error!.message).toContain('chunk-0'); - expect(error!.message).toContain('chunk-2'); - expect(error!.message).toContain('chunk-4'); - expect(notificationCallCount).toBe(1); - }); - - it('should call redirectOnSuccess only once for chunked fetch requests', async () => { - const chunkSizes: number[] = []; - installAjaxMock('success', chunkSizes); - - await AjaxHelper.fetch(makeBulkRequests(5), { - redirectOnSuccess: { update: 1 }, - }); - - expect(chunkSizes).toEqual([2, 2, 1]); - expect(window.piwikHelper.redirect).toHaveBeenCalledTimes(1); - expect(window.piwikHelper.redirect).toHaveBeenCalledWith({ update: 1 }); - }); - - it('should reject returnResponseObject for chunked bulk requests', async () => { - expect(() => { - AjaxHelper.fetch(makeBulkRequests(5), { returnResponseObject: true }); - }).toThrow(unsupportedBulkResponseObjectError); - }); - - it('should reject returnResponseObject for chunked helper instance requests', async () => { - const helper = new AjaxHelper(); - helper.resolveWithHelper = true; - helper.setBulkRequests(...makeBulkRequests(5)); - - expect(() => { - helper.send(); - }).toThrow(unsupportedBulkResponseObjectError); - }); - - it('should reject returnResponseObject for non-chunked helper instance requests', async () => { - window.piwik.apiBulkRequestLimit = 10; - const helper = new AjaxHelper(); - helper.resolveWithHelper = true; - helper.setBulkRequests(...makeBulkRequests(5)); - - expect(() => { - helper.send(); - }).toThrow(unsupportedBulkResponseObjectError); - }); - - it('should reject chunked fetch requests when aborted', async () => { - const chunkSizes: number[] = []; - installAjaxMock('abort', chunkSizes); - - await expect(AjaxHelper.fetch(makeBulkRequests(5))).rejects.toThrow('Chunked bulk request was aborted.'); - expect(chunkSizes).toEqual([2]); - }); - - it('should refresh and reject chunked fetch requests when the session times out', async () => { - const chunkSizes: number[] = []; - installAjaxMock('sessionTimeout', chunkSizes); - - await expect(AjaxHelper.fetch(makeBulkRequests(5))).rejects.toThrow('Chunked bulk request timed out due to session expiration.'); - expect(chunkSizes).toEqual([2]); - expect(window.piwikHelper.refreshAfter).toHaveBeenCalledTimes(1); - expect(window.piwikHelper.refreshAfter).toHaveBeenCalledWith(0); - }); - - it('should not replace an explicitly empty segment with the URL segment', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - history.replaceState({}, '', '?module=CoreHome&action=index&idSite=1&period=day&segment=urlSegmentValue'); - - await AjaxHelper.fetch({ - method: 'API.getSuggestedValuesForSegment', - segment: '', - }); - - expect(requestedUrl).not.toContain('segment=urlSegmentValue'); - expect(requestedUrl).toContain('segment='); - }); - - it('should omit the segment parameter when explicitly set to null', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - history.replaceState({}, '', '?module=CoreHome&action=index&idSite=1&period=day&segment=urlSegmentValue'); - - await AjaxHelper.fetch({ - method: 'API.getSuggestedValuesForSegment', - segment: null, - }); - - expect(requestedUrl).not.toContain('segment=urlSegmentValue'); - expect(requestedUrl).not.toContain('segment='); - }); - - it('should treat an undefined segment like a missing segment parameter', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - history.replaceState({}, '', '?module=CoreHome&action=index&idSite=1&period=day&segment=urlSegmentValue'); - - await AjaxHelper.fetch({ - method: 'API.getSuggestedValuesForSegment', - segment: undefined, - }); - - expect(requestedUrl).toContain('segment=urlSegmentValue'); - }); - - it('escapes query-string characters in an unencoded segment value', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - const helper = new AjaxHelper(); - helper.addParams({ - module: 'API', - method: 'SomeReport.get', - // a not pre-encoded segment value containing characters with query-string meaning - segment: 'x&method=Other.method&foo=bar?baz#', - }, 'get'); - - await helper.send(); - - // the whole value stays inside the segment parameter (query-string characters escaped) - expect(requestedUrl).toContain('segment=x%26method=Other.method%26foo=bar%3Fbaz%23'); - // so it does not turn into separate query parameters - expect(requestedUrl).not.toContain('&method=Other.method'); - expect(requestedUrl).not.toContain('#'); - // and the other request parameters are still present - expect(requestedUrl).toContain('&method=SomeReport.get'); - }); - - it('keeps segment operators and inner separators intact while escaping query-string characters', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - const helper = new AjaxHelper(); - helper.addParams({ - module: 'API', - method: 'SomeReport.get', - // a realistic, not pre-encoded segment matching on a URL that itself carries a query string - segment: 'pageUrl==http://example.com/?a=1&b=2', - }, 'get'); - - await helper.send(); - - // '==' and the inner '=' must survive untouched, only '?' and '&' are escaped - expect(requestedUrl).toContain('segment=pageUrl==http://example.com/%3Fa=1%26b=2'); - // the URL query string of the matched page must not leak out as a separate parameter - expect(requestedUrl).not.toContain('&b=2'); - }); - - it('does not double-encode an already encoded segment value', async () => { - let requestedUrl = ''; - - installUrlCapturingAjaxMock((url) => { - requestedUrl = url; - }); - - const helper = new AjaxHelper(); - helper.addParams({ - module: 'API', - method: 'SomeReport.get', - segment: 'pageUrl%3D%3Dhttps%253A%252F%252Fexample.com', - }, 'get'); - - await helper.send(); - - expect(requestedUrl).toContain('segment=pageUrl%3D%3Dhttps%253A%252F%252Fexample.com'); - }); - - describe('date/period validation', () => { - const validCases: Array<[string, QueryParameters]> = [ - ['day + ISO date', { period: 'day', date: '2024-01-15' }], - ['day + today', { period: 'day', date: 'today' }], - ['day + yesterday', { period: 'day', date: 'yesterday' }], - ['week + ISO date', { period: 'week', date: '2024-01-15' }], - ['month + ISO date', { period: 'month', date: '2024-01-15' }], - ['year + ISO date', { period: 'year', date: '2024-01-15' }], - ['range + explicit range', { period: 'range', date: '2024-01-01,2024-01-31' }], - ['range + last7', { period: 'range', date: 'last7' }], - ['range + previous30', { period: 'range', date: 'previous30' }], - // multiple-period requests with a non-range period are valid on the backend - ['day + lastN', { period: 'day', date: 'last30' }], - ['day + comma range', { period: 'day', date: '2024-01-01,2024-01-31' }], - ['month + comma range', { period: 'month', date: '2024-01-01,2024-03-31' }], - ['week + previousN', { period: 'week', date: 'previous4' }], - // keyword preset dates emitted by PresetDateRangeResolver must not be mistaken for ranges - ['week + lastweek', { period: 'week', date: 'lastweek' }], - ['month + lastmonth', { period: 'month', date: 'lastmonth' }], - ['year + lastyear', { period: 'year', date: 'lastyear' }], - // unrecognized periods are left to the backend to validate - ['unrecognized period', { period: 'bogusperiod', date: '2024-01-01' }], - // the character-set guard still allows dates with no period present - ['no period + ISO date', { date: '2024-01-15' }], - ['no period + range', { date: '2024-01-01,2024-01-31' }], - ]; - - const invalidCases: Array<[string, QueryParameters]> = [ - ['day + string', { period: 'day', date: 'not-a-date' }], - ['day + comma range with invalid part', { period: 'day', date: '2024-01-01,gibberish' }], - // the character-set guard catches odd characters even without a recognized period - ['no period + slash date', { date: '2024/01/15' }], - ['unrecognized period + illegal chars', { period: 'bogusperiod', date: ' diff --git a/plugins/CoreHome/vue/src/Alert/alert.less b/plugins/CoreHome/vue/src/Alert/alert.less deleted file mode 100644 index b0457629f2004dbcba336b4e4c94428cae596c93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Alert/alert.less +++ /dev/null @@ -1,106 +0,0 @@ -.alert-icon-center-vertically(@font-size) { - @half-height: @font-size / 2; - // IE8 doesn't support calc(): it's OK, the icon will just be aligned to the top - top: calc(~'50% - @{half-height}'); - // phantomjs only supports -webkit-calc() - top: -webkit-calc(~'50% - @{half-height}'); -} - -.alert { - color: #212121 !important; - padding: 20px 20px 20px 60px; - margin-bottom: 20px; - border: 2px solid; - border-radius: 2px; - font-size: 14px; - position: relative; - - @media (max-width: 480px) { - padding: 15px; - } - - .inDarkMode({ - color: #ccc !important; - }); - - &::before { - font-family: "matomo"; - content: "\e88f"; - position: absolute; - left: 20px; - line-height: 100%; // line-height = font-size - font-size: 24px; - margin-top: -3px; - - @media (max-width: 480px) { - position: static; - display: block; - margin-bottom: 0.5em; - text-align: center; - } - } - - a { - color: #212121 !important; - text-decoration: underline; - - .inDarkMode({ - color: #ccc !important; - }); - - &:hover { - text-decoration: underline; - } - } -} - -.alert-success { - background-color: #ebf2eb; - border-color: #378039; - &::before { - content: "\e63d"; - color: #378039; - } - - .inDarkMode({ - background-color: transparent; - }); -} - -.alert-info { - background-color: #ecf7fe; - border-color: #0d94e3; - &::before { - color: #0d94e3; - } - - .inDarkMode({ - background-color: transparent; - }); -} - -.alert-warning { - background-color: #fefbe9; - border-color: #a18a0b; - &::before { - content: "\e621"; - color: #a18a0b; - } - - .inDarkMode({ - background-color: transparent; - }); -} - -.alert-danger { - background-color: #faeaea; - border-color: @color-red-matomo; - &::before { - content: "\e616"; - color: @color-red-matomo; - } - - .inDarkMode({ - background-color: transparent; - }); -} diff --git a/plugins/CoreHome/vue/src/AutoClearPassword/AutoClearPassword.ts b/plugins/CoreHome/vue/src/AutoClearPassword/AutoClearPassword.ts deleted file mode 100644 index 5539cc1926c715921023e793281d30f2a9c2a6c4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/AutoClearPassword/AutoClearPassword.ts +++ /dev/null @@ -1,89 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; - -interface AutoClearArgs { - delay?: number, -} - -interface HTMLInputElementWithAutoClear extends HTMLInputElement { - onUmounted?: { - cleanup: () => void; - }; -} - -function collectPasswordInputs(el: HTMLElement): Array { - const targets: Array = []; - - if (el.tagName === 'INPUT' && (el as HTMLInputElement).type === 'password') { - targets.push(el as HTMLInputElementWithAutoClear); - } else { - const nested = el.querySelectorAll('input[type="password"]'); - nested.forEach((nestedEl: Element) => targets.push(nestedEl as HTMLInputElementWithAutoClear)); - } - - return targets; -} - -function setupAutoClear(el: HTMLInputElementWithAutoClear, delay: number) { - let timeoutId: number | undefined; - let lastValue = el.value; - - const clearValue = (): void => { - el.value = ''; - el.dispatchEvent(new Event('input')); - }; - - const resetTimer = (): void => { - if (timeoutId) clearTimeout(timeoutId); - timeoutId = setTimeout(clearValue, delay * 1000); - }; - - const inputListener = () => resetTimer(); - const changeListener = () => resetTimer(); - - el.addEventListener('input', inputListener); - el.addEventListener('change', changeListener); - el.dataset.autoClearEnabled = 'true'; - - const intervalId = setInterval(() => { - if (el.value !== lastValue) { - lastValue = el.value; - resetTimer(); - } - }, 300); - - el.onUmounted = { - cleanup() { - clearTimeout(timeoutId); - clearInterval(intervalId); - el.removeEventListener('input', inputListener); - el.removeEventListener('change', changeListener); - delete el.dataset.autoClearEnabled; - }, - }; -} - -export default { - mounted(el: HTMLInputElementWithAutoClear, binding: DirectiveBinding): void { - const delay = (binding.value && binding.value.delay) || 600; - - const targets = collectPasswordInputs(el); - targets.forEach((input: HTMLInputElementWithAutoClear) => setupAutoClear(input, delay)); - }, - - unmounted(el: HTMLInputElementWithAutoClear): void { - const targets = collectPasswordInputs(el); - targets.forEach((e: HTMLInputElementWithAutoClear) => { - if (e.onUmounted && typeof e.onUmounted.cleanup === 'function') { - e.onUmounted.cleanup(); - delete e.onUmounted; - } - }); - }, -}; diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.less b/plugins/CoreHome/vue/src/Comparisons/Comparisons.less deleted file mode 100644 index c58b8a4e7e734b750d38bef76abe97aa2d4fdded..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.less +++ /dev/null @@ -1,83 +0,0 @@ -.matomo-comparisons { - h3 { - margin-top: 0; - margin-bottom: 0; - } - - .comparison { - display: inline-block; - min-width: 164px; - margin-right: 16px; - padding: 14px; - background-color: @theme-color-background-contrast; - margin-bottom: 16px; - position: relative; - } - - .comparison-type { - font-weight: bold; - text-transform: uppercase; - font-size: .7em; - color: @theme-color-text-lighter; - } - - .remove-button { - font-size: .6em; - color: @theme-color-text-lighter; - position: absolute; - right: 12px; - top: 12px; - text-decoration: none; - - &:hover { - text-decoration: none; - } - } - - .title { - font-size: 1.1rem; - margin-top: 4px; - margin-bottom: 12px; - - overflow-x: hidden; - max-width: 250px; - text-overflow: ellipsis; - white-space: nowrap; - - a { - color: @theme-color-text-contrast; - } - } - - .comparison-period { - margin-top: 4px; - - > span { - display: inline-block; - } - - .comparison-dot { - width: 1em; - height: 1em; - display: inline-block; - border-radius: .5em; - } - - .comparison-period-label { - position: relative; - top: -3px; - margin-left: 6.5px; - display: inline-block; - font-size: .85rem; - font-style: italic; - } - } -} - -.comparison-card-tooltip { - p { - font-size: 1.1em; - line-height: 1.3em; - color: @theme-color-text-invert-contrast; - } -} diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts b/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts deleted file mode 100644 index 4e1a2b38ab78003b6e44ed074ec19a98c54db6a4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ComparisonsStore from './Comparisons.store'; - -export default new ComparisonsStore(); diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.spec.ts b/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.spec.ts deleted file mode 100644 index aac6b1795ed0d3309eaca4c5c72319b279944e60..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.spec.ts +++ /dev/null @@ -1,486 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import nock from 'nock'; -import '../Periods/Day'; -import '../Periods/Week'; -import '../Periods/Month'; -import '../Periods/Year'; -import '../Periods/Range'; -import ComparisonsStore from './Comparisons.store'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import Matomo from '../Matomo/Matomo'; - -describe('CoreHome/Comparisons.store', () => { - const DISABLED_PAGES = [ - 'MyModule1.disabledPage', - 'MyModule2.disabledPage2', - 'MyModule3.*', - ]; - let piwikComparisonsService: ComparisonsStore; - let oldWindowHash: string; - let nockScope: nock.Scope; - let oldColorManager: ColorManagerService; - - function wait() { - return new Promise(resolve => setTimeout(resolve, 0)); - } - - async function setHash(search: string) { - MatomoUrl.updateHash(search); - await wait(); - - // more than one required for all callbacks to finish - while (!piwikComparisonsService.state.comparisonsDisabledFor.length) { - await wait(); - } - } - - beforeAll(() => { - nockScope = nock('http://localhost') - .persist() - .post('/') - .query((query) => { - return query.method === 'API.getPagesComparisonsDisabledFor'; - }) - .reply(200, JSON.stringify(DISABLED_PAGES)); - }); - beforeAll(() => { - // so piwikHelper.isReportingPage will return true - document.body.innerHTML = document.body.innerHTML + '
'; - }); - - beforeEach(() => { - oldWindowHash = window.location.hash; - }); - beforeEach(() => { - oldColorManager = window.piwik.ColorManager; - window.piwik.ColorManager = { - getColors(ns: string, colors: string[]) { - const result: {[key: string]: string} = {}; - colors.forEach((name: string) => { - result[name] = `${ns}.${name}`; - }); - return result; - } - } as unknown as ColorManagerService; - }); - beforeEach(() => { - piwikComparisonsService = new ComparisonsStore(); - }); - afterEach(() => { - window.piwik.ColorManager = oldColorManager; - window.location.hash = oldWindowHash; - }); - - afterAll(() => { - nockScope.done(); - }); - - describe('#getComparisons()', () => { - it('should return all comparisons in URL', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getComparisons()).toEqual([ - { - params: { - segment: 'abcdefg', - }, - title: 'General_Unknown', - index: 0, - }, - { - params: { - segment: 'comparedsegment', - }, - title: 'General_Unknown', - index: 1, - }, - { - params: { - segment: '', - }, - title: 'SegmentEditor_DefaultAllVisits', - index: 2, - }, - { - params: { - date: '2018-01-02', - period: 'day' - }, - title: '2018-01-02', - index: 0, - }, - { - params: { - date: '2018-03-04', - period: 'week' - }, - title: 'General_DateRangeFromTo', - index: 1, - }, - ]); - }); - - it('should return base params if there are no comparisons', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg'); - - expect(piwikComparisonsService.getComparisons()).toEqual([ - { - params: { - segment: 'abcdefg' - }, - title: 'General_Unknown', - index: 0, - }, - { - params: { - date: '2018-01-02', - period: 'day' - }, - title: '2018-01-02', - index: 0, - }, - ]); - }); - it('should return nothing if comparison is not enabled for the page', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getComparisons()).toEqual([]); - }); - }); - - describe('piwikComparisonsChanged event', () => { - it('should not be emitted when only the popover hash parameter changes', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - const postEventSpy = jest.spyOn(Matomo, 'postEvent'); - - try { - MatomoUrl.updateHash({ - ...MatomoUrl.hashParsed.value, - popover: 'RowAction$3ASegmentVisitorLog$3AActions.getPageUrls', - }); - await wait(); - await wait(); - - expect(postEventSpy).not.toHaveBeenCalledWith('piwikComparisonsChanged'); - } finally { - postEventSpy.mockRestore(); - } - }); - - it('should be emitted when comparison parameters change', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - const postEventSpy = jest.spyOn(Matomo, 'postEvent'); - - try { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]=anothersegment'); - - expect(postEventSpy).toHaveBeenCalledWith('piwikComparisonsChanged'); - } finally { - postEventSpy.mockRestore(); - } - }); - - it('should be emitted when other URL parameters change', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&idGoal=1'); - - const postEventSpy = jest.spyOn(Matomo, 'postEvent'); - - try { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&idGoal=2'); - - expect(postEventSpy).toHaveBeenCalledWith('piwikComparisonsChanged'); - } finally { - postEventSpy.mockRestore(); - } - }); - }); - - describe('#removeSegmentComparison()', () => { - it('should remove an existing segment comparison from the URL', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - piwikComparisonsService.removeSegmentComparison(1); - await wait(); - - expect(window.location.href).toEqual('http://localhost/#?period=day&date=2018-01-02&segment=abcdefg&category=MyModule1&subcategory=enabledPage&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]='); - }); - - it('should change the base comparison if the first segment is removed', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - piwikComparisonsService.removeSegmentComparison(0); - await wait(); - - expect(window.location.href).toEqual('http://localhost/#?period=day&date=2018-01-02&segment=comparedsegment&category=MyModule1&subcategory=enabledPage&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]='); - }); - }); - - describe('#addSegmentComparison()', () => { - it('should add a new segment comparison to the URL', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - piwikComparisonsService.addSegmentComparison({ - segment: 'newsegment', - }); - await wait(); - - expect(piwikComparisonsService.getComparisons()).toEqual([ - {"params":{"segment":""},"title":"SegmentEditor_DefaultAllVisits","index":0}, - {"params":{"segment":"comparedsegment"},"title":"General_Unknown","index":1}, - {"params":{"segment":"newsegment"},"title":"General_Unknown","index":2}, - {"params":{"date":"2018-01-02","period":"day"},"title":"2018-01-02","index":0}, - {"params":{"date":"2018-03-04","period":"week"},"title":"General_DateRangeFromTo","index":1}, - ]); - }); - - it('should add the all visits segment to the URL', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - piwikComparisonsService.addSegmentComparison({ - segment: '', - }); - await wait(); - - expect(piwikComparisonsService.getComparisons()).toEqual([ - {"params":{"segment":"abcdefg"},"title":"General_Unknown","index":0}, - {"params":{"segment":"comparedsegment"},"title":"General_Unknown","index":1}, - {"params":{"segment":""},"title":"SegmentEditor_DefaultAllVisits","index":2}, - {"params":{"date":"2018-01-02","period":"day"},"title":"2018-01-02","index":0}, - {"params":{"date":"2018-03-04","period":"week"},"title":"General_DateRangeFromTo","index":1} - ]); - }); - }); - - describe('#isComparisonEnabled()', () => { - it('should return true if comparison is enabled for the page', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - expect(piwikComparisonsService.isComparisonEnabled()).toBe(true); - }); - - it('should return false if comparison is disabled for the page', async () => { - await setHash('category=MyModule2&subcategory=disabledPage2&date=2018-01-02&period=day&segment=&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - expect(piwikComparisonsService.isComparisonEnabled()).toBe(false); - }); - - it('should return false if comparison is disabled for the entire category', async () => { - await setHash('category=MyModule3&subcategory=enabledPage&date=2018-01-02&period=day&segment=&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); - - expect(piwikComparisonsService.isComparisonEnabled()).toBe(false); - }); - }); - - describe('#getSegmentComparisons()', () => { - it('should return the segment comparisons only', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getSegmentComparisons()).toEqual([ - {"params":{"segment":"abcdefg"},"title":"General_Unknown","index":0}, - {"params":{"segment":"comparedsegment"},"title":"General_Unknown","index":1}, - {"params":{"segment":""},"title":"SegmentEditor_DefaultAllVisits","index":2} - ]); - }); - - it('should return nothing if comparison is not enabled', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getSegmentComparisons()).toEqual([]); - }); - }); - - describe('#getPeriodComparisons()', () => { - it('should return the period comparisons only', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getPeriodComparisons()).toEqual([ - { - params: { - date: '2018-01-02', - period: 'day', - }, - title: '2018-01-02', - index: 0, - }, - { - params: { - date: '2018-03-04', - period: 'week', - }, - title: 'General_DateRangeFromTo', - index: 1, - }, - ]); - }); - - it('should return nothing if comparison is not enabled', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getPeriodComparisons()).toEqual([]); - }); - }); - - describe('#getAllComparisonSeries()', () => { - it('should return all individual comparison serieses', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getAllComparisonSeries()).toEqual([ - { - index: 0, - params: { - segment: 'abcdefg', - date: '2018-01-02', - period: 'day', - }, - color: 'comparison-series-color.series0', - }, - { - "index":1, - "params": { - "segment":"comparedsegment", - "date":"2018-01-02", - "period":"day" - }, - color: 'comparison-series-color.series1', - }, - { - "index":2, - "params": { - "segment":"", - "date":"2018-01-02", - "period":"day" - }, - color: 'comparison-series-color.series2', - }, - { - "index":3, - "params": { - "segment":"abcdefg", - "date":"2018-03-04", - "period":"week" - }, - color: 'comparison-series-color.series3', - }, - { - "index":4, - "params": { - "segment":"comparedsegment", - "date":"2018-03-04", - "period":"week" - }, - color: 'comparison-series-color.series4', - }, - { - "index":5, - "params": { - "segment":"", - "date":"2018-03-04", - "period":"week" - }, - color: 'comparison-series-color.series5', - }, - ]); - }); - - it('should return nothing if comparison is not enabled', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getAllComparisonSeries()).toEqual([]); - }); - }); - - describe('#isComparing()', () => { - it('should return true if there are comparison parameters present', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparing()).toBe(true); - }); - - it('should return true if there are segment comparisons but no period comparisons', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparing()).toBe(true); - }); - - it('should return true if there are period comparisons but no segment comparisons', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week'); - - expect(piwikComparisonsService.isComparing()).toBe(true); - }); - - it('should return false if there are no comparison parameters present', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg'); - - expect(piwikComparisonsService.isComparing()).toBe(false); - - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day'); - - expect(piwikComparisonsService.isComparing()).toBe(false); - }); - - it('should return false if comparison is not enabled', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparing()).toBe(false); - }); - }); - - describe('#isComparingPeriods()', () => { - it('should return true if there are periods being compared', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparingPeriods()).toBe(true); - }); - - it('should return false if there are no periods being compared, just segments', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparingPeriods()).toBe(false); - }); - - it('should return false if there is nothing being compared', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg'); - - expect(piwikComparisonsService.isComparingPeriods()).toBe(false); - }); - - it('should return false if comparing is not enabled', async () => { - await setHash('category=MyModule1&subcategory=disabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.isComparingPeriods()).toBe(false); - }); - }); - - describe('#getIndividualComparisonRowIndices()', () => { - it('should calculate the segment/period index from the given series index', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getIndividualComparisonRowIndices(3)).toEqual({ - segmentIndex: 0, - periodIndex: 1, - }); - - expect(piwikComparisonsService.getIndividualComparisonRowIndices(0)).toEqual({ - segmentIndex: 0, - periodIndex: 0, - }); - }); - }); - - describe('#getComparisonSeriesIndex()', () => { - it('should return the comparison series index from the given segment & period indices', async () => { - await setHash('category=MyModule1&subcategory=enabledPage&date=2018-01-02&period=day&segment=abcdefg&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment&compareSegments[]='); - - expect(piwikComparisonsService.getComparisonSeriesIndex(1, 1)).toEqual(4); - - expect(piwikComparisonsService.getComparisonSeriesIndex(0, 1)).toEqual(1); - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts b/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts deleted file mode 100644 index 4d107dea84f3c46d6c97d96a01495cc0d61ed6de..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts +++ /dev/null @@ -1,449 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - reactive, - watch, - computed, - readonly, -} from 'vue'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import Matomo from '../Matomo/Matomo'; -import { translate } from '../translate'; -import Periods from '../Periods/Periods'; -import AjaxHelper from '../AjaxHelper/AjaxHelper'; -import SegmentsStore from '../Segmentation/Segments.store'; - -const SERIES_COLOR_COUNT = 8; -const SERIES_SHADE_COUNT = 3; - -export interface SegmentComparison { - params: { - segment: string, - }, - title: string, - index: number, -} - -export interface PeriodComparison { - params: { - period: string, - date: string, - }, - title: string, - index: number, -} - -export interface AnyComparison { - params: { [name: string]: string }, - title: string, - index: number, -} - -export interface ComparisonsStoreState { - comparisonsDisabledFor: string[]; -} - -export interface ComparisonSeriesInfo { - index: number; - params: { [key: string]: string }; - color: string; -} - -function wrapArray(values: T | T[]): T[] { - if (!values) { - return []; - } - return Array.isArray(values) ? values : [values]; -} - -function normalizeUrlState(value: unknown): unknown { - if (Array.isArray(value)) { - return value.map(normalizeUrlState); - } - - if (value && typeof value === 'object') { - return Object.fromEntries( - Object.entries(value as Record) - .sort(([a], [b]) => a.localeCompare(b)) - .map(([key, nestedValue]) => [key, normalizeUrlState(nestedValue)]), - ); - } - - return value; -} - -export default class ComparisonsStore { - private privateState = reactive({ - comparisonsDisabledFor: [], - }); - - readonly state = readonly(this.privateState); // for tests - - private colors: { [key: string]: string } = {}; - - readonly segmentComparisons = computed(() => this.parseSegmentComparisons()); - - readonly periodComparisons = computed(() => this.parsePeriodComparisons()); - - readonly isEnabled = computed(() => this.checkEnabledForCurrentPage()); - - constructor() { - if (document.readyState === 'complete' - || document.readyState === 'interactive') { - this.loadComparisonsDisabledFor(); - } else { - document.addEventListener('DOMContentLoaded', () => { - this.loadComparisonsDisabledFor(); - }); - } - - $(() => { - this.colors = this.getAllSeriesColors() as { [key: string]: string }; - }); - - watch( - () => this.getUrlStateWithoutPopoverKey(), - () => Matomo.postEvent('piwikComparisonsChanged'), - ); - } - - private getUrlStateWithoutPopoverKey(): string { - const parsedWithoutPopover = Object.fromEntries( - Object.entries(MatomoUrl.parsed.value).filter(([key]) => key !== 'popover'), - ); - - return JSON.stringify(normalizeUrlState(parsedWithoutPopover)); - } - - getComparisons(): AnyComparison[] { - return (this.getSegmentComparisons() as AnyComparison[]) - .concat(this.getPeriodComparisons() as AnyComparison[]); - } - - isComparing(): boolean { - return this.isComparisonEnabled() - // first two in each array are for the currently selected segment/period - && (this.segmentComparisons.value.length > 1 - || this.periodComparisons.value.length > 1); - } - - isComparingPeriods(): boolean { - return this.getPeriodComparisons().length > 1; // first is currently selected period - } - - getSegmentComparisons(): SegmentComparison[] { - if (!this.isComparisonEnabled()) { - return []; - } - - return this.segmentComparisons.value; - } - - getPeriodComparisons(): PeriodComparison[] { - if (!this.isComparisonEnabled()) { - return []; - } - - return this.periodComparisons.value; - } - - getSeriesColor( - segmentComparison: SegmentComparison, - periodComparison: PeriodComparison, - metricIndex = 0, - ): string { - const seriesIndex = this.getComparisonSeriesIndex( - periodComparison.index, - segmentComparison.index, - ) % SERIES_COLOR_COUNT; - - if (metricIndex === 0) { - return this.colors[`series${seriesIndex}`]; - } - - const shadeIndex = metricIndex % SERIES_SHADE_COUNT; - return this.colors[`series${seriesIndex}-shade${shadeIndex}`]; - } - - getSeriesColorName(seriesIndex: number, metricIndex: number): string { - let colorName = `series${(seriesIndex % SERIES_COLOR_COUNT)}`; - if (metricIndex > 0) { - colorName += `-shade${(metricIndex % SERIES_SHADE_COUNT)}`; - } - return colorName; - } - - isComparisonEnabled(): boolean { - return this.isEnabled.value; - } - - getIndividualComparisonRowIndices(seriesIndex: number): { - segmentIndex: number, - periodIndex: number, - } { - const segmentCount = this.getSegmentComparisons().length; - const segmentIndex = seriesIndex % segmentCount; - const periodIndex = Math.floor(seriesIndex / segmentCount); - - return { - segmentIndex, - periodIndex, - }; - } - - getComparisonSeriesIndex(periodIndex: number, segmentIndex: number): number { - const segmentCount = this.getSegmentComparisons().length; - return periodIndex * segmentCount + segmentIndex; - } - - getAllComparisonSeries(): ComparisonSeriesInfo[] { - const seriesInfo: ComparisonSeriesInfo[] = []; - - let seriesIndex = 0; - this.getPeriodComparisons().forEach((periodComp) => { - this.getSegmentComparisons().forEach((segmentComp) => { - seriesInfo.push({ - index: seriesIndex, - params: { ...segmentComp.params, ...periodComp.params }, - color: this.colors[`series${seriesIndex}`], - }); - seriesIndex += 1; - }); - }); - - return seriesInfo; - } - - removeSegmentComparison(index: number): void { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - - const newComparisons: SegmentComparison[] = [...this.segmentComparisons.value]; - newComparisons.splice(index, 1); - - const extraParams: {[key: string]: string} = {}; - if (index === 0) { - extraParams.segment = newComparisons[0].params.segment; - } - - this.updateQueryParamsFromComparisons( - newComparisons, - this.periodComparisons.value, - extraParams, - ); - } - - removeSegmentComparisonByDefinition(segmentDefinition: string): void { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - let segmentIndex = null; - this.getSegmentComparisons().forEach((segment: SegmentComparison, index: number) => { - if (segment && segment.params && segment.params.segment === segmentDefinition) { - segmentIndex = index; - } - }); - if (segmentIndex !== null) { - this.removeSegmentComparison(segmentIndex); - } - } - - addSegmentComparison(params: { [name: string]: string }): void { - if (!this.isComparisonEnabled()) { - throw new Error('Comparison disabled.'); - } - - const newComparisons = this.segmentComparisons.value - .concat([{ params, index: -1, title: '' } as SegmentComparison]); - this.updateQueryParamsFromComparisons(newComparisons, this.periodComparisons.value); - } - - private updateQueryParamsFromComparisons( - segmentComparisons: SegmentComparison[], - periodComparisons: PeriodComparison[], - extraParams = {}, - ) { - // get unique segments/periods/dates from new Comparisons - const compareSegments: {[key: string]: boolean} = {}; - const comparePeriodDatePairs: {[key: string]: boolean} = {}; - - let firstSegment = false; - let firstPeriod = false; - - segmentComparisons.forEach((comparison) => { - if (firstSegment) { - compareSegments[comparison.params.segment] = true; - } else { - firstSegment = true; - } - }); - - periodComparisons.forEach((comparison) => { - if (firstPeriod) { - comparePeriodDatePairs[`${comparison.params.period}|${comparison.params.date}`] = true; - } else { - firstPeriod = true; - } - }); - - const comparePeriods: string[] = []; - const compareDates: string[] = []; - Object.keys(comparePeriodDatePairs).forEach((pair) => { - const parts = pair.split('|'); - comparePeriods.push(parts[0]); - compareDates.push(parts[1]); - }); - - const compareParams: {[key: string]: string[]} = { - compareSegments: Object.keys(compareSegments), - comparePeriods, - compareDates, - }; - - // change the page w/ these new param values - const baseParams = Matomo.helper.isReportingPage() - ? MatomoUrl.hashParsed.value - : MatomoUrl.urlParsed.value; - MatomoUrl.updateLocation({ - ...baseParams, - ...compareParams, - ...extraParams, - }); - } - - private getAllSeriesColors() { - const { ColorManager } = Matomo; - if (!ColorManager) { - return []; - } - - const seriesColorNames = []; - - for (let i = 0; i < SERIES_COLOR_COUNT; i += 1) { - seriesColorNames.push(`series${i}`); - for (let j = 0; j < SERIES_SHADE_COUNT; j += 1) { - seriesColorNames.push(`series${i}-shade${j}`); - } - } - - return ColorManager.getColors('comparison-series-color', seriesColorNames); - } - - private loadComparisonsDisabledFor() { - const matomoModule: string = MatomoUrl.parsed.value.module as string; - - // Skip while installing, updating or logging in - if (matomoModule === 'CoreUpdater' - || matomoModule === 'Installation' - || matomoModule === 'Overlay' - || window.piwik.isPagesComparisonApiDisabled - || window.piwik.installation - || window.broadcast.isLoginPage() - ) { - this.privateState.comparisonsDisabledFor = []; - return; - } - - AjaxHelper.fetch({ - module: 'API', - method: 'API.getPagesComparisonsDisabledFor', - }).then((result) => { - this.privateState.comparisonsDisabledFor = result; - }); - } - - private parseSegmentComparisons(): SegmentComparison[] { - const { availableSegments } = SegmentsStore.state; - - const compareSegments: string[] = [ - ...wrapArray(MatomoUrl.parsed.value.compareSegments as string[]), - ]; - - // add base comparisons - compareSegments.unshift(MatomoUrl.parsed.value.segment as string || ''); - - const newSegmentComparisons: SegmentComparison[] = []; - compareSegments.forEach((segment, idx) => { - let storedSegment!: { definition: string, name: string }; - - availableSegments.forEach((s) => { - if (s.definition === segment - || s.definition === decodeURIComponent(segment) - || decodeURIComponent(s.definition) === segment - ) { - storedSegment = s; - } - }); - - let segmentTitle = storedSegment ? storedSegment.name : translate('General_Unknown'); - if (segment.trim() === '') { - segmentTitle = translate('SegmentEditor_DefaultAllVisits'); - } - - newSegmentComparisons.push({ - params: { - segment, - }, - title: Matomo.helper.htmlDecode(segmentTitle), - index: idx, - }); - }); - - return newSegmentComparisons; - } - - private parsePeriodComparisons(): PeriodComparison[] { - const comparePeriods: string[] = [ - ...wrapArray(MatomoUrl.parsed.value.comparePeriods as string[]), - ]; - - const compareDates: string[] = [ - ...wrapArray(MatomoUrl.parsed.value.compareDates as string[]), - ]; - - comparePeriods.unshift(MatomoUrl.parsed.value.period as string); - compareDates.unshift(MatomoUrl.parsed.value.date as string); - - const newPeriodComparisons: PeriodComparison[] = []; - for (let i = 0; i < Math.min(compareDates.length, comparePeriods.length); i += 1) { - let title; - try { - title = Periods.parse(comparePeriods[i], compareDates[i]).getPrettyString(); - } catch (e) { - title = translate('General_Error'); - } - - newPeriodComparisons.push({ - params: { - date: compareDates[i], - period: comparePeriods[i], - }, - title, - index: i, - }); - } - - return newPeriodComparisons; - } - - private checkEnabledForCurrentPage() { - // category/subcategory is not included on top bar pages, so in that case we use module/action - const category = MatomoUrl.parsed.value.category || MatomoUrl.parsed.value.module; - const subcategory = MatomoUrl.parsed.value.subcategory - || MatomoUrl.parsed.value.action; - - const id = `${category}.${subcategory}`; - const isEnabled = this.privateState.comparisonsDisabledFor.indexOf(id) === -1 - && this.privateState.comparisonsDisabledFor.indexOf(`${category}.*`) === -1; - - document.documentElement.classList.toggle('comparisonsDisabled', !isEnabled); - - return isEnabled; - } -} diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue b/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue deleted file mode 100644 index aa89a1939e5d4183ebbca732284fd9cf939d8300..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue +++ /dev/null @@ -1,274 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue deleted file mode 100644 index 7828aa49219e65853c83c9348dec9b37513aee1b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.ts b/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.ts deleted file mode 100644 index a811cfd865c6ed9021b63b4455d0c1f4e2113941..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.ts +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { nextTick } from 'vue'; - -export default { - mounted(el: HTMLElement): void { - el.classList.add('piwik-content-intro'); - }, - updated(el: HTMLElement): void { - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - nextTick(() => { - el.classList.add('piwik-content-intro'); - }); - }, -}; diff --git a/plugins/CoreHome/vue/src/ContentTable/ContentTable.ts b/plugins/CoreHome/vue/src/ContentTable/ContentTable.ts deleted file mode 100644 index d7d5fc03e292079b3402347019023b6013ba4ed9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ContentTable/ContentTable.ts +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { nextTick, DirectiveBinding } from 'vue'; -import { - registerResponsiveContentTable, - unregisterResponsiveContentTable, -} from './contentTableUtils'; - -interface ContentTableValue { - off?: boolean; // if set to true, does not apply style -} - -export default { - mounted(el: HTMLElement, binding?: DirectiveBinding): void { - if (binding?.value?.off) { - return; - } - - registerResponsiveContentTable(el); - }, - updated(el: HTMLElement, binding?: DirectiveBinding): void { - if (binding?.value?.off) { - unregisterResponsiveContentTable(el); - return; - } - - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - nextTick(() => { - registerResponsiveContentTable(el); - }); - }, - beforeUnmount(el: HTMLElement): void { - unregisterResponsiveContentTable(el); - }, -}; diff --git a/plugins/CoreHome/vue/src/ContentTable/contentTableUtils.ts b/plugins/CoreHome/vue/src/ContentTable/contentTableUtils.ts deleted file mode 100644 index 9b6d1f37efbaed84bc597f3551e0fa3f77b7d8c2..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ContentTable/contentTableUtils.ts +++ /dev/null @@ -1,107 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -type MediaQueryChangeListener = () => void; - -interface ContentTableRegistration { - listener: MediaQueryChangeListener; - mediaQuery: MediaQueryList; -} - -const MOBILE_BREAKPOINT = '(max-width: 767px)'; -const registrations = new WeakMap(); - -function ensureOverflowWrapper(el: HTMLElement): void { - const parent = el.parentElement; - - if (!parent || parent.classList.contains('contentTableWrapper')) { - return; - } - - const wrapper = document.createElement('div'); - wrapper.className = 'contentTableWrapper'; - - parent.insertBefore(wrapper, el); - wrapper.appendChild(el); -} - -function removeOverflowWrapper(el: HTMLElement): void { - const parent = el.parentElement; - - if (!parent || !parent.classList.contains('contentTableWrapper')) { - return; - } - - const wrapperParent = parent.parentElement; - if (!wrapperParent) { - return; - } - - wrapperParent.insertBefore(el, parent); - parent.remove(); -} - -function shouldWrapTable(mediaQuery?: MediaQueryList): boolean { - return (mediaQuery || window.matchMedia(MOBILE_BREAKPOINT)).matches; -} - -function addMediaQueryListener( - mediaQuery: MediaQueryList, - listener: MediaQueryChangeListener, -): void { - mediaQuery.addEventListener('change', listener); -} - -function removeMediaQueryListener( - mediaQuery: MediaQueryList, - listener: MediaQueryChangeListener, -): void { - mediaQuery.removeEventListener('change', listener); -} - -function applyResponsiveContentTable(el: HTMLElement, mediaQuery?: MediaQueryList): void { - el.classList.add('card', 'card-table', 'entityTable'); - - if (shouldWrapTable(mediaQuery)) { - ensureOverflowWrapper(el); - } else { - removeOverflowWrapper(el); - } -} - -export function unregisterResponsiveContentTable(el: HTMLElement): void { - const registration = registrations.get(el); - - if (registration) { - removeMediaQueryListener(registration.mediaQuery, registration.listener); - registrations.delete(el); - } - - removeOverflowWrapper(el); -} - -export function registerResponsiveContentTable(el: HTMLElement): void { - const existingRegistration = registrations.get(el); - if (existingRegistration) { - applyResponsiveContentTable(el, existingRegistration.mediaQuery); - return; - } - - const mediaQuery = window.matchMedia(MOBILE_BREAKPOINT); - const listener = () => { - if (!el.isConnected) { - unregisterResponsiveContentTable(el); - return; - } - - applyResponsiveContentTable(el, mediaQuery); - }; - - addMediaQueryListener(mediaQuery, listener); - registrations.set(el, { mediaQuery, listener }); - applyResponsiveContentTable(el, mediaQuery); -} diff --git a/plugins/CoreHome/vue/src/CookieHelper/CookieHelper.ts b/plugins/CoreHome/vue/src/CookieHelper/CookieHelper.ts deleted file mode 100644 index 6644b7db3ce006099dd38f93339758c40281a0f3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/CookieHelper/CookieHelper.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * General utils for managing cookies in Typescript. - */ - -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -export function setCookie(name: string, val: string, seconds?: number) { - const date = new Date(); - - // set default day to 3 days - if (!seconds) { - // eslint-disable-next-line no-param-reassign - seconds = 3 * 24 * 60 * 1000; - } - // Set it expire in n days - date.setTime(date.getTime() + (seconds)); - - // Set it - document.cookie = `${name}=${val}; expires=${date.toUTCString()}; path=/`; -} - -// eslint-disable-next-line consistent-return,@typescript-eslint/explicit-module-boundary-types -export function getCookie(name: string) { - const value = `; ${document.cookie}`; - const parts = value.split(`; ${name}=`); - - // if cookie not exist return null - // eslint-disable-next-line eqeqeq - if (parts.length == 2) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - const data = parts.pop().split(';').shift(); - if (typeof data !== 'undefined') { - return data; - } - } - return null; -} - -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -export function deleteCookie(name: string) { - const date = new Date(); - - // Set it expire in -1 days - date.setTime(date.getTime() + (-1 * 24 * 60 * 60 * 1000)); - - // Set it - document.cookie = `${name}=; expires=${date.toUTCString()}; path=/`; -} diff --git a/plugins/CoreHome/vue/src/CopyToClipboard/CopyToClipboard.ts b/plugins/CoreHome/vue/src/CopyToClipboard/CopyToClipboard.ts deleted file mode 100644 index a004461760bce24074b9aabe77c8d50dcef3b343..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/CopyToClipboard/CopyToClipboard.ts +++ /dev/null @@ -1,111 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; -import { translate } from '../translate'; - -interface CopyToClipboardArgs { - // state - transitionOpen?: boolean; - - // event handlers - onClickHandler?: (event: MouseEvent) => void; - onTransitionEndHandler?: (event: Event) => void; -} - -function onClickHandler(pre: HTMLElement) { - if (pre) { - const textarea = document.createElement('textarea'); - textarea.value = pre.innerText; - textarea.setAttribute('readonly', ''); - textarea.style.position = 'absolute'; - textarea.style.left = '-9999px'; - document.body.appendChild(textarea); - textarea.select(); - textarea.focus(); - document.execCommand('copy'); - document.body.removeChild(textarea); - const btn = (pre.parentElement as HTMLButtonElement); - if (btn) { - const icon = btn.getElementsByTagName('i')[0]; - if (icon) { - icon.classList.remove('copyToClipboardIcon'); - icon.classList.add('copyToClipboardIconCheck'); - } - const copied = btn.getElementsByClassName('copyToClipboardCopiedDiv')[0]; - if (copied) { - (copied as HTMLDivElement).style.display = 'inline-block'; - setTimeout(() => { - (copied as HTMLDivElement).style.display = 'none'; - }, 2500); - } - } - } -} - -function onTransitionEndHandler(el: HTMLElement, binding: DirectiveBinding) { - if (binding.value.transitionOpen) { - const btn = (el.parentElement as HTMLButtonElement); - if (btn) { - const icon = btn.getElementsByTagName('i')[0]; - if (icon) { - icon.classList.remove('copyToClipboardIconCheck'); - icon.classList.add('copyToClipboardIcon'); - } - } - binding.value.transitionOpen = false; - } else { - binding.value.transitionOpen = true; - } -} - -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - const tagName = el.tagName.toLowerCase(); - if (tagName === 'pre') { - const btn = document.createElement('button'); - btn.setAttribute('type', 'button'); - btn.className = 'copyToClipboardButton'; - - const positionDiv = document.createElement('div'); - positionDiv.className = 'copyToClipboardPositionDiv'; - - const icon = document.createElement('i'); - icon.className = 'copyToClipboardIcon'; - btn.appendChild(icon); - - const sp = document.createElement('span'); - sp.className = 'copyToClipboardSpan'; - sp.innerHTML = translate('General_Copy'); - btn.appendChild(sp); - - positionDiv.appendChild(btn); - - const cdiv = document.createElement('div'); - cdiv.className = 'copyToClipboardCopiedDiv'; - cdiv.innerHTML = translate('General_CopiedToClipboard'); - - positionDiv.appendChild(cdiv); - - const pe = el.parentElement; - if (pe) { - pe.classList.add('copyToClipboardWrapper'); - pe.appendChild(positionDiv); - } - - binding.value.onClickHandler = onClickHandler.bind(null, el); - btn.addEventListener('click', binding.value.onClickHandler); - - binding.value.onTransitionEndHandler = onTransitionEndHandler.bind(null, el, binding); - btn.addEventListener('transitionend', binding.value.onTransitionEndHandler); - } - }, - unmounted(el: HTMLElement, binding: DirectiveBinding): void { - el.removeEventListener('click', binding.value.onClickHandler!); - el.removeEventListener('transitionend', binding.value.onTransitionEndHandler!); - }, -}; diff --git a/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.spec.ts b/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.spec.ts deleted file mode 100644 index f9884e5201473ba7fa7579165f1f8af2cbb13853..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { isBooleanLikeSet, resolveExportSupportsFlat } from './DataTableActions.utils'; - -describe('CoreHome/DataTableActions.utils', () => { - describe('isBooleanLikeSet', () => { - it.each([ - [true, true], - [1, true], - ['1', true], - [false, false], - [0, false], - ['0', false], - ])('returns %s => %s', (value: number|string|boolean, expected: boolean) => { - expect(isBooleanLikeSet(value)).toBe(expected); - }); - }); - - describe('resolveExportSupportsFlat', () => { - it('keeps flat export available when the report supports flattening', () => { - expect(resolveExportSupportsFlat(true, 0)).toBe(true); - }); - - it('keeps flat export available when the table is already flat', () => { - expect(resolveExportSupportsFlat(false, 1)).toBe(true); - }); - - it('disables flat export when neither report nor table state supports it', () => { - expect(resolveExportSupportsFlat(false, 0)).toBe(false); - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.ts b/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.ts deleted file mode 100644 index 52c72bd279db9924dce922c01014d7326f7e6846..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DataTable/DataTableActions.utils.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export function isBooleanLikeSet(value: number|string|boolean): boolean { - return !!value && value !== '0'; -} - -export function resolveExportSupportsFlat( - reportSupportsFlatten: boolean, - flatParam: number|string|boolean, -): boolean { - return reportSupportsFlatten || isBooleanLikeSet(flatParam); -} diff --git a/plugins/CoreHome/vue/src/DataTable/DataTableActions.vue b/plugins/CoreHome/vue/src/DataTable/DataTableActions.vue deleted file mode 100644 index e8182e9cf5281fce34a6c32bec6fa420058ddfb1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DataTable/DataTableActions.vue +++ /dev/null @@ -1,487 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue b/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue deleted file mode 100644 index 3a810db5216e4db89d5f99bdbdc4336adcf50b93..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue +++ /dev/null @@ -1,442 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.less b/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.less deleted file mode 100644 index 99baf166fa26960a362b709c6d4f8b78333e1cfe..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.less +++ /dev/null @@ -1,9 +0,0 @@ -.dateRangePicker { - display: block; -} -.dateRangePicker-label { - margin-left: 10px; -} -.dateRangePicker-field { - font-size: 13px !important; -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.spec.ts b/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.spec.ts deleted file mode 100644 index 308dd4ad038cc2e26d08e91c86455403ed959664..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.spec.ts +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import DateRangePicker from './DateRangePicker.vue'; - -describe('DateRangePicker', () => { - function mountPicker(customProps = {}) { - return mount(DateRangePicker, { - props: { - startDate: '2026-03-11', - endDate: '2026-06-08', - disabled: false, - ...customProps, - }, - global: { - mocks: { - translate: (key: string) => key, - }, - stubs: { - DatePicker: true, - }, - }, - }); - } - - it('does not emit rangeChange when syncing new prop values from the parent', async () => { - const wrapper = mountPicker(); - - expect(wrapper.emitted('rangeChange')).toBeUndefined(); - - await wrapper.setProps({ - startDate: '2026-05-10', - endDate: '2026-06-08', - }); - - expect(wrapper.emitted('rangeChange')).toBeUndefined(); - }); - - it('emits rangeChange for direct user edits', async () => { - const wrapper = mountPicker(); - - (wrapper.vm as unknown as { setStartRangeDateFromStr: (value: string) => void }) - .setStartRangeDateFromStr('2026-05-10'); - - expect(wrapper.emitted('rangeChange')?.[0]?.[0]).toEqual({ - start: '2026-05-10', - end: '2026-06-08', - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue b/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue deleted file mode 100644 index 993c3a501e5645e0677d3226a9d0d350b29e6647..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue +++ /dev/null @@ -1,230 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/DraggableList/DraggableList.less b/plugins/CoreHome/vue/src/DraggableList/DraggableList.less deleted file mode 100644 index ca150ebdd80205d0301db8d8bac5c5efd69148ca..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DraggableList/DraggableList.less +++ /dev/null @@ -1,63 +0,0 @@ -.draggableList { - list-style: none; - margin: 0; - padding: 0; - - .draggableListItem { - display: flex; - align-items: center; - padding: 0.6rem 0.9rem; - border: 1px solid @theme-color-border; - border-radius: 4px; - background: @theme-color-background-tinyContrast; - color: @theme-color-text; - cursor: grab; - margin-bottom: 0.6rem; - user-select: none; - - > :last-child { - flex: 1; - min-width: 0; - } - } - - &.isDragging .draggableListItem { - cursor: grabbing; - } - - &.isDisabled .draggableListItem, - &.isDisabled .drag-icon { - cursor: default; - } - - .draggableListItem.isDragged { - border-style: dashed; - border-color: @theme-color-border; - background: @theme-color-background-base; - - > * { - visibility: hidden; - } - } - - .drag-icon { - padding-right: 15px; - font-size: 13px; - color: @theme-color-text-light; - } -} - -.draggableListPanel { - font-size: 1rem; - margin-top: 1.5rem; - margin-bottom: 2.5rem; - - .draggableListHeading { - margin-bottom: 0.4rem; - } - - .draggableListHelp { - margin-top: 0; - color: @theme-color-text-lighter; - } -} diff --git a/plugins/CoreHome/vue/src/DraggableList/DraggableList.spec.ts b/plugins/CoreHome/vue/src/DraggableList/DraggableList.spec.ts deleted file mode 100644 index 4346bd47c4f3f9175dd03992f4d5fb5b2e45902b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DraggableList/DraggableList.spec.ts +++ /dev/null @@ -1,153 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import { - h, - nextTick, -} from 'vue'; -import { mount } from '@vue/test-utils'; -import DraggableList from './DraggableList.vue'; - -describe('CoreHome/DraggableList', () => { - interface TestItem { - label: string; - } - - function createDataTransfer() { - return { - dropEffect: 'move', - effectAllowed: 'move', - setData: jest.fn(), - }; - } - - function createWrapper(props = {}) { - return mount(DraggableList, { - props: { - items: [ - { id: 'first', label: 'First' }, - { id: 'second', label: 'Second' }, - { id: 'third', label: 'Third' }, - ], - itemKey: 'id', - ...props, - }, - slots: { - default: ({ item }: { item: TestItem }) => [ - h('span', { class: 'dragHandle' }, '::'), - h('span', item.label), - ], - }, - }); - } - - it('should reorder the rendered items while hovering and emit the final ids on drop', async () => { - const wrapper = createWrapper(); - const items = wrapper.findAll('.draggableListItem'); - const dataTransfer = createDataTransfer(); - Object.defineProperty(items[2].element, 'getBoundingClientRect', { - value: () => ({ - top: 0, - bottom: 100, - height: 100, - left: 0, - right: 100, - width: 100, - }), - }); - - await items[0].trigger('dragstart', { dataTransfer }); - await items[2].trigger('dragover', { clientY: 1, dataTransfer }); - - expect(wrapper.findAll('.draggableListItem').map((item) => item.attributes('data-item-id'))).toEqual([ - 'second', - 'first', - 'third', - ]); - - await items[2].trigger('drop', { dataTransfer }); - - expect(wrapper.emitted('reorder')).toEqual([ - [['second', 'first', 'third']], - ]); - }); - - it('should reorder as soon as the dragged item reaches the next item', async () => { - const wrapper = createWrapper(); - const items = wrapper.findAll('.draggableListItem'); - const dataTransfer = createDataTransfer(); - Object.defineProperty(items[1].element, 'getBoundingClientRect', { - value: () => ({ - top: 0, - bottom: 100, - height: 100, - left: 0, - right: 100, - width: 100, - }), - }); - - await items[0].trigger('dragstart', { dataTransfer }); - await items[1].trigger('dragover', { clientY: 11, dataTransfer }); - - expect(wrapper.findAll('.draggableListItem').map((item) => item.attributes('data-item-id'))).toEqual([ - 'second', - 'first', - 'third', - ]); - }); - - it('should keep a visible placeholder while dragging', async () => { - const wrapper = createWrapper(); - const item = wrapper.find('.draggableListItem'); - const dataTransfer = createDataTransfer(); - - await item.trigger('dragstart', { dataTransfer }); - await new Promise((resolve) => { window.setTimeout(resolve, 0); }); - await nextTick(); - - expect(item.classes()).toContain('isDragged'); - }); - - it('should update rendered slot data when items are replaced with the same keys and order', async () => { - const wrapper = createWrapper(); - - await wrapper.setProps({ - items: [ - { id: 'first', label: 'First updated' }, - { id: 'second', label: 'Second updated' }, - { id: 'third', label: 'Third updated' }, - ], - }); - - expect(wrapper.findAll('.draggableListItem').map((item) => item.text())).toEqual([ - '::First updated', - '::Second updated', - '::Third updated', - ]); - }); - - it('should only start dragging from the configured handle', async () => { - const wrapper = createWrapper({ - handle: '.dragHandle', - }); - const item = wrapper.find('.draggableListItem'); - const handle = wrapper.find('.dragHandle'); - const dataTransfer = createDataTransfer(); - - await item.trigger('dragstart', { - dataTransfer, - }); - - expect(dataTransfer.setData).not.toHaveBeenCalled(); - - await handle.trigger('dragstart', { - dataTransfer, - }); - - expect(dataTransfer.setData).toHaveBeenCalledWith('text/plain', 'first'); - }); -}); diff --git a/plugins/CoreHome/vue/src/DraggableList/DraggableList.vue b/plugins/CoreHome/vue/src/DraggableList/DraggableList.vue deleted file mode 100644 index d0fa5c362eae1fc8a22b75ff0ebfa91ecc47b5b6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DraggableList/DraggableList.vue +++ /dev/null @@ -1,246 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts b/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts deleted file mode 100644 index a3f9960c84a544621ad5d37813cb0263d3771f7f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -const { $ } = window; - -export default { - mounted(el: HTMLElement): void { - const element = $(el) as JQuery; - - // BC for materializecss 0.97 => 1.0 - if (!element.attr('data-target') - && element.attr('data-activates') - ) { - element.attr('data-target', element.attr('data-activates')!); - } - - const target = element.attr('data-target'); - if (target && $(`#${target}`).length) { - (element as any).dropdown({ // eslint-disable-line - inDuration: 300, - outDuration: 225, - constrainWidth: false, // Does not change width of dropdown to that of the activator - // hover: true, // Activate on hover - belowOrigin: true, // Displays dropdown below the button - }); - } - }, -}; diff --git a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.less b/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.less deleted file mode 100644 index 6e6d69c852d4d463a454e2e5417ee9d48b1d5504..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.less +++ /dev/null @@ -1,27 +0,0 @@ -.matomo-dropdown-menu { - position: relative; - - &::after { - content: "▼"; - font-size: .7em; - position: absolute; - right: 1em; - top: 50%; - transform: translateY(-50%); - } - - &.submenu::after { - float: right; - content: "►"; - color: @color-black-matomo; - font-size: .6em; - } -} - -.submenu + .dropdown-content { - left: 100%!important; -} - -.submenu-container.dropdown-content { - overflow:visible; // required for submenus to display -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.ts b/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.ts deleted file mode 100644 index 292acb1cbefead3dbbb6538ed61ee5f4fd4d037f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.ts +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding, nextTick } from 'vue'; - -interface DropdownArgs { - activates?: HTMLElement|string, -} - -/** - * A materializecss dropdown menu that supports submenus. - * - * To use a submenu, just use this directive within another dropdown. - * - * Note: if submenus are used, then dropdowns will never scroll. - * - * Usage: - * Menu - * - */ -export default { - mounted(element: HTMLElement, binding: DirectiveBinding): void { - let options = {}; - - $(element).addClass('matomo-dropdown-menu'); - - const isSubmenu = !!$(element).parent().closest('.dropdown-content').length; - if (isSubmenu) { - options = { hover: true }; - $(element).addClass('submenu'); - $(binding.value?.activates || $(element).data('target')) - .addClass('submenu-dropdown-content'); - - // if a submenu is used, the dropdown will never scroll - $(element).parents('.dropdown-content').addClass('submenu-container'); - } - - $(element).dropdown(options); - }, - updated(element: HTMLElement): void { - // classes can be overwritten when elements bind to :class, nextTick + using - // updated avoids this problem (and doing in both mounted and updated avoids a temporary - // state where the classes aren't added) - nextTick(() => { - $(element).addClass('matomo-dropdown-menu'); - }); - }, -}; diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less deleted file mode 100644 index bff6c1b924e4ce9925d3c37643529f7d3a37d70a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less +++ /dev/null @@ -1,66 +0,0 @@ -.inlineHelp { - display: none; -} - -.enrichedHeadline { - min-height: 22px; - - a.title { - cursor: pointer; - } - - .title { - display: inline-block; - } - - .inlineHelp { - display: block; - background: @theme-color-background-base; - font-size: 12px; - line-height: 1.1; - font-weight: normal; - border: 1px solid @theme-color-border-alternative; - margin: 10px 0 10px 0; - padding: 10px; - border-radius: 2px; - - .readMore { - margin-top: 10px; - display: inline-block; - font-weight: bold; - } - } - - .iconsBar { - line-height: 1 !important; - } - - .ratingIcons { - display: inline-block; - vertical-align: middle; - margin-left: 6px; - - img { - filter: @theme-filter-on-illustration; - } - } - - .helpIcon { - cursor: pointer; - display: inline-block; - margin-bottom: -1px; - margin-left: 8px; - opacity: 0.4; - font-size: 16px; - color: @theme-color-text-light !important; - text-decoration: none; - - &:hover, &.active { - color: @theme-color-link !important; - opacity: 0.9; - text-decoration: none; - } - } -} - - diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue deleted file mode 100644 index 952d0694ad712ebe1ec0af1f0a7cfbd54e1a8445..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.less b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.less deleted file mode 100644 index 50147c2896c401c0865a376c5aa6dbd10d17de69..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.less +++ /dev/null @@ -1,4 +0,0 @@ -.entity-duplicator-action.table-action.is-disabled { - color: @color-silver !important; - cursor: not-allowed; -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue deleted file mode 100644 index 97f3de4e8eff94f3f953ee90e38179c1c2985b99..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAction.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - - diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAdapter.ts b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAdapter.ts deleted file mode 100644 index 768f5e5b8310c5920934925042cd97d06b71fe70..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorAdapter.ts +++ /dev/null @@ -1,166 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import Matomo from '../Matomo/Matomo'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import { translate } from '../translate'; -import AjaxHelper from '../AjaxHelper/AjaxHelper'; -import { NotificationsStore } from '../Notification'; - -export interface DuplicateRequestResponse { - success: boolean; - message?: string; - additionalData?: Record; -} - -export interface ValidationResult { - isValid: boolean; - errorMessages: string[]; -} - -export interface EntityDuplicatorAdapterProperties { - module?: string; - method: string; - format?: string; - requiredFields?: string[]; -} - -export interface EntityDuplicatorAdapter { - /** - * Validates the form fields before submission. Optionally return promise in case API request is - * needed for validation. - */ - validateFormFields( - formValues: Record, - ): ValidationResult | Promise; - - /** - * Prepares the API parameters for the duplication request. Optionally return promise in case API - * request is needed for to prepare all parameters. - */ - prepareApiParams(formValues: Record): QueryParameters | Promise; - - /** - * Submits the duplication request to the server and returns a promise for the modal to wait for - */ - submitRequest(params: QueryParameters): Promise; - - /** - * Optional: Called after successful duplication - */ - onSuccess?(response: DuplicateRequestResponse): void; - - /** - * Optional: Called after failed duplication - */ - onFailure?(error: DuplicateRequestResponse | Error): void; - - /** - * Optional: Called before showing the modal and can be used to show the modal as loading if - * there are any async operations needed to finish presenting the modal. - */ - beforeShowModal?(): void | Promise; -} - -export class BaseDuplicatorAdapter implements EntityDuplicatorAdapter { - module: string; - - method: string; - - format: string; - - requiredFields: string[]; - - constructor(properties: EntityDuplicatorAdapterProperties) { - this.module = properties.module || 'API'; - this.method = properties.method; - this.format = properties.format || 'json'; - this.requiredFields = properties.requiredFields || ['idSite', 'idDestinationSites']; - } - - async validateFormFields( - formValues: Record, - ): Promise { - const errorMessages: string[] = []; - - this.requiredFields.forEach((fieldName) => { - if (!(fieldName in formValues) || !formValues[fieldName]) { - errorMessages.push(translate('General_Required', fieldName)); - } - }); - - return new Promise((resolve) => resolve({ - errorMessages, - isValid: errorMessages.length === 0, - } as ValidationResult)); - } - - prepareApiParams(formValues: Record): QueryParameters { - return { - idSite: Matomo.idSite || MatomoUrl.parsed.value.idSite, - idDestinationSites: [formValues.idDestinationSite as number|string], - ...formValues, - }; - } - - async submitRequest(params: QueryParameters): Promise { - // Override the defaults if provided in the params and then remove them from the params - this.module = params.module || this.module; - this.method = params.method || this.method; - this.format = params.format || this.format; - const postParams = params as Omit; - - if (!this.method || this.method.length < 1) { - throw new Error('The POST method cannot be empty!'); - } - - const ajax = new AjaxHelper(); - // Force callback but leave it empty so that API errors are only displayed in the modal - ajax.useCallbackInCaseOfError(); - ajax.setErrorCallback(null); - // Remove some default parameters as they aren't applicable to copying existing reports - ajax.removeDefaultParameter('date'); - ajax.removeDefaultParameter('period'); - ajax.removeDefaultParameter('segment'); - // Set the main params as part of the URL - ajax.addParams({ - module: this.module, - method: this.method, - format: this.format, - }, 'GET'); - ajax.addParams(postParams, 'POST'); - ajax.setFormat(this.format); - return ajax.send(); - } - - /** - * Optional: Called during onSuccess method if both are defined. This allows using the default - * success method while also defining some custom actions such as reloading a store - */ - onSuccessCallback?(response: DuplicateRequestResponse): Promise; - - onSuccess(response: DuplicateRequestResponse): void { - // In case a promise wasn't returned, wrap the result with a promise for consistent processing - let onSuccessCallbackPromise = new Promise((resolve) => resolve()) as Promise; - if (this.onSuccessCallback) { - onSuccessCallbackPromise = this.onSuccessCallback(response); - } - - onSuccessCallbackPromise.then(() => { - // Show the success message returned by the API - setTimeout(() => { - const notificationInstanceId = NotificationsStore.show({ - message: response.message as string, - context: response.success ? 'success' : 'error', - type: 'toast', - id: 'entityDuplicationResult', - }); - NotificationsStore.scrollToNotification(notificationInstanceId); - }); - }); - } -} diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.less b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.less deleted file mode 100644 index 57ce1d687cf8edb3e1d30fa8af93563cd27d0324..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.less +++ /dev/null @@ -1,127 +0,0 @@ -.modal.entity-duplicator-modal.slot-configured { - display: flex !important; - - .main-duplicator-modal-content { - flex: 1; /* Fill parent height */ - display: flex; - flex-direction: column; - } - - .modal-header, - .modal-sub-header, - .modal-footer, - .modal-sub-footer { - padding: 24px; - } - - div.siteSelector div.dropdown div.custom_select_container { - max-height: 250px; - overflow-y: auto; - } -} - -.modal.entity-duplicator-modal:not(.slot-configured) { - overflow-y: visible; - - .modal-content { - display: none; - } -} - -.modal.entity-duplicator-modal { - max-width: 700px; - max-height: 90%; - - .modal-header, - .modal-sub-header, - .modal-footer, - .modal-sub-footer { - padding: 24px; - } - - .loading-message { - color: @color-silver-l40; - padding-left: 0.75rem; - } - - .modal-header { - h2 { - padding: 0; - margin-top: -10px; - } - } - - .modal-sub-header { - padding-top: 0; - padding-bottom: 12px; - margin-bottom: 0; - - p { - padding: 0; - } - - .col { - margin-bottom: 0; - } - } - - .modal-sub-header, .modal-sub-footer { - .form-group, .col .row { - margin: 0; - } - } - - .modal-content { - flex: 1; - overflow-y: auto; - min-height: 120px; - - .form-group { - margin-top: 10px; - margin-bottom: 0; - - div.checkbox { - margin-bottom: 10px; - } - - textarea.materialize-textarea { - padding-bottom: 0; - margin-bottom: 0; - } - } - - .modal-inputs { - margin-left: 0.75rem; - } - } - - .modal-footer { - min-height: 90px; - width: auto; - - .matomo-loader { - margin-right: 1rem; - } - } - - .modal-sub-footer { - padding-bottom: 0; - - .alert.error-list { - padding-left: 80px; - - ul li { - list-style-type: circle; - } - } - - .alert.error-list:before { - top: 35%; - margin-top: 0; - } - - p { - padding: 0; - } - } -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue deleted file mode 100644 index 904fa8926eb331bbf29446d63da5b40af77f5f54..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorModal.vue +++ /dev/null @@ -1,320 +0,0 @@ - - - - diff --git a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorStore.ts b/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorStore.ts deleted file mode 100644 index 537c1742ffcbee2f00fe3b2128bb54c30957f76d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/EntityDuplicator/EntityDuplicatorStore.ts +++ /dev/null @@ -1,154 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { reactive } from 'vue'; -import { translateOrDefault } from '../translate'; -import Matomo from '../Matomo/Matomo'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import { - BaseDuplicatorAdapter, - EntityDuplicatorAdapter, - EntityDuplicatorAdapterProperties, -} from './EntityDuplicatorAdapter'; - -interface EntityDuplicatorState { - /** - * Whether the modal is currently visible - */ - isModalVisible: boolean - /** - * Form data that needs to be included in the request sent to the server but won't change between - * requests. This could be a parent ID (e.g. ID of the container when duplicating MTM tags). - */ - commonFormData?: Record; - /** - * Additional form data that needs to be included in the request sent to the server. This should - * typically include the unique identifier of the entity being copied (e.g. idGoal for a goal). - */ - entityFormData: Record; - /** - * Translation of what is being copied (e.g. goal, funnel, segment, ...). This can be a string - * or translation key. If nothing is provided 'report' is used. - */ - entityTypeTranslation: string; -} - -export class EntityDuplicatorStore { - state: EntityDuplicatorState = reactive({ - isModalVisible: false, - commonFormData: {}, - entityFormData: {}, - entityTypeTranslation: '', - }); - - /** - * The adapter class defines the implementation/behaviour of common part of the duplication - * process such as validation, gathering parameters, posting to the API, and handling success. - */ - adapter: EntityDuplicatorAdapter; - - /** - * Protected so that the buildStoreInstance has to be used. This ensures that the modal store is - * instantiated as a reactive object. See buildStoreInstance for more documentation. - * - * @param duplicateEntityTypeTranslation - * @param adapterDefinition - * @param commonFormData - * @protected - */ - protected constructor( - duplicateEntityTypeTranslation: string, - adapterDefinition: EntityDuplicatorAdapter | EntityDuplicatorAdapterProperties, - commonFormData?: Record, - ) { - this.state.entityTypeTranslation = duplicateEntityTypeTranslation; - this.adapter = 'validateFormFields' in adapterDefinition ? adapterDefinition - : new BaseDuplicatorAdapter(adapterDefinition as EntityDuplicatorAdapterProperties); - this.state.commonFormData = commonFormData ?? {}; - } - - /** - * Returns a reactive store object for the specific type of entity being copied so that it can be - * used to maintain the state of the modal across all the actions which trigger showing the modal. - * See the property descriptions of the EntityDuplicatorState interface for more information. - * - * @param duplicateEntityTypeTranslation Translation string or translated string of the item being - * duplicated. E.g. goal, funnel, heatmap,... - * @param adapterDefinition Either an instance of EntityDuplicatorAdapter or an object containing - * the properties necessary to instantiate an instance of the default BaseDuplicatorAdapter. This - * allows encapsulating the desired implementation of how the modal behaves such as validation - * and posting the API request. - * @param commonFormData Optional form data that's common to the type of entity being duplicated. - * E.g. status to set for the new copies or something similar. - */ - static buildStoreInstance( - duplicateEntityTypeTranslation: string, - adapterDefinition: EntityDuplicatorAdapter | EntityDuplicatorAdapterProperties, - commonFormData?: Record, - ): EntityDuplicatorStore { - return reactive(new EntityDuplicatorStore( - duplicateEntityTypeTranslation, - adapterDefinition, - commonFormData, - )); - } - - showModal(entityFormData?: Record): void { - // Make sure that we start fresh - this.resetFormData(); - - // Update the store with any provided form data - Object.entries(entityFormData ?? {}).forEach(([key, value]) => { - this.state.entityFormData[key] = value; - }); - - this.state.isModalVisible = true; - } - - hideModal(): void { - this.state.isModalVisible = false; - this.resetFormData(); - } - - resetFormData(): void { - // Remove all properties (preserves the original object reference) - Object.keys(this.state.entityFormData).forEach((key) => { - delete this.state.entityFormData[key]; - }); - } - - getFormValues(idDestinationSites?: number|string|[]): Record { - const idDestinationSitesArray = Array.isArray(idDestinationSites) - ? idDestinationSites : [] as number[]; - if (idDestinationSites && !Array.isArray(idDestinationSites)) { - idDestinationSitesArray.push(idDestinationSites as number); - } - return { - idSite: Matomo.idSite || MatomoUrl.parsed.value.idSite, - idDestinationSites: idDestinationSitesArray, - ...this.state.commonFormData, - ...this.state.entityFormData, - } as Record; - } - - /** - * Uses the entityTypeTranslation property to return the translated entity type (e.g. - * goal, funnel, segment, ...), which can be a translated string or translation key. If the value - * is a translation key, the translated value will be returned. If no value is set, the default is - * the translation of 'report'. - */ - get getEntityTypeTranslation(): string { - // Default to 'report' if no value is provided via entityTypeTranslation - let translationKey = 'CoreHome_ReportLowercase'; - if (this.state.entityTypeTranslation) { - translationKey = this.state.entityTypeTranslation; - } - - // Only translate if it's a translation key and not an already translated string - return translateOrDefault(translationKey); - } -} diff --git a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts deleted file mode 100644 index 9b705efbe1cf70b68d1cd9b60d52c28a56b21a8a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts +++ /dev/null @@ -1,153 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; -import Matomo from '../Matomo/Matomo'; -import DirectiveUtilities from '../directiveUtilities'; - -interface ExpandOnClickArgs { - // input (specified by user) - expander: string | HTMLElement, - onClosed?: (event: MouseEvent|KeyboardEvent) => void; - onExpand?: (event: MouseEvent|KeyboardEvent) => void; - - // state - isMouseDown?: boolean; - hasScrolled?: boolean; - - // internal event handlers - onClickOnExpander?: (event: MouseEvent|KeyboardEvent) => void; - onClickOutsideElement?: (event: MouseEvent) => void; - onScroll?: () => void; - onMouseDown?: () => void; - onEscapeHandler?: (event: KeyboardEvent) => void; -} - -function expand( - element: HTMLElement, - binding: DirectiveBinding, - event: MouseEvent|KeyboardEvent, -) { - element.classList.add('expanded'); - if (binding.value?.onExpand) { - binding.value.onExpand(event); - } - - const positionElement = element.querySelector('.dropdown.positionInViewport'); - if (positionElement) { - Matomo.helper.setMarginLeftToBeInViewport(positionElement); - } -} - -function close( - element: HTMLElement, - binding: DirectiveBinding, - event: MouseEvent|KeyboardEvent, -) { - if (!element.classList.contains('expanded')) { - return; - } - element.classList.remove('expanded'); - - if (binding.value?.onClosed) { - binding.value.onClosed(event); - } -} - -function onClickOnExpander( - element: HTMLElement, - binding: DirectiveBinding, - event: MouseEvent|KeyboardEvent, -) { - if (element.classList.contains('expanded')) { - close(element, binding, event); - } else { - expand(element, binding, event); - } -} - -function onClickOutsideElement( - element: HTMLElement, - binding: DirectiveBinding, - event: MouseEvent, -) { - const hadUsedScrollbar = binding.value.isMouseDown && binding.value.hasScrolled; - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - - if (hadUsedScrollbar) { - return; - } - - if (!element.contains(event.target as HTMLElement)) { - close(element, binding, event); - } -} - -function onScroll(binding: DirectiveBinding) { - binding.value.hasScrolled = true; -} - -function onMouseDown(binding: DirectiveBinding) { - binding.value.isMouseDown = true; - binding.value.hasScrolled = false; -} - -function onEscapeHandler( - element: HTMLElement, - binding: DirectiveBinding, - event: KeyboardEvent, -) { - if (event.key === 'Escape') { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - close(element, binding, event); - } -} - -const doc = document.documentElement; - -/** - * Usage (in a component): - * - * directives: { - * ExpandOnClick: ExpandOnClick(), // function call is important since we store state - * // in this directive - * } - */ -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - binding.value.onClickOnExpander = onClickOnExpander.bind(null, el, binding); - binding.value.onEscapeHandler = onEscapeHandler.bind(null, el, binding); - binding.value.onMouseDown = onMouseDown.bind(null, binding); - binding.value.onClickOutsideElement = onClickOutsideElement.bind(null, el, binding); - binding.value.onScroll = onScroll.bind(null, binding); - - setTimeout(() => { - const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.addEventListener('click', binding.value.onClickOnExpander!); - } - }); - doc.addEventListener('keyup', binding.value.onEscapeHandler); - doc.addEventListener('mousedown', binding.value.onMouseDown); - doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - doc.addEventListener('scroll', binding.value.onScroll); - }, - unmounted(el: HTMLElement, binding: DirectiveBinding): void { - const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - doc.removeEventListener('click', binding.value.onClickOnExpander!); - } - doc.removeEventListener('keyup', binding.value.onEscapeHandler!); - doc.removeEventListener('mousedown', binding.value.onMouseDown!); - doc.removeEventListener('mouseup', binding.value.onClickOutsideElement!); - doc.removeEventListener('scroll', binding.value.onScroll!); - }, -}; diff --git a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts deleted file mode 100644 index 543a8860afc68bc97f83e2c8ed94487863807690..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts +++ /dev/null @@ -1,85 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; -import Matomo from '../Matomo/Matomo'; -import DirectiveUtilities from '../directiveUtilities'; - -interface ExpandOnHoverArgs { - // input (provided by user) - expander: string | HTMLElement, - - // event handlers - onMouseEnter?: () => void; - onMouseLeave?: () => void; - onClickOutsideElement?: (event: MouseEvent) => void; - onEscapeHandler?: (event: KeyboardEvent) => void; -} - -function onMouseEnter(element: HTMLElement) { - element.classList.add('expanded'); - - const positionElement = element.querySelector('.dropdown.positionInViewport'); - if (positionElement) { - Matomo.helper.setMarginLeftToBeInViewport(positionElement); - } -} - -function onMouseLeave(element: HTMLElement) { - element.classList.remove('expanded'); -} - -function onClickOutsideElement(element: HTMLElement, event: MouseEvent) { - if (!element.contains(event.target as HTMLElement)) { - element.classList.remove('expanded'); - } -} - -function onEscapeHandler(element: HTMLElement, event: KeyboardEvent) { - if (event.which === 27) { - element.classList.remove('expanded'); - } -} - -const doc = document.documentElement; - -/** - * Usage (in a component): - * - * directives: { - * ExpandOnHover: ExpandOnHover(), // function call is important since we store state - * // in this directive - * } - */ -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - binding.value.onMouseEnter = onMouseEnter.bind(null, el); - binding.value.onMouseLeave = onMouseLeave.bind(null, el); - binding.value.onClickOutsideElement = onClickOutsideElement.bind(null, el); - binding.value.onEscapeHandler = onEscapeHandler.bind(null, el); - - setTimeout(() => { - const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.addEventListener('mouseenter', binding.value.onMouseEnter!); - } - }); - - el.addEventListener('mouseleave', binding.value.onMouseLeave); - doc.addEventListener('keyup', binding.value.onEscapeHandler); - doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - }, - unmounted(el: HTMLElement, binding: DirectiveBinding): void { - const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - if (expander) { - expander.removeEventListener('mouseenter', binding.value.onMouseEnter!); - } - el.removeEventListener('mouseleave', binding.value.onMouseLeave!); - document.removeEventListener('keyup', binding.value.onEscapeHandler!); - document.removeEventListener('mouseup', binding.value.onClickOutsideElement!); - }, -}; diff --git a/plugins/CoreHome/vue/src/FieldArray/FieldArray.less b/plugins/CoreHome/vue/src/FieldArray/FieldArray.less deleted file mode 100644 index 29f63392d7fc166a15c12004878c89d92e776b60..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/FieldArray/FieldArray.less +++ /dev/null @@ -1,17 +0,0 @@ -.fieldArray { - margin-top: 40px !important; - - .form-group.row { - margin-top: 2px; - margin-bottom: 2px; - } - - .fieldUiControl { - width: ~"calc(100% - 60px)"; - padding-right: 0.75rem; - } - - .icon-minus { - cursor: pointer; - } -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue b/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue deleted file mode 100644 index 9ec15133dfbd311a39d3a3205e383dc9aa041e95..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts deleted file mode 100644 index 597d5da27f1b7dc54ba742347017264aa7dcf2a2..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts +++ /dev/null @@ -1,100 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; - -interface FocusAnywhereButHereArgs { - // input (provided by user) - blur: () => void, - - // state/event handlers - isMouseDown?: boolean; - hasScrolled?: boolean; - onEscapeHandler?: (event: KeyboardEvent) => void; - onMouseDown?: () => void; - onClickOutsideElement?: (event: MouseEvent) => void; - onScroll?: () => void; -} - -function onClickOutsideElement( - element: HTMLElement, - binding: DirectiveBinding, - event: MouseEvent, -) { - const hadUsedScrollbar = binding.value.isMouseDown && binding.value.hasScrolled; - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - - if (hadUsedScrollbar) { - return; - } - - if (!element.contains(event.target as HTMLElement)) { - if (binding.value) { - binding.value.blur(); - } - } -} - -function onScroll(element: HTMLElement, binding: DirectiveBinding) { - binding.value.hasScrolled = true; -} - -function onMouseDown(element: HTMLElement, binding: DirectiveBinding) { - binding.value.isMouseDown = true; - binding.value.hasScrolled = false; -} - -function onEscapeHandler( - element: HTMLElement, - binding: DirectiveBinding, - event: KeyboardEvent, -) { - if (event.which === 27) { - setTimeout(() => { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - if (binding.value.blur) { - binding.value.blur(); - } - }, 0); - } -} - -const doc = document.documentElement; - -/** - * Usage (in a component): - * - * directives: { - * // function call is important since we store state in this directive - * FocusAnywhereButHere: FocusAnywhereButHere(), - * } - * - * Note: the binding data needs to be static, changes will not be handled. - */ -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - binding.value.isMouseDown = false; - binding.value.hasScrolled = false; - binding.value.onEscapeHandler = onEscapeHandler.bind(null, el, binding); - binding.value.onMouseDown = onMouseDown.bind(null, el, binding); - binding.value.onClickOutsideElement = onClickOutsideElement.bind(null, el, binding); - binding.value.onScroll = onScroll.bind(null, el, binding); - - doc.addEventListener('keyup', binding.value.onEscapeHandler); - doc.addEventListener('mousedown', binding.value.onMouseDown); - doc.addEventListener('mouseup', binding.value.onClickOutsideElement); - doc.addEventListener('scroll', binding.value.onScroll); - }, - unmounted(el: HTMLElement, binding: DirectiveBinding): void { - doc.removeEventListener('keyup', binding.value.onEscapeHandler!); - doc.removeEventListener('mousedown', binding.value.onMouseDown!); - doc.removeEventListener('mouseup', binding.value.onClickOutsideElement!); - doc.removeEventListener('scroll', binding.value.onScroll!); - }, -}; diff --git a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts b/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts deleted file mode 100644 index 644aef42660b92ffef4dec62c1d28d11cc6ee35a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; - -interface FocusIfArgs { - // input (provided by user) - focused?: boolean; - afterFocus?: () => void; -} - -function doFocusIf(el: HTMLElement, binding: DirectiveBinding): void { - if (binding.value?.focused && !binding.oldValue?.focused) { - setTimeout(() => { - el.focus(); - - if (binding.value.afterFocus) { - binding.value.afterFocus(); - } - }, 5); - } -} - -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - doFocusIf(el, binding); - }, - updated(el: HTMLElement, binding: DirectiveBinding): void { - doFocusIf(el, binding); - }, -}; diff --git a/plugins/CoreHome/vue/src/Matomo/Matomo.ts b/plugins/CoreHome/vue/src/Matomo/Matomo.ts deleted file mode 100644 index 9d9fccadd6c614458723d6d532e9bc1409049da9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Matomo/Matomo.ts +++ /dev/null @@ -1,182 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import Periods from '../Periods/Periods'; -import { translate } from '../translate'; - -const { piwik, broadcast, piwikHelper } = window; - -function normalizeLoginModule(value: unknown): string|undefined { - if (typeof value !== 'string') { - return undefined; - } - - const trimmed = value.trim(); - if (!trimmed) { - return undefined; - } - - if (!/^[A-Za-z0-9_]+$/.test(trimmed)) { - return undefined; - } - - return trimmed; -} - -type ComparisonsStoreLike = { - getSegmentComparisons: () => Array<{params: { segment: string }, title: string, index: number}>; -}; - -type ReportingMenuStoreLike = { - findSubcategory: (categoryId: string, subcategoryId: string) => { - category?: { name?: string }; - subcategory?: { name?: string }; - }; - fetchMenuItems: () => Promise; -}; - -type MatomoWindow = Window & { - CoreHome?: { - ComparisonStoreInstance?: ComparisonsStoreLike, - ReportingMenuStore?: ReportingMenuStoreLike, - } -} - -piwik.helper = piwikHelper; -piwik.broadcast = broadcast; - -function getReportingMenuStore(): ReportingMenuStoreLike|undefined { - const { CoreHome } = window as MatomoWindow; - return CoreHome?.ReportingMenuStore; -} - -function getComparisonsStore(): ComparisonsStoreLike|undefined { - const { CoreHome } = window as MatomoWindow; - return CoreHome?.ComparisonStoreInstance; -} - -function getActiveSegmentLabel(segment?: string): string|undefined { - if (typeof segment !== 'string') { - return undefined; - } - - const trimmedSegment = segment.trim(); - const comparisonsStore = getComparisonsStore(); - - if (comparisonsStore) { - const comparisons = comparisonsStore.getSegmentComparisons(); - if (!trimmedSegment && comparisons.length) { - return comparisons[0].title; - } - - const found = comparisons.find( - (comparison) => comparison.params.segment === segment, - ); - if (found) { - return found.title; - } - } - - if (!trimmedSegment) { - return translate('SegmentEditor_DefaultAllVisits'); - } - - const segmentationTitle = document.querySelector('.segmentEditorPanel .segmentationTitle'); - const fallbackName = segmentationTitle?.textContent?.trim(); - if (fallbackName) { - return fallbackName; - } - - return translate('SegmentEditor_CustomSegment'); -} - -piwik.updateTitle = async function updateTitle( - date: string, - period: string, - category: string, - subcategory: string, - segment?: string, -) { - let categoryName = ''; - let subcategoryName = ''; - let dateString = ''; - if (period !== '' && date !== '') { - dateString = Periods.parse(period, date).getPrettyString(); - } - const titleSuffix = `${translate('CoreHome_WebAnalyticsReports')} - Matomo`; - const store = getReportingMenuStore(); - if (store && category && subcategory) { - let found = store.findSubcategory(category, subcategory); - if (!found.category) { - await store.fetchMenuItems(); - found = store.findSubcategory(category, subcategory); - } - categoryName = found?.category?.name ?? ''; - subcategoryName = found?.subcategory?.name ?? ''; - if (categoryName === subcategoryName) { - subcategoryName = ''; - } - categoryName = piwikHelper.htmlEntities(categoryName); - subcategoryName = piwikHelper.htmlEntities(subcategoryName); - - // Try to get the correct title by combining the category and subcategory names - const categorySubcategoryString = categoryName - ? `${categoryName} ${subcategoryName ? `> ${subcategoryName}` : ''}` : ''; - const segmentLabel = getActiveSegmentLabel(segment); - const segmentString = segmentLabel ? piwikHelper.htmlEntities(segmentLabel) : ''; - document.title = [piwik.siteName, dateString, categorySubcategoryString, - segmentString, titleSuffix].filter(Boolean).join(' - '); - } -}; - -piwik.hasUserCapability = function hasUserCapability(capability: string) { - return Array.isArray(piwik.userCapabilities) - && piwik.userCapabilities.indexOf(capability) !== -1; -}; - -piwik.on = function addMatomoEventListener(eventName: string, listener: WrappedEventListener) { - function listenerWrapper(evt: Event) { - listener(...(evt as CustomEvent).detail); // eslint-disable-line - } - - listener.wrapper = listenerWrapper; - - window.addEventListener(eventName, listenerWrapper); -}; - -piwik.off = function removeMatomoEventListener(eventName: string, listener: WrappedEventListener) { - if (listener.wrapper) { - window.removeEventListener(eventName, listener.wrapper); - } -}; - -piwik.postEvent = function postMatomoEvent( - eventName: string, - ...args: any[] // eslint-disable-line -): void { - const event = new CustomEvent(eventName, { detail: args }); - window.dispatchEvent(event); -}; - -piwik.getLoginModule = function getLoginModule(): string { - const fromPiwikConfig = normalizeLoginModule((piwik as { loginModule?: unknown }).loginModule); - if (fromPiwikConfig) { - return fromPiwikConfig; - } - - const fromWindow = normalizeLoginModule( - (window as Window & { loginModule?: unknown }).loginModule, - ); - if (fromWindow) { - return fromWindow; - } - - return 'Login'; -}; - -const Matomo = piwik; -export default Matomo; diff --git a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue deleted file mode 100644 index a20c16439d5eea78a96dbbb23c9d84d0478eb0d3..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/plugins/CoreHome/vue/src/MatomoHelper/MatomoHelper.spec.ts b/plugins/CoreHome/vue/src/MatomoHelper/MatomoHelper.spec.ts deleted file mode 100644 index 161c5e2b81ed729e0448bd8994051a36d1464aaf..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoHelper/MatomoHelper.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import '../../../../Morpheus/javascripts/piwikHelper'; - -describe('CoreHome/piwikHelper', () => { - describe('#htmlDecode', () => { - - it('should correctly decode html entities', function (done) { - let called = false; - (window as any)._testfunction = () => { - called = true; - }; - - const encoded = 'str '; - const decoded = window.piwikHelper.htmlDecode(encoded); - - setTimeout(() => { - expect(called).toBe(false); - expect(decoded).toEqual('str '); - done(); - }, 500); - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue b/plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue deleted file mode 100644 index cf972d3d8629e58b38c31251256d44983e674317..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoLoader/MatomoLoader.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.spec.ts b/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.spec.ts deleted file mode 100644 index eaba81bfa6b0889a32745727580b6dff489bb4cd..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import { nextTick } from 'vue'; -import MatomoModal from './MatomoModal.vue'; - -const activeWrappers: Array<{ unmount: () => void }> = []; - -function mountModal(extraProps: Record = {}, slots: Record = {}) { - const wrapper = mount(MatomoModal, { - attachTo: document.body, - props: { - modelValue: false, - ...extraProps, - }, - slots: { - default: '

modal body

', - ...slots, - }, - }); - - activeWrappers.push(wrapper); - return wrapper; -} - -function getModal(): HTMLElement { - return document.body.querySelector('.modal') as HTMLElement; -} - -function getOverlay(): HTMLElement | null { - return document.body.querySelector('.modal-overlay'); -} - -async function settle() { - await nextTick(); - await nextTick(); -} - -describe('CoreHome/MatomoModal', () => { - beforeEach(() => { - document.body.style.overflow = ''; - }); - - afterEach(() => { - while (activeWrappers.length) { - activeWrappers.pop()!.unmount(); - } - document.body.innerHTML = ''; - }); - - it('renders its content and optional footer with modal classes and attributes', () => { - mountModal({ - ariaLabel: 'My Modal', - classes: ['custom-modal', { secondary: true }], - contentClass: 'custom-content', - }, { - footer: '', - }); - - const modal = getModal(); - - expect(modal.querySelector('.modal-content .body-text')?.textContent).toBe('modal body'); - expect(modal.querySelector('.modal-footer .footer-btn')?.textContent).toBe('OK'); - expect(modal.classList.contains('open')).toBe(false); - expect(modal.getAttribute('role')).toBe('dialog'); - expect(modal.getAttribute('aria-modal')).toBe('true'); - expect(modal.getAttribute('aria-label')).toBe('My Modal'); - expect(modal.classList.contains('custom-modal')).toBe(true); - expect(modal.classList.contains('secondary')).toBe(true); - expect(modal.querySelector('.modal-content')?.classList.contains('custom-content')).toBe(true); - }); - - it('locks scroll, focuses the modal, and emits lifecycle events when opened and closed', async () => { - document.body.style.overflow = 'auto'; - const trigger = document.createElement('button'); - document.body.appendChild(trigger); - trigger.focus(); - - const wrapper = mountModal(); - - await wrapper.setProps({ modelValue: true }); - await settle(); - - const modal = getModal(); - - expect(modal.classList.contains('open')).toBe(true); - expect(getOverlay()?.classList.contains('open')).toBe(true); - expect(document.body.style.overflow).toBe('hidden'); - expect(document.activeElement).toBe(modal); - expect(wrapper.emitted('opened')?.[0]?.[0]).toBe(modal); - - await wrapper.setProps({ modelValue: false }); - await settle(); - - expect(getOverlay()).toBeNull(); - expect(document.body.style.overflow).toBe('auto'); - expect(document.activeElement).toBe(trigger); - expect(wrapper.emitted('closed')).toHaveLength(1); - }); - - it('requests close when Escape is pressed or the overlay is clicked', async () => { - const wrapper = mountModal({ modelValue: true }); - await settle(); - - document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape' })); - getOverlay()?.dispatchEvent(new MouseEvent('click', { bubbles: true })); - - expect(wrapper.emitted('update:modelValue')).toEqual([[false], [false]]); - }); - - it('cleans up global side effects when unmounted while open', async () => { - const wrapper = mountModal({ modelValue: true }); - await settle(); - - wrapper.unmount(); - activeWrappers.pop(); - - expect(document.body.style.overflow).toBe(''); - expect(() => { - document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape' })); - }).not.toThrow(); - }); -}); diff --git a/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue b/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue deleted file mode 100644 index e07950a5020e5c84df891350b04cb05cc6401671..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoModal/MatomoModal.vue +++ /dev/null @@ -1,135 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.spec.ts b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.spec.ts deleted file mode 100644 index 10e486b1d2d65d9ea350b4afb448b0be7e961a9a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.spec.ts +++ /dev/null @@ -1,153 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import Matomo from '../Matomo/Matomo'; -import MatomoUrl from './MatomoUrl'; -import '../Periods/Day'; -import '../Periods/Week'; -import '../Periods/Month'; -import '../Periods/Year'; -import '../Periods/Range'; - -describe('CoreHome/MatomoUrl', () => { - describe('#updatePeriodParamsFromUrl()', () => { - const DATE_PERIODS_TO_TEST = [ - { - date: '2012-01-02', - period: 'day', - expected: { - currentDateString: '2012-01-02', - period: 'day', - startDateString: '2012-01-02', - endDateString: '2012-01-02' - } - }, - { - date: '2012-01-02', - period: 'week', - expected: { - currentDateString: '2012-01-02', - period: 'week', - startDateString: '2012-01-02', - endDateString: '2012-01-08' - } - }, - { - date: '2012-01-02', - period: 'month', - expected: { - currentDateString: '2012-01-02', - period: 'month', - startDateString: '2012-01-01', - endDateString: '2012-01-31' - } - }, - { - date: '2012-01-02', - period: 'year', - expected: { - currentDateString: '2012-01-02', - period: 'year', - startDateString: '2012-01-01', - endDateString: '2012-12-31' - } - }, - { - date: '2012-01-02,2012-02-03', - period: 'range', - expected: { - currentDateString: '2012-01-02,2012-02-03', - period: 'range', - startDateString: '2012-01-02', - endDateString: '2012-02-03' - } - }, - // invalid - { - date: '2012-01-02', - period: 'range', - expected: { - currentDateString: undefined, - period: undefined, - startDateString: undefined, - endDateString: undefined - } - }, - { - date: 'sldfjkdslkfj', - period: 'month', - expected: { - currentDateString: undefined, - period: undefined, - startDateString: undefined, - endDateString: undefined - } - }, - { - date: '2012-01-02', - period: 'sflkjdslkfj', - expected: { - currentDateString: undefined, - period: undefined, - startDateString: undefined, - endDateString: undefined - } - } - ]; - - DATE_PERIODS_TO_TEST.forEach((test) => { - const date = test.date, - period = test.period, - expected = test.expected; - - it(`should parse the period in the URL correctly when date=${date} and period=${period}`, () => { - delete Matomo.currentDateString; - delete Matomo.period; - delete Matomo.startDateString; - delete Matomo.endDateString; - - history.pushState(null, '', '?date=' + date + '&period=' + period); - - MatomoUrl.updatePeriodParamsFromUrl(); - - expect(Matomo.currentDateString).toEqual(expected.currentDateString); - expect(Matomo.period).toEqual(expected.period); - expect(Matomo.startDateString).toEqual(expected.startDateString); - expect(Matomo.endDateString).toEqual(expected.endDateString); - }); - - it('should parse the period in the URL hash correctly when date=' + date + ' and period=' + period, () => { - delete Matomo.currentDateString; - delete Matomo.period; - delete Matomo.startDateString; - delete Matomo.endDateString; - - history.pushState(null, '', '?someparam=somevalue#?date=' + date + '&period=' + period); - - MatomoUrl.updatePeriodParamsFromUrl(); - - expect(Matomo.currentDateString).toEqual(expected.currentDateString); - expect(Matomo.period).toEqual(expected.period); - expect(Matomo.startDateString).toEqual(expected.startDateString); - expect(Matomo.endDateString).toEqual(expected.endDateString); - }); - }); - - it('should not change object values if the current date/period is the same as the URL date/period', () => { - Matomo.period = 'range'; - Matomo.currentDateString = '2012-01-01,2012-01-02'; - Matomo.startDateString = 'shouldnotchange'; - Matomo.endDateString = 'shouldnotchangeeither'; - - history.pushState(null, '', '?someparam=somevalue#?date=' + Matomo.currentDateString + '&period=' + Matomo.period); - - MatomoUrl.updatePeriodParamsFromUrl(); - - expect(Matomo.startDateString).toEqual('shouldnotchange'); - expect(Matomo.endDateString).toEqual('shouldnotchangeeither'); - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts deleted file mode 100644 index 1bd77682bb30fc481c25e395779cbaeb15d75508..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts +++ /dev/null @@ -1,223 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { computed, ref, readonly } from 'vue'; -import Matomo from '../Matomo/Matomo'; -import { Periods, format } from '../Periods'; // important to load all periods here - -const { piwik, broadcast } = window; - -function isValidPeriod(periodStr: string, dateStr: string) { - try { - Periods.parse(periodStr, dateStr); - return true; - } catch (e) { - return false; - } -} - -// using unknown since readonly does not work well with recursive types like QueryParameters -type ParsedQueryParameters = Record; - -/** - * URL store and helper functions. - */ -class MatomoUrl { - readonly url = ref(null); - - readonly urlQuery = computed( - () => (this.url.value ? this.url.value.search.replace(/^\?/, '') : ''), - ); - - readonly hashQuery = computed( - () => (this.url.value ? this.url.value.hash.replace(/^[#/?]+/, '') : ''), - ); - - readonly urlParsed = computed(() => readonly( - this.parse(this.urlQuery.value) as ParsedQueryParameters, - )); - - readonly hashParsed = computed(() => readonly( - this.parse(this.hashQuery.value) as ParsedQueryParameters, - )); - - readonly parsed = computed(() => readonly({ - ...this.urlParsed.value, - ...this.hashParsed.value, - } as ParsedQueryParameters)); - - constructor() { - this.url.value = new URL(window.location.href); - - window.addEventListener('hashchange', (event) => { - this.url.value = new URL(event.newURL); - this.updatePeriodParamsFromUrl(); - this.updatePageTitle(); - }); - - this.updatePeriodParamsFromUrl(); - this.updatePageTitle(); - } - - updateHashToUrl(urlWithoutLeadingHash: string) { - const wholeHash = `#${urlWithoutLeadingHash}`; - - if (window.location.hash === wholeHash) { // trigger event manually since the url is the same - window.dispatchEvent(new HashChangeEvent('hashchange', { - newURL: window.location.href, - oldURL: window.location.href, - })); - } else { - window.location.hash = wholeHash; - } - } - - updateHash(params: QueryParameters|string) { - const modifiedParams = this.getFinalHashParams(params); - const serializedParams = this.stringify(modifiedParams); - - this.updateHashToUrl(`?${serializedParams}`); - } - - updateUrl(params: QueryParameters|string, hashParams: QueryParameters|string = {}) { - const serializedParams: string = typeof params !== 'string' ? this.stringify(params) : params; - - const modifiedHashParams = Object.keys(hashParams).length - ? this.getFinalHashParams(hashParams, params) - : {}; - - const serializedHashParams: string = this.stringify(modifiedHashParams); - - let url = `?${serializedParams}`; - if (serializedHashParams.length) { - url = `${url}#?${serializedHashParams}`; - } - - window.broadcast.propagateNewPage('', undefined, undefined, undefined, url); - } - - private getFinalHashParams( - params: QueryParameters|string, - urlParams: QueryParameters|string = {}, - ) { - const paramsObj = typeof params !== 'string' - ? params as QueryParameters - : this.parse(params as string); - - const urlParamsObj = typeof params !== 'string' - ? urlParams as QueryParameters - : this.parse(urlParams as string); - - return { - // these params must always be present in the hash - period: urlParamsObj.period || this.parsed.value.period, - date: urlParamsObj.date || this.parsed.value.date, - segment: urlParamsObj.segment || this.parsed.value.segment, - - ...paramsObj, - }; - } - - // if we're in an embedded context, loads an entire new URL, otherwise updates the hash - updateLocation(params: QueryParameters|string) { - if (Matomo.helper.isReportingPage()) { - this.updateHash(params); - return; - } - - this.updateUrl(params); - } - - getSearchParam(paramName: string): string { - const hash = window.location.href.split('#'); - - const regex = new RegExp(`${paramName}(\\[]|=)`); - if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) { - const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href); - - // for date, period and idsite fall back to parameter from url, if non in hash was provided - if (valueFromHash - || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite') - ) { - return valueFromHash; - } - } - - return window.broadcast.getValueFromUrl(paramName, window.location.search); - } - - parse(query: string): QueryParameters { - return broadcast.getValuesFromUrl(`?${query}`, true); - } - - stringify(search: QueryParameters): string { - const searchWithoutEmpty = Object.fromEntries( - Object.entries(search).filter(([, value]) => value !== '' && value !== null && value !== undefined), - ); - - // using jQuery since URLSearchParams does not handle array params the way Matomo uses them - return $.param(searchWithoutEmpty).replace(/%5B%5D/g, '[]') - // some browsers treat URLs w/ date=a,b differently from date=a%2Cb, causing multiple - // entries to show up in the browser history. - .replace(/%2C/g, ',') - // jquery seems to encode space characters as '+', but certain parts of matomo won't - // decode it correctly, so we make sure to use %20 instead - .replace(/\+/g, '%20'); - } - - getMenuPathSuffix(): { category: string; subcategory: string } { - const category = this.getSearchParam('category') as string; - const subcategory = this.getSearchParam('subcategory') as string; - return { category: decodeURIComponent(category), subcategory: decodeURIComponent(subcategory) }; - } - - getDateAndPeriodFromUrl(): { date: string; period: string } { - return { - date: this.getSearchParam('date') || '', - period: this.getSearchParam('period') || '', - }; - } - - updatePageTitle() { - const { period, date } = this.getDateAndPeriodFromUrl(); - const { category, subcategory } = this.getMenuPathSuffix(); - const segment = this.getSearchParam('segment') || ''; - piwik.updateTitle(date, period, category, subcategory, segment); - } - - updatePeriodParamsFromUrl(): void { - const { period, date: initialDate } = this.getDateAndPeriodFromUrl(); - let date = initialDate; - if (!isValidPeriod(period, date)) { - // invalid data in URL - return; - } - - if (piwik.period === period && piwik.currentDateString === date) { - // this period / date is already loaded - return; - } - - piwik.period = period; - - const dateRange = Periods.parse(period, date).getDateRange(); - piwik.startDateString = format(dateRange[0]); - piwik.endDateString = format(dateRange[1]); - // do not set anything to previousN/lastN, as it's more useful to plugins - // to have the dates than previousN/lastN. - if (piwik.period === 'range') { - date = `${piwik.startDateString},${piwik.endDateString}`; - } - - piwik.currentDateString = date; - } -} - -const instance = new MatomoUrl(); -export default instance; - -piwik.updatePeriodParamsFromUrl = instance.updatePeriodParamsFromUrl.bind(instance); diff --git a/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.less b/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.less deleted file mode 100644 index ec1e5f0e6d1704cea7d57b5758060e268e977cb7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.less +++ /dev/null @@ -1,97 +0,0 @@ - -.menuDropdown { - display: inline-block; - padding-right: 14px; - - .title { - position: relative; - cursor: pointer; - } - - .icon-arrow-bottom { - margin-left: 4px; - } - - .items { - z-index: 200; - position: absolute; - border: 1px solid @color-silver-l80; - background: @theme-color-background-contrast; - max-height: 400px; - overflow-y: auto; - overflow-x: hidden; - padding: 0 !important; - - .search { - margin: 15px 6px 10px 6px; - display: block; - - .search_ico { - position: absolute; - right: 25px; - top: 32px; - margin: 0; - left: initial; - color: @theme-color-text-lighter; - } - .reset { - position: absolute; - top: 34px; - cursor: pointer; - margin: 0; - right: 21px; - left: initial; - font-size: 12px; - color: @theme-color-text-lighter; - } - - input { - margin: 0; - width: 100%; - - &::-ms-clear { - display: none; - } - } - } - - .item { - display: block; - color: @theme-color-text !important; - text-decoration: none !important; - padding: 12px 25px 12px 6px !important; - font-size: 11px; - float: none; - text-align: left; - line-height: 16px; - - &:hover { - background: @theme-color-background-tinyContrast; - } - - &.active { - background-color: @theme-color-background-tinyContrast; - } - - &.category { - color: @theme-color-text-light !important - } - - &.separator { - padding: 0 !important; - border-bottom: 0; - margin: 0; - } - - &.separator, - &.disabled { - opacity: 0.5; - cursor: default; - - &:hover { - background: @theme-color-background-base; - } - } - } - } -} diff --git a/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue b/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue deleted file mode 100644 index 4e01db0492bb744ab4978ab07edad776a352b539..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MenuItemsDropdown/MenuItemsDropdown.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue b/plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue deleted file mode 100644 index a2daa1b0a2b5c97f2eefb3466195b9a31b69b543..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MobileLeftMenu/MobileLeftMenu.vue +++ /dev/null @@ -1,97 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.less b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.less deleted file mode 100644 index fbefc3e97ec00eee466df1c9048484b41d84b081..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.less +++ /dev/null @@ -1,77 +0,0 @@ -.multiPairField { - margin-top: 40px !important; - - .form-group.row { - margin-top: 2px; - margin-bottom: 2px; - } - - .multiPairFieldTable { - - &.has1Fields { - .fieldUiControl1{ - padding-right: 0.75rem; - } - } - - &:not(.has1Fields) { - .fieldUiControl { - display: inline-block; - padding-right: 0.75rem; - } - } - - &.has2Fields { - .fieldUiControl2 { - padding: 0.75rem; - } - } - } - - .icon-minus { - cursor: pointer; - } -} - -.col.m6 { - .multiPairField { - .multiPairFieldTable { - - &.has1Fields { - .fieldUiControl1{ - width: ~"calc(100% - 60px)"; - } - } - - &.has2Fields { - .fieldUiControl1 { - width: 160px; - } - .fieldUiControl2 { - width: ~"calc(100% - 190px)"; - } - } - - &.has3Fields { - .fieldUiControl1 { - width: 120px; - } - .fieldUiControl2, - .fieldUiControl3 { - width: 220px; - } - } - - &.has4Fields { - .fieldUiControl1 { - width: 120px; - } - .fieldUiControl2, - .fieldUiControl3, - .fieldUiControl4 { - width: 148px; - } - } - } - } -} diff --git a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue deleted file mode 100644 index 98ab92b49e6060e61960602fa8ffee36bcf7419d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue +++ /dev/null @@ -1,226 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/Notification/Notification.less b/plugins/CoreHome/vue/src/Notification/Notification.less deleted file mode 100644 index b09cec662d4d1f94fbca9ee99b92eb096d2f4381..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/Notification.less +++ /dev/null @@ -1,68 +0,0 @@ -.system.notification { - .alert; - - border: 2px solid; - color: #212121 !important; - - a { - color: #212121 !important; - } - - p:not(:first-child) { - margin-top: 1em; - } - - .notification-body { - min-width: 50px; - } - - // We have to use !important because the default button style is crazy - .close { - position: relative; - top: -2px; - right: -5px; - padding: 0 !important; - background: transparent !important; - border: none !important; - float: right; - font-size: 24px !important; - font-weight: bold; - line-height: 24px !important; - color: #212121 !important; - cursor: pointer; - } - - &:before { - margin-top: -3px; - } - - &.notification-success { - .alert-success; - } - &.notification-warning { - .alert-warning; - } - &.notification-danger, - &.notification-error { - .alert-danger; - } - &.notification-info { - .alert-info; - } - - &.help-notification.notification-info { - - &:before { - content: "\e61f"; - } - } -} - -// toast-slide-up transition -.toast-slide-up-enter-active { - transition: transform .3s ease; -} - -.toast-slide-up-enter-from { - transform: translateY(-100%); -} diff --git a/plugins/CoreHome/vue/src/Notification/Notification.ts b/plugins/CoreHome/vue/src/Notification/Notification.ts deleted file mode 100644 index 1b90f06402e4a92497f7eec0dc32b47ed3b03ba7..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/Notification.ts +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -interface Notification { - /** - * Only needed for persistent notifications. The id will be sent to the - * frontend once the user closes the notifications. The notification has to - * be registered/notified under this name. - */ - id?: string; - - /** - * Unique ID generated for the notification so it can be referenced specifically - * to scroll to. - */ - notificationInstanceId?: string; - - /** - * Determines which notification group a notification is meant to be displayed - * in. - */ - group?: string; - - /** - * The title of the notification. For instance the plugin name. - */ - title?: string; - - /** - * The actual message that will be displayed. Must be set. - */ - message: string; - - /** - * Context of the notification: 'info', 'warning', 'success' or 'error' - */ - context: 'success'|'error'|'info'|'warning'; - - /** - * The type of the notification: Either 'toast' or 'transient'. 'persistent' is valid, but - * has no effect if only specified client side. - * - * 'help' is only used by ReportingMenu.vue. - */ - type: 'toast'|'persistent'|'transient'|'help'; - - /** - * If set, the close icon is not displayed. - */ - noclear?: boolean; - - /** - * The number of milliseconds before a toast animation disappears. - */ - toastLength?: number; - - /** - * Optional style/css dictionary. For instance {'display': 'inline-block'} - */ - style?: string|Record; - - /** - * Optional CSS class to add. - */ - class?: string; - - /** - * If true, fades the animation in. - */ - animate?: boolean; - - /** - * Where to place the notification. Required if showing a toast. - */ - placeat?: string|HTMLElement|JQuery; - - /** - * If true, the notification will be displayed before others currently displayed. - */ - prepend?: boolean; -} - -export default Notification; diff --git a/plugins/CoreHome/vue/src/Notification/Notification.vue b/plugins/CoreHome/vue/src/Notification/Notification.vue deleted file mode 100644 index fe624a3aeb761a027692f3c2e1c09e2a3055faa1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/Notification.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue b/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue deleted file mode 100644 index 8d6de1161df7bedcfaaab7619c014f0bdd747e7a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts deleted file mode 100644 index 8555c9e770b91fe45d2fa2e791c3d4fc77d2e300..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts +++ /dev/null @@ -1,213 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - DeepReadonly, - reactive, - createVNode, - readonly, -} from 'vue'; -import NotificationComponent from './Notification.vue'; -import Matomo from '../Matomo/Matomo'; -import createVueApp from '../createVueApp'; -import Notification from './Notification'; - -interface NotificationsData { - notifications: Notification[]; -} - -const { $ } = window; - -class NotificationsStore { - private privateState = reactive({ - notifications: [], - }); - - private nextNotificationId = 0; - - get state(): DeepReadonly { - return readonly(this.privateState); - } - - appendNotification(notification: Notification): void { - this.checkMessage(notification.message); - - // remove existing notification before adding - if (notification.id) { - this.remove(notification.id); - } - this.privateState.notifications.push(notification); - } - - prependNotification(notification: Notification): void { - this.checkMessage(notification.message); - - // remove existing notification before adding - if (notification.id) { - this.remove(notification.id); - } - this.privateState.notifications.unshift(notification); - } - - /** - * Removes a previously shown notification having the given notification id. - */ - remove(id: string): void { - this.privateState.notifications = this.privateState.notifications.filter( - (n) => n.id !== id, - ); - } - - parseNotificationDivs(): void { - const $notificationNodes = $('[data-role="notification"]'); - - const notificationsToShow: Notification[] = []; - $notificationNodes.each((index: number, notificationNode: HTMLElement) => { - const $notificationNode = $(notificationNode); - const attributes = $notificationNode.data(); - const message = $notificationNode.html(); - - if (message) { - notificationsToShow.push({ ...attributes, message, animate: false } as Notification); - } - - $notificationNodes.remove(); - }); - - notificationsToShow.forEach((n) => this.show(n)); - } - - clearTransientNotifications(): void { - this.privateState.notifications = this.privateState.notifications.filter( - (n) => n.type !== 'transient', - ); - } - - /** - * Creates a notification and shows it to the user. - */ - show(notification: Notification): string { - this.checkMessage(notification.message); - - let addMethod = notification.prepend ? this.prependNotification : this.appendNotification; - - let notificationPosition: Notification['placeat'] = '#notificationContainer'; - if (notification.placeat) { - notificationPosition = notification.placeat; - } else { - // If a modal is open, we want to make sure the error message is visible and therefore - // show it within the opened modal - const modalSelector = '.modal.open .modal-content'; - const modal = document.querySelector(modalSelector); - if (modal) { - if (!modal.querySelector('#modalNotificationContainer')) { - $(modal).prepend('
'); - } - - notificationPosition = `${modalSelector} #modalNotificationContainer`; - addMethod = this.prependNotification; - } - } - - const group = notification.group - || (notificationPosition ? notificationPosition.toString() : ''); - - this.initializeNotificationContainer(notificationPosition, group); - - const notificationInstanceId = (this.nextNotificationId += 1).toString(); - - addMethod.call(this, { - ...notification, - noclear: !!notification.noclear, - group, - notificationId: notification.id, - notificationInstanceId, - type: notification.type || 'transient', - }); - - return notificationInstanceId; - } - - scrollToNotification(notificationInstanceId: string) { - setTimeout(() => { - const element = document.querySelector( - `[data-notification-instance-id='${notificationInstanceId}']`, - ) as HTMLElement; - if (element) { - Matomo.helper.lazyScrollTo(element, 250); - } - }); - } - - /** - * Shows a notification at a certain point with a quick upwards animation. - */ - toast(notification: Notification): void { - this.checkMessage(notification.message); - - const $placeat = notification.placeat ? $(notification.placeat) : undefined; - if (!$placeat || !$placeat.length) { - throw new Error('A valid selector is required for the placeat option when using Notification.toast().'); - } - - const toastElement = document.createElement('div'); - toastElement.style.position = 'absolute'; - toastElement.style.top = `${$placeat.offset()!.top}px`; - toastElement.style.left = `${$placeat.offset()!.left}px`; - toastElement.style.zIndex = '1000'; - document.body.appendChild(toastElement); - - const app = createVueApp({ - render: () => createVNode(NotificationComponent, { - ...notification, - notificationId: notification.id, - type: 'toast', - onClosed: () => { - app.unmount(); - }, - }), - }); - app.mount(toastElement); - } - - private initializeNotificationContainer( - notificationPosition: Notification['placeat'], - group: string, - ) { - if (!notificationPosition) { - return; - } - - const $container = $(notificationPosition); - if ($container.children('.notification-group').length) { - return; - } - - // avoiding a dependency cycle. won't need to do this when NotificationGroup's do not need - // to be dynamically initialized. - const NotificationGroup = (window as any).CoreHome.NotificationGroup; // eslint-disable-line - - const app = createVueApp({ - template: '', - data: () => ({ group }), - }); - app.component('NotificationGroup', NotificationGroup); - app.mount($container[0]); - } - - private checkMessage(message: string) { - if (!message) { - throw new Error('No message given, cannot display notification'); - } - } -} - -const instance = new NotificationsStore(); -export default instance; - -// parse notifications on dom load -$(() => instance.parseNotificationDivs()); diff --git a/plugins/CoreHome/vue/src/Notification/index.ts b/plugins/CoreHome/vue/src/Notification/index.ts deleted file mode 100644 index bc59eb494ec0b6f0447127c1b33df40804f0a566..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Notification/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export { default as Notification } from './Notification.vue'; -export { default as NotificationGroup } from './NotificationGroup.vue'; -export { default as NotificationsStore } from './Notifications.store'; -export { default as NotificationType } from './Notification'; diff --git a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.adapter.ts b/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.adapter.ts deleted file mode 100644 index f37e7bb058f37f200fabdc125a04c6d2d34df500..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.adapter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import NumberFormatter from './NumberFormatter'; - -declare global { - interface Window { - NumberFormatter: typeof NumberFormatter; - } -} - -window.NumberFormatter = NumberFormatter; diff --git a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.spec.ts b/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.spec.ts deleted file mode 100644 index 46a092411b849e23885cbe3276bcd92addd1e2e5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.spec.ts +++ /dev/null @@ -1,1034 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import NumberFormatter from './NumberFormatter'; - -const formats: any = { - ar: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0%", - "patternCurrency": "‏#,##0.00 ¤;‏-#,##0.00 ¤", - "symbolPlus": "‎+", - "symbolMinus": "‎-", - "symbolPercent": "‎%‎", - "symbolGroup": ",", - "symbolDecimal": ".", - "patternsCompactNumber": { - "1000One": "0 ألف", - "1000Other": "0 ألف", - "10000One": "00 ألف", - "10000Other": "00 ألف", - "100000One": "000 ألف", - "100000Other": "000 ألف", - "1000000One": "0 مليون", - "1000000Other": "0 مليون", - "10000000One": "00 مليون", - "10000000Other": "00 مليون", - "100000000One": "000 مليون", - "100000000Other": "000 مليون", - "1000000000One": "0 مليار", - "1000000000Other": "0 مليار", - "10000000000One": "00 مليار", - "10000000000Other": "00 مليار", - "100000000000One": "000 مليار", - "100000000000Other": "000 مليار", - "1000000000000One": "0 ترليون", - "1000000000000Other": "0 ترليون", - "10000000000000One": "00 ترليون", - "10000000000000Other": "00 ترليون", - "100000000000000One": "000 ترليون", - "100000000000000Other": "000 ترليون", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "0 ألف ¤", - "1000Other": "0 ألف ¤", - "10000One": "00 ألف ¤", - "10000Other": "00 ألف ¤", - "100000One": "000 ألف ¤", - "100000Other": "000 ألف ¤", - "1000000One": "0 مليون ¤", - "1000000Other": "0 مليون ¤", - "10000000One": "00 مليون ¤", - "10000000Other": "00 مليون ¤", - "100000000One": "000 مليون ¤", - "100000000Other": "000 مليون ¤", - "1000000000One": "0 مليار ¤", - "1000000000Other": "0 مليار ¤", - "10000000000One": "00 مليار ¤", - "10000000000Other": "00 مليار ¤", - "100000000000One": "000 مليار ¤", - "100000000000Other": "000 مليار ¤", - "1000000000000One": "0 ترليون ¤", - "1000000000000Other": "0 ترليون ¤", - "10000000000000One": "00 ترليون ¤", - "10000000000000Other": "00 ترليون ¤", - "100000000000000One": "000 ترليون ¤", - "100000000000000Other": "000 ترليون ¤", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - be: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0 %", - "patternCurrency": "#,##0.00 ¤", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": " ", - "symbolDecimal": ",", - "patternsCompactNumber": { - "1000One": "0 тыс'.'", - "1000Other": "0 тыс'.'", - "10000One": "00 тыс'.'", - "10000Other": "00 тыс'.'", - "100000One": "000 тыс'.'", - "100000Other": "000 тыс'.'", - "1000000One": "0 млн", - "1000000Other": "0 млн", - "10000000One": "00 млн", - "10000000Other": "00 млн", - "100000000One": "000 млн", - "100000000Other": "000 млн", - "1000000000One": "0 млрд", - "1000000000Other": "0 млрд", - "10000000000One": "00 млрд", - "10000000000Other": "00 млрд", - "100000000000One": "000 млрд", - "100000000000Other": "000 млрд", - "1000000000000One": "0 трлн", - "1000000000000Other": "0 трлн", - "10000000000000One": "00 трлн", - "10000000000000Other": "00 трлн", - "100000000000000One": "000 трлн", - "100000000000000Other": "000 трлн", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "0 тыс'.' ¤", - "1000Other": "0 тыс'.' ¤", - "10000One": "00 тыс'.' ¤", - "10000Other": "00 тыс'.' ¤", - "100000One": "000 тыс'.' ¤", - "100000Other": "000 тыс'.' ¤", - "1000000One": "0 млн ¤", - "1000000Other": "0 млн ¤", - "10000000One": "00 млн ¤", - "10000000Other": "00 млн ¤", - "100000000One": "000 млн ¤", - "100000000Other": "000 млн ¤", - "1000000000One": "0 млрд ¤", - "1000000000Other": "0 млрд ¤", - "10000000000One": "00 млрд ¤", - "10000000000Other": "00 млрд ¤", - "100000000000One": "000 млрд ¤", - "100000000000Other": "000 млрд ¤", - "1000000000000One": "0 трлн ¤", - "1000000000000Other": "0 трлн ¤", - "10000000000000One": "00 трлн ¤", - "10000000000000Other": "00 трлн ¤", - "100000000000000One": "000 трлн ¤", - "100000000000000Other": "000 трлн ¤", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - de: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0 %", - "patternCurrency": "#,##0.00 ¤", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": ".", - "symbolDecimal": ",", - "patternsCompactNumber": { - "1000One": "0", - "1000Other": "0", - "10000One": "0", - "10000Other": "0", - "100000One": "0", - "100000Other": "0", - "1000000One": "0 Mio'.'", - "1000000Other": "0 Mio'.'", - "10000000One": "00 Mio'.'", - "10000000Other": "00 Mio'.'", - "100000000One": "000 Mio'.'", - "100000000Other": "000 Mio'.'", - "1000000000One": "0 Mrd'.'", - "1000000000Other": "0 Mrd'.'", - "10000000000One": "00 Mrd'.'", - "10000000000Other": "00 Mrd'.'", - "100000000000One": "000 Mrd'.'", - "100000000000Other": "000 Mrd'.'", - "1000000000000One": "0 Bio'.'", - "1000000000000Other": "0 Bio'.'", - "10000000000000One": "00 Bio'.'", - "10000000000000Other": "00 Bio'.'", - "100000000000000One": "000 Bio'.'", - "100000000000000Other": "000 Bio'.'", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "0", - "1000Other": "0", - "10000One": "0", - "10000Other": "0", - "100000One": "0", - "100000Other": "0", - "1000000One": "0 Mio'.' ¤", - "1000000Other": "0 Mio'.' ¤", - "10000000One": "00 Mio'.' ¤", - "10000000Other": "00 Mio'.' ¤", - "100000000One": "000 Mio'.' ¤", - "100000000Other": "000 Mio'.' ¤", - "1000000000One": "0 Mrd'.' ¤", - "1000000000Other": "0 Mrd'.' ¤", - "10000000000One": "00 Mrd'.' ¤", - "10000000000Other": "00 Mrd'.' ¤", - "100000000000One": "000 Mrd'.' ¤", - "100000000000Other": "000 Mrd'.' ¤", - "1000000000000One": "0 Bio'.' ¤", - "1000000000000Other": "0 Bio'.' ¤", - "10000000000000One": "00 Bio'.' ¤", - "10000000000000Other": "00 Bio'.' ¤", - "100000000000000One": "000 Bio'.' ¤", - "100000000000000Other": "000 Bio'.' ¤", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } -}, - en: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0%", - "patternCurrency": "¤#,##0.00", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": ",", - "symbolDecimal": ".", - "patternsCompactNumber": { - "1000One": "0K", - "1000Other": "0K", - "10000One": "00K", - "10000Other": "00K", - "100000One": "000K", - "100000Other": "000K", - "1000000One": "0M", - "1000000Other": "0M", - "10000000One": "00M", - "10000000Other": "00M", - "100000000One": "000M", - "100000000Other": "000M", - "1000000000One": "0B", - "1000000000Other": "0B", - "10000000000One": "00B", - "10000000000Other": "00B", - "100000000000One": "000B", - "100000000000Other": "000B", - "1000000000000One": "0T", - "1000000000000Other": "0T", - "10000000000000One": "00T", - "10000000000000Other": "00T", - "100000000000000One": "000T", - "100000000000000Other": "000T", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "¤0K", - "1000Other": "¤0K", - "10000One": "¤00K", - "10000Other": "¤00K", - "100000One": "¤000K", - "100000Other": "¤000K", - "1000000One": "¤0M", - "1000000Other": "¤0M", - "10000000One": "¤00M", - "10000000Other": "¤00M", - "100000000One": "¤000M", - "100000000Other": "¤000M", - "1000000000One": "¤0B", - "1000000000Other": "¤0B", - "10000000000One": "¤00B", - "10000000000Other": "¤00B", - "100000000000One": "¤000B", - "100000000000Other": "¤000B", - "1000000000000One": "¤0T", - "1000000000000Other": "¤0T", - "10000000000000One": "¤00T", - "10000000000000Other": "¤00T", - "100000000000000One": "¤000T", - "100000000000000Other": "¤000T", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - he: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0%", - "patternCurrency": "‏#,##0.00 ‏¤;‏-#,##0.00 ‏¤", - "symbolPlus": "‎+", - "symbolMinus": "‎-", - "symbolPercent": "%", - "symbolGroup": ",", - "symbolDecimal": ".", - "patternsCompactNumber": { - "1000One": "0K‏", - "1000Other": "0K‏", - "10000One": "00K‏", - "10000Other": "00K‏", - "100000One": "000K‏", - "100000Other": "000K‏", - "1000000One": "0M‏", - "1000000Other": "0M‏", - "10000000One": "00M‏", - "10000000Other": "00M‏", - "100000000One": "000M‏", - "100000000Other": "000M‏", - "1000000000One": "0B‏", - "1000000000Other": "0B‏", - "10000000000One": "00B‏", - "10000000000Other": "00B‏", - "100000000000One": "000B‏", - "100000000000Other": "000B‏", - "1000000000000One": "0T‏", - "1000000000000Other": "0T‏", - "10000000000000One": "00T‏", - "10000000000000Other": "00T‏", - "100000000000000One": "000T‏", - "100000000000000Other": "000T‏", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "¤0K‏", - "1000Other": "¤0K‏", - "10000One": "¤00K‏", - "10000Other": "¤00K‏", - "100000One": "¤000K‏", - "100000Other": "¤000K‏", - "1000000One": "¤0M‏", - "1000000Other": "¤0M‏", - "10000000One": "¤00M‏", - "10000000Other": "¤00M‏", - "100000000One": "¤000M‏", - "100000000Other": "¤000M‏", - "1000000000One": "¤0B‏", - "1000000000Other": "¤0B‏", - "10000000000One": "¤00B‏", - "10000000000Other": "¤00B‏", - "100000000000One": "¤000B‏", - "100000000000Other": "¤000B‏", - "1000000000000One": "¤0T‏", - "1000000000000Other": "¤0T‏", - "10000000000000One": "¤00T‏", - "10000000000000Other": "¤00T‏", - "100000000000000One": "¤000T‏", - "100000000000000Other": "¤000T‏", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - hi: { - "patternNumber": "#,##,##0.###", - "patternPercent": "#,##,##0%", - "patternCurrency": "¤#,##,##0.00", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": ",", - "symbolDecimal": ".", - "patternsCompactNumber": { - "1000One": "0 हज़ार", - "1000Other": "0 हज़ार", - "10000One": "00 हज़ार", - "10000Other": "00 हज़ार", - "100000One": "0 लाख", - "100000Other": "0 लाख", - "1000000One": "00 लाख", - "1000000Other": "00 लाख", - "10000000One": "0 क॰", - "10000000Other": "0 क॰", - "100000000One": "00 क॰", - "100000000Other": "00 क॰", - "1000000000One": "0 अ॰", - "1000000000Other": "0 अ॰", - "10000000000One": "00 अ॰", - "10000000000Other": "00 अ॰", - "100000000000One": "0 ख॰", - "100000000000Other": "0 ख॰", - "1000000000000One": "00 ख॰", - "1000000000000Other": "00 ख॰", - "10000000000000One": "0 नील", - "10000000000000Other": "0 नील", - "100000000000000One": "00 नील", - "100000000000000Other": "00 नील", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "¤0 हज़ार", - "1000Other": "¤0 हज़ार", - "10000One": "¤00 हज़ार", - "10000Other": "¤00 हज़ार", - "100000One": "¤0 लाख", - "100000Other": "¤0 लाख", - "1000000One": "¤00 लाख", - "1000000Other": "¤00 लाख", - "10000000One": "¤0 क॰", - "10000000Other": "¤0 क॰", - "100000000One": "¤00 क॰", - "100000000Other": "¤00 क॰", - "1000000000One": "¤0 अ॰", - "1000000000Other": "¤0 अ॰", - "10000000000One": "¤00 अ॰", - "10000000000Other": "¤00 अ॰", - "100000000000One": "¤0 ख॰", - "100000000000Other": "¤0 ख॰", - "1000000000000One": "¤00 ख॰", - "1000000000000Other": "¤00 ख॰", - "10000000000000One": "¤0 नील", - "10000000000000Other": "¤0 नील", - "100000000000000One": "¤00 नील", - "100000000000000Other": "¤00 नील", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - ja: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0%", - "patternCurrency": "¤#,##0.00", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": ",", - "symbolDecimal": ".", - "patternsCompactNumber": { - "1000One": "", - "1000Other": "0", - "10000One": "", - "10000Other": "0万", - "100000One": "", - "100000Other": "00万", - "1000000One": "", - "1000000Other": "000万", - "10000000One": "", - "10000000Other": "0000万", - "100000000One": "", - "100000000Other": "0億", - "1000000000One": "", - "1000000000Other": "00億", - "10000000000One": "", - "10000000000Other": "000億", - "100000000000One": "", - "100000000000Other": "0000億", - "1000000000000One": "", - "1000000000000Other": "0兆", - "10000000000000One": "", - "10000000000000Other": "00兆", - "100000000000000One": "", - "100000000000000Other": "000兆", - "1000000000000000One": "", - "1000000000000000Other": "0000兆", - "10000000000000000One": "", - "10000000000000000Other": "0京", - "100000000000000000One": "", - "100000000000000000Other": "00京", - "1000000000000000000One": "", - "1000000000000000000Other": "000京" - }, - "patternsCompactCurrency": { - "1000One": "", - "1000Other": "0", - "10000One": "", - "10000Other": "¤0万", - "100000One": "", - "100000Other": "¤00万", - "1000000One": "", - "1000000Other": "¤000万", - "10000000One": "", - "10000000Other": "¤0000万", - "100000000One": "", - "100000000Other": "¤0億", - "1000000000One": "", - "1000000000Other": "¤00億", - "10000000000One": "", - "10000000000Other": "¤000億", - "100000000000One": "", - "100000000000Other": "¤0000億", - "1000000000000One": "", - "1000000000000Other": "¤0兆", - "10000000000000One": "", - "10000000000000Other": "¤00兆", - "100000000000000One": "", - "100000000000000Other": "¤000兆", - "1000000000000000One": "", - "1000000000000000Other": "¤0000兆", - "10000000000000000One": "", - "10000000000000000Other": "¤0京", - "100000000000000000One": "", - "100000000000000000Other": "¤00京", - "1000000000000000000One": "", - "1000000000000000000Other": "¤000京" - } - }, - lt: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0 %", - "patternCurrency": "#,##0.00 ¤", - "symbolPlus": "+", - "symbolMinus": "−", - "symbolPercent": "%", - "symbolGroup": " ", - "symbolDecimal": ",", - "patternsCompactNumber": { - "1000One": "0 tūkst'.'", - "1000Other": "0 tūkst'.'", - "10000One": "00 tūkst'.'", - "10000Other": "00 tūkst'.'", - "100000One": "000 tūkst'.'", - "100000Other": "000 tūkst'.'", - "1000000One": "0 mln'.'", - "1000000Other": "0 mln'.'", - "10000000One": "00 mln'.'", - "10000000Other": "00 mln'.'", - "100000000One": "000 mln'.'", - "100000000Other": "000 mln'.'", - "1000000000One": "0 mlrd'.'", - "1000000000Other": "0 mlrd'.'", - "10000000000One": "00 mlrd'.'", - "10000000000Other": "00 mlrd'.'", - "100000000000One": "000 mlrd'.'", - "100000000000Other": "000 mlrd'.'", - "1000000000000One": "0 trln'.'", - "1000000000000Other": "0 trln'.'", - "10000000000000One": "00 trln'.'", - "10000000000000Other": "00 trln'.'", - "100000000000000One": "000 trln'.'", - "100000000000000Other": "000 trln'.'", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "0 tūkst'.' ¤", - "1000Other": "0 tūkst'.' ¤", - "10000One": "00 tūkst'.' ¤", - "10000Other": "00 tūkst'.' ¤", - "100000One": "000 tūkst'.' ¤", - "100000Other": "000 tūkst'.' ¤", - "1000000One": "0 mln'.' ¤", - "1000000Other": "0 mln'.' ¤", - "10000000One": "00 mln'.' ¤", - "10000000Other": "00 mln'.' ¤", - "100000000One": "000 mln'.' ¤", - "100000000Other": "000 mln'.' ¤", - "1000000000One": "0 mlrd'.' ¤", - "1000000000Other": "0 mlrd'.' ¤", - "10000000000One": "00 mlrd'.' ¤", - "10000000000Other": "00 mlrd'.' ¤", - "100000000000One": "000 mlrd'.' ¤", - "100000000000Other": "000 mlrd'.' ¤", - "1000000000000One": "0 trln'.' ¤", - "1000000000000Other": "0 trln'.' ¤", - "10000000000000One": "00 trln'.' ¤", - "10000000000000Other": "00 trln'.' ¤", - "100000000000000One": "000 trln'.' ¤", - "100000000000000Other": "000 trln'.' ¤", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, - ro: { - "patternNumber": "#,##0.###", - "patternPercent": "#,##0 %", - "patternCurrency": "#,##0.00 ¤", - "symbolPlus": "+", - "symbolMinus": "-", - "symbolPercent": "%", - "symbolGroup": ".", - "symbolDecimal": ",", - "patternsCompactNumber": { - "1000One": "0 K", - "1000Other": "0 K", - "10000One": "00 K", - "10000Other": "00 K", - "100000One": "000 K", - "100000Other": "000 K", - "1000000One": "0 mil'.'", - "1000000Other": "0 mil'.'", - "10000000One": "00 mil'.'", - "10000000Other": "00 mil'.'", - "100000000One": "000 mil'.'", - "100000000Other": "000 mil'.'", - "1000000000One": "0 mld'.'", - "1000000000Other": "0 mld'.'", - "10000000000One": "00 mld'.'", - "10000000000Other": "00 mld'.'", - "100000000000One": "000 mld'.'", - "100000000000Other": "000 mld'.'", - "1000000000000One": "0 tril'.'", - "1000000000000Other": "0 tril'.'", - "10000000000000One": "00 tril'.'", - "10000000000000Other": "00 tril'.'", - "100000000000000One": "000 tril'.'", - "100000000000000Other": "000 tril'.'", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - }, - "patternsCompactCurrency": { - "1000One": "0 mie ¤", - "1000Other": "0 mii ¤", - "10000One": "00 mii ¤", - "10000Other": "00 mii ¤", - "100000One": "000 mii ¤", - "100000Other": "000 mii ¤", - "1000000One": "0 mil'.' ¤", - "1000000Other": "0 mil'.' ¤", - "10000000One": "00 mil'.' ¤", - "10000000Other": "00 mil'.' ¤", - "100000000One": "000 mil'.' ¤", - "100000000Other": "000 mil'.' ¤", - "1000000000One": "0 mld'.' ¤", - "1000000000Other": "0 mld'.' ¤", - "10000000000One": "00 mld'.' ¤", - "10000000000Other": "00 mld'.' ¤", - "100000000000One": "000 mld'.' ¤", - "100000000000Other": "000 mld'.' ¤", - "1000000000000One": "0 tril'.' ¤", - "1000000000000Other": "0 tril'.' ¤", - "10000000000000One": "00 tril'.' ¤", - "10000000000000Other": "00 tril'.' ¤", - "100000000000000One": "000 tril'.' ¤", - "100000000000000Other": "000 tril'.' ¤", - "1000000000000000One": "", - "1000000000000000Other": "", - "10000000000000000One": "", - "10000000000000000Other": "", - "100000000000000000One": "", - "100000000000000000Other": "", - "1000000000000000000One": "", - "1000000000000000000Other": "" - } - }, -}; - -describe('CoreHome/NumberFormatter', () => { - - const numberTestData: Array> = [ - // english formats - ['en', 5, 0, 0, '5'], - ['en', -5, 0, 3, '-5'], - ['en', 5.299, 0, 0, '5'], - ['en', 5.2992, 3, 0, '5.299'], - ['en', 5.6666666666667, 1, 0, '5.7'], - ['en', 5.07, 1, 0, '5.1'], - ['en', -50, 3, 3, '-50.000'], - ['en', 5000, 0, 0, '5,000'], - ['en', 5000000, 0, 0, '5,000,000'], - ['en', -5000000, 0, 0, '-5,000,000'], - - // foreign languages - ['ar', 51239.56, 3, 0, '51,239.56'], - ['be', 51239.56, 3, 0, '51 239,56'], - ['de', 51239.56, 3, 0, '51.239,56'], - ['he', 152551239.56, 3, 0, '152,551,239.56'], - ['he', -152551239.56, 3, 0, '‎-152,551,239.56'], - ['hi', 152551239.56, 0, 0, '15,25,51,240'], - ['lt', -152551239.56, 0, 0, '−152 551 240'], - ]; - - numberTestData.forEach((testdata) => { - const [ lang, input, maxFractionDigits, minFractionDigits, expected ] = testdata; - - it(`should correctly format number with (${lang}, ${input}, ${maxFractionDigits}, ${minFractionDigits})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatNumber(input as number, maxFractionDigits as number, minFractionDigits as number); - - expect(result).toEqual(expected); - }) - }); - - const compactNumberTestData: Array> = [ - ['en', 100, '100'], - ['en', 525.22, '525'], - ['en', 999, '999'], - ['en', 999.9, '1K'], - ['en', 1000, '1K'], - ['en', 1233, '1.2K'], - ['en', 12330, '12K'], - ['en', 123306, '123K'], - ['en', 999506, '1M'], - ['en', 1233060, '1.2M'], - ['en', 12330600, '12M'], - ['en', 123306000, '123M'], - ['en', 999200000, '999M'], - ['en', 1233060000, '1.2B'], - ['en', 12330600000, '12B'], - ['en', 123306000000, '123B'], - ['en', 1233060000000, '1.2T'], - ['en', 12330600000000, '12T'], - ['en', 123306000000000, '123T'], - ['en', 999906000000000, '1,000T'], - ['en', 1233060000000000, '1,233T'], - ['en', 12330600000000000, '12,331T'], - ['en', 99999200000000000, '99,999T'], - ['en', 99999900000000000, '100,000T'], - - ['ja', 1233, '1,233'], - ['ja', 12330, '1.2万'], - ['ja', 123306, '12万'], - ['ja', 1233060, '123万'], - ['ja', 12330600, '1,233万'], - ['ja', 123306000, '1.2億'], - ['ja', 1233060000, '12億'], - ['ja', 52330600000, '523億'], - ['ja', 123306000000, '1,233億'], - ['ja', 1233060000000, '1.2兆'], - ['ja', 12330600000000, '12兆'], - ['ja', 123306000000000, '123兆'], - ['ja', 1233060000000000, '1,233兆'], - ['ja', 9999060000000000, '9,999兆'], - ['ja', 12330600000000000, '1.2京'], - - ['ar', 1330600000, '1.3 مليار'], - ['be', 1330600000, '1,3 млрд'], - ['de', 1330600000, '1,3 Mrd.'], - ['hi', 1330600000, '1.3 अ॰'], - ['lt', 1330600000, '1,3 mlrd.'], - ]; - - compactNumberTestData.forEach((testdata) => { - const [ lang, input, expected ] = testdata; - - it(`should correctly compact format number with (${lang}, ${input})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatNumberCompact(input as number); - - expect(result).toEqual(expected); - }) - }); - - const percentNumberTestData: Array> = [ - // english formats - ['en', 5, 0, 0, '5%'], - ['en', -5, 0, 3, '-5%'], - ['en', 5.299, 0, 0, '5%'], - ['en', 5.2992, 3, 0, '5.299%'], - ['en', -50, 3, 3, '-50.000%'], - ['en', -50, 1, 1, '-50.0%'], - ['en', -50.1, 3, 3, '-50.100%'], - ['en', 5000, 0, 0, '5,000%'], - ['en', +5000, 0, 0, '5,000%'], - ['en', 5000000, 0, 0, '5,000,000%'], - ['en', -5000000, 0, 0, '-5,000,000%'], - - // foreign languages - ['ar', 51239.56, 3, 0, '51,239.56‎%‎'], - ['be', 51239.56, 3, 0, '51 239,56 %'], - ['de', 51239.56, 3, 0, '51.239,56 %'], - ['he', 152551239.56, 3, 0, '152,551,239.56%'], - ['hi', 152551239.56, 0, 0, '15,25,51,240%'], - ['lt', -152551239.56, 0, 0, '−152 551 240 %'], - ]; - - percentNumberTestData.forEach((testdata) => { - const [ lang, input, maxFractionDigits, minFractionDigits, expected ] = testdata; - - it(`should correctly format percent with (${lang}, ${input}, ${maxFractionDigits}, ${minFractionDigits})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatPercent(input as number, maxFractionDigits as number, minFractionDigits as number); - - expect(result).toEqual(expected); - }) - }); - - const currencyTestData: Array> = [ - // english formats - ['en', 5, '$', 0, 0, '$5'], - ['en', -5, '$', 0, 3, '-$5'], - ['en', 5.299, '$', 0, 0, '$5'], - ['en', 5.2992, '$', 3, 0, '$5.299'], - ['en', -50, '$', 3, 3, '-$50.000'], - ['en', -50, '$', 1, 1, '-$50.0'], - ['en', -50.1, '$', 3, 3, '-$50.100'], - ['en', 5000, '$', 0, 0, '$5,000'], - ['en', +5000, '$', 0, 0, '$5,000'], - ['en', 5000000, '$', 0, 0, '$5,000,000'], - ['en', -5000000, '$', 0, 0, '-$5,000,000'], - - // foreign languages - ['ar', 51239.56, '$', 3, 0, '‏51,239.56 $'], - ['be', 51239.56, '$', 3, 0, '51 239,56 $'], - ['de', 51239.56, '$', 3, 0, '51.239,56 $'], - ['he', -152551239.56, '$', 3, 0, '‏‎-152,551,239.56 ‏$'], - ['hi', 152551239.56, '$', 0, 0, '$15,25,51,240'], - ['lt', -152551239.56, '$', 0, 0, '−152 551 240 $'], - ]; - - currencyTestData.forEach((testdata) => { - const [ lang, input, currency, maxFractionDigits, minFractionDigits, expected ] = testdata; - - it(`should correctly format currency with (${lang}, ${input}, ${currency}, ${maxFractionDigits}, ${minFractionDigits})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatCurrency(input as number, currency as string, maxFractionDigits as number, minFractionDigits as number); - - expect(result).toEqual(expected); - }) - }); - - const compactCurrencyTestData: Array> = [ - ['en', 100, '$100'], - ['en', 525.22, '$525'], - ['en', 1000, '$1K'], - ['en', 1233, '$1.2K'], - ['en', 12330, '$12K'], - ['en', 99955, '$100K'], - ['en', 123306, '$123K'], - ['en', 3233060, '$3.2M'], - ['en', 12330600, '$12M'], - ['en', 123306000, '$123M'], - ['en', 999930600, '$1B'], - ['en', 1233060000, '$1.2B'], - ['en', 52330600000, '$52B'], - ['en', 123306000000, '$123B'], - ['en', 1233060000000, '$1.2T'], - ['en', 72330600000000, '$72T'], - ['en', 123306000000000, '$123T'], - ['en', 999906000000000, '$1,000T'], - ['en', 1233060000000000, '$1,233T'], - ['en', 12330600000000000, '$12,331T'], - - ['ja', 1233, '$1,233'], - ['ja', 12330, '$1.2万'], - ['ja', 123306, '$12万'], - ['ja', 1233060, '$123万'], - ['ja', 12330600, '$1,233万'], - ['ja', 123306000, '$1.2億'], - ['ja', 1233060000, '$12億'], - ['ja', 12330600000, '$123億'], - ['ja', 123306000000, '$1,233億'], - ['ja', 1233060000000, '$1.2兆'], - ['ja', 12330600000000, '$12兆'], - ['ja', 123306000000000, '$123兆'], - ['ja', 1233060000000000, '$1,233兆'], - ['ja', 12330600000000000, '$1.2京'], - - ['ar', 1330600000, '1.3 مليار $'], - ['be', 1330600000, '1,3 млрд $'], - ['de', 1330600000, '1,3 Mrd. $'], - ['ro', 1000, '1 mie $'], - ['ro', 2000, '2 mii $'], - ['hi', 1330600000, '$1.3 अ॰'], - ['lt', 1330600000, '1,3 mlrd. $'], - ]; - - compactCurrencyTestData.forEach((testdata) => { - const [ lang, input, expected ] = testdata; - - it(`should correctly compact format number with (${lang}, ${input})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatCurrencyCompact(input as number, '$'); - - expect(result).toEqual(expected); - }) - }); - - const evolutionTestData: Array> = [ - // english formats - ['en', 5, 0, 0, '+5%'], - ['en', -5, 0, 3, '-5%'], - ['en', 5.299, 0, 0, '+5%'], - ['en', 5.299, 3, 0, '+5.299%'], - ['en', -50, 3, 3, '-50.000%'], - ['en', -50, 1, 1, '-50.0%'], - ['en', -50.1, 3, 3, '-50.100%'], - ['en', 5000, 0, 0, '+5,000%'], - ['en', +5000, 0, 0, '+5,000%'], - ['en', 5000000, 0, 0, '+5,000,000%'], - ['en', -5000000, 0, 0, '-5,000,000%'], - - // foreign languages - ['ar', 51239.56, 3, 0, '‎+51,239.56‎%‎'], - ['be', 51239.56, 3, 0, '+51 239,56 %'], - ['de', 51239.56, 3, 0, '+51.239,56 %'], - ['he', 152551239.56, 3, 0, '‎+152,551,239.56%'], - ['hi', 152551239.56, 0, 0, '+15,25,51,240%'], - ['lt', -152551239.56, 0, 0, '−152 551 240 %'], - ]; - - evolutionTestData.forEach((testdata) => { - const [ lang, input, maxFractionDigits, minFractionDigits, expected ] = testdata; - - it(`should correctly format evolution with (${lang}, ${input}, ${maxFractionDigits}, ${minFractionDigits})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.formatEvolution(input as number, maxFractionDigits as number, minFractionDigits as number); - - expect(result).toEqual(expected); - }) - }); - - const calculateAndFormatEvolutionTestData: Array> = [ - // we test only english, as other formats are already covered by formatEvolution tests - ['en', 2, 1, false, '+100%'], - ['en', 25, 100, false, '-75%'], - ['en', 1, 3, false, '-66.7%'], - ['en', 1, 3, true, '66.7%'], - ['en', 10001, 9883, false, '+1.19%'], - ['en', 100001, 100000, false, '+0.001%'], - ['en', 100001, 100000, true, '0.001%'], - ['en', 10000001, 10000000, false, '+0%'], - ]; - - calculateAndFormatEvolutionTestData.forEach((testdata) => { - const [ lang, input1, input2, noSign, expected ] = testdata; - - it(`should correctly format evolution with (${lang}, ${input1}, ${input2}, ${noSign})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.calculateAndFormatEvolution(input1 as number, input2 as number, noSign); - - expect(result).toEqual(expected); - }) - }); - - const formattedNumberTestData: Array> = [ - ['en', '+100%', 100], - ['en', '-75%', -75], - ['en', '12,245.66', 12245.66], - ['en', '-0.555', -0.555], - ['ar', '؜+51٬239.56٪؜', 51239.56], - ['be', '+51 239,56 %', 51239.56], - ['de', '+51.239,56 %', 51239.56 ], - ['de', '-239,56 $%', -239.56 ], - ['he', '‎+152,551,239.56%', 152551239.56], - ['he', '‎-152,551,239.56', -152551239.56], - ['hi', '+15,25,51,240%', 152551240], - ['lt', '−152 551 240 %', -152551240], - ]; - - formattedNumberTestData.forEach((testdata) => { - const [ lang, input, expected ] = testdata; - - it(`should correctly parse formatted number with (${lang}, ${input})`, () => { - - window.piwik.numbers = formats[lang]; - - const result = NumberFormatter.parseFormattedNumber(input as string); - - expect(result).toEqual(expected); - }) - }); - -}); diff --git a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts b/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts deleted file mode 100644 index 848db2f1ba9e3d88b9b5b453535099122549b162..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/NumberFormatter/NumberFormatter.ts +++ /dev/null @@ -1,353 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import Matomo from '../Matomo/Matomo'; - -const { $ } = window; - -class NumberFormatter { - defaultMinFractionDigits = 0; - - defaultMaxFractionDigits = 2; - - private format( - val: string|number, - formatPattern: string, - maxFractionDigits: number, - minFractionDigits: number, - ): string { - if (!$.isNumeric(val)) { - return String(val); - } - - let value = (val as number); - - let pattern = formatPattern || Matomo.numbers.patternNumber; - - const patterns = pattern.split(';'); - if (patterns.length === 1) { - // No explicit negative pattern was provided, construct it. - patterns.push(`-${patterns[0]}`); - } - - // Ensure that the value is positive and has the right number of digits. - const negative = value < 0; - pattern = negative ? patterns[1] : patterns[0]; - - value = Math.abs(value); - - // round value to maximal number of fraction digits - if (maxFractionDigits >= 0) { - const factionFactor = 10 ** maxFractionDigits; - value = Math.round(value * factionFactor) / factionFactor; - } - - // Split the number into major and minor digits. - const valueParts = value.toString().split('.'); - let majorDigits = valueParts[0]; - - // Account for maxFractionDigits = 0, where the number won't - // have a decimal point, and $valueParts[1] won't be set. - let minorDigits = valueParts[1] || ''; - - const usesGrouping = (pattern.indexOf(',') !== -1); - - // if pattern has number groups, parse them. - if (usesGrouping) { - const primaryGroupMatches = pattern.match(/#+0/); - const primaryGroupSize = primaryGroupMatches?.[0].length || 0; - let secondaryGroupSize = primaryGroupMatches?.[0].length || 0; - const numberGroups = pattern.split(','); - - // check for distinct secondary group size. - if (numberGroups.length > 2) { - secondaryGroupSize = numberGroups[1].length; - } - - // Reverse the major digits, since they are grouped from the right. - const digits = majorDigits.split('').reverse(); - // Group the major digits. - let groups = []; - - groups.push(digits.splice(0, primaryGroupSize).reverse().join('')); - - while (digits.length) { - groups.push(digits.splice(0, secondaryGroupSize).reverse().join('')); - } - - // Reverse the groups and the digits inside of them. - groups = groups.reverse(); - // Reconstruct the major digits. - majorDigits = groups.join(','); - } - - if (minFractionDigits > 0) { - // Strip any trailing zeroes. - minorDigits = minorDigits.replace(/0+$/, ''); - if ( - minorDigits.length < minFractionDigits - && minorDigits.length < maxFractionDigits - ) { - // Now there are too few digits, re-add trailing zeroes - // until the desired length is reached. - const neededZeroes = minFractionDigits - minorDigits.length; - minorDigits += (new Array(neededZeroes + 1)).join('0'); - } - } - - // Assemble the final number and insert it into the pattern. - let result = minorDigits ? `${majorDigits}.${minorDigits}` : majorDigits; - result = pattern.replace(/#(?:[.,]#+)*0(?:[,.][0#]+)*/, result); - - // Localize the number. - return this.replaceSymbols(result); - } - - private replaceSymbols(value: string): string { - const replacements = { - '.': Matomo.numbers.symbolDecimal, - ',': Matomo.numbers.symbolGroup, - '+': Matomo.numbers.symbolPlus, - '-': Matomo.numbers.symbolMinus, - '%': Matomo.numbers.symbolPercent, - }; - - let newValue = ''; - const valueParts = value.split(''); - - valueParts.forEach((val) => { - let valueReplaced = val; - - Object.entries(replacements).some(([char, replacement]) => { - if (valueReplaced.indexOf(char) !== -1) { - valueReplaced = valueReplaced.replace(char, replacement); - return true; - } - - return false; - }); - - newValue += valueReplaced; - }); - - return newValue; - } - - private valOrDefault(val: number|undefined, def: number): number { - if (typeof val === 'undefined') { - return def; - } - - return val; - } - - private getMaxFractionDigitsForCompactFormat(valueLength: number) { - return valueLength === 1 ? 1 : 0; - } - - private determineCorrectCompactPattern( - patterns: Record, - value: number, - ): [string, number] { - let factor = 0; - let finalFactor = 0; - let patternId = ''; - - if (Math.round(value) < 1000) { - return ['0', 1]; - } - - for (factor = 1000; factor <= 10000000000000000000; factor *= 10) { - const patternOne = `${factor}One`; - const patternOther = `${factor}Other`; - - if ( - Math.round(value / factor) === 1 - && patterns?.[patternOne] !== '' - ) { - finalFactor = factor; - patternId = patternOne; - } else if ( - Math.round(value / factor) >= 1 - && patterns?.[patternOther] !== '' - ) { - finalFactor = factor; - patternId = patternOther; - } - - if (patterns?.[patternId]) { - const charCount = patterns?.[patternId].match(/0/g)?.length || 1; - - if (Math.round((value * 10 ** charCount) / (factor * 10)) < 10 ** charCount) { - break; - } - } - } - - return [patterns?.[patternId] as string || '0', finalFactor]; - } - - private formatCompact(pattern: string, factor: number, value: number) { - const charCount = pattern.match(/0/g)?.length || 0; - let finalFactor = factor; - - if (charCount > 1) { - finalFactor /= 10 ** (charCount - 1); - } - - const maximumFractionDigits = this.getMaxFractionDigitsForCompactFormat(charCount); - - // cut off numbers after a certain decimal, as formatNumber would round otherwise - const digitCountFactor = 10 ** maximumFractionDigits; - const finalValue = Math.round((value / finalFactor) * digitCountFactor) / digitCountFactor; - - const formattedNumber = this.formatNumber(finalValue, maximumFractionDigits, 0); - - return pattern.replace(/(0+)/, formattedNumber).replace(/('\.')/, '.'); - } - - public parseFormattedNumber(value: string): number { - const isNegative = value.indexOf(Matomo.numbers.symbolMinus) > -1 || value.startsWith('-'); - const numberParts = value.split(Matomo.numbers.symbolDecimal); - - numberParts.forEach((val, index) => { - numberParts[index] = val.replace(/[^0-9]/g, ''); - }); - - return (isNegative ? -1 : 1) * parseFloat(numberParts.join('.')); - } - - public formatNumber( - value: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, - ): string { - return this.format( - value, - Matomo.numbers.patternNumber, - this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), - this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), - ); - } - - public formatPercent( - value: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, - ): string { - return this.format( - value, - Matomo.numbers.patternPercent, - this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), - this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), - ); - } - - public formatCurrency( - value: string|number, - currency: string, - maxFractionDigits?: number, - minFractionDigits?: number, - ): string { - const formatted = this.format( - value, - Matomo.numbers.patternCurrency, - this.valOrDefault(maxFractionDigits, this.defaultMaxFractionDigits), - this.valOrDefault(minFractionDigits, this.defaultMinFractionDigits), - ); - return formatted.replace('¤', currency); - } - - public formatNumberCompact(value: string|number) { - const val = (value as number); - const [compactPattern, factor] = this.determineCorrectCompactPattern( - Matomo.numbers.patternsCompactNumber || [], - val, - ); - - // In case no special formatting should be used, we use the default number format - if (Math.round(val) < 1000 || compactPattern === '0') { - return this.formatNumber( - val, - this.getMaxFractionDigitsForCompactFormat(Math.round(val)), - 0, - ); - } - - return this.formatCompact(compactPattern, factor, val); - } - - public formatCurrencyCompact(value: string|number, currency: string) { - const val = (value as number); - const [compactPattern, factor] = this.determineCorrectCompactPattern( - Matomo.numbers.patternsCompactCurrency || [], - val, - ); - - // In case no special formatting should be used, we use the default number format - if (Math.round(val) < 1000 || compactPattern === '0') { - return this.formatCurrency( - val, - currency, - this.getMaxFractionDigitsForCompactFormat(Math.round(val)), - 0, - ); - } - - return this.formatCompact(compactPattern, factor, val).replace('¤', currency); - } - - public formatEvolution( - evolution: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, - noSign?: boolean, - ): string { - if (noSign) { - return this.formatPercent( - Math.abs(evolution as number), - maxFractionDigits, - minFractionDigits, - ); - } - const formattedEvolution = this.formatPercent(evolution, maxFractionDigits, minFractionDigits); - return `${evolution as number > 0 ? Matomo.numbers.symbolPlus : ''}${formattedEvolution}`; - } - - public calculateAndFormatEvolution( - currentValue: string|number, - pastValue: string|number, - noSign?: boolean, - ) { - const pastValueParsed = parseInt(pastValue as string, 10); - const currentValueParsed = parseInt(currentValue as string, 10) - pastValueParsed; - - let evolution: number; - - if (currentValueParsed === 0 || Number.isNaN(currentValueParsed)) { - evolution = 0; - } else if (pastValueParsed === 0 || Number.isNaN(pastValueParsed)) { - evolution = 100; - } else { - evolution = (currentValueParsed / pastValueParsed) * 100; - } - - let maxFractionDigits = 3; - - if (Math.abs(evolution) > 100) { - maxFractionDigits = 0; - } else if (Math.abs(evolution) > 10) { - maxFractionDigits = 1; - } else if (Math.abs(evolution) > 1) { - maxFractionDigits = 2; - } - - return this.formatEvolution(evolution, maxFractionDigits, 0, noSign); - } -} - -export default new NumberFormatter(); diff --git a/plugins/CoreHome/vue/src/NumberFormatter/index.ts b/plugins/CoreHome/vue/src/NumberFormatter/index.ts deleted file mode 100644 index 602255583933504c92c3e54e445f0396b6424632..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/NumberFormatter/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export { default as NumberFormatter } from './NumberFormatter'; -export * from './utilities'; diff --git a/plugins/CoreHome/vue/src/NumberFormatter/utilities.ts b/plugins/CoreHome/vue/src/NumberFormatter/utilities.ts deleted file mode 100644 index 83ff5a3e7321a47f062fc7b7a1cdff802384ce71..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/NumberFormatter/utilities.ts +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import NumberFormatter from './NumberFormatter'; - -export function formatNumber( - val: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, -): string { - return NumberFormatter.formatNumber(val, maxFractionDigits, minFractionDigits); -} - -export function formatPercent( - val: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, -): string { - return NumberFormatter.formatPercent(val, maxFractionDigits, minFractionDigits); -} - -export function formatCurrency( - val: string|number, - cur: string, - maxFractionDigits?: number, - minFractionDigits?: number, -): string { - return NumberFormatter.formatCurrency(val, cur, maxFractionDigits, minFractionDigits); -} - -export function formatEvolution( - val: string|number, - maxFractionDigits?: number, - minFractionDigits?: number, - noSign?: boolean, -): string { - return NumberFormatter.formatEvolution(val, maxFractionDigits, minFractionDigits, noSign); -} - -export function calculateAndFormatEvolution( - valCur: string|number, - valPrev: string|number, - noSign?: boolean, -): string { - return NumberFormatter.calculateAndFormatEvolution(valCur, valPrev, noSign); -} diff --git a/plugins/CoreHome/vue/src/Orderable.ts b/plugins/CoreHome/vue/src/Orderable.ts deleted file mode 100644 index 769d76a041fa36b39ce6500833f3cc4697d6813c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Orderable.ts +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export interface Orderable { - order: number; -} - -export function sortOrderables(menu?: ReadonlyArray): T[] { - const result = [...(menu || [])]; - result.sort((lhs, rhs) => { - if (lhs.order < rhs.order) { - return -1; - } - - if (lhs.order > rhs.order) { - return 1; - } - - return 0; - }); - return result; -} diff --git a/plugins/CoreHome/vue/src/Passthrough/Passthrough.vue b/plugins/CoreHome/vue/src/Passthrough/Passthrough.vue deleted file mode 100644 index ea8997f14ef85aecc7efecda9fe3abd7ed19fcce..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Passthrough/Passthrough.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.less b/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.less deleted file mode 100644 index 20a4dbcef611c0105898aa07f41b8672f380c7b6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.less +++ /dev/null @@ -1,34 +0,0 @@ -.password-strength { - font-size: 0.85rem; - margin-left: -0.5rem; - margin-right: -0.5rem; - - .rule { - line-height: 1.5rem; - padding-left: 0.5rem; - padding-right: 0.5rem; - - &-undefined { - color: #D9D9D9; - } - - &-valid { - color: #5D9E52; - } - - &-invalid { - color: #D2312D; - } - - .icon { - width: 1rem; - text-align: center; - display: inline-block; - font-weight: bold; - } - - .icon-close { - font-size: 0.65rem - } - } -} diff --git a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.ts b/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.ts deleted file mode 100644 index 1608a854d643cca25be0710859bf83f0434fadce..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.ts +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export interface PasswordRule { - validationRegex: string; - ruleText: string; - passed: boolean | undefined; -} diff --git a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue b/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue deleted file mode 100644 index 1528dba91a80344e36efe7ed655c44fbe9fb0402..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PasswordStrength/PasswordStrength.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue b/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue deleted file mode 100644 index 7a921da4e276ee859bc1bec24b71f7af80d7691e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.component.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.component.spec.ts deleted file mode 100644 index 37c2cd9e887692afdbe6a8ab433e65fb542e7ac4..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.component.spec.ts +++ /dev/null @@ -1,115 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import PeriodOptions from './PeriodOptions.vue'; - -jest.mock('../translate', () => ({ - translate: (key: string) => { - const messages: Record = { - Intl_PeriodDay: 'day', - Intl_PeriodWeek: 'week', - Intl_PeriodMonth: 'month', - Intl_PeriodYear: 'year', - General_DateRangeInPeriodList: 'date range', - General_Custom: 'Custom', - General_ChoosePeriod: 'Choose period', - General_DoubleClickToChangePeriod: 'Double click to change period', - }; - - return messages[key] || key; - }, -})); - -describe('PeriodOptions', () => { - function mountComponent(customProps = {}) { - return mount(PeriodOptions, { - props: { - modelValue: 'day', - periods: ['day', 'week', 'month', 'year', 'range'], - checkedPeriodId: 'day', - activeDatePeriod: 'day', - ...customProps, - }, - }); - } - - it('should render all provided period options', () => { - const wrapper = mountComponent(); - - expect(wrapper.findAll('.periodOptions input[type="radio"]').length).toBe(5); - expect(wrapper.findAll('.periodOptions input[type="radio"]')[0].attributes('id')).toBe('period_id_range'); - }); - - it('should capitalize period labels and show custom date range for range', () => { - const wrapper = mountComponent(); - - const dayText = wrapper.find('#period_id_day + span').text().trim(); - const rangeText = wrapper.find('#period_id_range + span').text().trim(); - - expect(dayText?.charAt(0)).toBe(dayText?.charAt(0)?.toUpperCase()); - expect(rangeText).toBe('Custom date range'); - }); - - it('should emit update:modelValue and select when period is selected', async () => { - const wrapper = mountComponent(); - - await wrapper.find('#period_id_month').setValue(true); - - expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['month']); - expect(wrapper.emitted('select')?.[0]).toEqual([{ period: 'month' }]); - }); - - it('should emit dblclick payload', async () => { - const wrapper = mountComponent(); - - await wrapper.find('#period_id_week').trigger('dblclick'); - - expect(wrapper.emitted('dblclick')?.[0]).toEqual([{ period: 'week' }]); - }); - - it('should expose selected state through checked radio input', async () => { - const wrapper = mountComponent({ - checkedPeriodId: 'day', - }); - - expect((wrapper.find('#period_id_day').element as HTMLInputElement).checked).toBe(true); - expect((wrapper.find('#period_id_week').element as HTMLInputElement).checked).toBe(false); - - await wrapper.setProps({ checkedPeriodId: 'week' }); - - expect((wrapper.find('#period_id_day').element as HTMLInputElement).checked).toBe(false); - expect((wrapper.find('#period_id_week').element as HTMLInputElement).checked).toBe(true); - }); - - it('should check only when owner is active', async () => { - const wrapper = mountComponent({ - modelValue: 'month', - checkedPeriodId: null, - }); - - expect(wrapper.find('#period_id_month').classes()).not.toContain('selected-period-label'); - - await wrapper.setProps({ checkedPeriodId: 'month' }); - - expect(wrapper.find('#period_id_month').element.parentElement?.classList.contains('selected-period-label')) - .toBe(true); - }); - - it('should set empty tooltip for active date period and non-empty for others', () => { - const wrapper = mountComponent({ - modelValue: 'day', - activeDatePeriod: 'day', - }); - - const dayLabel = wrapper.find('#period_id_day').element.parentElement as HTMLLabelElement; - const weekLabel = wrapper.find('#period_id_week').element.parentElement as HTMLLabelElement; - - expect(dayLabel.title).toBe(''); - expect(weekLabel.title).not.toBe(''); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue deleted file mode 100644 index e281aeab4ad85ab4bc1d9f36ccfd0a5631ef9c30..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodOptions.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.applyButton.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.applyButton.ts deleted file mode 100644 index 3a28c58ece0e24092ec1b6efbbd857c8bbeed623..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.applyButton.ts +++ /dev/null @@ -1,102 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { RANGE_PERIOD } from './PeriodSelector.types'; - -export interface ApplyEnabledState { - uiSelectionType: 'period' | 'preset'; - uiSelectedPeriod: string; - hasPendingNonRangePeriodChange: boolean; - hasPendingPresetSelection: boolean; - isRangeValid: boolean | null; - isCompareDirty: boolean; - isComparing: boolean | null; - comparePeriodType: string; - isCompareRangeValid: boolean; -} - -export function isApplyButtonEnabled(state: ApplyEnabledState): boolean { - if (state.hasPendingNonRangePeriodChange) { - return false; - } - - if (state.uiSelectionType === 'period' - && state.uiSelectedPeriod !== RANGE_PERIOD - && !state.isCompareDirty - ) { - return true; - } - - if (state.uiSelectedPeriod === RANGE_PERIOD - && !state.hasPendingPresetSelection - && !state.isRangeValid - ) { - return false; - } - - if (state.isComparing - && state.comparePeriodType === 'custom' - && !state.isCompareRangeValid - ) { - return false; - } - - return true; -} - -export type NonRangeApplyAction = - | { type: 'stop' } - | { type: 'close' } - | { type: 'commit'; date: string; period: string }; - -export interface NonRangeApplyState { - hasPendingNonRangePeriodChange: boolean; - isCompareDirty: boolean; - shouldCloseSelectorWithoutApplying: boolean; - appliedPeriod: string; - hasCommittedRangeBounds: boolean; - rollingDateParam: string | null; - appliedRangeStartDate: string | null; - appliedRangeEndDate: string | null; - formattedAppliedAnchorDate: string | null; -} - -export function getApplyButtonAction(state: NonRangeApplyState): NonRangeApplyAction { - if (state.hasPendingNonRangePeriodChange) { - return { type: 'stop' }; - } - - if (!state.isCompareDirty) { - return state.shouldCloseSelectorWithoutApplying - ? { type: 'close' } - : { type: 'stop' }; - } - - if (state.appliedPeriod === RANGE_PERIOD) { - if (!state.hasCommittedRangeBounds) { - return { type: 'stop' }; - } - - const rangeDateValue = `${state.appliedRangeStartDate},${state.appliedRangeEndDate}`; - - return { - type: 'commit', - date: state.rollingDateParam || rangeDateValue, - period: RANGE_PERIOD, - }; - } - - if (!state.formattedAppliedAnchorDate) { - return { type: 'stop' }; - } - - return { - type: 'commit', - date: state.rollingDateParam || state.formattedAppliedAnchorDate, - period: state.appliedPeriod, - }; -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.spec.ts deleted file mode 100644 index ddb07baec4befa743f3803f817455f3770f15842..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.spec.ts +++ /dev/null @@ -1,353 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import { Periods, format } from '../Periods'; -import PeriodSelector from './PeriodSelector.vue'; -import { - getContextKeyFromParsed, - resolveSyncedUiSelection, - shouldSkipHashSync, -} from './PeriodSelector.hashSync'; - -window.piwik.minDateYear = 2011; -window.piwik.minDateMonth = 11; -window.piwik.minDateDay = 15; -window.piwik.maxDateYear = 2014; -window.piwik.maxDateMonth = 3; -window.piwik.maxDateDay = 29; - -function createContextKey(parsed: Record): string { - return getContextKeyFromParsed(parsed); -} - -function createBaseContext(overrides: Record = {}): Record { - return { - module: 'CoreHome', - action: 'index', - category: 'General_Actions', - subcategory: 'General_Pages', - date: 'today', - period: 'day', - ...overrides, - }; -} - -describe('PeriodSelector hash sync', () => { - const component = PeriodSelector as unknown as { - methods: Record unknown>; - }; - const { methods } = component; - const baseContextKey = createContextKey(createBaseContext()); - - it('does not skip hash sync when context changes with same period/date', () => { - const vm: any = { - nextHashUiSelection: null, - lastKnownHashSelectionKey: 'day|today', - lastKnownHashContextKey: baseContextKey, - }; - - expect(shouldSkipHashSync( - 'day|today', - createContextKey(createBaseContext({ - category: 'General_Visitors', - subcategory: 'General_Overview', - })), - vm.nextHashUiSelection, - vm.lastKnownHashSelectionKey, - vm.lastKnownHashContextKey, - )).toBe(false); - }); - - it('skips hash sync only when both selection and context keys are unchanged and no pending ui sync', () => { - const vm: any = { - nextHashUiSelection: null, - lastKnownHashSelectionKey: 'day|today', - lastKnownHashContextKey: baseContextKey, - }; - - expect(shouldSkipHashSync( - 'day|today', - baseContextKey, - vm.nextHashUiSelection, - vm.lastKnownHashSelectionKey, - vm.lastKnownHashContextKey, - )).toBe(true); - - vm.nextHashUiSelection = { type: 'period', id: 'day' }; - expect(shouldSkipHashSync( - 'day|today', - baseContextKey, - vm.nextHashUiSelection, - vm.lastKnownHashSelectionKey, - vm.lastKnownHashContextKey, - )).toBe(false); - }); - - it('does not skip hash sync when idSite or segment changes with same period/date/context path', () => { - const vm: any = { - nextHashUiSelection: null, - lastKnownHashSelectionKey: 'day|today', - lastKnownHashContextKey: createContextKey(createBaseContext({ idSite: '1' })), - }; - - expect(shouldSkipHashSync( - 'day|today', - createContextKey(createBaseContext({ idSite: '2' })), - vm.nextHashUiSelection, - vm.lastKnownHashSelectionKey, - vm.lastKnownHashContextKey, - )).toBe(false); - - vm.lastKnownHashContextKey = createContextKey(createBaseContext({ - idSite: '1', - segment: 'countryCode==US', - })); - expect(shouldSkipHashSync( - 'day|today', - createContextKey(createBaseContext({ - idSite: '1', - segment: 'countryCode==NZ', - })), - vm.nextHashUiSelection, - vm.lastKnownHashSelectionKey, - vm.lastKnownHashContextKey, - )).toBe(false); - }); - - it('changes context key when non-ignored params change', () => { - const contextA = getContextKeyFromParsed(createBaseContext({ idGoal: '1' })); - const contextB = getContextKeyFromParsed(createBaseContext({ idGoal: '2' })); - - expect(contextA).not.toBe(contextB); - }); - - it('keeps context key unchanged for compare-only param changes', () => { - const contextA = getContextKeyFromParsed(createBaseContext({ - compareSegments: ['countryCode==US'], - comparePeriods: ['day'], - comparePeriodType: 'previousPeriod', - compareDates: ['2026-02-01'], - })); - const contextB = getContextKeyFromParsed(createBaseContext({ - compareSegments: ['deviceType==desktop'], - comparePeriods: ['range'], - comparePeriodType: 'custom', - compareDates: ['2026-02-01,2026-02-07'], - })); - - expect(contextA).toBe(contextB); - }); - - it('keeps context key unchanged when only compareSegments changes', () => { - const contextA = getContextKeyFromParsed(createBaseContext({ compareSegments: ['countryCode==US'] })); - const contextB = getContextKeyFromParsed(createBaseContext({ compareSegments: ['deviceType==desktop'] })); - - expect(contextA).toBe(contextB); - }); - - it('builds deterministic context keys regardless of object key order', () => { - const parsed = createBaseContext({ segment: 'countryCode==US', }); - - const contextA = getContextKeyFromParsed(parsed); - // Reorder the keys - const contextB = getContextKeyFromParsed({ - period: parsed.period, - date: parsed.date, - segment: parsed.segment, - subcategory: parsed.subcategory, - category: parsed.category, - action: parsed.action, - module: parsed.module, - }); - - expect(contextA).toBe(contextB); - }); - - it('stores selection and context keys when resolving synced ui selection', () => { - const result = resolveSyncedUiSelection( - 'day|today', - baseContextKey, - null, - null, - ); - - expect(result.syncedUiSelection).toBeNull(); - expect(result.lastInteractionSource).toBeNull(); - expect(result.lastKnownHashSelectionKey).toBe('day|today'); - expect(result.lastKnownHashContextKey).toBe(baseContextKey); - }); - - it('sets range validity true when hash sync hydrates a valid range', () => { - const originalUrl = (MatomoUrl as any).url.value; - const vm: any = { - nextHashUiSelection: null, - nextHashSelectionKey: null, - lastKnownHashSelectionKey: null, - lastKnownHashContextKey: null, - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'day' }, - committedPeriod: 'day', - selectedPeriod: 'day', - committedAnchorDate: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - pendingPresetSelection: { id: 'last30days' }, - calendarViewport: 'single', - compareAppliedSignature: '', - compareCurrentSignature: '{}', - isRangeValid: null, - getCurrentContextKey: jest.fn(() => baseContextKey), - applyUiSelectionFromHash: methods.applyUiSelectionFromHash, - setUiSelection: methods.setUiSelection, - clearPresetSelection: methods.clearPresetSelection, - resetSelectedDateValues: methods.resetSelectedDateValues, - applyDateValuesFromHash: methods.applyDateValuesFromHash, - setRangeStartEndFromPeriod: methods.setRangeStartEndFromPeriod, - }; - - (MatomoUrl as any).url.value = new URL( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=range&date=last7' - + '#?period=range&date=last7&category=General_Actions&subcategory=General_Pages', - ); - - methods.updateSelectedValuesFromHash.call(vm); - const [expectedStartDate, expectedEndDate] = Periods.parse('range', 'last7').getDateRange(); - - expect(vm.isRangeValid).toBe(true); - expect(vm.appliedRangeStartDate).toBe(format(expectedStartDate)); - expect(vm.appliedRangeEndDate).toBe(format(expectedEndDate)); - expect(vm.calendarViewport).toBe('range'); - expect(vm.uiSelection).toEqual({ type: 'preset', id: 'last7days' }); - expect(vm.pendingPresetSelection).toBeNull(); - - (MatomoUrl as any).url.value = originalUrl; - }); - - it('sets single calendar viewport when hash sync hydrates a valid non-range period', () => { - const originalUrl = (MatomoUrl as any).url.value; - const vm: any = { - nextHashUiSelection: null, - nextHashSelectionKey: null, - lastKnownHashSelectionKey: null, - lastKnownHashContextKey: null, - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'range' }, - committedPeriod: 'range', - selectedPeriod: 'range', - committedAnchorDate: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - pendingPresetSelection: { id: 'last30days' }, - calendarViewport: 'range', - compareAppliedSignature: '', - compareCurrentSignature: '{}', - isRangeValid: null, - getCurrentContextKey: jest.fn(() => baseContextKey), - applyUiSelectionFromHash: methods.applyUiSelectionFromHash, - setUiSelection: methods.setUiSelection, - clearPresetSelection: methods.clearPresetSelection, - resetSelectedDateValues: methods.resetSelectedDateValues, - applyDateValuesFromHash: methods.applyDateValuesFromHash, - setRangeStartEndFromPeriod: methods.setRangeStartEndFromPeriod, - }; - - (MatomoUrl as any).url.value = new URL( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=day&date=today' - + '#?period=day&date=today&category=General_Actions&subcategory=General_Pages', - ); - - expect(() => methods.updateSelectedValuesFromHash.call(vm)).not.toThrow(); - expect(vm.isRangeValid).toBeNull(); - expect(vm.calendarViewport).toBe('single'); - expect(vm.uiSelection).toEqual({ type: 'preset', id: 'today' }); - - (MatomoUrl as any).url.value = originalUrl; - }); - - it('does not preserve rolling ownership for explicit dates that match a preset', () => { - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'preset', id: 'thisMonth' }, - selectedPeriod: 'month', - committedPeriod: 'month', - committedAnchorDate: new Date('2026-02-16'), - appliedRangeStartDate: '2026-02-01', - appliedRangeEndDate: '2026-02-16', - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - }; - - methods.applyUiSelectionFromHash.call(vm, 'month', '2026-02-16', null); - - expect(vm.uiSelection).toEqual({ type: 'period', id: 'month' }); - }); - - it('re-syncs staged preset when only report context changes', () => { - const originalUrl = (MatomoUrl as any).url.value; - const originalInitTopControls = window.initTopControls; - if (!window.initTopControls) { - window.initTopControls = jest.fn(); - } - - const setUrl = (url: string) => { - (MatomoUrl as any).url.value = new URL(url); - }; - - setUrl( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=day&date=today' - + '#?period=day&date=today&category=General_Actions&subcategory=General_Pages', - ); - - const wrapper = mount(PeriodSelector, { - shallow: true, - props: { - periods: ['day', 'week', 'month', 'year', 'range'], - }, - global: { - mocks: { - translate: (key: string) => key, - }, - }, - }); - (wrapper.vm as any).updateSelectedValuesFromHash(); - - (wrapper.vm as any).pendingPresetSelection = { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }; - (wrapper.vm as any).uiSelection = { type: 'period', id: 'range' }; - - setUrl( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=day&date=today' - + '#?period=day&date=today&category=General_Visitors&subcategory=General_Overview', - ); - (wrapper.vm as any).updateSelectedValuesFromHash(); - - expect((wrapper.vm as any).pendingPresetSelection).toBeNull(); - expect((wrapper.vm as any).activePresetId).toBe('today'); - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'preset', id: 'today' }); - expect((wrapper.vm as any).isApplyEnabled()).toBe(true); - expect((wrapper.vm as any).lastKnownHashContextKey).toBe( - createContextKey(createBaseContext({ category: 'General_Visitors', subcategory: 'General_Overview' })), - ); - - wrapper.unmount(); - (MatomoUrl as any).url.value = originalUrl; - window.initTopControls = originalInitTopControls; - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.ts deleted file mode 100644 index 40ac660821aa39a76ca4b3982134ab37424cf3db..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.hashSync.ts +++ /dev/null @@ -1,77 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export const CONTEXT_KEY_IGNORED_PARAMS = [ - 'date', - 'period', - 'comparePeriods', - 'comparePeriodType', - 'compareDates', - 'compareSegments', -]; - -export type UiSelection = - { type: 'period'; id: string } | { type: 'preset'; id: PresetId }; - -export function getSelectionKey(period: string, date: string): string { - return `${period}|${date}`; -} - -export function getContextKeyFromParsed(parsed: Record): string { - const normalizedContext: Record = {}; - Object.keys(parsed) - .filter((key) => !CONTEXT_KEY_IGNORED_PARAMS.includes(key)) - .sort() - .forEach((key) => { - normalizedContext[key] = parsed[key]; - }); - return JSON.stringify(normalizedContext); -} - -export function shouldSkipHashSync( - currentSelectionKey: string, - currentContextKey: string, - nextHashUiSelection: UiSelection|null, - lastKnownHashSelectionKey: string|null, - lastKnownHashContextKey: string|null, -): boolean { - return !nextHashUiSelection - && currentSelectionKey === lastKnownHashSelectionKey - && currentContextKey === lastKnownHashContextKey; -} - -export type HashSyncResolution = { - syncedUiSelection: UiSelection | null; - lastKnownHashSelectionKey: string; - lastKnownHashContextKey: string; - nextHashUiSelection: null; - nextHashSelectionKey: null; - lastInteractionSource: null; -}; - -export function resolveSyncedUiSelection( - currentSelectionKey: string, - currentContextKey: string, - nextHashUiSelection: UiSelection | null, - nextHashSelectionKey: string | null, -): HashSyncResolution { - const isExpectedHashUpdate = !!nextHashUiSelection - && nextHashSelectionKey === currentSelectionKey; - - const syncedUiSelection = isExpectedHashUpdate && nextHashUiSelection - ? { ...nextHashUiSelection } - : null; - - return { - syncedUiSelection, - lastKnownHashSelectionKey: currentSelectionKey, - lastKnownHashContextKey: currentContextKey, - nextHashUiSelection: null, - nextHashSelectionKey: null, - lastInteractionSource: null, - }; -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.helpers.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.helpers.ts deleted file mode 100644 index e930af541af7942c1cf84ad3ac78e367b46c08a9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.helpers.ts +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export function isKeyboardExpandEvent(event: MouseEvent | KeyboardEvent): boolean { - return event.detail === 0; -} - -export function stripCompareDateParams( - baseUrlParams: Record, -): Record { - const paramsWithoutCompare = { ...baseUrlParams }; - // Intentionally keep compareSegments. Only date-period compare params are reset here. - delete paramsWithoutCompare.comparePeriods; - delete paramsWithoutCompare.comparePeriodType; - delete paramsWithoutCompare.compareDates; - return paramsWithoutCompare; -} - -export function shiftDateByPeriod(sourceDate: Date, period: string, direction: number): Date { - const shiftedDate = new Date(sourceDate.getTime()); - - switch (period) { - case 'day': - shiftedDate.setDate(shiftedDate.getDate() + direction); - break; - case 'week': - shiftedDate.setDate(shiftedDate.getDate() + direction * 7); - break; - case 'month': - shiftedDate.setMonth(shiftedDate.getMonth() + direction); - break; - case 'year': - shiftedDate.setFullYear(shiftedDate.getFullYear() + direction); - break; - default: - break; - } - - return shiftedDate; -} - -export function clampDateToBounds(date: Date, minDate: Date, maxDate: Date): Date { - const clampedDate = new Date(date.getTime()); - - if (clampedDate < minDate) { - clampedDate.setTime(minDate.getTime()); - } - - if (clampedDate > maxDate) { - clampedDate.setTime(maxDate.getTime()); - } - - return clampedDate; -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.less b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.less deleted file mode 100644 index 263e03bf5d41d01f8ac7a99c29cb8e629a52567b..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.less +++ /dev/null @@ -1,414 +0,0 @@ -@color-period-selector: @theme-color-text-lighter; -@color-period-selector-input-radio: @theme-color-border; -@color-period-selector-options-hover-background: @theme-color-code; -@color-period-selector-calendar-hover-background: @theme-color-background-lowContrast; - -.periodSelector { - - .preset-option-text { - padding-left: 30px !important; - } - - .preset-option-text:not(.lever):before, - .preset-option-text:not(.lever):after, - .compare-checkbox-text:not(.lever):before, - .compare-checkbox-text:not(.lever):after { - border: 2px solid @color-period-selector-input-radio; - } - .preset-option-input:checked + .preset-option-text:not(.lever):before, - .preset-option-input:checked + .preset-option-text:not(.lever):after { - border-color: @theme-color-brand; - } - - .compare-checkbox-input:checked + .compare-checkbox-text:not(.lever):before { - border-top: 2px solid rgba(0, 0, 0, 0); - border-left: 2px solid rgba(0, 0, 0, 0); - } - - &.compare-dropdown-open { - #comparePeriodToDropdown { - position: relative; - z-index: 2; - - .dropdown-content { - z-index: 3 !important; - } - } - - label[for=comparePeriodEndDate] { - visibility: hidden; - } - - #comparePeriodEndDate .input-field { - position: static; // needed when dropdown is open, since dropdown content is position: absolute, and this is position: relative, which causes it to show up in the background of the dropdown - } - } - - // overrides theme CSS that always hides .loadingPiwik. since we use an ng-if to make - // sure it's only shown when we're actually loading a new page, it's not necessary to - // forcefully hide it. - .loadingPiwik { - display: inline-block !important; - } - - .compare-checkbox { - margin-bottom: 20px; - - .compare-checkbox-text { - padding-left: 25px; - font-size: 14px; - margin-right: 3px; - } - } - - // Match spacing to range mode by adding top space only when a single calendar is shown. - #periodMore.single-calendar .period-date + .compare-checkbox { - margin-top: 10px; - } - - .compare-date-range { - padding-top: 20px; - } - - .compare-validation-message { - color: @color-red-matomo; - font-size: 12px; - line-height: 1.4; - margin: 8px 0 0; - text-align: center; - text-wrap: balance; - } - - #comparePeriodToDropdown { - height: 30px; - display: inline-block; - transform: scale(.9); - margin-left: -2%; - margin-right: -5%; - - // dropdown width/height looks off due to scaling - .dropdown-content { - width: auto !important; - height: auto !important; - overflow-y: visible; - } - - .form-group { - margin: 0; - } - - .input-field { - margin-top: 0; - padding: 0 0 0 0.5rem; - } - - .select-dropdown { - margin-bottom: 0; - } - } - - div#comparePeriodStartDate, div#comparePeriodEndDate { - display: inline-block; - - .form-group { - margin: 0; - } - - .input-field { - margin-top: 0; - padding: 0 0 0 0.6rem; - } - - .select-dropdown { - margin-bottom: 0; - } - } - - #periodMore.single-calendar { - div#comparePeriodStartDate, div#comparePeriodEndDate { - width: calc(~"70%"); - } - } - - #periodMore.dual-calendar { - div#comparePeriodStartDate, div#comparePeriodEndDate { - width: calc(~"50% - 20px"); - } - } - - .compare-dates-separator { - height: 0.5px; - margin-left: 11px; - margin-right: 11px; - background-color: @color-silver-l95; - width: 16px; - display: inline-block; - vertical-align: top; - margin-top: 30px; - } - - label[for=comparePeriodTo] { - transform: scale(.9); - } - - .apply-button-container { - text-align: right; - margin-top: auto; - } - - .flex { - display: flex; - } - - #periodMore { - box-sizing: border-box; - left: 0; - max-width: calc(~'100vw - 16px'); - right: auto; - } - - @media (max-width: 600px) { - #periodMore { - max-width: 90%; - left: 25px; - right: auto; - } - } - - .period-type { - min-width: 220px; - } - - .period-selector-options-column { - #otherPeriods .periodOptions { - p:first-child { - margin-top: 5px; - } - - .period-option-label { - background: transparent; - border: 0; - border-radius: 5px; - color: @color-period-selector; - cursor: pointer; - display: block; - font: inherit; - margin: 0; - outline: none; - padding-left: 8px; - position: relative; - text-align: left; - width: 100%; - font-size: 13px; - - &:hover { - background-color: @color-period-selector-options-hover-background; - } - } - - .period-option-label:has(.period-option-input:focus-visible) { - background-color: @color-period-selector-options-hover-background; - border-radius: 5px; - outline: 2px solid @theme-color-focus-ring; - outline-offset: 0; - } - - // Period options are visually button-like; hide radio-marker pseudo elements. - .period-option-text { - padding-left: 0; - } - - .period-option-text:before, - .period-option-text:after { - display: none !important; - } - - .selected-period-label { - color: @theme-color-text; - font-weight: 600; - } - } - - #otherPeriods .presetDateRanges { - border-top: 1px solid @color-silver-l95; - margin-top: 12px; - padding-top: 12px; - - label, - label span { - color: @color-period-selector; - } - - .preset-option-input:focus-visible:checked + .preset-option-text:not(.lever):before, - .preset-option-input:focus-visible:checked + .preset-option-text:not(.lever):after { - border-color: @theme-color-focus-ring; - } - - .selected-period-label { - color: @theme-color-text; - } - } - - .preset-date-range-group-separator { - border-top: 1px solid @color-silver-l95; - margin: 12px 0; - } - } - - .period-selector-calendar-column { - border-left: 1px solid @color-silver-l95; - display: flex; - flex-direction: column; - margin-left: 16px; - min-width: 220px; - padding-left: 16px; - width: 100%; - } - .period-date{ - min-width: 220px; - } - .period-date, - .period-range { - padding-right: 0 !important; - } - - .dateRangePicker { - display: flex; - align-items: flex-start; - flex-wrap: nowrap; - gap: 16px; - - #calendarRangeFrom, - #calendarRangeTo { - flex: 1 1 0; - min-width: 220px; - } - - #calendarRangeFrom { - float: none; - } - - #calendarRangeTo { - margin-left: 0; - } - } - - @media (max-width: 900px) { - .flex { - flex-direction: column; - overflow-x: auto; - } - - .period-selector-calendar-column { - margin-left: 0; - padding-left: 0; - border-left: none; - } - - .dateRangePicker { - flex-wrap: wrap; - } - - #periodMore.dual-calendar .dateRangePicker { - flex-direction: column; - width: 100%; - - #calendarRangeFrom, - #calendarRangeTo { - width: 100%; - } - } - } - - .ui-datepicker { - border: none !important; - font-size: 13px !important; - width: 100% !important; - - .ui-datepicker-month { - width: 46%; - } - .ui-datepicker-year { - width: 46%; - } - .ui-datepicker-prev .ui-icon, - .ui-datepicker-next .ui-icon { - top: 20%; - } - .ui-datepicker-prev .ui-icon { - left: 0%; - } - - .ui-datepicker-header .ui-icon.icon-chevron-left, - .ui-datepicker-header .ui-icon.icon-chevron-right { - background-image: none !important; - text-indent: 0 !important; - overflow: visible !important; - width: auto !important; - height: auto !important; - margin: 0 !important; - font-size: 12px; - line-height: 1; - display: inline-block; - - &::before { - display: inline-block; - line-height: 1; - } - } - - .ui-datepicker-month, .ui-datepicker-year { - font-size: 13px; - } - - .ui-datepicker-calendar, .ui-datepicker-header { - font-size: 13px !important; - border: none !important; - - thead { - border: none !important; - } - } - .ui-datepicker-calendar { - table-layout: fixed; - - tbody td { - padding: 0 !important; - width: 14.2857%; - } - - tbody td > a, - tbody td > span { - align-items: center; - display: flex; - justify-content: center; - width: 100%; - aspect-ratio: 1 / 1; - } - - // Apply hover/persistent highlight to the square inner day box. - .ui-datepicker-persistent-highlight:not(.ui-datepicker-current-period), - .ui-datepicker-persistent-highlight:not(.ui-datepicker-current-period) > .ui-datepicker-persistent-highlight { - background: @color-period-selector-calendar-hover-background !important; - opacity: 1; - } - - .ui-datepicker-current-period > a, - .ui-datepicker-current-period > span { - background: @theme-color-text !important; - } - } - } -} - -.periodSelector-withPrevNext { - .move-period { - border: none; - cursor: pointer; - - &:disabled { - color: @color-silver; - cursor: auto; - } - } -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.mountedOwnership.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.mountedOwnership.spec.ts deleted file mode 100644 index 9883b5c897e451f6b0c897c2391ed9a06d2dbe20..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.mountedOwnership.spec.ts +++ /dev/null @@ -1,256 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import PeriodSelector from './PeriodSelector.vue'; - -window.piwik.minDateYear = 2011; -window.piwik.minDateMonth = 11; -window.piwik.minDateDay = 15; -window.piwik.maxDateYear = 2014; -window.piwik.maxDateMonth = 3; -window.piwik.maxDateDay = 29; - -describe('CoreHome/PeriodSelector/PeriodSelector mounted ownership interactions', () => { - const originalInitTopControls = window.initTopControls; - const originalUrl = (MatomoUrl as any).url.value; - - const setUrl = (url: string) => { - (MatomoUrl as any).url.value = new URL(url); - }; - - function mountSelector() { - return mount(PeriodSelector, { - shallow: true, - props: { - periods: ['day', 'week', 'month', 'year', 'range'], - }, - global: { - mocks: { - translate: (key: string) => key, - }, - stubs: { - PeriodSelectorOptionsColumn: false, - PeriodSelectorCalendarColumn: false, - }, - }, - }); - } - - beforeEach(() => { - if (!window.initTopControls) { - window.initTopControls = jest.fn(); - } - - setUrl( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=day&date=today' - + '#?period=day&date=today&category=General_Actions&subcategory=General_Pages', - ); - }); - - afterEach(() => { - (MatomoUrl as any).url.value = originalUrl; - window.initTopControls = originalInitTopControls; - }); - - it('allows single-calendar interaction after a preset shortcut is selected', async () => { - const wrapper = mountSelector(); - - const commitSelectionToUrl = jest.fn(); - (wrapper.vm as any).commitSelectionToUrl = commitSelectionToUrl; - await wrapper.setData({ - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - calendarViewport: 'single', - }); - - wrapper.findComponent({ name: 'PeriodDatePicker' }).vm.$emit('select', { - date: new Date('2026-02-18'), - }); - - expect(commitSelectionToUrl).toHaveBeenCalledTimes(1); - wrapper.unmount(); - }); - - it('allows single-calendar interaction after switching to a period option', async () => { - const wrapper = mountSelector(); - - const commitSelectionToUrl = jest.fn(); - (wrapper.vm as any).commitSelectionToUrl = commitSelectionToUrl; - await wrapper.setData({ - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - calendarViewport: 'single', - }); - - wrapper.findComponent({ name: 'PeriodOptions' }).vm.$emit('select', { period: 'day' }); - wrapper.findComponent({ name: 'PeriodDatePicker' }).vm.$emit('select', { - date: new Date('2026-02-18'), - }); - - expect(commitSelectionToUrl).toHaveBeenCalledTimes(1); - wrapper.unmount(); - }); - - it('allows dual-calendar interaction after a preset shortcut is selected', async () => { - const wrapper = mountSelector(); - await wrapper.setData({ - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - calendarViewport: 'range', - isRangeValid: false, - appliedRangeStartDate: '2026-01-01', - appliedRangeEndDate: '2026-01-31', - }); - - wrapper.findComponent({ name: 'DateRangePicker' }).vm.$emit('range-change', { - start: '2026-02-01', - end: '2026-02-18', - }); - - expect((wrapper.vm as any).isRangeValid).toBe(true); - expect((wrapper.vm as any).appliedRangeStartDate).toBe('2026-02-01'); - expect((wrapper.vm as any).appliedRangeEndDate).toBe('2026-02-18'); - wrapper.unmount(); - }); - - it('allows dual-calendar interaction when period option owns selection', async () => { - const wrapper = mountSelector(); - await wrapper.setData({ - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - calendarViewport: 'range', - isRangeValid: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - }); - - wrapper.findComponent({ name: 'DateRangePicker' }).vm.$emit('range-change', { - start: '2026-02-01', - end: '2026-02-18', - }); - - expect((wrapper.vm as any).isRangeValid).toBe(true); - expect((wrapper.vm as any).appliedRangeStartDate).toBe('2026-02-01'); - expect((wrapper.vm as any).appliedRangeEndDate).toBe('2026-02-18'); - wrapper.unmount(); - }); - - it('marks the corresponding period as selected when a preset resolves to that period', async () => { - const wrapper = mountSelector(); - - (wrapper.vm as any).onPresetDateRangeSelected({ - id: 'today', - period: 'day', - date: '2026-02-18', - urlDate: 'today', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-18'), - endDate: new Date('2026-02-18'), - }); - - await wrapper.vm.$nextTick(); - expect(wrapper.findComponent({ name: 'PeriodOptions' }).props('checkedPeriodId')).toBe('day'); - - (wrapper.vm as any).onPresetDateRangeSelected({ - id: 'lastWeekMonSun', - period: 'week', - date: '2026-02-09', - urlDate: 'lastweek', - selectedDate: new Date('2026-02-09'), - startDate: new Date('2026-02-09'), - endDate: new Date('2026-02-15'), - }); - - await wrapper.vm.$nextTick(); - expect(wrapper.findComponent({ name: 'PeriodOptions' }).props('checkedPeriodId')).toBe('week'); - wrapper.unmount(); - }); - - it('keeps a preset shortcut highlighted after close/reopen without apply', async () => { - const wrapper = mountSelector(); - - (wrapper.vm as any).onPresetDateRangeSelected({ - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }); - - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'preset', id: 'last30days' }); - expect((wrapper.vm as any).activePresetId).toBe('last30days'); - - (wrapper.vm as any).onClosed({ detail: 1 }); - (wrapper.vm as any).onExpand({ detail: 1 }); - - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'preset', id: 'last30days' }); - expect((wrapper.vm as any).activePresetId).toBe('last30days'); - wrapper.unmount(); - }); - - it('switches the highlighted preset off when a period option is selected', async () => { - const wrapper = mountSelector(); - - (wrapper.vm as any).onPresetDateRangeSelected({ - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }); - - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'preset', id: 'last30days' }); - expect((wrapper.vm as any).activePresetId).toBe('last30days'); - - wrapper.findComponent({ name: 'PeriodOptions' }).vm.$emit('select', { period: 'month' }); - - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'period', id: 'month' }); - expect((wrapper.vm as any).activePresetId).toBe('thisMonth'); - expect((wrapper.vm as any).pendingPresetSelection).toBeNull(); - wrapper.unmount(); - }); - - it('closes on outside click without committing a staged range selection', async () => { - const wrapper = mountSelector(); - - const updateLocationSpy = jest.spyOn(MatomoUrl, 'updateLocation'); - - (wrapper.vm as any).onPresetDateRangeSelected({ - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }); - - const root = wrapper.find('.periodSelector').element as HTMLElement; - root.classList.add('expanded'); - - document.body.dispatchEvent(new MouseEvent('mousedown', { bubbles: true })); - document.body.dispatchEvent(new MouseEvent('mouseup', { bubbles: true })); - - expect(root.classList.contains('expanded')).toBe(false); - expect(updateLocationSpy).not.toHaveBeenCalled(); - expect((wrapper.vm as any).uiSelection).toEqual({ type: 'preset', id: 'last30days' }); - expect((wrapper.vm as any).pendingPresetSelection).toEqual(expect.objectContaining({ - id: 'last30days', - period: 'range', - })); - expect((wrapper.vm as any).activePresetId).toBe('last30days'); - - updateLocationSpy.mockRestore(); - wrapper.unmount(); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.selection.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.selection.spec.ts deleted file mode 100644 index 17ca52af2fa5fe4dab221178b92d3465ca41a9e5..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.selection.spec.ts +++ /dev/null @@ -1,988 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import PeriodSelector from './PeriodSelector.vue'; -import { Periods, format } from '../Periods'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; - -window.piwik.minDateYear = 2011; -window.piwik.minDateMonth = 11; -window.piwik.minDateDay = 15; -window.piwik.maxDateYear = 2014; -window.piwik.maxDateMonth = 3; -window.piwik.maxDateDay = 29; - -describe('PeriodSelector', () => { - const component = PeriodSelector as unknown as { - methods: Record unknown>; - computed: Record unknown>; - }; - const { methods, computed } = component; - function callOnApplyClicked(vm: any) { - vm.hasPendingPresetSelectionOwnedByUi = methods.hasPendingPresetSelectionOwnedByUi; - vm.shouldCloseSelectorWithoutApplying = methods.shouldCloseSelectorWithoutApplying; - vm.hasCommittedRangeBounds = methods.hasCommittedRangeBounds; - vm.applyPendingPresetSelection = methods.applyPendingPresetSelection; - vm.applyRangeSelection = methods.applyRangeSelection; - vm.applyNonRangeOrCompareChanges = methods.applyNonRangeOrCompareChanges; - methods.onApplyClicked.call(vm); - } - function createApplyVm(overrides: Record = {}): any { - return { - pendingPresetSelection: null, - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - selectedPeriod: 'day', - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - appliedRangeStartDate: '2026-02-01', - appliedRangeEndDate: '2026-02-18', - selectedDateString: '2026-02-01,2026-02-18', - isCompareDirty: true, - isComparing: false, - comparePeriodType: 'previousPeriod', - isCompareRangeValid: jest.fn(() => true), - hasPendingNonRangePeriodChange: false, - getCurrentRollingDateParamIfOwnedByPreset: jest.fn(() => null), - closePeriodSelector: jest.fn(), - commitSelectionToUrl: jest.fn(), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - ...overrides, - }; - } - function expectCommitSelection(vm: any, date: string, period: string) { - expect(vm.commitSelectionToUrl).toHaveBeenCalledWith(date, period); - } - function expectNoCommitSelection(vm: any) { - expect(vm.commitSelectionToUrl).not.toHaveBeenCalled(); - } - it('stages preset selection and switches to dual calendar for range presets', () => { - const appliedDate = new Date('2026-02-18'); - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - pendingPresetSelection: null, - selectedPeriod: 'day', - committedPeriod: 'day', - calendarViewport: 'single', - committedAnchorDate: appliedDate, - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - isRangeValid: false, - commitSelectionToUrl: jest.fn(), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - }; - - methods.onPresetDateRangeSelected.call(vm, { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }); - - expect(vm.uiSelection).toEqual({ type: 'preset', id: 'last7days' }); - expect(computed.activePresetId.call(vm)).toBe('last7days'); - expect(vm.pendingPresetSelection).toMatchObject({ - id: 'last7days', - period: 'range', - }); - expect(vm.calendarViewport).toBe('range'); - expect(vm.committedAnchorDate).toBe(appliedDate); - expect(vm.appliedRangeStartDate).toBe('2026-02-18'); - expect(vm.appliedRangeEndDate).toBe('2026-02-18'); - expect(vm.commitSelectionToUrl).not.toHaveBeenCalled(); - }); - - it('keeps single calendar for non-dual presets', () => { - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - pendingPresetSelection: null, - selectedPeriod: 'day', - calendarViewport: 'range', - singleCalendarPeriod: 'day', - singleCalendarSelectedDate: null, - committedAnchorDate: new Date('2026-02-18'), - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - isRangeValid: false, - commitSelectionToUrl: jest.fn(), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - }; - - methods.onPresetDateRangeSelected.call(vm, { - id: 'yesterday', - period: 'day', - date: '2026-02-17', - urlDate: 'yesterday', - selectedDate: new Date('2026-02-17'), - startDate: new Date('2026-02-17'), - endDate: new Date('2026-02-17'), - }); - - expect(vm.uiSelection).toEqual({ type: 'preset', id: 'yesterday' }); - expect(vm.calendarViewport).toBe('single'); - expect(vm.singleCalendarPeriod).toBe('day'); - expect(vm.pendingPresetSelection).toMatchObject({ - id: 'yesterday', - period: 'day', - }); - expect(computed.activePresetId.call(vm)).toBe('yesterday'); - expect(vm.singleCalendarSelectedDate).toEqual(new Date('2026-02-17')); - expect(vm.commitSelectionToUrl).not.toHaveBeenCalled(); - }); - - it('ignores preset selections that resolve to disallowed periods', () => { - const vm: any = { - periodsFiltered: ['day'], - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - pendingPresetSelection: null, - selectedPeriod: 'day', - calendarViewport: 'single', - isRangeValid: false, - setUiSelection: jest.fn(), - }; - - methods.onPresetDateRangeSelected.call(vm, { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }); - - expect(vm.setUiSelection).not.toHaveBeenCalled(); - expect(vm.uiSelection).toEqual({ type: 'period', id: 'day' }); - expect(computed.activePresetId.call(vm)).toBeNull(); - expect(vm.pendingPresetSelection).toBeNull(); - expect(vm.selectedPeriod).toBe('day'); - expect(vm.calendarViewport).toBe('single'); - expect(vm.isRangeValid).toBe(false); - }); - - it('applies preset only on apply click', () => { - const presetStart = new Date('2026-01-20'); - const presetEnd = new Date('2026-02-18'); - const vm: any = createApplyVm({ - uiSelection: { type: 'preset', id: 'last30days' }, - pendingPresetSelection: { - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: presetStart, - endDate: presetEnd, - }, - committedPeriod: 'day', - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - }); - - callOnApplyClicked(vm); - - expect(vm.committedPeriod).toBe('range'); - expect(vm.committedAnchorDate).toEqual(presetEnd); - expect(vm.uiSelection).toEqual({ type: 'period', id: 'range' }); - expect(vm.appliedRangeStartDate).toBe('2026-01-20'); - expect(vm.appliedRangeEndDate).toBe('2026-02-18'); - expectCommitSelection(vm, 'last30', 'range'); - }); - - it('applies concrete single-date values when a single preset is applied', () => { - const vm: any = createApplyVm({ - uiSelection: { type: 'preset', id: 'thisWeekMonToday' }, - pendingPresetSelection: { - id: 'thisWeekMonToday', - period: 'week', - date: '2026-02-16', - urlDate: 'today', - selectedDate: new Date('2026-02-16'), - startDate: new Date('2026-02-16'), - endDate: new Date('2026-02-18'), - }, - committedPeriod: 'day', - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - }); - - callOnApplyClicked(vm); - - expect(vm.committedPeriod).toBe('week'); - expect(vm.committedAnchorDate).toEqual(new Date('2026-02-16')); - expect(vm.uiSelection).toEqual({ type: 'period', id: 'week' }); - expectCommitSelection(vm, 'today', 'week'); - }); - - it('applies the concrete staged range even when the visible range is clamped', () => { - const vm: any = createApplyVm({ - uiSelection: { type: 'preset', id: 'last7days' }, - pendingPresetSelection: { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }, - appliedRangeStartDate: '2026-02-14', - appliedRangeEndDate: '2026-02-15', - committedPeriod: 'day', - }); - - callOnApplyClicked(vm); - - expect(vm.committedPeriod).toBe('range'); - expectCommitSelection(vm, 'last7', 'range'); - expect(vm.commitSelectionToUrl).not.toHaveBeenCalledWith('2026-02-14,2026-02-15', 'range'); - }); - - it('keeps currently viewing text unchanged before apply after preset click', () => { - const appliedDate = new Date('2026-02-18'); - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - pendingPresetSelection: null, - selectedPeriod: 'day', - committedPeriod: 'day', - calendarViewport: 'single', - committedAnchorDate: appliedDate, - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - isRangeValid: false, - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - }; - - const before = computed.currentlyViewingText.call(vm); - - methods.onPresetDateRangeSelected.call(vm, { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }); - - const after = computed.currentlyViewingText.call(vm); - expect(before).toBe(after); - }); - - it('keeps applied range text unchanged before apply after range preset click', () => { - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'range' }, - lastInteractionSource: null, - pendingPresetSelection: null, - selectedPeriod: 'range', - committedPeriod: 'range', - calendarViewport: 'range', - committedAnchorDate: new Date('2026-01-01'), - appliedRangeStartDate: '2026-01-01', - appliedRangeEndDate: '2026-01-31', - isRangeValid: true, - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - }; - - const before = computed.currentlyViewingText.call(vm); - - methods.onPresetDateRangeSelected.call(vm, { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }); - - expect(vm.appliedRangeStartDate).toBe('2026-01-01'); - expect(vm.appliedRangeEndDate).toBe('2026-01-31'); - expect(computed.currentlyViewingText.call(vm)).toBe(before); - }); - - it('uses staged range preview values when range preset is selected', () => { - const vm: any = { - uiSelection: { type: 'preset', id: 'last7days' }, - selectedPeriod: 'range', - pendingPresetSelection: { - id: 'last7days', - period: 'range', - date: '2026-02-12,2026-02-18', - urlDate: 'last7', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-02-12'), - endDate: new Date('2026-02-18'), - }, - appliedRangeStartDate: '2026-01-01', - appliedRangeEndDate: '2026-01-31', - isRangePresetSelection: true, - }; - - expect(computed.displayRangeStartDate.call(vm)).toBe('2026-02-12'); - expect(computed.displayRangeEndDate.call(vm)).toBe('2026-02-18'); - }); - - it('marks non-range period change as pending and does not apply on apply click', () => { - const vm: any = createApplyVm({ - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - selectedPeriod: 'day', - calendarViewport: 'single', - singleCalendarSelectedDate: new Date('2026-02-18'), - pendingPresetSelection: { id: 'today' }, - isCompareDirty: false, - hasPendingNonRangePeriodChange: true, - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - }); - - methods.onPeriodOptionSelected.call(vm, { period: 'week' }); - - expect(vm.selectedPeriod).toBe('week'); - expect(vm.calendarViewport).toBe('single'); - expect(vm.singleCalendarSelectedDate).toBeNull(); - expect(vm.pendingPresetSelection).toBeNull(); - expect(computed.activePresetId.call(vm)).toBeNull(); - - callOnApplyClicked(vm); - - expectNoCommitSelection(vm); - }); - - it('restores applied date when returning to applied period without calendar click', () => { - const appliedDate = new Date('2026-03-03'); - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - selectedPeriod: 'day', - committedPeriod: 'day', - committedAnchorDate: appliedDate, - calendarViewport: 'single', - singleCalendarPeriod: 'day', - singleCalendarSelectedDate: appliedDate, - clearPresetSelection: jest.fn(), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - }; - - methods.onPeriodOptionSelected.call(vm, { period: 'week' }); - expect(vm.singleCalendarSelectedDate).toBeNull(); - - methods.onPeriodOptionSelected.call(vm, { period: 'day' }); - expect(vm.singleCalendarSelectedDate).toBe(appliedDate); - }); - - it('treats non-range pending state as period-change-only', () => { - const samePeriodVm: any = { - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: 'period', - selectedPeriod: 'day', - committedPeriod: 'day', - }; - expect(computed.hasPendingNonRangePeriodChange.call(samePeriodVm)).toBe(false); - - const changedPeriodVm: any = { - uiSelection: { type: 'period', id: 'week' }, - lastInteractionSource: 'period', - selectedPeriod: 'week', - committedPeriod: 'day', - }; - expect(computed.hasPendingNonRangePeriodChange.call(changedPeriodVm)).toBe(true); - }); - - it('rehydrates preset ownership from tokenized hash values', () => { - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'period', id: 'day' }, - pendingPresetSelection: { id: 'last30days' }, - setUiSelection: jest.fn(), - clearPresetSelection: jest.fn(), - }; - - methods.applyUiSelectionFromHash.call(vm, 'range', 'last7', null); - - expect(vm.uiSelection).toEqual({ type: 'preset', id: 'last7days' }); - expect(vm.pendingPresetSelection).toBeNull(); - expect(vm.setUiSelection).not.toHaveBeenCalled(); - expect(vm.clearPresetSelection).not.toHaveBeenCalled(); - }); - - it('does not infer quarter presets from explicit range values in hash sync', () => { - const vm: any = { - periodsFiltered: ['day', 'week', 'month', 'year', 'range'], - uiSelection: { type: 'preset', id: 'last7days' }, - selectedPeriod: 'range', - committedPeriod: 'range', - committedAnchorDate: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - }; - - methods.applyUiSelectionFromHash.call(vm, 'range', '2026-01-01,2026-03-31', null); - - expect(vm.uiSelection).toEqual({ type: 'period', id: 'range' }); - expect(computed.activePresetId.call(vm)).toBeNull(); - }); - - it('commits the concrete range when applying compare-only changes', () => { - const vm: any = createApplyVm({ - selectedPeriod: 'range', - committedPeriod: 'range', - appliedRangeStartDate: '2026-02-01', - appliedRangeEndDate: '2026-02-18', - getCurrentRollingDateParamIfOwnedByPreset: jest.fn(() => null), - }); - - callOnApplyClicked(vm); - - expectCommitSelection(vm, '2026-02-01,2026-02-18', 'range'); - }); - - it('commits the concrete date for non-range compare-only changes', () => { - const vm: any = createApplyVm({ - selectedPeriod: 'week', - committedPeriod: 'week', - committedAnchorDate: new Date('2026-02-18'), - getCurrentRollingDateParamIfOwnedByPreset: jest.fn(() => null), - }); - - callOnApplyClicked(vm); - - expectCommitSelection(vm, '2026-02-18', 'week'); - }); - - it('stops when applying a non-range selection that is already committed and unchanged', () => { - const vm: any = createApplyVm({ - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - committedPeriod: 'day', - isComparing: false, - comparePeriodType: 'previousPeriod', - isCompareRangeValid: jest.fn(() => true), - isCompareDirty: false, - }); - - callOnApplyClicked(vm); - - expect(vm.closePeriodSelector).toHaveBeenCalledTimes(1); - expectNoCommitSelection(vm); - }); - - it('disables apply for pending non-range period option selection', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'week' }, - hasPendingNonRangePeriodChange: true, - selectedPeriod: 'week', - pendingPresetSelection: null, - isRangeValid: true, - isComparing: false, - comparePeriodType: 'previousPeriod', - isCompareRangeValid: jest.fn(() => true), - }; - - expect(methods.isApplyEnabled.call(vm)).toBe(false); - }); - - it('enables apply for a valid period-owned range selection', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - hasPendingNonRangePeriodChange: false, - pendingPresetSelection: null, - isRangeValid: true, - isComparing: false, - comparePeriodType: 'previousPeriod', - isCompareRangeValid: jest.fn(() => true), - }; - - expect(methods.isApplyEnabled.call(vm)).toBe(true); - }); - - it('disables apply when opening with non-range period option selected and no compare changes', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - isCompareDirty: false, - hasPendingNonRangePeriodChange: false, - pendingPresetSelection: null, - isRangeValid: true, - isComparing: false, - comparePeriodType: 'previousPeriod', - isCompareRangeValid: jest.fn(() => true), - }; - - expect(methods.isApplyEnabled.call(vm)).toBe(true); - }); - - it('enables Apply for period-owned non-range selection when compare is dirty', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - isCompareDirty: true, - hasPendingNonRangePeriodChange: false, - pendingPresetSelection: null, - isRangeValid: true, - isComparing: true, - comparePeriodType: 'custom', - isCompareRangeValid: jest.fn(() => true), - }; - - expect(methods.isApplyEnabled.call(vm)).toBe(true); - }); - - it('commits compare edits in period-owned non-range mode via Apply without calendar click', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - appliedRangeStartDate: '2026-02-18', - appliedRangeEndDate: '2026-02-18', - isCompareDirty: true, - closePeriodSelector: jest.fn(), - commitSelectionToUrl: methods.commitSelectionToUrl, - ...createApplyVm({ - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - isCompareDirty: true, - }), - }; - - callOnApplyClicked(vm); - - expectCommitSelection(vm, '2026-02-18', 'day'); - }); - - it('enables apply immediately when date range period option is selected', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - selectedPeriod: 'day', - calendarViewport: 'single', - isRangeValid: null, - isCompareDirty: false, - hasPendingNonRangePeriodChange: false, - pendingPresetSelection: null, - isComparing: false, - comparePeriodType: 'previousPeriod', - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection: jest.fn(), - isCompareRangeValid: jest.fn(() => true), - }; - - methods.onPeriodOptionSelected.call(vm, { period: 'range' }); - - expect(vm.isRangeValid).toBe(true); - expect(methods.isApplyEnabled.call(vm)).toBe(true); - }); - - it('applies non-range period via calendar click', () => { - const vm: any = { - calendarViewport: 'single', - uiSelection: { type: 'period', id: 'week' }, - selectedPeriod: 'week', - canInteractWithSingleCalendar: jest.fn(() => true), - setUiSelection: jest.fn(), - setPendingPeriodAndDate: jest.fn(), - clearPresetSelection: jest.fn(), - commitSelectionToUrl: jest.fn(), - }; - - methods.onDatePickerSelected.call(vm, new Date('2026-02-18')); - - expect(vm.setPendingPeriodAndDate).toHaveBeenCalledTimes(1); - expect(vm.commitSelectionToUrl).toHaveBeenCalledWith(expect.any(String), 'week'); - }); - - it('updates the active preset when the current calendar selection matches a preset', () => { - const originalTimezoneOffset = window.piwik.timezoneOffset; - const nowSpy = jest.spyOn(Date, 'now').mockReturnValue(new Date('2026-06-01T12:00:00Z').valueOf()); - window.piwik.timezoneOffset = 0; - - const vm: any = { - pendingPresetSelection: null, - selectedPeriod: 'day', - committedAnchorDate: new Date('2026-06-01'), - appliedRangeStartDate: '2026-06-01', - appliedRangeEndDate: '2026-06-01', - }; - - try { - expect(computed.activePresetId.call(vm)).toBe('today'); - - vm.committedAnchorDate = new Date('2026-05-30'); - vm.appliedRangeStartDate = '2026-05-30'; - vm.appliedRangeEndDate = '2026-05-30'; - - expect(computed.activePresetId.call(vm)).toBeNull(); - } finally { - nowSpy.mockRestore(); - window.piwik.timezoneOffset = originalTimezoneOffset; - } - }); - - it('keeps range period pending until apply', () => { - const vm: any = { - uiSelection: { type: 'period', id: 'day' }, - lastInteractionSource: null, - selectedPeriod: 'day', - calendarViewport: 'single', - commitSelectionToUrl: jest.fn(), - selectedDateString: '2026-02-01,2026-02-18', - getCurrentRollingDateParamIfOwnedByPreset: jest.fn(() => null), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection: jest.fn(), - }; - - methods.onPeriodOptionSelected.call(vm, { period: 'range' }); - - expect(vm.calendarViewport).toBe('range'); - expect(vm.commitSelectionToUrl).not.toHaveBeenCalled(); - - callOnApplyClicked(vm); - - expect(vm.commitSelectionToUrl).toHaveBeenCalledWith('2026-02-01,2026-02-18', 'range'); - }); - - it('exits preset mode when a period option is selected and apply uses period-owned range state', () => { - const vm: any = { - uiSelection: { type: 'preset', id: 'last30days' }, - lastInteractionSource: 'preset', - selectedPeriod: 'range', - committedPeriod: 'day', - calendarViewport: 'range', - pendingPresetSelection: { - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }, - appliedRangeStartDate: '2026-02-01', - appliedRangeEndDate: '2026-02-18', - selectedDateString: '2026-02-01,2026-02-18', - getCurrentRollingDateParamIfOwnedByPreset: jest.fn(() => null), - commitSelectionToUrl: jest.fn(), - setUiSelection(selection: { type: string; id: string }, source: string|null) { - this.uiSelection = selection; - this.lastInteractionSource = source; - }, - clearPresetSelection() { - this.pendingPresetSelection = null; - }, - }; - - methods.onPeriodOptionSelected.call(vm, { period: 'range' }); - - expect(vm.uiSelection).toEqual({ type: 'period', id: 'range' }); - expect(vm.pendingPresetSelection).toBeNull(); - - callOnApplyClicked(vm); - - expect(vm.commitSelectionToUrl).toHaveBeenCalledWith('2026-02-01,2026-02-18', 'range'); - expect(vm.commitSelectionToUrl).not.toHaveBeenCalledWith('2026-01-20,2026-02-18', 'range'); - }); - - it('updates range values only when viewport is range and owner is period', () => { - const allowedVm: any = { - calendarViewport: 'range', - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - canInteractWithRangeCalendar: jest.fn(() => true), - isRangeValid: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - setUiSelection: jest.fn(), - clearPresetSelection: jest.fn(), - }; - - methods.onRangeChange.call(allowedVm, '2026-02-01', '2026-02-18'); - - expect(allowedVm.isRangeValid).toBe(true); - expect(allowedVm.appliedRangeStartDate).toBe('2026-02-01'); - expect(allowedVm.appliedRangeEndDate).toBe('2026-02-18'); - - const ignoredVm: any = { - calendarViewport: 'range', - uiSelection: { type: 'preset', id: 'last30days' }, - selectedPeriod: 'range', - canInteractWithRangeCalendar: jest.fn(() => false), - isRangeValid: false, - appliedRangeStartDate: '2026-01-01', - appliedRangeEndDate: '2026-01-31', - setUiSelection: jest.fn(), - }; - - methods.onRangeChange.call(ignoredVm, '2026-02-01', '2026-02-18'); - - expect(ignoredVm.isRangeValid).toBe(false); - expect(ignoredVm.appliedRangeStartDate).toBe('2026-01-01'); - expect(ignoredVm.appliedRangeEndDate).toBe('2026-01-31'); - }); - - it('applies preset immediately on double click', () => { - const selection = { - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }; - const vm: any = { - onPresetDateRangeSelected: jest.fn(), - onApplyClicked: jest.fn(), - hasInvalidCustomComparison: jest.fn(() => false), - }; - - methods.onPresetDateRangeDblClick.call(vm, selection); - - expect(vm.onPresetDateRangeSelected).toHaveBeenCalledWith(selection); - expect(vm.onApplyClicked).toHaveBeenCalled(); - }); - - it('does not immediately apply preset double click when custom comparison range is invalid', () => { - const selection = { - id: 'last30days', - period: 'range', - date: '2026-01-20,2026-02-18', - urlDate: 'last30', - selectedDate: new Date('2026-02-18'), - startDate: new Date('2026-01-20'), - endDate: new Date('2026-02-18'), - }; - const vm: any = { - onPresetDateRangeSelected: jest.fn(), - onApplyClicked: jest.fn(), - hasInvalidCustomComparison: jest.fn(() => true), - showInvalidComparisonMessage: jest.fn(), - }; - - methods.onPresetDateRangeDblClick.call(vm, selection); - - expect(vm.onPresetDateRangeSelected).toHaveBeenCalledWith(selection); - expect(vm.onApplyClicked).not.toHaveBeenCalled(); - expect(vm.showInvalidComparisonMessage).toHaveBeenCalled(); - }); - - it('keeps legacy immediate apply behavior on non-range period double click', () => { - const vm: any = { - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - onPeriodOptionSelected: jest.fn(), - setPiwikPeriodAndDate: jest.fn(), - hasInvalidCustomComparison: jest.fn(() => false), - }; - - methods.onPeriodOptionDblClick.call(vm, { period: 'month' }); - - expect(vm.onPeriodOptionSelected).toHaveBeenCalledWith({ period: 'month' }); - expect(vm.setPiwikPeriodAndDate).toHaveBeenCalledWith('month', vm.committedAnchorDate); - }); - - it('does not immediately apply range period double click', () => { - const vm: any = { - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - onPeriodOptionSelected: jest.fn(), - setPiwikPeriodAndDate: jest.fn(), - hasInvalidCustomComparison: jest.fn(() => false), - }; - - methods.onPeriodOptionDblClick.call(vm, { period: 'range' }); - - expect(vm.onPeriodOptionSelected).toHaveBeenCalledWith({ period: 'range' }); - expect(vm.setPiwikPeriodAndDate).not.toHaveBeenCalled(); - }); - - it('does not immediately apply non-range period double click when custom comparison range is invalid', () => { - const vm: any = { - committedPeriod: 'day', - committedAnchorDate: new Date('2026-02-18'), - onPeriodOptionSelected: jest.fn(), - setPiwikPeriodAndDate: jest.fn(), - hasInvalidCustomComparison: jest.fn(() => true), - showInvalidComparisonMessage: jest.fn(), - }; - - methods.onPeriodOptionDblClick.call(vm, { period: 'month' }); - - expect(vm.onPeriodOptionSelected).toHaveBeenCalledWith({ period: 'month' }); - expect(vm.setPiwikPeriodAndDate).not.toHaveBeenCalled(); - expect(vm.showInvalidComparisonMessage).toHaveBeenCalled(); - }); - - it('shows invalid comparison message only after an invalid apply interaction', () => { - const vm: any = { - shouldShowInvalidComparisonMessage: false, - hasInvalidCustomComparison: jest.fn(() => true), - showInvalidComparisonMessage: methods.showInvalidComparisonMessage, - }; - - expect(methods.shouldDisplayInvalidComparisonMessage.call(vm)).toBe(false); - - methods.onDisabledApplyInteraction.call(vm); - - expect(vm.shouldShowInvalidComparisonMessage).toBe(true); - expect(methods.shouldDisplayInvalidComparisonMessage.call(vm)).toBe(true); - }); - - it('clears invalid comparison message when compare input changes', () => { - const vm: any = { - shouldShowInvalidComparisonMessage: true, - isComparing: true, - comparePeriodType: 'custom', - compareStartDate: '', - compareEndDate: '2026-02-18', - dismissInvalidComparisonMessage: methods.dismissInvalidComparisonMessage, - }; - - methods.onCompareStartDateUpdated.call(vm, '2026-02-01'); - - expect(vm.compareStartDate).toBe('2026-02-01'); - expect(vm.shouldShowInvalidComparisonMessage).toBe(false); - }); - - it('blocks calendar commit when the calendar handler reports it is unavailable', () => { - const vm: any = { - calendarViewport: 'single', - uiSelection: { type: 'period', id: 'day' }, - selectedPeriod: 'day', - canInteractWithSingleCalendar: jest.fn(() => false), - setUiSelection: jest.fn(), - setPendingPeriodAndDate: jest.fn(), - clearPresetSelection: jest.fn(), - commitSelectionToUrl: jest.fn(), - }; - - methods.onDatePickerSelected.call(vm, new Date('2026-02-18')); - - expect(vm.commitSelectionToUrl).not.toHaveBeenCalled(); - expect(vm.setPendingPeriodAndDate).not.toHaveBeenCalled(); - }); - - it('keeps range picker interaction driven by period selection', () => { - const presetRangeVm: any = { - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - }; - expect(computed.isRangePresetSelection.call(presetRangeVm)).toBe(false); - - const periodRangeVm: any = { - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - }; - expect(computed.isRangePresetSelection.call(periodRangeVm)).toBe(false); - }); - - it('applies a clamped date when movePeriod shifts past max boundary', () => { - const maxDate = new Date( - window.piwik.maxDateYear, - window.piwik.maxDateMonth - 1, - window.piwik.maxDateDay, - ); - const movedDate = new Date(maxDate.getTime()); - movedDate.setDate(movedDate.getDate() + 1); - - const vm: any = { - committedPeriod: 'day', - committedAnchorDate: new Date(maxDate.getTime()), - minAllowedDate: new Date( - window.piwik.minDateYear, - window.piwik.minDateMonth - 1, - window.piwik.minDateDay, - ), - maxAllowedDate: maxDate, - canMovePeriod: jest.fn(() => true), - setPiwikPeriodAndDate: jest.fn(), - }; - - methods.movePeriod.call(vm, 1); - - const appliedDate = vm.setPiwikPeriodAndDate.mock.calls[0][1] as Date; - expect(vm.setPiwikPeriodAndDate).toHaveBeenCalledWith('day', expect.any(Date)); - expect(appliedDate.getTime()).toBe(maxDate.getTime()); - expect(appliedDate.getTime()).not.toBe(movedDate.getTime()); - }); - - it('highlights last week for any date within that week', () => { - const originalTimezoneOffset = window.piwik.timezoneOffset; - const nowSpy = jest.spyOn(Date, 'now').mockReturnValue(new Date('2026-06-01T12:00:00Z').valueOf()); - window.piwik.timezoneOffset = 0; - - const vm: any = { - pendingPresetSelection: null, - selectedPeriod: 'week', - committedPeriod: 'week', - committedAnchorDate: new Date('2026-05-26'), - appliedRangeStartDate: null, - appliedRangeEndDate: null, - }; - - try { - expect(computed.activePresetId.call(vm)).toBe('lastWeekMonSun'); - } finally { - nowSpy.mockRestore(); - window.piwik.timezoneOffset = originalTimezoneOffset; - } - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.templateContract.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.templateContract.spec.ts deleted file mode 100644 index f4f3c8b7a6ac976bb886577c9dc5eadc6ca59c46..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.templateContract.spec.ts +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import PeriodSelector from './PeriodSelector.vue'; - -window.piwik.minDateYear = 2011; -window.piwik.minDateMonth = 11; -window.piwik.minDateDay = 15; -window.piwik.maxDateYear = 2014; -window.piwik.maxDateMonth = 3; -window.piwik.maxDateDay = 29; - -describe('PeriodSelector template contract', () => { - const originalInitTopControls = window.initTopControls; - const originalUrl = (MatomoUrl as any).url.value; - - const setUrl = (url: string) => { - (MatomoUrl as any).url.value = new URL(url); - }; - - function mountSelector() { - return mount(PeriodSelector, { - shallow: true, - props: { - periods: ['day', 'week', 'month', 'year', 'range'], - }, - global: { - mocks: { - translate: (key: string) => key, - }, - stubs: { - PeriodSelectorOptionsColumn: false, - PeriodSelectorCalendarColumn: false, - }, - }, - }); - } - - beforeEach(() => { - if (!window.initTopControls) { - window.initTopControls = jest.fn(); - } - - setUrl( - 'https://matomo.test/index.php?module=CoreHome&action=index&period=day&date=today' - + '#?period=day&date=today&category=General_Actions&subcategory=General_Pages', - ); - }); - - afterEach(() => { - (MatomoUrl as any).url.value = originalUrl; - window.initTopControls = originalInitTopControls; - }); - - it('keeps DOM hooks used by styles and behavior', async () => { - const wrapper = mountSelector(); - - expect(wrapper.find('#periodMore').exists()).toBe(true); - expect(wrapper.find('#periodMore').classes()).toContain('single-calendar'); - expect(wrapper.find('#otherPeriods').exists()).toBe(true); - expect(wrapper.find('#datepicker').exists()).toBe(true); - expect(wrapper.find('#calendarApply').exists()).toBe(true); - expect(wrapper.find('#ajaxLoadingCalendar').exists()).toBe(false); - - await wrapper.setData({ - isLoadingNewPage: true, - selectedPeriod: 'range', - }); - - expect(wrapper.find('#periodMore').classes()).toContain('dual-calendar'); - expect(wrapper.find('#ajaxLoadingCalendar').exists()).toBe(true); - wrapper.unmount(); - }); - - it('forwards child events to existing parent handlers/state', async () => { - const wrapper = mountSelector(); - - wrapper.findComponent({ name: 'PeriodSelectorOptionsColumn' }).vm.$emit('period-select', { - period: 'range', - }); - - expect((wrapper.vm as any).selectedPeriod).toBe('range'); - expect((wrapper.vm as any).calendarViewport).toBe('range'); - - await wrapper.setData({ - uiSelection: { type: 'period', id: 'range' }, - selectedPeriod: 'range', - calendarViewport: 'range', - isRangeValid: null, - appliedRangeStartDate: null, - appliedRangeEndDate: null, - }); - - wrapper.findComponent({ name: 'PeriodSelectorCalendarColumn' }).vm.$emit('range-change', { - start: '2026-02-01', - end: '2026-02-18', - }); - - expect((wrapper.vm as any).appliedRangeStartDate).toBe('2026-02-01'); - expect((wrapper.vm as any).appliedRangeEndDate).toBe('2026-02-18'); - - wrapper.findComponent({ name: 'PeriodSelectorCalendarColumn' }).vm.$emit( - 'update:comparePeriodType', - 'previousYear', - ); - - expect((wrapper.vm as any).comparePeriodType).toBe('previousYear'); - wrapper.unmount(); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.types.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.types.ts deleted file mode 100644 index d75fdd43e42e2c28ea7d5996ad8edc2686f907dc..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.types.ts +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import type { - PresetDateRangeId, - PresetDateRangeSelection, -} from './PresetDateRangeResolver'; -import type { UiSelection as HashSyncUiSelection } from './PeriodSelector.hashSync'; - -const NBSP = '\u00A0'; - -export const COMPARE_PERIOD_TYPES = ['custom', 'previousPeriod', 'previousYear']; - -export const COMPARE_PERIOD_OPTIONS = [ - { key: 'custom', value: translate('General_Custom') }, - { - key: 'previousPeriod', - value: translate('General_PreviousPeriod').replace(/\s+/, NBSP), - }, - { - key: 'previousYear', - value: translate('General_PreviousYear').replace(/\s+/, NBSP), - }, -]; - -export function getSiteMinAllowedDate(): Date { - return new Date(window.piwik.minDateYear, window.piwik.minDateMonth - 1, window.piwik.minDateDay); -} - -export function getSiteMaxAllowedDate(): Date { - return new Date(window.piwik.maxDateYear, window.piwik.maxDateMonth - 1, window.piwik.maxDateDay); -} - -export const RANGE_PERIOD = 'range'; - -export type InteractionSource = 'period' | 'preset' | 'calendar' | 'range' | null; -export type SingleCalendarPeriod = 'day' | 'week' | 'month' | 'year'; -export type CalendarViewport = 'single' | 'range'; -export type UiSelection = HashSyncUiSelection; - -export function isValidDate(candidateDate: unknown): boolean { - if (Object.prototype.toString.call(candidateDate) !== '[object Date]') { - return false; - } - - return !Number.isNaN((candidateDate as Date).getTime()); -} - -export function isSingleCalendarPeriod(period: string): period is SingleCalendarPeriod { - return period === 'day' - || period === 'week' - || period === 'month' - || period === 'year'; -} - -export interface PeriodSelectorState { - uiSelection: UiSelection; - lastInteractionSource: InteractionSource; - nextHashUiSelection: UiSelection|null; - nextHashSelectionKey: string|null; - lastKnownHashSelectionKey: string|null; - lastKnownHashContextKey: string|null; - minAllowedDate: Date; - maxAllowedDate: Date; - pendingPresetSelection: PresetDateRangeSelection|null; - committedPeriod: string; - committedAnchorDate: Date|null; - selectedPeriod: string; - calendarViewport: CalendarViewport; - singleCalendarPeriod: SingleCalendarPeriod; - singleCalendarSelectedDate: Date|null; - appliedRangeStartDate: string|null; - appliedRangeEndDate: string|null; - isRangeValid: boolean|null; - isLoadingNewPage: boolean; - isComparing: null|boolean; - comparePeriodType: string; - compareStartDate: string; - compareEndDate: string; - compareAppliedSignature: string; - shouldShowInvalidComparisonMessage: boolean; -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue deleted file mode 100644 index 4ea7edbfc1c0d1b9a536ac16f89eece7479d4075..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue +++ /dev/null @@ -1,1036 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue deleted file mode 100644 index 8f76b2e0f6e8c4a74b16caae2aeb596ce8ca063c..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCalendarColumn.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.component.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.component.spec.ts deleted file mode 100644 index f723e65dc66c0a4a87883aabb7b027a44fb774bd..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.component.spec.ts +++ /dev/null @@ -1,103 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import PeriodSelectorCompareControls from './PeriodSelectorCompareControls.vue'; - -describe('PeriodSelectorCompareControls', () => { - function mountComponent(customProps = {}) { - return mount(PeriodSelectorCompareControls, { - props: { - isComparisonEnabled: true, - isComparing: false, - comparePeriodType: 'previousPeriod', - compareStartDate: '', - compareEndDate: '', - comparePeriodDropdownOptions: [ - { key: 'custom', value: 'Custom' }, - { key: 'previousPeriod', value: 'Previous period' }, - ], - showInvalidComparisonMessage: false, - ...customProps, - }, - global: { - stubs: { - Field: { - props: ['modelValue', 'name', 'uicontrol', 'disabled', 'style'], - template: ` - - `, - }, - }, - }, - }); - } - - it('emits update:isComparing when compare checkbox changes', async () => { - const wrapper = mountComponent({ isComparing: false }); - - await wrapper.find('#comparePeriodTo').setValue(true); - - expect(wrapper.emitted('update:isComparing')?.[0]).toEqual([true]); - }); - - it('emits compare period type update from dropdown field', async () => { - const wrapper = mountComponent({ isComparing: true }); - const compareTypeField = wrapper.find('.field-stub[data-name="comparePeriodToDropdown"]'); - - await compareTypeField.setValue('custom'); - - expect(wrapper.emitted('update:comparePeriodType')?.[0]).toEqual(['custom']); - }); - - it('emits compare range updates for custom compare mode', async () => { - const wrapper = mountComponent({ - isComparing: true, - comparePeriodType: 'custom', - compareStartDate: '2026-02-01', - compareEndDate: '2026-02-07', - }); - - const startField = wrapper.find('.field-stub[data-name="comparePeriodStartDate"]'); - const endField = wrapper.find('.field-stub[data-name="comparePeriodEndDate"]'); - - await startField.setValue('2026-02-02'); - await endField.setValue('2026-02-08'); - - expect(wrapper.emitted('update:compareStartDate')?.[0]).toEqual(['2026-02-02']); - expect(wrapper.emitted('update:compareEndDate')?.[0]).toEqual(['2026-02-08']); - }); - - it('keeps compare controls hidden/disabled according to state', () => { - const wrapper = mountComponent({ - isComparing: false, - comparePeriodType: 'custom', - }); - - const compareDropdown = wrapper.find('.field-stub[data-name="comparePeriodToDropdown"]'); - - expect(compareDropdown.attributes('disabled')).toBeDefined(); - expect(wrapper.find('#comparePeriodStartDate').exists()).toBe(false); - expect(wrapper.find('#comparePeriodEndDate').exists()).toBe(false); - }); - - it('shows inline validation message for invalid custom comparison range', () => { - const wrapper = mountComponent({ - isComparing: true, - comparePeriodType: 'custom', - showInvalidComparisonMessage: true, - }); - - expect(wrapper.find('.compare-validation-message').exists()).toBe(true); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue deleted file mode 100644 index c4591a8df5a6a02809d364ca5cc4809db9e1f15e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorCompareControls.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue deleted file mode 100644 index 27e4daa205c81ecff7bbad8c656b7e18b5260544..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelectorOptionsColumn.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.spec.ts deleted file mode 100644 index 5050d795f8109567a149b45e4fdefd9f31fd7ac0..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.spec.ts +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - getPresetIdFromPeriodAndDate, - resolvePresetDateRange, -} from './PresetDateRangeResolver'; - -describe('PresetDateRangeResolver', () => { - it('resolves every preset id from its concrete period/date value', () => { - const today = new Date('2026-02-16'); - - const testCases = [ - 'today', - 'yesterday', - 'last7days', - 'last30days', - 'last90days', - 'lastWeekMonSun', - 'lastMonth', - 'lastQuarter', - 'lastYear', - 'thisWeekMonToday', - 'thisMonth', - 'thisQuarter', - 'thisYear', - ] as const; - - for (const presetId of testCases) { - const resolvedPreset = resolvePresetDateRange(presetId, today); - - expect( - getPresetIdFromPeriodAndDate(resolvedPreset.period, resolvedPreset.date, today), - ).toBe(presetId); - } - }); - - it('provides tokenized urlDate values for presets that support rolling URLs', () => { - const today = new Date('2026-02-16'); - - expect(resolvePresetDateRange('today', today).urlDate).toBe('today'); - expect(resolvePresetDateRange('last7days', today).urlDate).toBe('last7'); - expect(resolvePresetDateRange('lastMonth', today).urlDate).toBe('lastmonth'); - expect(resolvePresetDateRange('thisMonth', today).urlDate).toBe('today'); - }); - - it('falls back to concrete urlDate values for presets without rolling URL support', () => { - const today = new Date('2026-02-16'); - - const lastQuarter = resolvePresetDateRange('lastQuarter', today); - const thisQuarter = resolvePresetDateRange('thisQuarter', today); - - expect(lastQuarter.urlDate).toBe(lastQuarter.date); - expect(thisQuarter.urlDate).toBe(thisQuarter.date); - }); - - it('resolves week presets from any date in the matching week', () => { - const today = new Date('2026-06-02'); - - expect(getPresetIdFromPeriodAndDate('week', '2026-05-26', today)).toBe('lastWeekMonSun'); - }); - - it('resolves month and year presets from any date in the matching period', () => { - const today = new Date('2026-02-16'); - - expect(getPresetIdFromPeriodAndDate('month', '2026-01-02', today)).toBe('lastMonth'); - expect(getPresetIdFromPeriodAndDate('year', '2025-06-15', today)).toBe('lastYear'); - }); - - it('resolves current-period presets from any date in the current period', () => { - const today = new Date('2026-06-02'); - - expect(getPresetIdFromPeriodAndDate('week', '2026-06-01', today)).toBe('thisWeekMonToday'); - expect(getPresetIdFromPeriodAndDate('month', '2026-06-01', today)).toBe('thisMonth'); - expect(getPresetIdFromPeriodAndDate('year', '2026-01-23', today)).toBe('thisYear'); - }); - - it('resolves thisQuarter only for the exact start-of-quarter to today range', () => { - const today = new Date('2026-02-16'); - - expect(getPresetIdFromPeriodAndDate('range', '2026-01-01,2026-02-16', today)) - .toBe('thisQuarter'); - expect(getPresetIdFromPeriodAndDate('range', '2026-01-01,2026-03-31', today)) - .toBeNull(); - expect(getPresetIdFromPeriodAndDate('range', '2026-01-01,2026-02-15', today)) - .toBeNull(); - }); - - it('falls back to tokenized period/date values for historic hash values', () => { - const today = new Date('2026-02-16'); - - expect(getPresetIdFromPeriodAndDate('day', 'today', today)).toBe('today'); - expect(getPresetIdFromPeriodAndDate('day', 'yesterday', today)).toBe('yesterday'); - expect(getPresetIdFromPeriodAndDate('range', 'last7', today)).toBe('last7days'); - expect(getPresetIdFromPeriodAndDate('range', 'last30', today)).toBe('last30days'); - expect(getPresetIdFromPeriodAndDate('range', 'last90', today)).toBe('last90days'); - expect(getPresetIdFromPeriodAndDate('week', 'lastweek', today)).toBe('lastWeekMonSun'); - expect(getPresetIdFromPeriodAndDate('month', 'lastmonth', today)).toBe('lastMonth'); - expect(getPresetIdFromPeriodAndDate('year', 'lastyear', today)).toBe('lastYear'); - expect(getPresetIdFromPeriodAndDate('week', 'today', today)).toBe('thisWeekMonToday'); - expect(getPresetIdFromPeriodAndDate('month', 'today', today)).toBe('thisMonth'); - expect(getPresetIdFromPeriodAndDate('year', 'today', today)).toBe('thisYear'); - }); - - it('returns null for non-matching period/date values', () => { - const today = new Date('2026-02-16'); - - expect(getPresetIdFromPeriodAndDate('day', '2026-02-14', today)).toBeNull(); - expect(getPresetIdFromPeriodAndDate('range', '2026-02-01,2026-02-14', today)).toBeNull(); - expect(getPresetIdFromPeriodAndDate('week', '2026-02-03', today)).toBeNull(); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.ts b/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.ts deleted file mode 100644 index 8a4621b29ff20fd2ede22d2b7f8b9dce21ad4426..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRangeResolver.ts +++ /dev/null @@ -1,360 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - Periods, - datesAreInTheSamePeriod, - format, - getToday, - parseDate, -} from '../Periods'; - -export type PresetDateRangeId = - | 'today' - | 'yesterday' - | 'last7days' - | 'last30days' - | 'last90days' - | 'lastWeekMonSun' - | 'lastMonth' - | 'lastQuarter' - | 'lastYear' - | 'thisWeekMonToday' - | 'thisMonth' - | 'thisQuarter' - | 'thisYear'; - -export interface PresetDateRangeOption { - id: PresetDateRangeId; - labelKey: string; -} - -export interface PresetDateRangeSelection { - id: PresetDateRangeId; - period: 'day'|'week'|'month'|'year'|'range'; - date: string; - urlDate: string; - selectedDate: Date; - startDate: Date; - endDate: Date; -} - -export const PRESET_DATE_RANGE_PERIODS: Record = { - today: 'day', - yesterday: 'day', - last7days: 'range', - last30days: 'range', - last90days: 'range', - lastWeekMonSun: 'week', - lastMonth: 'month', - lastQuarter: 'range', - lastYear: 'year', - thisWeekMonToday: 'week', - thisMonth: 'month', - thisQuarter: 'range', - thisYear: 'year', -}; - -export const PRESET_DATE_RANGES: PresetDateRangeOption[] = [ - { id: 'today', labelKey: 'CoreHome_PresetDateToday' }, - { id: 'yesterday', labelKey: 'CoreHome_PresetDateYesterday' }, - { id: 'last7days', labelKey: 'CoreHome_PresetDateLast7Days' }, - { id: 'last30days', labelKey: 'CoreHome_PresetDateLast30Days' }, - { id: 'last90days', labelKey: 'CoreHome_PresetDateLast90Days' }, - { id: 'lastWeekMonSun', labelKey: 'CoreHome_PresetDateLastWeekMonSun' }, - { id: 'lastMonth', labelKey: 'CoreHome_PresetDateLastMonth' }, - { id: 'lastQuarter', labelKey: 'CoreHome_PresetDateLastQuarter' }, - { id: 'lastYear', labelKey: 'CoreHome_PresetDateLastYear' }, - { id: 'thisWeekMonToday', labelKey: 'CoreHome_PresetDateThisWeekMonToday' }, - { id: 'thisMonth', labelKey: 'CoreHome_PresetDateThisMonth' }, - { id: 'thisQuarter', labelKey: 'CoreHome_PresetDateThisQuarter' }, - { id: 'thisYear', labelKey: 'CoreHome_PresetDateThisYear' }, -]; - -const PRESET_TOKEN_TO_ID_MAP: Record = { - 'day|today': 'today', - 'day|yesterday': 'yesterday', - 'range|last7': 'last7days', - 'range|last30': 'last30days', - 'range|last90': 'last90days', - 'week|lastweek': 'lastWeekMonSun', - 'month|lastmonth': 'lastMonth', - 'year|lastyear': 'lastYear', - 'week|today': 'thisWeekMonToday', - 'month|today': 'thisMonth', - 'year|today': 'thisYear', -}; - -const PRESET_ID_TO_URL_DATE_MAP: Partial> = { - today: 'today', - yesterday: 'yesterday', - last7days: 'last7', - last30days: 'last30', - last90days: 'last90', - lastWeekMonSun: 'lastweek', - lastMonth: 'lastmonth', - lastYear: 'lastyear', - thisWeekMonToday: 'today', - thisMonth: 'today', - thisYear: 'today', -}; - -export function getTokenPresetIdFromPeriodAndDate( - period: string, - date: string, -): PresetDateRangeId|null { - return PRESET_TOKEN_TO_ID_MAP[`${period}|${date}`] || null; -} - -function cloneDate(date: Date): Date { - return new Date(date.getTime()); -} - -function addDays(date: Date, days: number): Date { - const nextDate = cloneDate(date); - nextDate.setDate(nextDate.getDate() + days); - return nextDate; -} - -function startOfMonth(date: Date): Date { - return new Date(date.getFullYear(), date.getMonth(), 1); -} - -function endOfMonth(date: Date): Date { - return new Date(date.getFullYear(), date.getMonth() + 1, 0); -} - -function startOfWeekMonday(date: Date): Date { - const daysToMonday = (date.getDay() + 6) % 7; - return addDays(date, -daysToMonday); -} - -function startOfQuarter(date: Date): Date { - const month = date.getMonth(); - const quarterStartMonth = month - (month % 3); - return new Date(date.getFullYear(), quarterStartMonth, 1); -} - -function makeRangeDateParam(startDate: Date, endDate: Date): string { - return `${format(startDate)},${format(endDate)}`; -} - -export function clampDateToBounds(date: Date, minDate: Date, maxDate: Date): Date { - if (date < minDate) { - return new Date(minDate.getTime()); - } - - if (date > maxDate) { - return new Date(maxDate.getTime()); - } - - return date; -} - -export function resolvePresetDateRange( - presetId: PresetDateRangeId, - todayInput: Date, -): PresetDateRangeSelection { - const today = cloneDate(todayInput); - - const withUrlDate = ( - selection: Omit, - ): PresetDateRangeSelection => ({ - ...selection, - urlDate: PRESET_ID_TO_URL_DATE_MAP[presetId] || selection.date, - }); - - switch (presetId) { - case 'today': - return withUrlDate({ - id: presetId, - period: 'day', - date: format(today), - selectedDate: today, - startDate: today, - endDate: today, - }); - case 'yesterday': { - const yesterday = addDays(today, -1); - return withUrlDate({ - id: presetId, - period: 'day', - date: format(yesterday), - selectedDate: yesterday, - startDate: yesterday, - endDate: yesterday, - }); - } - case 'last7days': { - const startDate = addDays(today, -6); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'last30days': { - const startDate = addDays(today, -29); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'last90days': { - const startDate = addDays(today, -89); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'lastWeekMonSun': { - const thisWeekStart = startOfWeekMonday(today); - const startDate = addDays(thisWeekStart, -7); - const endDate = addDays(startDate, 6); - return withUrlDate({ - id: presetId, - period: 'week', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate, - }); - } - case 'lastMonth': { - const lastMonthDate = new Date(today.getFullYear(), today.getMonth() - 1, 1); - const startDate = startOfMonth(lastMonthDate); - const endDate = endOfMonth(lastMonthDate); - return withUrlDate({ - id: presetId, - period: 'month', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate, - }); - } - case 'lastQuarter': { - const thisQuarterStart = startOfQuarter(today); - const endDate = addDays(thisQuarterStart, -1); - const startDate = startOfQuarter(endDate); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, endDate), - selectedDate: endDate, - startDate, - endDate, - }); - } - case 'lastYear': { - const year = today.getFullYear() - 1; - const startDate = new Date(year, 0, 1); - const endDate = new Date(year, 11, 31); - return withUrlDate({ - id: presetId, - period: 'year', - date: format(startDate), - selectedDate: startDate, - startDate, - endDate, - }); - } - case 'thisWeekMonToday': { - const startDate = startOfWeekMonday(today); - return withUrlDate({ - id: presetId, - period: 'week', - date: format(today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'thisMonth': { - const startDate = startOfMonth(today); - return withUrlDate({ - id: presetId, - period: 'month', - date: format(today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'thisQuarter': { - const startDate = startOfQuarter(today); - return withUrlDate({ - id: presetId, - period: 'range', - date: makeRangeDateParam(startDate, today), - selectedDate: today, - startDate, - endDate: today, - }); - } - case 'thisYear': { - const startDate = new Date(today.getFullYear(), 0, 1); - return withUrlDate({ - id: presetId, - period: 'year', - date: format(today), - selectedDate: today, - startDate, - endDate: today, - }); - } - default: - throw new Error(`Unknown preset date range: ${presetId as string}`); - } -} - -export function getPresetIdFromPeriodAndDate( - period: string, - date: string, - todayInput: Date = getToday(), -): PresetDateRangeId|null { - try { - let selectedDate: Date|null = null; - let selectedDateRange: Date[]|null = null; - const matchingPreset = PRESET_DATE_RANGES.find((preset) => { - const resolvedPreset = resolvePresetDateRange(preset.id, todayInput); - if (resolvedPreset.period !== period) { - return false; - } - - if (resolvedPreset.date === date) { - return true; - } - - if (period !== 'range') { - selectedDate = selectedDate || parseDate(date); - return datesAreInTheSamePeriod(selectedDate, resolvedPreset.selectedDate, period); - } - - selectedDateRange = selectedDateRange || Periods.parse(period, date).getDateRange(); - const presetDateRange = [resolvedPreset.startDate, resolvedPreset.endDate]; - - return selectedDateRange[0].getTime() === presetDateRange[0].getTime() - && selectedDateRange[1].getTime() === presetDateRange[1].getTime(); - }); - - return matchingPreset?.id || getTokenPresetIdFromPeriodAndDate(period, date); - } catch { - return getTokenPresetIdFromPeriodAndDate(period, date); - } -} diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.component.spec.ts b/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.component.spec.ts deleted file mode 100644 index 8e87fdb348b0b2598d888d6737086ebac61d6a99..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.component.spec.ts +++ /dev/null @@ -1,247 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import { format } from '../Periods'; -import PresetDateRanges from './PresetDateRanges.vue'; - -jest.mock('../translate', () => ({ - translate: (key: string) => { - const messages: Record = { - General_DoubleClickToChangePeriod: 'Double click to change period', - }; - - return messages[key] || key; - }, -})); - -interface PresetDateRangeSelection { - id: string; - period: string; - date: string; - urlDate: string; - selectedDate: Date; - startDate: Date; - endDate: Date; -} - -describe('PresetDateRanges', () => { - function getSelectPayload(wrapper: ReturnType): PresetDateRangeSelection { - const events = wrapper.emitted('select') || []; - return events[events.length - 1]?.[0] as PresetDateRangeSelection; - } - - function mountComponent(customProps = {}) { - return mount(PresetDateRanges, { - props: { - checkedPresetId: null, - minDate: new Date('2000-01-01'), - maxDate: new Date('2100-12-31'), - today: new Date('2026-02-16'), - allowedPeriods: ['day', 'week', 'month', 'year', 'range'], - ...customProps, - }, - }); - } - - it('should render all preset options', () => { - const wrapper = mountComponent(); - - expect(wrapper.findAll('input[type="radio"]').length).toBe(13); - expect(wrapper.findAll('.preset-date-range-group').length).toBe(4); - expect(wrapper.findAll('.preset-date-range-group-separator').length).toBe(3); - }); - - it('should render only day presets when only day is allowed', () => { - const wrapper = mountComponent({ allowedPeriods: ['day'] }); - - const presetIds = wrapper.findAll('input[type="radio"]').map((input) => input.attributes('id')); - expect(presetIds).toEqual(['preset_date_today', 'preset_date_yesterday']); - expect(wrapper.findAll('.preset-date-range-group').length).toBe(1); - expect(wrapper.findAll('.preset-date-range-group-separator').length).toBe(0); - }); - - it('should render only range presets when only range is allowed', () => { - const wrapper = mountComponent({ allowedPeriods: ['range'] }); - - const presetIds = wrapper.findAll('input[type="radio"]').map((input) => input.attributes('id')); - expect(presetIds).toEqual([ - 'preset_date_last7days', - 'preset_date_last30days', - 'preset_date_last90days', - 'preset_date_lastQuarter', - 'preset_date_thisQuarter', - ]); - expect(wrapper.findAll('.preset-date-range-group').length).toBe(3); - expect(wrapper.findAll('.preset-date-range-group-separator').length).toBe(2); - }); - - it('should render day and range presets when only day and range are allowed', () => { - const wrapper = mountComponent({ allowedPeriods: ['day', 'range'] }); - - const presetIds = wrapper.findAll('input[type="radio"]').map((input) => input.attributes('id')); - expect(presetIds).toEqual([ - 'preset_date_today', - 'preset_date_yesterday', - 'preset_date_last7days', - 'preset_date_last30days', - 'preset_date_last90days', - 'preset_date_lastQuarter', - 'preset_date_thisQuarter', - ]); - }); - - it('should emit select payload when preset is selected', async () => { - const wrapper = mountComponent(); - - await wrapper.find('#preset_date_lastMonth').trigger('change'); - - const selectPayload = getSelectPayload(wrapper); - expect(selectPayload.id).toBe('lastMonth'); - expect(selectPayload.period).toBe('month'); - expect(selectPayload.date).toBe('2026-01-01'); - expect(selectPayload.urlDate).toBe('lastmonth'); - expect(format(selectPayload.selectedDate)).toBe('2026-01-01'); - expect(format(selectPayload.startDate)).toBe('2026-01-01'); - expect(format(selectPayload.endDate)).toBe('2026-01-31'); - }); - - it('should emit explicit date ranges for range presets', async () => { - const wrapper = mountComponent(); - - await wrapper.find('#preset_date_last7days').trigger('change'); - - const selectPayload = getSelectPayload(wrapper); - expect(selectPayload.period).toBe('range'); - expect(selectPayload.date).toBe('2026-02-10,2026-02-16'); - expect(selectPayload.urlDate).toBe('last7'); - expect(format(selectPayload.selectedDate)).toBe('2026-02-16'); - }); - - it('should emit select when clicking an already checked preset', async () => { - const wrapper = mountComponent({ - checkedPresetId: 'last7days', - }); - - await wrapper.find('#preset_date_last7days').trigger('click'); - - const selectPayload = getSelectPayload(wrapper); - expect(selectPayload.id).toBe('last7days'); - expect(selectPayload.period).toBe('range'); - expect(selectPayload.date).toBe('2026-02-10,2026-02-16'); - expect(selectPayload.urlDate).toBe('last7'); - }); - - it('should emit dblclick payload for presets', async () => { - const wrapper = mountComponent(); - - await wrapper.find('#preset_date_last7days').trigger('dblclick'); - - expect(wrapper.emitted('dblclick')?.[0]?.[0]).toMatchObject({ - id: 'last7days', - period: 'range', - date: '2026-02-10,2026-02-16', - urlDate: 'last7', - }); - }); - - it('should resolve monday/sunday week behavior correctly', async () => { - const wrapper = mountComponent({ today: new Date('2026-02-15') }); - - await wrapper.find('#preset_date_lastWeekMonSun').trigger('change'); - - const selectPayload = getSelectPayload(wrapper); - expect(format(selectPayload.startDate)).toBe('2026-02-02'); - expect(format(selectPayload.endDate)).toBe('2026-02-08'); - expect(format(selectPayload.selectedDate)).toBe('2026-02-02'); - }); - - it('should resolve quarter boundary behavior correctly', async () => { - const wrapper = mountComponent({ today: new Date('2026-04-01') }); - - await wrapper.find('#preset_date_lastQuarter').trigger('change'); - - const selectPayload = getSelectPayload(wrapper); - expect(selectPayload.period).toBe('range'); - expect(selectPayload.date).toBe('2026-01-01,2026-03-31'); - expect(selectPayload.urlDate).toBe('2026-01-01,2026-03-31'); - }); - - it('should clamp payload date range to min/max dates', async () => { - const wrapper = mountComponent({ - minDate: new Date('2026-02-14'), - maxDate: new Date('2026-02-15'), - today: new Date('2026-02-16'), - }); - - await wrapper.find('#preset_date_last7days').trigger('change'); - - const selectPayload = getSelectPayload(wrapper); - expect(format(selectPayload.startDate)).toBe('2026-02-14'); - expect(format(selectPayload.endDate)).toBe('2026-02-15'); - expect(selectPayload.date).toBe('2026-02-10,2026-02-16'); - expect(selectPayload.urlDate).toBe('last7'); - }); - - it('should resolve period and date values for all presets', async () => { - const testCases = [ - { id: 'today', period: 'day', date: '2026-02-16' }, - { id: 'yesterday', period: 'day', date: '2026-02-15' }, - { id: 'last7days', period: 'range', date: '2026-02-10,2026-02-16' }, - { id: 'last30days', period: 'range', date: '2026-01-18,2026-02-16' }, - { id: 'last90days', period: 'range', date: '2025-11-19,2026-02-16' }, - { id: 'lastWeekMonSun', period: 'week', date: '2026-02-09' }, - { id: 'lastMonth', period: 'month', date: '2026-01-01' }, - { id: 'lastQuarter', period: 'range', date: '2025-10-01,2025-12-31' }, - { id: 'lastYear', period: 'year', date: '2025-01-01' }, - { id: 'thisWeekMonToday', period: 'week', date: '2026-02-16' }, - { id: 'thisMonth', period: 'month', date: '2026-02-16' }, - { id: 'thisQuarter', period: 'range', date: '2026-01-01,2026-02-16' }, - { id: 'thisYear', period: 'year', date: '2026-02-16' }, - ]; - - const wrapper = mountComponent(); - - for (const testCase of testCases) { - await wrapper.find(`#preset_date_${testCase.id}`).trigger('change'); - const selectPayload = getSelectPayload(wrapper); - expect(selectPayload.period).toBe(testCase.period); - expect(selectPayload.date).toBe(testCase.date); - } - }); - - it('should throw for an unknown preset id', () => { - const wrapper = mountComponent(); - - expect(() => (wrapper.vm as unknown as { handlePresetSelected: (id: string) => void }) - .handlePresetSelected('unknown')).toThrow('Unknown preset date range: unknown'); - }); - - it('should check presets only when preset owner is active', async () => { - const wrapper = mountComponent({ - checkedPresetId: null, - }); - - expect((wrapper.find('#preset_date_lastMonth').element as HTMLInputElement).checked).toBe(false); - - await wrapper.setProps({ checkedPresetId: 'lastMonth' }); - - expect((wrapper.find('#preset_date_lastMonth').element as HTMLInputElement).checked).toBe(true); - }); - - it('should set empty tooltip for checked preset and non-empty for others', () => { - const wrapper = mountComponent({ - checkedPresetId: 'today', - }); - - const todayLabel = wrapper.find('#preset_date_today').element.parentElement as HTMLLabelElement; - const yesterdayLabel = wrapper.find('#preset_date_yesterday').element.parentElement as HTMLLabelElement; - - expect(todayLabel.title).toBe(''); - expect(yesterdayLabel.title).toBe('Double click to change period'); - }); -}); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue b/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue deleted file mode 100644 index 7d831ff6b49cac8e3ceb93f40fef7002ec3703f9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PeriodSelector/PresetDateRanges.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/Periods/Day.ts b/plugins/CoreHome/vue/src/Periods/Day.ts deleted file mode 100644 index 8bbdaaad60400e67ca8fa67fbe4c30112493c2e9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Day.ts +++ /dev/null @@ -1,36 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import Periods from './Periods'; -import { parseDate, format, todayIsInRange } from './utilities'; - -export default class DayPeriod { - constructor(private dateInPeriod: Date) {} - - static parse(strDate: string): DayPeriod { - return new DayPeriod(parseDate(strDate)); - } - - static getDisplayText(): string { - return translate('Intl_PeriodDay'); - } - - getPrettyString(): string { - return format(this.dateInPeriod); - } - - getDateRange(): Date[] { - return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())]; - } - - containsToday(): boolean { - return todayIsInRange(this.getDateRange()); - } -} - -Periods.addCustomPeriod('day', DayPeriod); diff --git a/plugins/CoreHome/vue/src/Periods/Month.ts b/plugins/CoreHome/vue/src/Periods/Month.ts deleted file mode 100644 index 99ad9296096f7e2ce9cb60a27012c9c20b72f618..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Month.ts +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import Periods from './Periods'; -import { parseDate, todayIsInRange } from './utilities'; - -export default class MonthPeriod { - constructor(private dateInPeriod: Date) {} - - static parse(strDate: string): MonthPeriod { - return new MonthPeriod(parseDate(strDate)); - } - - static getDisplayText(): string { - return translate('Intl_PeriodMonth'); - } - - getPrettyString(): string { - const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`); - return `${month} ${this.dateInPeriod.getFullYear()}`; - } - - getDateRange(): Date[] { - const startMonth = new Date(this.dateInPeriod.getTime()); - startMonth.setDate(1); - - const endMonth = new Date(this.dateInPeriod.getTime()); - endMonth.setDate(1); - endMonth.setMonth(endMonth.getMonth() + 1); - endMonth.setDate(0); - - return [startMonth, endMonth]; - } - - containsToday(): boolean { - return todayIsInRange(this.getDateRange()); - } -} - -Periods.addCustomPeriod('month', MonthPeriod); diff --git a/plugins/CoreHome/vue/src/Periods/Periods.spec.ts b/plugins/CoreHome/vue/src/Periods/Periods.spec.ts deleted file mode 100644 index b3243ccecfc3ad7951580f81718f2106c962e315..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Periods.spec.ts +++ /dev/null @@ -1,162 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import Periods from './Periods'; -import './Day'; -import './Week'; -import './Month'; -import './Year'; -import RangePeriod from './Range'; -import { parseDate } from './utilities'; - -describe('CoreHome/Periods', () => { - function clearDate(strDate: Date|string):Date { - const date = new Date(strDate); - date.setHours(0); - date.setMinutes(0); - date.setSeconds(0); - date.setMilliseconds(0); - - return date; - } - - let originalDateNow: (() => number)|null; - - beforeEach(() => { - originalDateNow = null; - window.piwik.timezoneOffset = 0; - }); - - afterEach(() => { - if (originalDateNow) { - Date.now = originalDateNow; - } - }); - - it('should get daterange for day', () => { - const day = '2021-03-10'; - - const result = Periods.parse('day', day).getDateRange(); - const expected = [clearDate(day), clearDate(day)]; - - expect(result).toEqual(expected); - }) - - it('should get daterange for week', function() { - const day = '2021-03-10'; - const monday = '2021-03-08'; - const sunday = '2021-03-14'; - - const result = Periods.parse('week', day).getDateRange(); - const expected = [clearDate(monday), clearDate(sunday)]; - - expect(result).toEqual(expected); - }); - - it('should get daterange for month', function() { - const day = '2021-03-10'; - const first = '2021-03-01'; - const last = '2021-03-31'; - - const result = Periods.parse('month', day).getDateRange(); - const expected = [clearDate(first), clearDate(last)]; - - expect(result).toEqual(expected); - }); - - it('should get daterange for month for date 31th', function() { - const day = '2021-03-31'; - const first = '2021-03-01'; - const last = '2021-03-31'; - - const result = Periods.parse('month', day).getDateRange(); - const expected = [clearDate(first), clearDate(last)]; - - expect(result).toEqual(expected); - }); - - it('should get daterange for year', function() { - const day = '2021-03-10'; - const first = '2021-01-01'; - const last = '2021-12-31'; - - const result = Periods.parse('year', day).getDateRange(); - const expected = [clearDate(first), clearDate(last)]; - - expect(result).toEqual(expected); - }); - - it('should get daterange for year for date 31th december', function() { - const day = '2021-12-31'; - const first = '2021-01-01'; - const last = '2021-12-31'; - - const result = Periods.parse('year', day).getDateRange(); - const expected = [clearDate(first), clearDate(last)]; - - expect(result).toEqual(expected); - }); - - it('should get proper month rangeperiod when date is 31th march', function() { - const day = '2021-03-31'; - const first = '2021-02-01'; - const last = '2021-03-31'; - - const result = RangePeriod.getLastNRange('month', 2, day); - - expect(result.startDate).toEqual(clearDate(first)); - expect(result.endDate).toEqual(clearDate(last)); - }); - - it('should parse last month properly when date is 31th march', function() { - originalDateNow = Date.now; - Date.now = function mockNow() { - return clearDate('2021-03-31').getTime(); - }; - - const result = parseDate('last month'); - - expect(result.getMonth()).toEqual(1); // 1 is February - }); - - it('should parse last month properly', function() { - originalDateNow = Date.now; - Date.now = function mockNow() { - return clearDate('2021-03-10').getTime(); - }; - - const result = parseDate('last month'); - - expect(result.getMonth()).toEqual(1); // 1 is February - }); - - it('should contains today for daterange if it contains', function() { - const day = '2021-03-10'; - - originalDateNow = Date.now; - Date.now = function() { - return clearDate(day).getTime(); - }; - - const result = Periods.parse('week', day).containsToday(); - - expect(result).toBe(true); - }); - - it('should not contains today for daterange if it not contains', function() { - const today = '2021-03-10'; - const day = '2021-03-17'; - - originalDateNow = Date.now; - Date.now = function() { - return clearDate(today).getTime(); - }; - - const result = Periods.parse('week', day).containsToday(); - - expect(result).toBe(false); - }); -}); diff --git a/plugins/CoreHome/vue/src/Periods/Periods.ts b/plugins/CoreHome/vue/src/Periods/Periods.ts deleted file mode 100644 index 0273e207ce0bad2726009490e2730eedf090e275..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Periods.ts +++ /dev/null @@ -1,90 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -interface Period { - getPrettyString(): string; - getDateRange(): Date[]; - containsToday(): boolean; -} - -interface PeriodClass { - parse(strDate: string|Date): Period; - getDisplayText(): string; -} - -/** - * Matomo period management service for the frontend. - * - * Usage: - * - * var DayPeriod = matomoPeriods.get('day'); - * var day = new DayPeriod(new Date()); - * - * or - * - * var day = matomoPeriods.parse('day', '2013-04-05'); - * - * Adding custom periods: - * - * To add your own period to the frontend, create a period class for it - * w/ the following methods: - * - * - **getPrettyString()**: returns a human readable display string for the period. - * - **getDateRange()**: returns an array w/ two elements, the first being the start - * Date of the period, the second being the end Date. The dates - * must be Date objects, not strings, and are inclusive. - * - **containsToday()**: returns true if the date period contains today. False if not. - * - (_static_) **parse(strDate)**: creates a new instance of this period from the - * value of the 'date' query parameter. - * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month', - * 'week', etc. - * - * Then call Periods.addCustomPeriod w/ your period class: - * - * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod); - * - * NOTE: currently only single date periods like day, week, month year can - * be extended. Other types of periods that require a special UI to - * view/edit aren't, since there is currently no way to use a - * custom UI for a custom period. - */ -class Periods { - periods: {[name: string]: PeriodClass} = {}; - - periodOrder: string[] = []; - - addCustomPeriod(name: string, periodClass: PeriodClass) { - if (this.periods[name]) { - throw new Error(`The "${name}" period already exists! It cannot be overridden.`); - } - - this.periods[name] = periodClass; - this.periodOrder.push(name); - } - - getAllLabels(): string[] { - return Array().concat(this.periodOrder); - } - - get(strPeriod: string): PeriodClass { - const periodClass = this.periods[strPeriod]; - if (!periodClass) { - throw new Error(`Invalid period label: ${strPeriod}`); - } - return periodClass; - } - - parse(strPeriod: string, strDate: string): Period { - return this.get(strPeriod).parse(strDate); - } - - isRecognizedPeriod(strPeriod: string): boolean { - return !!this.periods[strPeriod]; - } -} - -export default new Periods(); diff --git a/plugins/CoreHome/vue/src/Periods/Range.ts b/plugins/CoreHome/vue/src/Periods/Range.ts deleted file mode 100644 index 53490afb71d7e43762e46a6e6a13ae5201c59b21..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Range.ts +++ /dev/null @@ -1,186 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import Periods from './Periods'; -import { - parseDate, - format, - getToday, - todayIsInRange, -} from './utilities'; - -export default class RangePeriod { - constructor( - public readonly startDate: Date, - public readonly endDate: Date, - public readonly childPeriodType: string, - ) {} - - /** - * Returns a range representing the last N childPeriodType periods, including the current one. - */ - static getLastNRange( - childPeriodType: string, - strAmount: string|number, - strEndDate?: Date|string, - ): RangePeriod { - const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0); - if (Number.isNaN(nAmount)) { - throw new Error('Invalid range strAmount'); - } - - let endDate = strEndDate ? parseDate(strEndDate) : getToday(); - - let startDate = new Date(endDate.getTime()); - if (childPeriodType === 'day') { - startDate.setDate(startDate.getDate() - nAmount); - } else if (childPeriodType === 'week') { - startDate.setDate(startDate.getDate() - (nAmount * 7)); - } else if (childPeriodType === 'month') { - startDate.setDate(1); - startDate.setMonth(startDate.getMonth() - nAmount); - } else if (childPeriodType === 'year') { - startDate.setFullYear(startDate.getFullYear() - nAmount); - } else { - throw new Error(`Unknown period type '${childPeriodType}'.`); - } - - if (childPeriodType !== 'day') { - const startPeriod = Periods.periods[childPeriodType].parse(startDate); - const endPeriod = Periods.periods[childPeriodType].parse(endDate); - - [startDate] = startPeriod.getDateRange(); - [, endDate] = endPeriod.getDateRange(); - } - - const firstWebsiteDate = new Date(1991, 7, 6); - if (startDate.getTime() - firstWebsiteDate.getTime() < 0) { - switch (childPeriodType) { - case 'year': - startDate = new Date(1992, 0, 1); - break; - case 'month': - startDate = new Date(1991, 8, 1); - break; - case 'week': - startDate = new Date(1991, 8, 12); - break; - case 'day': - default: - startDate = firstWebsiteDate; - break; - } - } - - return new RangePeriod(startDate, endDate, childPeriodType); - } - - /** - * Returns a range representing a specific child date range counted back from the end date - * - * @param childPeriodType Type of the period, eg. day, week, year - * @param rangeEndDate - * @param countBack Return only the child date range for this specific period number - * @returns {RangePeriod} - */ - static getLastNRangeChild( - childPeriodType: string, - rangeEndDate: Date|string, - countBack: number, - ): RangePeriod { - const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday(); - let startDate = new Date(ed.getTime()); - let endDate = new Date(ed.getTime()); - - if (childPeriodType === 'day') { - startDate.setDate(startDate.getDate() - countBack); - endDate.setDate(endDate.getDate() - countBack); - } else if (childPeriodType === 'week') { - startDate.setDate(startDate.getDate() - (countBack * 7)); - endDate.setDate(endDate.getDate() - (countBack * 7)); - } else if (childPeriodType === 'month') { - startDate.setDate(1); - startDate.setMonth(startDate.getMonth() - countBack); - endDate.setDate(1); - endDate.setMonth(endDate.getMonth() - countBack); - } else if (childPeriodType === 'year') { - startDate.setFullYear(startDate.getFullYear() - countBack); - endDate.setFullYear(endDate.getFullYear() - countBack); - } else { - throw new Error(`Unknown period type '${childPeriodType}'.`); - } - - if (childPeriodType !== 'day') { - const startPeriod = Periods.periods[childPeriodType].parse(startDate); - const endPeriod = Periods.periods[childPeriodType].parse(endDate); - - [startDate] = startPeriod.getDateRange(); - [, endDate] = endPeriod.getDateRange(); - } - - const firstWebsiteDate = new Date(1991, 7, 6); - if (startDate.getTime() - firstWebsiteDate.getTime() < 0) { - switch (childPeriodType) { - case 'year': - startDate = new Date(1992, 0, 1); - break; - case 'month': - startDate = new Date(1991, 8, 1); - break; - case 'week': - startDate = new Date(1991, 8, 12); - break; - case 'day': - default: - startDate = firstWebsiteDate; - break; - } - } - - return new RangePeriod(startDate, endDate, childPeriodType); - } - - static parse(strDate: string, childPeriodType = 'day'): RangePeriod { - if (/^previous/.test(strDate)) { - const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate; - return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate); - } - - if (/^last/.test(strDate)) { - return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4)); - } - - const parts = decodeURIComponent(strDate).split(','); - return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType); - } - - static getDisplayText(): string { - return translate('General_DateRangeInPeriodList'); - } - - getPrettyString(): string { - const start = format(this.startDate); - const end = format(this.endDate); - return translate('General_DateRangeFromTo', [start, end]); - } - - getDateRange(): Date[] { - return [this.startDate, this.endDate]; - } - - containsToday(): boolean { - return todayIsInRange(this.getDateRange()); - } - - getDayCount(): number { - return (Math.ceil((this.endDate.getTime() - this.startDate.getTime()) / (1000 * 3600 * 24)) - + 1); - } -} - -Periods.addCustomPeriod('range', RangePeriod); diff --git a/plugins/CoreHome/vue/src/Periods/Week.ts b/plugins/CoreHome/vue/src/Periods/Week.ts deleted file mode 100644 index fd4175cb72d334eefefef67492dd7e498894ebd1..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Week.ts +++ /dev/null @@ -1,48 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import Periods from './Periods'; -import { parseDate, format, todayIsInRange } from './utilities'; - -export default class WeekPeriod { - constructor(private dateInPeriod: Date) {} - - static parse(strDate: string): WeekPeriod { - return new WeekPeriod(parseDate(strDate)); - } - - static getDisplayText(): string { - return translate('Intl_PeriodWeek'); - } - - getPrettyString(): string { - const weekDates = this.getDateRange(); - const startWeek = format(weekDates[0]); - const endWeek = format(weekDates[1]); - - return translate('General_DateRangeFromTo', [startWeek, endWeek]); - } - - getDateRange(): Date[] { - const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7; - - const startWeek = new Date(this.dateInPeriod.getTime()); - startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday); - - const endWeek = new Date(startWeek.getTime()); - endWeek.setDate(startWeek.getDate() + 6); - - return [startWeek, endWeek]; - } - - containsToday(): boolean { - return todayIsInRange(this.getDateRange()); - } -} - -Periods.addCustomPeriod('week', WeekPeriod); diff --git a/plugins/CoreHome/vue/src/Periods/Year.ts b/plugins/CoreHome/vue/src/Periods/Year.ts deleted file mode 100644 index b28220c94f4166a3bac2b66cf3ab1fc36bfd172d..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/Year.ts +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { translate } from '../translate'; -import Periods from './Periods'; -import { parseDate, todayIsInRange } from './utilities'; - -export default class YearPeriod { - constructor(private dateInPeriod: Date) {} - - static parse(strDate: string): YearPeriod { - return new YearPeriod(parseDate(strDate)); - } - - static getDisplayText(): string { - return translate('Intl_PeriodYear'); - } - - getPrettyString(): string { - return this.dateInPeriod.getFullYear().toString(); - } - - getDateRange(): Date[] { - const startYear = new Date(this.dateInPeriod.getTime()); - startYear.setMonth(0); - startYear.setDate(1); - - const endYear = new Date(this.dateInPeriod.getTime()); - endYear.setMonth(12); - endYear.setDate(0); - - return [startYear, endYear]; - } - - containsToday(): boolean { - return todayIsInRange(this.getDateRange()); - } -} - -Periods.addCustomPeriod('year', YearPeriod); diff --git a/plugins/CoreHome/vue/src/Periods/index.ts b/plugins/CoreHome/vue/src/Periods/index.ts deleted file mode 100644 index 29c3e2b04de21b2f3e582c1fccf6d1a011930304..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export { default as Periods } from './Periods'; -export { default as Day } from './Day'; -export { default as Week } from './Week'; -export { default as Month } from './Month'; -export { default as Year } from './Year'; -export { default as Range } from './Range'; -export * from './utilities'; diff --git a/plugins/CoreHome/vue/src/Periods/utilities.ts b/plugins/CoreHome/vue/src/Periods/utilities.ts deleted file mode 100644 index fc34d8dad43139bb9b73b812787cc4eecd8ce32a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Periods/utilities.ts +++ /dev/null @@ -1,144 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export function format(date: Date): string { - return $.datepicker.formatDate('yy-mm-dd', date); -} - -export function getToday(): Date { - const date = new Date(Date.now()); - - // undo browser timezone - date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000); - - // apply Matomo site timezone (if it exists) - date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600)); - - // get rid of hours/minutes/seconds/etc. - date.setHours(0); - date.setMinutes(0); - date.setSeconds(0); - date.setMilliseconds(0); - return date; -} - -export function parseDate(date: string|Date): Date { - if (date instanceof Date) { - return date; - } - - const strDate = decodeURIComponent(date).trim(); - if (strDate === '') { - throw new Error('Invalid date, empty string.'); - } - - if (strDate === 'today' - || strDate === 'now' - ) { - return getToday(); - } - - if (strDate === 'yesterday' - // note: ignoring the 'same time' part since the frontend doesn't care about the time - || strDate === 'yesterdaySameTime' - ) { - const yesterday = getToday(); - yesterday.setDate(yesterday.getDate() - 1); - return yesterday; - } - - if (strDate.match(/^last[ -]?week$/i)) { - const lastWeek = getToday(); - lastWeek.setDate(lastWeek.getDate() - 7); - return lastWeek; - } - - if (strDate.match(/^last[ -]?month$/i)) { - const lastMonth = getToday(); - lastMonth.setDate(1); - lastMonth.setMonth(lastMonth.getMonth() - 1); - return lastMonth; - } - - if (strDate.match(/^last[ -]?year$/i)) { - const lastYear = getToday(); - lastYear.setFullYear(lastYear.getFullYear() - 1); - return lastYear; - } - - return $.datepicker.parseDate('yy-mm-dd', strDate); -} - -export function todayIsInRange(dateRange: Date[]): boolean { - if (dateRange.length !== 2) { - return false; - } - - if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) { - return true; - } - - return false; -} - -export function getWeekNumber(date: Date): number { - // Algorithm from https://www.w3resource.com/javascript-exercises/javascript-date-exercise-24.php - // and updated based on https://www.java2s.com/example/nodejs/date/get-the-iso-week-date-week-number.html - // for legibility - - // Create a copy of the date object - const dt = new Date(date.valueOf()); - - // ISO week date weeks start on Monday so correct the day number - const dayNr = (date.getDay() + 6) % 7; - - // ISO 8601 states that week 1 is the week with the first thursday of that year. - // Set the target date to the thursday in the target week - dt.setDate(dt.getDate() - dayNr + 3); - - // Store the millisecond value of the target date - const firstThursdayUTC = dt.valueOf(); - - // Set the target to the first Thursday of the year - // First set the target to january first - dt.setMonth(0, 1); - // Not a Thursday? Correct the date to the next Thursday - if (dt.getDay() !== 4) { - const daysToNextThursday = ((4 - dt.getDay()) + 7) % 7; - dt.setMonth(0, 1 + daysToNextThursday); - } - - // The week number is the number of weeks between the - // first Thursday of the year and the Thursday in the target week - return 1 + Math.ceil((firstThursdayUTC - dt.valueOf()) / (7 * 24 * 3600 * 1000 /* 1 week */)); -} - -// check whether two dates are in the same period, e.g. a week, a month or a year -export function datesAreInTheSamePeriod(date1: Date, date2: Date, period: string): boolean { - const year1 = date1.getFullYear(); - const month1 = date1.getMonth(); - const day1 = date1.getDate(); - const week1 = getWeekNumber(date1); - - const year2 = date2.getFullYear(); - const month2 = date2.getMonth(); - const day2 = date2.getDate(); - const week2 = getWeekNumber(date2); - - switch (period) { - case 'day': - return year1 === year2 && month1 === month2 && day1 === day2; - case 'week': - return year1 === year2 && week1 === week2; - case 'month': - return year1 === year2 && month1 === month2; - case 'year': - return year1 === year2; - default: - return false; - } -} diff --git a/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts b/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts deleted file mode 100644 index 2e428dd8fafe8b44facfd14895434d679093e783..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { watch } from 'vue'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; - -const { $ } = window; - -class PopoverHandler { - constructor() { - this.setup(); - } - - private setup() { - watch(() => MatomoUrl.parsed.value.popover, () => this.onPopoverParamChanged()); - - if (MatomoUrl.parsed.value.popover) { - this.onPopoverParamChangedInitial(); - } - } - - // don't initiate the handler until the page had a chance to render, - // since some rowactions depend on what's been loaded. - private onPopoverParamChangedInitial() { - $(() => { - setTimeout(() => { - this.openOrClose(); - }); - }); - } - - private onPopoverParamChanged() { - // make sure all popover handles were registered - $(() => { - this.openOrClose(); - }); - } - - private openOrClose() { - this.close(); - - // should be rather done by routing - const popoverParam = MatomoUrl.parsed.value.popover as string; - if (popoverParam) { - this.open(popoverParam); - } else { - // the URL should only be set to an empty popover if there are no popovers in the stack. - // to avoid avoid any strange inconsistent states, we reset the popover stack here. - window.broadcast.resetPopoverStack(); - } - } - - private close() { - window.Piwik_Popover.close(); - } - - private open(thePopoverParam: string) { - // in case the $ was encoded (e.g. when using copy&paste on urls in some browsers) - let popoverParam = decodeURIComponent(thePopoverParam); - - // revert special encoding from broadcast.propagateNewPopoverParameter() - popoverParam = popoverParam.replace(/\$/g, '%'); - popoverParam = decodeURIComponent(popoverParam); - - const popoverParamParts = popoverParam.split(':'); - const handlerName = popoverParamParts[0]; - popoverParamParts.shift(); - - const param = popoverParamParts.join(':'); - if (typeof window.broadcast.popoverHandlers[handlerName] !== 'undefined' - && !window.broadcast.isLoginPage() - ) { - window.broadcast.popoverHandlers[handlerName](param); - } - } -} - -export default new PopoverHandler(); diff --git a/plugins/CoreHome/vue/src/Progressbar/Progressbar.less b/plugins/CoreHome/vue/src/Progressbar/Progressbar.less deleted file mode 100644 index 70a02c82472ed65e625f8b8f8453bac06ace2f51..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Progressbar/Progressbar.less +++ /dev/null @@ -1,3 +0,0 @@ -.progressbar { - margin: 22px 24px; -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue b/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue deleted file mode 100644 index b0a50399620df58c41817c8ca8443f2006e4b0f6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.less b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.less deleted file mode 100644 index 826d14874eb19cd3fb619c1f60be9f5925d2e026..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.less +++ /dev/null @@ -1,101 +0,0 @@ -.quick-access { - position: relative; - box-shadow: none; - border: 0; - border-radius: 8px; - width: 200px; - - &:hover, - &.expanded, - &.active { - border-color: transparent; - - .quickAccessInside .quickAccessInput { - background-color: @theme-color-background-contrast; - border: 1px solid @theme-color-focus-ring; - outline: 0; - box-shadow: none; - } - } - - .quickAccessInside { - flex: auto; - } - - li { - font-size: 14px; - } - - li a { - padding: 10px 19px; - display: inline-block; - text-decoration: none; - word-break: break-all; - color: @theme-color-text-lighter; - } - - .icon-search { - position: absolute; - font-size: 14px; - top: 13px; - left: 12px; - color: @theme-color-border; - } - - .quickAccessInside .quickAccessInput { - height: 38px; - font-size: 14px; - padding: 10px 12px 10px 38px; - border: 1px solid @theme-color-border; - border-radius: 8px; - width: 100%; - &:focus-visible { - border: 1px solid @theme-color-focus-ring; - outline: 1px solid @theme-color-focus-ring; - } - } - .quickAccessInside .quickAccessDropdown.dropdown { - padding: 8px; - border-radius: 8px; - margin-top: 5px; - width: 200px; - max-height: 75vh; - overflow: auto; - box-shadow: 0 10px 40px 0 rgba(165, 177, 202, 0.30), 0 0 3px 0 rgba(165, 177, 202, 0.30); - @media all and (max-width: 992px) { - width: 100%; - } - } - - .quickAccessInput::placeholder { - color: @theme-color-text-placeholder; - } - .selected { - background-color: @theme-color-background-tinyContrast !important; - border-radius: 8px; - } - .quick-access-category { - text-align: left !important; - font-size: 14px; - font-weight: 600; - padding: 8px; - cursor: pointer; - } - .result { - cursor: pointer; - font-weight: normal; - } - .quick-access-category:hover { - background: none !important; - } - .no-result { - padding: 10px 19px; - cursor: default; - } - .websiteCategory { - cursor: default; - } - li.quick-access-help a { - word-break: break-word; - } -} diff --git a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue deleted file mode 100644 index 8b33769cd9b08921fe046025847a43f40e353d97..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue +++ /dev/null @@ -1,605 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExport.less b/plugins/CoreHome/vue/src/ReportExport/ReportExport.less deleted file mode 100644 index 364eba26bda79ea4b9c94339a249068a6cee28a9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExport.less +++ /dev/null @@ -1,56 +0,0 @@ -.report-export-popover { - - [name=format] { - .form-group label.fieldRadioTitle { - display: block; - } - - p.radio { - width: 50%; - float: left; - display: block; - } - } - - textarea { - word-break: break-all; - padding: 5px; - height: 80px; - } - - .toggle-export-url { - font-size: 14px; - margin-left: 24px; - } - - .filter_limit { - clear: both; - float: none; - - > div { - width: 50%; - float: left; - } - } - - .checkbox span { - text-align: left; - } - - .showoptions > span { - color: @color-blue-matomo; - cursor: pointer; - text-decoration: underline; - } - - .tooltip { - color: @color-silver; - font-size: 13px; - padding: 5px; - } - - .tooltip > a { - color: @color-blue-matomo; - text-decoration: underline; - } -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts deleted file mode 100644 index 62c9e21460c7abb48d8ac16e2f3228bcd5c26192..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts +++ /dev/null @@ -1,136 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { DirectiveBinding } from 'vue'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import { translate } from '../translate'; -import ReportExportPopover from './ReportExportPopover.vue'; -import Matomo from '../Matomo/Matomo'; -import createVueApp from '../createVueApp'; - -interface ReportExportArgs { - reportTitle: string; - requestParams: QueryParameters; - reportFormats: Record; - apiMethod: string; - maxFilterLimit: number; - canExportFlat?: boolean; - onClose?: () => void; -} - -const { $ } = window; - -export default { - mounted(el: HTMLElement, binding: DirectiveBinding): void { - el.addEventListener('click', () => { - const popoverParamBackup = MatomoUrl.hashParsed.value.popover; - - const dataTable = $(el).closest('[data-report]').data('uiControlObject'); - const popover = window.Piwik_Popover.showLoading('Export'); - - const formats = binding.value.reportFormats; - - let reportLimit = dataTable.param.filter_limit; - if (binding.value.maxFilterLimit > 0) { - reportLimit = Math.min(reportLimit, binding.value.maxFilterLimit); - } - - const isDataTableFlat = dataTable.param.flat === true - || dataTable.param.flat === 1 - || dataTable.param.flat === '1'; - - const optionShowDimensions = dataTable.param.show_dimensions === true - || dataTable.param.show_dimensions === 1 - || dataTable.param.show_dimensions === '1'; - const hasSubtables = isDataTableFlat || dataTable.numberOfSubtables > 0; - const canExportFlat = binding.value.canExportFlat ?? hasSubtables; - // Intentional product behaviour: - // when flat export is available, open the popover with TSV + flat selected. - const defaultFlatOnOpen = canExportFlat; - const defaultExpandedOnOpen = false; - - const props = { - initialReportType: 'default', - initialReportFormat: 'TSV', - initialReportLimit: reportLimit > 0 ? reportLimit : 100, - initialReportLimitAll: reportLimit === -1 ? 'yes' : 'no', - initialOptionFlat: defaultFlatOnOpen, - initialOptionShowDimensions: optionShowDimensions, - initialOptionExpanded: defaultExpandedOnOpen, - initialOptionFormatMetrics: false, - hasSubtables, - canExportFlat, - availableReportFormats: { - default: formats, - processed: { - JSON: formats.JSON, - XML: formats.XML, - }, - }, - availableReportTypes: { - default: translate('CoreHome_StandardReport'), - processed: translate('CoreHome_ReportWithMetadata'), - }, - limitAllOptions: { - yes: translate('General_All'), - no: translate('CoreHome_CustomLimit'), - }, - maxFilterLimit: binding.value.maxFilterLimit, - dataTable, - requestParams: binding.value.requestParams, - apiMethod: binding.value.apiMethod, - }; - - const app = createVueApp({ - template: ` - `, - data() { - return { - bind: props, - }; - }, - }); - app.component('popover', ReportExportPopover); - - const mountPoint = document.createElement('div'); - app.mount(mountPoint); - - const { reportTitle } = binding.value; - window.Piwik_Popover.setTitle( - `${translate('General_Export')} ${Matomo.helper.htmlEntities(reportTitle)}`, - ); - window.Piwik_Popover.setContent(mountPoint); - - window.Piwik_Popover.onClose(() => { - app.unmount(); - - if (popoverParamBackup !== '') { - setTimeout(() => { - MatomoUrl.updateHash({ - ...MatomoUrl.hashParsed.value, - popover: popoverParamBackup, - }); - - if (binding.value.onClose) { - binding.value.onClose(); - } - }, 100); - } - }); - - setTimeout(() => { - popover.dialog(); - - $('.exportFullUrl, .btn', popover).tooltip({ - track: true, - show: false, - hide: false, - }); - }, 100); - }); - }, -}; diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.spec.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.spec.ts deleted file mode 100644 index 936a6d239e6e091736e5b12c2f0c35325358941e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.spec.ts +++ /dev/null @@ -1,228 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import { mount } from '@vue/test-utils'; -import ReportExportPopover from './ReportExportPopover.vue'; -import Matomo from '../Matomo/Matomo'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; - -jest.mock('../translate', () => ({ - translate: (key: string) => key, -})); - -jest.mock('../Matomo/Matomo', () => ({ - __esModule: true, - default: { - config: { - datatable_export_range_as_day: '', - }, - language: 'en', - token_auth: 'test-token', - postEvent: jest.fn(), - }, -})); - -jest.mock('../MatomoUrl/MatomoUrl', () => ({ - __esModule: true, - default: { - stringify: jest.fn(() => 'encoded=params'), - }, -})); - -jest.mock('../SelectOnFocus/SelectOnFocus', () => ({ - __esModule: true, - default: {}, -})); - -jest.mock('../useExternalPluginComponent', () => ({ - __esModule: true, - default: () => ({ - name: 'FieldStub', - props: { - name: String, - modelValue: [String, Number, Boolean], - }, - template: '
', - }), -})); - -function createWrapper(extraProps: Record = {}) { - const globalProperties = { - translate: (id: string, ...values: string[]|string[][]) => { - if (!values.length) { - return id; - } - return `${id} ${values.flat().join(' ')}`.trim(); - }, - $sanitize: (value: string) => value, - }; - - return mount(ReportExportPopover, { - props: { - hasSubtables: true, - availableReportTypes: { - default: 'Standard', - processed: 'Processed', - }, - availableReportFormats: { - default: { - CSV: 'CSV', - TSV: 'TSV', - XML: 'XML', - }, - processed: { - JSON: 'JSON', - XML: 'XML', - }, - }, - limitAllOptions: { - yes: 'All', - no: 'Custom', - }, - maxFilterLimit: 0, - dataTable: { - param: { - idSite: 1, - date: '2025-01-01', - period: 'day', - viewDataTable: 'table', - }, - props: {}, - getReportMetadata: () => ({ dimensions: {} }), - }, - requestParams: {}, - apiMethod: 'Actions.getPageUrls', - ...extraProps, - }, - global: { - config: { - globalProperties: globalProperties as any, - }, - }, - }); -} - -describe('CoreHome/ReportExportPopover', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - - it('should generate processed export URL params and post the mounted event', () => { - const wrapper = createWrapper({ - initialReportType: 'processed', - initialReportFormat: 'JSON', - }); - - const exportLink = wrapper.vm.exportLink as string; - const stringifyMock = MatomoUrl.stringify as jest.Mock; - const calls = stringifyMock.mock.calls.map((call) => call[0]); - const processedCall = calls.find( - (params) => params.method === 'API.getProcessedReport' && params.force_api_session === 1, - ); - - expect(exportLink).toContain('encoded=params'); - expect(processedCall).toBeDefined(); - expect(processedCall.apiModule).toBe('Actions'); - expect(processedCall.apiAction).toBe('getPageUrls'); - expect(processedCall.token_auth).toBe('test-token'); - expect(processedCall.force_api_session).toBe(1); - expect((Matomo as any).postEvent).toHaveBeenCalledWith( - 'ReportExportPopover.additionalContent', - expect.any(Object), - ); - }); - - it('should generate export URL without token for display', () => { - const wrapper = createWrapper({ - initialReportType: 'default', - initialReportFormat: 'CSV', - }); - - const exportLinkWithoutToken = wrapper.vm.exportLinkWithoutToken as string; - const stringifyMock = MatomoUrl.stringify as jest.Mock; - const calls = stringifyMock.mock.calls.map((call) => call[0]); - const withoutTokenCall = calls.find( - (params) => params.token_auth === 'ENTER_YOUR_TOKEN_AUTH_HERE', - ); - - expect(exportLinkWithoutToken).toContain('encoded=params'); - expect(withoutTokenCall).toBeDefined(); - expect(withoutTokenCall.method).toBe('Actions.getPageUrls'); - expect(withoutTokenCall.force_api_session).toBeUndefined(); - expect(withoutTokenCall.translateColumnNames).toBe(1); - expect(withoutTokenCall.language).toBe('en'); - }); - - it('should default to JSON format when report with metadata is selected', async () => { - const wrapper = createWrapper({ - initialReportType: 'default', - initialReportFormat: 'CSV', - }); - - expect((wrapper.vm as any).reportFormat).toBe('CSV'); - - await wrapper.setData({ reportType: 'processed' }); - - expect((wrapper.vm as any).reportFormat).toBe('JSON'); - }); - - it('should keep flat export available without visible subtables when the report supports flattening', () => { - const wrapper = createWrapper({ - hasSubtables: false, - canExportFlat: true, - initialReportFormat: 'TSV', - initialOptionFlat: true, - }); - - expect((wrapper.vm as any).effectiveSubtableOptions).toEqual({ - optionFlat: true, - optionExpanded: false, - }); - - const exportLink = wrapper.vm.exportLink as string; - expect(exportLink).toContain('encoded=params'); - - const stringifyMock = MatomoUrl.stringify as jest.Mock; - const calls = stringifyMock.mock.calls.map((call) => call[0]); - const exportCall = calls.find( - (params) => params.method === 'Actions.getPageUrls' && params.format === 'TSV', - ); - - expect(exportCall.flat).toBe(1); - expect(exportCall.expanded).toBeUndefined(); - }); - - it('should include requestParams label in graph evolution export links', () => { - createWrapper({ - initialReportType: 'default', - initialReportFormat: 'CSV', - dataTable: { - param: { - idSite: 1, - date: '2025-01-01,2025-01-31', - period: 'range', - viewDataTable: 'graphEvolution', - }, - props: {}, - getReportMetadata: () => ({ dimensions: {} }), - }, - requestParams: { - label: '@referrer.com', - }, - apiMethod: 'Referrers.getWebsites', - }); - - const stringifyMock = MatomoUrl.stringify as jest.Mock; - const calls = stringifyMock.mock.calls.map((call) => call[0]); - const exportCall = calls.find( - (params) => params.method === 'Referrers.getWebsites' && params.format === 'CSV', - ); - - expect(exportCall).toBeDefined(); - expect(exportCall.period).toBe('day'); - expect(exportCall.label).toBe('@referrer.com'); - }); -}); diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.spec.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.spec.ts deleted file mode 100644 index 40bde5aba721ea2695dff4da3213b7dbdbb9aa07..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.spec.ts +++ /dev/null @@ -1,97 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - isFormatWithoutExpanded, - resolveEffectiveSubtableOptions, - resolveInitialSubtablePreference, - SubtablePreference, -} from './ReportExportPopover.utils'; - -describe('CoreHome/ReportExportPopover.utils', () => { - describe('isFormatWithoutExpanded', () => { - it.each([ - ['CSV', true], - ['TSV', true], - ['HTML', true], - ['JSON', false], - ])('returns %s => %s', (format: string, expected: boolean) => { - expect(isFormatWithoutExpanded(format)).toBe(expected); - }); - }); - - describe('resolveInitialSubtablePreference', () => { - const cases: Array<[boolean, boolean, string, SubtablePreference]> = [ - [true, false, 'TSV', { hasUserPreference: false, preferredMode: null }], - [true, false, 'HTML', { hasUserPreference: false, preferredMode: null }], - [true, false, 'JSON', { hasUserPreference: true, preferredMode: 'flat' }], - [false, true, 'JSON', { hasUserPreference: true, preferredMode: 'expanded' }], - [false, false, 'JSON', { hasUserPreference: true, preferredMode: null }], - ]; - - it.each(cases)( - 'returns expected preference for initialOptionFlat=%s initialOptionExpanded=%s format=%s', - ( - initialOptionFlat: boolean, - initialOptionExpanded: boolean, - initialReportFormat: string, - expected: SubtablePreference, - ) => { - expect(resolveInitialSubtablePreference( - initialOptionFlat, - initialOptionExpanded, - initialReportFormat, - )).toEqual(expected); - }, - ); - }); - - describe('resolveEffectiveSubtableOptions', () => { - const cases: Array< - [ - boolean, - boolean, - string, - SubtablePreference, - { optionFlat: boolean; optionExpanded: boolean }, - ] - > = [ - [false, true, 'JSON', { hasUserPreference: false, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - [false, true, 'JSON', { hasUserPreference: true, preferredMode: 'flat' }, { optionFlat: true, optionExpanded: false }], - [false, true, 'CSV', { hasUserPreference: false, preferredMode: null }, { optionFlat: true, optionExpanded: false }], - [false, true, 'CSV', { hasUserPreference: true, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - [true, true, 'CSV', { hasUserPreference: false, preferredMode: null }, { optionFlat: true, optionExpanded: false }], - [true, true, 'CSV', { hasUserPreference: true, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - [true, true, 'HTML', { hasUserPreference: false, preferredMode: null }, { optionFlat: true, optionExpanded: false }], - [true, true, 'HTML', { hasUserPreference: true, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - [true, false, 'HTML', { hasUserPreference: false, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - [true, true, 'JSON', { hasUserPreference: false, preferredMode: null }, { optionFlat: false, optionExpanded: true }], - [true, true, 'JSON', { hasUserPreference: true, preferredMode: 'flat' }, { optionFlat: true, optionExpanded: false }], - [true, false, 'JSON', { hasUserPreference: true, preferredMode: 'flat' }, { optionFlat: false, optionExpanded: true }], - [true, true, 'JSON', { hasUserPreference: true, preferredMode: 'expanded' }, { optionFlat: false, optionExpanded: true }], - [true, true, 'JSON', { hasUserPreference: true, preferredMode: null }, { optionFlat: false, optionExpanded: false }], - ]; - - it.each(cases)( - 'returns expected effective options for hasSubtables=%s canExportFlat=%s format=%s preference=%j', - ( - hasSubtables: boolean, - canExportFlat: boolean, - reportFormat: string, - subtablePreference: SubtablePreference, - expected: { optionFlat: boolean; optionExpanded: boolean }, - ) => { - expect(resolveEffectiveSubtableOptions( - hasSubtables, - canExportFlat, - reportFormat, - subtablePreference, - )).toEqual(expected); - }, - ); - }); -}); diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.ts deleted file mode 100644 index 137c7ea974ff8af49abcf3da1a9233a6647c630e..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.utils.ts +++ /dev/null @@ -1,119 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -export const FORMATS_WITHOUT_EXPANDED = ['CSV', 'TSV', 'HTML']; - -export type SubtableMode = 'flat' | 'expanded' | null; - -export interface SubtablePreference { - hasUserPreference: boolean; - preferredMode: SubtableMode; -} - -export interface EffectiveSubtableOptions { - optionFlat: boolean; - optionExpanded: boolean; -} - -export function isFormatWithoutExpanded(format: string): boolean { - return FORMATS_WITHOUT_EXPANDED.includes(format); -} - -export function resolveInitialSubtablePreference( - initialOptionFlat: boolean, - initialOptionExpanded: boolean, - initialReportFormat: string, -): SubtablePreference { - // `hasUserPreference=false` means "use the product default behavior": - // TSV/CSV start flat, and non-TSV/CSV start expanded. - if (initialOptionFlat) { - if (isFormatWithoutExpanded(initialReportFormat)) { - return { - hasUserPreference: false, - preferredMode: null, - }; - } - - return { - hasUserPreference: true, - preferredMode: 'flat', - }; - } - - if (initialOptionExpanded) { - return { - hasUserPreference: true, - preferredMode: 'expanded', - }; - } - - return { - hasUserPreference: true, - preferredMode: null, - }; -} - -export function resolveEffectiveSubtableOptions( - hasSubtables: boolean, - canExportFlat: boolean, - reportFormat: string, - subtablePreference: SubtablePreference, -): EffectiveSubtableOptions { - const { hasUserPreference, preferredMode } = subtablePreference; - - if (!hasSubtables && !canExportFlat) { - return { - optionFlat: false, - optionExpanded: false, - }; - } - - if (isFormatWithoutExpanded(reportFormat)) { - if (!canExportFlat) { - return { - optionFlat: false, - optionExpanded: false, - }; - } - - return { - optionFlat: !hasUserPreference || preferredMode === 'flat', - optionExpanded: false, - }; - } - - if (!hasSubtables) { - return canExportFlat - ? { optionFlat: preferredMode === 'flat', optionExpanded: false } - : { optionFlat: false, optionExpanded: false }; - } - - if (!hasUserPreference) { - return { - optionFlat: false, - optionExpanded: true, - }; - } - - if (preferredMode === 'flat') { - return canExportFlat - ? { optionFlat: true, optionExpanded: false } - : { optionFlat: false, optionExpanded: true }; - } - - if (preferredMode === 'expanded') { - return { - optionFlat: false, - optionExpanded: true, - }; - } - - return { - optionFlat: false, - optionExpanded: false, - }; -} diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue deleted file mode 100644 index b927709b048a6afe35bf58b49e570e5220f8da6f..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue +++ /dev/null @@ -1,562 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts b/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts deleted file mode 100644 index 771af87abdcbc67bd13979bace1f354cd56da3e9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - reactive, - computed, - readonly, - DeepReadonly, -} from 'vue'; -import AjaxHelper from '../AjaxHelper/AjaxHelper'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import Matomo from '../Matomo/Matomo'; - -interface ReportRef { - module: string; - action: string; -} - -interface Report { - relatedReports: ReportRef[]; - module: string; - action: string; - documentation?: string; -} - -interface ReportMetadataStoreState { - reports: Report[]; -} - -export class ReportMetadataStore { - private privateState = reactive({ - reports: [], - }); - - private state = readonly(this.privateState); - - readonly reports = computed(() => this.state.reports); - - private reportsPromise?: Promise; - - // TODO: it used to return an empty array when nothing was found, will that be an issue? - findReport(reportModule?: string, reportAction?: string): DeepReadonly|undefined { - return this.reports.value.find((r) => r.module === reportModule && r.action === reportAction); - } - - fetchReportMetadata(): Promise { - if (!this.reportsPromise) { - this.reportsPromise = AjaxHelper.fetch({ - method: 'API.getReportMetadata', - filter_limit: '-1', - idSite: Matomo.idSite || MatomoUrl.parsed.value.idSite, - }).then((response) => { - this.privateState.reports = response; - return response; - }); - } - - return this.reportsPromise.then(() => this.reports.value); - } -} - -export default new ReportMetadataStore(); diff --git a/plugins/CoreHome/vue/src/ReportingMenu/Category.ts b/plugins/CoreHome/vue/src/ReportingMenu/Category.ts deleted file mode 100644 index fbb11a8308e8ca1815b67c0fbe5ab395bef59c29..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingMenu/Category.ts +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { defineAsyncComponent } from 'vue'; -import { Orderable } from '../Orderable'; -import { Subcategory } from './Subcategory'; - -export interface Category extends Orderable { - id: string; - name: string; - icon?: string; - tooltip?: string; - widget?: string; - component?: typeof defineAsyncComponent; - - /** - * Reporting menu groups (top-level sections) this category belongs to. An empty/default group - * means the main Analytics reporting menu. Used to filter the reporting menu per active section. - */ - groups?: readonly string[]; - - /** - * @deprecated exists for BC, should be removed in Matomo 5 - */ - active?: boolean; -} - -export interface CategoryContainer extends Category { - subcategories: Subcategory[]; -} - -export function getCategoryChildren(category: Category): Subcategory[] { - const container = category as CategoryContainer; - if (container.subcategories) { - return container.subcategories; - } - return []; -} diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts deleted file mode 100644 index 00acca6208b27983dc87ca706c79a0ad8ca2baa6..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { computed, reactive, readonly } from 'vue'; -import ReportingPagesStoreInstance from '../ReportingPages/ReportingPages.store'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import { translate } from '../translate'; -import { sortOrderables } from '../Orderable'; -import { Category, CategoryContainer, getCategoryChildren } from './Category'; -import { getSubcategoryChildren, Subcategory, SubcategoryContainer } from './Subcategory'; - -interface ReportingMenuStoreState { - activeCategoryId?: string|null; - activeSubcategoryId: string|null; - activeSubsubcategoryId: string|null; -} - -interface SubcategoryFindResult { - category?: Category; - subcategory?: Subcategory; - subsubcategory?: Subcategory; -} - -function isNumeric(text: string) { - const n = parseFloat(text); - return !Number.isNaN(n) && Number.isFinite(n); -} - -/** - * Identifier of the default reporting menu group (the main "Analytics" reporting menu). Must match - * Piwik\Category\Category::DEFAULT_GROUP on the backend. - */ -export const DEFAULT_GROUP = ''; - -export function getCategoryGroupIds(category: Category): readonly string[] { - const { groups } = category; - return groups && groups.length ? groups : [DEFAULT_GROUP]; -} - -export class ReportingMenuStore { - private privateState = reactive({ - activeSubcategoryId: null, - activeSubsubcategoryId: null, - }); - - private state = computed(() => readonly(this.privateState)); - - readonly activeCategory = computed( - () => (typeof this.state.value.activeCategoryId !== 'undefined' - ? this.state.value.activeCategoryId - : MatomoUrl.parsed.value.category as string), - ); - - readonly activeSubcategory = computed( - () => this.state.value.activeSubcategoryId || MatomoUrl.parsed.value.subcategory as string, - ); - - readonly activeSubsubcategory = computed(() => { - const manuallySetId = this.state.value.activeSubsubcategoryId; - if (manuallySetId) { - return manuallySetId; - } - - // default to activeSubcategory if the activeSubcategory is part of a group - const foundCategory = this.findSubcategory( - this.activeCategory.value, - this.activeSubcategory.value, - ); - - if (foundCategory.subsubcategory - && foundCategory.subsubcategory.id === this.activeSubcategory.value - ) { - return foundCategory.subsubcategory.id; - } - - return null; - }); - - readonly menu = computed(() => this.buildMenuFromPages( - (MatomoUrl.parsed.value.group as string) || DEFAULT_GROUP, - )); - - /** - * The full reporting menu across all top-level sections (groups), ignoring the active group - * filter. Used by quick search so users can find any reporting page regardless of the section - * they are currently in. - */ - readonly fullMenu = computed(() => this.buildMenuFromPages(null)); - - fetchMenuItems(): Promise { - return ReportingPagesStoreInstance.getAllPages().then(() => this.menu.value); - } - - reloadMenuItems(): Promise { - return ReportingPagesStoreInstance.reloadAllPages().then(() => this.menu.value); - } - - findSubcategory(categoryId: string|null, subcategoryId: string): SubcategoryFindResult { - let foundCategory: Category|undefined = undefined; - let foundSubcategory: Subcategory|undefined = undefined; - let foundSubSubcategory: Subcategory|undefined = undefined; - - this.menu.value.forEach((category) => { - if (category.id !== categoryId) { - return; - } - - (getCategoryChildren(category) || []).forEach((subcategory) => { - if (subcategory.id === subcategoryId) { - foundCategory = category; - foundSubcategory = subcategory; - } - - if (subcategory.isGroup) { - (getSubcategoryChildren(subcategory) || []).forEach((subcat) => { - if (subcat.id === subcategoryId) { - foundCategory = category; - foundSubcategory = subcategory; - foundSubSubcategory = subcat; - } - }); - } - }); - }); - - return { - category: foundCategory, - subcategory: foundSubcategory, - subsubcategory: foundSubSubcategory, - }; - } - - /** - * Builds the reporting menu from the available pages. When `activeGroup` is a string, only - * categories belonging to that top-level section ("Analytics", "AI Insights", ...) are included; - * passing `null` returns the full menu across all sections (used by quick search). - */ - private buildMenuFromPages(activeGroup: string | null) { - const menu: Category[] = []; - - const displayedCategory = MatomoUrl.parsed.value.category as string; - const displayedSubcategory = MatomoUrl.parsed.value.subcategory as string; - - const pages = ReportingPagesStoreInstance.pages.value; - - const categoriesHandled: Record = {}; - pages.forEach((page) => { - const category = { ...page.category } as Category; - const categoryId = category.id; - const isCategoryDisplayed = categoryId === displayedCategory; - - if (categoriesHandled[categoryId]) { - return; - } - - if (activeGroup !== null && !getCategoryGroupIds(category).includes(activeGroup)) { - return; - } - - categoriesHandled[categoryId] = true; - - (category as CategoryContainer).subcategories = []; - - let categoryGroups: Subcategory|null = null; - - const pagesWithCategory = pages.filter((p) => p.category.id === categoryId); - pagesWithCategory.forEach((p) => { - const subcategory = { ...p.subcategory } as Subcategory; - const isSubcategoryDisplayed = subcategory.id === displayedSubcategory - && isCategoryDisplayed; - - if (p.widgets && p.widgets[0] && isNumeric(p.subcategory.id)) { - // we handle a goal or something like it - if (!categoryGroups) { - categoryGroups = { ...subcategory } as Subcategory; - categoryGroups.name = translate('CoreHome_ChooseX', [category.name]); - categoryGroups.isGroup = true; - (categoryGroups as SubcategoryContainer).subcategories = []; - categoryGroups.order = 10; - } - - if (isSubcategoryDisplayed) { - categoryGroups.name = subcategory.name; - } - - const entityId = subcategory.id; - subcategory.tooltip = `${subcategory.name} (id = ${entityId})`; - - (categoryGroups as SubcategoryContainer).subcategories.push(subcategory); - return; - } - - (category as CategoryContainer).subcategories.push(subcategory); - }); - - if (categoryGroups - && (categoryGroups as SubcategoryContainer).subcategories - && (categoryGroups as SubcategoryContainer).subcategories.length <= 5 - ) { - (categoryGroups as SubcategoryContainer).subcategories.forEach( - (sub) => (category as CategoryContainer).subcategories.push(sub), - ); - } else if (categoryGroups) { - (category as CategoryContainer).subcategories.push(categoryGroups); - } - - (category as CategoryContainer).subcategories = sortOrderables(getCategoryChildren(category)); - - menu.push(category); - }); - - return sortOrderables(menu); - } - - toggleCategory(category: Category): boolean { - this.privateState.activeSubcategoryId = null; - this.privateState.activeSubsubcategoryId = null; - - if (this.activeCategory.value === category.id) { - this.privateState.activeCategoryId = null; - return false; - } - - this.privateState.activeCategoryId = category.id; - return true; - } - - enterSubcategory( - category?: Category, - subcategory?: Subcategory, - subsubcategory?: Subcategory, - ): void { - if (!category || !subcategory) { - return; - } - - this.privateState.activeCategoryId = category.id; - this.privateState.activeSubcategoryId = subcategory.id; - - if (subsubcategory) { - this.privateState.activeSubsubcategoryId = subsubcategory.id; - } - } -} - -export default new ReportingMenuStore(); diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue deleted file mode 100644 index 61eb4c5a50a61944f45404f5ae713baf73e49b05..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue +++ /dev/null @@ -1,472 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts b/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts deleted file mode 100644 index af1cf63b7ced8fb6ea6d55baf5c6659d4ceb5c44..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { Orderable } from '../Orderable'; - -export interface Subcategory extends Orderable { - id: string; - name: string; - isGroup: boolean; - icon?: string; - tooltip?: string; - help?: string; - - /** - * @deprecated exists for BC, should be removed in Matomo 5 - */ - active?: boolean; -} - -export interface SubcategoryContainer extends Subcategory { - subcategories: Subcategory[]; -} - -export function getSubcategoryChildren(subcategory: Subcategory): Subcategory[] { - const container = subcategory as SubcategoryContainer; - if (container.subcategories) { - return container.subcategories; - } - return []; -} diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.less b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.less deleted file mode 100644 index ea7137f68e08420fd7c65099b0559a44f169ab12..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.less +++ /dev/null @@ -1,24 +0,0 @@ -.reporting-page { - > .row { - margin-bottom: 0; - } - - .fullWidgetColumn { - padding-left: 0; - padding-right: 0; - } - - .leftWidgetColumn { - padding-left: 0; - } - - .rightWidgetColumn { - padding-right: 0; - } - - .isFirstWidgetInPage { - .card { - margin-top: 0; - } - } -} \ No newline at end of file diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.spec.ts b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.spec.ts deleted file mode 100644 index 4864f9eaf59c8de6297c2a5eb7488d53da5ab307..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.spec.ts +++ /dev/null @@ -1,106 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -import ReportingPage from './ReportingPage.vue'; -import ReportingPageStoreInstance from './ReportingPage.store'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import Matomo from '../Matomo/Matomo'; -import { NotificationsStore } from '../Notification'; - -// The component cannot be mounted in jsdom (it loads the SitesManager.SiteWithoutData -// component on demand), so the gate decision and the render guard are exercised directly -// against the component options with a controlled `this`. -const options = ReportingPage as unknown as { - computed: { showEmptySiteScreen(this: unknown): boolean }; - methods: { renderPage(this: unknown, ...args: string[]): void }; -}; - -function setActiveGroup(group: string) { - MatomoUrl.url.value = new URL(`http://localhost/index.php#?group=${group}`); -} - -function gateContext(overrides: Record) { - return { - siteHasNoData: false, - noDataDismissed: false, - groupsWithoutTrackingRequirement: ['CoreHome_AIInsights'], - ...overrides, - }; -} - -describe('CoreHome/ReportingPage', () => { - afterEach(() => { - jest.restoreAllMocks(); - MatomoUrl.url.value = new URL('http://localhost/index.php'); - }); - - describe('showEmptySiteScreen', () => { - function showEmptySiteScreen(overrides: Record) { - return options.computed.showEmptySiteScreen.call(gateContext(overrides)); - } - - it('does not show the screen when the site has data', () => { - setActiveGroup(''); - expect(showEmptySiteScreen({ siteHasNoData: false })).toBe(false); - }); - - it('does not show the screen once it has been dismissed', () => { - setActiveGroup(''); - expect(showEmptySiteScreen({ siteHasNoData: true, noDataDismissed: true })).toBe(false); - }); - - it('shows the screen on the default group when the site has no data', () => { - setActiveGroup(''); - expect(showEmptySiteScreen({ siteHasNoData: true })).toBe(true); - }); - - it('skips the screen for a group exempt from the tracking requirement', () => { - setActiveGroup('CoreHome_AIInsights'); - expect(showEmptySiteScreen({ siteHasNoData: true })).toBe(false); - }); - - it('still shows the screen for a non-exempt group while the site has no data', () => { - setActiveGroup('Some_OtherGroup'); - expect(showEmptySiteScreen({ siteHasNoData: true })).toBe(true); - }); - }); - - describe('renderPage while the empty-site gate is shown', () => { - it('clears stale transient notifications but neither loads a report nor changes the page', () => { - const clearTransient = jest.spyOn(NotificationsStore, 'clearTransientNotifications') - .mockImplementation(() => undefined); - const fetchPage = jest.spyOn(ReportingPageStoreInstance, 'fetchPage') - .mockResolvedValue(undefined as never); - const postEvent = jest.spyOn(Matomo, 'postEvent').mockImplementation(() => undefined); - - const ctx = { showEmptySiteScreen: true, loading: true }; - options.methods.renderPage.call( - ctx, 'General_Visitors', 'General_Overview', 'day', '2024-01-01', '', - ); - - expect(clearTransient).toHaveBeenCalledTimes(1); - expect(ctx.loading).toBe(false); - // a matomoPageChange would abort the requests the just-mounted gate component fires - expect(postEvent).not.toHaveBeenCalled(); - expect(fetchPage).not.toHaveBeenCalled(); - }); - - it('renders the report normally when the gate is not shown', () => { - const clearTransient = jest.spyOn(NotificationsStore, 'clearTransientNotifications') - .mockImplementation(() => undefined); - const resetPage = jest.spyOn(ReportingPageStoreInstance, 'resetPage') - .mockImplementation(() => undefined); - - // empty category short-circuits past the gate guard into the normal "no page" handling - const ctx = { showEmptySiteScreen: false, loading: true }; - options.methods.renderPage.call(ctx, '', '', 'day', '2024-01-01', ''); - - expect(resetPage).toHaveBeenCalledTimes(1); - expect(clearTransient).not.toHaveBeenCalled(); - expect(ctx.loading).toBe(false); - }); - }); -}); diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts deleted file mode 100644 index 551e22eb4aa6e1371138c1cef6b9ef8787194b6a..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts +++ /dev/null @@ -1,169 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - computed, - DeepReadonly, - reactive, - readonly, -} from 'vue'; -import ReportingPagesStoreInstance, { Page } from '../ReportingPages/ReportingPages.store'; -import ReportMetadataStoreInstance from '../ReportMetadata/ReportMetadata.store'; -import { sortOrderables } from '../Orderable'; -import { getWidgetChildren } from '../Widget/Widgets.store'; -import { - GroupedWidgets, - Widget, - WidgetContainer, -} from '../Widget/types'; - -interface ReportingMenuStoreState { - page?: DeepReadonly; -} - -function shouldBeRenderedWithFullWidth(widget: Widget) { - // rather controller logic - if ((widget.isContainer && widget.layout && widget.layout === 'ByDimension') - || widget.viewDataTable === 'bydimension' - ) { - return true; - } - - if (widget.isWide) { - return true; - } - - return widget.viewDataTable - && (widget.viewDataTable === 'tableAllColumns' - || widget.viewDataTable === 'sparklines' - || widget.viewDataTable === 'graphEvolution'); -} - -function markWidgetsInFirstRowOfPage(widgets: (Widget|GroupedWidgets)[]) { - if (widgets && widgets[0]) { - const newWidgets: (Widget|GroupedWidgets)[] = [...widgets]; - - const groupedWidgets = widgets[0] as GroupedWidgets; - if (groupedWidgets.group) { - newWidgets[0] = { - ...newWidgets[0], - left: markWidgetsInFirstRowOfPage(groupedWidgets.left || []), - right: markWidgetsInFirstRowOfPage(groupedWidgets.right || []), - } as GroupedWidgets; - } else { - newWidgets[0] = { ...newWidgets[0], isFirstInPage: true }; - } - - return newWidgets; - } - - return widgets; -} - -export class ReportingPageStore { - private privateState = reactive({}); - - private state = computed(() => readonly(this.privateState)); - - readonly page = computed(() => this.state.value.page); - - readonly widgets = computed(() => { - const page = this.page.value; - if (!page) { - return []; - } - - let widgets: Widget[] = []; - const reportsToIgnore: Record = {}; - - const isIgnoredReport = (widget: Widget) => widget.isReport - && reportsToIgnore[`${widget.module}.${widget.action}`]; - - const getRelatedReports = (widget: Widget) => { - if (!widget.isReport) { - return []; - } - - const report = ReportMetadataStoreInstance.findReport(widget.module, widget.action); - if (!report || !report.relatedReports) { - return []; - } - - return report.relatedReports; - }; - - (page.widgets || []).forEach((widget) => { - if (isIgnoredReport(widget)) { - return; - } - - getRelatedReports(widget).forEach((report) => { - reportsToIgnore[`${report.module}.${report.action}`] = true; - }); - - widgets.push(widget); - }); - - widgets = sortOrderables(widgets); - - if (widgets.length === 1) { - // if there is only one widget, we always display it full width - return markWidgetsInFirstRowOfPage(widgets); - } - - const groupedWidgets: (Widget|GroupedWidgets)[] = []; - for (let i = 0; i < widgets.length; i += 1) { - const widget = widgets[i]; - - if (shouldBeRenderedWithFullWidth(widget) - || (widgets[i + 1] && shouldBeRenderedWithFullWidth(widgets[i + 1])) - ) { - groupedWidgets.push({ - ...widget, - widgets: sortOrderables(getWidgetChildren(widget)), - } as WidgetContainer); - } else { - let counter = 0; - const left = [widget]; - const right = []; - - while (widgets[i + 1] && !shouldBeRenderedWithFullWidth(widgets[i + 1])) { - i += 1; - counter += 1; - if (counter % 2 === 0) { - left.push(widgets[i]); - } else { - right.push(widgets[i]); - } - } - - groupedWidgets.push({ group: true, left, right } as GroupedWidgets); - } - } - - const sortedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); - return sortedWidgets; - }); - - fetchPage(category: string, subcategory: string): Promise { - this.resetPage(); - - return Promise.all([ - ReportingPagesStoreInstance.getAllPages(), - ReportMetadataStoreInstance.fetchReportMetadata(), - ]).then(() => { - this.privateState.page = ReportingPagesStoreInstance.findPage(category, subcategory); - return this.page.value; - }); - } - - resetPage(): void { - this.privateState.page = undefined; - } -} - -export default new ReportingPageStore(); diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue deleted file mode 100644 index cbe845eee6a58e5723037dd3c7813e7cb3d5e9ec..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue +++ /dev/null @@ -1,395 +0,0 @@ - - - - - diff --git a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts b/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts deleted file mode 100644 index f9a811b142029a4aea6ca54256e388ba9399bb98..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { - reactive, - computed, readonly, DeepReadonly, -} from 'vue'; -import AjaxHelper from '../AjaxHelper/AjaxHelper'; -import { Widget } from '../Widget/types'; - -interface CategoryRef { - id: string; - name: string; -} - -interface SubcategoryRef { - id: string; - name: string; -} - -export interface Page { - category: CategoryRef; - subcategory: SubcategoryRef; - widgets: Widget[]; -} - -interface ReportingPagesStoreState { - pages: Page[]; -} - -export class ReportingPagesStore { - private privateState = reactive({ - pages: [], - }); - - private state = computed(() => readonly(this.privateState)); - - private fetchAllPagesPromise?: Promise>; - - readonly pages = computed(() => this.state.value.pages); - - findPageInCategory(categoryId: string): DeepReadonly|undefined { - // happens when user switches between sites, in this case check if the same category exists and - // if so, select first entry from that category - return this.pages.value.find((p) => p - && p.category && p.category.id === categoryId && p.subcategory && p.subcategory.id); - } - - findPage(categoryId: string, subcategoryId: string): DeepReadonly|undefined { - return this.pages.value.find((p) => p - && p.category && p.subcategory && p.category.id === categoryId - && `${p.subcategory.id}` === subcategoryId); - } - - reloadAllPages(): Promise { - delete this.fetchAllPagesPromise; - return this.getAllPages(); - } - - getAllPages(): Promise { - if (!this.fetchAllPagesPromise) { - this.fetchAllPagesPromise = AjaxHelper.fetch({ - method: 'API.getReportPagesMetadata', - filter_limit: '-1', - }).then((response) => { - this.privateState.pages = response; - return this.pages.value; - }); - } - - return this.fetchAllPagesPromise.then(() => this.pages.value); - } -} - -export default new ReportingPagesStore(); diff --git a/plugins/CoreHome/vue/src/SearchFiltersPersistence/SearchFiltersPersistence.store.ts b/plugins/CoreHome/vue/src/SearchFiltersPersistence/SearchFiltersPersistence.store.ts deleted file mode 100644 index de0456bec5ef76bc635808d159cadc4949b198a8..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/SearchFiltersPersistence/SearchFiltersPersistence.store.ts +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { computed, reactive, readonly } from 'vue'; -import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import Matomo from '../Matomo/Matomo'; - -interface SearchFiltersPersistenceState { - module: string; - action: string; - category: string; - subcategory: string; - idSite: string; - widgetSearchFilters: Record>; -} - -export class SearchFiltersPersistenceStore { - constructor() { - Matomo.on('matomoPageChange', () => { - if (!this.isCurrentPage()) { - this.resetSearchFilters(); - } - - this.updateCurrentRoutingFromUrl(); - }); - } - - private privateState = reactive({ - module: '', - action: '', - category: '', - subcategory: '', - idSite: '', - widgetSearchFilters: {}, - }); - - private state = computed(() => readonly(this.privateState)); - - resetSearchFilters(): void { - this.privateState.widgetSearchFilters = {}; - } - - getSearchFilters(widgetId: string): Record { - return this.state.value.widgetSearchFilters[widgetId] || {}; - } - - setSearchFilters(widgetId: string, filters: Record): void { - if (widgetId) { - this.privateState.widgetSearchFilters[widgetId] = filters; - } - } - - updateCurrentRoutingFromUrl(): void { - const url = MatomoUrl.parsed.value; - - this.privateState.module = url.module as string; - this.privateState.action = url.action as string; - this.privateState.category = url.category as string; - this.privateState.subcategory = url.subcategory as string; - this.privateState.idSite = url.idSite as string; - } - - isCurrentPage(): boolean { - const url = MatomoUrl.parsed.value; - - return ( - this.state.value.module === url.module - && this.state.value.action === url.action - && this.state.value.category === url.category - && this.state.value.subcategory === url.subcategory - && this.state.value.idSite === url.idSite) as boolean; - } -} - -export default new SearchFiltersPersistenceStore(); diff --git a/plugins/CoreHome/vue/src/SearchInput/SearchInput.less b/plugins/CoreHome/vue/src/SearchInput/SearchInput.less deleted file mode 100644 index 823689e8c6de81570b902b90941bd6390da0f2b9..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/SearchInput/SearchInput.less +++ /dev/null @@ -1,49 +0,0 @@ -.searchInputContainer { - position: relative; - width: 100%; - - .icon-search { - position: absolute; - font-size: 14px; - top: 50%; - left: 12px; - transform: translateY(-50%); - line-height: 1; - color: @theme-color-border; - pointer-events: none; - } - - .searchInputField { - height: 38px; - font-size: 14px; - line-height: 18px; - padding: 10px 12px 10px 38px; - border: 1px solid @theme-color-border; - border-radius: @_selector-dropdown_border-radius; - background: @theme-color-background-contrast; - width: 100%; - - &:focus-visible { - border: 1px solid @theme-color-focus-ring; - outline: 1px solid @theme-color-focus-ring; - } - - &::placeholder { - color: @theme-color-text-placeholder; - font-size: 14px; - } - } - - .searchInputClear { - position: absolute; - width: 13px; - height: 13px; - right: 12px; - top: 50%; - transform: translateY(-50%); - padding: 0; - border: 0; - background: transparent; - cursor: pointer; - } -} diff --git a/plugins/CoreHome/vue/src/SearchInput/SearchInput.spec.ts b/plugins/CoreHome/vue/src/SearchInput/SearchInput.spec.ts deleted file mode 100644 index 8d850deb65822cc9f93c68d89d689bceb4699b24..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/vue/src/SearchInput/SearchInput.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { mount } from '@vue/test-utils'; -import SearchInput from './SearchInput.vue'; - -describe('CoreHome/SearchInput', () => { - it('renders the search icon and translated placeholder', () => { - const wrapper = mount(SearchInput, { - props: { - modelValue: '', - }, - }); - - expect(wrapper.find('.icon-search').exists()).toBe(true); - expect(wrapper.find('input').attributes('placeholder')).toBe('General_Search'); - }); - - it('reflects the provided model value', () => { - const wrapper = mount(SearchInput, { - props: { - modelValue: 'segment', - }, - }); - - expect((wrapper.find('input').element as HTMLInputElement).value).toBe('segment'); - }); - - it('emits update:modelValue when the input value changes', async () => { - const wrapper = mount(SearchInput, { - props: { - modelValue: '', - }, - }); - - await wrapper.find('input').setValue('country'); - - expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['country']); - }); - - it('clears to an empty string when the clear button is clicked', async () => { - const wrapper = mount(SearchInput, { - props: { - modelValue: 'country', - showClear: true, - }, - }); - - await wrapper.find('.searchInputClear').trigger('click'); - - expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['']); - }); -});