diff options
Diffstat (limited to 'plugins')
107 files changed, 1789 insertions, 720 deletions
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php index e73cc6a37f..20679ecadc 100644 --- a/plugins/API/Controller.php +++ b/plugins/API/Controller.php @@ -193,13 +193,11 @@ class Controller extends \Piwik\Plugin\Controller foreach ($glossaryItems as &$item) { $item['letters'] = array(); foreach ($item['entries'] as &$entry) { - $cleanEntryName = preg_replace('/["\']/', '', $entry['name']); - $entry['letter'] = mb_strtoupper(substr($cleanEntryName, 0, 1)); - $item['letters'][] = $entry['letter']; + $cleanEntryName = mb_ereg_replace('["\']', '', $entry['name']); + $letter = mb_strtoupper(mb_substr($cleanEntryName, 0, 1)); + $entry['letter'] = $letter; + $item['letters'][$letter] = $letter; } - - $item['letters'] = array_unique($item['letters']); - sort($item['letters']); } return $this->renderTemplate('glossary', array( diff --git a/plugins/API/stylesheets/glossary.less b/plugins/API/stylesheets/glossary.less index 9b275867bc..be8b418f3d 100644 --- a/plugins/API/stylesheets/glossary.less +++ b/plugins/API/stylesheets/glossary.less @@ -1,5 +1,5 @@ -.glossary .table-of-contents a { +.glossary .pagination a { box-sizing: content-box; padding: 0 10px 5px; &:hover, &.active { @@ -8,4 +8,14 @@ border-left: none; border-bottom: 2px solid @color-blue-piwik; } -}
\ No newline at end of file +} + +.glossary .pagination li { + // a {line-height: 30px + padding: 5px} + // vs standard .pagination li {height: 30px} + height: 35px; +} + +.glossary .scrollspy { + padding-top: 2rem; +} diff --git a/plugins/API/templates/glossary.twig b/plugins/API/templates/glossary.twig index 3138c195f6..0b7e471cfd 100644 --- a/plugins/API/templates/glossary.twig +++ b/plugins/API/templates/glossary.twig @@ -28,7 +28,7 @@ <div class="card-content"> <div style="background:#fff;width:100%" class="pushpin"> <h2 class="card-title">{{ item.title }}</h2> - <ul class="pagination table-of-contents"> + <ul class="pagination"> {% for letter in item.letters %} <li class="waves-effect"><a href="#{{ keyword }}{{ letter }}">{{ letter }}</a></li> {% endfor %} @@ -39,7 +39,7 @@ {% if not lastLetter or lastLetter != entry.letter %} {% if lastLetter %}</div>{% endif %} {% set lastLetter = entry.letter %} - <div class="section scrollspy" id="{{ keyword }}{{ lastLetter }}"> + <div class="scrollspy" id="{{ keyword }}{{ lastLetter }}"> {% endif %} <h3 style="color:#4183C4;font-weight: bold;">{{ entry.name }}</h3> {% if entry.subtitle|default is not empty %}<p style="color:#999;text-transform:uppercase;font-weight:normal;margin-top:-16px;">{{ entry.subtitle|translate }}</p>{% endif %} diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml index b5116edf12..19917a02cf 100644 --- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml +++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml @@ -35,6 +35,9 @@ <goalPageId>95</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>search</referrerType> + <referrerName>Google</referrerName> + <referrerKeyword>wikileaks ftw</referrerKeyword> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -171,6 +174,9 @@ <goalPageId>46</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -205,6 +211,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -413,6 +422,9 @@ <goalPageId>45</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -557,6 +569,9 @@ <goalPageId>41</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -572,6 +587,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -789,6 +807,9 @@ <goalPageId>40</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -933,6 +954,9 @@ <goalPageId>35</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -967,6 +991,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1204,6 +1231,9 @@ <goalPageId>34</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1348,6 +1378,9 @@ <goalPageId>30</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1363,6 +1396,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1571,6 +1607,9 @@ <goalPageId>29</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1715,6 +1754,9 @@ <goalPageId>24</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1749,6 +1791,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1966,6 +2011,9 @@ <goalPageId>23</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2110,6 +2158,9 @@ <goalPageId>19</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2125,6 +2176,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2352,6 +2406,9 @@ <goalPageId>80</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2367,6 +2424,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2596,6 +2656,9 @@ <goalPageId>18</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2750,6 +2813,9 @@ <goalPageId>79</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2894,6 +2960,9 @@ <goalPageId>13</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2928,6 +2997,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3126,6 +3198,9 @@ <goalPageId>74</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3160,6 +3235,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3360,6 +3438,9 @@ <goalPageId>12</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3514,6 +3595,9 @@ <goalPageId>73</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3658,6 +3742,9 @@ <goalPageId>8</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3673,6 +3760,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3871,6 +3961,9 @@ <goalPageId>58</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3886,6 +3979,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4084,6 +4180,9 @@ <goalPageId>69</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4099,6 +4198,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4289,6 +4391,9 @@ <goalPageId>91</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4304,6 +4409,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4521,6 +4629,9 @@ <goalPageId>7</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4684,6 +4795,9 @@ <goalPageId>57</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4847,6 +4961,9 @@ <goalPageId>68</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5010,6 +5127,9 @@ <goalPageId>90</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5154,6 +5274,9 @@ <goalPageId>2</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5188,6 +5311,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5415,6 +5541,9 @@ <goalPageId>52</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5449,6 +5578,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5676,6 +5808,9 @@ <goalPageId>63</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5710,6 +5845,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5929,6 +6067,9 @@ <goalPageId>85</goalPageId> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5963,6 +6104,9 @@ <goalPageId /> <url>http://piwik.net/space/quest/iv</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6200,6 +6344,9 @@ <goalPageId>1</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6354,6 +6501,9 @@ <goalPageId>51</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6508,6 +6658,9 @@ <goalPageId>62</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6662,6 +6815,9 @@ <goalPageId>84</goalPageId> <url>http://piwik.net/grue/lair</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> diff --git a/plugins/Bandwidth b/plugins/Bandwidth -Subproject 4144b047d740d3a583a4f4029e9f40561a31fe3 +Subproject 400fbc087727135743cde9d487cb6a14cdf30ea diff --git a/plugins/CoreAdminHome/lang/en.json b/plugins/CoreAdminHome/lang/en.json index 4103987beb..4c7c891f35 100644 --- a/plugins/CoreAdminHome/lang/en.json +++ b/plugins/CoreAdminHome/lang/en.json @@ -169,7 +169,8 @@ "UserInviteContent": "You can accept this invitation by clicking the accept button below.", "UserInviteNotes": "This invitation was intended for %1$s access. If you were not expecting this invitation, you can ignore this email. If %2$s is sending you too many emails, you can block them or report abuse. The invitation automatically expires in 7 days.", "SecurityNotificationUserAcceptInviteBody": "User (login: %s) accepted the invitation.", - "SecurityNotificationUserDeclinedInviteBody": "User (login: %s) declined the invitation." - + "SecurityNotificationUserDeclinedInviteBody": "User (login: %s) declined the invitation.", + "NeedHelp": "Need help?", + "HowToGetHelp": "There are different ways you can get help. There is free support via the Matomo Community and paid support provided by the Matomo team and partners of Matomo. Or maybe do you have a bug to report or want to suggest a new feature?" } } diff --git a/plugins/CoreAdminHome/templates/home.twig b/plugins/CoreAdminHome/templates/home.twig index 2f8e8cb904..420a954ffe 100644 --- a/plugins/CoreAdminHome/templates/home.twig +++ b/plugins/CoreAdminHome/templates/home.twig @@ -4,14 +4,12 @@ {% block content %} {% set feedbackHelp %} - <div piwik-content-block content-title="Need help?"> + <div piwik-content-block content-title="{{ 'CoreAdminHome_NeedHelp'|translate }}"> <div> - There are different ways you can get help. There is free support via the Matomo Community and paid support - provided by the Matomo team and partners of Matomo. Or maybe do you have a bug to report or want to suggest a new - feature? + {{ 'CoreAdminHome_HowToGetHelp'|translate }} <br /> <br /> - <a href="{{ linkTo({'module': 'Feedback', 'action': 'index'}) }}">Learn more</a> + <a href="{{ linkTo({'module': 'Feedback', 'action': 'index'}) }}">{{ 'CoreAdminHome_LearnMore'|translate }}</a> </div> </div> {% endset %} diff --git a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js index f513f1c008..d8162b2447 100644 --- a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js +++ b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js @@ -1018,58 +1018,58 @@ SmtpSettingsvue_type_script_lang_ts.render = SmtpSettingsvue_type_template_id_a9 }, directiveName: 'matomoSmtpSettings' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=template&id=79b5d52d +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=template&id=589b17b8 -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_1 = { +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_1 = { id: "js-code-options" }; -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_4 = ["innerHTML"]; -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_5 = ["innerHTML"]; +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_4 = ["innerHTML"]; +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_5 = ["innerHTML"]; -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_8 = ["innerHTML"]; +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_8 = ["innerHTML"]; -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_11 = ["innerHTML"]; +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_11 = ["innerHTML"]; -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_12 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_13 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_13 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_14 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_14 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/", target: "_blank", rel: "noopener" }, "WordPress", -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_16 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_16 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/", target: "_blank", rel: "noopener" }, "Squarespace", -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/", target: "_blank", rel: "noopener" }, "Wix", -1); -var JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_19 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); +var JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_19 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" | "); var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org/faq/how-to-install/faq_19424/", @@ -1195,7 +1195,7 @@ var _hoisted_58 = { var _hoisted_59 = { class: "col s12" }; -function JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_render(_ctx, _cache, $props, $setup, $data, $options) { +function JsTrackingCodeGeneratorvue_type_template_id_589b17b8_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); @@ -1207,15 +1207,15 @@ function JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_render(_ctx, _cach "content-title": _ctx.translate('CoreAdminHome_JavaScriptTracking') }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_1, [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.translate('CoreAdminHome_JSTrackingIntro1')) + " ", 1), JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_2, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreAdminHome_JSTrackingIntro2')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_1, [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.translate('CoreAdminHome_JSTrackingIntro1')) + " ", 1), JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_2, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreAdminHome_JSTrackingIntro2')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.jsTrackingIntro3a) - }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(' ' + _ctx.jsTrackingIntro3b) - }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_5), JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_6, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_5), JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_6, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.jsTrackingIntro4a) - }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_8), JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_9, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_8), JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_9, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.jsTrackingIntro5) - }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_11), JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_12, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_InstallationGuides')) + " : ", 1), JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_14, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_15, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_16, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_17, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_18, JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_hoisted_19, _hoisted_20, _hoisted_21, _hoisted_22, _hoisted_23, _hoisted_24, _hoisted_25, _hoisted_26]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_11), JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_12, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_13, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_InstallationGuides')) + " : ", 1), JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_14, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_15, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_16, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_17, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_18, JsTrackingCodeGeneratorvue_type_template_id_589b17b8_hoisted_19, _hoisted_20, _hoisted_21, _hoisted_22, _hoisted_23, _hoisted_24, _hoisted_25, _hoisted_26]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "site", name: "js-tracker-website", class: "jsTrackingCodeWebsite", @@ -1414,7 +1414,7 @@ function JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_render(_ctx, _cach _: 1 }, 8, ["content-title"]); } -// CONCATENATED MODULE: ./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=template&id=79b5d52d +// CONCATENATED MODULE: ./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=template&id=589b17b8 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=script&lang=ts @@ -1684,7 +1684,7 @@ var piwikPath = window.location.pathname.substring(0, window.location.pathname.l return Object(external_CoreHome_["translate"])('General_LearnMore', " (<a href=\"".concat(subdomainsLink, "\" rel=\"noreferrer noopener\" target=\"_blank\">"), '</a>)'); }, jsTrackCampaignParamsInlineHelp: function jsTrackCampaignParamsInlineHelp() { - return Object(external_CoreHome_["translate"])('CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc', '<a href="https://matomo.org/faq/general/#faq_119" rel="noreferrer noopener" target="_blank">', '</a>'); + return Object(external_CoreHome_["translate"])('CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc', '<a href="https://matomo.org/faq/general/faq_119" rel="noreferrer noopener" target="_blank">', '</a>'); } } })); @@ -1694,7 +1694,7 @@ var piwikPath = window.location.pathname.substring(0, window.location.pathname.l -JsTrackingCodeGeneratorvue_type_script_lang_ts.render = JsTrackingCodeGeneratorvue_type_template_id_79b5d52d_render +JsTrackingCodeGeneratorvue_type_script_lang_ts.render = JsTrackingCodeGeneratorvue_type_template_id_589b17b8_render /* harmony default export */ var JsTrackingCodeGenerator = (JsTrackingCodeGeneratorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.adapter.ts diff --git a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js index 4f51c76e89..43ed78a9bb 100644 --- a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js +++ b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js @@ -16,7 +16,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function lt(e,t,n,o,a,r){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("ContentBlock"),s=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{anchor:"javaScriptTracking","content-title":e.translate("CoreAdminHome_JavaScriptTracking")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",ne,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro1"))+" ",1),oe,ae,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro2"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro3a)},null,8,re),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(" "+e.jsTrackingIntro3b)},null,8,ie),le,ce,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro4a)},null,8,se),de,ue,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro5)},null,8,me),ge,pe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_InstallationGuides"))+" : ",1),be,he,je,ve,fe,Oe,Ce,ke,Ve,Se,Ne,ye,Te]),Object(i["createVNode"])(l,{uicontrol:"site",name:"js-tracker-website",class:"jsTrackingCodeWebsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(i["createElementVNode"])("div",Ae,[Object(i["createElementVNode"])("div",Ee,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_JsTrackingTag")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")),1)]),Object(i["createElementVNode"])("button",{class:"btn",id:"emailJsBtn",onClick:t[1]||(t[1]=function(t){return e.sendEmail()})},Object(i["toDisplayString"])(e.translate("SitesManager_EmailInstructionsButton")),1)]),Object(i["createElementVNode"])("div",we,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,_e),[[s,{}]])])]),Object(i["createElementVNode"])("div",He,[Object(i["createElementVNode"])("div",De,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mergeSubdomainsDesc)},null,8,Be),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,Le)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-subdomains","model-value":e.trackAllSubdomains,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackAllSubdomains=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeSubdomains")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllSubdomainsInlineHelp"},null,8,["model-value","disabled","introduction","title"])]),Object(i["createElementVNode"])("div",Ue,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomainDesc1",e.currentSiteHost)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-group-by-domain","model-value":e.groupByDomain,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.groupByDomain=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomain"),"inline-help":"#jsTrackGroupByDomainInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",xe,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_MergeAliasesDesc",e.currentSiteAlias)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-aliases","model-value":e.trackAllAliases,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.trackAllAliases=t,e.updateTrackingCode()}),disabled:e.isLoading,title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeAliases")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllAliasesInlineHelp"},null,8,["model-value","disabled","title"])]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-noscript","model-value":e.trackNoScript,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.trackNoScript=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_TrackNoScript")},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("Mobile_Advanced")),1),Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[6]||(t[6]=Object(i["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(i["toDisplayString"])(e.translate("General_Show")),513),[[i["vShow"],!e.showAdvanced]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[7]||(t[7]=Object(i["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(i["toDisplayString"])(e.translate("General_Hide")),513),[[i["vShow"],e.showAdvanced]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Fe,[Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-visitor-cv-check","model-value":e.trackCustomVars,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.trackCustomVars=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_VisitorCustomVars"),"inline-help":e.translate("CoreAdminHome_JSTracking_VisitorCustomVarsDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Ge,[Object(i["createElementVNode"])("div",Pe,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("div",Me,Object(i["toDisplayString"])(e.translate("General_Value")),1)]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.customVars,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"row",key:n},[Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-name",onKeydown:function(t){return e.onCustomVarNameKeydown(t,n)},placeholder:"e.g. Type"},null,40,qe)]),Object(i["createElementVNode"])("div",Re,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-value",onKeydown:function(t){return e.onCustomVarValueKeydown(t,n)},placeholder:"e.g. Customer"},null,40,We)])])})),128)),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",$e,[Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[9]||(t[9]=function(t){return e.addCustomVar()}),class:"add-custom-variable"},[ze,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Add")),1)])])],512),[[i["vShow"],e.canAddMoreCustomVariables]])],512),[[i["vShow"],e.trackCustomVars]]),Object(i["createElementVNode"])("div",Qe,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain"))+" ",1),Ye,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain_NeedsMultipleDomains")),1)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-cross-domain","model-value":e.crossDomain,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.crossDomain=t,e.updateTrackingCode(),e.onCrossDomainToggle()}),disabled:e.isLoading||!e.hasManySiteUrls,title:e.translate("CoreAdminHome_JSTracking_EnableCrossDomainLinking"),"inline-help":"#jsCrossDomain"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",Xe,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrackDesc"))+" ",1),e.serverSideDoNotTrackEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ze,[et,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack_AlreadyEnabled")),1)])):Object(i["createCommentVNode"])("",!0)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-do-not-track","model-value":e.doNotTrack,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.doNotTrack=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack"),"inline-help":"#jsDoNotTrackInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-disable-cookies","model-value":e.disableCookies,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.disableCookies=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCookies"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCookiesDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(i["createElementVNode"])("div",{id:"jsTrackCampaignParamsInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.jsTrackCampaignParamsInlineHelp)},null,8,tt),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"custom-campaign-query-params-check","model-value":e.useCustomCampaignParams,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.useCustomCampaignParams=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CustomCampaignQueryParam"),"inline-help":"#jsTrackCampaignParamsInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",ot,[Object(i["createElementVNode"])("div",at,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-name-query-param","model-value":e.customCampaignName,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.customCampaignName=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignNameParam")},null,8,["model-value","disabled","title"])])]),Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("div",it,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-keyword-query-param","model-value":e.customCampaignKeyword,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.customCampaignKeyword=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam")},null,8,["model-value","disabled","title"])])])],512),[[i["vShow"],e.useCustomCampaignParams]])],512),[[i["vShow"],e.showAdvanced]])]})),_:1},8,["content-title"])}function ct(e){var t=new URL(e);return t.hostname}function st(e){return e.map((function(e){return[e.name,e.value]}))}var dt=window,ut=dt.$,mt=window.location.host,gt=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),pt=Object(i["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data:function(){return{showAdvanced:!1,site:this.defaultSite,trackingCode:"",trackAllSubdomains:!1,isLoading:!1,siteUrls:{},siteExcludedQueryParams:{},crossDomain:!1,groupByDomain:!1,trackAllAliases:!1,trackNoScript:!1,trackCustomVars:!1,customVars:[],canAddMoreCustomVariables:!!this.maxCustomVariables&&this.maxCustomVariables>0,doNotTrack:!1,disableCookies:!1,useCustomCampaignParams:!1,customCampaignName:"",customCampaignKeyword:"",trackingCodeAbortController:null,isHighlighting:!1}},components:{ContentBlock:r["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:r["SelectOnFocus"]},created:function(){this.onCustomVarNameKeydown=Object(r["debounce"])(this.onCustomVarNameKeydown,100),this.onCustomVarValueKeydown=Object(r["debounce"])(this.onCustomVarValueKeydown,100),this.addCustomVar(),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t=this,n=e.id,o=[];this.siteUrls[n]||(this.isLoading=!0,o.push(r["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteUrlsFromId",idSite:n,filter_limit:"-1"}).then((function(e){t.siteUrls[n]=e||[]})))),this.siteExcludedQueryParams[n]||(this.isLoading=!0,o.push(r["AjaxHelper"].fetch({module:"API",method:"Overlay.getExcludedQueryParameters",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedQueryParams[n]=e||[]})))),Promise.all(o).then((function(){t.isLoading=!1,t.updateCurrentSiteInfo(),t.updateTrackingCode()}))},sendEmail:function(){var e=Object(r["translate"])("SitesManager_EmailInstructionsSubject");e=encodeURIComponent(e);var t=this.trackingCode;t=t.replace(/<[^>]+>/g,"");var n="".concat(Object(r["translate"])("SitesManager_JsTrackingTagHelp"),". ").concat(Object(r["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHeadEmail","'head"),"\n").concat(t);n=encodeURIComponent(n);var o="mailto:?subject=".concat(e,"&body=").concat(n);window.location.href=o},onCrossDomainToggle:function(){this.crossDomain&&(this.trackAllAliases=!0)},updateTrackingCode:function(){var e=this,t=this.site,n={piwikUrl:"".concat(mt).concat(gt),groupPageTitlesByDomain:this.groupByDomain?1:0,mergeSubdomains:this.trackAllSubdomains?1:0,mergeAliasUrls:this.trackAllAliases?1:0,visitorCustomVariables:this.trackCustomVars?st(this.customVars):0,customCampaignNameQueryParam:null,customCampaignKeywordParam:null,doNotTrack:this.doNotTrack?1:0,disableCookies:this.disableCookies?1:0,crossDomain:this.crossDomain?1:0,trackNoScript:this.trackNoScript?1:0,forceMatomoEndpoint:1};this.siteExcludedQueryParams[t.id]&&(n.excludedQueryParams=this.siteExcludedQueryParams[t.id]),this.useCustomCampaignParams&&(n.customCampaignNameQueryParam=this.customCampaignName,n.customCampaignKeywordParam=this.customCampaignKeyword),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,r["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getJavascriptTag",idSite:t.id},n,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=ut(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))},updateCurrentSiteInfo:function(){this.hasManySiteUrls||(this.crossDomain=!1)},addCustomVar:function(){this.canAddMoreCustomVariables&&this.customVars.push({name:"",value:""}),this.canAddMoreCustomVariables=!!this.maxCustomVariables&&this.maxCustomVariables>this.customVars.length},onCustomVarNameKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].name=e.target.value,n.updateTrackingCode()}))},onCustomVarValueKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].value=e.target.value,n.updateTrackingCode()}))}},computed:{hasManySiteUrls:function(){var e=this.site;return this.siteUrls[e.id]&&this.siteUrls[e.id].length>1},currentSiteHost:function(){var e,t=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[0];return t?ct(t):""},currentSiteAlias:function(){var e,t="x.".concat(this.currentSiteHost),n=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[1];return n||t},currentSiteName:function(){return r["Matomo"].helper.htmlEntities(this.site.name)},jsTrackingIntro3a:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro3a",'<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">',"</a>")},jsTrackingIntro3b:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro3b")},jsTrackingIntro4a:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro4",'<a href="#image-tracking-link">',"</a>")},jsTrackingIntro5:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro5",'<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">',"</a>")},mergeSubdomainsDesc:function(){return Object(r["translate"])("CoreAdminHome_JSTracking_MergeSubdomainsDesc","x.".concat(this.currentSiteHost),"y.".concat(this.currentSiteHost))},learnMoreText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains";return Object(r["translate"])("General_LearnMore",' (<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>)")},jsTrackCampaignParamsInlineHelp:function(){return Object(r["translate"])("CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc",'<a href="https://matomo.org/faq/general/#faq_119" rel="noreferrer noopener" target="_blank">',"</a>")}}});pt.render=lt;var bt=pt,ht=(Object(r["createAngularJsAdapter"])({component:bt,scope:{defaultSite:{angularJsBind:"<"},maxCustomVariables:{angularJsBind:"<"},serverSideDoNotTrackEnabled:{angularJsBind:"<"}},directiveName:"matomoJsTrackingCodeGenerator"}),Object(i["createElementVNode"])("a",{name:"image-tracking-link"},null,-1)),jt={id:"image-tracking-code-options"},vt=["innerHTML"],ft=["innerHTML"],Ot={id:"image-tracking-goal-sub"},Ct={class:"row"},kt={class:"col s12 m6"},Vt={class:"col s12 m6"},St={id:"image-link-output-section"},Nt={id:"image-tracking-text"},yt=["textContent"]; + */function lt(e,t,n,o,a,r){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("ContentBlock"),s=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{anchor:"javaScriptTracking","content-title":e.translate("CoreAdminHome_JavaScriptTracking")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",ne,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro1"))+" ",1),oe,ae,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro2"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro3a)},null,8,re),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(" "+e.jsTrackingIntro3b)},null,8,ie),le,ce,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro4a)},null,8,se),de,ue,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro5)},null,8,me),ge,pe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_InstallationGuides"))+" : ",1),be,he,je,ve,fe,Oe,Ce,ke,Ve,Se,Ne,ye,Te]),Object(i["createVNode"])(l,{uicontrol:"site",name:"js-tracker-website",class:"jsTrackingCodeWebsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(i["createElementVNode"])("div",Ae,[Object(i["createElementVNode"])("div",Ee,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_JsTrackingTag")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")),1)]),Object(i["createElementVNode"])("button",{class:"btn",id:"emailJsBtn",onClick:t[1]||(t[1]=function(t){return e.sendEmail()})},Object(i["toDisplayString"])(e.translate("SitesManager_EmailInstructionsButton")),1)]),Object(i["createElementVNode"])("div",we,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,_e),[[s,{}]])])]),Object(i["createElementVNode"])("div",He,[Object(i["createElementVNode"])("div",De,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mergeSubdomainsDesc)},null,8,Be),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,Le)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-subdomains","model-value":e.trackAllSubdomains,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackAllSubdomains=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeSubdomains")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllSubdomainsInlineHelp"},null,8,["model-value","disabled","introduction","title"])]),Object(i["createElementVNode"])("div",Ue,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomainDesc1",e.currentSiteHost)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-group-by-domain","model-value":e.groupByDomain,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.groupByDomain=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomain"),"inline-help":"#jsTrackGroupByDomainInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",xe,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_MergeAliasesDesc",e.currentSiteAlias)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-aliases","model-value":e.trackAllAliases,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.trackAllAliases=t,e.updateTrackingCode()}),disabled:e.isLoading,title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeAliases")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllAliasesInlineHelp"},null,8,["model-value","disabled","title"])]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-noscript","model-value":e.trackNoScript,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.trackNoScript=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_TrackNoScript")},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("Mobile_Advanced")),1),Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[6]||(t[6]=Object(i["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(i["toDisplayString"])(e.translate("General_Show")),513),[[i["vShow"],!e.showAdvanced]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[7]||(t[7]=Object(i["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(i["toDisplayString"])(e.translate("General_Hide")),513),[[i["vShow"],e.showAdvanced]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Fe,[Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-visitor-cv-check","model-value":e.trackCustomVars,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.trackCustomVars=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_VisitorCustomVars"),"inline-help":e.translate("CoreAdminHome_JSTracking_VisitorCustomVarsDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Ge,[Object(i["createElementVNode"])("div",Pe,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("div",Me,Object(i["toDisplayString"])(e.translate("General_Value")),1)]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.customVars,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"row",key:n},[Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-name",onKeydown:function(t){return e.onCustomVarNameKeydown(t,n)},placeholder:"e.g. Type"},null,40,qe)]),Object(i["createElementVNode"])("div",Re,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-value",onKeydown:function(t){return e.onCustomVarValueKeydown(t,n)},placeholder:"e.g. Customer"},null,40,We)])])})),128)),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",$e,[Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[9]||(t[9]=function(t){return e.addCustomVar()}),class:"add-custom-variable"},[ze,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Add")),1)])])],512),[[i["vShow"],e.canAddMoreCustomVariables]])],512),[[i["vShow"],e.trackCustomVars]]),Object(i["createElementVNode"])("div",Qe,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain"))+" ",1),Ye,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain_NeedsMultipleDomains")),1)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-cross-domain","model-value":e.crossDomain,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.crossDomain=t,e.updateTrackingCode(),e.onCrossDomainToggle()}),disabled:e.isLoading||!e.hasManySiteUrls,title:e.translate("CoreAdminHome_JSTracking_EnableCrossDomainLinking"),"inline-help":"#jsCrossDomain"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",Xe,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrackDesc"))+" ",1),e.serverSideDoNotTrackEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ze,[et,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack_AlreadyEnabled")),1)])):Object(i["createCommentVNode"])("",!0)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-do-not-track","model-value":e.doNotTrack,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.doNotTrack=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack"),"inline-help":"#jsDoNotTrackInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-disable-cookies","model-value":e.disableCookies,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.disableCookies=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCookies"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCookiesDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(i["createElementVNode"])("div",{id:"jsTrackCampaignParamsInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.jsTrackCampaignParamsInlineHelp)},null,8,tt),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"custom-campaign-query-params-check","model-value":e.useCustomCampaignParams,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.useCustomCampaignParams=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CustomCampaignQueryParam"),"inline-help":"#jsTrackCampaignParamsInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",ot,[Object(i["createElementVNode"])("div",at,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-name-query-param","model-value":e.customCampaignName,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.customCampaignName=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignNameParam")},null,8,["model-value","disabled","title"])])]),Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("div",it,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-keyword-query-param","model-value":e.customCampaignKeyword,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.customCampaignKeyword=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam")},null,8,["model-value","disabled","title"])])])],512),[[i["vShow"],e.useCustomCampaignParams]])],512),[[i["vShow"],e.showAdvanced]])]})),_:1},8,["content-title"])}function ct(e){var t=new URL(e);return t.hostname}function st(e){return e.map((function(e){return[e.name,e.value]}))}var dt=window,ut=dt.$,mt=window.location.host,gt=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),pt=Object(i["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data:function(){return{showAdvanced:!1,site:this.defaultSite,trackingCode:"",trackAllSubdomains:!1,isLoading:!1,siteUrls:{},siteExcludedQueryParams:{},crossDomain:!1,groupByDomain:!1,trackAllAliases:!1,trackNoScript:!1,trackCustomVars:!1,customVars:[],canAddMoreCustomVariables:!!this.maxCustomVariables&&this.maxCustomVariables>0,doNotTrack:!1,disableCookies:!1,useCustomCampaignParams:!1,customCampaignName:"",customCampaignKeyword:"",trackingCodeAbortController:null,isHighlighting:!1}},components:{ContentBlock:r["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:r["SelectOnFocus"]},created:function(){this.onCustomVarNameKeydown=Object(r["debounce"])(this.onCustomVarNameKeydown,100),this.onCustomVarValueKeydown=Object(r["debounce"])(this.onCustomVarValueKeydown,100),this.addCustomVar(),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t=this,n=e.id,o=[];this.siteUrls[n]||(this.isLoading=!0,o.push(r["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteUrlsFromId",idSite:n,filter_limit:"-1"}).then((function(e){t.siteUrls[n]=e||[]})))),this.siteExcludedQueryParams[n]||(this.isLoading=!0,o.push(r["AjaxHelper"].fetch({module:"API",method:"Overlay.getExcludedQueryParameters",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedQueryParams[n]=e||[]})))),Promise.all(o).then((function(){t.isLoading=!1,t.updateCurrentSiteInfo(),t.updateTrackingCode()}))},sendEmail:function(){var e=Object(r["translate"])("SitesManager_EmailInstructionsSubject");e=encodeURIComponent(e);var t=this.trackingCode;t=t.replace(/<[^>]+>/g,"");var n="".concat(Object(r["translate"])("SitesManager_JsTrackingTagHelp"),". ").concat(Object(r["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHeadEmail","'head"),"\n").concat(t);n=encodeURIComponent(n);var o="mailto:?subject=".concat(e,"&body=").concat(n);window.location.href=o},onCrossDomainToggle:function(){this.crossDomain&&(this.trackAllAliases=!0)},updateTrackingCode:function(){var e=this,t=this.site,n={piwikUrl:"".concat(mt).concat(gt),groupPageTitlesByDomain:this.groupByDomain?1:0,mergeSubdomains:this.trackAllSubdomains?1:0,mergeAliasUrls:this.trackAllAliases?1:0,visitorCustomVariables:this.trackCustomVars?st(this.customVars):0,customCampaignNameQueryParam:null,customCampaignKeywordParam:null,doNotTrack:this.doNotTrack?1:0,disableCookies:this.disableCookies?1:0,crossDomain:this.crossDomain?1:0,trackNoScript:this.trackNoScript?1:0,forceMatomoEndpoint:1};this.siteExcludedQueryParams[t.id]&&(n.excludedQueryParams=this.siteExcludedQueryParams[t.id]),this.useCustomCampaignParams&&(n.customCampaignNameQueryParam=this.customCampaignName,n.customCampaignKeywordParam=this.customCampaignKeyword),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,r["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getJavascriptTag",idSite:t.id},n,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=ut(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))},updateCurrentSiteInfo:function(){this.hasManySiteUrls||(this.crossDomain=!1)},addCustomVar:function(){this.canAddMoreCustomVariables&&this.customVars.push({name:"",value:""}),this.canAddMoreCustomVariables=!!this.maxCustomVariables&&this.maxCustomVariables>this.customVars.length},onCustomVarNameKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].name=e.target.value,n.updateTrackingCode()}))},onCustomVarValueKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].value=e.target.value,n.updateTrackingCode()}))}},computed:{hasManySiteUrls:function(){var e=this.site;return this.siteUrls[e.id]&&this.siteUrls[e.id].length>1},currentSiteHost:function(){var e,t=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[0];return t?ct(t):""},currentSiteAlias:function(){var e,t="x.".concat(this.currentSiteHost),n=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[1];return n||t},currentSiteName:function(){return r["Matomo"].helper.htmlEntities(this.site.name)},jsTrackingIntro3a:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro3a",'<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">',"</a>")},jsTrackingIntro3b:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro3b")},jsTrackingIntro4a:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro4",'<a href="#image-tracking-link">',"</a>")},jsTrackingIntro5:function(){return Object(r["translate"])("CoreAdminHome_JSTrackingIntro5",'<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">',"</a>")},mergeSubdomainsDesc:function(){return Object(r["translate"])("CoreAdminHome_JSTracking_MergeSubdomainsDesc","x.".concat(this.currentSiteHost),"y.".concat(this.currentSiteHost))},learnMoreText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains";return Object(r["translate"])("General_LearnMore",' (<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>)")},jsTrackCampaignParamsInlineHelp:function(){return Object(r["translate"])("CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc",'<a href="https://matomo.org/faq/general/faq_119" rel="noreferrer noopener" target="_blank">',"</a>")}}});pt.render=lt;var bt=pt,ht=(Object(r["createAngularJsAdapter"])({component:bt,scope:{defaultSite:{angularJsBind:"<"},maxCustomVariables:{angularJsBind:"<"},serverSideDoNotTrackEnabled:{angularJsBind:"<"}},directiveName:"matomoJsTrackingCodeGenerator"}),Object(i["createElementVNode"])("a",{name:"image-tracking-link"},null,-1)),jt={id:"image-tracking-code-options"},vt=["innerHTML"],ft=["innerHTML"],Ot={id:"image-tracking-goal-sub"},Ct={class:"row"},kt={class:"col s12 m6"},Vt={class:"col s12 m6"},St={id:"image-link-output-section"},Nt={id:"image-tracking-text"},yt=["textContent"]; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue b/plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue index de0dfb784c..5fc37e32f1 100644 --- a/plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue +++ b/plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue @@ -612,7 +612,7 @@ export default defineComponent({ jsTrackCampaignParamsInlineHelp() { return translate( 'CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc', - '<a href="https://matomo.org/faq/general/#faq_119" rel="noreferrer noopener" target="_blank">', + '<a href="https://matomo.org/faq/general/faq_119" rel="noreferrer noopener" target="_blank">', '</a>', ); }, 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 index 0c61345340..518a96e437 100644 --- 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 @@ -41,6 +41,9 @@ <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</title> @@ -174,6 +177,9 @@ <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</title> @@ -307,6 +313,9 @@ <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</title> 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 index 30ee92f48c..3b05ea5b20 100644 --- 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 @@ -41,6 +41,9 @@ <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</title> @@ -399,6 +402,9 @@ <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</title> @@ -536,6 +542,9 @@ <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</title> @@ -673,6 +682,9 @@ <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</title> @@ -806,6 +818,9 @@ <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</title> @@ -939,6 +954,9 @@ <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</title> @@ -1072,6 +1090,9 @@ <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</title> 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 index 0c61345340..518a96e437 100644 --- 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 @@ -41,6 +41,9 @@ <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</title> @@ -174,6 +177,9 @@ <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</title> @@ -307,6 +313,9 @@ <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</title> 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 index 30ee92f48c..3b05ea5b20 100644 --- 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 @@ -41,6 +41,9 @@ <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</title> @@ -399,6 +402,9 @@ <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</title> @@ -536,6 +542,9 @@ <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</title> @@ -673,6 +682,9 @@ <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</title> @@ -806,6 +818,9 @@ <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</title> @@ -939,6 +954,9 @@ <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</title> @@ -1072,6 +1090,9 @@ <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</title> diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php index 7dac6b6088..7a969f751e 100644 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php @@ -21,6 +21,7 @@ use Piwik\Plugins\API\Filter\DataComparisonFilter; use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution as EvolutionViz; use Piwik\Url; use Piwik\ViewDataTable\Factory; +use Piwik\ViewDataTable\Manager as ViewDataTableManager; /** * ROW EVOLUTION @@ -111,8 +112,12 @@ class RowEvolution 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(); - list($this->date, $lastN) = EvolutionViz::getDateRangeAndLastN($this->period, $end); + list($this->date, $lastN) = EvolutionViz::getDateRangeAndLastN($this->period, $end, $lastDay); } $this->segment = \Piwik\API\Request::getRawSegmentFromRequest(); diff --git a/plugins/CoreHome/templates/_warningInvalidHost.twig b/plugins/CoreHome/templates/_warningInvalidHost.twig index a29ef55271..a9a29ae768 100644 --- a/plugins/CoreHome/templates/_warningInvalidHost.twig +++ b/plugins/CoreHome/templates/_warningInvalidHost.twig @@ -1,7 +1,7 @@ {# untrusted host warning #} {% if (isValidHost is defined and invalidHostMessage is defined and isValidHost == false) %} {% set invalidHostText %} - <a class="btn btn-link" style="float:right;" href="https://matomo.org/faq/troubleshooting/#faq_171" rel="noreferrer noopener" target="_blank"> + <a class="btn btn-link" style="float:right;" href="https://matomo.org/faq/troubleshooting/faq_171" rel="noreferrer noopener" target="_blank"> <span class="icon-help"></span> {{ 'General_Help'|translate }} </a> diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index 7ba559baa0..6019b20262 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -1129,9 +1129,15 @@ var MatomoUrl_MatomoUrl = /*#__PURE__*/function () { MatomoUrl_classCallCheck(this, MatomoUrl); - MatomoUrl_defineProperty(this, "urlQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])('')); + MatomoUrl_defineProperty(this, "url", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null)); - MatomoUrl_defineProperty(this, "hashQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])('')); + MatomoUrl_defineProperty(this, "urlQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return _this.url.value ? _this.url.value.search.replace(/^\?/, '') : ''; + })); + + MatomoUrl_defineProperty(this, "hashQuery", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return _this.url.value ? _this.url.value.hash.replace(/^[#/?]+/, '') : ''; + })); MatomoUrl_defineProperty(this, "urlParsed", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.parse(_this.urlQuery.value)); @@ -1145,17 +1151,12 @@ var MatomoUrl_MatomoUrl = /*#__PURE__*/function () { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(Object.assign(Object.assign({}, _this.urlParsed.value), _this.hashParsed.value)); })); - this.setUrlQuery(window.location.search); - this.setHashQuery(window.location.hash); // $locationChangeSuccess is triggered before angularjs changes actual window the hash, so we + this.url.value = new URL(window.location.href); // $locationChangeSuccess is triggered before angularjs changes actual window the hash, so we // have to hook into this method if we want our event handlers to execute before other angularjs // handlers (like the reporting page one) Matomo_Matomo.on('$locationChangeSuccess', function (absUrl) { - var url = new URL(absUrl); - - _this.setUrlQuery(url.search.replace(/^\?/, '')); - - _this.setHashQuery(url.hash.replace(/^#/, '')); + _this.url.value = new URL(absUrl); }); this.updatePeriodParamsFromUrl(); } @@ -1282,16 +1283,6 @@ var MatomoUrl_MatomoUrl = /*#__PURE__*/function () { MatomoUrl_piwik.currentDateString = date; } - }, { - key: "setUrlQuery", - value: function setUrlQuery(search) { - this.urlQuery.value = search.replace(/^\?/, ''); - } - }, { - key: "setHashQuery", - value: function setHashQuery(hash) { - this.hashQuery.value = hash.replace(/^[#/?]+/, ''); - } }]); return MatomoUrl; @@ -5770,44 +5761,44 @@ PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_templa directiveName: 'piwikPeriodDatePicker', restrict: 'E' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=48e19035 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=72269392 -var SiteSelectorvue_type_template_id_48e19035_hoisted_1 = ["value", "name"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_2 = ["title"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_3 = ["textContent"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_4 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_1 = ["value", "name"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_2 = ["title"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_3 = ["textContent"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_4 = { key: 1, class: "placeholder" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_5 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_5 = { class: "dropdown" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_6 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_6 = { class: "custom_select_search" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_7 = ["placeholder"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_8 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_7 = ["placeholder"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_8 = { key: 0 }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_9 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_9 = { class: "custom_select_container" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_10 = ["onClick"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_11 = ["innerHTML", "href", "title"]; -var SiteSelectorvue_type_template_id_48e19035_hoisted_12 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_10 = ["onClick"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_11 = ["innerHTML", "href", "title"]; +var SiteSelectorvue_type_template_id_72269392_hoisted_12 = { class: "ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_13 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_13 = { class: "ui-menu-item" }; -var SiteSelectorvue_type_template_id_48e19035_hoisted_14 = { +var SiteSelectorvue_type_template_id_72269392_hoisted_14 = { class: "ui-corner-all", tabindex: "-1" }; var _hoisted_15 = { key: 1 }; -function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, $setup, $data, $options) { +function SiteSelectorvue_type_template_id_72269392_render(_ctx, _cache, $props, $setup, $data, $options) { var _ctx$modelValue, _ctx$modelValue2, _ctx$modelValue3, _ctx$modelValue4; var _component_AllSitesLink = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("AllSitesLink"); @@ -5826,7 +5817,7 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, type: "hidden", value: (_ctx$modelValue = _ctx.modelValue) === null || _ctx$modelValue === void 0 ? void 0 : _ctx$modelValue.id, name: _ctx.name - }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, SiteSelectorvue_type_template_id_72269392_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { ref: "selectorLink", onClick: _cache[0] || (_cache[0] = function () { return _ctx.onClickSelector && _ctx.onClickSelector.apply(_ctx, arguments); @@ -5848,7 +5839,7 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [(_ctx$modelValue2 = _ctx.modelValue) !== null && _ctx$modelValue2 !== void 0 && _ctx$modelValue2.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$modelValue3 = _ctx.modelValue) === null || _ctx$modelValue3 === void 0 ? void 0 : _ctx$modelValue3.name) || _ctx.firstSiteName) - }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.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_48e19035_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_48e19035_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_48e19035_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_48e19035_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, SiteSelectorvue_type_template_id_72269392_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.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_72269392_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_72269392_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_72269392_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_72269392_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] = function ($event) { _ctx.searchTerm = ''; @@ -5861,7 +5852,7 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, tabindex: "4", class: "websiteSearch inp browser-default", placeholder: _ctx.translate('General_Search') - }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.shouldFocusOnSearch]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + }, null, 8, SiteSelectorvue_type_template_id_72269392_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _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] = function ($event) { _ctx.searchTerm = ''; @@ -5870,13 +5861,13 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, }), 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_48e19035_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, 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_72269392_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] = function ($event) { return _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_["createElementVNode"])("div", SiteSelectorvue_type_template_id_48e19035_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { + }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_72269392_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { class: "custom_select_ul_list", onClick: _cache[7] || (_cache[7] = function ($event) { return _ctx.showSitesList = false; @@ -5897,8 +5888,8 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, tabindex: "4", href: _ctx.getUrlForSiteId(site.idsite), title: site.name - }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_11)], 8, SiteSelectorvue_type_template_id_48e19035_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_48e19035_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_48e19035_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_48e19035_hoisted_14, 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]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, null, 8, SiteSelectorvue_type_template_id_72269392_hoisted_11)], 8, SiteSelectorvue_type_template_id_72269392_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_72269392_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_72269392_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_72269392_hoisted_14, 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]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { href: _ctx.urlAllSites, "all-sites-text": _ctx.allSitesText, onClick: _cache[8] || (_cache[8] = function ($event) { @@ -5908,7 +5899,7 @@ function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=48e19035 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=72269392 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=template&id=45607d28 @@ -6142,19 +6133,7 @@ function debounce(fn) { /* harmony default export */ var SiteSelectorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - modelValue: { - type: Object, - default: function _default(props) { - if (props.modelValue) { - return props.modelValue; - } - - return Matomo_Matomo.idSite ? { - id: Matomo_Matomo.idSite, - name: Matomo_Matomo.helper.htmlDecode(Matomo_Matomo.siteName) - } : undefined; - } - }, + modelValue: Object, showSelectedSite: { type: Boolean, default: false @@ -6183,7 +6162,8 @@ function debounce(fn) { type: String, default: 'bottom' }, - placeholder: String + placeholder: String, + defaultToFirstSite: Boolean }, emits: ['update:modelValue', 'blur'], components: { @@ -6210,13 +6190,20 @@ function debounce(fn) { }, created: function 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: function mounted() { var _this = this; window.initTopControls(); this.loadInitialSites().then(function () { - if ((!_this.modelValue || !_this.modelValue.id) && !_this.hasMultipleSites && _this.sites[0]) { + if ((!_this.modelValue || !_this.modelValue.id) && (!_this.hasMultipleSites || _this.defaultToFirstSite) && _this.sites[0]) { _this.$emit('update:modelValue', { id: _this.sites[0].idsite, name: _this.sites[0].name @@ -6385,7 +6372,7 @@ function debounce(fn) { -SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_48e19035_render +SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_72269392_render /* harmony default export */ var SiteSelector = (SiteSelectorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 02986c0705..46595f74a7 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createVueApp",(function(){return dt})),n.d(t,"useExternalPluginComponent",(function(){return $n})),n.d(t,"DirectiveUtilities",(function(){return $t})),n.d(t,"debounce",(function(){return Gi})),n.d(t,"getFormattedEvolution",(function(){return Eu})),n.d(t,"createAngularJsAdapter",(function(){return kt})),n.d(t,"transformAngularJsBoolAttr",(function(){return St})),n.d(t,"transformAngularJsIntAttr",(function(){return Ct})),n.d(t,"removeAngularJsSpecificProperties",(function(){return jt})),n.d(t,"clone",(function(){return Et})),n.d(t,"cloneThenApply",(function(){return Dt})),n.d(t,"activityIndicatorAdapter",(function(){return Du})),n.d(t,"ActivityIndicator",(function(){return go})),n.d(t,"translate",(function(){return C})),n.d(t,"translateOrDefault",(function(){return E})),n.d(t,"Alert",(function(){return ut})),n.d(t,"AjaxHelper",(function(){return Ze})),n.d(t,"setCookie",(function(){return Pu})),n.d(t,"getCookie",(function(){return Vu})),n.d(t,"deleteCookie",(function(){return Nu})),n.d(t,"MatomoUrl",(function(){return Ee})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return z})),n.d(t,"Week",(function(){return Z})),n.d(t,"Month",(function(){return ie})),n.d(t,"Year",(function(){return se})),n.d(t,"Range",(function(){return H})),n.d(t,"format",(function(){return D})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return V})),n.d(t,"todayIsInRange",(function(){return N})),n.d(t,"DropdownMenu",(function(){return Pt})),n.d(t,"FocusAnywhereButHere",(function(){return Bt})),n.d(t,"FocusIf",(function(){return Rt})),n.d(t,"Tooltips",(function(){return Rr})),n.d(t,"MatomoDialog",(function(){return Cn})),n.d(t,"ExpandOnClick",(function(){return Qt})),n.d(t,"ExpandOnHover",(function(){return rn})),n.d(t,"ShowSensitiveData",(function(){return cn})),n.d(t,"DropdownButton",(function(){return pn})),n.d(t,"SelectOnFocus",(function(){return vn})),n.d(t,"SideNav",(function(){return wn})),n.d(t,"EnrichedHeadline",(function(){return qn})),n.d(t,"ContentBlock",(function(){return tr})),n.d(t,"Comparisons",(function(){return _r})),n.d(t,"MenuItemsDropdown",(function(){return ti})),n.d(t,"DatePicker",(function(){return ci})),n.d(t,"DateRangePicker",(function(){return fi})),n.d(t,"PeriodDatePicker",(function(){return yi})),n.d(t,"Notification",(function(){return ol})),n.d(t,"NotificationGroup",(function(){return wl})),n.d(t,"NotificationsStore",(function(){return hl})),n.d(t,"SitesStore",(function(){return Wi})),n.d(t,"SiteSelector",(function(){return Yi})),n.d(t,"QuickAccess",(function(){return pa})),n.d(t,"FieldArray",(function(){return Ea})),n.d(t,"MultiPairField",(function(){return Ua})),n.d(t,"PeriodSelector",(function(){return No})),n.d(t,"ReportingMenu",(function(){return Zl})),n.d(t,"ReportingMenuStore",(function(){return Hl})),n.d(t,"ReportingPagesStore",(function(){return El})),n.d(t,"ReportMetadataStore",(function(){return cc})),n.d(t,"WidgetsStore",(function(){return Ql})),n.d(t,"WidgetLoader",(function(){return hc})),n.d(t,"WidgetContainer",(function(){return Vc})),n.d(t,"WidgetByDimensionContainer",(function(){return Wc})),n.d(t,"Widget",(function(){return Xc})),n.d(t,"ReportingPage",(function(){return ws})),n.d(t,"ReportExport",(function(){return Xs})),n.d(t,"Sparkline",(function(){return ru})),n.d(t,"Progressbar",(function(){return uu})),n.d(t,"ContentIntro",(function(){return du})),n.d(t,"ContentTable",(function(){return mu})),n.d(t,"AjaxForm",(function(){return wu})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createVueApp",(function(){return dt})),n.d(t,"useExternalPluginComponent",(function(){return $n})),n.d(t,"DirectiveUtilities",(function(){return $t})),n.d(t,"debounce",(function(){return Gi})),n.d(t,"getFormattedEvolution",(function(){return Eu})),n.d(t,"createAngularJsAdapter",(function(){return kt})),n.d(t,"transformAngularJsBoolAttr",(function(){return St})),n.d(t,"transformAngularJsIntAttr",(function(){return Ct})),n.d(t,"removeAngularJsSpecificProperties",(function(){return jt})),n.d(t,"clone",(function(){return Et})),n.d(t,"cloneThenApply",(function(){return Dt})),n.d(t,"activityIndicatorAdapter",(function(){return Du})),n.d(t,"ActivityIndicator",(function(){return go})),n.d(t,"translate",(function(){return C})),n.d(t,"translateOrDefault",(function(){return E})),n.d(t,"Alert",(function(){return ut})),n.d(t,"AjaxHelper",(function(){return Ze})),n.d(t,"setCookie",(function(){return Pu})),n.d(t,"getCookie",(function(){return Vu})),n.d(t,"deleteCookie",(function(){return Nu})),n.d(t,"MatomoUrl",(function(){return Ee})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return z})),n.d(t,"Week",(function(){return Z})),n.d(t,"Month",(function(){return ie})),n.d(t,"Year",(function(){return se})),n.d(t,"Range",(function(){return H})),n.d(t,"format",(function(){return D})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return V})),n.d(t,"todayIsInRange",(function(){return N})),n.d(t,"DropdownMenu",(function(){return Pt})),n.d(t,"FocusAnywhereButHere",(function(){return Bt})),n.d(t,"FocusIf",(function(){return Ft})),n.d(t,"Tooltips",(function(){return Fr})),n.d(t,"MatomoDialog",(function(){return Cn})),n.d(t,"ExpandOnClick",(function(){return Qt})),n.d(t,"ExpandOnHover",(function(){return rn})),n.d(t,"ShowSensitiveData",(function(){return cn})),n.d(t,"DropdownButton",(function(){return pn})),n.d(t,"SelectOnFocus",(function(){return vn})),n.d(t,"SideNav",(function(){return wn})),n.d(t,"EnrichedHeadline",(function(){return qn})),n.d(t,"ContentBlock",(function(){return tr})),n.d(t,"Comparisons",(function(){return _r})),n.d(t,"MenuItemsDropdown",(function(){return ti})),n.d(t,"DatePicker",(function(){return ci})),n.d(t,"DateRangePicker",(function(){return fi})),n.d(t,"PeriodDatePicker",(function(){return yi})),n.d(t,"Notification",(function(){return ol})),n.d(t,"NotificationGroup",(function(){return wl})),n.d(t,"NotificationsStore",(function(){return hl})),n.d(t,"SitesStore",(function(){return Wi})),n.d(t,"SiteSelector",(function(){return Yi})),n.d(t,"QuickAccess",(function(){return pa})),n.d(t,"FieldArray",(function(){return Ea})),n.d(t,"MultiPairField",(function(){return Ua})),n.d(t,"PeriodSelector",(function(){return No})),n.d(t,"ReportingMenu",(function(){return Zl})),n.d(t,"ReportingMenuStore",(function(){return Hl})),n.d(t,"ReportingPagesStore",(function(){return El})),n.d(t,"ReportMetadataStore",(function(){return cc})),n.d(t,"WidgetsStore",(function(){return Ql})),n.d(t,"WidgetLoader",(function(){return hc})),n.d(t,"WidgetContainer",(function(){return Vc})),n.d(t,"WidgetByDimensionContainer",(function(){return Wc})),n.d(t,"Widget",(function(){return Xc})),n.d(t,"ReportingPage",(function(){return ws})),n.d(t,"ReportExport",(function(){return Xs})),n.d(t,"Sparkline",(function(){return ru})),n.d(t,"Progressbar",(function(){return uu})),n.d(t,"ContentIntro",(function(){return du})),n.d(t,"ContentTable",(function(){return mu})),n.d(t,"AjaxForm",(function(){return wu})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * @@ -29,13 +29,13 @@ function C(e){if(!e)return"";for(var t=arguments.length,n=new Array(t>1?t-1:0),r * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function D(e){return $.datepicker.formatDate("yy-mm-dd",e)}function P(){var 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 V(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=P();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var a=P();return a.setFullYear(a.getFullYear()-1),a}return $.datepicker.parseDate("yy-mm-dd",t)}function N(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function T(e,t){return M(e)||B(e,t)||I(e,t)||A()}function A(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,t){if(e){if("string"===typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function M(e){if(Array.isArray(e))return e}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function D(e){return $.datepicker.formatDate("yy-mm-dd",e)}function P(){var 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 V(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=P();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var a=P();return a.setFullYear(a.getFullYear()-1),a}return $.datepicker.parseDate("yy-mm-dd",t)}function N(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function T(e,t){return M(e)||B(e,t)||I(e,t)||A()}function A(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,t){if(e){if("string"===typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function M(e){if(Array.isArray(e))return e}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var H=function(){function e(t,n,r){L(this,e),_(this,"startDate",void 0),_(this,"endDate",void 0),_(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return F(e,[{key:"getPrettyString",value:function(){var e=D(this.startDate),t=D(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return N(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var a=r?V(r):P(),o=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-i);else if("week"===t)o.setDate(o.getDate()-7*i);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-i)}if("day"!==t){var l=p.periods[t].parse(o),c=p.periods[t].parse(a),s=l.getDateRange(),u=T(s,1);o=u[0];var d=c.getDateRange(),m=T(d,2);a=m[1]}var f=new Date(1991,7,6);if(o.getTime()-f.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=f;break}return new e(o,a,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?V(n):P(),a=new Date(i.getTime()),o=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-r),o.setDate(o.getDate()-r);else if("week"===t)a.setDate(a.getDate()-7*r),o.setDate(o.getDate()-7*r);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-r),o.setDate(1),o.setMonth(o.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-r),o.setFullYear(o.getFullYear()-r)}if("day"!==t){var l=p.periods[t].parse(a),c=p.periods[t].parse(o),s=l.getDateRange(),u=T(s,1);a=u[0];var d=c.getDateRange(),m=T(d,2);o=m[1]}var f=new Date(1991,7,6);if(a.getTime()-f.getTime()<0)switch(t){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=f;break}return new e(a,o,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(V(i[0]),V(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function U(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:V,format:D,RangePeriod:H,todayIsInRange:N}}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var H=function(){function e(t,n,r){L(this,e),_(this,"startDate",void 0),_(this,"endDate",void 0),_(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return R(e,[{key:"getPrettyString",value:function(){var e=D(this.startDate),t=D(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return N(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var a=r?V(r):P(),o=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-i);else if("week"===t)o.setDate(o.getDate()-7*i);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-i)}if("day"!==t){var l=p.periods[t].parse(o),c=p.periods[t].parse(a),s=l.getDateRange(),u=T(s,1);o=u[0];var d=c.getDateRange(),m=T(d,2);a=m[1]}var f=new Date(1991,7,6);if(o.getTime()-f.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=f;break}return new e(o,a,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?V(n):P(),a=new Date(i.getTime()),o=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-r),o.setDate(o.getDate()-r);else if("week"===t)a.setDate(a.getDate()-7*r),o.setDate(o.getDate()-7*r);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-r),o.setDate(1),o.setMonth(o.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-r),o.setFullYear(o.getFullYear()-r)}if("day"!==t){var l=p.periods[t].parse(a),c=p.periods[t].parse(o),s=l.getDateRange(),u=T(s,1);a=u[0];var d=c.getDateRange(),m=T(d,2);o=m[1]}var f=new Date(1991,7,6);if(a.getTime()-f.getTime()<0)switch(t){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=f;break}return new e(a,o,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(V(i[0]),V(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function U(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:V,format:D,RangePeriod:H,todayIsInRange:N}}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * @@ -79,7 +79,7 @@ function ue(e,t){return he(e)||fe(e,t)||pe(e,t)||de()}function de(){throw new Ty * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("year",se);var we=window,Oe=we.piwik,je=we.broadcast;function ke(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Se=function(){function e(){var t=this;ge(this,e),ye(this,"urlQuery",Object(a["ref"])("")),ye(this,"hashQuery",Object(a["ref"])("")),ye(this,"urlParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.urlQuery.value))}))),ye(this,"hashParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.hashQuery.value))}))),ye(this,"parsed",Object(a["computed"])((function(){return Object(a["readonly"])(Object.assign(Object.assign({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return be(e,[{key:"updateHashToUrl",value:function(e){var t=S.helper.getAngularDependency("$location");t.url(e)}},{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:this.parse(e),r="string"!==typeof e?t:this.parse(t);return Object.assign({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"parse",value:function(e){return je.getValuesFromUrl("?".concat(e),!0)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=ue(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",").replace(/\+/g,"%20")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(ke(t,e)&&(Oe.period!==t||Oe.currentDateString!==e)){Oe.period=t;var n=p.parse(t,e).getDateRange();Oe.startDateString=D(n[0]),Oe.endDateString=D(n[1]),Oe.updateDateInTitle(e,t),"range"===Oe.period&&(e="".concat(Oe.startDateString,",").concat(Oe.endDateString)),Oe.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Ce=new Se,Ee=Ce; + */p.addCustomPeriod("year",se);var we=window,Oe=we.piwik,je=we.broadcast;function ke(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Se=function(){function e(){var t=this;ge(this,e),ye(this,"url",Object(a["ref"])(null)),ye(this,"urlQuery",Object(a["computed"])((function(){return t.url.value?t.url.value.search.replace(/^\?/,""):""}))),ye(this,"hashQuery",Object(a["computed"])((function(){return t.url.value?t.url.value.hash.replace(/^[#/?]+/,""):""}))),ye(this,"urlParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.urlQuery.value))}))),ye(this,"hashParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.hashQuery.value))}))),ye(this,"parsed",Object(a["computed"])((function(){return Object(a["readonly"])(Object.assign(Object.assign({},t.urlParsed.value),t.hashParsed.value))}))),this.url.value=new URL(window.location.href),S.on("$locationChangeSuccess",(function(e){t.url.value=new URL(e)})),this.updatePeriodParamsFromUrl()}return be(e,[{key:"updateHashToUrl",value:function(e){var t=S.helper.getAngularDependency("$location");t.url(e)}},{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:this.parse(e),r="string"!==typeof e?t:this.parse(t);return Object.assign({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"parse",value:function(e){return je.getValuesFromUrl("?".concat(e),!0)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=ue(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",").replace(/\+/g,"%20")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(ke(t,e)&&(Oe.period!==t||Oe.currentDateString!==e)){Oe.period=t;var n=p.parse(t,e).getDateRange();Oe.startDateString=D(n[0]),Oe.endDateString=D(n[1]),Oe.updateDateInTitle(e,t),"range"===Oe.period&&(e="".concat(Oe.startDateString,",").concat(Oe.endDateString)),Oe.currentDateString=e}}}]),e}(),Ce=new Se,Ee=Ce; /*! * Matomo - free/libre analytics platform * @@ -93,13 +93,13 @@ function De(){var e={getSearchParam:Ee.getSearchParam.bind(Ee)};return e} * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Pe(){return S}function Ve(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ne(e){return Ne="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Te(e){return Be(e)||xe(e)||Ie(e)||Ae()}function Ae(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ie(e,t){if(e){if("string"===typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}function xe(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Be(e){if(Array.isArray(e))return Me(e)}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),e}function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}function He(e){var t=Ge();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ue(this,n)}}function Ue(e,t){if(t&&("object"===Ne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qe(e)}function qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function We(e){var t="function"===typeof Map?new Map:void 0;return We=function(e){if(null===e||!ze(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Je(e,arguments,Qe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ye(n,e)},We(e)}function Je(e,t,n){return Je=Ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),a=new i;return n&&Ye(a,n.prototype),a},Je.apply(null,arguments)}function Ge(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ze(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Ye(e,t){return Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ye(e,t)}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)} +function Pe(){return S}function Ve(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ne(e){return Ne="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Te(e){return Be(e)||xe(e)||Ie(e)||Ae()}function Ae(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ie(e,t){if(e){if("string"===typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}function xe(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Be(e){if(Array.isArray(e))return Me(e)}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}function He(e){var t=Ge();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ue(this,n)}}function Ue(e,t){if(t&&("object"===Ne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qe(e)}function qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function We(e){var t="function"===typeof Map?new Map:void 0;return We=function(e){if(null===e||!ze(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Je(e,arguments,Qe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ye(n,e)},We(e)}function Je(e,t,n){return Je=Ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),a=new i;return n&&Ye(a,n.prototype),a},Je.apply(null,arguments)}function Ge(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ze(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Ye(e,t){return Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ye(e,t)}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ke(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}Oe.updatePeriodParamsFromUrl=Ce.updatePeriodParamsFromUrl.bind(Ce),window.angular.module("piwikApp.service").service("piwikUrl",De),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",Pe),Ve.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Ve),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Xe=function(e){$e(n,e);var t=He(n);function n(){return _e(this,n),t.apply(this,arguments)}return n}(We(Error)),Ze=function(){function e(){_e(this,e),Fe(this,"format","json"),Fe(this,"timeout",null),Fe(this,"callback",null),Fe(this,"useRegularCallbackInCaseOfError",!1),Fe(this,"errorCallback",void 0),Fe(this,"withToken",!1),Fe(this,"completeCallback",void 0),Fe(this,"getParams",{}),Fe(this,"getUrl","?"),Fe(this,"postParams",{}),Fe(this,"loadingElement",null),Fe(this,"errorElement","#ajaxError"),Fe(this,"headers",void 0),Fe(this,"requestHandle",null),Fe(this,"abortController",null),Fe(this,"defaultParams",["idSite","period","date","segment"]),Fe(this,"resolveWithHelper",!1),this.errorCallback=Ke}return Re(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("boolean"===typeof a&&(a=a?1:0),"get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ee.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){!t.useGETDefaultParameter(e)||null!==i[e]&&"undefined"!==typeof i[e]&&""!==i[e]||null!==t.postParams[e]&&"undefined"!==typeof t.postParams[e]&&""!==t.postParams[e]||!r[e]||(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;n.withTokenInUrl&&r.withTokenInUrl(),n.errorElement&&r.setErrorElement(n.errorElement),n.redirectOnSuccess&&r.redirectOnSuccess(!0!==n.redirectOnSuccess?n.redirectOnSuccess:void 0),r.setFormat(n.format||"json"),Array.isArray(t)?r.setBulkRequests.apply(r,Te(t)):r.addParams(Object.assign(Object.assign({module:"API",format:n.format||"json"},t),{},{segment:t.segment?encodeURIComponent(t.segment):void 0}),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers);var i=!0;return"undefined"===typeof n.createErrorNotification||n.createErrorNotification||(r.useCallbackInCaseOfError(),r.setErrorCallback(null),i=!1),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new Xe(n.message);return t})).catch((function(e){if(i)throw e;var t="Something went wrong";throw 504===e.status&&(t="Request was prossibly aborted"),new Error(t)}))}},{key:"post",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.fetch(t,Object.assign(Object.assign({},r),{},{postParams:n}))}},{key:"oneAtATime",value:function(t,n){var r=null;return function(i,a){return r&&r.abort(),r=new AbortController,e.post(Object.assign(Object.assign({},i),{},{method:t}),a,Object.assign(Object.assign({},n),{},{abortController:r})).finally((function(){r=null}))}}}]),e}();function et(){return window.globalAjaxQueue}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),e} + */function Ke(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}Oe.updatePeriodParamsFromUrl=Ce.updatePeriodParamsFromUrl.bind(Ce),window.angular.module("piwikApp.service").service("piwikUrl",De),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",Pe),Ve.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Ve),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Xe=function(e){$e(n,e);var t=He(n);function n(){return _e(this,n),t.apply(this,arguments)}return n}(We(Error)),Ze=function(){function e(){_e(this,e),Re(this,"format","json"),Re(this,"timeout",null),Re(this,"callback",null),Re(this,"useRegularCallbackInCaseOfError",!1),Re(this,"errorCallback",void 0),Re(this,"withToken",!1),Re(this,"completeCallback",void 0),Re(this,"getParams",{}),Re(this,"getUrl","?"),Re(this,"postParams",{}),Re(this,"loadingElement",null),Re(this,"errorElement","#ajaxError"),Re(this,"headers",void 0),Re(this,"requestHandle",null),Re(this,"abortController",null),Re(this,"defaultParams",["idSite","period","date","segment"]),Re(this,"resolveWithHelper",!1),this.errorCallback=Ke}return Fe(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("boolean"===typeof a&&(a=a?1:0),"get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ee.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){!t.useGETDefaultParameter(e)||null!==i[e]&&"undefined"!==typeof i[e]&&""!==i[e]||null!==t.postParams[e]&&"undefined"!==typeof t.postParams[e]&&""!==t.postParams[e]||!r[e]||(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;n.withTokenInUrl&&r.withTokenInUrl(),n.errorElement&&r.setErrorElement(n.errorElement),n.redirectOnSuccess&&r.redirectOnSuccess(!0!==n.redirectOnSuccess?n.redirectOnSuccess:void 0),r.setFormat(n.format||"json"),Array.isArray(t)?r.setBulkRequests.apply(r,Te(t)):r.addParams(Object.assign(Object.assign({module:"API",format:n.format||"json"},t),{},{segment:t.segment?encodeURIComponent(t.segment):void 0}),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers);var i=!0;return"undefined"===typeof n.createErrorNotification||n.createErrorNotification||(r.useCallbackInCaseOfError(),r.setErrorCallback(null),i=!1),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new Xe(n.message);return t})).catch((function(e){if(i)throw e;var t="Something went wrong";throw 504===e.status&&(t="Request was prossibly aborted"),new Error(t)}))}},{key:"post",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.fetch(t,Object.assign(Object.assign({},r),{},{postParams:n}))}},{key:"oneAtATime",value:function(t,n){var r=null;return function(i,a){return r&&r.abort(),r=new AbortController,e.post(Object.assign(Object.assign({},i),{},{method:t}),a,Object.assign(Object.assign({},n),{},{abortController:r})).finally((function(){r=null}))}}}]),e}();function et(){return window.globalAjaxQueue}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),e} /*! * Matomo - free/libre analytics platform * @@ -157,20 +157,20 @@ function Mt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,valu * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Lt(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Mt);var Rt={mounted:function(e,t){Lt(e,t)},updated:function(e,t){Lt(e,t)}}; +function Lt(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Mt);var Ft={mounted:function(e,t){Lt(e,t)},updated:function(e,t){Lt(e,t)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ft(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Rt.updated(t[0],r)}))}}} + */function Rt(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Ft.updated(t[0],r)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function _t(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",Ft);var $t={getRef:_t}; +function _t(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",Rt);var $t={getRef:_t}; /*! * Matomo - free/libre analytics platform * @@ -252,13 +252,13 @@ var yn=!1,wn={mounted:function(e,t){t.value.activator&&setTimeout((function(){if * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){wn.mounted(n[0],i)}))}}}On.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",On);var jn={ref:"root"};function kn(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jn,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var Sn=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});Sn.render=kn;var Cn=Sn,En=(kt({component:Cn,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0}),{key:0,class:"title",tabindex:"6"}),Dn=["href","title"],Pn={class:"iconsBar"},Vn=["href","title"],Nn=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Tn=[Nn],An=["title"],In=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),xn=[In],Bn={class:"ratingIcons"},Mn={class:"inlineHelp"},Ln=["innerHTML"],Rn=["innerHTML"],Fn=["href"]; +function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){wn.mounted(n[0],i)}))}}}On.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",On);var jn={ref:"root"};function kn(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jn,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var Sn=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});Sn.render=kn;var Cn=Sn,En=(kt({component:Cn,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0}),{key:0,class:"title",tabindex:"6"}),Dn=["href","title"],Pn={class:"iconsBar"},Vn=["href","title"],Nn=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Tn=[Nn],An=["title"],In=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),xn=[In],Bn={class:"ratingIcons"},Mn={class:"inlineHelp"},Ln=["innerHTML"],Fn=["innerHTML"],Rn=["href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _n(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Dn)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Pn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Tn,8,Vn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},xn,10,An)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Bn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Mn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Ln),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Rn)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Fn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} + */function _n(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Dn)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Pn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Tn,8,Vn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},xn,10,An)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Bn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Mn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Ln),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Fn)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Rn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * @@ -294,13 +294,13 @@ function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var xr=window,Br=xr.$;function Mr(){var e=Br(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function Lr(e,t){var n,r,i;Br(e).tooltip({track:!0,content:(null===(n=t.value)||void 0===n?void 0:n.content)||Mr,show:{delay:(null===(r=t.value)||void 0===r?void 0:r.delay)||700,duration:(null===(i=t.value)||void 0===i?void 0:i.duration)||200},hide:!1})}var Rr={mounted:function(e,t){setTimeout((function(){return Lr(e,t)}))},updated:function(e,t){setTimeout((function(){return Lr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}},Fr=Object(a["defineComponent"])({props:{},directives:{Tooltips:Rr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return jr.isComparing()})),t=Object(a["computed"])((function(){return jr.getSegmentComparisons()})),n=Object(a["computed"])((function(){return jr.getPeriodComparisons()})),r=jr.getSeriesColor.bind(jr);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),jr.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Object.assign({},Ee.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Ee.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,jr.isComparing()){var t=jr.getPeriodComparisons(),n=jr.getSegmentComparisons();Ze.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Ee.getSearchParam("compareSegments"),comparePeriods:Ee.getSearchParam("comparePeriods"),compareDates:Ee.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=jr.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=jr.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],l=e.reportData.comparisons[n.index],c='<div class="comparison-card-tooltip">',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="</div>",c}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Fr.render=Ir;var _r=Fr; + */var xr=window,Br=xr.$;function Mr(){var e=Br(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function Lr(e,t){var n,r,i;Br(e).tooltip({track:!0,content:(null===(n=t.value)||void 0===n?void 0:n.content)||Mr,show:{delay:(null===(r=t.value)||void 0===r?void 0:r.delay)||700,duration:(null===(i=t.value)||void 0===i?void 0:i.duration)||200},hide:!1})}var Fr={mounted:function(e,t){setTimeout((function(){return Lr(e,t)}))},updated:function(e,t){setTimeout((function(){return Lr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}},Rr=Object(a["defineComponent"])({props:{},directives:{Tooltips:Fr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return jr.isComparing()})),t=Object(a["computed"])((function(){return jr.getSegmentComparisons()})),n=Object(a["computed"])((function(){return jr.getPeriodComparisons()})),r=jr.getSeriesColor.bind(jr);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),jr.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Object.assign({},Ee.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Ee.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,jr.isComparing()){var t=jr.getPeriodComparisons(),n=jr.getSegmentComparisons();Ze.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Ee.getSearchParam("compareSegments"),comparePeriods:Ee.getSearchParam("comparePeriods"),compareDates:Ee.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=jr.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=jr.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],l=e.reportData.comparisons[n.index],c='<div class="comparison-card-tooltip">',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="</div>",c}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Rr.render=Ir;var _r=Rr; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function $r(){return jr}window.angular.module("piwikApp.service").factory("piwikComparisonsService",$r);kt({component:_r,directiveName:"piwikComparisons",restrict:"E"});var Hr={ref:"root",class:"menuDropdown"},Ur=["title"],qr=["innerHTML"],Wr=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Jr={class:"items"},Gr={key:0,class:"search"},zr=["placeholder"],Yr=["title"],Qr=["title"];function Kr(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Hr,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,qr),Wr],8,Ur),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Jr,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,zr),[[a["vModelText"],e.searchTerm],[l,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Yr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Qr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[c,{blur:e.lostFocus}]])}var Xr=window,Zr=Xr.$,ei=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:Bt,FocusIf:Rt},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Zr(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Zr(this.$refs.root).find(".item").each((function(e,n){var r=Zr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});ei.render=Kr;var ti=ei,ni=(kt({component:ti,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); + */function $r(){return jr}window.angular.module("piwikApp.service").factory("piwikComparisonsService",$r);kt({component:_r,directiveName:"piwikComparisons",restrict:"E"});var Hr={ref:"root",class:"menuDropdown"},Ur=["title"],qr=["innerHTML"],Wr=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Jr={class:"items"},Gr={key:0,class:"search"},zr=["placeholder"],Yr=["title"],Qr=["title"];function Kr(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Hr,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,qr),Wr],8,Ur),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Jr,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,zr),[[a["vModelText"],e.searchTerm],[l,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Yr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Qr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[c,{blur:e.lostFocus}]])}var Xr=window,Zr=Xr.$,ei=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Zr(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Zr(this.$refs.root).find(".item").each((function(e,n){var r=Zr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});ei.render=Kr;var ti=ei,ni=(kt({component:ti,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); /*! * Matomo - free/libre analytics platform * @@ -324,13 +324,13 @@ function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Bi(e,t,n,r,i,o){var l,c,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),m=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(l=e.modelValue)||void 0===l?void 0:l.id,name:e.name},null,8,wi)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(c=e.modelValue)&&void 0!==c&&c.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,ji)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ki,Object(a["toDisplayString"])(e.placeholder),1))])],42,Oi),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Si,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ci,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,Ei),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Di,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Pi,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(a["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Ni)],8,Vi)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ti,[Object(a["createElementVNode"])("li",Ai,[Object(a["createElementVNode"])("a",Ii,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",xi,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var Mi=["innerHTML","href"];function Li(e,t,n,r,i,o){var l=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return l.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Mi)])}var Ri=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Ri.render=Li;var Fi=Ri;function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hi(e,t,n){return t&&$i(e.prototype,t),n&&$i(e,n),e}function Ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Bi(e,t,n,r,i,o){var l,c,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),m=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(l=e.modelValue)||void 0===l?void 0:l.id,name:e.name},null,8,wi)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(c=e.modelValue)&&void 0!==c&&c.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,ji)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ki,Object(a["toDisplayString"])(e.placeholder),1))])],42,Oi),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Si,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ci,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,Ei),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Di,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Pi,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(a["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Ni)],8,Vi)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ti,[Object(a["createElementVNode"])("li",Ai,[Object(a["createElementVNode"])("a",Ii,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",xi,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var Mi=["innerHTML","href"];function Li(e,t,n,r,i,o){var l=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return l.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Mi)])}var Fi=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Fi.render=Li;var Ri=Fi;function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hi(e,t,n){return t&&$i(e.prototype,t),n&&$i(e,n),e}function Ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var qi=function(){function e(){var t=this;_i(this,e),Ui(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),Ui(this,"currentRequestAbort",null),Ui(this,"limitRequest",void 0),Ui(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return Hi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t}))}},{key:"loadSite",value:function(e){"all"===e?Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period})):Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Ze.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Ze.fetch({method:a,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Object.assign(Object.assign({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),Wi=new qi,Ji=300;function Gi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ji;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];t&&clearTimeout(t),t=setTimeout((function(){e.call.apply(e,[r].concat(a))}),n)}}var zi=Object(a["defineComponent"])({props:{modelValue:{type:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},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:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:Fi},directives:{FocusAnywhereButHere:Bt,FocusIf:Rt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(S.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Gi(this.searchSite)},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){if(!t.altKey){t.preventDefault?t.preventDefault():t.returnValue=!1;var n=e.$refs.selectorLink;n&&(n.click(),n.focus())}}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return Wi.initialSites.value&&Wi.initialSites.value.length>1},firstSiteName:function(){var e=Wi.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period}));return"?".concat(e)}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&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&&Wi.loadSite(e.id))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return Wi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,Wi.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e})),n=Ee.stringify(Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});zi.render=Bi;var Yi=zi; + */var qi=function(){function e(){var t=this;_i(this,e),Ui(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),Ui(this,"currentRequestAbort",null),Ui(this,"limitRequest",void 0),Ui(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return Hi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t}))}},{key:"loadSite",value:function(e){"all"===e?Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period})):Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Ze.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Ze.fetch({method:a,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Object.assign(Object.assign({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),Wi=new qi,Ji=300;function Gi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ji;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];t&&clearTimeout(t),t=setTimeout((function(){e.call.apply(e,[r].concat(a))}),n)}}var zi=Object(a["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:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String,defaultToFirstSite:Boolean},emits:["update:modelValue","blur"],components:{AllSitesLink:Ri},directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(S.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Gi(this.searchSite),!this.modelValue&&S.idSite&&this.$emit("update:modelValue",{id:S.idSite,name:S.helper.htmlDecode(S.siteName)})},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites&&!e.defaultToFirstSite||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){if(!t.altKey){t.preventDefault?t.preventDefault():t.returnValue=!1;var n=e.$refs.selectorLink;n&&(n.click(),n.focus())}}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return Wi.initialSites.value&&Wi.initialSites.value.length>1},firstSiteName:function(){var e=Wi.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period}));return"?".concat(e)}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&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&&Wi.loadSite(e.id))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return Wi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,Wi.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e})),n=Ee.stringify(Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});zi.render=Bi;var Yi=zi; /*! * Matomo - free/libre analytics platform * @@ -343,7 +343,7 @@ function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:Wi.loadSite.bind(Wi),loadInitialSites:function(){return Dt(Wi.loadInitialSites())},searchSite:function(){return Dt(Wi.searchSite.apply(Wi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Qi);var Ki={ref:"root",class:"quickAccessInside"},Xi=["title","placeholder"],Zi={class:"dropdown"},ea={class:"no-result"},ta=["onClick"],na=["onMouseenter","onClick"],ra={class:"quickAccessMatomoSearch"},ia=["onMouseenter","onClick"],aa=["textContent"],oa={class:"quick-access-category helpCategory"},la=["href"];function ca(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,Xi),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Zi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",ea,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ta),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,na)})),128))])})),128)),Object(a["createElementVNode"])("ul",ra,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,aa)],42,ia)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",oa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,la)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function sa(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var da=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:Bt,FocusIf:Rt},watch:{searchActive:function(e){var t=this.$refs.root;if(t&&t.parentElement){var n=t.parentElement.classList;n.toggle("active",e),n.toggle("expanded",e)}}},mounted:function(){var e=this,t=this.$refs.root;t&&t.parentElement&&t.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),ua(e.$refs.root),e.activateSearch())}))},data:function(){var 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:function(){this.searchMenu=Gi(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=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():r&&n||i&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!sa(e)&&ua(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,i={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Wi.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Wi.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());o&&(n.push({name:o,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.slice(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,category:a,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});da.render=ca;var pa=da; +function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:Wi.loadSite.bind(Wi),loadInitialSites:function(){return Dt(Wi.loadInitialSites())},searchSite:function(){return Dt(Wi.searchSite.apply(Wi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Qi);var Ki={ref:"root",class:"quickAccessInside"},Xi=["title","placeholder"],Zi={class:"dropdown"},ea={class:"no-result"},ta=["onClick"],na=["onMouseenter","onClick"],ra={class:"quickAccessMatomoSearch"},ia=["onMouseenter","onClick"],aa=["textContent"],oa={class:"quick-access-category helpCategory"},la=["href"];function ca(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,Xi),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Zi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",ea,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ta),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,na)})),128))])})),128)),Object(a["createElementVNode"])("ul",ra,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,aa)],42,ia)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",oa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,la)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function sa(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var da=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},watch:{searchActive:function(e){var t=this.$refs.root;if(t&&t.parentElement){var n=t.parentElement.classList;n.toggle("active",e),n.toggle("expanded",e)}}},mounted:function(){var e=this,t=this.$refs.root;t&&t.parentElement&&t.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),ua(e.$refs.root),e.activateSearch())}))},data:function(){var 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:function(){this.searchMenu=Gi(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=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():r&&n||i&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!sa(e)&&ua(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,i={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Wi.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Wi.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());o&&(n.push({name:o,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.slice(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,category:a,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});da.render=ca;var pa=da; /*! * Matomo - free/libre analytics platform * @@ -355,19 +355,19 @@ function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:W * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */kt({component:Ea,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pa={class:"multiPairField form-group"},Va={key:1,class:"fieldUiControl fieldUiControl2"},Na={key:2,class:"fieldUiControl fieldUiControl3"},Ta={key:3,class:"fieldUiControl fieldUiControl4"},Aa=["onClick","title"];function Ia(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Da(r,"multiPairFieldTable".concat(n),!0),Da(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(l,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title","template-file","component"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Va,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Na,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ta,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Aa),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e){return Fa(e)||Ra(e)||La(e)||Ma()}function Ma(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function La(e,t){if(e){if("string"===typeof e)return _a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_a(e,t):void 0}}function Ra(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Fa(e){if(Array.isArray(e))return _a(e)}function _a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $a=$n("CorePluginsAdmin","Field"),Ha=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:$a},computed:{fieldCount:function(){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:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(Ba(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=Ba(this.modelValue);r[e]=Object.assign(Object.assign({},r[e]),{},xa({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;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:function(){var 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}}});Ha.render=Ia;var Ua=Ha,qa=(kt({component:Ua,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),Wa=["title"],Ja=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ga={id:"periodMore",class:"dropdown"},za={class:"flex"},Ya={key:0,class:"period-date"},Qa={class:"period-type"},Ka={id:"otherPeriods"},Xa=["onDblclick","title"],Za=["id","checked","onChange","onDblclick"],eo={key:0,class:"compare-checkbox"},to={id:"comparePeriodToDropdown"},no={key:1,class:"compare-date-range"},ro={id:"comparePeriodStartDate"},io=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),ao={id:"comparePeriodEndDate"},oo={class:"apply-button-container"},lo=["disabled","value"],co={key:2,id:"ajaxLoadingCalendar"},so={class:"loadingSegment"}; + */kt({component:Ea,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pa={class:"multiPairField form-group"},Va={key:1,class:"fieldUiControl fieldUiControl2"},Na={key:2,class:"fieldUiControl fieldUiControl3"},Ta={key:3,class:"fieldUiControl fieldUiControl4"},Aa=["onClick","title"];function Ia(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Da(r,"multiPairFieldTable".concat(n),!0),Da(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(l,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title","template-file","component"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Va,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Na,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ta,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Aa),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e){return Ra(e)||Fa(e)||La(e)||Ma()}function Ma(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function La(e,t){if(e){if("string"===typeof e)return _a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_a(e,t):void 0}}function Fa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ra(e){if(Array.isArray(e))return _a(e)}function _a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $a=$n("CorePluginsAdmin","Field"),Ha=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:$a},computed:{fieldCount:function(){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:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(Ba(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=Ba(this.modelValue);r[e]=Object.assign(Object.assign({},r[e]),{},xa({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;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:function(){var 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}}});Ha.render=Ia;var Ua=Ha,qa=(kt({component:Ua,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),Wa=["title"],Ja=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ga={id:"periodMore",class:"dropdown"},za={class:"flex"},Ya={key:0,class:"period-date"},Qa={class:"period-type"},Ka={id:"otherPeriods"},Xa=["onDblclick","title"],Za=["id","checked","onChange","onDblclick"],eo={key:0,class:"compare-checkbox"},to={id:"comparePeriodToDropdown"},no={key:1,class:"compare-date-range"},ro={id:"comparePeriodStartDate"},io=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),ao={id:"comparePeriodEndDate"},oo={class:"apply-button-container"},lo=["disabled","value"],co={key:2,id:"ajaxLoadingCalendar"},so={class:"loadingSegment"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function uo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DateRangePicker"),c=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qa,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ja,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,Wa),Object(a["createElementVNode"])("div",Ga,[Object(a["createElementVNode"])("div",za,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ya,[Object(a["createVNode"])(c,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Qa,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",Ka,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Za),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Xa)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",eo,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",to,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",no,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",ro,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),io,Object(a["createElementVNode"])("div",ao,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",oo,[Object(a["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,lo)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",co,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",so,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var po={class:"loadingPiwik"},mo=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function fo(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",po,[mo,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var ho=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});ho.render=fo;var go=ho;function vo(e,t){return jo(e)||Oo(e,t)||yo(e,t)||bo()}function bo(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yo(e,t){if(e){if("string"===typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oo(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function jo(e){if(Array.isArray(e))return e}var ko=$n("CorePluginsAdmin","Field"),So=S.helper.htmlDecode(" "),Co=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,So)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,So)}],Eo=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Do=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Po(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var Vo=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:fi,PeriodDatePicker:yi,Field:ko,ActivityIndicator:go},directives:{ExpandOnClick:Qt},data:function(){var e=Ee.parsed.value.period;return{comparePeriodDropdownOptions:Co,periodValue:e,dateValue:null,selectedPeriod:e,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Ee.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=jr.isComparingPeriods(),Object(a["watch"])((function(){return jr.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=D(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return jr.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):D(this.dateValue),t=p.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"],compareDates:["".concat(D(t[0]),",").concat(D(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[D(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=V(this.startRangeDate),t=V(this.endRangeDate),n=H.getLastNRange("day",2,e).startDate,r=Math.floor((t.valueOf()-e.valueOf())/864e5),i=H.getLastNRange("day",1+r,n);return"".concat(D(i.startDate),",").concat(D(i.endDate))}var a=H.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=V(e),r=V(t);return!Po(n)||!Po(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return D(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=D(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Ee.hashParsed.value):(this.isLoadingNewPage=!0,n=Ee.parsed.value);var i=Object.assign({},n);delete i.comparePeriods,delete i.compareDates,Ee.updateLocation(Object.assign(Object.assign({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Ee.parsed.value.date,t=Ee.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(t,e)}catch(l){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=vo(r,2),a=i[0],o=i[1];this.dateValue=a,this.startRangeDate=D(a),this.endRangeDate=D(o)}else this.dateValue=V(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=D(n[0]<Eo?Eo:n[0]),this.endRangeDate=D(n[1]>Do?Do:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{V(this.compareStartDate)}catch(e){return!1}try{V(this.compareEndDate)}catch(e){return!1}return!0}}});Vo.render=uo;var No=Vo,To=(kt({component:No,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),Ao=["aria-label"],Io=["onClick"],xo={class:"hidden"},Bo={role:"menu"},Mo=["href","onClick","title"],Lo=["href","onClick"],Ro=["onClick"],Fo=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),_o=[Fo],$o={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Ho={class:"collapsible collapsible-accordion"},Uo={class:"collapsible-header"},qo={class:"collapsible-body"},Wo={key:0},Jo=["onClick","href"],Go={key:1},zo=["onClick","href"]; + */function uo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DateRangePicker"),c=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qa,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ja,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,Wa),Object(a["createElementVNode"])("div",Ga,[Object(a["createElementVNode"])("div",za,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ya,[Object(a["createVNode"])(c,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Qa,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",Ka,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Za),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Xa)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",eo,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",to,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",no,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",ro,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),io,Object(a["createElementVNode"])("div",ao,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",oo,[Object(a["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,lo)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",co,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",so,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var po={class:"loadingPiwik"},mo=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function fo(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",po,[mo,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var ho=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});ho.render=fo;var go=ho;function vo(e,t){return jo(e)||Oo(e,t)||yo(e,t)||bo()}function bo(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yo(e,t){if(e){if("string"===typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oo(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function jo(e){if(Array.isArray(e))return e}var ko=$n("CorePluginsAdmin","Field"),So=S.helper.htmlDecode(" "),Co=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,So)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,So)}],Eo=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Do=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Po(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var Vo=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:fi,PeriodDatePicker:yi,Field:ko,ActivityIndicator:go},directives:{ExpandOnClick:Qt},data:function(){var e=Ee.parsed.value.period;return{comparePeriodDropdownOptions:Co,periodValue:e,dateValue:null,selectedPeriod:e,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Ee.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=jr.isComparingPeriods(),Object(a["watch"])((function(){return jr.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=D(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return jr.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):D(this.dateValue),t=p.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"],compareDates:["".concat(D(t[0]),",").concat(D(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[D(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=V(this.startRangeDate),t=V(this.endRangeDate),n=H.getLastNRange("day",2,e).startDate,r=Math.floor((t.valueOf()-e.valueOf())/864e5),i=H.getLastNRange("day",1+r,n);return"".concat(D(i.startDate),",").concat(D(i.endDate))}var a=H.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=V(e),r=V(t);return!Po(n)||!Po(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return D(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=D(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Ee.hashParsed.value):(this.isLoadingNewPage=!0,n=Ee.parsed.value);var i=Object.assign({},n);delete i.comparePeriods,delete i.compareDates,Ee.updateLocation(Object.assign(Object.assign({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Ee.parsed.value.date,t=Ee.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(t,e)}catch(l){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=vo(r,2),a=i[0],o=i[1];this.dateValue=a,this.startRangeDate=D(a),this.endRangeDate=D(o)}else this.dateValue=V(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=D(n[0]<Eo?Eo:n[0]),this.endRangeDate=D(n[1]>Do?Do:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{V(this.compareStartDate)}catch(e){return!1}try{V(this.compareEndDate)}catch(e){return!1}return!0}}});Vo.render=uo;var No=Vo,To=(kt({component:No,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),Ao=["aria-label"],Io=["onClick"],xo={class:"hidden"},Bo={role:"menu"},Mo=["href","onClick","title"],Lo=["href","onClick"],Fo=["onClick"],Ro=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),_o=[Ro],$o={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Ho={class:"collapsible collapsible-accordion"},Uo={class:"collapsible-header"},qo={class:"collapsible-body"},Wo={key:0},Jo=["onClick","href"],Go={key:1},zo=["onClick","href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Yo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("MenuItemsDropdown"),c=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",To,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",xo,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Io),Object(a["createElementVNode"])("ul",Bo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(a["toDisplayString"])(r.name),11,Mo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,Lo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},_o,10,Ro)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,Ao),Object(a["createElementVNode"])("ul",$o,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ho,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",Uo,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",qo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Wo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Jo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Go,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,zo)]))])})),128))])])])],512),[[c,{activator:e.sideNavActivator}]])])})),128))])])}var Qo={key:0},Ko=["data-notification-instance-id"],Xo={key:1},Zo={class:"notification-body"},el=["innerHTML"],tl={key:1};function nl(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qo,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Xo,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Zo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,el)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",tl,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Ko)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var rl=window,il=rl.$,al=Object(a["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:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&il(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Ze.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});al.render=nl;var ol=al; + */function Yo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("MenuItemsDropdown"),c=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",To,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",xo,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Io),Object(a["createElementVNode"])("ul",Bo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(a["toDisplayString"])(r.name),11,Mo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,Lo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},_o,10,Fo)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,Ao),Object(a["createElementVNode"])("ul",$o,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ho,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",Uo,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",qo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Wo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Jo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Go,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,zo)]))])})),128))])])])],512),[[c,{activator:e.sideNavActivator}]])])})),128))])])}var Qo={key:0},Ko=["data-notification-instance-id"],Xo={key:1},Zo={class:"notification-body"},el=["innerHTML"],tl={key:1};function nl(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qo,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Xo,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Zo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,el)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",tl,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Ko)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var rl=window,il=rl.$,al=Object(a["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:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&il(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Ze.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});al.render=nl;var ol=al; /*! * Matomo - free/libre analytics platform * @@ -416,13 +416,13 @@ window.angular.module("piwikApp").factory("notifications",(function(){return hl} * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Bl(e){var t=e;return t.subcategories?t.subcategories:[]}function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rl(e,t,n){return t&&Ll(e.prototype,t),n&&Ll(e,n),e}function Fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Bl(e){var t=e;return t.subcategories?t.subcategories:[]}function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fl(e,t,n){return t&&Ll(e.prototype,t),n&&Ll(e,n),e}function Rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _l(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var $l=function(){function e(){var t=this;Ml(this,e),Fl(this,"privateState",Object(a["reactive"])({activeSubcategoryId:null,activeSubsubcategoryId:null})),Fl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Fl(this,"activeCategory",Object(a["computed"])((function(){return"undefined"!==typeof t.state.value.activeCategoryId?t.state.value.activeCategoryId:Ee.parsed.value.category}))),Fl(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Ee.parsed.value.subcategory}))),Fl(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Fl(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return Rl(e,[{key:"fetchMenuItems",value:function(){var e=this;return El.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return El.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=void 0,r=void 0,i=void 0;return this.menu.value.forEach((function(a){a.id===e&&(xl(a)||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(Bl(e)||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Ee.parsed.value.category,n=Ee.parsed.value.subcategory,r=El.pages.value,i={};return r.forEach((function(a){var o=Object.assign({},a.category),l=o.id,c=l===t;if(!i[l]){i[l]=!0,o.subcategories=[];var s=null,u=r.filter((function(e){return e.category.id===l}));u.forEach((function(e){var t=Object.assign({},e.subcategory),r=t.id===n&&c;if(e.widgets&&e.widgets[0]&&_l(e.subcategory.id)){s||(s=Object.assign({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=Il(xl(o)),e.push(o)}})),Il(e)}},{key:"toggleCategory",value:function(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)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),Hl=new $l;function Ul(e){return Ul="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul(e)}function ql(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t,n){return t&&Wl(e.prototype,t),n&&Wl(e,n),e}function Gl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function _l(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var $l=function(){function e(){var t=this;Ml(this,e),Rl(this,"privateState",Object(a["reactive"])({activeSubcategoryId:null,activeSubsubcategoryId:null})),Rl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Rl(this,"activeCategory",Object(a["computed"])((function(){return"undefined"!==typeof t.state.value.activeCategoryId?t.state.value.activeCategoryId:Ee.parsed.value.category}))),Rl(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Ee.parsed.value.subcategory}))),Rl(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Rl(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return Fl(e,[{key:"fetchMenuItems",value:function(){var e=this;return El.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return El.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=void 0,r=void 0,i=void 0;return this.menu.value.forEach((function(a){a.id===e&&(xl(a)||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(Bl(e)||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Ee.parsed.value.category,n=Ee.parsed.value.subcategory,r=El.pages.value,i={};return r.forEach((function(a){var o=Object.assign({},a.category),l=o.id,c=l===t;if(!i[l]){i[l]=!0,o.subcategories=[];var s=null,u=r.filter((function(e){return e.category.id===l}));u.forEach((function(e){var t=Object.assign({},e.subcategory),r=t.id===n&&c;if(e.widgets&&e.widgets[0]&&_l(e.subcategory.id)){s||(s=Object.assign({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=Il(xl(o)),e.push(o)}})),Il(e)}},{key:"toggleCategory",value:function(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)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),Hl=new $l;function Ul(e){return Ul="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul(e)}function ql(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t,n){return t&&Wl(e.prototype,t),n&&Wl(e,n),e}function Gl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * @@ -473,13 +473,13 @@ window.angular.module("piwikApp.service").factory("reportMetadataModel",(functio * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Lc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nc,[Object(a["createElementVNode"])("div",Tc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",Ac,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",xc,Object(a["toDisplayString"])(t.name),1)],10,Ic)})),128))])])})),128))]),Object(a["createElementVNode"])("div",Bc,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),Mc])}function Rc(e,t){return Uc(e)||Hc(e,t)||_c(e,t)||Fc()}function Fc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _c(e,t){if(e){if("string"===typeof e)return $c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$c(e,t):void 0}}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hc(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Uc(e){if(Array.isArray(e))return e}var qc=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:hc},data:function(){return{selectedWidget:null}},created:function(){var e=Rc(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Il(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n,r=null===(n=t.subcategory)||void 0===n?void 0:n.name;r&&(e[r]||(e[r]={name:r,order:t.order,widgets:[]}),e[r].widgets.push(t))})),Il(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=Object.assign({},e)}}});qc.render=Lc;var Wc=qc,Jc=(kt({component:Wc,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Gc={key:1},zc={key:2}; + */function Lc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nc,[Object(a["createElementVNode"])("div",Tc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",Ac,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",xc,Object(a["toDisplayString"])(t.name),1)],10,Ic)})),128))])])})),128))]),Object(a["createElementVNode"])("div",Bc,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),Mc])}function Fc(e,t){return Uc(e)||Hc(e,t)||_c(e,t)||Rc()}function Rc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _c(e,t){if(e){if("string"===typeof e)return $c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$c(e,t):void 0}}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hc(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Uc(e){if(Array.isArray(e))return e}var qc=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:hc},data:function(){return{selectedWidget:null}},created:function(){var e=Fc(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Il(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n,r=null===(n=t.subcategory)||void 0===n?void 0:n.name;r&&(e[r]||(e[r]={name:r,order:t.order,widgets:[]}),e[r].widgets.push(t))})),Il(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=Object.assign({},e)}}});qc.render=Lc;var Wc=qc,Jc=(kt({component:Wc,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Gc={key:1},zc={key:2}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Yc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader"),c=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Jc)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function Qc(e,t){var n=void 0;return Object.values(e||{}).some((function(e){return n=e.find((function(e){var n;return e&&e.isContainer&&(null===(n=e.parameters)||void 0===n?void 0:n.containerId)===t})),n})),n}var Kc=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:hc,WidgetContainer:Vc,WidgetByDimensionContainer:Wc},directives:{Tooltips:Rr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Ze.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return Ql.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Object.assign({},t);if(t&&t.isReport&&!t.documentation){var r=cc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Qc(this.allWidgets,this.containerid);if(i){var a=Object.assign({},i);if(this.widgetized){a.isFirstInPage=!0,a.parameters=Object.assign(Object.assign({},a.parameters),{},{widget:"1"});var o=zl(a);o&&(a.widgets=o.map((function(t){return Object.assign(Object.assign({},t),{},{parameters:Object.assign(Object.assign({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return a}}return null}}});Kc.render=Yc;var Xc=Kc,Zc=(kt({component:Xc,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),es={key:1,class:"col s12 l6 leftWidgetColumn"},ts={key:2,class:"col s12 l6 rightWidgetColumn"}; + */function Yc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader"),c=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Jc)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function Qc(e,t){var n=void 0;return Object.values(e||{}).some((function(e){return n=e.find((function(e){var n;return e&&e.isContainer&&(null===(n=e.parameters)||void 0===n?void 0:n.containerId)===t})),n})),n}var Kc=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:hc,WidgetContainer:Vc,WidgetByDimensionContainer:Wc},directives:{Tooltips:Fr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Ze.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return Ql.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Object.assign({},t);if(t&&t.isReport&&!t.documentation){var r=cc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Qc(this.allWidgets,this.containerid);if(i){var a=Object.assign({},i);if(this.widgetized){a.isFirstInPage=!0,a.parameters=Object.assign(Object.assign({},a.parameters),{},{widget:"1"});var o=zl(a);o&&(a.widgets=o.map((function(t){return Object.assign(Object.assign({},t),{},{parameters:Object.assign(Object.assign({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return a}}return null}}});Kc.render=Yc;var Xc=Kc,Zc=(kt({component:Xc,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),es={key:1,class:"col s12 l6 leftWidgetColumn"},ts={key:2,class:"col s12 l6 rightWidgetColumn"}; /*! * Matomo - free/libre analytics platform * @@ -491,13 +491,13 @@ window.angular.module("piwikApp.service").factory("reportMetadataModel",(functio * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ms(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 fs(e){if(e&&e[0]){var t=ls(e),n=e[0];return n.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:fs(n.left||[]),right:fs(n.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}var hs=function(){function e(){var t=this;rs(this,e),os(this,"privateState",Object(a["reactive"])({})),os(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),os(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),os(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=cc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Il(n),1===n.length)return fs(n);for(var o=[],l=0;l<n.length;l+=1){var c=n[l];if(ms(c)||n[l+1]&&ms(n[l+1]))o.push(Object.assign(Object.assign({},c),{},{widgets:Il(zl(c))}));else{var s=0,u=[c],d=[];while(n[l+1]&&!ms(n[l+1]))l+=1,s+=1,s%2===0?u.push(n[l]):d.push(n[l]);o.push({group:!0,left:u,right:d})}}var p=fs(o);return p})))}return as(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([El.getAllPages(),cc.fetchReportMetadata()]).then((function(){return n.privateState.page=El.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=void 0}}]),e}(),gs=new hs;function vs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);hl.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function bs(){hl.remove("onlyRawData")}var ys=Object(a["defineComponent"])({components:{ActivityIndicator:go,Widget:Xc},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;gs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Ee.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(bs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return gs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return gs.resetPage(),void(this.loading=!1);var r=Ee.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return hl.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),gs.resetPage(),void(this.loading=!1)}hl.remove("invalidDate"),S.postEvent("piwikPageChange",{}),hl.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired();var o={category:e,subcategory:t};if(S.postEvent("ReportingPage.loadPage",o),o.promise)return this.loading=!0,void Promise.resolve(o.promise).finally((function(){n.loading=!1}));gs.fetchPage(e,t).then((function(){var t=!gs.page.value;if(t){var r=El.findPageInCategory(e);if(r&&r.subcategory)return void Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Ee.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&vs();var t=Ee.parsed.value,n=t.segment;if(n)bs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],a=t.subcategory,o=t.category;if(-1===r.indexOf(a)&&-1===i.indexOf(o)&&-1===a.toLowerCase().indexOf("manage")){var l=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<l||Ze.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=new Date,t.value>0?(e.hasNoVisits=!1,void bs()):(e.hasNoVisits=!0,e.hasRawData?void vs():Ze.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void bs();e.hasRawData=!0,vs()}))}else bs()}}}});ys.render=ns;var ws=ys,Os=(kt({component:ws,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),js={class:"col l6"},ks={name:"format"},Ss={name:"option_flat"},Cs={name:"option_expanded"},Es={name:"option_format_metrics"},Ds={class:"col l6"},Ps={name:"filter_type"},Vs={class:"filter_limit"},Ns={name:"filter_limit_all"},Ts={key:0,name:"filter_limit"},As={key:1,name:"filter_limit"},Is={class:"col l12"},xs=["value"],Bs=Object(a["createTextVNode"])("\n "),Ms=[Bs],Ls=["innerHTML"],Rs={class:"col l12"},Fs=["href","title"]; + */function ms(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 fs(e){if(e&&e[0]){var t=ls(e),n=e[0];return n.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:fs(n.left||[]),right:fs(n.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}var hs=function(){function e(){var t=this;rs(this,e),os(this,"privateState",Object(a["reactive"])({})),os(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),os(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),os(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=cc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Il(n),1===n.length)return fs(n);for(var o=[],l=0;l<n.length;l+=1){var c=n[l];if(ms(c)||n[l+1]&&ms(n[l+1]))o.push(Object.assign(Object.assign({},c),{},{widgets:Il(zl(c))}));else{var s=0,u=[c],d=[];while(n[l+1]&&!ms(n[l+1]))l+=1,s+=1,s%2===0?u.push(n[l]):d.push(n[l]);o.push({group:!0,left:u,right:d})}}var p=fs(o);return p})))}return as(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([El.getAllPages(),cc.fetchReportMetadata()]).then((function(){return n.privateState.page=El.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=void 0}}]),e}(),gs=new hs;function vs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);hl.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function bs(){hl.remove("onlyRawData")}var ys=Object(a["defineComponent"])({components:{ActivityIndicator:go,Widget:Xc},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;gs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Ee.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(bs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return gs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return gs.resetPage(),void(this.loading=!1);var r=Ee.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return hl.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),gs.resetPage(),void(this.loading=!1)}hl.remove("invalidDate"),S.postEvent("piwikPageChange",{}),hl.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired();var o={category:e,subcategory:t};if(S.postEvent("ReportingPage.loadPage",o),o.promise)return this.loading=!0,void Promise.resolve(o.promise).finally((function(){n.loading=!1}));gs.fetchPage(e,t).then((function(){var t=!gs.page.value;if(t){var r=El.findPageInCategory(e);if(r&&r.subcategory)return void Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Ee.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&vs();var t=Ee.parsed.value,n=t.segment;if(n)bs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],a=t.subcategory,o=t.category;if(-1===r.indexOf(a)&&-1===i.indexOf(o)&&-1===a.toLowerCase().indexOf("manage")){var l=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<l||Ze.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=new Date,t.value>0?(e.hasNoVisits=!1,void bs()):(e.hasNoVisits=!0,e.hasRawData?void vs():Ze.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void bs();e.hasRawData=!0,vs()}))}else bs()}}}});ys.render=ns;var ws=ys,Os=(kt({component:ws,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),js={class:"col l6"},ks={name:"format"},Ss={name:"option_flat"},Cs={name:"option_expanded"},Es={name:"option_format_metrics"},Ds={class:"col l6"},Ps={name:"filter_type"},Vs={class:"filter_limit"},Ns={name:"filter_limit_all"},Ts={key:0,name:"filter_limit"},As={key:1,name:"filter_limit"},Is={class:"col l12"},xs=["value"],Bs=Object(a["createTextVNode"])("\n "),Ms=[Bs],Ls=["innerHTML"],Fs={class:"col l12"},Rs=["href","title"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _s(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Os,[Object(a["createElementVNode"])("div",js,[Object(a["createElementVNode"])("div",ks,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ss,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Cs,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Es,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(a["createElementVNode"])("div",Ds,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ps,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(a["createElementVNode"])("div",Vs,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ns,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[a["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ts,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(a["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",As,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(a["createCommentVNode"])("",!0)])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Is,[Object(a["withDirectives"])(Object(a["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},Ms,8,xs),[[c,{}]]),Object(a["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Ls)],512),[[a["vShow"],e.showUrl]]),Object(a["createElementVNode"])("div",Rs,[Object(a["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(a["toDisplayString"])(e.translate("General_Export")),9,Fs),Object(a["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[a["vShow"],!e.showUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[a["vShow"],e.showUrl]])])])])}function $s(e,t){return Js(e)||Ws(e,t)||Us(e,t)||Hs()}function Hs(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Us(e,t){if(e){if("string"===typeof e)return qs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qs(e,t):void 0}}function qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ws(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Js(e){if(Array.isArray(e))return e}var Gs=$n("CorePluginsAdmin","Field"),zs=Object(a["defineComponent"])({components:{Field:Gs},directives:{SelectOnFocus:vn},props:{hasSubtables:Boolean,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},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var a={},o="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(a=JSON.parse(this.requestParams));var l=i.param,c=l.segment,s=l.label,u=l.idGoal,d=l.idDimension,p=l.idSite,m=i.param,f=m.date,h=m.period;"RSS"===t&&(f="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(f=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:f};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=$s(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach((function(e){var t=$s(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof c&&(v.segment=decodeURIComponent(c)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var w=s.split(",");if(w.length>1)v.label=w;else{var O=$s(w,1);v.label=O[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=o;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(Ee.stringify(v))}}}});zs.render=_s;var Ys=zs,Qs=window,Ks=Qs.$,Xs={mounted:function(e,t){e.addEventListener("click",(function(){var n=Ee.hashParsed.value.popover,r=Ks(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),a=t.value.reportFormats,o=r.param.filter_limit;t.value.maxFilterLimit>0&&(o=Math.min(o,t.value.maxFilterLimit));var l=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,c={initialReportType:"default",initialReportLimit:o>0?o:100,initialReportLimitAll:-1===o?"yes":"no",initialOptionFlat:l,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:l||r.numberOfSubtables>0,availableReportFormats:{default:a,processed:{XML:a.XML,JSON:a.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=dt({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:c}}});s.component("popover",Ys);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),Ks(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; + */function _s(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Os,[Object(a["createElementVNode"])("div",js,[Object(a["createElementVNode"])("div",ks,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ss,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Cs,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Es,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(a["createElementVNode"])("div",Ds,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ps,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(a["createElementVNode"])("div",Vs,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ns,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[a["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ts,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(a["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",As,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(a["createCommentVNode"])("",!0)])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Is,[Object(a["withDirectives"])(Object(a["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},Ms,8,xs),[[c,{}]]),Object(a["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Ls)],512),[[a["vShow"],e.showUrl]]),Object(a["createElementVNode"])("div",Fs,[Object(a["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(a["toDisplayString"])(e.translate("General_Export")),9,Rs),Object(a["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[a["vShow"],!e.showUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[a["vShow"],e.showUrl]])])])])}function $s(e,t){return Js(e)||Ws(e,t)||Us(e,t)||Hs()}function Hs(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Us(e,t){if(e){if("string"===typeof e)return qs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qs(e,t):void 0}}function qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ws(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Js(e){if(Array.isArray(e))return e}var Gs=$n("CorePluginsAdmin","Field"),zs=Object(a["defineComponent"])({components:{Field:Gs},directives:{SelectOnFocus:vn},props:{hasSubtables:Boolean,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},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var a={},o="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(a=JSON.parse(this.requestParams));var l=i.param,c=l.segment,s=l.label,u=l.idGoal,d=l.idDimension,p=l.idSite,m=i.param,f=m.date,h=m.period;"RSS"===t&&(f="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(f=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:f};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=$s(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach((function(e){var t=$s(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof c&&(v.segment=decodeURIComponent(c)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var w=s.split(",");if(w.length>1)v.label=w;else{var O=$s(w,1);v.label=O[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=o;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(Ee.stringify(v))}}}});zs.render=_s;var Ys=zs,Qs=window,Ks=Qs.$,Xs={mounted:function(e,t){e.addEventListener("click",(function(){var n=Ee.hashParsed.value.popover,r=Ks(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),a=t.value.reportFormats,o=r.param.filter_limit;t.value.maxFilterLimit>0&&(o=Math.min(o,t.value.maxFilterLimit));var l=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,c={initialReportType:"default",initialReportLimit:o>0?o:100,initialReportLimitAll:-1===o?"yes":"no",initialOptionFlat:l,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:l||r.numberOfSubtables>0,availableReportFormats:{default:a,processed:{XML:a.XML,JSON:a.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=dt({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:c}}});s.component("popover",Ys);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),Ks(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts index 4d881450ff..6779639031 100644 --- a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts +++ b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts @@ -28,9 +28,15 @@ type ParsedQueryParameters = Record<string, unknown>; * URL store and helper functions. */ class MatomoUrl { - readonly urlQuery = ref(''); + readonly url = ref<URL|null>(null); - readonly hashQuery = ref(''); + 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, @@ -46,16 +52,13 @@ class MatomoUrl { } as ParsedQueryParameters)); constructor() { - this.setUrlQuery(window.location.search); - this.setHashQuery(window.location.hash); + this.url.value = new URL(window.location.href); // $locationChangeSuccess is triggered before angularjs changes actual window the hash, so we // have to hook into this method if we want our event handlers to execute before other angularjs // handlers (like the reporting page one) Matomo.on('$locationChangeSuccess', (absUrl: string) => { - const url = new URL(absUrl); - this.setUrlQuery(url.search.replace(/^\?/, '')); - this.setHashQuery(url.hash.replace(/^#/, '')); + this.url.value = new URL(absUrl); }); this.updatePeriodParamsFromUrl(); @@ -193,14 +196,6 @@ class MatomoUrl { piwik.currentDateString = date; } - - private setUrlQuery(search: string) { - this.urlQuery.value = search.replace(/^\?/, ''); - } - - private setHashQuery(hash: string) { - this.hashQuery.value = hash.replace(/^[#/?]+/, ''); - } } const instance = new MatomoUrl(); diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue index 5d115f8136..ab537111ab 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue @@ -143,19 +143,7 @@ interface SiteSelectorState { export default defineComponent({ props: { - modelValue: { - type: Object, - default: (props: { modelValue?: SiteRef }): SiteRef|undefined => { - if (props.modelValue) { - return props.modelValue; - } - - return (Matomo.idSite ? { - id: Matomo.idSite, - name: Matomo.helper.htmlDecode(Matomo.siteName), - } : undefined); - }, - }, + modelValue: Object, showSelectedSite: { type: Boolean, default: false, @@ -185,6 +173,7 @@ export default defineComponent({ default: 'bottom', }, placeholder: String, + defaultToFirstSite: Boolean, }, emits: ['update:modelValue', 'blur'], components: { @@ -211,12 +200,22 @@ export default defineComponent({ }, created() { this.searchSite = debounce(this.searchSite); + + if (!this.modelValue && Matomo.idSite) { + this.$emit('update:modelValue', { + id: Matomo.idSite, + name: Matomo.helper.htmlDecode(Matomo.siteName), + }); + } }, mounted() { window.initTopControls(); this.loadInitialSites().then(() => { - if ((!this.modelValue || !this.modelValue.id) && !this.hasMultipleSites && this.sites[0]) { + if ((!this.modelValue || !this.modelValue.id) + && (!this.hasMultipleSites || this.defaultToFirstSite) + && this.sites[0] + ) { this.$emit('update:modelValue', { id: this.sites[0].idsite, name: this.sites[0].name }); } }); diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_done.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_done.twig index 23d1d67eec..f2b311fb7a 100644 --- a/plugins/CoreUpdater/templates/runUpdaterAndExit_done.twig +++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_done.twig @@ -24,7 +24,7 @@ <ul> <li>{{ 'CoreUpdater_ErrorDIYHelp_1'|translate }}</li> <li>{{ 'CoreUpdater_ErrorDIYHelp_2'|translate }}</li> - <li>{{ 'CoreUpdater_ErrorDIYHelp_3'|translate }} <a href='https://matomo.org/faq/how-to-update/#faq_179' rel='noreferrer noopener' target='_blank'>(see FAQ)</a></li> + <li>{{ 'CoreUpdater_ErrorDIYHelp_3'|translate }} <a href='https://matomo.org/faq/how-to-update/faq_179' rel='noreferrer noopener' target='_blank'>(see FAQ)</a></li> <li>{{ 'CoreUpdater_ErrorDIYHelp_4'|translate }}</li> <li>{{ 'CoreUpdater_ErrorDIYHelp_5'|translate }}</li> </ul> diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig index 998cfb977e..19a054e527 100644 --- a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig +++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig @@ -51,7 +51,7 @@ {% endif %} <p>{{ 'CoreUpdater_TheUpgradeProcessMayFailExecuteCommand'|translate('') }}</p> <pre>{{ commandUpgradePiwik }}</pre> - <p>{{ 'CoreUpdater_HighTrafficPiwikServerEnableMaintenance'|translate('<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/how-to/#faq_111">', '</a>')|raw }}</p> + <p>{{ 'CoreUpdater_HighTrafficPiwikServerEnableMaintenance'|translate('<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/how-to/faq_111">', '</a>')|raw }}</p> {% if migrations is not empty %} <p>{{ 'CoreUpdater_ListOfSqlQueriesFYI'|translate(piwik_version) }}</p> diff --git a/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php b/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php index dc396a4fb2..aa7d946de7 100644 --- a/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php +++ b/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php @@ -9,6 +9,8 @@ namespace Piwik\Plugins\CoreVisualizations\JqplotDataGenerator; use Piwik\Common; +use Piwik\Container\StaticContainer; +use Piwik\NumberFormatter; use Piwik\ProxyHttp; /** @@ -52,7 +54,14 @@ class Chart $this->axes['xaxis']['onclick'] = & $onClick; } - public function setAxisYValues(&$values, $seriesMetadata = null) + /** + * Set the series values + * + * @param $values + * @param null $seriesMetadata + * @param array|null $seriesUnits If the series units array is passed then the values will be formatted + */ + public function setAxisYValues(&$values, $seriesMetadata = null, ?array $seriesUnits = null) { foreach ($values as $label => &$data) { $seriesInfo = array( @@ -65,9 +74,13 @@ class Chart } $this->series[] = $seriesInfo; + $unit = (isset($seriesUnits[$label]) ? $seriesUnits[$label] : null); - array_walk($data, function (&$v) { + array_walk($data, function (&$v) use ($unit) { $v = (float) Common::forceDotAsSeparatorForDecimalPoint($v); + if ($unit === '%') { + $v = $v * 100; + } }); $this->data[] = & $data; } @@ -90,7 +103,25 @@ class Chart // generate jqplot axes config foreach ($axesIds as $unit => $axisId) { - $this->axes[$axisId]['tickOptions']['formatString'] = '%s' . $unit; + if ($unit === '$' || $unit === '£') { + $this->axes[$axisId]['tickOptions']['formatString'] = $unit . '%s'; + } else { + $this->axes[$axisId]['tickOptions']['formatString'] = '%s' . $unit; + } + } + + $currencies = StaticContainer::get('Piwik\Intl\Data\Provider\CurrencyDataProvider')->getCurrencyList(); + $currencies = array_column($currencies, 0); + + // generate jqplot axes config + foreach ($axesIds as $unit => $axisId) { + if ($unit === '%') { + $this->axes[$axisId]['tickOptions']['formatString'] = str_replace('0', '%s', NumberFormatter::getInstance()->formatPercent(0, 0, 0)); + } else if (in_array($unit, $currencies)) { + $this->axes[$axisId]['tickOptions']['formatString'] = str_replace('0', '%s', NumberFormatter::getInstance()->formatCurrency(0, $unit, 0)); + } else { + $this->axes[$axisId]['tickOptions']['formatString'] = '%s' . $unit; + } } // map each series to appropriate yaxis diff --git a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php index ea71ab47be..dd827551e3 100644 --- a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php +++ b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php @@ -89,7 +89,11 @@ class Evolution extends JqplotDataGenerator $visualization->dataTable = $dataTable; $visualization->properties = $this->properties; - $visualization->setAxisYValues($allSeriesData, $seriesMetadata); + $units = null; + if ($visualization->properties['request_parameters_to_modify']['format_metrics'] === 0) { + $units = $seriesUnits; + } + $visualization->setAxisYValues($allSeriesData, $seriesMetadata, $units); $visualization->setAxisYUnits($seriesUnits); $xLabelStrs = []; diff --git a/plugins/CoreVisualizations/Visualizations/Graph.php b/plugins/CoreVisualizations/Visualizations/Graph.php index 296ea624a8..56ec6ee5ff 100644 --- a/plugins/CoreVisualizations/Visualizations/Graph.php +++ b/plugins/CoreVisualizations/Visualizations/Graph.php @@ -62,7 +62,10 @@ abstract class Graph extends Visualization $this->requestConfig->request_parameters_to_modify['filter_truncate'] = $this->config->max_graph_elements - 1; } - $this->requestConfig->request_parameters_to_modify['format_metrics'] = 1; + // Only default to formatting metrics if the request hasn't already been set to not format metrics + if (!isset($this->requestConfig->request_parameters_to_modify['format_metrics'])) { + $this->requestConfig->request_parameters_to_modify['format_metrics'] = 1; + } // if addTotalRow was called in GenerateGraphHTML, add a row containing totals of // different metrics diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js index 1e9ccac4bd..d93608191b 100644 --- a/plugins/CoreVisualizations/javascripts/jqplot.js +++ b/plugins/CoreVisualizations/javascripts/jqplot.js @@ -123,12 +123,19 @@ function rowEvolutionGetMetricNameFromRow(tr) formatString: '%s', formatter: $.jqplot.NumberFormatter } - } + }, } }; this.jqplotParams = $.extend(true, {}, defaultParams, params); + for (var i = 2; typeof this.jqplotParams.axes['y' + i + 'axis'] != 'undefined'; i++) { + this.jqplotParams.axes['y' + i + 'axis'].tickOptions = $.extend(true, {}, { + formatString: '%s', + formatter: $.jqplot.NumberFormatter + }, this.jqplotParams.axes['y' + i + 'axis'].tickOptions); + } + this._setColors(); }, diff --git a/plugins/CustomDimensions/CustomDimensions.php b/plugins/CustomDimensions/CustomDimensions.php index a55660f383..0ef03a463a 100644 --- a/plugins/CustomDimensions/CustomDimensions.php +++ b/plugins/CustomDimensions/CustomDimensions.php @@ -281,8 +281,10 @@ class CustomDimensions extends Plugin $translationKeys[] = 'CustomDimensions_CustomDimensions'; $translationKeys[] = 'CustomDimensions_CustomDimensionsIntro'; $translationKeys[] = 'CustomDimensions_CustomDimensionsIntroNext'; + $translationKeys[] = 'CustomDimensions_ScopeTitleVisit'; $translationKeys[] = 'CustomDimensions_ScopeDescriptionVisit'; $translationKeys[] = 'CustomDimensions_ScopeDescriptionVisitMoreInfo'; + $translationKeys[] = 'CustomDimensions_ScopeTitleAction'; $translationKeys[] = 'CustomDimensions_ScopeDescriptionAction'; $translationKeys[] = 'CustomDimensions_ScopeDescriptionActionMoreInfo'; $translationKeys[] = 'CustomDimensions_IncreaseAvailableCustomDimensionsTitle'; diff --git a/plugins/CustomDimensions/lang/en.json b/plugins/CustomDimensions/lang/en.json index 5848fdaa0c..59e2bac0f7 100644 --- a/plugins/CustomDimensions/lang/en.json +++ b/plugins/CustomDimensions/lang/en.json @@ -35,8 +35,10 @@ "NoValue": "no value", "PageUrlParam": "Page URL Parameter", "PluginDescription": "Extend Matomo to your needs by defining and tracking Custom Dimensions in scope Action or Visit", + "ScopeTitleAction": "Action Dimensions", "ScopeDescriptionAction": "Custom Dimensions in scope 'Action' can be sent along any action (page view, download, event, etc.).", "ScopeDescriptionActionMoreInfo": "Extractions may be defined so that the custom dimension value is extracted from the Page URL, Page Title or a Page URL query parameter.", + "ScopeTitleVisit": "Visit Dimensions", "ScopeDescriptionVisit": "Custom Dimensions in scope 'Visit' can be sent along any tracking request and are stored in the visit.", "ScopeDescriptionVisitMoreInfo": "If you set different values for a given dimension during the lifetime of a visit, the last value set will be used.", "XofYLeft": "%1$s of %2$s dimensions left", diff --git a/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml b/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml index 44f8960191..eb9c422dbb 100644 --- a/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml @@ -37,6 +37,9 @@ <goalPageId>4</goalPageId> <url>http://example.com/sub_en/page?param=en_US</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -180,6 +183,9 @@ <goalPageId>6</goalPageId> <url>http://example.com/sub_en/page?param=en_US</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -323,6 +329,9 @@ <goalPageId>5</goalPageId> <url>http://example.com/sub_en/page?param=en_US</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -487,6 +496,9 @@ <goalPageId>2</goalPageId> <url>http://example.com/sub_en/page?test=343&param=23</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -651,6 +663,9 @@ <goalPageId>9</goalPageId> <url>http://example.com/sub_en/page</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> diff --git a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js index 6bd92046c9..c7ce3bba7a 100644 --- a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js +++ b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js @@ -698,61 +698,61 @@ Editvue_type_script_lang_ts.render = render }, directiveName: 'piwikCustomDimensionsEdit' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CustomDimensions/vue/src/List/List.vue?vue&type=template&id=0432737c +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CustomDimensions/vue/src/List/List.vue?vue&type=template&id=0c3a05ca -var Listvue_type_template_id_0432737c_hoisted_1 = ["innerHTML"]; -var Listvue_type_template_id_0432737c_hoisted_2 = { +var Listvue_type_template_id_0c3a05ca_hoisted_1 = ["innerHTML"]; +var Listvue_type_template_id_0c3a05ca_hoisted_2 = { class: "loadingPiwik" }; -var Listvue_type_template_id_0432737c_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var Listvue_type_template_id_0c3a05ca_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var Listvue_type_template_id_0432737c_hoisted_4 = { +var Listvue_type_template_id_0c3a05ca_hoisted_4 = { class: "index" }; -var Listvue_type_template_id_0432737c_hoisted_5 = { +var Listvue_type_template_id_0c3a05ca_hoisted_5 = { class: "name" }; -var Listvue_type_template_id_0432737c_hoisted_6 = { +var Listvue_type_template_id_0c3a05ca_hoisted_6 = { class: "active" }; -var Listvue_type_template_id_0432737c_hoisted_7 = { +var Listvue_type_template_id_0c3a05ca_hoisted_7 = { class: "action" }; -var Listvue_type_template_id_0432737c_hoisted_8 = { +var Listvue_type_template_id_0c3a05ca_hoisted_8 = { colspan: "5" }; -var Listvue_type_template_id_0432737c_hoisted_9 = { +var Listvue_type_template_id_0c3a05ca_hoisted_9 = { class: "index" }; -var Listvue_type_template_id_0432737c_hoisted_10 = { +var Listvue_type_template_id_0c3a05ca_hoisted_10 = { class: "name" }; -var Listvue_type_template_id_0432737c_hoisted_11 = { +var Listvue_type_template_id_0c3a05ca_hoisted_11 = { class: "extractions" }; -var Listvue_type_template_id_0432737c_hoisted_12 = { +var Listvue_type_template_id_0c3a05ca_hoisted_12 = { class: "active" }; -var Listvue_type_template_id_0432737c_hoisted_13 = { +var Listvue_type_template_id_0c3a05ca_hoisted_13 = { class: "action" }; -var Listvue_type_template_id_0432737c_hoisted_14 = ["href"]; -var Listvue_type_template_id_0432737c_hoisted_15 = { +var Listvue_type_template_id_0c3a05ca_hoisted_14 = ["href"]; +var Listvue_type_template_id_0c3a05ca_hoisted_15 = { class: "tableActionBar" }; -var Listvue_type_template_id_0432737c_hoisted_16 = ["disabled", "onClick"]; +var Listvue_type_template_id_0c3a05ca_hoisted_16 = ["disabled", "onClick"]; -var Listvue_type_template_id_0432737c_hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var Listvue_type_template_id_0c3a05ca_hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, null, -1); -var Listvue_type_template_id_0432737c_hoisted_18 = { +var Listvue_type_template_id_0c3a05ca_hoisted_18 = { class: "info" }; -function Listvue_type_template_id_0432737c_render(_ctx, _cache, $props, $setup, $data, $options) { +function Listvue_type_template_id_0c3a05ca_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); @@ -768,46 +768,46 @@ function Listvue_type_template_id_0432737c_render(_ctx, _cache, $props, $setup, _: 1 })]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.contentIntroText) - }, null, 8, Listvue_type_template_id_0432737c_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_0432737c_hoisted_2, [Listvue_type_template_id_0432737c_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading]])], 512), [[_directive_content_intro]]), (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.availableScopes, function (scope) { + }, null, 8, Listvue_type_template_id_0c3a05ca_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_0c3a05ca_hoisted_2, [Listvue_type_template_id_0c3a05ca_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading]])], 512), [[_directive_content_intro]]), (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.availableScopes, function (scope) { 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", { key: scope.value }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { - "content-title": "".concat(scope.name, " Dimensions") + "content-title": _ctx.translate("CustomDimensions_ScopeTitle".concat(_ctx.ucfirst(scope.value))) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("CustomDimensions_ScopeDescription".concat(_ctx.ucfirst(scope.value)))) + " " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("CustomDimensions_ScopeDescription".concat(_ctx.ucfirst(scope.value), "MoreInfo"))), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0432737c_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0432737c_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("CustomDimensions_ScopeDescription".concat(_ctx.ucfirst(scope.value)))) + " " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("CustomDimensions_ScopeDescription".concat(_ctx.ucfirst(scope.value), "MoreInfo"))), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0c3a05ca_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0c3a05ca_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "extractions" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_Extractions')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.supportsExtractions]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0432737c_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Active')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0432737c_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Action')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_NoCustomDimensionConfigured')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.numSlotsUsed === 0 && !_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.sortedCustomDimensionsByScope[scope.value], function (customDimension) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_Extractions')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.supportsExtractions]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0c3a05ca_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CorePluginsAdmin_Active')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", Listvue_type_template_id_0c3a05ca_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Action')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_NoCustomDimensionConfigured')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.numSlotsUsed === 0 && !_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.sortedCustomDimensionsByScope[scope.value], function (customDimension) { var _customDimension$extr; return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["customdimension", customDimension.idcustomdimension]), key: customDimension.idcustomdimension - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(customDimension.idcustomdimension), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(customDimension.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(customDimension.idcustomdimension), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(customDimension.name), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ 'icon-ok': (_customDimension$extr = customDimension.extractions[0]) === null || _customDimension$extr === void 0 ? void 0 : _customDimension$extr.pattern }) - }, null, 2)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.supportsExtractions]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 2)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], scope.supportsExtractions]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ 'icon-ok': customDimension.active }) - }, null, 2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0432737c_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", Listvue_type_template_id_0c3a05ca_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", href: "#?idDimension=".concat(customDimension.idcustomdimension, "&scope=").concat(scope.value) - }, null, 8, Listvue_type_template_id_0432737c_hoisted_14)])], 2); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_0432737c_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { + }, null, 8, Listvue_type_template_id_0c3a05ca_hoisted_14)])], 2); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Listvue_type_template_id_0c3a05ca_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { class: "btn", disabled: !scope.numSlotsLeft, onClick: function onClick($event) { return _ctx.addDimension(scope.value); } - }, [Listvue_type_template_id_0432737c_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_ConfigureNewDimension')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_0432737c_hoisted_18, "(" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_XofYLeft', scope.numSlotsLeft, scope.numSlotsAvailable)) + ")", 1)], 8, Listvue_type_template_id_0432737c_hoisted_16), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading]])])]; + }, [Listvue_type_template_id_0c3a05ca_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_ConfigureNewDimension')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Listvue_type_template_id_0c3a05ca_hoisted_18, "(" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomDimensions_XofYLeft', scope.numSlotsLeft, scope.numSlotsAvailable)) + ")", 1)], 8, Listvue_type_template_id_0c3a05ca_hoisted_16), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading]])])]; }), _: 2 }, 1032, ["content-title"])], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading]]); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CustomDimensions/vue/src/List/List.vue?vue&type=template&id=0432737c +// CONCATENATED MODULE: ./plugins/CustomDimensions/vue/src/List/List.vue?vue&type=template&id=0c3a05ca // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CustomDimensions/vue/src/List/List.vue?vue&type=script&lang=ts function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } @@ -892,7 +892,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len -Listvue_type_script_lang_ts.render = Listvue_type_template_id_0432737c_render +Listvue_type_script_lang_ts.render = Listvue_type_template_id_0c3a05ca_render /* harmony default export */ var List = (Listvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CustomDimensions/vue/src/List/List.adapter.ts diff --git a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js index 153d745042..b535735b02 100644 --- a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js +++ b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CustomDimensions"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CustomDimensions"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CustomDimensions/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CustomDimensionsStore",(function(){return B})),n.d(t,"Edit",(function(){return P})),n.d(t,"List",(function(){return pe})),n.d(t,"Manage",(function(){return Se})),"undefined"!==typeof window){var i=window.document.currentScript,o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var s=n("19dc"),a=n("8bbf"),c={class:"editCustomDimension"},r={class:"loadingPiwik"},l=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),u={class:"row form-group"},m={class:"col s12"},d={class:"col s12 m6"},p={class:"row"},b={class:"col s12 m6"},f={class:"col s12 m6"},v={class:"col s12"},O=["onClick"],j={class:"row"},h={class:"col s12"},D={class:"col s12 m6 form-help"},C=["value","disabled"],g=["value","disabled"],V={class:"btn cancel",type:"button",href:"#list"},E={class:"alert alert-info howToTrackInfo"},S=["innerHTML"],N=["innerHTML"],y=["innerHTML"],x=["innerHTML"];function w(e,t,n,i,o,s){var w=Object(a["resolveComponent"])("Field"),k=Object(a["resolveComponent"])("ContentBlock"),_=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",c,[Object(a["createVNode"])(k,{"content-title":e.contentTitleText},{default:Object(a["withCtx"])((function(){var n;return[Object(a["withDirectives"])(Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",r,[l,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[a["vShow"],e.isLoading||e.isUpdating]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("form",{onSubmit:t[4]||(t[4]=Object(a["withModifiers"])((function(t){return e.edit?e.updateCustomDimension():e.createCustomDimension()}),["prevent"]))},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"text",name:"name",modelValue:e.dimension.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.dimension.name=t}),maxlength:255,required:!0,title:e.translate("General_Name"),"inline-help":e.translate("CustomDimensions_NameAllowedCharacters")},null,8,["modelValue","title","inline-help"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"checkbox",name:"active",modelValue:e.dimension.active,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.dimension.active=t}),title:e.translate("CorePluginsAdmin_Active"),"inline-help":e.translate("CustomDimensions_CannotBeDeleted")},null,8,["modelValue","title","inline-help"])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",u,[Object(a["createElementVNode"])("h3",m,Object(a["toDisplayString"])(e.translate("CustomDimensions_ExtractValue")),1),Object(a["createElementVNode"])("div",d,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.dimension.extractions,(function(n,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("".concat(i,"extraction ")),key:i},[Object(a["createElementVNode"])("div",p,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"select",name:"".concat(i,"dimension"),modelValue:n.dimension,"onUpdate:modelValue":function(e){return n.dimension=e},"full-width":!0,options:e.extractionDimensionsOptions},null,8,["name","modelValue","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"text",name:"".concat(i,"pattern"),modelValue:n.pattern,"onUpdate:modelValue":function(e){return n.pattern=e},"full-width":!0,title:"urlparam"===n.dimension?e.translate("CustomDimensions_UrlQueryStringParameter"):"eg. /blog/(.*)/"},null,8,["name","modelValue","onUpdate:modelValue","title"])])]),Object(a["createElementVNode"])("div",v,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-plus",onClick:t[2]||(t[2]=function(t){return e.addExtraction()})},null,512),[[a["vShow"],n.pattern]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-minus",onClick:function(t){return e.removeExtraction(i)}},null,8,O),[[a["vShow"],e.dimension.extractions.length>1]])])])],2)})),128)),Object(a["createElementVNode"])("div",j,[Object(a["createElementVNode"])("div",h,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(w,{uicontrol:"checkbox",name:"casesensitive",modelValue:e.dimension.case_sensitive,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.dimension.case_sensitive=t}),title:e.translate("Goals_CaseSensitive")},null,8,["modelValue","title"]),[[a["vShow"],null===(n=e.dimension.extractions[0])||void 0===n?void 0:n.pattern]])])])])]),Object(a["createElementVNode"])("div",D,Object(a["toDisplayString"])(e.translate("CustomDimensions_ExtractionsHelp")),1)],512),[[a["vShow"],e.doesScopeSupportExtraction]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn update",type:"submit",value:e.translate("General_Update"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,C),[[a["vShow"],e.edit]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn create",type:"submit",value:e.translate("General_Create"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,g),[[a["vShow"],e.create]]),Object(a["createElementVNode"])("a",V,Object(a["toDisplayString"])(e.translate("General_Cancel")),1)],32),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",E,[Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyTitle")),1),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaJs")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaJs(e.dimension))},null,8,S)],512),[[_,{}]]),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howToTrackManuallyText)},null,8,N),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaPhp")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaPhp(e.dimension))},null,8,y)],512),[[_,{}]]),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaHttp")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCode)},null,8,x)],512),[[_,{}]])],512),[[a["vShow"],e.edit]])],512),[[a["vShow"],!e.isLoading]])]})),_:1},8,["content-title"])])}var k=n("a5a2");function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function M(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CustomDimensions"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CustomDimensions"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CustomDimensions/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CustomDimensionsStore",(function(){return B})),n.d(t,"Edit",(function(){return P})),n.d(t,"List",(function(){return pe})),n.d(t,"Manage",(function(){return Ee})),"undefined"!==typeof window){var i=window.document.currentScript,o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var s=n("19dc"),a=n("8bbf"),c={class:"editCustomDimension"},r={class:"loadingPiwik"},l=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),u={class:"row form-group"},m={class:"col s12"},d={class:"col s12 m6"},p={class:"row"},b={class:"col s12 m6"},f={class:"col s12 m6"},v={class:"col s12"},O=["onClick"],j={class:"row"},h={class:"col s12"},D={class:"col s12 m6 form-help"},C=["value","disabled"],g=["value","disabled"],V={class:"btn cancel",type:"button",href:"#list"},S={class:"alert alert-info howToTrackInfo"},E=["innerHTML"],N=["innerHTML"],y=["innerHTML"],x=["innerHTML"];function w(e,t,n,i,o,s){var w=Object(a["resolveComponent"])("Field"),k=Object(a["resolveComponent"])("ContentBlock"),_=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",c,[Object(a["createVNode"])(k,{"content-title":e.contentTitleText},{default:Object(a["withCtx"])((function(){var n;return[Object(a["withDirectives"])(Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",r,[l,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[a["vShow"],e.isLoading||e.isUpdating]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("form",{onSubmit:t[4]||(t[4]=Object(a["withModifiers"])((function(t){return e.edit?e.updateCustomDimension():e.createCustomDimension()}),["prevent"]))},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"text",name:"name",modelValue:e.dimension.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.dimension.name=t}),maxlength:255,required:!0,title:e.translate("General_Name"),"inline-help":e.translate("CustomDimensions_NameAllowedCharacters")},null,8,["modelValue","title","inline-help"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"checkbox",name:"active",modelValue:e.dimension.active,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.dimension.active=t}),title:e.translate("CorePluginsAdmin_Active"),"inline-help":e.translate("CustomDimensions_CannotBeDeleted")},null,8,["modelValue","title","inline-help"])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",u,[Object(a["createElementVNode"])("h3",m,Object(a["toDisplayString"])(e.translate("CustomDimensions_ExtractValue")),1),Object(a["createElementVNode"])("div",d,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.dimension.extractions,(function(n,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("".concat(i,"extraction ")),key:i},[Object(a["createElementVNode"])("div",p,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"select",name:"".concat(i,"dimension"),modelValue:n.dimension,"onUpdate:modelValue":function(e){return n.dimension=e},"full-width":!0,options:e.extractionDimensionsOptions},null,8,["name","modelValue","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(w,{uicontrol:"text",name:"".concat(i,"pattern"),modelValue:n.pattern,"onUpdate:modelValue":function(e){return n.pattern=e},"full-width":!0,title:"urlparam"===n.dimension?e.translate("CustomDimensions_UrlQueryStringParameter"):"eg. /blog/(.*)/"},null,8,["name","modelValue","onUpdate:modelValue","title"])])]),Object(a["createElementVNode"])("div",v,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-plus",onClick:t[2]||(t[2]=function(t){return e.addExtraction()})},null,512),[[a["vShow"],n.pattern]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-minus",onClick:function(t){return e.removeExtraction(i)}},null,8,O),[[a["vShow"],e.dimension.extractions.length>1]])])])],2)})),128)),Object(a["createElementVNode"])("div",j,[Object(a["createElementVNode"])("div",h,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(w,{uicontrol:"checkbox",name:"casesensitive",modelValue:e.dimension.case_sensitive,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.dimension.case_sensitive=t}),title:e.translate("Goals_CaseSensitive")},null,8,["modelValue","title"]),[[a["vShow"],null===(n=e.dimension.extractions[0])||void 0===n?void 0:n.pattern]])])])])]),Object(a["createElementVNode"])("div",D,Object(a["toDisplayString"])(e.translate("CustomDimensions_ExtractionsHelp")),1)],512),[[a["vShow"],e.doesScopeSupportExtraction]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn update",type:"submit",value:e.translate("General_Update"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,C),[[a["vShow"],e.edit]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn create",type:"submit",value:e.translate("General_Create"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,g),[[a["vShow"],e.create]]),Object(a["createElementVNode"])("a",V,Object(a["toDisplayString"])(e.translate("General_Cancel")),1)],32),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",S,[Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyTitle")),1),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaJs")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaJs(e.dimension))},null,8,E)],512),[[_,{}]]),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howToTrackManuallyText)},null,8,N),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaPhp")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaPhp(e.dimension))},null,8,y)],512),[[_,{}]]),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaHttp")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCode)},null,8,x)],512),[[_,{}]])],512),[[a["vShow"],e.edit]])],512),[[a["vShow"],!e.isLoading]])]})),_:1},8,["content-title"])])}var k=n("a5a2");function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function M(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * @@ -17,17 +17,17 @@ function L(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}var H="cust * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function se(e,t,n,i,o,s){var c=Object(a["resolveComponent"])("EnrichedHeadline"),r=Object(a["resolveComponent"])("ContentBlock"),l=Object(a["resolveDirective"])("content-intro"),u=Object(a["resolveDirective"])("content-table");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h2",null,[Object(a["createVNode"])(c,null,{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_CustomDimensions")),1)]})),_:1})]),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.contentIntroText)},null,8,q),Object(a["withDirectives"])(Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",z,[F,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[a["vShow"],e.isLoading]])],512),[[l]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.availableScopes,(function(t){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t.value},[Object(a["createVNode"])(r,{"content-title":"".concat(t.name," Dimensions")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value))))+" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value),"MoreInfo"))),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("table",null,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",G,Object(a["toDisplayString"])(e.translate("General_Id")),1),Object(a["createElementVNode"])("th",J,Object(a["toDisplayString"])(e.translate("General_Name")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("th",{class:"extractions"},Object(a["toDisplayString"])(e.translate("CustomDimensions_Extractions")),513),[[a["vShow"],t.supportsExtractions]]),Object(a["createElementVNode"])("th",$,Object(a["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1),Object(a["createElementVNode"])("th",Q,Object(a["toDisplayString"])(e.translate("General_Action")),1)])]),Object(a["createElementVNode"])("tbody",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",X,Object(a["toDisplayString"])(e.translate("CustomDimensions_NoCustomDimensionConfigured")),1)],512),[[a["vShow"],0===t.numSlotsUsed&&!e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sortedCustomDimensionsByScope[t.value],(function(e){var n;return Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",{class:Object(a["normalizeClass"])(["customdimension",e.idcustomdimension]),key:e.idcustomdimension},[Object(a["createElementVNode"])("td",Y,Object(a["toDisplayString"])(e.idcustomdimension),1),Object(a["createElementVNode"])("td",K,Object(a["toDisplayString"])(e.name),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("td",R,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])({"icon-ok":null===(n=e.extractions[0])||void 0===n?void 0:n.pattern})},null,2)],512),[[a["vShow"],t.supportsExtractions]]),Object(a["createElementVNode"])("td",W,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])({"icon-ok":e.active})},null,2)]),Object(a["createElementVNode"])("td",Z,[Object(a["createElementVNode"])("a",{class:"table-action icon-edit",href:"#?idDimension=".concat(e.idcustomdimension,"&scope=").concat(t.value)},null,8,ee)])],2)})),128))])],512),[[u]]),Object(a["createElementVNode"])("div",te,[Object(a["withDirectives"])(Object(a["createElementVNode"])("button",{class:"btn",disabled:!t.numSlotsLeft,onClick:function(n){return e.addDimension(t.value)}},[ie,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ConfigureNewDimension"))+" ",1),Object(a["createElementVNode"])("span",oe,"("+Object(a["toDisplayString"])(e.translate("CustomDimensions_XofYLeft",t.numSlotsLeft,t.numSlotsAvailable))+")",1)],8,ne),[[a["vShow"],!e.isLoading]])])]})),_:2},1032,["content-title"])],512)),[[a["vShow"],!e.isLoading]])})),128))])}function ae(e){return ue(e)||le(e)||re(e)||ce()}function ce(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function re(e,t){if(e){if("string"===typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function le(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ue(e){if(Array.isArray(e))return me(e)}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var de=Object(a["defineComponent"])({name:"listcustomdimensions",components:{EnrichedHeadline:s["EnrichedHeadline"],ContentBlock:s["ContentBlock"]},directives:{ContentIntro:s["ContentIntro"],ContentTable:s["ContentTable"]},created:function(){B.fetch()},methods:{ucfirst:function(e){return L(e)},addDimension:function(e){s["MatomoUrl"].updateHashToUrl("/?idDimension=0&scope=".concat(e))}},computed:{isLoading:function(){return B.isLoading.value},availableScopes:function(){return B.availableScopes.value},contentIntroText:function(){var e=Object(s["translate"])("CustomDimensions_CustomDimensionsIntroNext",'<a target=_blank href="https://piwik.org/docs/custom-variables">',"</a>",'<a target=_blank href="https://piwik.org/faq/general/faq_21117">',"</a>"),t=Object(s["translate"])("CustomDimensions_CustomDimensionsIntro",'<a target=_blank href="https://piwik.org/docs/custom-dimensions">',"</a>",this.siteName);return"".concat(e).concat(t)},customDimensions:function(){return B.customDimensions.value},sortedCustomDimensions:function(){var e=ae(this.customDimensions);return e.sort((function(e,t){var n=parseInt("".concat(e.idcustomdimension),10),i=parseInt("".concat(t.idcustomdimension),10);return n-i})),e},sortedCustomDimensionsByScope:function(){var e={};return this.sortedCustomDimensions.reduce((function(e,t){return e[t.scope]=e[t.scope]||[],e[t.scope].push(t),e}),e),e},siteName:function(){return s["Matomo"].helper.htmlDecode(s["Matomo"].siteName)}}});de.render=se;var pe=de,be=(Object(s["createAngularJsAdapter"])({component:pe,directiveName:"piwikCustomDimensionsList"}),{class:"manageCustomDimensions"}),fe={key:0},ve=Object(a["createElementVNode"])("br",null,null,-1),Oe=Object(a["createElementVNode"])("br",null,null,-1),je=Object(a["createElementVNode"])("br",null,null,-1),he=Object(a["createElementVNode"])("br",null,null,-1),De=["textContent"],Ce=["textContent"],ge={key:1}; + */function se(e,t,n,i,o,s){var c=Object(a["resolveComponent"])("EnrichedHeadline"),r=Object(a["resolveComponent"])("ContentBlock"),l=Object(a["resolveDirective"])("content-intro"),u=Object(a["resolveDirective"])("content-table");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h2",null,[Object(a["createVNode"])(c,null,{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_CustomDimensions")),1)]})),_:1})]),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.contentIntroText)},null,8,q),Object(a["withDirectives"])(Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",z,[F,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[a["vShow"],e.isLoading]])],512),[[l]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.availableScopes,(function(t){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t.value},[Object(a["createVNode"])(r,{"content-title":e.translate("CustomDimensions_ScopeTitle".concat(e.ucfirst(t.value)))},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value))))+" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value),"MoreInfo"))),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("table",null,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",G,Object(a["toDisplayString"])(e.translate("General_Id")),1),Object(a["createElementVNode"])("th",J,Object(a["toDisplayString"])(e.translate("General_Name")),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("th",{class:"extractions"},Object(a["toDisplayString"])(e.translate("CustomDimensions_Extractions")),513),[[a["vShow"],t.supportsExtractions]]),Object(a["createElementVNode"])("th",$,Object(a["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1),Object(a["createElementVNode"])("th",Q,Object(a["toDisplayString"])(e.translate("General_Action")),1)])]),Object(a["createElementVNode"])("tbody",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",X,Object(a["toDisplayString"])(e.translate("CustomDimensions_NoCustomDimensionConfigured")),1)],512),[[a["vShow"],0===t.numSlotsUsed&&!e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sortedCustomDimensionsByScope[t.value],(function(e){var n;return Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",{class:Object(a["normalizeClass"])(["customdimension",e.idcustomdimension]),key:e.idcustomdimension},[Object(a["createElementVNode"])("td",Y,Object(a["toDisplayString"])(e.idcustomdimension),1),Object(a["createElementVNode"])("td",K,Object(a["toDisplayString"])(e.name),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("td",R,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])({"icon-ok":null===(n=e.extractions[0])||void 0===n?void 0:n.pattern})},null,2)],512),[[a["vShow"],t.supportsExtractions]]),Object(a["createElementVNode"])("td",W,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])({"icon-ok":e.active})},null,2)]),Object(a["createElementVNode"])("td",Z,[Object(a["createElementVNode"])("a",{class:"table-action icon-edit",href:"#?idDimension=".concat(e.idcustomdimension,"&scope=").concat(t.value)},null,8,ee)])],2)})),128))])],512),[[u]]),Object(a["createElementVNode"])("div",te,[Object(a["withDirectives"])(Object(a["createElementVNode"])("button",{class:"btn",disabled:!t.numSlotsLeft,onClick:function(n){return e.addDimension(t.value)}},[ie,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ConfigureNewDimension"))+" ",1),Object(a["createElementVNode"])("span",oe,"("+Object(a["toDisplayString"])(e.translate("CustomDimensions_XofYLeft",t.numSlotsLeft,t.numSlotsAvailable))+")",1)],8,ne),[[a["vShow"],!e.isLoading]])])]})),_:2},1032,["content-title"])],512)),[[a["vShow"],!e.isLoading]])})),128))])}function ae(e){return ue(e)||le(e)||re(e)||ce()}function ce(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function re(e,t){if(e){if("string"===typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function le(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ue(e){if(Array.isArray(e))return me(e)}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var de=Object(a["defineComponent"])({name:"listcustomdimensions",components:{EnrichedHeadline:s["EnrichedHeadline"],ContentBlock:s["ContentBlock"]},directives:{ContentIntro:s["ContentIntro"],ContentTable:s["ContentTable"]},created:function(){B.fetch()},methods:{ucfirst:function(e){return L(e)},addDimension:function(e){s["MatomoUrl"].updateHashToUrl("/?idDimension=0&scope=".concat(e))}},computed:{isLoading:function(){return B.isLoading.value},availableScopes:function(){return B.availableScopes.value},contentIntroText:function(){var e=Object(s["translate"])("CustomDimensions_CustomDimensionsIntroNext",'<a target=_blank href="https://piwik.org/docs/custom-variables">',"</a>",'<a target=_blank href="https://piwik.org/faq/general/faq_21117">',"</a>"),t=Object(s["translate"])("CustomDimensions_CustomDimensionsIntro",'<a target=_blank href="https://piwik.org/docs/custom-dimensions">',"</a>",this.siteName);return"".concat(e).concat(t)},customDimensions:function(){return B.customDimensions.value},sortedCustomDimensions:function(){var e=ae(this.customDimensions);return e.sort((function(e,t){var n=parseInt("".concat(e.idcustomdimension),10),i=parseInt("".concat(t.idcustomdimension),10);return n-i})),e},sortedCustomDimensionsByScope:function(){var e={};return this.sortedCustomDimensions.reduce((function(e,t){return e[t.scope]=e[t.scope]||[],e[t.scope].push(t),e}),e),e},siteName:function(){return s["Matomo"].helper.htmlDecode(s["Matomo"].siteName)}}});de.render=se;var pe=de,be=(Object(s["createAngularJsAdapter"])({component:pe,directiveName:"piwikCustomDimensionsList"}),{class:"manageCustomDimensions"}),fe={key:0},ve=Object(a["createElementVNode"])("br",null,null,-1),Oe=Object(a["createElementVNode"])("br",null,null,-1),je=Object(a["createElementVNode"])("br",null,null,-1),he=Object(a["createElementVNode"])("br",null,null,-1),De=["textContent"],Ce=["textContent"],ge={key:1}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ve(e,t,n,i,o,s){var c=Object(a["resolveComponent"])("CustomDimensionsList"),r=Object(a["resolveComponent"])("ContentBlock"),l=Object(a["resolveComponent"])("CustomDimensionsEdit"),u=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",be,[e.editMode?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fe,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c)]),Object(a["createVNode"])(r,{id:"customDimensionsCreateMoreDimensions","content-title":e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTitle")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTakesLong"))+" ",1),ve,Oe,Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToCreateCustomDimension"))+" ",1),je,he]),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{textContent:Object(a["toDisplayString"])(e.addCustomDimCode)},null,8,De)],512),[[u,{}]]),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToManyCreateCustomDimensions"))+" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ExampleCreateCustomDimensions",5)),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{textContent:Object(a["toDisplayString"])(e.addMultipleCustomDimCode)},null,8,Ce)],512),[[u,{}]])]})),_:1},8,["content-title"])])),e.editMode?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ge,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{"dimension-id":e.dimensionId,"dimension-scope":e.dimensionScope},null,8,["dimension-id","dimension-scope"])])])):Object(a["createCommentVNode"])("",!0)])}var Ee=Object(a["defineComponent"])({components:{CustomDimensionsList:pe,ContentBlock:s["ContentBlock"],CustomDimensionsEdit:P},directives:{SelectOnFocus:s["SelectOnFocus"]},data:function(){return{editMode:!1,dimensionId:null,dimensionScope:""}},created:function(){var e=this;Object(a["watch"])((function(){return s["MatomoUrl"].hashParsed.value}),(function(){e.initState()})),this.initState()},methods:{getValidDimensionScope:function(e){return-1!==["action","visit"].indexOf(e)?e:""},initState:function(){var e=s["MatomoUrl"].hashParsed.value.idDimension;if(e){var t=this.getValidDimensionScope(s["MatomoUrl"].hashParsed.value.scope);if("0"===e){var n={isAllowed:!0,scope:t};if(s["Matomo"].postEvent("CustomDimensions.initAddDimension",n),n&&!n.isAllowed)return this.editMode=!1,this.dimensionId=null,void(this.dimensionScope="")}this.editMode=!0,this.dimensionId=parseInt(e,10),this.dimensionScope=t}else this.editMode=!1,this.dimensionId=null,this.dimensionScope="";s["Matomo"].helper.lazyScrollToContent()}},computed:{addCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action\n./console customdimensions:add-custom-dimension --scope=visit"},addMultipleCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action --count=5"}}});Ee.render=Ve;var Se=Ee; + */function Ve(e,t,n,i,o,s){var c=Object(a["resolveComponent"])("CustomDimensionsList"),r=Object(a["resolveComponent"])("ContentBlock"),l=Object(a["resolveComponent"])("CustomDimensionsEdit"),u=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",be,[e.editMode?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fe,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c)]),Object(a["createVNode"])(r,{id:"customDimensionsCreateMoreDimensions","content-title":e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTitle")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTakesLong"))+" ",1),ve,Oe,Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToCreateCustomDimension"))+" ",1),je,he]),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{textContent:Object(a["toDisplayString"])(e.addCustomDimCode)},null,8,De)],512),[[u,{}]]),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CustomDimensions_HowToManyCreateCustomDimensions"))+" "+Object(a["toDisplayString"])(e.translate("CustomDimensions_ExampleCreateCustomDimensions",5)),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",null,[Object(a["createElementVNode"])("code",{textContent:Object(a["toDisplayString"])(e.addMultipleCustomDimCode)},null,8,Ce)],512),[[u,{}]])]})),_:1},8,["content-title"])])),e.editMode?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ge,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{"dimension-id":e.dimensionId,"dimension-scope":e.dimensionScope},null,8,["dimension-id","dimension-scope"])])])):Object(a["createCommentVNode"])("",!0)])}var Se=Object(a["defineComponent"])({components:{CustomDimensionsList:pe,ContentBlock:s["ContentBlock"],CustomDimensionsEdit:P},directives:{SelectOnFocus:s["SelectOnFocus"]},data:function(){return{editMode:!1,dimensionId:null,dimensionScope:""}},created:function(){var e=this;Object(a["watch"])((function(){return s["MatomoUrl"].hashParsed.value}),(function(){e.initState()})),this.initState()},methods:{getValidDimensionScope:function(e){return-1!==["action","visit"].indexOf(e)?e:""},initState:function(){var e=s["MatomoUrl"].hashParsed.value.idDimension;if(e){var t=this.getValidDimensionScope(s["MatomoUrl"].hashParsed.value.scope);if("0"===e){var n={isAllowed:!0,scope:t};if(s["Matomo"].postEvent("CustomDimensions.initAddDimension",n),n&&!n.isAllowed)return this.editMode=!1,this.dimensionId=null,void(this.dimensionScope="")}this.editMode=!0,this.dimensionId=parseInt(e,10),this.dimensionScope=t}else this.editMode=!1,this.dimensionId=null,this.dimensionScope="";s["Matomo"].helper.lazyScrollToContent()}},computed:{addCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action\n./console customdimensions:add-custom-dimension --scope=visit"},addMultipleCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action --count=5"}}});Se.render=Ve;var Ee=Se; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */Object(s["createAngularJsAdapter"])({component:Se,directiveName:"piwikCustomDimensionsManage"})}})})); + */Object(s["createAngularJsAdapter"])({component:Ee,directiveName:"piwikCustomDimensionsManage"})}})})); //# sourceMappingURL=CustomDimensions.umd.min.js.map
\ No newline at end of file diff --git a/plugins/CustomDimensions/vue/src/List/List.vue b/plugins/CustomDimensions/vue/src/List/List.vue index b41aed48e2..78ea09e7ee 100644 --- a/plugins/CustomDimensions/vue/src/List/List.vue +++ b/plugins/CustomDimensions/vue/src/List/List.vue @@ -23,7 +23,9 @@ v-for="scope in availableScopes" :key="scope.value" > - <ContentBlock :content-title="`${scope.name} Dimensions`"> + <ContentBlock + :content-title="translate(`CustomDimensions_ScopeTitle${ucfirst(scope.value)}`)" + > <p> {{ translate(`CustomDimensions_ScopeDescription${ucfirst(scope.value)}`) }} {{ translate(`CustomDimensions_ScopeDescription${ucfirst(scope.value)}MoreInfo`) }} diff --git a/plugins/CustomVariables b/plugins/CustomVariables -Subproject 096d8918ae5c8c3a063acc673be53e87ede01ba +Subproject 06e8a8121fd52fc1b3fc9ce908e2c6b8f3753ea diff --git a/plugins/Dashboard/tests/UI/DashboardManager_spec.js b/plugins/Dashboard/tests/UI/DashboardManager_spec.js index fe6e1d7b13..157c6bac0d 100644 --- a/plugins/Dashboard/tests/UI/DashboardManager_spec.js +++ b/plugins/Dashboard/tests/UI/DashboardManager_spec.js @@ -99,6 +99,14 @@ describe("DashboardManager", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('create_new'); }); + + it("should load widgets on smaller screen", async function(){ + await page.webpage.setViewport({ width: 815, height: 512 }); + await page.waitForTimeout(500); + expect(await page.screenshot({ fullPage: true })).to.matchImage('small_screen'); + }); + + it("should remove dashboard when remove dashboard process completed", async function() { await page.click('.dashboard-manager .title'); await page.click('li[data-action="removeDashboard"]'); diff --git a/plugins/Dashboard/tests/UI/Dashboard_spec.js b/plugins/Dashboard/tests/UI/Dashboard_spec.js index 2140504911..a4b27f95e0 100644 --- a/plugins/Dashboard/tests/UI/Dashboard_spec.js +++ b/plugins/Dashboard/tests/UI/Dashboard_spec.js @@ -299,6 +299,7 @@ describe("Dashboard", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('create_new'); }); + it("should load segmented dashboard", async function() { await removeAllExtraDashboards(); await page.goto(url + '&segment=' + encodeURIComponent("browserCode==FF")); @@ -326,4 +327,5 @@ describe("Dashboard", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('invalid_token_auth'); }); + }); diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png new file mode 100644 index 0000000000..31f26f3197 --- /dev/null +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8200a233b30a708b15d95ad1266d3b02b8571858c4056f809a183cbd15b2ce6 +size 240977 diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png index 28eb224427..9f645c3b11 100644 --- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png +++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fc2afd2afafb0c31effa327eff0050496ebe55af35f3b8b31aabe33b916922 -size 32321 +oid sha256:46544d21655c84211cdd35097aa24a2b4492a4b20cfff0390603e6976c5bf12d +size 32369 diff --git a/plugins/DeviceDetectorCache b/plugins/DeviceDetectorCache -Subproject 4199e6e46f59f70a2b05461e100a5b5c152a7fe +Subproject 86a895429c30310ec507cc1012610ce39f62b0d diff --git a/plugins/DevicesDetection/Columns/BrowserVersion.php b/plugins/DevicesDetection/Columns/BrowserVersion.php index d8df75b4fc..9b2de1de0b 100644 --- a/plugins/DevicesDetection/Columns/BrowserVersion.php +++ b/plugins/DevicesDetection/Columns/BrowserVersion.php @@ -1,4 +1,5 @@ <?php + /** * Matomo - free/libre analytics platform * @@ -6,6 +7,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ + namespace Piwik\Plugins\DevicesDetection\Columns; use Piwik\Tracker\Request; @@ -36,8 +38,7 @@ class BrowserVersion extends Base $aBrowserInfo = $parser->getClient(); if (!empty($aBrowserInfo['version'])) { - - return $aBrowserInfo['version']; + return substr($aBrowserInfo['version'], 0, 20); } return ''; diff --git a/plugins/Diagnostics/Diagnostic/DatabaseAbilitiesCheck.php b/plugins/Diagnostics/Diagnostic/DatabaseAbilitiesCheck.php index 563c904bcc..2b0ad6417a 100644 --- a/plugins/Diagnostics/Diagnostic/DatabaseAbilitiesCheck.php +++ b/plugins/Diagnostics/Diagnostic/DatabaseAbilitiesCheck.php @@ -121,7 +121,7 @@ class DatabaseAbilitiesCheck implements Diagnostic '<br/><strong>%s:</strong> %s<br/>%s', $this->translator->translate('General_Error'), $errorMessage, - 'Troubleshooting: <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/troubleshooting/#faq_194">FAQ on matomo.org</a>' + 'Troubleshooting: <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/troubleshooting/faq_194">FAQ on matomo.org</a>' ); } diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__Live.getLastVisitsDetails_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__Live.getLastVisitsDetails_day.xml index 350db4d7d6..6fb456715e 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__Live.getLastVisitsDetails_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__Live.getLastVisitsDetails_day.xml @@ -656,6 +656,9 @@ <goalPageId>1</goalPageId> <url>http://example.org/index.htm</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php index 39ba487065..cf10439ab4 100644 --- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php +++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php @@ -251,7 +251,16 @@ class Php extends GeoIp2 if (is_array($lookupResult->subdivisions) && count($lookupResult->subdivisions) > 0) { $subdivisions = $lookupResult->subdivisions; $subdivision = $this->determinSubdivision($subdivisions, $result[self::COUNTRY_CODE_KEY]); - $result[self::REGION_CODE_KEY] = $subdivision->isoCode ? strtoupper($subdivision->isoCode) : $this->determineRegionIsoCodeByNameAndCountryCode($subdivision->name, $result[self::COUNTRY_CODE_KEY]); + $subdivisionIsoCode = $subdivision->isoCode ? strtoupper($subdivision->isoCode) : ''; + + // In some cases the region code might be returned including the country code + // e.g. AE-DU instead of only DU. In that case we remove the prefix + // see https://github.com/matomo-org/matomo/issues/19323 + if (0 === strpos($subdivisionIsoCode, $result[self::COUNTRY_CODE_KEY] . '-')) { + $subdivisionIsoCode = substr($subdivisionIsoCode, strlen($result[self::COUNTRY_CODE_KEY]) + 1); + } + + $result[self::REGION_CODE_KEY] = $subdivisionIsoCode ? : $this->determineRegionIsoCodeByNameAndCountryCode($subdivision->name, $result[self::COUNTRY_CODE_KEY]); $result[self::REGION_NAME_KEY] = $subdivision->name; } } @@ -387,7 +396,7 @@ class Php extends GeoIp2 array('<strong>', '</strong>')); } - $installDocs = '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/#faq_163">' + $installDocs = '<a rel="noreferrer" target="_blank" href="https://matomo.org/faq/how-to/faq_163">' . Piwik::translate('UserCountry_HowToInstallGeoIPDatabases') . '</a>'; diff --git a/plugins/GeoIp2/tests/Integration/LocationProviderTest.php b/plugins/GeoIp2/tests/Integration/LocationProviderTest.php index ea1fc20927..3798092694 100644 --- a/plugins/GeoIp2/tests/Integration/LocationProviderTest.php +++ b/plugins/GeoIp2/tests/Integration/LocationProviderTest.php @@ -58,6 +58,26 @@ class LocationProviderTest extends \PHPUnit\Framework\TestCase ], $result); } + public function testGeoIP2CityWithIncorrectlyPrefixedRegionIsoCode() + { + // The IP 88.88.88.88 will return a region code that is prefixed with the country code, e.g. US-NJ instead of NJ + $locationProvider = new GeoIp2\Php(['loc' => ['GeoIP2-City.mmdb'], 'isp' => []]); + $result = $locationProvider->getLocation(['ip' => '88.88.88.88']); + + $this->assertEquals([ + 'continent_name' => 'North America', + 'continent_code' => 'NA', + 'country_code' => 'US', + 'country_name' => 'United States', + 'city_name' => 'Englewood Cliffs', + 'lat' => 40.892, + 'long' => -73.947, + 'postal_code' => null, + 'region_code' => 'NJ', + 'region_name' => 'New Jersey', + ], $result); + } + public function testGeoIP2Country() { $locationProvider = new GeoIp2\Php(['loc' => ['GeoIP2-Country.mmdb'], 'isp' => []]); diff --git a/plugins/Goals/Columns/Metrics/GoalConversionRate.php b/plugins/Goals/Columns/Metrics/GoalConversionRate.php index f81d188248..d290a961c9 100644 --- a/plugins/Goals/Columns/Metrics/GoalConversionRate.php +++ b/plugins/Goals/Columns/Metrics/GoalConversionRate.php @@ -41,7 +41,7 @@ class GoalConversionRate extends GoalSpecificProcessedMetric public function getDependentMetrics() { - return array('nb_visits', Goals::makeGoalColumn($this->idGoal, 'nb_conversions')); + return array('nb_visits', Goals::makeGoalColumn($this->idGoal, 'nb_conversions'), Goals::makeGoalColumn($this->idGoal, 'nb_visits_converted')); } public function format($value, Formatter $formatter) diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index bb1aa8c59a..13b1ab942e 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -22,6 +22,7 @@ use Piwik\Plugins\Referrers\API as APIReferrers; use Piwik\Translation\Translator; use Piwik\View; use Piwik\ViewDataTable\Factory as ViewDataTableFactory; +use Piwik\Plugins\CoreVisualizations\Visualizations\jqplotGraph\Evolution; /** * @@ -203,7 +204,7 @@ class Controller extends \Piwik\Plugin\Controller if (empty($idGoal)) { $idGoal = Common::getRequestVar('idGoal', '', 'string'); } - $view = $this->getLastUnitGraph($this->pluginName, __FUNCTION__, 'Goals.get'); + $view = $this->getLastUnitGraph($this->pluginName, __FUNCTION__, 'Goals.get', ['format_metrics' => 0]); $view->requestConfig->request_parameters_to_modify['idGoal'] = $idGoal; $view->requestConfig->request_parameters_to_modify['showAllGoalSpecificMetrics'] = 1; @@ -251,6 +252,10 @@ class Controller extends \Piwik\Plugin\Controller $langString = $idGoal ? 'Goals_SingleGoalOverviewDocumentation' : 'Goals_GoalsOverviewDocumentation'; $view->config->documentation = $this->translator->translate($langString, '<br />'); + if ($view instanceof Evolution) { + $view->requestConfig->request_parameters_to_modify['format_metrics'] = 0; + } + return $this->renderView($view); } diff --git a/plugins/Goals/Reports/Get.php b/plugins/Goals/Reports/Get.php index 5a3a341163..3affc112f5 100644 --- a/plugins/Goals/Reports/Get.php +++ b/plugins/Goals/Reports/Get.php @@ -245,7 +245,8 @@ class Get extends Base 'forceView' => null, 'viewDataTable' => null, 'showtitle' => null, - 'random' => null + 'random' => null, + 'format_metrics' => 0 ]); } diff --git a/plugins/Goals/VisitorDetails.php b/plugins/Goals/VisitorDetails.php index f1422239ae..34091d13ab 100644 --- a/plugins/Goals/VisitorDetails.php +++ b/plugins/Goals/VisitorDetails.php @@ -1,4 +1,5 @@ <?php + /** * Matomo - free/libre analytics platform * @@ -6,26 +7,29 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ + namespace Piwik\Plugins\Goals; use Piwik\Common; use Piwik\Plugins\Live\VisitorDetailsAbstract; +use function Piwik\Plugins\Referrers\getReferrerTypeFromShortName; + class VisitorDetails extends VisitorDetailsAbstract { const EVENT_VALUE_PRECISION = 3; - protected $lastGoalResults = array(); - protected $lastVisitIds = array(); + protected $lastGoalResults = []; + protected $lastVisitIds = []; public function extendVisitorDetails(&$visitor) { $idVisit = $visitor['idVisit']; if (in_array($idVisit, $this->lastVisitIds)) { - $goalConversionDetails = isset($this->lastGoalResults[$idVisit]) ? $this->lastGoalResults[$idVisit] : array(); + $goalConversionDetails = isset($this->lastGoalResults[$idVisit]) ? $this->lastGoalResults[$idVisit] : []; } else { - $goalConversionDetails = $this->queryGoalConversionsForVisits(array($idVisit)); + $goalConversionDetails = $this->queryGoalConversionsForVisits([$idVisit]); } $visitor['goalConversions'] = count($goalConversionDetails); @@ -34,7 +38,7 @@ class VisitorDetails extends VisitorDetailsAbstract public function provideActionsForVisitIds(&$actions, $idVisits) { $this->lastVisitIds = $idVisits; - $this->lastGoalResults = array(); + $this->lastGoalResults = []; $goalConversionDetails = $this->queryGoalConversionsForVisits($idVisits); // use while / array_shift combination instead of foreach to save memory @@ -43,6 +47,7 @@ class VisitorDetails extends VisitorDetailsAbstract $idVisit = $goalConversionDetail['idvisit']; unset($goalConversionDetail['idvisit']); + $goalConversionDetail['referrerType'] = $this->getReferrerType($goalConversionDetail['referrerType']); $this->lastGoalResults[$idVisit][] = $actions[$idVisit][] = $goalConversionDetail; } @@ -66,7 +71,10 @@ class VisitorDetails extends VisitorDetailsAbstract log_conversion.idlink_va, log_conversion.idlink_va as goalPageId, log_conversion.server_time as serverTimePretty, - log_conversion.url as url + log_conversion.url as url, + log_conversion.referer_type as referrerType, + log_conversion.referer_name as referrerName, + log_conversion.referer_keyword as referrerKeyword FROM " . Common::prefixTable('log_conversion') . " AS log_conversion LEFT JOIN " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_link_visit_action.idlink_va = log_conversion.idlink_va @@ -86,7 +94,7 @@ class VisitorDetails extends VisitorDetailsAbstract public function initProfile($visits, &$profile) { $profile['totalGoalConversions'] = 0; - $profile['totalConversionsByGoal'] = array(); + $profile['totalConversionsByGoal'] = []; } public function handleProfileVisit($visit, &$profile) @@ -120,4 +128,15 @@ class VisitorDetails extends VisitorDetailsAbstract $profile['totalRevenueByGoal'][$idGoalKey] += $action['revenue']; } } -}
\ No newline at end of file + + protected function getReferrerType($referrerTypeId) + { + try { + $referrerType = getReferrerTypeFromShortName($referrerTypeId); + } catch (\Exception $e) { + $referrerType = ''; + } + + return $referrerType; + } +} diff --git a/plugins/Goals/lang/en.json b/plugins/Goals/lang/en.json index 16abfcc500..c888438a02 100644 --- a/plugins/Goals/lang/en.json +++ b/plugins/Goals/lang/en.json @@ -143,6 +143,6 @@ "ColumnRevenueAttributedDocumentation": "The share of all revenue for %s where this page was viewed before conversion.", "ColumnConversionsEntryDocumentation": "The total number of goal conversions where this page was the entry page.", "ColumnConversionEntryRateDocumentation": "The percent of entrances that were converted for %s.", - "ColumnRevenueEntryDocumentation": "The share of all revenue for %s where this page was the entry pag.e" + "ColumnRevenueEntryDocumentation": "The share of all revenue for %s where this page was the entry page." } -}
\ No newline at end of file +} diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_oneConversionPerVisitshowAllGoalSpecificMetrics_requestedColumns__Goals.get_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_oneConversionPerVisitshowAllGoalSpecificMetrics_requestedColumns__Goals.get_day.xml index ffb10e4cc0..da38ea469d 100644 --- a/plugins/Goals/tests/System/expected/test_trackGoals_oneConversionPerVisitshowAllGoalSpecificMetrics_requestedColumns__Goals.get_day.xml +++ b/plugins/Goals/tests/System/expected/test_trackGoals_oneConversionPerVisitshowAllGoalSpecificMetrics_requestedColumns__Goals.get_day.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <result> - <goal_1_conversion_rate>0%</goal_1_conversion_rate> - <goal_1_conversion_rate_new_visit>0%</goal_1_conversion_rate_new_visit> + <goal_1_conversion_rate>66.67%</goal_1_conversion_rate> + <goal_1_conversion_rate_new_visit>100%</goal_1_conversion_rate_new_visit> <goal_1_conversion_rate_returning_visit>0%</goal_1_conversion_rate_returning_visit> </result>
\ No newline at end of file diff --git a/plugins/ImageGraph/lang/en.json b/plugins/ImageGraph/lang/en.json index b5cc868782..eff5fc5df6 100644 --- a/plugins/ImageGraph/lang/en.json +++ b/plugins/ImageGraph/lang/en.json @@ -1,6 +1,6 @@ { "ImageGraph": { - "ColumnOrdinateMissing": "The column '%1$s' was not found in this report. Try any of %2$s", - "PluginDescription": "Generate beautiful static PNG Graph images for any of your data report." + "ColumnOrdinateMissing": "Could not find a \"%1$s\" column in this report. Try any of %2$s.", + "PluginDescription": "Generate beautiful static PNG graph images for any of your data reports." } -}
\ No newline at end of file +} diff --git a/plugins/Installation/templates/reuseTables.twig b/plugins/Installation/templates/reuseTables.twig index e390309d38..76a9db6c2a 100644 --- a/plugins/Installation/templates/reuseTables.twig +++ b/plugins/Installation/templates/reuseTables.twig @@ -25,7 +25,7 @@ <ul> <li>{{ 'CoreUpdater_ErrorDIYHelp_1'|translate }}</li> <li>{{ 'CoreUpdater_ErrorDIYHelp_2'|translate }}</li> - <li>{{ 'CoreUpdater_ErrorDIYHelp_3'|translate }} <a href='https://matomo.org/faq/how-to-update/#faq_179' rel='noreferrer noopener' target='_blank'>(see FAQ)</a></li> + <li>{{ 'CoreUpdater_ErrorDIYHelp_3'|translate }} <a href='https://matomo.org/faq/how-to-update/faq_179' rel='noreferrer noopener' target='_blank'>(see FAQ)</a></li> <li>{{ 'CoreUpdater_ErrorDIYHelp_4'|translate }}</li> <li>{{ 'CoreUpdater_ErrorDIYHelp_5'|translate }}</li> </ul> diff --git a/plugins/Live/VisitorDetails.php b/plugins/Live/VisitorDetails.php index e709ffbb39..aad6fa64d9 100644 --- a/plugins/Live/VisitorDetails.php +++ b/plugins/Live/VisitorDetails.php @@ -97,7 +97,7 @@ class VisitorDetails extends VisitorDetailsAbstract $sitesModel = new \Piwik\Plugins\SitesManager\Model(); - if (isset($action['type']) && $action['type'] == 'outlink' && isset($action['url'])) { + if (isset($action['type']) && in_array($action['type'] ,['outlink', 'download']) && isset($action['url'])) { $action['url'] = html_entity_decode($action['url'], ENT_QUOTES, "UTF-8"); } diff --git a/plugins/Live/stylesheets/live.less b/plugins/Live/stylesheets/live.less index 7d4d87ea37..8ea1fae5db 100644 --- a/plugins/Live/stylesheets/live.less +++ b/plugins/Live/stylesheets/live.less @@ -2,34 +2,35 @@ text-align: left; color: @theme-color-text-light; - .dataTable { - margin-bottom: -1px; - } + .dataTable { + margin-bottom: -1px; + } } .theWidgetContent > h2:first-child { - color: @theme-color-headline-alternative !important; - .title { color: @theme-color-headline-alternative !important; - } + + .title { + color: @theme-color-headline-alternative !important; + } } .card { - #visitsLive { - margin-left: -20px; - margin-right: -20px; - } + #visitsLive { + margin-left: -20px; + margin-right: -20px; + } } #visitsLive .settings { - border-bottom: 1px solid @color-silver-l90; + border-bottom: 1px solid @color-silver-l90; } #visitsLive .datetime, #visitsLive .country, #visitsLive .settings, #visitsLive .returning { padding: 10px 20px; .widget & { - padding: 10px 11px; + padding: 10px 11px; } } @@ -46,9 +47,9 @@ } #visitsLive .referrer { - display: block; - padding-top: 4px; - padding-bottom: 1px; + display: block; + padding-top: 4px; + padding-bottom: 1px; } #visitsLive .pagesTitle { @@ -69,35 +70,39 @@ } #visitsLive .visits-live-launch-visitor-profile { - color: @theme-color-text; - line-height: 200%; + color: @theme-color-text; + line-height: 200%; - span { - display: block; - vertical-align: middle; + span { + display: block; + vertical-align: middle; - &.icon-visitor-profile { - display: inline; - font-size: 16px; - line-height: 16px; - vertical-align: middle; + &.icon-visitor-profile { + display: inline; + font-size: 16px; + line-height: 16px; + vertical-align: middle; + } } - } - .icon-visitor-profile { - font-size: 120%; - } + .icon-visitor-profile { + font-size: 120%; + } } .theWidgetContent .card .card-content #visitsTotal { - margin-left: -20px; - width: ~"calc(100% + 40px)"; + margin-left: -20px; + width: ~"calc(100% + 40px)"; +} + +#visitsTotal { + overflow-x: auto; } #visitsTotal table.dataTable { - td:first-child, th:first-child { - padding-left: 14px; - } + td:first-child, th:first-child { + padding-left: 14px; + } } .visitsLiveFooter img { @@ -113,11 +118,11 @@ } .ui-dialog.ui-widget { - .dataTableVizVisitorLog { - .dataTableFeatures { - border-bottom: 0; + .dataTableVizVisitorLog { + .dataTableFeatures { + border-bottom: 0; + } } - } } .visitsLiveFooter a.rightLink { @@ -130,17 +135,17 @@ } ol.visitorLog { - list-style-type: none; - margin-left: 8px; - padding-left: 8px; + list-style-type: none; + margin-left: 8px; + padding-left: 8px; } .truncated-text-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - display:inline-block; - max-width:90%; + display: inline-block; + max-width: 90%; overflow: -moz-hidden-unscrollable; } @@ -150,133 +155,134 @@ ol.actionList > li:not(.pageviewActions) { position: relative; min-height: 30px; - &:before { - vertical-align: top; - background-color: #424242; - border: 5px solid #424242; - border-radius: 50%; - line-height: 0; - font-size: 0; - content: " "; - top: 10px; - position: relative; - box-shadow: 0 0 0 7px #fff; - left: -14px; - z-index: 2; - } - - &:after { - content: " "; - border-left: 2px solid #d2d2d2; - position: absolute; - left: -10px; - height: calc(~"100% - 20px"); - margin-top: 20px; - z-index: 1; - } - - &:last-of-type:after { - border-left: none; - } - - &.duplicate { - visibility: hidden; - line-height: 0; - min-height: 0; - height: 0; - margin: 0; - overflow: hidden; - padding: 0; - } - - &.more { - list-style-type: none; - font-weight: bold; - - .icon-info { - vertical-align: middle; - } - } + &:before { + vertical-align: top; + background-color: #424242; + border: 5px solid #424242; + border-radius: 50%; + line-height: 0; + font-size: 0; + content: " "; + top: 10px; + position: relative; + box-shadow: 0 0 0 7px #fff; + left: -14px; + z-index: 2; + } - &.actionsForPageExpander { - a { - color: @theme-color-text; - &:hover { - text-decoration:underline; - } + &:after { + content: " "; + border-left: 2px solid #d2d2d2; + position: absolute; + left: -10px; + height: calc(~"100% - 20px"); + margin-top: 20px; + z-index: 1; } - &:before { - margin-left: -5px; - visibility: hidden; + &:last-of-type:after { + border-left: none; } - &.expanded:before { - content: "\f102"; + &.duplicate { + visibility: hidden; + line-height: 0; + min-height: 0; + height: 0; + margin: 0; + overflow: hidden; + padding: 0; } - &.collapsed:before { - content: "\f103"; + &.more { + list-style-type: none; + font-weight: bold; + + .icon-info { + vertical-align: middle; + } } - &:before { - margin-top: 2px; - float: left; - margin-right: 5px; - .matomo-icon(); + &.actionsForPageExpander { + a { + color: @theme-color-text; + + &:hover { + text-decoration: underline; + } + } + + &:before { + margin-left: -5px; + visibility: hidden; + } + + &.expanded:before { + content: "\f102"; + } + + &.collapsed:before { + content: "\f103"; + } + + &:before { + margin-top: 2px; + float: left; + margin-right: 5px; + .matomo-icon(); + } } - } } ol.actionList > li.pageviewActions { - position: relative; - margin-top: -6px; + position: relative; + margin-top: -6px; + + &:after { + content: " "; + border-left: 2px solid #d2d2d2; + position: absolute; + left: -10px; + height: calc(~"100% + 8px"); + z-index: 1; + top: 0; + margin-top: -8px; + } - &:after { - content: " "; - border-left: 2px solid #d2d2d2; - position: absolute; - left: -10px; - height: calc(~"100% + 8px"); - z-index: 1; - top: 0; - margin-top: -8px; - } - - &:last-child:after { - height: calc(~"100% - 4px"); - } - - > ol > li:nth-last-child(2):after { - border-left: none; - } + &:last-child:after { + height: calc(~"100% - 4px"); + } + + > ol > li:nth-last-child(2):after { + border-left: none; + } } // when last action group is just refreshes ol.actionList > li:nth-last-child(2).noPageviewActions:not(.refreshesExpanded):after { - border-left: none; + border-left: none; } ol.actionList > li:not(.pageviewActions).last-action { - &:after { - border-left: none; - } + &:after { + border-left: none; + } } .pageviewActions.last-action > ol.actionList > li.last-action { - margin-bottom: 0; + margin-bottom: 0; } li.collapsed-contents > div { - cursor: pointer; + cursor: pointer; } li.collapsed-content-item { - margin-left: 1.5rem; + margin-left: 1.5rem; } li.pageviewActions > ol.actionList { - margin-left: 1.5rem; + margin-left: 1.5rem; } #visitsLive img { @@ -311,7 +317,7 @@ li.pageviewActions > ol.actionList { } #visitsLive .visitorType .visitorRank { - margin-left: 0; + margin-left: 0; } .hash { @@ -329,7 +335,7 @@ li.pageviewActions > ol.actionList { z-index: 3; &.icon-refresh:before { - padding-right: 2px; + padding-right: 2px; } } @@ -371,75 +377,75 @@ li.pageviewActions > ol.actionList { } ol.visitorLog p { - margin:0; - padding:0; + margin: 0; + padding: 0; } .dataTableVizVisitorLog { - .card.row { - margin-left: 0; - margin-right: 0; - } + .card.row { + margin-left: 0; + margin-right: 0; + } - .card { - padding: 15px 0; - font-size: 13px; - text-align: left; + .card { + padding: 15px 0; + font-size: 13px; + text-align: left; - a { - text-decoration: none !important; - color: @theme-color-link; - width: inherit; + a { + text-decoration: none !important; + color: @theme-color-link; + width: inherit; + } } - } - .actionList > li > div { - width: 95%; + .actionList > li > div { + width: 95%; - .segmentedVisitorLogPopover & { - width: 90%; // space in segmented visitor log isn't enough + .segmentedVisitorLogPopover & { + width: 90%; // space in segmented visitor log isn't enough + } } - } - .dataTableWrapper { - width:100%; - } + .dataTableWrapper { + width: 100%; + } - .widget & .card { + .widget & .card { - &:hover .visitor-log-visitor-profile-link { - display:inline; + &:hover .visitor-log-visitor-profile-link { + display: inline; + } } - } } .visitor-log-datetime { - display: block; + display: block; } .visitor-log-ip-location img.flag { - border: 1px solid lightgray; - top: 2px; - position: relative; + border: 1px solid lightgray; + top: 2px; + position: relative; } .visitor-log-page-list { - position:relative; - margin-top: 7px; + position: relative; + margin-top: 7px; } a.visitor-log-visitor-profile-link { z-index: 2; - position:absolute; + position: absolute; right: 15px; top: 15px; - font-style:italic; - font-size:13px; + font-style: italic; + font-size: 13px; background-color: inherit !important; .widget & { - display:none; + display: none; } img { @@ -448,18 +454,18 @@ a.visitor-log-visitor-profile-link { } @media print { - display: none; + display: none; } } .actionList { > li > div { - display: inline-block; - width: 90%; + display: inline-block; + width: 90%; - > * { - vertical-align: top; - } + > * { + vertical-align: top; + } } } @@ -487,80 +493,81 @@ a.visitor-log-visitor-profile-link { display: none; } -.visitorLogIcons>span>span>img { +.visitorLogIcons > span > span > img { margin: auto 5px auto 0; } -.visitorLogIconWithDetails>img { +.visitorLogIconWithDetails > img { margin: auto 5px -2px 0; height: 16px; } .visitorLogIconWithDetails.flag { - display: none; + display: none; } -.visitorLogIconWithDetails.flag>img { +.visitorLogIconWithDetails.flag > img { border: 1px solid lightgray; } -.visitorLogIcons>span.visitorRank>img { +.visitorLogIcons > span.visitorRank > img { margin: auto 0; } .visitorLogIcons { - .visitorDetails, .visitorType { - display: block; - margin-top: 4px; - } + .visitorDetails, .visitorType { + display: block; + margin-top: 4px; + } } .visitorType { - img { - max-height: 20px; - margin: auto 0; - } + img { + max-height: 20px; + margin: auto 0; + } } .conversionCount { - color: #fff; - background-color: #4b0; - min-width: 17px; - height: 17px; - display: inline-block; - text-align: center; - font-weight: bold; - font-size: 10px; - line-height: 15px; - border-radius: 5px; - margin-left: -17px; - position: relative; - top: 3px; - border: 1px solid #fff; - padding: 0 2px; - - #visitsLive & { - top: 10px; - } + color: #fff; + background-color: #4b0; + min-width: 17px; + height: 17px; + display: inline-block; + text-align: center; + font-weight: bold; + font-size: 10px; + line-height: 15px; + border-radius: 5px; + margin-left: -17px; + position: relative; + top: 3px; + border: 1px solid #fff; + padding: 0 2px; + + #visitsLive & { + top: 10px; + } } .own-visitor-column { - .visitorLogIcons { - .visitorDetails { - margin-top: 0; + .visitorLogIcons { + .visitorDetails { + margin-top: 0; + } + + .visitorType { + margin-top: 8px; + } } - .visitorType { - margin-top: 8px; - } - } } .visitorReferrer { - clear:both; + clear: both; padding-top: 1em; * { - vertical-align: middle; + vertical-align: middle; } } @@ -569,75 +576,77 @@ a.visitor-log-visitor-profile-link { } .segmentedlog { - margin: 8px; - display: block; + margin: 8px; + display: block; } #widgetLivewidget { - .visitorLogIcons { - &:before { - content: " "; - display: block; + .visitorLogIcons { + &:before { + content: " "; + display: block; + } + + display: inline-block; } - display: inline-block; - } - .visitorLogIconWithDetails.flag { - display: inline; - } + .visitorLogIconWithDetails.flag { + display: inline; + } - .visitorDetails { - display: inline-block; - } + .visitorDetails { + display: inline-block; + } - .visitorLogIconWithDetails { - margin-right: 5px; - } + .visitorLogIconWithDetails { + margin-right: 5px; + } - .visitorType { - display: inline-block; - float: left; - margin-right: 10px; - } + .visitorType { + display: inline-block; + float: left; + margin-right: 10px; + } } .reporting-page #widgetLivewidget .theWidgetContent .visitsLiveFooter { - margin-left: -9px; - margin-right: -2px; + margin-left: -9px; + margin-right: -2px; } .refresh-divider { - display: none; + display: none; } @media only screen and (min-width: 800px) { - .card #visitsLive .visitorLogIcons:before { - content: none; - } - .card #visitsLive .referrer { - float: right; - } + .card #visitsLive .visitorLogIcons:before { + content: none; + } + + .card #visitsLive .referrer { + float: right; + } } @media only screen and (max-width: 600px) { - .own-visitor-column { - margin: 10px 0; - } + .own-visitor-column { + margin: 10px 0; + } } -@media print{ - .col.s12.m3{ - width: 20%; - } +@media print { + .col.s12.m3 { + width: 20%; + } - .row .col.s12.own-visitor-column{ - width: 15%; - margin-top: 10px; - margin-bottom: 10px; - } + .row .col.s12.own-visitor-column { + width: 15%; + margin-top: 10px; + margin-bottom: 10px; + } - .col.s12.m7.column { - width:65%; - } + .col.s12.m7.column { + width: 65%; + } } diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 98b0dd23e9..06cf702fab 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -240,7 +240,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin /** * Form-less login - * @see how to use it on http://piwik.org/faq/how-to/#faq_30 + * @see how to use it on http://piwik.org/faq/how-to/faq_30 * @throws Exception * @return void */ diff --git a/plugins/Login/Emails/PasswordResetEmail.php b/plugins/Login/Emails/PasswordResetEmail.php index bdded77c45..dbbff22b24 100644 --- a/plugins/Login/Emails/PasswordResetEmail.php +++ b/plugins/Login/Emails/PasswordResetEmail.php @@ -49,7 +49,8 @@ class PasswordResetEmail extends Mail $this->setSubject($this->getDefaultSubject()); $this->addReplyTo($replytoEmailAddress, $replytoEmailName); - $this->setWrappedHtmlBody($this->getDefaultBodyText()); + $this->setWrappedHtmlBody($this->getHTMLBody()); + $this->setBodyText($this->getDefaultBodyText()); } private function getDefaultSubject() @@ -57,12 +58,32 @@ class PasswordResetEmail extends Mail return Piwik::translate('Login_MailTopicPasswordChange'); } - private function getDefaultBodyText() + /** + * Get the translated plain text email body with the reset link + * + * @return string + */ + private function getDefaultBodyText() : string + { + return Piwik::translate('Login_MailPasswordChangeBody2', + [Common::sanitizeInputValue($this->login), Common::sanitizeInputValue($this->ip), Common::sanitizeInputValue($this->resetUrl)]); + } + + /** + * Create the HTML email body from the plain text body + * + * @return string + */ + private function getHTMLBody() : string { return '<p>' . str_replace( "\n\n", "</p><p>", - Piwik::translate('Login_MailPasswordChangeBody2', [Common::sanitizeInputValue($this->login), Common::sanitizeInputValue($this->ip), Common::sanitizeInputValue($this->resetUrl)]) + Piwik::translate('Login_MailPasswordChangeBody2', + [Common::sanitizeInputValue($this->login), + Common::sanitizeInputValue($this->ip), + '<p style="word-break: break-all"><a href="'.Common::sanitizeInputValue($this->resetUrl).'">'. + Common::sanitizeInputValue($this->resetUrl).'</a></p>']) ) . "</p>"; } }
\ No newline at end of file diff --git a/plugins/Login/lang/en.json b/plugins/Login/lang/en.json index 9f97cad22b..4e4a846295 100644 --- a/plugins/Login/lang/en.json +++ b/plugins/Login/lang/en.json @@ -1,68 +1,68 @@ { "Login": { "BruteForceLog": "Brute Force Log", - "ConfirmationLinkSent": "A confirmation link has been sent to your inbox. Check your e-mail and visit this link to authorize your password change request.", + "ConfirmationLinkSent": "Open the confirmation link sent to your e-mail inbox to confirm changing your password.", "ContactAdmin": "Possible reason: your host may have disabled the mail() function. <br \/>Please contact your Matomo administrator.", - "ExceptionInvalidSuperUserAccessAuthenticationMethod": "A user with Super User access cannot be authenticated using the '%s' mechanism.", + "ExceptionInvalidSuperUserAccessAuthenticationMethod": "A user with superuser access cannot be authenticated using the '%s' mechanism.", "ExceptionPasswordMD5HashExpected": "The password parameter is expected to be a MD5 hash of the password.", - "InvalidNonceToken": "Form security failed, token miss match. Please reload the form and check that your cookies are enabled.", - "InvalidNonceReferrer": "Form security failed, invalid referrer header. If you use a proxy server, you must %1$s configure Matomo to accept the proxy header %2$s that forwards the Host header. Also, check that your Referrer header is sent correctly and If you previously connected using https, please ensure you are connecting over a secure (SSL/TLS) connection and try again.", - "InvalidNonceUnexpectedReferrer" : "Form security failed, the referrer header is different from the expected referrer header, check that your Referrer header is sent correctly.", - "InvalidNonceOrigin": "Form security failed, invalid origin. If you previously connected using https, please ensure you are connecting over a secure (SSL/TLS) connection and try again.", - "InvalidNonceSSLMisconfigured": "Also, you may %1$s force Matomo to use a secure connection%2$s: in your config file %3$s set %4$s below section %5$s", - "InvalidOrExpiredToken": "Token is invalid or has expired.", + "InvalidNonceToken": "The form security failed because of a token mismatch. Please reload the form and check that your cookies are on.", + "InvalidNonceReferrer": "The form security failed because of an invalid \"Referer\" header. If you are using a proxy server, you must %1$sconfigure Matomo to accept the proxy header%2$s that forwards the host header. Also, check that your \"Referer\" header is sent correctly. If you previously connected using HTTPS, please ensure you are connecting over a secure (SSL/TLS) connection and try again.", + "InvalidNonceUnexpectedReferrer" : "The form security failed because the \"Referer\" header is different from what was expected. Check that it is sent correctly.", + "InvalidNonceOrigin": "The form security failed because of invalid origin. If you previously connected using HTTPS, please ensure you are connecting over a secure (SSL/TLS) connection and try again.", + "InvalidNonceSSLMisconfigured": "Also, you may %1$sforce Matomo to use a secure connection%2$s: in your config file%3$s set %4$s below section %5$s", + "InvalidOrExpiredToken": "The token is invalid or has expired.", "InvalidUsernameEmail": "Invalid username or e-mail address.", "LogIn": "Sign in", - "LoginOrEmail": "Username or Email", - "HelpIpRange": "Enter one IP address or one IP range per line. You can use CIDR notation eg. %1$s or you can use wildcards, eg. %2$s or %3$s", - "SettingBruteForceEnable": "Enable Brute Force Detection", - "SettingBruteForceEnableHelp": "Brute Force Detection is an important security feature used to protect your data from unauthorized access. Instead of allowing any user to try thousands, or millions of password combinations within a very short time, it will only allow a specific amount of failed logins within a short period of time. If too many failed logins occur in that time range, the user won't be able to log in until some time has passed. Please note that if an IP is blocked, every user that uses that IP will be blocked from logging in as well.", + "LoginOrEmail": "Username or e-mail", + "HelpIpRange": "Enter one IP address or one IP range per line. You can use CIDR notation e.g: %1$s or you can use wildcards, e.g: %2$s or %3$s", + "SettingBruteForceEnable": "Enable Brute-force Detection", + "SettingBruteForceEnableHelp": "Logs out users making too many password guesses within a timeframe for a while. This prevents anyone from testing all combinations. Getting a shared IP blocked also locks out its other users.", "SettingBruteForceWhitelistIp": "Never block these IPs from logging in", "SettingBruteForceBlacklistIp": "Always block these IPs from logging in", - "NotAllowListTakesPrecendence": "If an IP matches both the block and never block list, then the block list takes precendence and the IP would not be allowed.", - "SettingBruteForceMaxFailedLogins": "Number of allowed login retries within time range", - "SettingBruteForceMaxFailedLoginsHelp": "If more than this number of failed logins are recorded within the time range configured below, block the IP.", + "NotAllowListTakesPrecendence": "If an IP is on both the list of IPs to block and never block, it is blocked.", + "SettingBruteForceMaxFailedLogins": "Number of allowed login retries within a given time frame", + "SettingBruteForceMaxFailedLoginsHelp": "Blocks the IP if more than this number of failed logins are recorded within the time frame set below.", "SettingBruteForceTimeRange": "Count login retries within this time range in minutes", - "SettingBruteForceTimeRangeHelp": "Enter a number in minutes.", - "ConfirmPasswordReset": "Confirm password reset", - "ConfirmPasswordResetIntro": "To confirm it is really you who requested this password change, please enter your new password again.", - "ConfirmPasswordResetWrongPassword": "The entered password does not match your new password. If you don't remember your newly chosen password you can reset your password again. If you didn't request the password change, simply do nothing and your password won't be changed.", - "LoginNotAllowedBecauseBlocked": "You are currently not allowed to log in because you had too many failed logins, try again later.", - "CurrentlyBlockedIPs": "Currently blocked IPs", + "SettingBruteForceTimeRangeHelp": "Enter a number of minutes.", + "ConfirmPasswordReset": "Reset password", + "ConfirmPasswordResetIntro": "Please type your new password to confirm you really requested having your password changed.", + "ConfirmPasswordResetWrongPassword": "The entered password does not match your newly made one. Reset your password again if you don't remember it. Don't do anything to keep your password if you didn't request changing it.", + "LoginNotAllowedBecauseBlocked": "Too many failed logins. Please wait and try logging in again later.", + "CurrentlyBlockedIPs": "Blocked IPs", "IPsAlwaysBlocked": "These IPs are always blocked", - "UnblockAllIPs": "Unblock all currently blocked IPs", - "CurrentlyBlockedIPsUnblockInfo": "You can unblock IPs that are currently blocked, so they can log in again in case they were falsely flagged and need to be able to log in again.", - "CurrentlyBlockedIPsUnblockConfirm": "Are you sure you want to unblock all currently blocked IPs?", - "LoginPasswordNotCorrect": "Wrong Username and password combination.", + "UnblockAllIPs": "Unblock all blocked IPs", + "CurrentlyBlockedIPsUnblockInfo": "You can unblock IPs blocked by mistake to allow them to log in again.", + "CurrentlyBlockedIPsUnblockConfirm": "Unblock all blocked IPs?", + "LoginPasswordNotCorrect": "Wrong username and/or password.", "LostYourPassword": "Lost your password?", "ChangeYourPassword": "Change your password", - "MailPasswordChangeBody2": "Hi %1$s,\n\nA password reset request was received from %2$s. To confirm this password change so you can login with your new credentials, please copy and paste the following link in your browser:\n\n%3$s\n\nNote: this link will expire in 24 hours.\n\nAnd thank you for using Matomo!", - "MailTopicPasswordChange": "Confirm Password Change", + "MailPasswordChangeBody2": "Hi %1$s,\n\nA request to reset the password was received from %2$s. Copy and paste the following link in your web browser within 24 hours to log in with your new username and password:\n\n%3$s\n\nThank you for using Matomo.", + "MailTopicPasswordChange": "Confirm changing the password", "NewPassword": "New password", "NewPasswordRepeat": "New password (repeat)", - "PasswordChanged": "Your password has been changed.", + "PasswordChanged": "You can now use your new password to log in.", "PasswordRepeat": "Password (repeat)", - "PasswordsDoNotMatch": "Passwords do not match.", - "PasswordResetAlreadySent": "You have requested too many password resets recently. A new request can be made in one hour. If you have problems resetting your password, please contact your administrator for help.", - "WrongPasswordEntered": "Please enter your correct password.", + "PasswordsDoNotMatch": "Mismatching passwords.", + "PasswordResetAlreadySent": "You requested too many password resets recently. A new request can be made in one hour. Your administrator can help you if that doesn't work.", + "WrongPasswordEntered": "Please enter your password.", "ConfirmPasswordToContinue": "Confirm your password to continue", - "PluginDescription": "Provides authentication via username and password as well as password reset functionality. Authentication method can be changed by using another Login plugin such as LoginLdap available on the Marketplace.", + "PluginDescription": "Provides username and password login as well as password reset functionality. The login method can be changed by using another login plugin such as LoginLdap available on the marketplace.", "RememberMe": "Remember Me", - "SuspiciousLoginAttemptsInLastHourEmailSubject": "We've noticed some suspicious login attempts to your account...", - "SuspiciousLoginAttemptsInLastHourEmail1": "We've noticed a suspiciously high number of login attempts to your Matomo account in the last hour, specifically %1$s login attempts from %2$s distinct IP addresses. We suspect someone may be trying to break into your account.", - "SuspiciousLoginAttemptsInLastHourEmail2": "In order to safeguard your Matomo, we recommend taking the following precautions:", - "SuspiciousLoginAttemptsInLastHourEmail3": "Ensure your password is a secure, random password of an appropriate length (for example, at least 30 characters).", - "SuspiciousLoginAttemptsInLastHourEmail4": "Setup two-factor auth so attackers will need more information than just your password in order to login.", - "SuspiciousLoginAttemptsInLastHourEmail5": "Additionally, if your Matomo has a limited set of users or IPs through which users will access it, it may be beneficial to setup a IP address allowlist. %1$sRead our docs for more information.%2$s", - "LoginNotAllowedBecauseUserLoginBlocked": "Login functionality is temporarily disabled since we've a suspicious amount of failed login attempts in the last hour.", - "InvitationTitle": "Accept Invitation", - "InvitationDeclineTitle": "Decline Invitation", - "InvitationDeclineBody": "Are you sure you want to decline this Invitation?", - "InvitationHints": "(to cancel this action, just leave the page)", + "SuspiciousLoginAttemptsInLastHourEmailSubject": "Some suspicious login attempts were made using your username…", + "SuspiciousLoginAttemptsInLastHourEmail1": "A suspiciously high number of login attempts was made on your Matomo account the last hour. Specifically %1$s login attempts from %2$s distinct IP addresses. Someone may be trying to break into your account.", + "SuspiciousLoginAttemptsInLastHourEmail2": "Do the following:", + "SuspiciousLoginAttemptsInLastHourEmail3": "Ensure your password is a secure, random password of at least 30 characters.", + "SuspiciousLoginAttemptsInLastHourEmail4": "Set up two-factor authentication so attackers need more than just your password to log in.", + "SuspiciousLoginAttemptsInLastHourEmail5": "Set up a list of IP addresses to never block if your Matomo has a limited set of users or IPs users access it from. %1$sRead the docs for more info.%2$s", + "LoginNotAllowedBecauseUserLoginBlocked": "Logging in has been turned off since a suspicious amount of failed attempts were made during the last hour.", + "InvitationTitle": "Accept invitation", + "InvitationDeclineTitle": "Decline invitation", + "InvitationDeclineBody": "Decline this invitation?", + "InvitationHints": "(you can leave the page to cancel this action)", "Accept": "Accept", "Yes": "Yes", - "TermsRequired": "Please Accept the terms and conditions", - "PasswordRequired": "Please enter password to continue", - "declineInvitationInfo": "Your invitation has been decline." + "TermsRequired": "Please accept the terms and conditions", + "PasswordRequired": "Please enter your password to continue", + "declineInvitationInfo": "Your invitation was declined." } } diff --git a/plugins/Login/tests/Integration/PasswordResetterTest.php b/plugins/Login/tests/Integration/PasswordResetterTest.php index b6014aecff..250676eb49 100644 --- a/plugins/Login/tests/Integration/PasswordResetterTest.php +++ b/plugins/Login/tests/Integration/PasswordResetterTest.php @@ -1,4 +1,5 @@ <?php + /** * Matomo - free/libre analytics platform * @@ -8,7 +9,6 @@ namespace Piwik\Plugins\Login\tests\Integration; - use PHPMailer\PHPMailer\PHPMailer; use Piwik\Access; use Piwik\Auth; @@ -17,7 +17,6 @@ use Piwik\Option; use Piwik\Plugin\Manager; use Piwik\Tests\Framework\TestCase\IntegrationTestCase; use Piwik\Plugins\Login\PasswordResetter; -use Piwik\Plugins\UsersManager\Model; use Piwik\Tests\Framework\Fixture; /** @@ -28,11 +27,6 @@ class PasswordResetterTest extends IntegrationTestCase const NEWPASSWORD = 'newpassword'; /** - * @var Model - */ - private $userModel; - - /** * @var string */ private $capturedToken; @@ -46,20 +40,19 @@ class PasswordResetterTest extends IntegrationTestCase { parent::setUp(); $this->passwordResetter = new PasswordResetter(); - $this->userModel = new Model(); $this->capturedToken = null; Manager::getInstance()->loadPluginTranslations(); } - public function test_passwordReset_processWorksAsExpected() + public function testPasswordResetProcessWorksAsExpected() { $this->passwordResetter->setHashedPasswordForLogin('superUserLogin', $this->capturedToken); $this->checkPasswordIs(self::NEWPASSWORD); } - public function tests_passwordReset_worksUpToThreeTimesInAnHour() + public function testsPasswordResetWorksUpToThreeTimesInAnHour() { $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); @@ -74,10 +67,10 @@ class PasswordResetterTest extends IntegrationTestCase $this->assertNotEquals($token, $this->capturedToken); } - public function test_passwordReset_notAllowedMoreThanThreeTimesInAnHour() + public function testPasswordResetNotAllowedMoreThanThreeTimesInAnHour() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('You have requested too many password resets recently. A new request can be made in one hour. If you have problems resetting your password, please contact your administrator for help.'); + $this->expectExceptionMessage('You requested too many password resets recently. A new request can be made in one hour. Your administrator can help you if that doesn\'t work.'); $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); @@ -94,14 +87,14 @@ class PasswordResetterTest extends IntegrationTestCase $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); } - public function test_passwordReset_newRequestAllowedAfterAnHour() + public function testPasswordResetNewRequestAllowedAfterAnHour() { $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); $optionName = $this->passwordResetter->getPasswordResetInfoOptionName('superUserLogin'); $data = json_decode(Option::get($optionName), true); - $data['timestamp'] = time()-3601; + $data['timestamp'] = time() - 3601; $data['requests'] = 3; Option::set($optionName, json_encode($data)); @@ -117,10 +110,10 @@ class PasswordResetterTest extends IntegrationTestCase $this->assertEquals(1, $data['requests']); } - public function test_passwordReset_shouldNotAllowTokenToBeUsedMoreThanOnce() + public function testPasswordResetShouldNotAllowTokenToBeUsedMoreThanOnce() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Token is invalid or has expired'); + $this->expectExceptionMessage('The token is invalid or has expired.'); $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); $this->assertNotEmpty($this->capturedToken); @@ -137,7 +130,7 @@ class PasswordResetterTest extends IntegrationTestCase $this->passwordResetter->checkValidConfirmPasswordToken('superUserLogin', $oldCapturedToken); } - public function test_passwordReset_shouldNeverGenerateTheSameToken() + public function testPasswordResetShouldNeverGenerateTheSameToken() { $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); $this->assertNotEmpty($this->capturedToken); @@ -149,10 +142,10 @@ class PasswordResetterTest extends IntegrationTestCase $this->assertNotEquals($oldCapturedToken, $this->capturedToken); } - public function test_passwordReset_shouldNotAllowOldTokenToBeUsedAfterAnotherResetRequest() + public function testPasswordResetShouldNotAllowOldTokenToBeUsedAfterAnotherResetRequest() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Token is invalid or has expired'); + $this->expectExceptionMessage('The token is invalid or has expired.'); $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD); $this->assertNotEmpty($this->capturedToken); @@ -195,7 +188,7 @@ class PasswordResetterTest extends IntegrationTestCase ['Test.Mail.send', \DI\value(function (PHPMailer $mail) { $body = $mail->createBody(); $body = preg_replace("/=[\r\n]+/", '', $body); - preg_match('/resetToken=[\s]*3D([a-zA-Z0-9=\s]+)<\/p>/', $body, $matches); + preg_match('/resetToken=[\s]*3D([a-zA-Z0-9=\s]+)"/', $body, $matches); if (!empty($matches[1])) { $capturedToken = $matches[1]; $capturedToken = preg_replace('/=\s*/', '', $capturedToken); @@ -205,4 +198,4 @@ class PasswordResetterTest extends IntegrationTestCase ]), ]; } -}
\ No newline at end of file +} diff --git a/plugins/Login/tests/UI/Invite_spec.js b/plugins/Login/tests/UI/Invite_spec.js index d937f2c891..7eb791b337 100644 --- a/plugins/Login/tests/UI/Invite_spec.js +++ b/plugins/Login/tests/UI/Invite_spec.js @@ -31,8 +31,9 @@ describe('Invite', function () { await page.evaluate(function(){ $('#login_form_submit').click(); }); + await page.waitForNetworkIdle(); expect(await page.screenshot({ fullPage: true })).to.matchImage('wrong_password'); }); -});
\ No newline at end of file +}); diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js index dbbb4f326a..93ed3e3115 100644 --- a/plugins/Login/tests/UI/Login_spec.js +++ b/plugins/Login/tests/UI/Login_spec.js @@ -156,12 +156,12 @@ describe("Login", function () { var expectedMailOutputFile = PIWIK_INCLUDE_PATH + '/tmp/Login.resetPassword.mail.json', fileContents = require("fs").readFileSync(expectedMailOutputFile), mailSent = JSON.parse(fileContents), - resetUrl = mailSent.contents.match(/http:\/\/[^\s]+resetToken[^\s]+<\/p>/); + resetUrl = mailSent.contents.match(/http:\/\/[^"]+resetToken[^"]+"/); if (!resetUrl || !resetUrl[0]) { throw new Error(`Could not find reset URL in email, captured mail info: ${fileContents}`) } - resetUrl = resetUrl[0].replace(/<\/p>$/, ''); + resetUrl = resetUrl[0].replace(/\"$/, ''); resetUrl = await page.evaluate((resetUrl) => { return piwikHelper.htmlDecode(resetUrl); }, resetUrl); diff --git a/plugins/Login/tests/UI/expected-screenshots/Decline_default.png b/plugins/Login/tests/UI/expected-screenshots/Decline_default.png index fa9acf274f..9a4fe458f1 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Decline_default.png +++ b/plugins/Login/tests/UI/expected-screenshots/Decline_default.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4f71261c0c6e74cae66aba9d6749eb2e0852acb802349e573d35f38ad6a7861 -size 24210 +oid sha256:42adaabe0ae20e43f798ea9329da9fdf42f7fa4580c211217322829a82edd8cd +size 21548 diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_error.png b/plugins/Login/tests/UI/expected-screenshots/Invite_error.png index 5d5cc8fcd4..311289f3c7 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Invite_error.png +++ b/plugins/Login/tests/UI/expected-screenshots/Invite_error.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c273f68c05b5c8398aa2248a92633bc83b5209188b859d173d76be5a3d96f630 -size 40102 +oid sha256:35af886df3b8305375a45659de2f14af79fec9903a81642e18e193853ed52f28 +size 40378 diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png b/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png index 4979ed5066..fe50344e56 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png +++ b/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d59911d79ef8cf203efa7a7d64024fe66c9c655dcf6ec32900954be7d9e7b494 -size 27166 +oid sha256:fab1147e5e81c984bb699b6ba3e50800c868c24498d0a6e5e2a5e21a643e534b +size 27319 diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png b/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png index ac1265c02a..84f56b0b3c 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png +++ b/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a8c371e544e1964269b1d6200e933a719a47a6b3dcba01549588dc67bb2f3ea -size 32681 +oid sha256:e52c0b45c5834cab0cb921a6d07cda995f0cfce71c2540832a977e7d01b84e75 +size 32893 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png index 7d1919e08f..2e6fc6190a 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96d146d0451779db1b91b233b8e65a36406a096339ad3138ac3b6d693968f785 -size 13253 +oid sha256:eb616d5e970ca099978cdbe65bd2b35087c49c1beef846e9a890af094f7c1de2 +size 12385 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png index 9a42cde0a9..5e8296fdd2 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517 -size 48163 +oid sha256:77893976b0db582a288fe8e1e0f1f87e23f3b1c76885227c0a3c662dad12a5e0 +size 43148 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png index 9a42cde0a9..5e8296fdd2 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517 -size 48163 +oid sha256:77893976b0db582a288fe8e1e0f1f87e23f3b1c76885227c0a3c662dad12a5e0 +size 43148 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png index 1f0b84b090..73fe1d8e3a 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47b698f988ed27aa73e26ccc1036a2e19b12d21ef491c052be52944745c84279 -size 50753 +oid sha256:873eb18f0f551f70504cdfa0b3f7e2eb05b564f3fd809fe5f880f06a1599099f +size 48843 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png index 175f65bf48..3dd901097d 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f63bd20d066b619e26f486525bf565cb03a263432f864179d71cb249521d5a5 -size 68011 +oid sha256:d63af0574b2fd491127a6daadeb92165436f65916517059a513e754698a4c908 +size 61832 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png index 2525c91025..64ab28507f 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3ace83bcac411282ada8a81a209c30e70d3ea70f0db03ff6c06b889d6c60d58 -size 29973 +oid sha256:87d82e89940d56e08a67944a5c5cb484cbff393619d4aa5d0949d3a57fbcd4be +size 30014 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png index 435afa8475..606d062e4d 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79c147975d2d9560ba63653449e0f2f0aabe58557bb4cd1dedaa9bcf376d6fd4 -size 32041 +oid sha256:6bc910d3325eaffa8fa7043037510e0d5362ffc64fce1481f5cca9a6c021ba97 +size 30851 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png index 0e8689e442..7e64ae2ca3 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc -size 24653 +oid sha256:5125795ee575cb102187586db5797559240b09d3978df194d7e6dadde6e1d6b7 +size 24720 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png index 0e8689e442..7e64ae2ca3 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc -size 24653 +oid sha256:5125795ee575cb102187586db5797559240b09d3978df194d7e6dadde6e1d6b7 +size 24720 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png index 02ff47119b..334c20cda0 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a746bb9a3c3ce0d903932b0b9f02e5c023ce0eabd0ca4630dfa4f73681d8386e -size 35075 +oid sha256:201f7f23022bfb14f7474396dc33d613078d4e4915efd0050d493cf36fecc66a +size 29560 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png index 444c34ef1c..06fd0ec25d 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75c01e8424d84fcffd001bdc461150ddc599f1442b509c8279443289296f8d8f -size 29322 +oid sha256:858980e823577ccdad8e1cea514a39a872bacba86e6b0e8f66710a273ef13536 +size 30290 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png index a8d316b14b..76295dc9c4 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1dc84be8b6ff77a388fb1f32ab9264a2f3b55f103117b2f697dd9fd6d4f00e3 -size 34453 +oid sha256:bde70cb6b9bca8218f971e119f7296134d4fadb46168ff861293f9d5d6f6afa6 +size 32022 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png index 5518708478..22bad72450 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e06a70d46e00b5b3ee12f67c404302873240d432d704d8ece727c495b8d1591f -size 38921 +oid sha256:a90a83ff3dba45d0787c1436af0a251f77afb19497374273b58665ce303a4d07 +size 38980 diff --git a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png index 1f36d7d639..c91bc90680 100644 --- a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png +++ b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cad0d53718fdf9e776a22b2f0a1c9ced6b710585e085789e697f7a4f725f2af -size 31950 +oid sha256:af33441214d2a2991128f71af2195ddb1289a18440490534a7bc4d976f1c547c +size 31992 diff --git a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png index 84a2b2ae4b..ddba3053e9 100644 --- a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png +++ b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c943113aa506b42f3055fd2735fefd42adeebdc53941039f4525d968d69bbc2e -size 34156 +oid sha256:94a563127cc9f1d4c33cd89772dfc3302040cb4f6be2d49780fcae88d81d8d05 +size 34207 diff --git a/plugins/MarketingCampaignsReporting b/plugins/MarketingCampaignsReporting -Subproject 479a6dc319e1667bc0b4b3ba7597c62657a5920 +Subproject 10bb85e1b8cd3d6e7ee8893f93c1199e11d209b diff --git a/plugins/PrivacyManager/tests/System/expected/test_allSites__Live.getLastVisitsDetails_year.xml b/plugins/PrivacyManager/tests/System/expected/test_allSites__Live.getLastVisitsDetails_year.xml index bc1a7fd9ff..9e0bf75fea 100644 --- a/plugins/PrivacyManager/tests/System/expected/test_allSites__Live.getLastVisitsDetails_year.xml +++ b/plugins/PrivacyManager/tests/System/expected/test_allSites__Live.getLastVisitsDetails_year.xml @@ -16,6 +16,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -370,6 +373,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -537,6 +543,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -725,6 +734,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -890,6 +902,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1228,6 +1243,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1412,6 +1430,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1579,6 +1600,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -1933,6 +1957,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2100,6 +2127,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2288,6 +2318,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2453,6 +2486,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2791,6 +2827,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -2975,6 +3014,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3142,6 +3184,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3496,6 +3541,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3663,6 +3711,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -3851,6 +3902,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4016,6 +4070,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4354,6 +4411,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4538,6 +4598,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4705,6 +4768,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -4851,6 +4917,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5372,6 +5441,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5634,6 +5706,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -5780,6 +5855,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6301,6 +6379,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6563,6 +6644,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -6709,6 +6793,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -7230,6 +7317,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -15435,6 +15525,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -15602,6 +15695,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -15769,6 +15865,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -16109,6 +16208,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -16449,6 +16551,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -16789,6 +16894,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -18522,6 +18630,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -18876,6 +18987,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -19043,6 +19157,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -19231,6 +19348,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -19396,6 +19516,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -19734,6 +19857,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -19918,6 +20044,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -20085,6 +20214,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -20231,6 +20363,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -20752,6 +20887,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -23623,6 +23761,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -23963,6 +24104,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -24652,6 +24796,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -25006,6 +25153,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -25173,6 +25323,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -25361,6 +25514,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -25526,6 +25682,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -25864,6 +26023,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -26048,6 +26210,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -26215,6 +26380,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -26569,6 +26737,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -26736,6 +26907,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -26924,6 +27098,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -27089,6 +27266,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -27427,6 +27607,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -27611,6 +27794,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -27778,6 +27964,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -27924,6 +28113,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -28445,6 +28637,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -28707,6 +28902,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -28853,6 +29051,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -29374,6 +29575,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -34854,6 +35058,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -35021,6 +35228,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -35361,6 +35571,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -35701,6 +35914,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -36912,6 +37128,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world200</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -37266,6 +37485,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world202</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -37433,6 +37655,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world203</url> + <referrerType>website</referrerType> + <referrerName>www.innocraft.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -37621,6 +37846,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world205</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -37786,6 +38014,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world206</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -38124,6 +38355,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world209</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -38308,6 +38542,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -38475,6 +38712,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world201</url> + <referrerType>website</referrerType> + <referrerName>www.example.com</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -38621,6 +38861,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world204</url> + <referrerType>website</referrerType> + <referrerName>developer.matomo.org</referrerName> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -39142,6 +39385,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world210</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -42071,6 +42317,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> @@ -42411,6 +42660,9 @@ <goalPageId /> <url>http://www.helloworld.com/hello/world211</url> + <referrerType>direct</referrerType> + <referrerName /> + <referrerKeyword /> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> <title>Goal conversion</title> diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js index dbbbb63cef..de96dcb7fa 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js @@ -1686,36 +1686,36 @@ var ReportDeletionSettings_store_ReportDeletionSettingsStore = /*#__PURE__*/func }(); /* harmony default export */ var ReportDeletionSettings_store = (new ReportDeletionSettings_store_ReportDeletionSettingsStore()); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue?vue&type=template&id=2d91a21d +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue?vue&type=template&id=6e8611e8 -var DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_1 = { +var DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_1 = { id: "formDeleteSettings" }; -var DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_2 = { +var DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_2 = { id: "deleteLogSettingEnabled" }; -var DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_3 = { +var DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_3 = { class: "alert alert-warning deleteOldLogsWarning", style: { "width": "50%" } }; -var DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_4 = { - href: "https://matomo.org/faq/general/#faq_125", +var DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_4 = { + href: "https://matomo.org/faq/general/faq_125", rel: "noreferrer noopener", target: "_blank" }; -var DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_5 = { +var DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_5 = { id: "deleteLogSettings" }; -function DeleteOldLogsvue_type_template_id_2d91a21d_render(_ctx, _cache, $props, $setup, $data, $options) { +function DeleteOldLogsvue_type_template_id_6e8611e8_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton"); var _directive_form = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("form"); - 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", DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + 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", DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "checkbox", name: "deleteEnable", "model-value": _ctx.enabled, @@ -1726,7 +1726,7 @@ function DeleteOldLogsvue_type_template_id_2d91a21d_render(_ctx, _cache, $props, }), title: _ctx.translate('PrivacyManager_UseDeleteLog'), "inline-help": _ctx.translate('PrivacyManager_DeleteRawDataInfo') - }, null, 8, ["model-value", "title", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ClickHere')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.enabled]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_2d91a21d_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["model-value", "title", "inline-help"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ClickHere')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.enabled]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DeleteOldLogsvue_type_template_id_6e8611e8_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "deleteOlderThan", "model-value": _ctx.deleteOlderThan, @@ -1744,7 +1744,7 @@ function DeleteOldLogsvue_type_template_id_2d91a21d_render(_ctx, _cache, $props, saving: _ctx.isLoading }, null, 8, ["saving"])], 512)), [[_directive_form]]); } -// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue?vue&type=template&id=2d91a21d +// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue?vue&type=template&id=6e8611e8 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue?vue&type=script&lang=ts @@ -1839,7 +1839,7 @@ var DeleteOldLogsvue_type_script_lang_ts_window = window, -DeleteOldLogsvue_type_script_lang_ts.render = DeleteOldLogsvue_type_template_id_2d91a21d_render +DeleteOldLogsvue_type_script_lang_ts.render = DeleteOldLogsvue_type_template_id_6e8611e8_render /* harmony default export */ var DeleteOldLogs = (DeleteOldLogsvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/PrivacyManager/vue/src/DeleteOldReports/DeleteOldReports.vue?vue&type=template&id=0a48298a diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js index 9794a3ddfd..93071a1669 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Dt=function(){function e(){var t=this;ft(this,e),St(this,"privateState",Object(i["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),St(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),St(this,"enableDeleteReports",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteReports}))),St(this,"enableDeleteLogs",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteLogs}))),St(this,"currentRequest",void 0)}return Vt(e,[{key:"updateSettings",value:function(e){this.initSettings(e),this.privateState.isModified=!0}},{key:"initSettings",value:function(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}},{key:"savePurgeDataSettings",value:function(e,t){return this.privateState.isModified=!1,X["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"})).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)}))}},{key:"isEitherDeleteSectionEnabled",value:function(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}},{key:"isManualEstimationLinkShowing",value:function(){return window.$("#getPurgeEstimateLink").length>0}},{key:"reloadDbStats",value:function(e){var t=this;if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),e||this.isEitherDeleteSectionEnabled()&&!this.isManualEstimationLinkShowing()){this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;var n=this.privateState.settings,a=Object.assign(Object.assign({},n),{},{enableDeleteLogs:n.enableDeleteLogs?"1":"0",enableDeleteReports:n.enableDeleteReports?"1":"0"});!0===e&&(a.forceEstimate=1),this.currentRequest=new AbortController,X["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},a,{abortController:this.currentRequest,format:"html"}).then((function(e){t.privateState.estimation=e,t.privateState.showEstimate=!0,t.privateState.loadingEstimation=!1})).finally((function(){t.currentRequest=void 0,t.privateState.loadingEstimation=!1}))}}}]),e}(),Nt=new Dt,Et={id:"formDeleteSettings"},Ct={id:"deleteLogSettingEnabled"},kt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},_t={href:"https://matomo.org/faq/general/#faq_125",rel:"noreferrer noopener",target:"_blank"},Pt={id:"deleteLogSettings"};function wt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Et,[Object(i["createElementVNode"])("div",Ct,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",kt,[Object(i["createElementVNode"])("a",_t,Object(i["toDisplayString"])(e.translate("General_ClickHere")),1)],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Pt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[2]||(t[2]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Mt=window,At=Mt.$,zt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:"1"===this.deleteData.config.delete_logs_enable,deleteOlderThan:this.deleteData.config.delete_logs_older_than}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteLogsConfirm";Nt.enableDeleteReports.value&&(t="deleteBothConfirm"),At("#confirmDeleteSettings").find(">h2").hide(),At("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle:function(){return"".concat(Object(X["translate"])("PrivacyManager_DeleteLogsOlderThan")," (").concat(Object(X["translate"])("Intl_PeriodDays"),")")}}});zt.render=wt;var It=zt,Ft={id:"formDeleteSettings"},Tt={id:"deleteReportsSettingEnabled"},xt={class:"alert alert-warning",style:{width:"50%"}},Lt=Object(i["createElementVNode"])("br",null,null,-1),Bt=Object(i["createElementVNode"])("br",null,null,-1),Ut={id:"deleteReportsSettings"};function Rt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ft,[Object(i["createElementVNode"])("div",Tt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",xt,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),Lt,Bt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ut,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.keepDataForMonth=t,e.reloadDbStats()}),title:"".concat(e.translate("General_MonthlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.keepDataForYear=t,e.reloadDbStats()}),title:"".concat(e.translate("General_YearlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=function(t){e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function Ht(e){return e?"1":"0"}var Gt=window,qt=Gt.$,Kt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_reports_enable,10),deleteOlderThan:this.deleteData.config.delete_reports_older_than,keepBasic:1===parseInt(this.deleteData.config.delete_reports_keep_basic_metrics,10),keepDataForDay:1===parseInt(this.deleteData.config.delete_reports_keep_day_reports,10),keepDataForWeek:1===parseInt(this.deleteData.config.delete_reports_keep_week_reports,10),keepDataForMonth:1===parseInt(this.deleteData.config.delete_reports_keep_month_reports,10),keepDataForYear:1===parseInt(this.deleteData.config.delete_reports_keep_year_reports,10),keepDataForRange:1===parseInt(this.deleteData.config.delete_reports_keep_range_reports,10),keepDataForSegments:1===parseInt(this.deleteData.config.delete_reports_keep_segment_reports,10)}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteReportsConfirm";Nt.enableDeleteLogs.value&&(t="deleteBothConfirm"),qt("#confirmDeleteSettings").find(">h2").hide(),qt("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:Ht(this.keepBasic),keepDay:Ht(this.keepDataForDay),keepWeek:Ht(this.keepDataForWeek),keepMonth:Ht(this.keepDataForMonth),keepYear:Ht(this.keepDataForYear),keepRange:Ht(this.keepDataForRange),keepSegments:Ht(this.keepDataForSegments)}},deleteOldLogsText:function(){return Object(X["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle:function(){var e=Object(X["translate"])("PrivacyManager_DeleteReportsOlderThan");return"".concat(e," (").concat(Object(X["translate"])("Intl_PeriodMonths"),")")},deleteReportsKeepBasicTitle:function(){var e=Object(X["translate"])("PrivacyManager_KeepBasicMetrics");return"".concat(e," (").concat(Object(X["translate"])("General_Recommended"),")")}}});Kt.render=Rt;var Wt=Kt,$t={id:"formDeleteSettings"},Yt={id:"deleteSchedulingSettings"},Jt={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},Qt={key:0},Xt=Object(i["createElementVNode"])("br",null,null,-1),Zt=Object(i["createElementVNode"])("br",null,null,-1),en=Object(i["createElementVNode"])("br",null,null,-1),tn=Object(i["createElementVNode"])("br",null,null,-1),nn={key:0,id:"deleteDataEstimateSect",class:"form-group row"},an={class:"col s12",id:"databaseSizeHeadline"},on={class:"col s12 m6"},ln=["innerHTML"],rn=Object(i["createTextVNode"])("Â "),cn={class:"col s12 m6"},sn={key:0,class:"form-help"};function dn(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("ContentBlock"),u=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",$t,[Object(i["withDirectives"])(Object(i["createVNode"])(d,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Yt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.deleteLowestInterval=t}),options:e.scheduleDeletionOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Jt,[e.deleteData.lastRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Qt,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),Xt,Zt])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),en,tn,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=function(t){return e.executeDataPurgeNow()})},Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[i["vShow"],e.showPurgeNowLink]]),Object(i["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"db-purged-message"},Object(i["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[i["vShow"],e.dataWasPurged]])])]})),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",nn,[Object(i["createElementVNode"])("h3",an,Object(i["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(i["createElementVNode"])("div",on,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,ln),[[i["vShow"],e.showEstimate]]),rn,Object(i["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(i["createElementVNode"])("div",cn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",sn,[Object(i["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(i["withModifiers"])((function(t){return e.getPurgeEstimate()}),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])]})),_:1},8,["content-title"]),[[i["vShow"],e.isEitherDeleteSectionEnabled]])],512)),[[u]])}var un=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:X["ContentBlock"],ActivityIndicator:X["ActivityIndicator"],Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval}},methods:{save:function(){var e="PrivacyManager.setScheduleReportDeletionSettings";Nt.savePurgeDataSettings(e,{deleteLowestInterval:this.deleteLowestInterval})},executeDataPurgeNow:function(){var e=this;Nt.state.value.isModified?X["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:function(){return null}}):X["Matomo"].helper.modalConfirm("#confirmPurgeNow",{yes:function(){e.loadingDataPurge=!0,e.showPurgeNowLink=!1,X["AjaxHelper"].fetch({module:"PrivacyManager",action:"executeDataPurge",format:"html"},{withTokenInUrl:!0}).then((function(){Nt.reloadDbStats(),e.dataWasPurged=!0,setTimeout((function(){e.dataWasPurged=!1,e.showPurgeNowLink=!0}),2e3)})).finally((function(){e.loadingDataPurge=!1}))}})},getPurgeEstimate:function(){return Nt.reloadDbStats(!0)}},computed:{showEstimate:function(){return Nt.state.value.showEstimate},isEitherDeleteSectionEnabled:function(){return Nt.isEitherDeleteSectionEnabled()},estimation:function(){return Nt.state.value.estimation},loadingEstimation:function(){return Nt.state.value.loadingEstimation}}});un.render=dn;var mn=un; + */var Dt=function(){function e(){var t=this;ft(this,e),St(this,"privateState",Object(i["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),St(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),St(this,"enableDeleteReports",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteReports}))),St(this,"enableDeleteLogs",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteLogs}))),St(this,"currentRequest",void 0)}return Vt(e,[{key:"updateSettings",value:function(e){this.initSettings(e),this.privateState.isModified=!0}},{key:"initSettings",value:function(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}},{key:"savePurgeDataSettings",value:function(e,t){return this.privateState.isModified=!1,X["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"})).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)}))}},{key:"isEitherDeleteSectionEnabled",value:function(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}},{key:"isManualEstimationLinkShowing",value:function(){return window.$("#getPurgeEstimateLink").length>0}},{key:"reloadDbStats",value:function(e){var t=this;if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),e||this.isEitherDeleteSectionEnabled()&&!this.isManualEstimationLinkShowing()){this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;var n=this.privateState.settings,a=Object.assign(Object.assign({},n),{},{enableDeleteLogs:n.enableDeleteLogs?"1":"0",enableDeleteReports:n.enableDeleteReports?"1":"0"});!0===e&&(a.forceEstimate=1),this.currentRequest=new AbortController,X["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},a,{abortController:this.currentRequest,format:"html"}).then((function(e){t.privateState.estimation=e,t.privateState.showEstimate=!0,t.privateState.loadingEstimation=!1})).finally((function(){t.currentRequest=void 0,t.privateState.loadingEstimation=!1}))}}}]),e}(),Nt=new Dt,Et={id:"formDeleteSettings"},Ct={id:"deleteLogSettingEnabled"},kt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},_t={href:"https://matomo.org/faq/general/faq_125",rel:"noreferrer noopener",target:"_blank"},Pt={id:"deleteLogSettings"};function wt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Et,[Object(i["createElementVNode"])("div",Ct,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",kt,[Object(i["createElementVNode"])("a",_t,Object(i["toDisplayString"])(e.translate("General_ClickHere")),1)],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Pt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[2]||(t[2]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Mt=window,At=Mt.$,zt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:"1"===this.deleteData.config.delete_logs_enable,deleteOlderThan:this.deleteData.config.delete_logs_older_than}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteLogsConfirm";Nt.enableDeleteReports.value&&(t="deleteBothConfirm"),At("#confirmDeleteSettings").find(">h2").hide(),At("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle:function(){return"".concat(Object(X["translate"])("PrivacyManager_DeleteLogsOlderThan")," (").concat(Object(X["translate"])("Intl_PeriodDays"),")")}}});zt.render=wt;var It=zt,Ft={id:"formDeleteSettings"},Tt={id:"deleteReportsSettingEnabled"},xt={class:"alert alert-warning",style:{width:"50%"}},Lt=Object(i["createElementVNode"])("br",null,null,-1),Bt=Object(i["createElementVNode"])("br",null,null,-1),Ut={id:"deleteReportsSettings"};function Rt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ft,[Object(i["createElementVNode"])("div",Tt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",xt,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),Lt,Bt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ut,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.keepDataForMonth=t,e.reloadDbStats()}),title:"".concat(e.translate("General_MonthlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.keepDataForYear=t,e.reloadDbStats()}),title:"".concat(e.translate("General_YearlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=function(t){e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function Ht(e){return e?"1":"0"}var Gt=window,qt=Gt.$,Kt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_reports_enable,10),deleteOlderThan:this.deleteData.config.delete_reports_older_than,keepBasic:1===parseInt(this.deleteData.config.delete_reports_keep_basic_metrics,10),keepDataForDay:1===parseInt(this.deleteData.config.delete_reports_keep_day_reports,10),keepDataForWeek:1===parseInt(this.deleteData.config.delete_reports_keep_week_reports,10),keepDataForMonth:1===parseInt(this.deleteData.config.delete_reports_keep_month_reports,10),keepDataForYear:1===parseInt(this.deleteData.config.delete_reports_keep_year_reports,10),keepDataForRange:1===parseInt(this.deleteData.config.delete_reports_keep_range_reports,10),keepDataForSegments:1===parseInt(this.deleteData.config.delete_reports_keep_segment_reports,10)}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteReportsConfirm";Nt.enableDeleteLogs.value&&(t="deleteBothConfirm"),qt("#confirmDeleteSettings").find(">h2").hide(),qt("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:Ht(this.keepBasic),keepDay:Ht(this.keepDataForDay),keepWeek:Ht(this.keepDataForWeek),keepMonth:Ht(this.keepDataForMonth),keepYear:Ht(this.keepDataForYear),keepRange:Ht(this.keepDataForRange),keepSegments:Ht(this.keepDataForSegments)}},deleteOldLogsText:function(){return Object(X["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle:function(){var e=Object(X["translate"])("PrivacyManager_DeleteReportsOlderThan");return"".concat(e," (").concat(Object(X["translate"])("Intl_PeriodMonths"),")")},deleteReportsKeepBasicTitle:function(){var e=Object(X["translate"])("PrivacyManager_KeepBasicMetrics");return"".concat(e," (").concat(Object(X["translate"])("General_Recommended"),")")}}});Kt.render=Rt;var Wt=Kt,$t={id:"formDeleteSettings"},Yt={id:"deleteSchedulingSettings"},Jt={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},Qt={key:0},Xt=Object(i["createElementVNode"])("br",null,null,-1),Zt=Object(i["createElementVNode"])("br",null,null,-1),en=Object(i["createElementVNode"])("br",null,null,-1),tn=Object(i["createElementVNode"])("br",null,null,-1),nn={key:0,id:"deleteDataEstimateSect",class:"form-group row"},an={class:"col s12",id:"databaseSizeHeadline"},on={class:"col s12 m6"},ln=["innerHTML"],rn=Object(i["createTextVNode"])("Â "),cn={class:"col s12 m6"},sn={key:0,class:"form-help"};function dn(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("ContentBlock"),u=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",$t,[Object(i["withDirectives"])(Object(i["createVNode"])(d,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Yt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.deleteLowestInterval=t}),options:e.scheduleDeletionOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Jt,[e.deleteData.lastRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Qt,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),Xt,Zt])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),en,tn,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=function(t){return e.executeDataPurgeNow()})},Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[i["vShow"],e.showPurgeNowLink]]),Object(i["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"db-purged-message"},Object(i["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[i["vShow"],e.dataWasPurged]])])]})),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",nn,[Object(i["createElementVNode"])("h3",an,Object(i["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(i["createElementVNode"])("div",on,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,ln),[[i["vShow"],e.showEstimate]]),rn,Object(i["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(i["createElementVNode"])("div",cn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",sn,[Object(i["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(i["withModifiers"])((function(t){return e.getPurgeEstimate()}),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])]})),_:1},8,["content-title"]),[[i["vShow"],e.isEitherDeleteSectionEnabled]])],512)),[[u]])}var un=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:X["ContentBlock"],ActivityIndicator:X["ActivityIndicator"],Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval}},methods:{save:function(){var e="PrivacyManager.setScheduleReportDeletionSettings";Nt.savePurgeDataSettings(e,{deleteLowestInterval:this.deleteLowestInterval})},executeDataPurgeNow:function(){var e=this;Nt.state.value.isModified?X["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:function(){return null}}):X["Matomo"].helper.modalConfirm("#confirmPurgeNow",{yes:function(){e.loadingDataPurge=!0,e.showPurgeNowLink=!1,X["AjaxHelper"].fetch({module:"PrivacyManager",action:"executeDataPurge",format:"html"},{withTokenInUrl:!0}).then((function(){Nt.reloadDbStats(),e.dataWasPurged=!0,setTimeout((function(){e.dataWasPurged=!1,e.showPurgeNowLink=!0}),2e3)})).finally((function(){e.loadingDataPurge=!1}))}})},getPurgeEstimate:function(){return Nt.reloadDbStats(!0)}},computed:{showEstimate:function(){return Nt.state.value.showEstimate},isEitherDeleteSectionEnabled:function(){return Nt.isEitherDeleteSectionEnabled()},estimation:function(){return Nt.state.value.estimation},loadingEstimation:function(){return Nt.state.value.loadingEstimation}}});un.render=dn;var mn=un; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue b/plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue index a93ae8d7d9..9b289749b9 100644 --- a/plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue +++ b/plugins/PrivacyManager/vue/src/DeleteOldLogs/DeleteOldLogs.vue @@ -27,7 +27,7 @@ v-show="enabled" > <a - href="https://matomo.org/faq/general/#faq_125" + href="https://matomo.org/faq/general/faq_125" rel="noreferrer noopener" target="_blank" > diff --git a/plugins/QueuedTracking b/plugins/QueuedTracking -Subproject 1d355279e8daf2212c90f22af8d451571ddf717 +Subproject 5d298fc57341e2eb975b022dc075be6fdbc8f82 diff --git a/plugins/Referrers/SearchEngine.php b/plugins/Referrers/SearchEngine.php index 9663ab9757..bc75d19aa7 100644 --- a/plugins/Referrers/SearchEngine.php +++ b/plugins/Referrers/SearchEngine.php @@ -487,7 +487,7 @@ class SearchEngine extends Singleton public function getBackLinkFromUrlAndKeyword($url, $keyword) { if ($keyword === API::LABEL_KEYWORD_NOT_DEFINED) { - return 'https://matomo.org/faq/general/#faq_144'; + return 'https://matomo.org/faq/general/faq_144'; } $keyword = urlencode($keyword); $keyword = str_replace(urlencode('+'), urlencode(' '), $keyword); diff --git a/plugins/Referrers/tests/Integration/ReferrerAttributionTest.php b/plugins/Referrers/tests/Integration/ReferrerAttributionTest.php new file mode 100644 index 0000000000..e549bace58 --- /dev/null +++ b/plugins/Referrers/tests/Integration/ReferrerAttributionTest.php @@ -0,0 +1,419 @@ +<?php + +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +namespace Piwik\Plugins\Referrers\tests\Integration; + +use Piwik\Common; +use Piwik\Db; +use Piwik\Plugins\SitesManager\API as SitesManagerAPI; +use Piwik\Tests\Framework\Fixture; +use Piwik\Tests\Framework\TestCase\IntegrationTestCase; +use Piwik\Tests\Framework\TestingEnvironmentVariables; + +/** + * @group Referrers + * @group ReferrerAttribution + * @group Plugins + */ +class ReferrerAttributionTest extends IntegrationTestCase +{ + public static $directEntryReferrer = [ + 'siteUrl' => '', + 'referrerUrl' => '', + 'referrerName' => '', + 'referrerKeyword' => '', + 'referrerType' => Common::REFERRER_TYPE_DIRECT_ENTRY, + 'attributionCookieValues' => [], + ]; + + public static $websiteReferrer = [ + 'siteUrl' => 'https://de.wikipedia.org/', + 'referrerUrl' => 'https://de.wikipedia.org/wiki/Matomo', + 'referrerName' => 'de.wikipedia.org', + 'referrerKeyword' => '', + 'referrerType' => Common::REFERRER_TYPE_WEBSITE, + 'attributionCookieValues' => ['_ref' => 'https://de.wikipedia.org/wiki/Matomo'], + ]; + + public static $websiteReferrer2 = [ + 'siteUrl' => 'https://payment.provider.info/', + 'referrerUrl' => 'https://payment.provider.info/success', + 'referrerName' => 'payment.provider.info', + 'referrerKeyword' => '', + 'referrerType' => Common::REFERRER_TYPE_WEBSITE, + 'attributionCookieValues' => ['_ref' => 'https://payment.provider.info/success'], + ]; + + public static $searchEngineReferrer = [ + 'siteUrl' => 'https://www.google.com/', + 'referrerUrl' => 'https://www.google.com/search?q=matomo', + 'referrerName' => 'Google', + 'referrerKeyword' => 'matomo', + 'referrerType' => Common::REFERRER_TYPE_SEARCH_ENGINE, + 'attributionCookieValues' => ['_ref' => 'https://www.google.com/search?q=matomo'], + ]; + + public static $searchEngineReferrer2 = [ + 'siteUrl' => 'https://www.bing.com/', + 'referrerUrl' => 'https://www.bing.com/search?q=matomo', + 'referrerName' => 'Bing', + 'referrerKeyword' => 'matomo', + 'referrerType' => Common::REFERRER_TYPE_SEARCH_ENGINE, + 'attributionCookieValues' => ['_ref' => 'https://www.bing.com/search?q=matomo'], + ]; + + public static $socialNetworkReferrer = [ + 'siteUrl' => 'https://twitter.com/', + 'referrerUrl' => 'https://twitter.com/matomo_org', + 'referrerName' => 'Twitter', + 'referrerKeyword' => '', + 'referrerType' => Common::REFERRER_TYPE_SOCIAL_NETWORK, + 'attributionCookieValues' => ['_ref' => 'https://twitter.com/matomo_org'], + ]; + + public static $socialNetworkReferrer2 = [ + 'siteUrl' => 'https://l.instagram.com/', + 'referrerUrl' => 'https://l.instagram.com/?u=https%3A%2F%2Fexample.com%2Fexample.com', + 'referrerName' => 'Instagram', + 'referrerKeyword' => '', + 'referrerType' => Common::REFERRER_TYPE_SOCIAL_NETWORK, + 'attributionCookieValues' => ['_ref' => 'https://l.instagram.com/?u=https%3A%2F%2Fexample.com%2Fexample.com'], + ]; + + public static $campaignReferrer = [ + 'siteUrl' => 'https://some.external.page/', + 'referrerUrl' => 'https://some.external.page/referrer', + 'campaignParameters' => 'pk_campaign=Campaign%20Name&pk_kwd=Campaign%20Keyword', + 'referrerName' => 'campaign name', + 'referrerKeyword' => 'campaign keyword', + 'referrerType' => Common::REFERRER_TYPE_CAMPAIGN, + 'attributionCookieValues' => [ + '_rcn' => 'Campaign Name', + '_rck' => 'Campaign Keyword', + ], + ]; + + public static $campaignReferrer2 = [ + 'siteUrl' => 'https://some.other.page/', + 'referrerUrl' => 'https://some.other.page/path', + 'campaignParameters' => 'pk_campaign=Another%20Name&pk_kwd=Another%20Keyword', + 'referrerName' => 'another name', + 'referrerKeyword' => 'another keyword', + 'referrerType' => Common::REFERRER_TYPE_CAMPAIGN, + 'attributionCookieValues' => [ + '_rcn' => 'Another Name', + '_rck' => 'Another Keyword', + ], + ]; + + /** + * @dataProvider getReferrerAttributionUsingLastReferrerTestCases + */ + public function testReferrerAttributionUsingLastReferrer( + array $initialReferrer, + ?array $initialReferrerAttributionCookieValues, + array $secondReferrer, + ?array $referrerAttributionCookieValuesAfterReturn, + bool $createNewVisitWhenWebsiteReferrerChanges, + bool $addSecondReferrerAsSiteUrl, + bool $createNewVisitWhenCampaignChanges + ) { + $env = new TestingEnvironmentVariables(); + $env->overrideConfig('Tracker', 'create_new_visit_when_website_referrer_changes', (int) $createNewVisitWhenWebsiteReferrerChanges); + $env->overrideConfig('Tracker', 'create_new_visit_when_campaign_changes', (int) $createNewVisitWhenCampaignChanges); + $env->save(); + + $idSite = Fixture::createWebsite('2020-01-01 02:00:00', true, 'test', 'https://matomo.org/'); + + if ($addSecondReferrerAsSiteUrl) { + SitesManagerAPI::getInstance()->addSiteAliasUrls($idSite, $secondReferrer['siteUrl']); + } + + $tracker = Fixture::getTracker($idSite, '2020-01-01 05:00:00'); + + $referrerAttributionCookieValues = $initialReferrerAttributionCookieValues + ? $initialReferrerAttributionCookieValues['attributionCookieValues'] + : []; + + // Visitor enters page + $tracker->setUrlReferrer($initialReferrer['referrerUrl']); + // attach referrer attribution cookie values if any + $this->setReferrerAttributionCookieValuesToTracker($tracker, $referrerAttributionCookieValues); + $url = 'https://matomo.org/'; + if (isset($initialReferrer['campaignParameters'])) { + $url .= '?' . $initialReferrer['campaignParameters']; + } + $tracker->setUrl($url); + Fixture::checkResponse($tracker->doTrackPageView('Home')); + + // check that the visit is attributed correctly + $this->assertVisitReferrers([$this->buildVisit(1, 1, $initialReferrer)]); + + if ($referrerAttributionCookieValuesAfterReturn) { + $referrerAttributionCookieValues = $referrerAttributionCookieValuesAfterReturn['attributionCookieValues']; + } + + // Now the visitor returns from a service + $tracker->setForceVisitDateTime('2020-01-01 05:04:38'); + // attach referrer attribution cookie values if any + $this->setReferrerAttributionCookieValuesToTracker($tracker, $referrerAttributionCookieValues); + $tracker->setUrlReferrer($secondReferrer['referrerUrl']); + $url = 'https://matomo.org/order/payed?paymentid=1337'; + if (isset($secondReferrer['campaignParameters'])) { + $url .= '&' . $secondReferrer['campaignParameters']; + } + $tracker->setUrl($url); + Fixture::checkResponse($tracker->doTrackPageView('Order payed')); + + $shouldCreateNewVisit = false; + + $visitReferrer = $initialReferrer; + + if ( + ( + $initialReferrer['referrerType'] === Common::REFERRER_TYPE_DIRECT_ENTRY + || $initialReferrer === $referrerAttributionCookieValuesAfterReturn + ) + && $referrerAttributionCookieValuesAfterReturn !== null + && $referrerAttributionCookieValuesAfterReturn['referrerType'] === Common::REFERRER_TYPE_CAMPAIGN + ) { + $visitReferrer = $referrerAttributionCookieValuesAfterReturn; + + /* + * @todo Due to a bug in Matomo dimensions handling, when updating a referrer the referrer_url is currently + * not updated and stays empty. This "fix" should be removed and fixed in the code + * See discussion on https://github.com/matomo-org/matomo/pull/19250 + */ + if ($initialReferrer['referrerType'] === Common::REFERRER_TYPE_DIRECT_ENTRY) { + $visitReferrer['referrerUrl'] = null; + } + // end of fix + } elseif ( + $secondReferrer['referrerType'] === Common::REFERRER_TYPE_CAMPAIGN + && $createNewVisitWhenCampaignChanges === true + && $initialReferrer['referrerType'] !== Common::REFERRER_TYPE_DIRECT_ENTRY + ) { + $visitReferrer = $secondReferrer; + $shouldCreateNewVisit = true; + } elseif ( + $secondReferrer['referrerType'] === Common::REFERRER_TYPE_WEBSITE + && $createNewVisitWhenWebsiteReferrerChanges === true + && $addSecondReferrerAsSiteUrl === false + ) { + $shouldCreateNewVisit = true; + $visitReferrer = $secondReferrer; + } elseif ( + $initialReferrer['referrerType'] === Common::REFERRER_TYPE_DIRECT_ENTRY + && $addSecondReferrerAsSiteUrl === false + ) { + $visitReferrer = $secondReferrer; + + /* + * @todo Due to a bug in Matomo dimensions handling, when updating a referrer the referrer_url is currently + * not updated and stays empty. This "fix" should be removed and fixed in the code + * See discussion on https://github.com/matomo-org/matomo/pull/19250 + */ + $visitReferrer['referrerUrl'] = null; + // end of fix + } + + // check visits and referrers are attributed correctly + if ($shouldCreateNewVisit) { + $this->assertVisitReferrers([ + $this->buildVisit(1, 1, $initialReferrer), + $this->buildVisit(2, 1, $visitReferrer), + ]); + } else { + $this->assertVisitReferrers([$this->buildVisit(1, 2, $visitReferrer)]); + } + + // Track an ecommerce conversion + $tracker->setForceVisitDateTime('2020-01-01 05:05:38'); + // attach referrer attribution cookie values if any + $this->setReferrerAttributionCookieValuesToTracker($tracker, $referrerAttributionCookieValues); + Fixture::checkResponse($tracker->doTrackEcommerceOrder('TestingOrder', 124.5)); + + // check that conversion is attributed correctly + if ( + $referrerAttributionCookieValuesAfterReturn !== null + && $referrerAttributionCookieValuesAfterReturn['referrerType'] === Common::REFERRER_TYPE_CAMPAIGN + ) { + // if campaign was provided through cookie this will always be used + $conversionReferrer = $referrerAttributionCookieValuesAfterReturn; + } elseif ($visitReferrer['referrerType'] === Common::REFERRER_TYPE_CAMPAIGN) { + // if campaign is referrer of current visit use this + $conversionReferrer = $visitReferrer; + } elseif ( + $referrerAttributionCookieValuesAfterReturn !== null + && !( + $referrerAttributionCookieValuesAfterReturn === $secondReferrer + && $addSecondReferrerAsSiteUrl + ) + ) { + // The conversion will be attributed to the last value of the attribution cookie (if the host of this referrer wasn't added to the site urls) + $conversionReferrer = $referrerAttributionCookieValuesAfterReturn; + } else { + $conversionReferrer = $visitReferrer; + } + + $this->assertConversionReferrers([$this->buildConversion($shouldCreateNewVisit ? 2 : 1, $conversionReferrer)]); + } + + public function getReferrerAttributionUsingLastReferrerTestCases(): iterable + { + $possibleFirstReferrers = [ + self::$directEntryReferrer, + self::$websiteReferrer, + self::$searchEngineReferrer, + self::$socialNetworkReferrer, + self::$campaignReferrer, + ]; + + $possibleSecondReferrers = [ + self::$directEntryReferrer, + self::$websiteReferrer2, + self::$searchEngineReferrer2, + self::$socialNetworkReferrer2, + self::$campaignReferrer2, + ]; + + $dataSet = 1; + + foreach ([false, true] as $createNewVisitWhenCampaignChanges) { + foreach ([false, true] as $keepReferrerAttributionCookieOnChange) { + foreach ([false, true] as $useReferrerAttributionCookie) { + foreach ([false, true] as $addSecondReferrerAsSiteUrl) { + foreach ([false, true] as $createNewVisitWhenWebsiteReferrerChanges) { + foreach ($possibleFirstReferrers as $firstReferrer) { + foreach ($possibleSecondReferrers as $secondReferrer) { + if ( + false === $useReferrerAttributionCookie + && true === $keepReferrerAttributionCookieOnChange + ) { + // skip tests (updating attribution cookie doesn't make sense if they are not used) + continue; + } + + if ( + ( + Common::REFERRER_TYPE_DIRECT_ENTRY === $secondReferrer['referrerType'] + || Common::REFERRER_TYPE_CAMPAIGN === $secondReferrer['referrerType'] + ) + && ( + true === $addSecondReferrerAsSiteUrl + || true === $keepReferrerAttributionCookieOnChange + ) + ) { + // skip tests, adding host of direct entry or campaign has no effect + continue; + } + + $initialReferrerAttributionCookieValues = $referrerAttributionCookieValuesAfterReturn = null; + + if (true === $useReferrerAttributionCookie) { + $initialReferrerAttributionCookieValues = $firstReferrer; + + // when first referrer is direct, but we are using attribution cookies we use an attribution cookie set from previous visit + if (Common::REFERRER_TYPE_DIRECT_ENTRY === $firstReferrer['referrerType']) { + $initialReferrerAttributionCookieValues = self::$searchEngineReferrer; + } + + // keep attribution cookie values from first visit by default + $referrerAttributionCookieValuesAfterReturn = $initialReferrerAttributionCookieValues; + + if ( + !$keepReferrerAttributionCookieOnChange + && Common::REFERRER_TYPE_DIRECT_ENTRY !== $secondReferrer['referrerType'] + ) { + $referrerAttributionCookieValuesAfterReturn = $secondReferrer; + } + } + + yield "#$dataSet: createNewVisitWhenWebsiteReferrerChanges: " . (int)$createNewVisitWhenWebsiteReferrerChanges . " | " . + "addSecondReferrerAsSiteUrl: " . (int)$addSecondReferrerAsSiteUrl . " | " . + "useReferrerAttributionCookie: " . (int)$useReferrerAttributionCookie . " | " . + "keepReferrerAttributionCookieOnChange: " . (int)$keepReferrerAttributionCookieOnChange . " | " . + "createNewVisitWhenCampaignChanges: " . (int)$createNewVisitWhenCampaignChanges . " | " . + "firstReferrer: {$firstReferrer['referrerType']} | " . + "secondReferrer: {$secondReferrer['referrerType']} " + => [ + $firstReferrer, + $initialReferrerAttributionCookieValues, + $secondReferrer, + $referrerAttributionCookieValuesAfterReturn, + $createNewVisitWhenWebsiteReferrerChanges, + $addSecondReferrerAsSiteUrl, + $createNewVisitWhenCampaignChanges + ]; + + $dataSet++; + } + } + } + } + } + } + } + } + + private function setReferrerAttributionCookieValuesToTracker(\MatomoTracker $tracker, array $cookieValues): void + { + foreach ($cookieValues as $key => $value) { + $tracker->setCustomTrackingParameter($key, $value); + } + } + + private function buildVisit($idVisit, $numActions, $referrer): array + { + return [ + 'idvisit' => $idVisit, + 'visit_total_actions' => $numActions, + 'referer_type' => $referrer['referrerType'], + 'referer_name' => $referrer['referrerName'], + 'referer_keyword' => $referrer['referrerKeyword'], + 'referer_url' => $referrer['referrerUrl'], + ]; + } + + private function buildConversion($idVisit, $referrer): array + { + return [ + 'idvisit' => $idVisit, + 'referer_type' => $referrer['referrerType'], + 'referer_name' => $referrer['referrerName'], + 'referer_keyword' => $referrer['referrerKeyword'], + ]; + } + + private function assertVisitReferrers($expectedVisits): void + { + self::assertEquals($expectedVisits, $this->getVisitReferrers()); + } + + private function assertConversionReferrers($expectedConversions): void + { + self::assertEquals($expectedConversions, $this->getConversionReferrers()); + } + + private function getVisitReferrers() + { + return Db::fetchAll('SELECT idvisit, visit_total_actions, referer_type, referer_name, referer_keyword, referer_url FROM ' . Common::prefixTable('log_visit')); + } + + private function getConversionReferrers() + { + return Db::fetchAll('SELECT idvisit, referer_type, referer_name, referer_keyword FROM ' . Common::prefixTable('log_conversion')); + } + + protected static function configureFixture($fixture) + { + parent::configureFixture($fixture); + $fixture->createSuperUser = true; + } +}
\ No newline at end of file diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js index 738868ae90..2381953340 100644 --- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js +++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js @@ -17,12 +17,8 @@ describe("SegmentSelectorEditorTest", function () { async function selectFieldValue(fieldName, textToSelect) { - await page.webpage.evaluate((fieldName) => { - $(fieldName + ' input.select-dropdown').click(); - }, fieldName); - await page.webpage.evaluate((fieldName, textToSelect) => { - $(fieldName + ' .dropdown-content.active li:contains("' + textToSelect + '"):first').click(); - }, fieldName, textToSelect); + await (await page.jQuery(fieldName + ' input.select-dropdown', { waitFor: true })).click(); + await (await page.jQuery(fieldName + ' .dropdown-content li:contains("' + textToSelect + '"):first', { waitFor: true })).click(); await page.mouse.move(-10, -10); } @@ -162,10 +158,10 @@ describe("SegmentSelectorEditorTest", function () { await selectFieldValue('.segmentRow1 .segment-row .metricMatchBlock', 'Is not'); for (let i = 0; i < 3; i += 1) { + await page.waitForTimeout(200); await page.evaluate(function (i) { $(`.metricValueBlock input:eq(${i})`).val('new value ' + i).change(); }, i); - await page.waitForTimeout(200); } await page.waitForTimeout(200); @@ -267,10 +263,9 @@ describe("SegmentSelectorEditorTest", function () { await selectDimension('.segmentRow0', 'Visitors', 'Browser'); await selectFieldValue('.segmentRow0 .segment-row:eq(0) .metricMatchBlock', 'Is not'); - await page.evaluate(function () { - var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3'; - $('.segmentRow0 .segment-row:first .metricValueBlock input').val(complexValue).change(); - }); + var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3'; + await (await page.jQuery('.segmentRow0 .segment-row:first .metricValueBlock input')).type(complexValue); + await page.waitForTimeout(200); await page.click('.segment-add-or'); await page.waitForFunction(() => !! $('.segmentRow0 .segment-row:eq(1)').length); @@ -279,10 +274,8 @@ describe("SegmentSelectorEditorTest", function () { await selectDimension('.segmentRow0 .segment-row:eq(1)', 'Visitors', 'Browser'); await selectFieldValue('.segmentRow0 .segment-row:eq(1) .metricMatchBlock', 'Is'); - await page.evaluate(function () { - var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3'; - $('.segmentRow0 .segment-row:eq(1) .metricValueBlock input').val(complexValue).change(); - }); + await (await page.jQuery('.segmentRow0 .segment-row:eq(1) .metricValueBlock input')).type(complexValue); + await page.waitForTimeout(200); await page.click('.segment-add-row'); await page.waitForSelector('.segmentRow1 .segment-row'); @@ -291,11 +284,7 @@ describe("SegmentSelectorEditorTest", function () { await selectDimension('.segmentRow1', 'Visitors', 'Browser'); await selectFieldValue('.segmentRow1 .segment-row:first .metricMatchBlock', 'Is not'); - await page.evaluate(function () { - var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3'; - $('.segmentRow1 .metricValueBlock input').val(complexValue).change(); - }); - + await (await page.jQuery('.segmentRow1 .metricValueBlock input')).type(complexValue); await page.waitForTimeout(200); await page.evaluate(function () { diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png index 0e42dbae7a..397bbf35a7 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:122a96abbcf8ad5dcbb60eb1b793f4ea6c4321b88233e0bf8679d2678c722e80 -size 56014 +oid sha256:294d8d610e72b60fab652a3acd9f5764ab365830df14392f985b15a6278db825 +size 57046 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png index 1fb9c1df76..22051f3c69 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed597e24f40b81b1da1ce325d23f84762405bc3fb65e24745222bddc27db8f0a -size 56017 +oid sha256:cdeb85f25ddeda230b4b86d320e2c56a07a95721f84b33cd27112af5912e7329 +size 57055 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png index b5cd2d4488..89ea6b70ca 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:847033562428cd07b98c94149f906b135de40d06d1ba1b55ca15ef61a285811c -size 56063 +oid sha256:0c5a186ca3cf0b7dcc4f3adfa3846473d0552c9763616fd41898ae1882b5fdd9 +size 57090 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png index d6263760f6..aa881f3d8c 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f0b13892d997be58e77ca6b15e094a4a96d6d846f7becc7008742e4cc9e9efc -size 143342 +oid sha256:8a2cce7ab9021235d9476a998dc65afdfb92969c06b14a2a2a338f4046ad0878 +size 378375 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png index 735be8b61a..655518a99b 100644 --- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e90fa5acc4d469a699ec1aa315e5f5d1970403829a6640ae9538935226bb827a -size 50141 +oid sha256:dc5ce79d442c1a6e44f2914d74596571523fa3737e5d18e35d6de666f164efbb +size 51104 diff --git a/plugins/TagManager b/plugins/TagManager -Subproject 40fe81926161077383ef5260797b2fb994aee76 +Subproject cd3bf61caf2fdf85221e0bc2b59b23191dae9f4 diff --git a/plugins/UserCountry/LocationProvider/DefaultProvider.php b/plugins/UserCountry/LocationProvider/DefaultProvider.php index c5483122a7..a62b7577e0 100644 --- a/plugins/UserCountry/LocationProvider/DefaultProvider.php +++ b/plugins/UserCountry/LocationProvider/DefaultProvider.php @@ -179,7 +179,7 @@ class DefaultProvider extends LocationProvider 'UserCountry_DefaultLocationProviderDesc2', ['<strong>', '', '', '</strong>'] ) - . '</p><p><a href="https://matomo.org/faq/how-to/#faq_163" rel="noreferrer noopener" target="_blank">' + . '</p><p><a href="https://matomo.org/faq/how-to/faq_163" rel="noreferrer noopener" target="_blank">' . Piwik::translate('UserCountry_HowToInstallGeoIPDatabases') . '</a></p>'; return ['id' => self::ID, 'title' => self::TITLE, 'description' => $desc, 'order' => 1]; diff --git a/plugins/UserCountry/Reports/Base.php b/plugins/UserCountry/Reports/Base.php index c0b063a667..9458f49637 100644 --- a/plugins/UserCountry/Reports/Base.php +++ b/plugins/UserCountry/Reports/Base.php @@ -54,7 +54,7 @@ abstract class Base extends \Piwik\Plugin\Report '</a>')); } else { $footerMessage .= ' ' . Piwik::translate('UserCountry_ToGeolocateOldVisits', - array('<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_167">', '</a>')); + array('<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/faq_167">', '</a>')); } $view->config->show_footer_message = $footerMessage; diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php index 8bfdabbe04..1c642e76f7 100644 --- a/plugins/UserCountryMap/Controller.php +++ b/plugins/UserCountryMap/Controller.php @@ -1,4 +1,5 @@ <?php + /** * Matomo - free/libre analytics platform * @@ -6,6 +7,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ + namespace Piwik\Plugins\UserCountryMap; use Exception; @@ -27,7 +29,7 @@ class Controller extends \Piwik\Plugin\Controller { // By default plot up to the last 3 days of visitors on the map, for low traffic sites const REAL_TIME_WINDOW = 'last3'; - + /** * @var Translator */ @@ -58,7 +60,7 @@ class Controller extends \Piwik\Plugin\Controller $segment = ''; } } - + $token_auth = Piwik::getCurrentUserTokenAuth(); $view = new View('@UserCountryMap/visitorMap'); @@ -73,21 +75,53 @@ class Controller extends \Piwik\Plugin\Controller . '&token_auth=' . $token_auth . '&filter_limit=-1' ); - $config = array(); + $config = []; $config['visitsSummary'] = json_decode($request->process(), true); - $config['countryDataUrl'] = $this->_report('UserCountry', 'getCountry', - $this->idSite, $period, $date, $token_auth, false, $segment); - $config['regionDataUrl'] = $this->_report('UserCountry', 'getRegion', - $this->idSite, $period, $date, $token_auth, true, $segment); - $config['cityDataUrl'] = $this->_report('UserCountry', 'getCity', - $this->idSite, $period, $date, $token_auth, true, $segment); - $config['countrySummaryUrl'] = $this->getApiRequestUrl('VisitsSummary', 'get', - $this->idSite, $period, $date, $token_auth, true, $segment); + $config['countryDataUrl'] = $this->_report( + 'UserCountry', + 'getCountry', + $this->idSite, + $period, + $date, + $token_auth, + false, + $segment + ); + $config['regionDataUrl'] = $this->_report( + 'UserCountry', + 'getRegion', + $this->idSite, + $period, + $date, + $token_auth, + true, + $segment + ); + $config['cityDataUrl'] = $this->_report( + 'UserCountry', + 'getCity', + $this->idSite, + $period, + $date, + $token_auth, + true, + $segment + ); + $config['countrySummaryUrl'] = $this->getApiRequestUrl( + 'VisitsSummary', + 'get', + $this->idSite, + $period, + $date, + $token_auth, + true, + $segment + ); $view->defaultMetric = array_key_exists('nb_uniq_visitors', $config['visitsSummary']) ? 'nb_uniq_visitors' : 'nb_visits'; $noVisitTranslation = $this->translator->translate('UserCountryMap_NoVisit'); // some translations containing metric number - $translations = array( + $translations = [ 'nb_visits' => $this->translator->translate('General_NVisits'), 'no_visit' => $noVisitTranslation, 'nb_actions' => $this->translator->translate('VisitsSummary_NbActionsDescription'), @@ -97,11 +131,13 @@ class Controller extends \Piwik\Plugin\Controller 'and_n_others' => $this->translator->translate('UserCountryMap_AndNOthers'), 'nb_uniq_visitors' => $this->translator->translate('General_NUniqueVisitors'), 'nb_users' => $this->translator->translate('VisitsSummary_NbUsers'), - ); + ]; foreach ($translations as &$translation) { - if (false === strpos($translation, '%s') - && $translation !== $noVisitTranslation) { + if ( + false === strpos($translation, '%s') + && $translation !== $noVisitTranslation + ) { $translation = '%s ' . $translation; } } @@ -111,7 +147,7 @@ class Controller extends \Piwik\Plugin\Controller $view->localeJSON = json_encode($translations); - $view->reqParamsJSON = $this->getEnrichedRequest($params = array( + $view->reqParamsJSON = $this->getEnrichedRequest($params = [ 'period' => $period, 'idSite' => $this->idSite, 'date' => $date, @@ -119,7 +155,7 @@ class Controller extends \Piwik\Plugin\Controller 'token_auth' => $token_auth, 'enable_filter_excludelowpop' => 1, 'filter_excludelowpop_value' => -1 - )); + ]); $view->metrics = $config['metrics'] = $this->getMetrics($this->idSite, $period, $date, $token_auth); $config['svgBasePath'] = 'plugins/UserCountryMap/svg/'; @@ -127,24 +163,24 @@ class Controller extends \Piwik\Plugin\Controller $view->config = json_encode($config); $view->noData = empty($config['visitsSummary']['nb_visits']); - $countriesByIso = array(); + $countriesByIso = []; $regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider'); $countries = array_keys($regionDataProvider->getCountryList()); - foreach ($countries AS $country) { - $countriesByIso[strtoupper($country)] = Piwik::translate('Intl_Country_'.strtoupper($country)); + foreach ($countries as $country) { + $countriesByIso[strtoupper($country)] = Piwik::translate('Intl_Country_' . strtoupper($country)); } $view->countriesByIso = $countriesByIso; - $view->continents = array( + $view->continents = [ 'AF' => \Piwik\Plugins\UserCountry\continentTranslate('afr'), 'AS' => \Piwik\Plugins\UserCountry\continentTranslate('asi'), 'EU' => \Piwik\Plugins\UserCountry\continentTranslate('eur'), 'NA' => \Piwik\Plugins\UserCountry\continentTranslate('amn'), 'OC' => \Piwik\Plugins\UserCountry\continentTranslate('oce'), 'SA' => \Piwik\Plugins\UserCountry\continentTranslate('ams') - ); + ]; return $view->render(); } @@ -188,7 +224,7 @@ class Controller extends \Piwik\Plugin\Controller $maxVisits = Common::getRequestVar('filter_limit', 100, 'int'); // some translations - $locale = array( + $locale = [ 'nb_actions' => $this->translator->translate('VisitsSummary_NbActionsDescription'), 'local_time' => $this->translator->translate('VisitTime_ColumnLocalTime'), 'from' => $this->translator->translate('General_FromReferrer'), @@ -202,15 +238,15 @@ class Controller extends \Piwik\Plugin\Controller 'actions' => $this->translator->translate('Transitions_NumPageviews'), 'searches' => $this->translator->translate('UserCountryMap_Searches'), 'goal_conversions' => $this->translator->translate('UserCountryMap_GoalConversions'), - ); + ]; $segment = $segmentOverride ? : Request::getRawSegmentFromRequest() ? : ''; - $params = array( + $params = [ 'period' => 'range', 'idSite' => $this->idSite, 'segment' => $segment, 'token_auth' => $token_auth, - ); + ]; $realtimeWindow = Common::getRequestVar('realtimeWindow', self::REAL_TIME_WINDOW, 'string'); if ($realtimeWindow != 'false') { // handle special value @@ -219,8 +255,8 @@ class Controller extends \Piwik\Plugin\Controller $reqParams = $this->getEnrichedRequest($params, $encode = false); - $view->config = array( - 'metrics' => array(), + $view->config = [ + 'metrics' => [], 'svgBasePath' => 'plugins/UserCountryMap/svg/', 'liveRefreshAfterMs' => $liveRefreshAfterMs, '_' => $locale, @@ -234,7 +270,7 @@ class Controller extends \Piwik\Plugin\Controller 'doNotRefreshVisits' => Common::getRequestVar('doNotRefreshVisits', false, 'int'), 'enableAnimation' => Common::getRequestVar('enableAnimation', true, 'int'), 'forceNowValue' => Common::getRequestVar('forceNowValue', false, 'int') - ); + ]; return $view->render(); } @@ -281,15 +317,15 @@ class Controller extends \Piwik\Plugin\Controller ); $metaData = json_decode($request->process(), true); - $metrics = array(); + $metrics = []; if (!empty($metaData[0]['metrics']) && is_array($metaData[0]['metrics'])) { foreach ($metaData[0]['metrics'] as $id => $val) { - $metrics[] = array($id, $val); + $metrics[] = [$id, $val]; } } if (!empty($metaData[0]['processedMetrics']) && is_array($metaData[0]['processedMetrics'])) { foreach ($metaData[0]['processedMetrics'] as $id => $val) { - $metrics[] = array($id, $val); + $metrics[] = [$id, $val]; } } return $metrics; @@ -321,7 +357,15 @@ class Controller extends \Piwik\Plugin\Controller private function _report($module, $action, $idSite, $period, $date, $token_auth, $filter_by_country = false, $segmentOverride = false) { - return $this->getApiRequestUrl('API', 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action, - $idSite, $period, $date, $token_auth, $filter_by_country, $segmentOverride); + return $this->getApiRequestUrl( + 'API', + 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action, + $idSite, + $period, + $date, + $token_auth, + $filter_by_country, + $segmentOverride + ); } } diff --git a/plugins/UserCountryMap/javascripts/visitor-map.js b/plugins/UserCountryMap/javascripts/visitor-map.js index 9a972962b0..82e08e36a0 100644 --- a/plugins/UserCountryMap/javascripts/visitor-map.js +++ b/plugins/UserCountryMap/javascripts/visitor-map.js @@ -1389,7 +1389,7 @@ $.extend(UserCountryMap, { ISO2toISO3: {"BD": "BGD", "BE": "BEL", "BF": "BFA", "BG": "BGR", "BA": "BIH", "BB": "BRB", "WF": "WLF", "BL": "BLM", "BM": "BMU", "BN": "BRN", "BO": "BOL", "BH": "BHR", "BI": "BDI", "BJ": "BEN", "BT": "BTN", "JM": "JAM", "BV": "BVT", "BW": "BWA", "WS": "WSM", "BQ": "BES", "BR": "BRA", "BS": "BHS", "JE": "JEY", "BY": "BLR", "BZ": "BLZ", "RU": "RUS", "RW": "RWA", "RS": "SRB", "TL": "TLS", "RE": "REU", "TM": "TKM", "TJ": "TJK", "RO": "ROU", "TK": "TKL", "GW": "GNB", "GU": "GUM", "GT": "GTM", "GS": "SGS", "GR": "GRC", "GQ": "GNQ", "GP": "GLP", "JP": "JPN", "GY": "GUY", "GG": "GGY", "GF": "GUF", "GE": "GEO", "GD": "GRD", "GB": "GBR", "GA": "GAB", "SV": "SLV", "GN": "GIN", "GM": "GMB", "GL": "GRL", "GI": "GIB", "GH": "GHA", "OM": "OMN", "TN": "TUN", "JO": "JOR", "HR": "HRV", "HT": "HTI", "HU": "HUN", "HK": "HKG", "HN": "HND", "HM": "HMD", "VE": "VEN", "PR": "PRI", "PS": "PSE", "PW": "PLW", "PT": "PRT", "SJ": "SJM", "PY": "PRY", "IQ": "IRQ", "PA": "PAN", "PF": "PYF", "PG": "PNG", "PE": "PER", "PK": "PAK", "PH": "PHL", "PN": "PCN", "PL": "POL", "PM": "SPM", "ZM": "ZMB", "EH": "ESH", "EE": "EST", "EG": "EGY", "ZA": "ZAF", "EC": "ECU", "IT": "ITA", "VN": "VNM", "SB": "SLB", "ET": "ETH", "SO": "SOM", "ZW": "ZWE", "SA": "SAU", "ES": "ESP", "ER": "ERI", "ME": "MNE", "MD": "MDA", "MG": "MDG", "MF": "MAF", "MA": "MAR", "MC": "MCO", "UZ": "UZB", "MM": "MMR", "ML": "MLI", "MO": "MAC", "MN": "MNG", "MH": "MHL", "MK": "MKD", "MU": "MUS", "MT": "MLT", "MW": "MWI", "MV": "MDV", "MQ": "MTQ", "MP": "MNP", "MS": "MSR", "MR": "MRT", "IM": "IMN", "UG": "UGA", "TZ": "TZA", "MY": "MYS", "MX": "MEX", "IL": "ISR", "FR": "FRA", "IO": "IOT", "SH": "SHN", "FI": "FIN", "FJ": "FJI", "FK": "FLK", "FM": "FSM", "FO": "FRO", "NI": "NIC", "NL": "NLD", "NO": "NOR", "NA": "NAM", "VU": "VUT", "NC": "NCL", "NE": "NER", "NF": "NFK", "NG": "NGA", "NZ": "NZL", "NP": "NPL", "NR": "NRU", "NU": "NIU", "CK": "COK", "XK": "XKX", "CI": "CIV", "CH": "CHE", "CO": "COL", "CN": "CHN", "CM": "CMR", "CL": "CHL", "CC": "CCK", "CA": "CAN", "CG": "COG", "CF": "CAF", "CD": "COD", "CZ": "CZE", "CY": "CYP", "CX": "CXR", "CS": "SCG", "CR": "CRI", "CW": "CUW", "CV": "CPV", "CU": "CUB", "SZ": "SWZ", "SY": "SYR", "SX": "SXM", "KG": "KGZ", "KE": "KEN", "SS": "SSD", "SR": "SUR", "KI": "KIR", "KH": "KHM", "KN": "KNA", "KM": "COM", "ST": "STP", "SK": "SVK", "KR": "KOR", "SI": "SVN", "KP": "PRK", "KW": "KWT", "SN": "SEN", "SM": "SMR", "SL": "SLE", "SC": "SYC", "KZ": "KAZ", "KY": "CYM", "SG": "SGP", "SE": "SWE", "SD": "SDN", "DO": "DOM", "DM": "DMA", "DJ": "DJI", "DK": "DNK", "VG": "VGB", "DE": "DEU", "YE": "YEM", "DZ": "DZA", "US": "USA", "UY": "URY", "YT": "MYT", "UM": "UMI", "LB": "LBN", "LC": "LCA", "LA": "LAO", "TV": "TUV", "TW": "TWN", "TT": "TTO", "TR": "TUR", "LK": "LKA", "LI": "LIE", "LV": "LVA", "TO": "TON", "LT": "LTU", "LU": "LUX", "LR": "LBR", "LS": "LSO", "TH": "THA", "TF": "ATF", "TG": "TGO", "TD": "TCD", "TC": "TCA", "LY": "LBY", "VA": "VAT", "VC": "VCT", "AE": "ARE", "AD": "AND", "AG": "ATG", "AF": "AFG", "AI": "AIA", "VI": "VIR", "IS": "ISL", "IR": "IRN", "AM": "ARM", "AL": "ALB", "AO": "AGO", "AN": "ANT", "AQ": "ATA", "AS": "ASM", "AR": "ARG", "AU": "AUS", "AT": "AUT", "AW": "ABW", "IN": "IND", "AX": "ALA", "AZ": "AZE", "IE": "IRL", "ID": "IDN", "UA": "UKR", "QA": "QAT", "MZ": "MOZ"}, // iso alpha-3 --> continent code - ISO3toCONT: {"AGO": "AF", "DZA": "AF", "EGY": "AF", "BGD": "AS", "NER": "AF", "LIE": "EU", "NAM": "AF", "BGR": "EU", "BOL": "SA", "GHA": "AF", "CCK": "AS", "PAK": "AS", "CPV": "AF", "JOR": "AS", "LBR": "AF", "LBY": "AF", "MYS": "AS", "DOM": "NA", "PRI": "NA", "SXM": "NA", "PRK": "AS", "PSE": "AS", "TZA": "AF", "BWA": "AF", "KHM": "AS", "UMI": "OC", "NIC": "NA", "TTO": "NA", "ETH": "AF", "PRY": "SA", "HKG": "AS", "SAU": "AS", "LBN": "AS", "SVN": "EU", "BFA": "AF", "CHE": "EU", "MRT": "AF", "HRV": "EU", "CHL": "SA", "CHN": "AS", "KNA": "NA", "SLE": "AF", "JAM": "NA", "SMR": "EU", "GIB": "EU", "DJI": "AF", "GIN": "AF", "FIN": "EU", "URY": "SA", "THA": "AS", "STP": "AF", "SYC": "AF", "NPL": "AS", "CXR": "AS", "LAO": "AS", "YEM": "AS", "BVT": "AN", "ZAF": "AF", "KIR": "OC", "PHL": "AS", "ROU": "EU", "VIR": "NA", "SYR": "AS", "MAC": "AS", "MAF": "NA", "MLT": "EU", "KAZ": "AS", "TCA": "NA", "PYF": "OC", "NIU": "OC", "DMA": "NA", "BEN": "AF", "GUF": "SA", "BEL": "EU", "MSR": "NA", "TGO": "AF", "DEU": "EU", "GUM": "OC", "LKA": "AS", "SSD": "AF", "FLK": "SA", "GBR": "EU", "BES": "NA", "GUY": "SA", "CRI": "NA", "CMR": "AF", "MAR": "AF", "MNP": "OC", "LSO": "AF", "HUN": "EU", "TKM": "AS", "SUR": "SA", "NLD": "EU", "BMU": "NA", "HMD": "AN", "TCD": "AF", "GEO": "AS", "MNE": "EU", "MNG": "AS", "MHL": "OC", "MTQ": "NA", "BLZ": "NA", "NFK": "OC", "MMR": "AS", "AFG": "AS", "BDI": "AF", "VGB": "NA", "BLR": "EU", "BLM": "NA", "GRD": "NA", "TKL": "OC", "GRC": "EU", "RUS": "EU", "GRL": "NA", "SHN": "AF", "AND": "EU", "MOZ": "AF", "TJK": "AS", "XKX": "EU", "HTI": "NA", "MEX": "NA", "ANT": "NA", "ZWE": "AF", "LCA": "NA", "IND": "AS", "LVA": "EU", "BTN": "AS", "VCT": "NA", "VNM": "AS", "NOR": "EU", "CZE": "EU", "ATF": "AN", "ATG": "NA", "FJI": "OC", "IOT": "AS", "HND": "NA", "MUS": "AF", "ATA": "AN", "LUX": "EU", "ISR": "AS", "FSM": "OC", "PER": "SA", "REU": "AF", "IDN": "AS", "VUT": "OC", "MKD": "EU", "COD": "AF", "COG": "AF", "ISL": "EU", "GLP": "NA", "COK": "OC", "COM": "AF", "COL": "SA", "NGA": "AF", "TLS": "OC", "TWN": "AS", "PRT": "EU", "MDA": "EU", "GGY": "EU", "MDG": "AF", "ECU": "SA", "SEN": "AF", "NZL": "OC", "MDV": "AS", "ASM": "OC", "SPM": "NA", "CUW": "NA", "FRA": "EU", "LTU": "EU", "RWA": "AF", "ZMB": "AF", "GMB": "AF", "WLF": "OC", "JEY": "EU", "FRO": "EU", "GTM": "NA", "DNK": "EU", "IMN": "EU", "AUS": "OC", "AUT": "EU", "SJM": "EU", "VEN": "SA", "PLW": "OC", "KEN": "AF", "MYT": "AF", "WSM": "OC", "TUR": "AS", "ALB": "EU", "OMN": "AS", "TUV": "OC", "ALA": "EU", "BRN": "AS", "TUN": "AF", "PCN": "OC", "BRB": "NA", "BRA": "SA", "CIV": "AF", "SRB": "EU", "GNQ": "AF", "USA": "NA", "QAT": "AS", "SWE": "EU", "AZE": "AS", "GNB": "AF", "SWZ": "AF", "TON": "OC", "CAN": "NA", "UKR": "EU", "KOR": "AS", "AIA": "NA", "CAF": "AF", "SVK": "EU", "CYP": "EU", "BIH": "EU", "SGP": "AS", "SGS": "AN", "SOM": "AF", "UZB": "AS", "ERI": "AF", "POL": "EU", "KWT": "AS", "SCG": "EU", "GAB": "AF", "CYM": "NA", "VAT": "EU", "EST": "EU", "MWI": "AF", "ESP": "EU", "IRQ": "AS", "SLV": "NA", "MLI": "AF", "IRL": "EU", "IRN": "AS", "ABW": "NA", "PNG": "OC", "PAN": "NA", "SDN": "AF", "SLB": "OC", "ESH": "AF", "MCO": "EU", "ITA": "EU", "JPN": "AS", "KGZ": "AS", "UGA": "AF", "NCL": "OC", "ARE": "AS", "ARG": "SA", "BHS": "NA", "BHR": "AS", "ARM": "AS", "NRU": "OC", "CUB": "NA"}, + ISO3toCONT: {"AGO": "AF", "DZA": "AF", "EGY": "AF", "BGD": "AS", "NER": "AF", "LIE": "EU", "NAM": "AF", "BGR": "EU", "BOL": "SA", "GHA": "AF", "CCK": "AS", "PAK": "AS", "CPV": "AF", "JOR": "AS", "LBR": "AF", "LBY": "AF", "MYS": "OC", "DOM": "NA", "PRI": "NA", "SXM": "NA", "PRK": "AS", "PSE": "AS", "TZA": "AF", "BWA": "AF", "KHM": "AS", "UMI": "OC", "NIC": "NA", "TTO": "NA", "ETH": "AF", "PRY": "SA", "HKG": "AS", "SAU": "AS", "LBN": "AS", "SVN": "EU", "BFA": "AF", "CHE": "EU", "MRT": "AF", "HRV": "EU", "CHL": "SA", "CHN": "AS", "KNA": "NA", "SLE": "AF", "JAM": "NA", "SMR": "EU", "GIB": "EU", "DJI": "AF", "GIN": "AF", "FIN": "EU", "URY": "SA", "THA": "AS", "STP": "AF", "SYC": "AF", "NPL": "AS", "CXR": "AS", "LAO": "AS", "YEM": "AS", "BVT": "AN", "ZAF": "AF", "KIR": "OC", "PHL": "AS", "ROU": "EU", "VIR": "NA", "SYR": "AS", "MAC": "AS", "MAF": "NA", "MLT": "EU", "KAZ": "AS", "TCA": "NA", "PYF": "OC", "NIU": "OC", "DMA": "NA", "BEN": "AF", "GUF": "SA", "BEL": "EU", "MSR": "NA", "TGO": "AF", "DEU": "EU", "GUM": "OC", "LKA": "AS", "SSD": "AF", "FLK": "SA", "GBR": "EU", "BES": "NA", "GUY": "SA", "CRI": "NA", "CMR": "AF", "MAR": "AF", "MNP": "OC", "LSO": "AF", "HUN": "EU", "TKM": "AS", "SUR": "SA", "NLD": "EU", "BMU": "NA", "HMD": "AN", "TCD": "AF", "GEO": "AS", "MNE": "EU", "MNG": "AS", "MHL": "OC", "MTQ": "NA", "BLZ": "NA", "NFK": "OC", "MMR": "AS", "AFG": "AS", "BDI": "AF", "VGB": "NA", "BLR": "EU", "BLM": "NA", "GRD": "NA", "TKL": "OC", "GRC": "EU", "RUS": "EU", "GRL": "NA", "SHN": "AF", "AND": "EU", "MOZ": "AF", "TJK": "AS", "XKX": "EU", "HTI": "NA", "MEX": "NA", "ANT": "NA", "ZWE": "AF", "LCA": "NA", "IND": "AS", "LVA": "EU", "BTN": "AS", "VCT": "NA", "VNM": "AS", "NOR": "EU", "CZE": "EU", "ATF": "AN", "ATG": "NA", "FJI": "OC", "IOT": "AS", "HND": "NA", "MUS": "AF", "ATA": "AN", "LUX": "EU", "ISR": "AS", "FSM": "OC", "PER": "SA", "REU": "AF", "IDN": "OC", "VUT": "OC", "MKD": "EU", "COD": "AF", "COG": "AF", "ISL": "EU", "GLP": "NA", "COK": "OC", "COM": "AF", "COL": "SA", "NGA": "AF", "TLS": "OC", "TWN": "AS", "PRT": "EU", "MDA": "EU", "GGY": "EU", "MDG": "AF", "ECU": "SA", "SEN": "AF", "NZL": "OC", "MDV": "AS", "ASM": "OC", "SPM": "NA", "CUW": "NA", "FRA": "EU", "LTU": "EU", "RWA": "AF", "ZMB": "AF", "GMB": "AF", "WLF": "OC", "JEY": "EU", "FRO": "EU", "GTM": "NA", "DNK": "EU", "IMN": "EU", "AUS": "OC", "AUT": "EU", "SJM": "EU", "VEN": "SA", "PLW": "OC", "KEN": "AF", "MYT": "AF", "WSM": "OC", "TUR": "AS", "ALB": "EU", "OMN": "AS", "TUV": "OC", "ALA": "EU", "BRN": "AS", "TUN": "AF", "PCN": "OC", "BRB": "NA", "BRA": "SA", "CIV": "AF", "SRB": "EU", "GNQ": "AF", "USA": "NA", "QAT": "AS", "SWE": "EU", "AZE": "AS", "GNB": "AF", "SWZ": "AF", "TON": "OC", "CAN": "NA", "UKR": "EU", "KOR": "AS", "AIA": "NA", "CAF": "AF", "SVK": "EU", "CYP": "EU", "BIH": "EU", "SGP": "AS", "SGS": "AN", "SOM": "AF", "UZB": "AS", "ERI": "AF", "POL": "EU", "KWT": "AS", "SCG": "EU", "GAB": "AF", "CYM": "NA", "VAT": "EU", "EST": "EU", "MWI": "AF", "ESP": "EU", "IRQ": "AS", "SLV": "NA", "MLI": "AF", "IRL": "EU", "IRN": "AS", "ABW": "NA", "PNG": "OC", "PAN": "NA", "SDN": "AF", "SLB": "OC", "ESH": "AF", "MCO": "EU", "ITA": "EU", "JPN": "AS", "KGZ": "AS", "UGA": "AF", "NCL": "OC", "ARE": "AS", "ARG": "SA", "BHS": "NA", "BHR": "AS", "ARM": "AS", "NRU": "OC", "CUB": "NA"}, // special region aggregation for some countries aggregate: { diff --git a/plugins/UsersManager/tests/Integration/UserInviteTest.php b/plugins/UsersManager/tests/Integration/UserInviteTest.php index 098089d33e..321f037d3c 100644 --- a/plugins/UsersManager/tests/Integration/UserInviteTest.php +++ b/plugins/UsersManager/tests/Integration/UserInviteTest.php @@ -60,7 +60,7 @@ class UserInviteTest extends IntegrationTestCase $response = Http::sendHttpRequest(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php?module=Login&action=acceptInvitation&token=' . $this->token, 10); - $this->assertStringContainsString('Accept Invitation', $response, 'error on accept invitation'); + $this->assertStringContainsString('Accept invitation', $response, 'error on accept invitation'); } } diff --git a/plugins/UsersManager/tests/UI/UsersManager_spec.js b/plugins/UsersManager/tests/UI/UsersManager_spec.js index 9feb4e0fb8..e4e4b58e64 100644 --- a/plugins/UsersManager/tests/UI/UsersManager_spec.js +++ b/plugins/UsersManager/tests/UI/UsersManager_spec.js @@ -172,12 +172,6 @@ describe("UsersManager", function () { }); it('should delete a single user when the modal is confirmed is clicked', async function () { - - await page.evaluate(function () { - $('select[name=access-level-filter]').val('string:view').change(); - $('#user-text-filter').val('ight').change(); - }); - await (await page.jQuery('.deleteuser:eq(0)')).click(); await (await page.jQuery('.delete-user-confirm-modal .modal-close:not(.modal-no):visible')).click(); await page.waitForNetworkIdle(); @@ -440,6 +434,7 @@ describe("UsersManager", function () { it('should display the superuser access tab when the superuser tab is clicked', async function () { await page.click('.userEditForm .menuSuperuser'); await page.mouse.move(0, 0); + await page.waitForTimeout(100); expect(await page.screenshotSelector('.usersManager')).to.matchImage('superuser_tab'); }); @@ -490,7 +485,7 @@ describe("UsersManager", function () { }); it('should show the edit user form when the edit icon in a row is clicked', async function () { - await (await page.jQuery('button.edituser:eq(1)', { waitFor: true })).click(); + await (await page.jQuery('button.edituser:eq(2)', { waitFor: true })).click(); await page.waitForTimeout(250); await page.waitForNetworkIdle(); diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png index ed6d558535..3ce45b448c 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f7a1c8ede3bb61b869dbab37be56d784879f3d7be5c4e80bb86e7f275487374 -size 136964 +oid sha256:d900ab4e0295bbe056d943cf62f2c7b9bfa4de96bb2269612d0063dde7434e20 +size 136766 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png index dca72af936..3aee339185 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92168d09555061bed7c9744f3b5252fc5328a24c51f80df7cb56331b398c04be -size 26969 +oid sha256:92825d9f4fb5080afd23dbabf519d2be4d4964a6623c3da11f4820f1517115a6 +size 169385 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png index fc91101f8b..ca7bf2eacc 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f4cb4fcec0ec3eebad0063bddbfd1d7e0c8410a64ee8569d5ef78f8df3302a5 -size 170348 +oid sha256:6ae36fbee0d0eceb6b320808da446b9f7538e12c926bd55271b9909b4bef191d +size 170695 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png index 7854904373..e44dd90328 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86f5888587a18b98c0118ad5709d6d3d98486ac8f3f5f5f6c82a5936d72eafed -size 21978 +oid sha256:3b47b430f67f92811615b9b10dafc3137923b849580f50256598bc33e92d3bc5 +size 21831 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png index c5325fd782..c3a3455aaf 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:052ed4ad65093f9967ddf7366847fc53fae99260bdbfced20f7bf11f9e33d3f2 -size 31099 +oid sha256:319f8ab21d7da64f61896b14966b3a290682a294b25e5372d22bd8ed8efb999d +size 30872 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png index 107d81d036..3e090100ff 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37d8b53b65dbe7e0b696f83e5ab4b8a2e4787ad5a524eb6dd619f1d3f5f56d82 -size 24864 +oid sha256:6808d97c5c13d69a0a622c925bd77000d8ec9807d5adc574f4961c88632863d1 +size 24258 diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png index 953c45f5cb..9dbfe8223d 100644 --- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png +++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d15a7db15186c51b0103b34a6c842a10175a9993cc8c16a273c1f4bfb6bcafea -size 167125 +oid sha256:5575d62aec7479771521771d917833f917118ed81d0a26a09c5bfa340c956842 +size 180151 diff --git a/plugins/VisitorGenerator b/plugins/VisitorGenerator -Subproject 756ffdc30f1f784e2790b40244cfab3656a6366 +Subproject fe28e7f872c46115952c3e9e0a2f686bf557851 |