@dotcms/client 0.0.1-alpha.11 → 0.0.1-alpha.12
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 +26 -24
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/client/{sdk-js-client.ts → sdk-js-client.d.ts} +13 -121
- package/src/lib/client/sdk-js-client.js +148 -0
- package/src/lib/client/sdk-js-client.js.map +1 -0
- package/src/lib/editor/listeners/listeners.d.ts +46 -0
- package/src/lib/editor/listeners/{listeners.ts → listeners.js} +18 -52
- package/src/lib/editor/listeners/listeners.js.map +1 -0
- package/src/lib/editor/models/{client.model.ts → client.model.d.ts} +9 -13
- package/src/lib/editor/models/client.model.js +41 -0
- package/src/lib/editor/models/client.model.js.map +1 -0
- package/src/lib/editor/models/{editor.model.ts → editor.model.d.ts} +0 -1
- package/src/lib/editor/models/editor.model.js +2 -0
- package/src/lib/editor/models/editor.model.js.map +1 -0
- package/src/lib/editor/models/{listeners.model.ts → listeners.model.d.ts} +5 -8
- package/src/lib/editor/models/listeners.model.js +22 -0
- package/src/lib/editor/models/listeners.model.js.map +1 -0
- package/src/lib/editor/sdk-editor-vtl.d.ts +6 -0
- package/src/lib/editor/{sdk-editor-vtl.ts → sdk-editor-vtl.js} +2 -14
- package/src/lib/editor/sdk-editor-vtl.js.map +1 -0
- package/src/lib/editor/sdk-editor.d.ts +23 -0
- package/src/lib/editor/{sdk-editor.ts → sdk-editor.js} +5 -19
- package/src/lib/editor/sdk-editor.js.map +1 -0
- package/src/lib/editor/utils/editor.utils.d.ts +89 -0
- package/src/lib/editor/utils/{editor.utils.ts → editor.utils.js} +21 -70
- package/src/lib/editor/utils/editor.utils.js.map +1 -0
- package/.eslintrc.json +0 -18
- package/jest.config.ts +0 -15
- package/project.json +0 -63
- package/src/lib/client/sdk-js-client.spec.ts +0 -258
- package/src/lib/editor/listeners/listeners.spec.ts +0 -58
- package/src/lib/editor/sdk-editor.spec.ts +0 -92
- package/src/lib/editor/utils/editor.utils.spec.ts +0 -164
- package/tsconfig.json +0 -22
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -9
- /package/src/{index.ts → index.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"name": "@dotcms/client",
|
|
3
|
+
"version": "0.0.1-alpha.12",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/dotCMS/core.git#master"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "nx run sdk-client:build:js; cd ../../../../dotCMS/src/main/webapp/html/js/editor-js; rm -rf src package.json *.esm.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"dotCMS",
|
|
15
|
+
"CMS",
|
|
16
|
+
"Content Management",
|
|
17
|
+
"API Client",
|
|
18
|
+
"REST API"
|
|
19
|
+
],
|
|
20
|
+
"author": "dotcms <dev@dotcms.com>",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/dotCMS/core/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/client/README.md",
|
|
26
|
+
"module": "./src/index.js",
|
|
27
|
+
"main": "./src/index.js"
|
|
26
28
|
}
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/sdk/client/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC"}
|
|
@@ -36,7 +36,6 @@ export interface ClientConfig {
|
|
|
36
36
|
*/
|
|
37
37
|
requestOptions?: Omit<RequestInit, 'body' | 'method'>;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
39
|
type PageApiOptions = {
|
|
41
40
|
/**
|
|
42
41
|
* The path of the page you want to retrieve.
|
|
@@ -81,7 +80,6 @@ type PageApiOptions = {
|
|
|
81
80
|
*/
|
|
82
81
|
depth?: number;
|
|
83
82
|
};
|
|
84
|
-
|
|
85
83
|
type NavApiOptions = {
|
|
86
84
|
/**
|
|
87
85
|
* The root path to begin traversing the folder tree.
|
|
@@ -117,17 +115,6 @@ type NavApiOptions = {
|
|
|
117
115
|
*/
|
|
118
116
|
languageId?: number;
|
|
119
117
|
};
|
|
120
|
-
|
|
121
|
-
function isValidUrl(url: string): boolean {
|
|
122
|
-
try {
|
|
123
|
-
new URL(url);
|
|
124
|
-
|
|
125
|
-
return true;
|
|
126
|
-
} catch (error) {
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
118
|
/**
|
|
132
119
|
* `DotCmsClient` is a TypeScript class that provides methods to interact with the DotCMS REST API.
|
|
133
120
|
* It requires a configuration object on instantiation, which includes the DotCMS URL, site ID, and authentication token.
|
|
@@ -143,37 +130,11 @@ function isValidUrl(url: string): boolean {
|
|
|
143
130
|
* @method nav.get(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
|
|
144
131
|
*
|
|
145
132
|
*/
|
|
146
|
-
export class DotCmsClient {
|
|
147
|
-
private config
|
|
148
|
-
private requestOptions
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
config: ClientConfig = { dotcmsUrl: '', authToken: '', requestOptions: {}, siteId: '' }
|
|
152
|
-
) {
|
|
153
|
-
if (!config.dotcmsUrl) {
|
|
154
|
-
throw new Error("Invalid configuration - 'dotcmsUrl' is required");
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (!isValidUrl(config.dotcmsUrl)) {
|
|
158
|
-
throw new Error("Invalid configuration - 'dotcmsUrl' must be a valid URL");
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (!config.authToken) {
|
|
162
|
-
throw new Error("Invalid configuration - 'authToken' is required");
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
this.config = config;
|
|
166
|
-
|
|
167
|
-
this.requestOptions = {
|
|
168
|
-
...this.config.requestOptions,
|
|
169
|
-
headers: {
|
|
170
|
-
Authorization: `Bearer ${this.config.authToken}`,
|
|
171
|
-
...this.config.requestOptions?.headers
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
page = {
|
|
133
|
+
export declare class DotCmsClient {
|
|
134
|
+
private config;
|
|
135
|
+
private requestOptions;
|
|
136
|
+
constructor(config?: ClientConfig);
|
|
137
|
+
page: {
|
|
177
138
|
/**
|
|
178
139
|
* `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.
|
|
179
140
|
* It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
|
|
@@ -187,41 +148,9 @@ export class DotCmsClient {
|
|
|
187
148
|
* @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
|
|
188
149
|
* @throws {Error} - Throws an error if the options are not valid.
|
|
189
150
|
*/
|
|
190
|
-
get:
|
|
191
|
-
this.validatePageOptions(options);
|
|
192
|
-
|
|
193
|
-
const queryParamsObj: Record<string, string> = {};
|
|
194
|
-
for (const [key, value] of Object.entries(options)) {
|
|
195
|
-
if (value === undefined || key === 'path' || key === 'siteId') continue;
|
|
196
|
-
|
|
197
|
-
if (key === 'personaId') {
|
|
198
|
-
queryParamsObj['com.dotmarketing.persona.id'] = String(value);
|
|
199
|
-
} else if (key === 'mode' && value) {
|
|
200
|
-
queryParamsObj['mode'] = String(value);
|
|
201
|
-
} else {
|
|
202
|
-
queryParamsObj[key] = String(value);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const queryHostId = options.siteId ?? this.config.siteId ?? '';
|
|
207
|
-
|
|
208
|
-
if (queryHostId) {
|
|
209
|
-
queryParamsObj['host_id'] = queryHostId;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const queryParams = new URLSearchParams(queryParamsObj).toString();
|
|
213
|
-
|
|
214
|
-
const formattedPath = options.path.startsWith('/') ? options.path : `/${options.path}`;
|
|
215
|
-
const url = `${this.config.dotcmsUrl}/api/v1/page/json${formattedPath}${
|
|
216
|
-
queryParams ? `?${queryParams}` : ''
|
|
217
|
-
}`;
|
|
218
|
-
const response = await fetch(url, this.requestOptions);
|
|
219
|
-
|
|
220
|
-
return response.json();
|
|
221
|
-
}
|
|
151
|
+
get: (options: PageApiOptions) => Promise<unknown>;
|
|
222
152
|
};
|
|
223
|
-
|
|
224
|
-
nav = {
|
|
153
|
+
nav: {
|
|
225
154
|
/**
|
|
226
155
|
* `nav.get` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
|
|
227
156
|
* It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
|
|
@@ -233,47 +162,11 @@ export class DotCmsClient {
|
|
|
233
162
|
* @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
|
|
234
163
|
* @throws {Error} - Throws an error if the options are not valid.
|
|
235
164
|
*/
|
|
236
|
-
get:
|
|
237
|
-
options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }
|
|
238
|
-
): Promise<unknown> => {
|
|
239
|
-
this.validateNavOptions(options);
|
|
240
|
-
|
|
241
|
-
// Extract the 'path' from the options and prepare the rest as query parameters
|
|
242
|
-
const { path, ...queryParamsOptions } = options;
|
|
243
|
-
const queryParamsObj: Record<string, string> = {};
|
|
244
|
-
Object.entries(queryParamsOptions).forEach(([key, value]) => {
|
|
245
|
-
if (value !== undefined) {
|
|
246
|
-
queryParamsObj[key] = String(value);
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
const queryParams = new URLSearchParams(queryParamsObj).toString();
|
|
251
|
-
|
|
252
|
-
// Format the URL correctly depending on the 'path' value
|
|
253
|
-
const formattedPath = path === '/' ? '/' : `/${path}`;
|
|
254
|
-
const url = `${this.config.dotcmsUrl}/api/v1/nav${formattedPath}${
|
|
255
|
-
queryParams ? `?${queryParams}` : ''
|
|
256
|
-
}`;
|
|
257
|
-
|
|
258
|
-
const response = await fetch(url, this.requestOptions);
|
|
259
|
-
|
|
260
|
-
return response.json();
|
|
261
|
-
}
|
|
165
|
+
get: (options?: NavApiOptions) => Promise<unknown>;
|
|
262
166
|
};
|
|
263
|
-
|
|
264
|
-
private
|
|
265
|
-
if (!options.path) {
|
|
266
|
-
throw new Error("The 'path' parameter is required for the Page API");
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
private validateNavOptions(options: NavApiOptions): void {
|
|
271
|
-
if (!options.path) {
|
|
272
|
-
throw new Error("The 'path' parameter is required for the Nav API");
|
|
273
|
-
}
|
|
274
|
-
}
|
|
167
|
+
private validatePageOptions;
|
|
168
|
+
private validateNavOptions;
|
|
275
169
|
}
|
|
276
|
-
|
|
277
170
|
/**
|
|
278
171
|
* `dotcmsClient` is an object that provides a method to initialize the DotCMS SDK client.
|
|
279
172
|
* It has a single method `init` which takes a configuration object and returns an instance of the `DotCmsClient` class.
|
|
@@ -282,7 +175,7 @@ export class DotCmsClient {
|
|
|
282
175
|
*
|
|
283
176
|
* @method init(config: ClientConfig): DotCmsClient - Initializes the SDK client.
|
|
284
177
|
*/
|
|
285
|
-
export const dotcmsClient
|
|
178
|
+
export declare const dotcmsClient: {
|
|
286
179
|
/**
|
|
287
180
|
* `init` is a method of the `dotcmsClient` object that initializes the SDK client.
|
|
288
181
|
* It takes a configuration object as a parameter and returns an instance of the `DotCmsClient` class.
|
|
@@ -291,7 +184,6 @@ export const dotcmsClient = {
|
|
|
291
184
|
* @param {ClientConfig} config - The configuration object for the DotCMS client.
|
|
292
185
|
* @returns {DotCmsClient} - An instance of the {@link DotCmsClient} class.
|
|
293
186
|
*/
|
|
294
|
-
init: (config: ClientConfig)
|
|
295
|
-
return new DotCmsClient(config);
|
|
296
|
-
}
|
|
187
|
+
init: (config: ClientConfig) => DotCmsClient;
|
|
297
188
|
};
|
|
189
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
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 if (key === 'mode' && value) {
|
|
51
|
+
queryParamsObj['mode'] = String(value);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
queryParamsObj[key] = String(value);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const queryHostId = options.siteId ?? this.config.siteId ?? '';
|
|
58
|
+
if (queryHostId) {
|
|
59
|
+
queryParamsObj['host_id'] = queryHostId;
|
|
60
|
+
}
|
|
61
|
+
const queryParams = new URLSearchParams(queryParamsObj).toString();
|
|
62
|
+
const formattedPath = options.path.startsWith('/') ? options.path : `/${options.path}`;
|
|
63
|
+
const url = `${this.config.dotcmsUrl}/api/v1/page/json${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
|
|
64
|
+
const response = await fetch(url, this.requestOptions);
|
|
65
|
+
return response.json();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
this.nav = {
|
|
69
|
+
/**
|
|
70
|
+
* `nav.get` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
|
|
71
|
+
* It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
|
|
72
|
+
*
|
|
73
|
+
* The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
|
|
74
|
+
* @link https://www.dotcms.com/docs/latest/navigation-rest-api
|
|
75
|
+
* @async
|
|
76
|
+
* @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
|
|
77
|
+
* @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
|
|
78
|
+
* @throws {Error} - Throws an error if the options are not valid.
|
|
79
|
+
*/
|
|
80
|
+
get: async (options = { depth: 0, path: '/', languageId: 1 }) => {
|
|
81
|
+
this.validateNavOptions(options);
|
|
82
|
+
// Extract the 'path' from the options and prepare the rest as query parameters
|
|
83
|
+
const { path, ...queryParamsOptions } = options;
|
|
84
|
+
const queryParamsObj = {};
|
|
85
|
+
Object.entries(queryParamsOptions).forEach(([key, value]) => {
|
|
86
|
+
if (value !== undefined) {
|
|
87
|
+
queryParamsObj[key] = String(value);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
const queryParams = new URLSearchParams(queryParamsObj).toString();
|
|
91
|
+
// Format the URL correctly depending on the 'path' value
|
|
92
|
+
const formattedPath = path === '/' ? '/' : `/${path}`;
|
|
93
|
+
const url = `${this.config.dotcmsUrl}/api/v1/nav${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
|
|
94
|
+
const response = await fetch(url, this.requestOptions);
|
|
95
|
+
return response.json();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
if (!config.dotcmsUrl) {
|
|
99
|
+
throw new Error("Invalid configuration - 'dotcmsUrl' is required");
|
|
100
|
+
}
|
|
101
|
+
if (!isValidUrl(config.dotcmsUrl)) {
|
|
102
|
+
throw new Error("Invalid configuration - 'dotcmsUrl' must be a valid URL");
|
|
103
|
+
}
|
|
104
|
+
if (!config.authToken) {
|
|
105
|
+
throw new Error("Invalid configuration - 'authToken' is required");
|
|
106
|
+
}
|
|
107
|
+
this.config = config;
|
|
108
|
+
this.requestOptions = {
|
|
109
|
+
...this.config.requestOptions,
|
|
110
|
+
headers: {
|
|
111
|
+
Authorization: `Bearer ${this.config.authToken}`,
|
|
112
|
+
...this.config.requestOptions?.headers
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
validatePageOptions(options) {
|
|
117
|
+
if (!options.path) {
|
|
118
|
+
throw new Error("The 'path' parameter is required for the Page API");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
validateNavOptions(options) {
|
|
122
|
+
if (!options.path) {
|
|
123
|
+
throw new Error("The 'path' parameter is required for the Nav API");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* `dotcmsClient` is an object that provides a method to initialize the DotCMS SDK client.
|
|
129
|
+
* It has a single method `init` which takes a configuration object and returns an instance of the `DotCmsClient` class.
|
|
130
|
+
*
|
|
131
|
+
* @namespace dotcmsClient
|
|
132
|
+
*
|
|
133
|
+
* @method init(config: ClientConfig): DotCmsClient - Initializes the SDK client.
|
|
134
|
+
*/
|
|
135
|
+
export const dotcmsClient = {
|
|
136
|
+
/**
|
|
137
|
+
* `init` is a method of the `dotcmsClient` object that initializes the SDK client.
|
|
138
|
+
* It takes a configuration object as a parameter and returns an instance of the `DotCmsClient` class.
|
|
139
|
+
*
|
|
140
|
+
* @method init
|
|
141
|
+
* @param {ClientConfig} config - The configuration object for the DotCMS client.
|
|
142
|
+
* @returns {DotCmsClient} - An instance of the {@link DotCmsClient} class.
|
|
143
|
+
*/
|
|
144
|
+
init: (config) => {
|
|
145
|
+
return new DotCmsClient(config);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=sdk-js-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/client/sdk-js-client.ts"],"names":[],"mappings":"AAwHA,SAAS,UAAU,CAAC,GAAW;IAC3B,IAAI,CAAC;QACD,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAEb,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAY;IAIrB,YACI,SAAuB,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAyB3F,SAAI,GAAG;YACH;;;;;;;;;;;;eAYG;YACH,GAAG,EAAE,KAAK,EAAE,OAAuB,EAAoB,EAAE;gBACrD,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;gBAElC,MAAM,cAAc,GAA2B,EAAE,CAAC;gBAClD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;oBACjD,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,QAAQ;wBAAE,SAAS;oBAExE,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;wBACtB,cAAc,CAAC,6BAA6B,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;oBAClE,CAAC;yBAAM,IAAI,GAAG,KAA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C,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,cAAc,GAAG;YAClB,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc;YAC7B,OAAO,EAAE;gBACL,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;gBAChD,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO;aACzC;SACJ,CAAC;IACN,CAAC;IA0FO,mBAAmB,CAAC,OAAuB;QAC/C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;IAEO,kBAAkB,CAAC,OAAsB;QAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACxE,CAAC;IACL,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB;;;;;;;OAOG;IACH,IAAI,EAAE,CAAC,MAAoB,EAAgB,EAAE;QACzC,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DotCMSPageEditorConfig } from '../models/editor.model';
|
|
2
|
+
import { DotCMSPageEditorSubscription } from '../models/listeners.model';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
lastScrollYPosition: number;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare function setPageEditorConfig(config: DotCMSPageEditorConfig): void;
|
|
9
|
+
/**
|
|
10
|
+
* Represents an array of DotCMSPageEditorSubscription objects.
|
|
11
|
+
* Used to store the subscriptions for the editor and unsubscribe later.
|
|
12
|
+
*/
|
|
13
|
+
export declare const subscriptions: DotCMSPageEditorSubscription[];
|
|
14
|
+
/**
|
|
15
|
+
* Listens for editor messages and performs corresponding actions based on the received message.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
* @memberof DotCMSPageEditor
|
|
19
|
+
*/
|
|
20
|
+
export declare function listenEditorMessages(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Listens for pointer move events and extracts information about the hovered contentlet.
|
|
23
|
+
*
|
|
24
|
+
* @private
|
|
25
|
+
* @memberof DotCMSPageEditor
|
|
26
|
+
*/
|
|
27
|
+
export declare function listenHoveredContentlet(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Attaches a scroll event listener to the window
|
|
30
|
+
* and sends a message to the editor when the window is scrolled.
|
|
31
|
+
*
|
|
32
|
+
* @private
|
|
33
|
+
* @memberof DotCMSPageEditor
|
|
34
|
+
*/
|
|
35
|
+
export declare function scrollHandler(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Restores the scroll position of the window when an iframe is loaded.
|
|
38
|
+
* Only used in VTL Pages.
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export declare function preserveScrollOnIframe(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Sends a ping message to the editor.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare function pingEditor(): void;
|
|
@@ -1,41 +1,24 @@
|
|
|
1
1
|
import { CUSTOMER_ACTIONS, postMessageToEditor } from '../models/client.model';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
findVTLData,
|
|
6
|
-
findContentletElement,
|
|
7
|
-
getClosestContainerData,
|
|
8
|
-
getPageElementBound
|
|
9
|
-
} from '../utils/editor.utils';
|
|
10
|
-
|
|
11
|
-
declare global {
|
|
12
|
-
interface Window {
|
|
13
|
-
lastScrollYPosition: number;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
2
|
+
import { NOTIFY_CUSTOMER } from '../models/listeners.model';
|
|
3
|
+
import { findVTLData, findContentletElement, getClosestContainerData, getPageElementBound } from '../utils/editor.utils';
|
|
17
4
|
/**
|
|
18
5
|
* Default reload function that reloads the current window.
|
|
19
6
|
*/
|
|
20
7
|
const defaultReloadFn = () => window.location.reload();
|
|
21
|
-
|
|
22
8
|
/**
|
|
23
9
|
* Configuration object for the DotCMSPageEditor.
|
|
24
10
|
*/
|
|
25
|
-
let pageEditorConfig
|
|
11
|
+
let pageEditorConfig = {
|
|
26
12
|
onReload: defaultReloadFn
|
|
27
13
|
};
|
|
28
|
-
|
|
29
|
-
export function setPageEditorConfig(config: DotCMSPageEditorConfig) {
|
|
14
|
+
export function setPageEditorConfig(config) {
|
|
30
15
|
pageEditorConfig = config;
|
|
31
16
|
}
|
|
32
|
-
|
|
33
17
|
/**
|
|
34
18
|
* Represents an array of DotCMSPageEditorSubscription objects.
|
|
35
19
|
* Used to store the subscriptions for the editor and unsubscribe later.
|
|
36
20
|
*/
|
|
37
|
-
export const subscriptions
|
|
38
|
-
|
|
21
|
+
export const subscriptions = [];
|
|
39
22
|
/**
|
|
40
23
|
* Sets the bounds of the containers in the editor.
|
|
41
24
|
* Retrieves the containers from the DOM and sends their position data to the editor.
|
|
@@ -43,24 +26,19 @@ export const subscriptions: DotCMSPageEditorSubscription[] = [];
|
|
|
43
26
|
* @memberof DotCMSPageEditor
|
|
44
27
|
*/
|
|
45
28
|
function setBounds() {
|
|
46
|
-
const containers = Array.from(
|
|
47
|
-
document.querySelectorAll('[data-dot-object="container"]')
|
|
48
|
-
) as HTMLDivElement[];
|
|
29
|
+
const containers = Array.from(document.querySelectorAll('[data-dot-object="container"]'));
|
|
49
30
|
const positionData = getPageElementBound(containers);
|
|
50
|
-
|
|
51
31
|
postMessageToEditor({
|
|
52
32
|
action: CUSTOMER_ACTIONS.SET_BOUNDS,
|
|
53
33
|
payload: positionData
|
|
54
34
|
});
|
|
55
35
|
}
|
|
56
|
-
|
|
57
36
|
/**
|
|
58
37
|
* Reloads the page and triggers the onReload callback if it exists in the config object.
|
|
59
38
|
*/
|
|
60
39
|
function reloadPage() {
|
|
61
40
|
pageEditorConfig?.onReload();
|
|
62
41
|
}
|
|
63
|
-
|
|
64
42
|
/**
|
|
65
43
|
* Listens for editor messages and performs corresponding actions based on the received message.
|
|
66
44
|
*
|
|
@@ -68,29 +46,25 @@ function reloadPage() {
|
|
|
68
46
|
* @memberof DotCMSPageEditor
|
|
69
47
|
*/
|
|
70
48
|
export function listenEditorMessages() {
|
|
71
|
-
const messageCallback = (event
|
|
49
|
+
const messageCallback = (event) => {
|
|
72
50
|
switch (event.data) {
|
|
73
51
|
case NOTIFY_CUSTOMER.EMA_REQUEST_BOUNDS: {
|
|
74
52
|
setBounds();
|
|
75
53
|
break;
|
|
76
54
|
}
|
|
77
|
-
|
|
78
55
|
case NOTIFY_CUSTOMER.EMA_RELOAD_PAGE: {
|
|
79
56
|
reloadPage();
|
|
80
57
|
break;
|
|
81
58
|
}
|
|
82
59
|
}
|
|
83
60
|
};
|
|
84
|
-
|
|
85
61
|
window.addEventListener('message', messageCallback);
|
|
86
|
-
|
|
87
62
|
subscriptions.push({
|
|
88
63
|
type: 'listener',
|
|
89
64
|
event: 'message',
|
|
90
65
|
callback: messageCallback
|
|
91
66
|
});
|
|
92
67
|
}
|
|
93
|
-
|
|
94
68
|
/**
|
|
95
69
|
* Listens for pointer move events and extracts information about the hovered contentlet.
|
|
96
70
|
*
|
|
@@ -98,19 +72,19 @@ export function listenEditorMessages() {
|
|
|
98
72
|
* @memberof DotCMSPageEditor
|
|
99
73
|
*/
|
|
100
74
|
export function listenHoveredContentlet() {
|
|
101
|
-
const pointerMoveCallback = (event
|
|
102
|
-
const target = findContentletElement(event.target
|
|
103
|
-
if (!target)
|
|
75
|
+
const pointerMoveCallback = (event) => {
|
|
76
|
+
const target = findContentletElement(event.target);
|
|
77
|
+
if (!target)
|
|
78
|
+
return;
|
|
104
79
|
const { x, y, width, height } = target.getBoundingClientRect();
|
|
105
|
-
|
|
106
80
|
const vtlFiles = findVTLData(target);
|
|
107
81
|
const contentletPayload = {
|
|
108
|
-
container:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
82
|
+
container:
|
|
83
|
+
// Here extract dot-container from contentlet if is Headless
|
|
84
|
+
// or search in parent container if is VTL
|
|
85
|
+
target.dataset?.['dotContainer']
|
|
86
|
+
? JSON.parse(target.dataset?.['dotContainer'])
|
|
87
|
+
: getClosestContainerData(target),
|
|
114
88
|
contentlet: {
|
|
115
89
|
identifier: target.dataset?.['dotIdentifier'],
|
|
116
90
|
title: target.dataset?.['dotTitle'],
|
|
@@ -120,7 +94,6 @@ export function listenHoveredContentlet() {
|
|
|
120
94
|
},
|
|
121
95
|
vtlFiles
|
|
122
96
|
};
|
|
123
|
-
|
|
124
97
|
postMessageToEditor({
|
|
125
98
|
action: CUSTOMER_ACTIONS.SET_CONTENTLET,
|
|
126
99
|
payload: {
|
|
@@ -132,16 +105,13 @@ export function listenHoveredContentlet() {
|
|
|
132
105
|
}
|
|
133
106
|
});
|
|
134
107
|
};
|
|
135
|
-
|
|
136
108
|
document.addEventListener('pointermove', pointerMoveCallback);
|
|
137
|
-
|
|
138
109
|
subscriptions.push({
|
|
139
110
|
type: 'listener',
|
|
140
111
|
event: 'pointermove',
|
|
141
112
|
callback: pointerMoveCallback
|
|
142
113
|
});
|
|
143
114
|
}
|
|
144
|
-
|
|
145
115
|
/**
|
|
146
116
|
* Attaches a scroll event listener to the window
|
|
147
117
|
* and sends a message to the editor when the window is scrolled.
|
|
@@ -156,16 +126,13 @@ export function scrollHandler() {
|
|
|
156
126
|
});
|
|
157
127
|
window.lastScrollYPosition = window.scrollY;
|
|
158
128
|
};
|
|
159
|
-
|
|
160
129
|
window.addEventListener('scroll', scrollCallback);
|
|
161
|
-
|
|
162
130
|
subscriptions.push({
|
|
163
131
|
type: 'listener',
|
|
164
132
|
event: 'scroll',
|
|
165
133
|
callback: scrollCallback
|
|
166
134
|
});
|
|
167
135
|
}
|
|
168
|
-
|
|
169
136
|
/**
|
|
170
137
|
* Restores the scroll position of the window when an iframe is loaded.
|
|
171
138
|
* Only used in VTL Pages.
|
|
@@ -175,7 +142,6 @@ export function preserveScrollOnIframe() {
|
|
|
175
142
|
const preserveScrollCallback = () => {
|
|
176
143
|
window.scrollTo(0, window.lastScrollYPosition);
|
|
177
144
|
};
|
|
178
|
-
|
|
179
145
|
window.addEventListener('load', preserveScrollCallback);
|
|
180
146
|
subscriptions.push({
|
|
181
147
|
type: 'listener',
|
|
@@ -183,7 +149,6 @@ export function preserveScrollOnIframe() {
|
|
|
183
149
|
callback: preserveScrollCallback
|
|
184
150
|
});
|
|
185
151
|
}
|
|
186
|
-
|
|
187
152
|
/**
|
|
188
153
|
* Sends a ping message to the editor.
|
|
189
154
|
*
|
|
@@ -193,3 +158,4 @@ export function pingEditor() {
|
|
|
193
158
|
action: CUSTOMER_ACTIONS.PING_EDITOR
|
|
194
159
|
});
|
|
195
160
|
}
|
|
161
|
+
//# sourceMappingURL=listeners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/editor/listeners/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAgC,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EACH,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACtB,MAAM,uBAAuB,CAAC;AAQ/B;;GAEG;AACH,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;AAEvD;;GAEG;AACH,IAAI,gBAAgB,GAA2B;IAC3C,QAAQ,EAAE,eAAe;CAC5B,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,MAA8B;IAC9D,gBAAgB,GAAG,MAAM,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAmC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