@dotcms/analytics 26.9.3-1 → 26.9.3-1-next.2649
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/package.json +2 -2
- package/uve/src/lib/dom/dom.utils.js +21 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/analytics",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.9.3-1-next.2649",
|
|
4
4
|
"description": "Official JavaScript library for Content Analytics with DotCMS.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@analytics/queue-utils": "^0.1.3",
|
|
25
25
|
"@analytics/router-utils": "^0.1.1",
|
|
26
26
|
"@analytics/storage-utils": "^0.4.0",
|
|
27
|
-
"@dotcms/uve": "26.
|
|
27
|
+
"@dotcms/uve": "26.9.3-1-next.2649",
|
|
28
28
|
"analytics": "^0.8.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../internal/constants.js";
|
|
2
|
-
function
|
|
2
|
+
function p(t) {
|
|
3
3
|
return t.map((e) => {
|
|
4
4
|
const n = e.getBoundingClientRect(), o = Array.from(
|
|
5
5
|
e.querySelectorAll('[data-dot-object="contentlet"]')
|
|
@@ -12,11 +12,14 @@ function f(t) {
|
|
|
12
12
|
payload: JSON.stringify({
|
|
13
13
|
container: r(e)
|
|
14
14
|
}),
|
|
15
|
-
contentlets:
|
|
15
|
+
contentlets: u(n, o)
|
|
16
16
|
};
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function i(t) {
|
|
20
|
+
return t?.dotCanEdit !== "false";
|
|
21
|
+
}
|
|
22
|
+
function u(t, e) {
|
|
20
23
|
return e.map((n) => {
|
|
21
24
|
const o = n.getBoundingClientRect();
|
|
22
25
|
return {
|
|
@@ -30,7 +33,8 @@ function c(t, e) {
|
|
|
30
33
|
identifier: n.dataset?.dotIdentifier,
|
|
31
34
|
title: n.dataset?.dotTitle,
|
|
32
35
|
inode: n.dataset?.dotInode,
|
|
33
|
-
contentType: n.dataset?.dotType
|
|
36
|
+
contentType: n.dataset?.dotType,
|
|
37
|
+
canEdit: i(n.dataset)
|
|
34
38
|
}
|
|
35
39
|
})
|
|
36
40
|
};
|
|
@@ -48,14 +52,14 @@ function l(t) {
|
|
|
48
52
|
const e = t.closest('[data-dot-object="container"]');
|
|
49
53
|
return e ? r(e) : (console.warn("No container found for the contentlet"), null);
|
|
50
54
|
}
|
|
51
|
-
function
|
|
55
|
+
function f(t) {
|
|
52
56
|
if (!t) return null;
|
|
53
57
|
const e = t.querySelector('[data-dot-object="empty-content"]');
|
|
54
58
|
return t?.dataset?.dotObject === "contentlet" || // The container inside Headless components have a span with the data-dot-object="container" attribute
|
|
55
59
|
t?.dataset?.dotObject === "container" && e || // The container inside Traditional have no content inside
|
|
56
|
-
t?.dataset?.dotObject === "container" && t.children.length === 0 ? t :
|
|
60
|
+
t?.dataset?.dotObject === "container" && t.children.length === 0 ? t : f(t?.parentElement);
|
|
57
61
|
}
|
|
58
|
-
function
|
|
62
|
+
function g(t) {
|
|
59
63
|
const e = t.querySelectorAll(
|
|
60
64
|
'[data-dot-object="vtl-file"]'
|
|
61
65
|
);
|
|
@@ -64,7 +68,7 @@ function p(t) {
|
|
|
64
68
|
name: n.dataset?.dotUrl
|
|
65
69
|
})) : null;
|
|
66
70
|
}
|
|
67
|
-
function
|
|
71
|
+
function C(t) {
|
|
68
72
|
const e = t.dataset ?? {};
|
|
69
73
|
return {
|
|
70
74
|
identifier: e.dotIdentifier,
|
|
@@ -74,25 +78,26 @@ function g(t) {
|
|
|
74
78
|
baseType: e.dotBasetype,
|
|
75
79
|
widgetTitle: e.dotWidgetTitle,
|
|
76
80
|
onNumberOfPages: e.dotOnNumberOfPages,
|
|
81
|
+
canEdit: i(e),
|
|
77
82
|
...e.dotStyleProperties && {
|
|
78
83
|
dotStyleProperties: JSON.parse(e.dotStyleProperties)
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
86
|
}
|
|
82
87
|
function b(t) {
|
|
83
|
-
const e = globalThis.Zone, n = (a) => typeof e?.__symbol__ == "function" ? e.__symbol__(a) : `__zone_symbol__${a}`, o = t, d = t,
|
|
88
|
+
const e = globalThis.Zone, n = (a) => typeof e?.__symbol__ == "function" ? e.__symbol__(a) : `__zone_symbol__${a}`, o = t, d = t, s = o[n("addEventListener")], c = o[n("removeEventListener")];
|
|
84
89
|
return {
|
|
85
|
-
addEventListener: (
|
|
86
|
-
removeEventListener: (
|
|
90
|
+
addEventListener: (s ?? d.addEventListener).bind(d),
|
|
91
|
+
removeEventListener: (c ?? d.removeEventListener).bind(d)
|
|
87
92
|
};
|
|
88
93
|
}
|
|
89
94
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
f as findDotCMSElement,
|
|
96
|
+
g as findDotCMSVTLData,
|
|
92
97
|
l as getClosestDotCMSContainerData,
|
|
93
98
|
r as getDotCMSContainerData,
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
u as getDotCMSContentletsBound,
|
|
100
|
+
p as getDotCMSPageBounds,
|
|
96
101
|
b as getNativeEventBinder,
|
|
97
|
-
|
|
102
|
+
C as readContentletDataset
|
|
98
103
|
};
|