diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-07-26 17:30:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 17:30:16 +0300 |
commit | 3bc19a6a78733a4f7edde34e4a2474f372094ded (patch) | |
tree | af3cf7a44888b54aaf066d6756a5d509e62a0038 | |
parent | f798bc645e9a087516c1ae34275ecf52c2446fef (diff) |
[Vue] remove use of angularjs from GeoIp2 plugin (#19427)
* remove use of angularjs from GeoIp2 plugin
* built vue files
* Fix component name case.
* built vue files
* remove use of unneeded html_attr twig escape
-rw-r--r-- | plugins/GeoIp2/templates/_updaterManage.twig | 65 | ||||
-rw-r--r-- | plugins/GeoIp2/templates/configuration.twig | 28 | ||||
-rw-r--r-- | plugins/GeoIp2/vue/dist/GeoIp2.umd.js | 83 | ||||
-rw-r--r-- | plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js | 4 | ||||
-rw-r--r-- | plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue (renamed from plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue) | 0 | ||||
-rw-r--r-- | plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.adapter.ts | 59 | ||||
-rw-r--r-- | plugins/GeoIp2/vue/src/index.ts | 4 |
7 files changed, 29 insertions, 214 deletions
diff --git a/plugins/GeoIp2/templates/_updaterManage.twig b/plugins/GeoIp2/templates/_updaterManage.twig deleted file mode 100644 index be34cdad79..0000000000 --- a/plugins/GeoIp2/templates/_updaterManage.twig +++ /dev/null @@ -1,65 +0,0 @@ -<div ng-show="locationUpdater.geoipDatabaseInstalled" id="geoipdb-update-info"> - <p> - {{ 'GeoIp2_GeoIPUpdaterInstructions'|translate('<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener">','</a>','<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm">','</a>')|raw }} - <br/><br/> - {% if dbipLiteUrl|default is not empty %}{{ 'GeoIp2_GeoLiteCityLink'|translate('<a rel="noreferrer noopener" href="'~dbipLiteUrl|e('html_attr')~'">',dbipLiteUrl|e('html'),'</a>')|raw }}<br/><br/>{% endif %} - {{ 'UserCountry_MaxMindLinkExplanation'|translate('<a href="https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/" rel="noreferrer noopener" target="_blank">', '</a>')|raw }} - - <span ng-show="locationUpdater.geoipDatabaseInstalled"> - <br/><br/>{{ 'GeoIp2_GeoIPUpdaterIntro'|translate }}: - </span> - </p> - - <div piwik-field uicontrol="text" name="geoip-location-db" - ng-model="locationUpdater.locationDbUrl" - introduction="{{ 'GeoIp2_LocationDatabase'|translate|e('html_attr') }}" - data-title="{{ 'Actions_ColumnDownloadURL'|translate|e('html_attr') }}" - value="{{ geoIPLocUrl }}" - inline-help="{{ 'GeoIp2_LocationDatabaseHint'|translate|e('html_attr') }}"> - </div> - - <div piwik-field uicontrol="text" name="geoip-isp-db" - ng-model="locationUpdater.ispDbUrl" - introduction="{{ 'GeoIp2_ISPDatabase'|translate|e('html_attr') }}" - data-title="{{ 'Actions_ColumnDownloadURL'|translate|e('html_attr') }}" - disabled="{{ not isProviderPluginActive }}" - {% if not isProviderPluginActive %} - inline-help="<div class='alert alert-warning'>{{ 'GeoIp2_ISPRequiresProviderPlugin'|translate|e('html_attr') }}</div>" - {% endif %} - value="{{ geoIPIspUrl }}"> - </div> - - <div id="locationProviderUpdatePeriodInlineHelp" class="inline-help-node"> - {% if lastTimeUpdaterRun is defined and lastTimeUpdaterRun is not empty %} - {{ 'GeoIp2_UpdaterWasLastRun'|translate(lastTimeUpdaterRun)|raw }} - {% else %} - {{ 'GeoIp2_UpdaterHasNotBeenRun'|translate }} - {% endif %} - <br/><br/> - <div id="geoip-updater-next-run-time"> - {% include "@GeoIp2/_updaterNextRunTime.twig" %} - </div> - </div> - - <div piwik-field uicontrol="radio" name="geoip-update-period" - ng-model="locationUpdater.updatePeriod" - introduction="{{ 'GeoIp2_DownloadNewDatabasesEvery'|translate|e('html_attr') }}" - value="{{ geoIPUpdatePeriod|default('month') }}" - options="{{ updatePeriodOptions|json_encode }}" - inline-help="#locationProviderUpdatePeriodInlineHelp"> - </div> - - <input type="button" - class="btn" - ng-click="locationUpdater.saveGeoIpLinks()" - ng-value="locationUpdater.buttonUpdateSaveText"/> - - <div> - <div id="done-updating-updater"></div> - <div id="geoipdb-update-info-error"></div> - <div piwik-progressbar - progress="locationUpdater.progressUpdateDownload" - label="locationUpdater.progressUpdateLabel" - ng-show="locationUpdater.isUpdatingGeoIpDatabase"></div> - </div> -</div> diff --git a/plugins/GeoIp2/templates/configuration.twig b/plugins/GeoIp2/templates/configuration.twig index 537b27e7e5..cd5c1bec3c 100644 --- a/plugins/GeoIp2/templates/configuration.twig +++ b/plugins/GeoIp2/templates/configuration.twig @@ -1,17 +1,17 @@ <div - piwik-geoip2-updater - geoip-database-started-installed="{{ geoIPDatabasesInstalled|default(null)|json_encode|e('html_attr') }}" - show-geoip-update-section="{{ showGeoIPUpdateSection|default(null)|json_encode|e('html_attr') }}" - dbip-lite-url="{{ dbipLiteUrl|default(null)|json_encode|e('html_attr') }}" - dbip-lite-filename="{{ dbipLiteFilename|default(null)|json_encode|e('html_attr') }}" - geoip-loc-url="{{ geoIPLocUrl|default(null)|json_encode|e('html_attr') }}" - is-provider-plugin-active="{{ isProviderPluginActive|default(null)|json_encode|e('html_attr') }}" - geoip-isp-url="{{ geoIPIspUrl|default(null)|json_encode|e('html_attr') }}" - last-time-updater-run="{{ lastTimeUpdaterRun|default(null)|json_encode|e('html_attr') }}" - geoip-update-period="{{ geoIPUpdatePeriod|default(null)|json_encode|e('html_attr') }}" - update-period-options="{{ updatePeriodOptions|default(null)|json_encode|e('html_attr') }}" - is-provider-plugin-active="{{ isProviderPluginActive|default(null)|json_encode|e('html_attr') }}" - next-run-time="{{ (nextRunTime ? nextRunTime.getTimestamp() : null)|json_encode|e('html_attr') }}" - next-run-time-pretty="{{ (nextRunTime ? nextRunTime.toString() : null)|json_encode|e('html_attr') }}" + vue-entry="GeoIp2.GeoIp2Updater" + geoip-database-started-installed="{{ geoIPDatabasesInstalled|default(null)|json_encode }}" + show-geoip-update-section="{{ showGeoIPUpdateSection|default(null)|json_encode }}" + dbip-lite-url="{{ dbipLiteUrl|default(null)|json_encode }}" + dbip-lite-filename="{{ dbipLiteFilename|default(null)|json_encode }}" + geoip-loc-url="{{ geoIPLocUrl|default(null)|json_encode }}" + is-provider-plugin-active="{{ isProviderPluginActive|default(null)|json_encode }}" + geoip-isp-url="{{ geoIPIspUrl|default(null)|json_encode }}" + last-time-updater-run="{{ lastTimeUpdaterRun|default(null)|json_encode }}" + geoip-update-period="{{ geoIPUpdatePeriod|default(null)|json_encode }}" + update-period-options="{{ updatePeriodOptions|default(null)|json_encode }}" + is-provider-plugin-active="{{ isProviderPluginActive|default(null)|json_encode }}" + next-run-time="{{ (nextRunTime ? nextRunTime.getTimestamp() : null)|json_encode }}" + next-run-time-pretty="{{ (nextRunTime ? nextRunTime.toString() : null)|json_encode }}" > </div> diff --git a/plugins/GeoIp2/vue/dist/GeoIp2.umd.js b/plugins/GeoIp2/vue/dist/GeoIp2.umd.js index 31abf9a446..e623bef65f 100644 --- a/plugins/GeoIp2/vue/dist/GeoIp2.umd.js +++ b/plugins/GeoIp2/vue/dist/GeoIp2.umd.js @@ -125,7 +125,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__; __webpack_require__.r(__webpack_exports__); // EXPORTS -__webpack_require__.d(__webpack_exports__, "Geoip2Updater", function() { return /* reexport */ Geoip2Updater; }); +__webpack_require__.d(__webpack_exports__, "GeoIp2Updater", function() { return /* reexport */ GeoIp2Updater; }); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js // This file is imported into lib/wc client bundles. @@ -143,13 +143,10 @@ if (typeof window !== 'undefined') { // Indicate to webpack that this file can be concatenated /* harmony default export */ var setPublicPath = (null); -// EXTERNAL MODULE: external "CoreHome" -var external_CoreHome_ = __webpack_require__("19dc"); - // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=23b5cb60 +// 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/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue?vue&type=template&id=55b13210 var _hoisted_1 = { key: 0 @@ -341,18 +338,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["content-title"]); } -// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=23b5cb60 +// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue?vue&type=template&id=55b13210 + +// EXTERNAL MODULE: external "CoreHome" +var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); -// 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/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue?vue&type=script&lang=ts var _window = window, $ = _window.$; -/* harmony default export */ var Geoip2Updatervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ +/* harmony default export */ var GeoIp2Updatervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { geoipDatabaseStartedInstalled: Boolean, showGeoipUpdateSection: { @@ -574,73 +574,15 @@ var _window = window, } } })); -// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue?vue&type=script&lang=ts -// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue - +// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue -Geoip2Updatervue_type_script_lang_ts.render = render - -/* harmony default export */ var Geoip2Updater = (Geoip2Updatervue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.adapter.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ +GeoIp2Updatervue_type_script_lang_ts.render = render -/* harmony default export */ var Geoip2Updater_adapter = (Object(external_CoreHome_["createAngularJsAdapter"])({ - component: Geoip2Updater, - scope: { - geoIpDatabasesInstalled: { - angularJsBind: '<' - }, - showGeoIpUpdateSection: { - angularJsBind: '<' - }, - dbipLiteUrl: { - angularJsBind: '<' - }, - dbipLiteFilename: { - angularJsBind: '<' - }, - geoipLocUrl: { - angularJsBind: '<' - }, - isProviderPluginActive: { - angularJsBind: '<' - }, - geoipIspUrl: { - angularJsBind: '<' - }, - lastTimeUpdaterRun: { - angularJsBind: '<' - }, - geoipUpdatePeriod: { - angularJsBind: '<' - }, - updatePeriodOptions: { - angularJsBind: '<' - }, - geoipDatabaseStartedInstalled: { - angularJsBind: '<' - }, - showGeoipUpdateSection: { - angularJsBind: '<' - }, - nextRunTime: { - angularJsBind: '<' - }, - nextRunTimePretty: { - angularJsBind: '<' - } - }, - directiveName: 'piwikGeoip2Updater', - transclude: true -})); +/* harmony default export */ var GeoIp2Updater = (GeoIp2Updatervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/index.ts /*! * Matomo - free/libre analytics platform @@ -649,7 +591,6 @@ Geoip2Updatervue_type_script_lang_ts.render = render * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ - // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js diff --git a/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js b/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js index b2cbaa9234..0c929674b5 100644 --- a/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js +++ b/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js @@ -1,8 +1,8 @@ -(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["GeoIp2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["GeoIp2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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/GeoIp2/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,"Geoip2Updater",(function(){return W})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("19dc"),i=n("8bbf"),l={key:0},d={key:0},c={id:"manage-geoip-dbs"},s={class:"row",id:"geoipdb-screen1"},p={class:"geoipdb-column-1 col s6"},u=Object(i["createElementVNode"])("sup",null,[Object(i["createElementVNode"])("small",null,"*")],-1),b={class:"geoipdb-column-2 col s6"},m=["innerHTML"],g={class:"geoipdb-column-1 col s6"},f=["value"],j={class:"geoipdb-column-2 col s6"},O=["value"],h={class:"row"},w=Object(i["createTextVNode"])("* "),I=["innerHTML"],v={id:"geoipdb-screen2-download"},U={key:1,id:"geoipdb-update-info"},N=["innerHTML"],D=Object(i["createElementVNode"])("br",null,null,-1),G=Object(i["createElementVNode"])("br",null,null,-1),x=["innerHTML"],k=["innerHTML"],y=Object(i["createElementVNode"])("br",null,null,-1),P=Object(i["createElementVNode"])("br",null,null,-1),V={id:"locationProviderUpdatePeriodInlineHelp",class:"inline-help-node",ref:"inlineHelpNode"},E=["innerHTML"],_={key:1},T=Object(i["createElementVNode"])("br",null,null,-1),L=Object(i["createElementVNode"])("br",null,null,-1),B=["innerHTML"],S=["value"],C=Object(i["createElementVNode"])("div",{id:"done-updating-updater"},null,-1),M=Object(i["createElementVNode"])("div",{id:"geoipdb-update-info-error"},null,-1),H=["innerHTML"],F={key:1},R={class:"form-description"};function A(e,t,n,o,r,a){var A=Object(i["resolveComponent"])("Progressbar"),J=Object(i["resolveComponent"])("Field"),q=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(q,{"content-title":e.contentTitle,id:"geoip-db-mangement"},{default:Object(i["withCtx"])((function(){return[e.showGeoipUpdateSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[e.geoipDatabaseInstalled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",d,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("GeoIp2_NotManagingGeoIPDBs")),1),Object(i["createElementVNode"])("div",c,[Object(i["createElementVNode"])("div",s,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_IWantToDownloadFreeGeoIP")),1),u])]),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.purchasedGeoIpText)},null,8,m)]),Object(i["createElementVNode"])("div",g,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[0]||(t[0]=function(t){return e.startDownloadFreeGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,f)]),Object(i["createElementVNode"])("div",j,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",id:"start-automatic-update-geoip",onClick:t[1]||(t[1]=function(t){return e.startAutomaticUpdateGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,O)])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("sup",null,[w,Object(i["createElementVNode"])("small",{innerHTML:e.$sanitize(e.accuracyNote)},null,8,I)])])])])],512),[[i["vShow"],e.showPiwikNotManagingInfo]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",v,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(A,{label:e.freeProgressbarLabel,progress:e.progressFreeDownload},null,8,["label","progress"])])],512),[[i["vShow"],e.showFreeDownload]])])),e.geoipDatabaseInstalled&&!e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",U,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.geoIPUpdaterInstructions)},null,8,N),D,G,e.dbipLiteUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.geoliteCityLink)},null,8,x)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.maxMindLinkExplanation)},null,8,k),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[y,P,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_GeoIPUpdaterIntro"))+": ",1)],512),[[i["vShow"],e.geoipDatabaseInstalled]])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-location-db",introduction:e.translate("GeoIp2_LocationDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.translate("GeoIp2_LocationDatabaseHint"),modelValue:e.locationDbUrl,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.locationDbUrl=t})},null,8,["introduction","title","inline-help","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-isp-db",introduction:e.translate("GeoIp2_ISPDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.providerPluginHelp,modelValue:e.ispDbUrl,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.ispDbUrl=t}),disabled:!e.isProviderPluginActive},null,8,["introduction","title","inline-help","modelValue","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"radio",name:"geoip-update-period",introduction:e.translate("GeoIp2_DownloadNewDatabasesEvery"),modelValue:e.updatePeriod,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updatePeriod=t}),options:e.updatePeriodOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",V,[e.lastTimeUpdaterRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.translate("GeoIp2_UpdaterWasLastRun",e.lastTimeUpdaterRun))},null,8,E)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",_,Object(i["toDisplayString"])(e.translate("GeoIp2_UpdaterHasNotBeenRun")),1)),T,L,Object(i["createElementVNode"])("div",{id:"geoip-updater-next-run-time",innerHTML:e.$sanitize(e.nextRunTimeText)},null,8,B)],512)]})),_:1},8,["introduction","modelValue","options"])]),Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[5]||(t[5]=function(t){return e.saveGeoIpLinks()}),value:e.buttonUpdateSaveText},null,8,S),Object(i["createElementVNode"])("div",null,[C,M,Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createVNode"])(A,{progress:e.progressUpdateDownload,label:e.progressUpdateLabel},null,8,["progress","label"]),[[i["vShow"],e.isUpdatingGeoIpDatabase]])])])])):Object(i["createCommentVNode"])("",!0),e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,innerHTML:e.$sanitize(e.downloadErrorMessage)},null,8,H)):Object(i["createCommentVNode"])("",!0)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",F,[Object(i["createElementVNode"])("p",R,Object(i["toDisplayString"])(e.translate("GeoIp2_CannotSetupGeoIPAutoUpdating")),1)]))]})),_:1},8,["content-title"])}var J=n("a5a2"),q=window,$=q.$,z=Object(i["defineComponent"])({props:{geoipDatabaseStartedInstalled:Boolean,showGeoipUpdateSection:{type:Boolean,required:!0},dbipLiteUrl:{type:String,required:!0},dbipLiteFilename:{type:String,required:!0},geoipLocUrl:String,isProviderPluginActive:Boolean,geoipIspUrl:String,lastTimeUpdaterRun:String,geoipUpdatePeriod:String,updatePeriodOptions:{type:Object,required:!0},nextRunTime:Number,nextRunTimePretty:String},components:{Progressbar:a["Progressbar"],Field:J["Field"],ContentBlock:a["ContentBlock"]},data:function(){return{geoipDatabaseInstalled:!!this.geoipDatabaseStartedInstalled,showFreeDownload:!1,showPiwikNotManagingInfo:!0,progressFreeDownload:0,progressUpdateDownload:0,buttonUpdateSaveText:Object(a["translate"])("General_Save"),progressUpdateLabel:"",locationDbUrl:this.geoipLocUrl||"",ispDbUrl:this.geoipIspUrl||"",orgDbUrl:"",updatePeriod:this.geoipUpdatePeriod||"month",isUpdatingGeoIpDatabase:!1,downloadErrorMessage:null,nextRunTimePrettyUpdated:void 0}},methods:{startDownloadFreeGeoIp:function(){var e=this;this.showFreeDownload=!0,this.showPiwikNotManagingInfo=!1,this.progressFreeDownload=0,this.downloadNextChunk("downloadFreeDBIPLiteDB",(function(t){e.progressFreeDownload=t}),!1,{}).then((function(){window.location.reload()})).catch((function(t){e.geoipDatabaseInstalled=!0,e.downloadErrorMessage=t.message}))},startAutomaticUpdateGeoIp:function(){this.buttonUpdateSaveText=Object(a["translate"])("General_Continue"),this.showGeoIpUpdateInfo()},showGeoIpUpdateInfo:function(){this.geoipDatabaseInstalled=!0},saveGeoIpLinks:function(){var e=this;return a["AjaxHelper"].post({period:this.updatePeriod,module:"GeoIp2",action:"updateGeoIPLinks"},{loc_db:this.locationDbUrl,isp_db:this.ispDbUrl,org_db:this.orgDbUrl},{withTokenInUrl:!0}).then((function(t){return e.downloadNextFileIfNeeded(t,null)})).then((function(t){e.progressUpdateLabel="",e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:Object(a["translate"])("General_Done"),placeat:"#done-updating-updater",context:"success",noclear:!0,type:"toast",style:{display:"inline-block"},id:"userCountryGeoIpUpdate"}),e.nextRunTimePrettyUpdated=t.nextRunTime,$(e.$refs.inlineHelpNode).effect("highlight",{color:"#FFFFCB"},2e3)})).catch((function(t){e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:t.message,placeat:"#geoipdb-update-info-error",context:"error",style:{display:"inline-block"},id:"userCountryGeoIpUpdate",type:"transient"})}))},downloadNextFileIfNeeded:function(e,t){var n=this;if(null!==e&&void 0!==e&&e.to_download){var o=t===e.to_download;return this.progressUpdateDownload=0,this.progressUpdateLabel=e.to_download_label,this.isUpdatingGeoIpDatabase=!0,this.downloadNextChunk("downloadMissingGeoIpDb",(function(e){n.progressUpdateDownload=e}),o,{key:e.to_download}).then((function(t){return n.downloadNextFileIfNeeded(t,e.to_download)}))}return Promise.resolve(e)},downloadNextChunk:function(e,t,n,o){var r=this,i=Object.assign({},o);return a["AjaxHelper"].post({module:"GeoIp2",action:e,continue:n?1:0},i,{withTokenInUrl:!0}).catch((function(){throw new Error(Object(a["translate"])("GeoIp2_FatalErrorDuringDownload"))})).then((function(n){if(n.error)throw new Error(n.error);var a=Math.floor(n.current_size/n.expected_file_size*100);return t(Math.min(a,100)),a<100?r.downloadNextChunk(e,t,!0,o):n}))}},computed:{nextRunTimeText:function(){return this.nextRunTimePrettyUpdated?this.nextRunTimePrettyUpdated:this.nextRunTime?1e3*this.nextRunTime<Date.now()?Object(a["translate"])("GeoIp2_UpdaterScheduledForNextRun"):Object(a["translate"])("GeoIp2_UpdaterWillRunNext","<strong>".concat(this.nextRunTimePretty,"</strong>")):Object(a["translate"])("GeoIp2_UpdaterIsNotScheduledToRun")},providerPluginHelp:function(){if(!this.isProviderPluginActive){var e=Object(a["translate"])("GeoIp2_ISPRequiresProviderPlugin");return"<div style=\"margin:0\" class='alert alert-warning'>".concat(e,"</div>")}},contentTitle:function(){return Object(a["translate"])(this.geoipDatabaseInstalled?"GeoIp2_SetupAutomaticUpdatesOfGeoIP":"GeoIp2_GeoIPDatabases")},accuracyNote:function(){return Object(a["translate"])("UserCountry_GeoIpDbIpAccuracyNote",'<a href="https://dev.maxmind.com/geoip/geoip2/geolite2/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>")},purchasedGeoIpText:function(){var e="http://www.maxmind.com/en/geolocation_landing?rId=piwik";return Object(a["translate"])("GeoIp2_IPurchasedGeoIPDBs",'<a rel="noreferrer noopener" href="'.concat(e,'" target="_blank">'),"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm" target="_blank">',"</a>")},geoIPUpdaterInstructions:function(){return Object(a["translate"])("GeoIp2_GeoIPUpdaterInstructions",'<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")},geoliteCityLink:function(){var e=Object(a["translate"])("GeoIp2_GeoLiteCityLink",'<a rel="noreferrer noopener" href="'.concat(this.dbipLiteUrl,'" target="_blank">'),this.dbipLiteUrl,"</a>");return"".concat(e,"<br /><br />")},maxMindLinkExplanation:function(){var e="https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/";return Object(a["translate"])("UserCountry_MaxMindLinkExplanation",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")},freeProgressbarLabel:function(){return Object(a["translate"])("GeoIp2_DownloadingDb",'<a href="'.concat(this.dbipLiteUrl,'">').concat(this.dbipLiteFilename,"</a>..."))}}});z.render=A;var W=z; +(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["GeoIp2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["GeoIp2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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/GeoIp2/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,"GeoIp2Updater",(function(){return J})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("8bbf"),i={key:0},l={key:0},c={id:"manage-geoip-dbs"},d={class:"row",id:"geoipdb-screen1"},s={class:"geoipdb-column-1 col s6"},p=Object(a["createElementVNode"])("sup",null,[Object(a["createElementVNode"])("small",null,"*")],-1),u={class:"geoipdb-column-2 col s6"},b=["innerHTML"],m={class:"geoipdb-column-1 col s6"},g=["value"],f={class:"geoipdb-column-2 col s6"},j=["value"],O={class:"row"},h=Object(a["createTextVNode"])("* "),w=["innerHTML"],I={id:"geoipdb-screen2-download"},v={key:1,id:"geoipdb-update-info"},N=["innerHTML"],U=Object(a["createElementVNode"])("br",null,null,-1),D=Object(a["createElementVNode"])("br",null,null,-1),G=["innerHTML"],k=["innerHTML"],x=Object(a["createElementVNode"])("br",null,null,-1),y=Object(a["createElementVNode"])("br",null,null,-1),V={id:"locationProviderUpdatePeriodInlineHelp",class:"inline-help-node",ref:"inlineHelpNode"},E=["innerHTML"],P={key:1},_=Object(a["createElementVNode"])("br",null,null,-1),T=Object(a["createElementVNode"])("br",null,null,-1),L=["innerHTML"],C=["value"],S=Object(a["createElementVNode"])("div",{id:"done-updating-updater"},null,-1),M=Object(a["createElementVNode"])("div",{id:"geoipdb-update-info-error"},null,-1),B=["innerHTML"],H={key:1},F={class:"form-description"};function R(e,t,n,o,r,R){var A=Object(a["resolveComponent"])("Progressbar"),q=Object(a["resolveComponent"])("Field"),$=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])($,{"content-title":e.contentTitle,id:"geoip-db-mangement"},{default:Object(a["withCtx"])((function(){return[e.showGeoipUpdateSection?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",i,[e.geoipDatabaseInstalled?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",l,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("GeoIp2_NotManagingGeoIPDBs")),1),Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("div",d,[Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("GeoIp2_IWantToDownloadFreeGeoIP")),1),p])]),Object(a["createElementVNode"])("div",u,[Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.purchasedGeoIpText)},null,8,b)]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[0]||(t[0]=function(t){return e.startDownloadFreeGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,g)]),Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("input",{type:"button",class:"btn",id:"start-automatic-update-geoip",onClick:t[1]||(t[1]=function(t){return e.startAutomaticUpdateGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,j)])]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("sup",null,[h,Object(a["createElementVNode"])("small",{innerHTML:e.$sanitize(e.accuracyNote)},null,8,w)])])])])],512),[[a["vShow"],e.showPiwikNotManagingInfo]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",I,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(A,{label:e.freeProgressbarLabel,progress:e.progressFreeDownload},null,8,["label","progress"])])],512),[[a["vShow"],e.showFreeDownload]])])),e.geoipDatabaseInstalled&&!e.downloadErrorMessage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",v,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.geoIPUpdaterInstructions)},null,8,N),U,D,e.dbipLiteUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.geoliteCityLink)},null,8,G)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.maxMindLinkExplanation)},null,8,k),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,[x,y,Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("GeoIp2_GeoIPUpdaterIntro"))+": ",1)],512),[[a["vShow"],e.geoipDatabaseInstalled]])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(q,{uicontrol:"text",name:"geoip-location-db",introduction:e.translate("GeoIp2_LocationDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.translate("GeoIp2_LocationDatabaseHint"),modelValue:e.locationDbUrl,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.locationDbUrl=t})},null,8,["introduction","title","inline-help","modelValue"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(q,{uicontrol:"text",name:"geoip-isp-db",introduction:e.translate("GeoIp2_ISPDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.providerPluginHelp,modelValue:e.ispDbUrl,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.ispDbUrl=t}),disabled:!e.isProviderPluginActive},null,8,["introduction","title","inline-help","modelValue","disabled"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(q,{uicontrol:"radio",name:"geoip-update-period",introduction:e.translate("GeoIp2_DownloadNewDatabasesEvery"),modelValue:e.updatePeriod,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updatePeriod=t}),options:e.updatePeriodOptions},{"inline-help":Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",V,[e.lastTimeUpdaterRun?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.translate("GeoIp2_UpdaterWasLastRun",e.lastTimeUpdaterRun))},null,8,E)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",P,Object(a["toDisplayString"])(e.translate("GeoIp2_UpdaterHasNotBeenRun")),1)),_,T,Object(a["createElementVNode"])("div",{id:"geoip-updater-next-run-time",innerHTML:e.$sanitize(e.nextRunTimeText)},null,8,L)],512)]})),_:1},8,["introduction","modelValue","options"])]),Object(a["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[5]||(t[5]=function(t){return e.saveGeoIpLinks()}),value:e.buttonUpdateSaveText},null,8,C),Object(a["createElementVNode"])("div",null,[S,M,Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(A,{progress:e.progressUpdateDownload,label:e.progressUpdateLabel},null,8,["progress","label"]),[[a["vShow"],e.isUpdatingGeoIpDatabase]])])])])):Object(a["createCommentVNode"])("",!0),e.downloadErrorMessage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:2,innerHTML:e.$sanitize(e.downloadErrorMessage)},null,8,B)):Object(a["createCommentVNode"])("",!0)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",H,[Object(a["createElementVNode"])("p",F,Object(a["toDisplayString"])(e.translate("GeoIp2_CannotSetupGeoIPAutoUpdating")),1)]))]})),_:1},8,["content-title"])}var A=n("19dc"),q=n("a5a2"),$=window,z=$.$,W=Object(a["defineComponent"])({props:{geoipDatabaseStartedInstalled:Boolean,showGeoipUpdateSection:{type:Boolean,required:!0},dbipLiteUrl:{type:String,required:!0},dbipLiteFilename:{type:String,required:!0},geoipLocUrl:String,isProviderPluginActive:Boolean,geoipIspUrl:String,lastTimeUpdaterRun:String,geoipUpdatePeriod:String,updatePeriodOptions:{type:Object,required:!0},nextRunTime:Number,nextRunTimePretty:String},components:{Progressbar:A["Progressbar"],Field:q["Field"],ContentBlock:A["ContentBlock"]},data:function(){return{geoipDatabaseInstalled:!!this.geoipDatabaseStartedInstalled,showFreeDownload:!1,showPiwikNotManagingInfo:!0,progressFreeDownload:0,progressUpdateDownload:0,buttonUpdateSaveText:Object(A["translate"])("General_Save"),progressUpdateLabel:"",locationDbUrl:this.geoipLocUrl||"",ispDbUrl:this.geoipIspUrl||"",orgDbUrl:"",updatePeriod:this.geoipUpdatePeriod||"month",isUpdatingGeoIpDatabase:!1,downloadErrorMessage:null,nextRunTimePrettyUpdated:void 0}},methods:{startDownloadFreeGeoIp:function(){var e=this;this.showFreeDownload=!0,this.showPiwikNotManagingInfo=!1,this.progressFreeDownload=0,this.downloadNextChunk("downloadFreeDBIPLiteDB",(function(t){e.progressFreeDownload=t}),!1,{}).then((function(){window.location.reload()})).catch((function(t){e.geoipDatabaseInstalled=!0,e.downloadErrorMessage=t.message}))},startAutomaticUpdateGeoIp:function(){this.buttonUpdateSaveText=Object(A["translate"])("General_Continue"),this.showGeoIpUpdateInfo()},showGeoIpUpdateInfo:function(){this.geoipDatabaseInstalled=!0},saveGeoIpLinks:function(){var e=this;return A["AjaxHelper"].post({period:this.updatePeriod,module:"GeoIp2",action:"updateGeoIPLinks"},{loc_db:this.locationDbUrl,isp_db:this.ispDbUrl,org_db:this.orgDbUrl},{withTokenInUrl:!0}).then((function(t){return e.downloadNextFileIfNeeded(t,null)})).then((function(t){e.progressUpdateLabel="",e.isUpdatingGeoIpDatabase=!1,A["NotificationsStore"].show({message:Object(A["translate"])("General_Done"),placeat:"#done-updating-updater",context:"success",noclear:!0,type:"toast",style:{display:"inline-block"},id:"userCountryGeoIpUpdate"}),e.nextRunTimePrettyUpdated=t.nextRunTime,z(e.$refs.inlineHelpNode).effect("highlight",{color:"#FFFFCB"},2e3)})).catch((function(t){e.isUpdatingGeoIpDatabase=!1,A["NotificationsStore"].show({message:t.message,placeat:"#geoipdb-update-info-error",context:"error",style:{display:"inline-block"},id:"userCountryGeoIpUpdate",type:"transient"})}))},downloadNextFileIfNeeded:function(e,t){var n=this;if(null!==e&&void 0!==e&&e.to_download){var o=t===e.to_download;return this.progressUpdateDownload=0,this.progressUpdateLabel=e.to_download_label,this.isUpdatingGeoIpDatabase=!0,this.downloadNextChunk("downloadMissingGeoIpDb",(function(e){n.progressUpdateDownload=e}),o,{key:e.to_download}).then((function(t){return n.downloadNextFileIfNeeded(t,e.to_download)}))}return Promise.resolve(e)},downloadNextChunk:function(e,t,n,o){var r=this,a=Object.assign({},o);return A["AjaxHelper"].post({module:"GeoIp2",action:e,continue:n?1:0},a,{withTokenInUrl:!0}).catch((function(){throw new Error(Object(A["translate"])("GeoIp2_FatalErrorDuringDownload"))})).then((function(n){if(n.error)throw new Error(n.error);var a=Math.floor(n.current_size/n.expected_file_size*100);return t(Math.min(a,100)),a<100?r.downloadNextChunk(e,t,!0,o):n}))}},computed:{nextRunTimeText:function(){return this.nextRunTimePrettyUpdated?this.nextRunTimePrettyUpdated:this.nextRunTime?1e3*this.nextRunTime<Date.now()?Object(A["translate"])("GeoIp2_UpdaterScheduledForNextRun"):Object(A["translate"])("GeoIp2_UpdaterWillRunNext","<strong>".concat(this.nextRunTimePretty,"</strong>")):Object(A["translate"])("GeoIp2_UpdaterIsNotScheduledToRun")},providerPluginHelp:function(){if(!this.isProviderPluginActive){var e=Object(A["translate"])("GeoIp2_ISPRequiresProviderPlugin");return"<div style=\"margin:0\" class='alert alert-warning'>".concat(e,"</div>")}},contentTitle:function(){return Object(A["translate"])(this.geoipDatabaseInstalled?"GeoIp2_SetupAutomaticUpdatesOfGeoIP":"GeoIp2_GeoIPDatabases")},accuracyNote:function(){return Object(A["translate"])("UserCountry_GeoIpDbIpAccuracyNote",'<a href="https://dev.maxmind.com/geoip/geoip2/geolite2/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>")},purchasedGeoIpText:function(){var e="http://www.maxmind.com/en/geolocation_landing?rId=piwik";return Object(A["translate"])("GeoIp2_IPurchasedGeoIPDBs",'<a rel="noreferrer noopener" href="'.concat(e,'" target="_blank">'),"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm" target="_blank">',"</a>")},geoIPUpdaterInstructions:function(){return Object(A["translate"])("GeoIp2_GeoIPUpdaterInstructions",'<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")},geoliteCityLink:function(){var e=Object(A["translate"])("GeoIp2_GeoLiteCityLink",'<a rel="noreferrer noopener" href="'.concat(this.dbipLiteUrl,'" target="_blank">'),this.dbipLiteUrl,"</a>");return"".concat(e,"<br /><br />")},maxMindLinkExplanation:function(){var e="https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/";return Object(A["translate"])("UserCountry_MaxMindLinkExplanation",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")},freeProgressbarLabel:function(){return Object(A["translate"])("GeoIp2_DownloadingDb",'<a href="'.concat(this.dbipLiteUrl,'">').concat(this.dbipLiteFilename,"</a>..."))}}});W.render=R;var J=W; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */Object(a["createAngularJsAdapter"])({component:W,scope:{geoIpDatabasesInstalled:{angularJsBind:"<"},showGeoIpUpdateSection:{angularJsBind:"<"},dbipLiteUrl:{angularJsBind:"<"},dbipLiteFilename:{angularJsBind:"<"},geoipLocUrl:{angularJsBind:"<"},isProviderPluginActive:{angularJsBind:"<"},geoipIspUrl:{angularJsBind:"<"},lastTimeUpdaterRun:{angularJsBind:"<"},geoipUpdatePeriod:{angularJsBind:"<"},updatePeriodOptions:{angularJsBind:"<"},geoipDatabaseStartedInstalled:{angularJsBind:"<"},showGeoipUpdateSection:{angularJsBind:"<"},nextRunTime:{angularJsBind:"<"},nextRunTimePretty:{angularJsBind:"<"}},directiveName:"piwikGeoip2Updater",transclude:!0})}})})); + */}})})); //# sourceMappingURL=GeoIp2.umd.min.js.map
\ No newline at end of file diff --git a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue b/plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue index ceca56f526..ceca56f526 100644 --- a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue +++ b/plugins/GeoIp2/vue/src/GeoIp2Updater/GeoIp2Updater.vue diff --git a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.adapter.ts b/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.adapter.ts deleted file mode 100644 index 4ab8d05aa8..0000000000 --- a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.adapter.ts +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -import { createAngularJsAdapter } from 'CoreHome'; -import Geoip2Updater from './Geoip2Updater.vue'; - -export default createAngularJsAdapter({ - component: Geoip2Updater, - scope: { - geoIpDatabasesInstalled: { - angularJsBind: '<', - }, - showGeoIpUpdateSection: { - angularJsBind: '<', - }, - dbipLiteUrl: { - angularJsBind: '<', - }, - dbipLiteFilename: { - angularJsBind: '<', - }, - geoipLocUrl: { - angularJsBind: '<', - }, - isProviderPluginActive: { - angularJsBind: '<', - }, - geoipIspUrl: { - angularJsBind: '<', - }, - lastTimeUpdaterRun: { - angularJsBind: '<', - }, - geoipUpdatePeriod: { - angularJsBind: '<', - }, - updatePeriodOptions: { - angularJsBind: '<', - }, - geoipDatabaseStartedInstalled: { - angularJsBind: '<', - }, - showGeoipUpdateSection: { - angularJsBind: '<', - }, - nextRunTime: { - angularJsBind: '<', - }, - nextRunTimePretty: { - angularJsBind: '<', - }, - }, - directiveName: 'piwikGeoip2Updater', - transclude: true, -}); diff --git a/plugins/GeoIp2/vue/src/index.ts b/plugins/GeoIp2/vue/src/index.ts index f7050104d1..bc5fcb8871 100644 --- a/plugins/GeoIp2/vue/src/index.ts +++ b/plugins/GeoIp2/vue/src/index.ts @@ -5,6 +5,4 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import './Geoip2Updater/Geoip2Updater.adapter'; - -export { default as Geoip2Updater } from './Geoip2Updater/Geoip2Updater.vue'; +export { default as GeoIp2Updater } from './GeoIp2Updater/GeoIp2Updater.vue'; |