@dotcms/client 0.0.1-alpha.7 → 0.0.1-alpha.9

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.
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Bound information for a contentlet.
3
+ *
4
+ * @interface ContentletBound
5
+ */
6
+ interface ContentletBound {
7
+ x: number;
8
+ y: number;
9
+ width: number;
10
+ height: number;
11
+ payload: string;
12
+ }
13
+
14
+ /**
15
+ * Bound information for a container.
16
+ *
17
+ * @interface ContenainerBound
18
+ */
19
+ interface ContenainerBound {
20
+ x: number;
21
+ y: number;
22
+ width: number;
23
+ height: number;
24
+ payload: {
25
+ container: {
26
+ acceptTypes: string;
27
+ identifier: string;
28
+ maxContentlets: string;
29
+ uuid: string;
30
+ };
31
+ };
32
+ contentlets: ContentletBound[];
33
+ }
34
+
35
+ /**
36
+ * Calculates the bounding information for each page element within the given containers.
37
+ *
38
+ * @export
39
+ * @param {HTMLDivElement[]} containers
40
+ * @return {*} An array of objects containing the bounding information for each page element.
41
+ */
42
+ export function getPageElementBound(containers: HTMLDivElement[]): ContenainerBound[] {
43
+ return containers.map((container) => {
44
+ const containerRect = container.getBoundingClientRect();
45
+ const contentlets = Array.from(
46
+ container.querySelectorAll('[data-dot-object="contentlet"]')
47
+ ) as HTMLDivElement[];
48
+
49
+ return {
50
+ x: containerRect.x,
51
+ y: containerRect.y,
52
+ width: containerRect.width,
53
+ height: containerRect.height,
54
+ payload: {
55
+ container: getContainerData(container)
56
+ },
57
+ contentlets: getContentletsBound(containerRect, contentlets)
58
+ };
59
+ });
60
+ }
61
+
62
+ /**
63
+ * An array of objects containing the bounding information for each contentlet inside a container.
64
+ *
65
+ * @export
66
+ * @param {DOMRect} containerRect
67
+ * @param {HTMLDivElement[]} contentlets
68
+ * @return {*}
69
+ */
70
+ export function getContentletsBound(
71
+ containerRect: DOMRect,
72
+ contentlets: HTMLDivElement[]
73
+ ): ContentletBound[] {
74
+ return contentlets.map((contentlet) => {
75
+ const contentletRect = contentlet.getBoundingClientRect();
76
+
77
+ return {
78
+ x: 0,
79
+ y: contentletRect.y - containerRect.y,
80
+ width: contentletRect.width,
81
+ height: contentletRect.height,
82
+ payload: JSON.stringify({
83
+ container: contentlet.dataset?.['dotContainer']
84
+ ? JSON.parse(contentlet.dataset?.['dotContainer'])
85
+ : getClosestContainerData(contentlet),
86
+ contentlet: {
87
+ identifier: contentlet.dataset?.['dotIdentifier'],
88
+ title: contentlet.dataset?.['dotTitle'],
89
+ inode: contentlet.dataset?.['dotInode'],
90
+ contentType: contentlet.dataset?.['dotType']
91
+ }
92
+ })
93
+ };
94
+ });
95
+ }
96
+
97
+ /**
98
+ * Get container data from VTLS.
99
+ *
100
+ * @export
101
+ * @param {HTMLElement} container
102
+ * @return {*}
103
+ */
104
+ export function getContainerData(container: HTMLElement) {
105
+ return {
106
+ acceptTypes: container.dataset?.['dotAcceptTypes'] || '',
107
+ identifier: container.dataset?.['dotIdentifier'] || '',
108
+ maxContentlets: container.dataset?.['maxContentlets'] || '',
109
+ uuid: container.dataset?.['dotUuid'] || ''
110
+ };
111
+ }
112
+
113
+ /**
114
+ * Get the closest container data from the contentlet.
115
+ *
116
+ * @export
117
+ * @param {Element} element
118
+ * @return {*}
119
+ */
120
+ export function getClosestContainerData(element: Element) {
121
+ // Find the closest ancestor element with data-dot-object="container" attribute
122
+ const container = element.closest('[data-dot-object="container"]') as HTMLElement;
123
+
124
+ // If a container element is found
125
+ if (container) {
126
+ // Return the dataset of the container element
127
+ return getContainerData(container);
128
+ } else {
129
+ // If no container element is found, return null
130
+ console.warn('No container found for the contentlet');
131
+
132
+ return null;
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Find the closest contentlet element based on HTMLElement.
138
+ *
139
+ * @export
140
+ * @param {(HTMLElement | null)} element
141
+ * @return {*}
142
+ */
143
+ export function findContentletElement(element: HTMLElement | null): HTMLElement | null {
144
+ if (!element) return null;
145
+
146
+ if (element.dataset && element.dataset?.['dotObject'] === 'contentlet') {
147
+ return element;
148
+ } else {
149
+ return findContentletElement(element?.['parentElement']);
150
+ }
151
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "extends": "../../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "ESNext",
5
+ "forceConsistentCasingInFileNames": true,
6
+ "strict": true,
7
+ "noImplicitOverride": true,
8
+ "noPropertyAccessFromIndexSignature": true,
9
+ "noImplicitReturns": true,
10
+ "noFallthroughCasesInSwitch": true
11
+ },
12
+ "files": [],
13
+ "include": [],
14
+ "references": [
15
+ {
16
+ "path": "./tsconfig.lib.json"
17
+ },
18
+ {
19
+ "path": "./tsconfig.spec.json"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../../dist/out-tsc",
5
+ "declaration": true,
6
+ "types": ["node"]
7
+ },
8
+ "include": ["src/**/*.ts"],
9
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../../dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["jest", "node"]
7
+ },
8
+ "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
9
+ }
package/src/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './lib/sdk-js-client';
2
- export * from './lib/postMessageToEditor';
package/src/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './lib/sdk-js-client';
2
- export * from './lib/postMessageToEditor';
3
- //# sourceMappingURL=index.js.map
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/sdk/client/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Actions send to the dotcms editor
3
- *
4
- * @export
5
- * @enum {number}
6
- */
7
- export var CUSTOMER_ACTIONS;
8
- (function (CUSTOMER_ACTIONS) {
9
- /**
10
- * Tell the dotcms editor that page change
11
- */
12
- CUSTOMER_ACTIONS["SET_URL"] = "set-url";
13
- /**
14
- * Send the element position of the rows, columnsm containers and contentlets
15
- */
16
- CUSTOMER_ACTIONS["SET_BOUNDS"] = "set-bounds";
17
- /**
18
- * Send the information of the hovered contentlet
19
- */
20
- CUSTOMER_ACTIONS["SET_CONTENTLET"] = "set-contentlet";
21
- /**
22
- * Tell the editor that the page is being scrolled
23
- */
24
- CUSTOMER_ACTIONS["IFRAME_SCROLL"] = "scroll";
25
- /**
26
- * Ping the editor to see if the page is inside the editor
27
- */
28
- CUSTOMER_ACTIONS["PING_EDITOR"] = "ping-editor";
29
- CUSTOMER_ACTIONS["CONTENT_CHANGE"] = "content-change";
30
- CUSTOMER_ACTIONS["NOOP"] = "noop";
31
- })(CUSTOMER_ACTIONS || (CUSTOMER_ACTIONS = {}));
32
- /**
33
- * Post message to dotcms page editor
34
- *
35
- * @export
36
- * @template T
37
- * @param {PostMessageProps<T>} message
38
- */
39
- export function postMessageToEditor(message) {
40
- window.parent.postMessage(message, '*');
41
- }
42
- //# sourceMappingURL=postMessageToEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postMessageToEditor.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/postMessageToEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IACxB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,6CAAyB,CAAA;IACzB;;OAEG;IACH,qDAAiC,CAAA;IACjC;;OAEG;IACH,4CAAwB,CAAA;IACxB;;OAEG;IACH,+CAA2B,CAAA;IAE3B,qDAAiC,CAAA;IAEjC,iCAAa,CAAA;AACjB,CAAC,EAzBW,gBAAgB,KAAhB,gBAAgB,QAyB3B;AAcD;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAc,OAA4B;IACzE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
@@ -1,145 +0,0 @@
1
- function isValidUrl(url) {
2
- try {
3
- new URL(url);
4
- return true;
5
- }
6
- catch (error) {
7
- return false;
8
- }
9
- }
10
- /**
11
- * `DotCmsClient` is a TypeScript class that provides methods to interact with the DotCMS REST API.
12
- * It requires a configuration object on instantiation, which includes the DotCMS URL, site ID, and authentication token.
13
- *
14
- * @class DotCmsClient
15
- *
16
- * @property {ClientConfig} config - The configuration object for the DotCMS client.
17
- *
18
- * @method constructor(config: ClientConfig) - Constructs a new instance of the DotCmsClient class.
19
- *
20
- * @method page.get(options: PageApiOptions): Promise<unknown> - Retrieves all the elements of any Page in your dotCMS system in JSON format.
21
- *
22
- * @method nav.get(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
23
- *
24
- */
25
- export class DotCmsClient {
26
- constructor(config = { dotcmsUrl: '', authToken: '', requestOptions: {}, siteId: '' }) {
27
- this.page = {
28
- /**
29
- * `page.get` is an asynchronous method of the `DotCmsClient` class that retrieves all the elements of any Page in your dotCMS system in JSON format.
30
- * It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
31
- *
32
- * The Page API enables you to retrieve all the elements of any Page in your dotCMS system.
33
- * The elements may be retrieved in JSON format.
34
- *
35
- * @link https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas
36
- * @async
37
- * @param {PageApiOptions} options - The options for the Page API call.
38
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
39
- * @throws {Error} - Throws an error if the options are not valid.
40
- */
41
- get: async (options) => {
42
- this.validatePageOptions(options);
43
- const queryParamsObj = {};
44
- for (const [key, value] of Object.entries(options)) {
45
- if (value === undefined || key === 'path' || key === 'siteId')
46
- continue;
47
- if (key === 'personaId') {
48
- queryParamsObj['com.dotmarketing.persona.id'] = String(value);
49
- }
50
- else {
51
- queryParamsObj[key] = String(value);
52
- }
53
- }
54
- const queryHostId = options.siteId ?? this.config.siteId ?? '';
55
- if (queryHostId) {
56
- queryParamsObj['host_id'] = queryHostId;
57
- }
58
- const queryParams = new URLSearchParams(queryParamsObj).toString();
59
- const formattedPath = options.path.startsWith('/') ? options.path : `/${options.path}`;
60
- const url = `${this.config.dotcmsUrl}/api/v1/page/json${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
61
- const response = await fetch(url, this.requestOptions);
62
- return response.json();
63
- }
64
- };
65
- this.nav = {
66
- /**
67
- * `nav.get` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
68
- * It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
69
- *
70
- * The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
71
- * @link https://www.dotcms.com/docs/latest/navigation-rest-api
72
- * @async
73
- * @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
74
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
75
- * @throws {Error} - Throws an error if the options are not valid.
76
- */
77
- get: async (options = { depth: 0, path: '/', languageId: 1 }) => {
78
- this.validateNavOptions(options);
79
- // Extract the 'path' from the options and prepare the rest as query parameters
80
- const { path, ...queryParamsOptions } = options;
81
- const queryParamsObj = {};
82
- Object.entries(queryParamsOptions).forEach(([key, value]) => {
83
- if (value !== undefined) {
84
- queryParamsObj[key] = String(value);
85
- }
86
- });
87
- const queryParams = new URLSearchParams(queryParamsObj).toString();
88
- // Format the URL correctly depending on the 'path' value
89
- const formattedPath = path === '/' ? '/' : `/${path}`;
90
- const url = `${this.config.dotcmsUrl}/api/v1/nav${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
91
- const response = await fetch(url, this.requestOptions);
92
- return response.json();
93
- }
94
- };
95
- if (!config.dotcmsUrl) {
96
- throw new Error("Invalid configuration - 'dotcmsUrl' is required");
97
- }
98
- if (!isValidUrl(config.dotcmsUrl)) {
99
- throw new Error("Invalid configuration - 'dotcmsUrl' must be a valid URL");
100
- }
101
- if (!config.authToken) {
102
- throw new Error("Invalid configuration - 'authToken' is required");
103
- }
104
- this.config = config;
105
- this.requestOptions = {
106
- ...this.config.requestOptions,
107
- headers: {
108
- Authorization: `Bearer ${this.config.authToken}`,
109
- ...this.config.requestOptions?.headers
110
- }
111
- };
112
- }
113
- validatePageOptions(options) {
114
- if (!options.path) {
115
- throw new Error("The 'path' parameter is required for the Page API");
116
- }
117
- }
118
- validateNavOptions(options) {
119
- if (!options.path) {
120
- throw new Error("The 'path' parameter is required for the Nav API");
121
- }
122
- }
123
- }
124
- /**
125
- * `dotcmsClient` is an object that provides a method to initialize the DotCMS SDK client.
126
- * It has a single method `init` which takes a configuration object and returns an instance of the `DotCmsClient` class.
127
- *
128
- * @namespace dotcmsClient
129
- *
130
- * @method init(config: ClientConfig): DotCmsClient - Initializes the SDK client.
131
- */
132
- export const dotcmsClient = {
133
- /**
134
- * `init` is a method of the `dotcmsClient` object that initializes the SDK client.
135
- * It takes a configuration object as a parameter and returns an instance of the `DotCmsClient` class.
136
- *
137
- * @method init
138
- * @param {ClientConfig} config - The configuration object for the DotCMS client.
139
- * @returns {DotCmsClient} - An instance of the {@link DotCmsClient} class.
140
- */
141
- init: (config) => {
142
- return new DotCmsClient(config);
143
- }
144
- };
145
- //# sourceMappingURL=sdk-js-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/sdk-js-client.ts"],"names":[],"mappings":"AAkHA,SAAS,UAAU,CAAC,GAAW;IAC3B,IAAI;QACA,IAAI,GAAG,CAAC,GAAG,CAAC,C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