Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-03-08 06:44:55 +0300
committerGitHub <noreply@github.com>2022-03-08 06:44:55 +0300
commita3bfb7bf5a06d173b9d733587d164890282dfed1 (patch)
tree87567c02b10bb24b40b61f26d76aff5af3cd3e55 /plugins/Goals
parent284c380bf85e9a5a89f6667c59c5a86e35eb08c1 (diff)
[Vue] fix typo in directive name causing strange regressions (#18894)
* fix typo in directive name causing strange regressions * built vue files * update screenshot
Diffstat (limited to 'plugins/Goals')
-rw-r--r--plugins/Goals/vue/dist/Goals.umd.js237
-rw-r--r--plugins/Goals/vue/dist/Goals.umd.min.js9
-rw-r--r--plugins/Goals/vue/src/GoalPageLink/GoalPageLink.adapter.ts4
-rw-r--r--plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts2
4 files changed, 249 insertions, 3 deletions
diff --git a/plugins/Goals/vue/dist/Goals.umd.js b/plugins/Goals/vue/dist/Goals.umd.js
new file mode 100644
index 0000000000..b12794fad0
--- /dev/null
+++ b/plugins/Goals/vue/dist/Goals.umd.js
@@ -0,0 +1,237 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory(require("CoreHome"));
+ else if(typeof define === 'function' && define.amd)
+ define(["CoreHome"], factory);
+ else if(typeof exports === 'object')
+ exports["Goals"] = factory(require("CoreHome"));
+ else
+ root["Goals"] = factory(root["CoreHome"]);
+})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__) {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "plugins/Goals/vue/dist/";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = "fae3");
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "19dc":
+/***/ (function(module, exports) {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;
+
+/***/ }),
+
+/***/ "fae3":
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+// ESM COMPAT FLAG
+__webpack_require__.r(__webpack_exports__);
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, "GoalPageLink", function() { return /* reexport */ GoalPageLink_GoalPageLink; });
+
+// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
+// This file is imported into lib/wc client bundles.
+
+if (typeof window !== 'undefined') {
+ var currentScript = window.document.currentScript
+ if (false) { var getCurrentScript; }
+
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
+ if (src) {
+ __webpack_require__.p = src[1] // eslint-disable-line
+ }
+}
+
+// Indicate to webpack that this file can be concatenated
+/* harmony default export */ var setPublicPath = (null);
+
+// EXTERNAL MODULE: external "CoreHome"
+var external_CoreHome_ = __webpack_require__("19dc");
+
+// CONCATENATED MODULE: ./plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+var _window = window,
+ $ = _window.$; // usage v-goal-page-link="{ idGoal: 5 }"
+
+var GoalPageLink = {
+ mounted: function mounted(el, binding) {
+ if (!external_CoreHome_["Matomo"].helper.isAngularRenderingThePage()) {
+ return;
+ }
+
+ var title = $(el).text();
+ var link = $('<a></a>');
+ link.text(title);
+ link.attr('title', Object(external_CoreHome_["translate"])('Goals_ClickToViewThisGoal'));
+ link.click(function (e) {
+ e.preventDefault();
+ external_CoreHome_["MatomoUrl"].updateHash(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, {
+ category: 'Goals_Goals',
+ subcategory: binding.value.idGoal
+ }));
+ });
+ $(el).html(link[0]);
+ }
+};
+/* harmony default export */ var GoalPageLink_GoalPageLink = (GoalPageLink); // manually handle occurrence of goal-page-link on datatable html attributes since dataTable.js is
+// not managed by vue.
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+
+external_CoreHome_["Matomo"].on('Matomo.processDynamicHtml', function ($element) {
+ $element.find('[goal-page-link]').each(function (i, e) {
+ if ($(e).attr('goal-page-link-handled')) {
+ return;
+ }
+
+ var idGoal = $(e).attr('goal-page-link');
+
+ if (idGoal) {
+ GoalPageLink.mounted(e, {
+ instance: null,
+ value: {
+ idGoal: idGoal
+ },
+ oldValue: null,
+ modifiers: {},
+ dir: {}
+ });
+ }
+
+ $(e).attr('goal-page-link-handled', '1');
+ });
+});
+// CONCATENATED MODULE: ./plugins/Goals/vue/src/GoalPageLink/GoalPageLink.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
+ */
+
+function piwikGoalPageLink() {
+ return {
+ restrict: 'A',
+ link: function piwikGoalPageLinkLink(scope, element, attrs) {
+ var binding = {
+ instance: null,
+ value: {
+ idGoal: attrs.piwikGoalPageLink
+ },
+ oldValue: null,
+ modifiers: {},
+ dir: {}
+ };
+ GoalPageLink_GoalPageLink.mounted(element[0], binding);
+ }
+ };
+}
+window.angular.module('piwikApp').directive('piwikGoalPageLink', piwikGoalPageLink);
+// CONCATENATED MODULE: ./plugins/Goals/vue/src/index.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @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
+
+
+
+
+/***/ })
+
+/******/ });
+});
+//# sourceMappingURL=Goals.umd.js.map \ No newline at end of file
diff --git a/plugins/Goals/vue/dist/Goals.umd.min.js b/plugins/Goals/vue/dist/Goals.umd.min.js
new file mode 100644
index 0000000000..bb91dc1933
--- /dev/null
+++ b/plugins/Goals/vue/dist/Goals.umd.min.js
@@ -0,0 +1,9 @@
+(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Goals"]=t(require("CoreHome")):e["Goals"]=t(e["CoreHome"])})("undefined"!==typeof self?self:this,(function(e){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/Goals/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"GoalPageLink",(function(){return c})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),a=window,l=a.$,u={mounted:function(e,t){if(i["Matomo"].helper.isAngularRenderingThePage()){var n=l(e).text(),o=l("<a></a>");o.text(n),o.attr("title",Object(i["translate"])("Goals_ClickToViewThisGoal")),o.click((function(e){e.preventDefault(),i["MatomoUrl"].updateHash(Object.assign(Object.assign({},i["MatomoUrl"].hashParsed.value),{},{category:"Goals_Goals",subcategory:t.value.idGoal}))})),l(e).html(o[0])}}},c=u;
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+function f(){return{restrict:"A",link:function(e,t,n){var o={instance:null,value:{idGoal:n.piwikGoalPageLink},oldValue:null,modifiers:{},dir:{}};c.mounted(t[0],o)}}}i["Matomo"].on("Matomo.processDynamicHtml",(function(e){e.find("[goal-page-link]").each((function(e,t){if(!l(t).attr("goal-page-link-handled")){var n=l(t).attr("goal-page-link");n&&u.mounted(t,{instance:null,value:{idGoal:n},oldValue:null,modifiers:{},dir:{}}),l(t).attr("goal-page-link-handled","1")}}))})),window.angular.module("piwikApp").directive("piwikGoalPageLink",f)}})}));
+//# sourceMappingURL=Goals.umd.min.js.map \ No newline at end of file
diff --git a/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.adapter.ts b/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.adapter.ts
index 5d0948a973..5966c7f3c1 100644
--- a/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.adapter.ts
+++ b/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.adapter.ts
@@ -11,7 +11,7 @@ import GoalPageLink from './GoalPageLink';
export default function piwikGoalPageLink(): IDirective {
return {
restrict: 'A',
- link: function expandOnClickLink(scope: IScope, element: JQuery, attrs: IAttributes) {
+ link: function piwikGoalPageLinkLink(scope: IScope, element: JQuery, attrs: IAttributes) {
const binding = {
instance: null,
value: {
@@ -27,4 +27,4 @@ export default function piwikGoalPageLink(): IDirective {
};
}
-window.angular.module('piwikApp').directive('piwikExpandOnClick', piwikGoalPageLink);
+window.angular.module('piwikApp').directive('piwikGoalPageLink', piwikGoalPageLink);
diff --git a/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts b/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts
index 53c9b7d33a..c4a62da735 100644
--- a/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts
+++ b/plugins/Goals/vue/src/GoalPageLink/GoalPageLink.ts
@@ -36,7 +36,7 @@ const GoalPageLink = {
});
});
- $(el).html(link);
+ $(el).html(link[0]);
},
};