@jctrans-materials/nuxt 1.0.40-beta.6 → 1.0.40-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/plugin.client.js +12 -4
- package/package.json +5 -5
package/dist/module.json
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { callOnce, defineNuxtPlugin, useRuntimeConfig, useRouter } from "#app";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
getOrCreateClientId,
|
|
4
|
+
normalizeClickPageAttrs,
|
|
5
|
+
tracker
|
|
6
|
+
} from "@jctrans-materials/shared";
|
|
3
7
|
import { nextTick } from "vue";
|
|
4
8
|
const pickString = (...values) => {
|
|
5
9
|
for (const value of values) {
|
|
@@ -91,11 +95,15 @@ const bindTrackHandler = (element, binding, gio) => {
|
|
|
91
95
|
if (normalized.stop && "stopPropagation" in event) {
|
|
92
96
|
event.stopPropagation();
|
|
93
97
|
}
|
|
94
|
-
|
|
98
|
+
const normalizedAttrs = normalizeClickPageAttrs(
|
|
99
|
+
normalized.eventName,
|
|
100
|
+
normalized.attrs
|
|
101
|
+
);
|
|
102
|
+
gio.track(normalized.eventName, normalizedAttrs, () => {
|
|
95
103
|
normalized.callback?.({
|
|
96
104
|
event,
|
|
97
105
|
eventName: normalized.eventName,
|
|
98
|
-
attrs:
|
|
106
|
+
attrs: normalizedAttrs,
|
|
99
107
|
trigger: normalized.trigger
|
|
100
108
|
});
|
|
101
109
|
});
|
|
@@ -201,7 +209,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
201
209
|
const trackEvent = (eventName, attrs) => {
|
|
202
210
|
const normalizedEvent = pickString(eventName);
|
|
203
211
|
if (!normalizedEvent) return;
|
|
204
|
-
gio.track(normalizedEvent, attrs
|
|
212
|
+
gio.track(normalizedEvent, normalizeClickPageAttrs(normalizedEvent, attrs));
|
|
205
213
|
};
|
|
206
214
|
const directiveName = normalizeDirectiveName(
|
|
207
215
|
globalTracking.directiveName || runtimeTracking.directiveName
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jctrans-materials/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.40-beta.
|
|
4
|
+
"version": "1.0.40-beta.7",
|
|
5
5
|
"description": "Nuxt module for JCtrans UI components",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"nuxt": "^3.0.0",
|
|
23
23
|
"vue": "^3.5.26",
|
|
24
24
|
"vue-router": "^4.6.4",
|
|
25
|
-
"@jctrans-materials/comps-vue3": "1.0.40-beta.
|
|
26
|
-
"@jctrans-materials/shared": "1.0.40-beta.
|
|
25
|
+
"@jctrans-materials/comps-vue3": "1.0.40-beta.7",
|
|
26
|
+
"@jctrans-materials/shared": "1.0.40-beta.7"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"gio-webjs-sdk": "^4.0.0",
|
|
30
30
|
"nuxt": "^3.0.0",
|
|
31
|
-
"@jctrans-materials/comps-vue3": "1.0.40-beta.
|
|
32
|
-
"@jctrans-materials/shared": "1.0.40-beta.
|
|
31
|
+
"@jctrans-materials/comps-vue3": "1.0.40-beta.7",
|
|
32
|
+
"@jctrans-materials/shared": "1.0.40-beta.7"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@nuxt/module-builder": "latest",
|