@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 comes in multiple editions and as such is dual-licensed. The dotCMS Community Edition is licensed under the GPL 3.0 and is freely available for download, customization, and deployment for use within organizations of all stripes. dotCMS Enterprise Editions (EE) adds several enterprise features and is available via a supported, indemnified commercial license from dotCMS. For the differences between the editions, see [the feature page](http://www.dotcms.com/cms-platform/features).
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
- This SDK is part of dotCMS's dual-licensed platform (GPL 3.0 for Community, commercial license for Enterprise).
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
- [Learn more ](https://www.dotcms.com)at [dotcms.com](https://www.dotcms.com).
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/analytics",
3
- "version": "1.5.1-next.1977",
3
+ "version": "1.5.1-next.2010",
4
4
  "description": "Official JavaScript library for Content Analytics with DotCMS.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,5 @@
1
+ const T = "TEMP_EMPTY_CONTENTLET", E = "TEMP_EMPTY_CONTENTLET_TYPE";
2
+ export {
3
+ T as TEMP_EMPTY_CONTENTLET,
4
+ E as TEMP_EMPTY_CONTENTLET_TYPE
5
+ };
@@ -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 _ } from "./constants.js";
4
- import { findDotCMSElement as C, findDotCMSVTLData as f, getClosestDotCMSContainerData as O, getDotCMSPageBounds as g } from "../lib/dom/dom.utils.js";
5
- function p(o) {
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 b(o) {
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 w(o) {
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 = g(e);
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 y(o) {
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(`#${_}${e}`) ?? document.querySelector(`#section-${e}`);
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 D(o) {
72
+ function A(o) {
72
73
  const t = (n) => {
73
- const e = C(n.target);
74
+ const e = g(n.target);
74
75
  if (!e) return;
75
- const { x: a, y: r, width: d, height: E } = e.getBoundingClientRect(), c = e.dataset?.dotObject === "container", T = {
76
- identifier: "TEMP_EMPTY_CONTENTLET",
77
- title: "TEMP_EMPTY_CONTENTLET",
78
- contentType: "TEMP_EMPTY_CONTENTLET_TYPE",
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: "TEMP_EMPTY_CONTENTLET",
81
- baseType: "TEMP_EMPTY_CONTENTLET",
81
+ widgetTitle: r,
82
+ baseType: r,
82
83
  onNumberOfPages: 1
83
- }, l = {
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
- }, m = f(e), u = {
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) : O(e)
99
+ e.dataset?.dotContainer ? JSON.parse(e.dataset?.dotContainer) : v(e)
99
100
  ),
100
- contentlet: c ? T : l,
101
- vtlFiles: m
101
+ contentlet: m ? l : T,
102
+ vtlFiles: u
102
103
  };
103
104
  o({
104
105
  x: a,
105
- y: r,
106
- width: d,
106
+ y: d,
107
+ width: c,
107
108
  height: E,
108
- payload: u
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
- p as onContentChanges,
120
- D as onContentletHovered,
121
- y as onIframeScroll,
122
- b as onPageReload,
123
- w as onRequestBounds,
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
  };