@dotcms/analytics 1.5.1-next.1977 → 1.5.1-next.2010
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/README.md
CHANGED
|
@@ -721,8 +721,8 @@ Please ensure your code follows the existing style and includes appropriate test
|
|
|
721
721
|
|
|
722
722
|
## Licensing
|
|
723
723
|
|
|
724
|
-
dotCMS
|
|
724
|
+
dotCMS is available under either the [Business Source License 1.1 (BSL)](https://www.dotcms.com/bsl) or a commercial license.
|
|
725
725
|
|
|
726
|
-
|
|
726
|
+
Under the BSL, dotCMS can be used at no cost by individual developers, small businesses or agencies under $5M in total finances, and by larger organizations in non-production environments. Every BSL release automatically converts to GPL v3 four years after its release date. For full terms and FAQs, visit [dotcms.com/bsl](https://www.dotcms.com/bsl) and [dotcms.com/bsl-faq](https://www.dotcms.com/bsl-faq).
|
|
727
727
|
|
|
728
|
-
|
|
728
|
+
Production use in larger organizations, along with access to managed cloud, SLAs, support, and enterprise capabilities, is available under a commercial license from dotCMS. For details on commercial plans, features, and support options, see [dotcms.com/pricing](https://www.dotcms.com/pricing).
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UVEEventType as s } from "../../../types/src/lib/editor/public.js";
|
|
2
2
|
import { __DOTCMS_UVE_EVENT__ as i } from "../../../types/src/lib/events/internal.js";
|
|
3
|
-
import { DOT_SECTION_ID_PREFIX as
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { DOT_SECTION_ID_PREFIX as C } from "./constants.js";
|
|
4
|
+
import { TEMP_EMPTY_CONTENTLET as r, TEMP_EMPTY_CONTENTLET_TYPE as f } from "./contentlet-sentinel.constants.js";
|
|
5
|
+
import { findDotCMSElement as g, findDotCMSVTLData as S, getClosestDotCMSContainerData as v, getDotCMSPageBounds as O } from "../lib/dom/dom.utils.js";
|
|
6
|
+
function y(o) {
|
|
6
7
|
const t = (n) => {
|
|
7
8
|
n.data.name === i.UVE_SET_PAGE_DATA && o(n.data.payload);
|
|
8
9
|
};
|
|
@@ -13,7 +14,7 @@ function p(o) {
|
|
|
13
14
|
event: s.CONTENT_CHANGES
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function D(o) {
|
|
17
18
|
const t = (n) => {
|
|
18
19
|
n.data.name === i.UVE_RELOAD_PAGE && o();
|
|
19
20
|
};
|
|
@@ -24,12 +25,12 @@ function b(o) {
|
|
|
24
25
|
event: s.PAGE_RELOAD
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function I(o) {
|
|
28
29
|
const t = (n) => {
|
|
29
30
|
if (n.data.name === i.UVE_REQUEST_BOUNDS) {
|
|
30
31
|
const e = Array.from(
|
|
31
32
|
document.querySelectorAll('[data-dot-object="container"]')
|
|
32
|
-
), a =
|
|
33
|
+
), a = O(e);
|
|
33
34
|
o(a);
|
|
34
35
|
}
|
|
35
36
|
};
|
|
@@ -40,7 +41,7 @@ function w(o) {
|
|
|
40
41
|
event: s.REQUEST_BOUNDS
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function R(o) {
|
|
44
45
|
const t = (n) => {
|
|
45
46
|
if (n.data.name === i.UVE_SCROLL_INSIDE_IFRAME) {
|
|
46
47
|
const e = n.data.direction;
|
|
@@ -58,7 +59,7 @@ function M(o) {
|
|
|
58
59
|
const t = (n) => {
|
|
59
60
|
if (n.data.name !== i.UVE_SCROLL_TO_SECTION)
|
|
60
61
|
return;
|
|
61
|
-
const e = n.data.sectionIndex, a = document.querySelector(`#${
|
|
62
|
+
const e = n.data.sectionIndex, a = document.querySelector(`#${C}${e}`) ?? document.querySelector(`#section-${e}`);
|
|
62
63
|
a && o({ sectionIndex: e, offsetTop: a.offsetTop });
|
|
63
64
|
};
|
|
64
65
|
return window.addEventListener("message", t), {
|
|
@@ -68,19 +69,19 @@ function M(o) {
|
|
|
68
69
|
event: s.SCROLL_TO_SECTION
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function A(o) {
|
|
72
73
|
const t = (n) => {
|
|
73
|
-
const e =
|
|
74
|
+
const e = g(n.target);
|
|
74
75
|
if (!e) return;
|
|
75
|
-
const { x: a, y:
|
|
76
|
-
identifier:
|
|
77
|
-
title:
|
|
78
|
-
contentType:
|
|
76
|
+
const { x: a, y: d, width: c, height: E } = e.getBoundingClientRect(), m = e.dataset?.dotObject === "container", l = {
|
|
77
|
+
identifier: r,
|
|
78
|
+
title: r,
|
|
79
|
+
contentType: f,
|
|
79
80
|
inode: "TEMPY_EMPTY_CONTENTLET_INODE",
|
|
80
|
-
widgetTitle:
|
|
81
|
-
baseType:
|
|
81
|
+
widgetTitle: r,
|
|
82
|
+
baseType: r,
|
|
82
83
|
onNumberOfPages: 1
|
|
83
|
-
},
|
|
84
|
+
}, T = {
|
|
84
85
|
identifier: e.dataset?.dotIdentifier,
|
|
85
86
|
title: e.dataset?.dotTitle,
|
|
86
87
|
inode: e.dataset?.dotInode,
|
|
@@ -91,21 +92,21 @@ function D(o) {
|
|
|
91
92
|
...e.dataset?.dotStyleProperties && {
|
|
92
93
|
dotStyleProperties: JSON.parse(e.dataset.dotStyleProperties)
|
|
93
94
|
}
|
|
94
|
-
},
|
|
95
|
+
}, u = S(e), _ = {
|
|
95
96
|
container: (
|
|
96
97
|
// Here extract dot-container from contentlet if it is Headless
|
|
97
98
|
// or search in parent container if it is VTL
|
|
98
|
-
e.dataset?.dotContainer ? JSON.parse(e.dataset?.dotContainer) :
|
|
99
|
+
e.dataset?.dotContainer ? JSON.parse(e.dataset?.dotContainer) : v(e)
|
|
99
100
|
),
|
|
100
|
-
contentlet:
|
|
101
|
-
vtlFiles:
|
|
101
|
+
contentlet: m ? l : T,
|
|
102
|
+
vtlFiles: u
|
|
102
103
|
};
|
|
103
104
|
o({
|
|
104
105
|
x: a,
|
|
105
|
-
y:
|
|
106
|
-
width:
|
|
106
|
+
y: d,
|
|
107
|
+
width: c,
|
|
107
108
|
height: E,
|
|
108
|
-
payload:
|
|
109
|
+
payload: _
|
|
109
110
|
});
|
|
110
111
|
};
|
|
111
112
|
return document.addEventListener("pointermove", t), {
|
|
@@ -116,10 +117,10 @@ function D(o) {
|
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
119
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
y as onContentChanges,
|
|
121
|
+
A as onContentletHovered,
|
|
122
|
+
R as onIframeScroll,
|
|
123
|
+
D as onPageReload,
|
|
124
|
+
I as onRequestBounds,
|
|
124
125
|
M as onScrollToSection
|
|
125
126
|
};
|