| (function webpackUniversalModuleDefinition(root, factory) { |
| if(typeof exports === 'object' && typeof module === 'object') |
| module.exports = factory(require("CoreHome"), require("vue")); |
| else if(typeof define === 'function' && define.amd) |
| define(["CoreHome", ], factory); |
| else if(typeof exports === 'object') |
| exports["CustomVariables"] = factory(require("CoreHome"), require("vue")); |
| else |
| root["CustomVariables"] = factory(root["CoreHome"], root["Vue"]); |
| })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__) { |
| return (function(modules) { |
| |
| var installedModules = {}; |
| |
| |
| function __webpack_require__(moduleId) { |
| |
| |
| if(installedModules[moduleId]) { |
| return installedModules[moduleId].exports; |
| } |
| |
| var module = installedModules[moduleId] = { |
| i: moduleId, |
| l: false, |
| exports: {} |
| }; |
| |
| |
| modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| |
| |
| module.l = true; |
| |
| |
| return module.exports; |
| } |
| |
| |
| |
| __webpack_require__.m = modules; |
| |
| |
| __webpack_require__.c = installedModules; |
| |
| |
| __webpack_require__.d = function(exports, name, getter) { |
| if(!__webpack_require__.o(exports, name)) { |
| Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
| } |
| }; |
| |
| |
| __webpack_require__.r = function(exports) { |
| if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| } |
| Object.defineProperty(exports, '__esModule', { value: true }); |
| }; |
| |
| |
| |
| |
| |
| |
| __webpack_require__.t = function(value, mode) { |
| if(mode & 1) value = __webpack_require__(value); |
| if(mode & 8) return value; |
| if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
| var ns = Object.create(null); |
| __webpack_require__.r(ns); |
| Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
| if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
| return ns; |
| }; |
| |
| |
| __webpack_require__.n = function(module) { |
| var getter = module && module.__esModule ? |
| function getDefault() { return module['default']; } : |
| function getModuleExports() { return module; }; |
| __webpack_require__.d(getter, 'a', getter); |
| return getter; |
| }; |
| |
| |
| __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
| |
| |
| __webpack_require__.p = "plugins/CustomVariables/vue/dist/"; |
| |
| |
| |
| return __webpack_require__(__webpack_require__.s = "fae3"); |
| }) |
| |
| ({ |
|
|
| "19dc": |
| (function(module, exports) { |
|
|
| module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; |
|
|
| }), |
|
|
| "8bbf": |
| (function(module, exports) { |
|
|
| module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; |
|
|
| }), |
|
|
| "fae3": |
| (function(module, __webpack_exports__, __webpack_require__) { |
|
|
| "use strict"; |
| |
| __webpack_require__.r(__webpack_exports__); |
|
|
| |
| __webpack_require__.d(__webpack_exports__, "ManageCustomVarsStore", function() { return ManageCustomVars_store; }); |
| __webpack_require__.d(__webpack_exports__, "ManageCustomVars", function() { return ManageCustomVars; }); |
|
|
| |
| |
|
|
| if (typeof window !== 'undefined') { |
| var currentScript = window.document.currentScript |
| if (false) { var getCurrentScript; } |
|
|
| var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/) |
| if (src) { |
| __webpack_require__.p = src[1] |
| } |
| } |
|
|
| |
| var setPublicPath = (null); |
|
|
| |
| var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); |
|
|
| |
| var external_CoreHome_ = __webpack_require__("19dc"); |
|
|
| |
| function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } |
|
|
| function _nonIterableRest() { 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } |
|
|
| function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } |
|
|
| function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } |
|
|
| function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } |
|
|
| function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } |
|
|
| function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } |
|
|
| function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } |
|
|
| function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } |
|
|
| |
| |
| |
| |
| |
| |
|
|
|
|
|
|
| var ManageCustomVars_store_ManageCustomVarsStore = function () { |
| function ManageCustomVarsStore() { |
| var _this = this; |
|
|
| _classCallCheck(this, ManageCustomVarsStore); |
|
|
| _defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ |
| customVariables: [], |
| isLoading: false, |
| hasCustomVariablesInGeneral: false, |
| hasAtLeastOneUsage: false, |
| numSlotsAvailable: 5 |
| })); |
|
|
| _defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { |
| return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); |
| })); |
| } |
|
|
| _createClass(ManageCustomVarsStore, [{ |
| key: "init", |
| value: function init() { |
| return this.fetchUsages(); |
| } |
| }, { |
| key: "fetchCustomVariables", |
| value: function fetchCustomVariables() { |
| var _this2 = this; |
|
|
| return external_CoreHome_["AjaxHelper"].fetch({ |
| method: 'CustomVariables.getCustomVariables', |
| period: 'year', |
| date: 'today', |
| filter_limit: 1 |
| }).then(function (customVariables) { |
| _this2.privateState.hasCustomVariablesInGeneral = (customVariables === null || customVariables === void 0 ? void 0 : customVariables.length) > 0; |
| }); |
| } |
| }, { |
| key: "fetchUsages", |
| value: function fetchUsages() { |
| var _this3 = this; |
|
|
| this.privateState.isLoading = true; |
| return Promise.all([this.fetchCustomVariables(), external_CoreHome_["AjaxHelper"].fetch({ |
| method: 'CustomVariables.getUsagesOfSlots', |
| filter_limit: '-1' |
| })]).then(function (_ref) { |
| var _ref2 = _slicedToArray(_ref, 2), |
| customVariableUsages = _ref2[1]; |
|
|
| _this3.privateState.customVariables = customVariableUsages; |
| customVariableUsages.forEach(function (customVar) { |
| if (customVar.index > _this3.state.value.numSlotsAvailable) { |
| _this3.privateState.numSlotsAvailable = customVar.index; |
| } |
|
|
| if (customVar.usages && customVar.usages.length > 0) { |
| _this3.privateState.hasAtLeastOneUsage = true; |
| } |
| }); |
| }).finally(function () { |
| _this3.privateState.isLoading = false; |
| }); |
| } |
| }]); |
|
|
| return ManageCustomVarsStore; |
| }(); |
|
|
| var ManageCustomVars_store = (new ManageCustomVars_store_ManageCustomVarsStore()); |
| |
|
|
| var _hoisted_1 = { |
| class: "manageCustomVars" |
| }; |
| var _hoisted_2 = ["innerHTML"]; |
| var _hoisted_3 = { |
| class: "index" |
| }; |
| var _hoisted_4 = ["title"]; |
| var _hoisted_5 = { |
| key: 0 |
| }; |
|
|
| var _hoisted_6 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); |
|
|
| var _hoisted_7 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); |
|
|
| var _hoisted_8 = ["innerHTML"]; |
|
|
| var _hoisted_9 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); |
|
|
| var _hoisted_10 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); |
|
|
| var _hoisted_11 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); |
|
|
| var _hoisted_12 = ["textContent"]; |
| function 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"); |
|
|
| var _directive_content_intro = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-intro"); |
|
|
| var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); |
|
|
| var _directive_select_on_focus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("select-on-focus"); |
|
|
| return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { |
| "help-url": "https://matomo.org/docs/custom-variables/" |
| }, { |
| default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { |
| return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_CustomVariables')), 1)]; |
| }), |
| _: 1 |
| })]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { |
| innerHTML: _ctx.$sanitize(_ctx.translate('CustomVariables_ManageDescription', _ctx.siteName)) |
| }, null, 8, _hoisted_2)])], 512), [[_directive_content_intro]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { |
| class: "alert alert-info" |
| }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_SlotsReportIsGeneratedOverTime')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading && _ctx.hasCustomVariablesInGeneral && !_ctx.hasAtLeastOneUsage]]), (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.scopes, function (scope) { |
| return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { |
| key: scope.name |
| }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { |
| "content-title": _ctx.translate('CustomVariables_ScopeX', scope.name) |
| }, { |
| default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { |
| return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_Index')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_Usages')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { |
| colspan: "3" |
| }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Loading')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _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.customVariablesByScope[scope.value], function (customVariables, index) { |
| return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { |
| key: index |
| }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(customVariables.index), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { |
| class: "unused" |
| }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_Unused')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], customVariables.usages.length === 0]]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sortUsages(customVariables), function (cvar, cvarIndex) { |
| 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"])("span", { |
| key: cvarIndex |
| }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { |
| title: _ctx.translate('CustomVariables_UsageDetails', cvar.nb_visits ? cvar.nb_visits : 0, cvar.nb_actions ? cvar.nb_actions : 0) |
| }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(cvar.name), 9, _hoisted_4), cvarIndex < customVariables.usages.length - 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_5, ", ")) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], customVariables.usages.length]]); |
| }), 128))])]); |
| }), 128))])], 512), [[_directive_content_table]])]; |
| }), |
| _: 2 |
| }, 1032, ["content-title"])]); |
| }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { |
| id: "CustomVariablesCreateNewSlot", |
| "content-title": _ctx.translate('CustomVariables_CreateNewSlot') |
| }, { |
| default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { |
| return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [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('CustomVariables_CreatingCustomVariableTakesTime')) + " ", 1), _hoisted_6, _hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { |
| innerHTML: _ctx.$sanitize(_ctx.currentAvailableCustomVariablesText) |
| }, null, 8, _hoisted_8), _hoisted_9, _hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CustomVariables_ToCreateCustomVarExecute')) + " ", 1), _hoisted_11]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("pre", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("code", { |
| textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.setMaxCustomVariablesCmd) |
| }, null, 8, _hoisted_12)], 512), [[_directive_select_on_focus, {}]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading]])]; |
| }), |
| _: 1 |
| }, 8, ["content-title"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isLoading]])]); |
| } |
| |
|
|
| |
| function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || ManageCustomVarsvue_type_script_lang_ts_unsupportedIterableToArray(arr) || _nonIterableSpread(); } |
|
|
| function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } |
|
|
| function ManageCustomVarsvue_type_script_lang_ts_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ManageCustomVarsvue_type_script_lang_ts_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ManageCustomVarsvue_type_script_lang_ts_arrayLikeToArray(o, minLen); } |
|
|
| function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } |
|
|
| function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ManageCustomVarsvue_type_script_lang_ts_arrayLikeToArray(arr); } |
|
|
| function ManageCustomVarsvue_type_script_lang_ts_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } |
|
|
|
|
|
|
|
|
| var ManageCustomVarsvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ |
| components: { |
| EnrichedHeadline: external_CoreHome_["EnrichedHeadline"], |
| ContentBlock: external_CoreHome_["ContentBlock"] |
| }, |
| directives: { |
| ContentIntro: external_CoreHome_["ContentIntro"], |
| ContentTable: external_CoreHome_["ContentTable"], |
| SelectOnFocus: external_CoreHome_["SelectOnFocus"] |
| }, |
| data: function data() { |
| return { |
| siteName: external_CoreHome_["Matomo"].siteName, |
| scopes: [{ |
| value: 'visit', |
| name: Object(external_CoreHome_["translate"])('General_TrackingScopeVisit') |
| }, { |
| value: 'page', |
| name: Object(external_CoreHome_["translate"])('General_TrackingScopePage') |
| }] |
| }; |
| }, |
| created: function created() { |
| ManageCustomVars_store.init(); |
| }, |
| methods: { |
| sortUsages: function sortUsages(customVar) { |
| var result = _toConsumableArray(customVar.usages); |
|
|
| result.sort(function (lhs, rhs) { |
| var rhsActions = "".concat(rhs.nb_actions); |
| var lhsActions = "".concat(lhs.nb_actions); |
| return parseInt(rhsActions, 10) - parseInt(lhsActions, 10); |
| }); |
| return result; |
| } |
| }, |
| computed: { |
| isLoading: function isLoading() { |
| return ManageCustomVars_store.state.value.isLoading; |
| }, |
| hasCustomVariablesInGeneral: function hasCustomVariablesInGeneral() { |
| return ManageCustomVars_store.state.value.hasCustomVariablesInGeneral; |
| }, |
| hasAtLeastOneUsage: function hasAtLeastOneUsage() { |
| return ManageCustomVars_store.state.value.hasAtLeastOneUsage; |
| }, |
| numSlotsAvailable: function numSlotsAvailable() { |
| return ManageCustomVars_store.state.value.numSlotsAvailable; |
| }, |
| customVariablesByScope: function customVariablesByScope() { |
| var result = {}; |
| ManageCustomVars_store.state.value.customVariables.forEach(function (customVar) { |
| result[customVar.scope] = result[customVar.scope] || []; |
| result[customVar.scope].push(customVar); |
| }); |
| return result; |
| }, |
| currentAvailableCustomVariablesText: function currentAvailableCustomVariablesText() { |
| return Object(external_CoreHome_["translate"])('CustomVariables_CurrentAvailableCustomVariables', "<strong>".concat(this.numSlotsAvailable, "</strong>")); |
| }, |
| setMaxCustomVariablesCmd: function setMaxCustomVariablesCmd() { |
| return "./console customvariables:set-max-custom-variables ".concat(this.numSlotsAvailable + 1); |
| } |
| } |
| })); |
| |
| |
| |
|
|
|
|
|
|
| ManageCustomVarsvue_type_script_lang_ts.render = render |
|
|
| var ManageCustomVars = (ManageCustomVarsvue_type_script_lang_ts); |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
|
|
|
|
|
|
|
|
| }) |
|
|
| }); |
| }); |
| |