@dotcms/uve 0.0.1-beta.2 → 0.0.1-beta.21
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 +321 -4
- package/index.cjs.d.ts +1 -1
- package/index.cjs.js +10 -54
- package/index.cjs2.js +1151 -0
- package/index.esm.d.ts +1 -1
- package/index.esm.js +2 -56
- package/index.esm2.js +1119 -0
- package/internal.cjs.d.ts +1 -0
- package/internal.cjs.default.js +1 -0
- package/internal.cjs.js +39 -0
- package/internal.cjs.mjs +2 -0
- package/internal.esm.d.ts +1 -0
- package/internal.esm.js +2 -0
- package/package.json +26 -7
- package/src/index.d.ts +2 -0
- package/src/internal/constants.d.ts +76 -0
- package/src/internal/events.d.ts +66 -0
- package/src/internal/index.d.ts +1 -0
- package/src/internal.d.ts +6 -0
- package/src/lib/{utils.d.ts → core/core.utils.d.ts} +20 -1
- package/src/lib/dom/dom.utils.d.ts +206 -0
- package/src/lib/editor/internal.d.ts +23 -0
- package/src/lib/editor/public.d.ts +62 -0
- package/src/lib/types/block-editor-renderer/internal.d.ts +46 -0
- package/src/lib/types/block-editor-renderer/public.d.ts +38 -0
- package/src/lib/types/editor/internal.d.ts +119 -0
- package/src/lib/types/editor/public.d.ts +271 -0
- package/src/lib/types/events/internal.d.ts +34 -0
- package/src/lib/types/events/public.d.ts +18 -0
- package/src/lib/types/page/public.d.ts +485 -0
- package/src/script/sdk-editor.d.ts +6 -0
- package/src/script/utils.d.ts +53 -0
- package/src/types.d.ts +4 -0
- package/types.cjs.d.ts +1 -1
- package/types.cjs.js +97 -4
- package/types.esm.d.ts +1 -1
- package/types.esm.js +98 -5
- package/src/lib/types.d.ts +0 -33
- package/src/public/index.d.ts +0 -2
- package/src/public/types.d.ts +0 -2
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
export interface DotCMSPageAsset {
|
|
2
|
+
canCreateTemplate?: boolean;
|
|
3
|
+
containers: {
|
|
4
|
+
[key: string]: DotCMSPageAssetContainer;
|
|
5
|
+
};
|
|
6
|
+
layout: DotCMSLayout;
|
|
7
|
+
page: DotCMSPage;
|
|
8
|
+
site: DotCMSSite;
|
|
9
|
+
template: DotCMSTemplate;
|
|
10
|
+
viewAs?: DotCMSViewAs;
|
|
11
|
+
vanityUrl?: DotCMSVanityUrl;
|
|
12
|
+
params?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface DotPageAssetLayoutRow {
|
|
15
|
+
identifier: number;
|
|
16
|
+
value?: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
columns: DotPageAssetLayoutColumn[];
|
|
19
|
+
styleClass?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DotCMSVanityUrl {
|
|
22
|
+
pattern: string;
|
|
23
|
+
vanityUrlId: string;
|
|
24
|
+
url: string;
|
|
25
|
+
siteId: string;
|
|
26
|
+
languageId: number;
|
|
27
|
+
forwardTo: string;
|
|
28
|
+
response: number;
|
|
29
|
+
order: number;
|
|
30
|
+
temporaryRedirect: boolean;
|
|
31
|
+
permanentRedirect: boolean;
|
|
32
|
+
forward: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface DotPageAssetLayoutColumn {
|
|
35
|
+
preview: boolean;
|
|
36
|
+
containers: DotCMSColumnContainer[];
|
|
37
|
+
widthPercent: number;
|
|
38
|
+
width: number;
|
|
39
|
+
leftOffset: number;
|
|
40
|
+
left: number;
|
|
41
|
+
styleClass?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface DotCMSColumnContainer {
|
|
44
|
+
identifier: string;
|
|
45
|
+
uuid: string;
|
|
46
|
+
historyUUIDs: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface DotCMSPageAssetContainer {
|
|
49
|
+
container: DotCMSContainer;
|
|
50
|
+
containerStructures: DotCMSContainerStructure[];
|
|
51
|
+
contentlets: {
|
|
52
|
+
[key: string]: DotCMSContentlet[];
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface DotCMSContainer {
|
|
56
|
+
identifier: string;
|
|
57
|
+
uuid: string;
|
|
58
|
+
iDate: number;
|
|
59
|
+
type: string;
|
|
60
|
+
owner?: string;
|
|
61
|
+
inode: string;
|
|
62
|
+
source: string;
|
|
63
|
+
title: string;
|
|
64
|
+
friendlyName: string;
|
|
65
|
+
modDate: number;
|
|
66
|
+
modUser: string;
|
|
67
|
+
sortOrder: number;
|
|
68
|
+
showOnMenu: boolean;
|
|
69
|
+
code?: string;
|
|
70
|
+
maxContentlets: number;
|
|
71
|
+
useDiv: boolean;
|
|
72
|
+
sortContentletsBy?: string;
|
|
73
|
+
preLoop: string;
|
|
74
|
+
postLoop: string;
|
|
75
|
+
staticify: boolean;
|
|
76
|
+
luceneQuery?: string;
|
|
77
|
+
notes: string;
|
|
78
|
+
languageId?: number;
|
|
79
|
+
path?: string;
|
|
80
|
+
live: boolean;
|
|
81
|
+
locked: boolean;
|
|
82
|
+
working: boolean;
|
|
83
|
+
deleted: boolean;
|
|
84
|
+
name: string;
|
|
85
|
+
archived: boolean;
|
|
86
|
+
permissionId: string;
|
|
87
|
+
versionId: string;
|
|
88
|
+
versionType: string;
|
|
89
|
+
permissionType: string;
|
|
90
|
+
categoryId: string;
|
|
91
|
+
idate: number;
|
|
92
|
+
new: boolean;
|
|
93
|
+
acceptTypes: string;
|
|
94
|
+
contentlets: DotCMSContentlet[];
|
|
95
|
+
parentPermissionable: DotCMSSiteParentPermissionable;
|
|
96
|
+
}
|
|
97
|
+
export interface DotCMSContentlet {
|
|
98
|
+
archived: boolean;
|
|
99
|
+
baseType: string;
|
|
100
|
+
deleted?: boolean;
|
|
101
|
+
binary?: string;
|
|
102
|
+
binaryContentAsset?: string;
|
|
103
|
+
binaryVersion?: string;
|
|
104
|
+
contentType: string;
|
|
105
|
+
file?: string;
|
|
106
|
+
folder: string;
|
|
107
|
+
hasLiveVersion?: boolean;
|
|
108
|
+
hasTitleImage: boolean;
|
|
109
|
+
host: string;
|
|
110
|
+
hostName: string;
|
|
111
|
+
identifier: string;
|
|
112
|
+
inode: string;
|
|
113
|
+
image?: any;
|
|
114
|
+
languageId: number;
|
|
115
|
+
language?: string;
|
|
116
|
+
live: boolean;
|
|
117
|
+
locked: boolean;
|
|
118
|
+
mimeType?: string;
|
|
119
|
+
modDate: string;
|
|
120
|
+
modUser: string;
|
|
121
|
+
modUserName: string;
|
|
122
|
+
owner: string;
|
|
123
|
+
sortOrder: number;
|
|
124
|
+
stInode: string;
|
|
125
|
+
title: string;
|
|
126
|
+
titleImage: string;
|
|
127
|
+
text?: string;
|
|
128
|
+
url: string;
|
|
129
|
+
working: boolean;
|
|
130
|
+
body?: string;
|
|
131
|
+
contentTypeIcon?: string;
|
|
132
|
+
variant?: string;
|
|
133
|
+
__icon__?: string;
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
}
|
|
136
|
+
export interface DotcmsNavigationItem {
|
|
137
|
+
code?: any;
|
|
138
|
+
folder: string;
|
|
139
|
+
children?: DotcmsNavigationItem[];
|
|
140
|
+
host: string;
|
|
141
|
+
languageId: number;
|
|
142
|
+
href: string;
|
|
143
|
+
title: string;
|
|
144
|
+
type: string;
|
|
145
|
+
hash: number;
|
|
146
|
+
target: string;
|
|
147
|
+
order: number;
|
|
148
|
+
}
|
|
149
|
+
interface DotCMSTemplate {
|
|
150
|
+
iDate: number;
|
|
151
|
+
type: string;
|
|
152
|
+
owner: string;
|
|
153
|
+
inode: string;
|
|
154
|
+
identifier: string;
|
|
155
|
+
source: string;
|
|
156
|
+
title: string;
|
|
157
|
+
friendlyName: string;
|
|
158
|
+
modDate: number;
|
|
159
|
+
modUser: string;
|
|
160
|
+
sortOrder: number;
|
|
161
|
+
showOnMenu: boolean;
|
|
162
|
+
image: string;
|
|
163
|
+
drawed: boolean;
|
|
164
|
+
drawedBody: string;
|
|
165
|
+
theme: string;
|
|
166
|
+
anonymous: boolean;
|
|
167
|
+
template: boolean;
|
|
168
|
+
name: string;
|
|
169
|
+
live: boolean;
|
|
170
|
+
archived: boolean;
|
|
171
|
+
locked: boolean;
|
|
172
|
+
working: boolean;
|
|
173
|
+
permissionId: string;
|
|
174
|
+
versionId: string;
|
|
175
|
+
versionType: string;
|
|
176
|
+
deleted: boolean;
|
|
177
|
+
permissionType: string;
|
|
178
|
+
categoryId: string;
|
|
179
|
+
idate: number;
|
|
180
|
+
new: boolean;
|
|
181
|
+
canEdit: boolean;
|
|
182
|
+
}
|
|
183
|
+
interface DotCMSPage {
|
|
184
|
+
template: string;
|
|
185
|
+
modDate: number;
|
|
186
|
+
metadata: string;
|
|
187
|
+
cachettl: string;
|
|
188
|
+
pageURI: string;
|
|
189
|
+
title: string;
|
|
190
|
+
type: string;
|
|
191
|
+
showOnMenu: string;
|
|
192
|
+
httpsRequired: boolean;
|
|
193
|
+
inode: string;
|
|
194
|
+
disabledWYSIWYG: any[];
|
|
195
|
+
seokeywords: string;
|
|
196
|
+
host: string;
|
|
197
|
+
lastReview: number;
|
|
198
|
+
working: boolean;
|
|
199
|
+
locked: boolean;
|
|
200
|
+
stInode: string;
|
|
201
|
+
friendlyName: string;
|
|
202
|
+
live: boolean;
|
|
203
|
+
owner: string;
|
|
204
|
+
identifier: string;
|
|
205
|
+
nullProperties: any[];
|
|
206
|
+
friendlyname: string;
|
|
207
|
+
pagemetadata: string;
|
|
208
|
+
languageId: number;
|
|
209
|
+
url: string;
|
|
210
|
+
seodescription: string;
|
|
211
|
+
modUserName: string;
|
|
212
|
+
folder: string;
|
|
213
|
+
deleted: boolean;
|
|
214
|
+
sortOrder: number;
|
|
215
|
+
modUser: string;
|
|
216
|
+
pageUrl: string;
|
|
217
|
+
workingInode: string;
|
|
218
|
+
shortyWorking: string;
|
|
219
|
+
canEdit: boolean;
|
|
220
|
+
canRead: boolean;
|
|
221
|
+
canLock: boolean;
|
|
222
|
+
lockedOn: number;
|
|
223
|
+
lockedBy: string;
|
|
224
|
+
lockedByName: string;
|
|
225
|
+
liveInode: string;
|
|
226
|
+
shortyLive: string;
|
|
227
|
+
}
|
|
228
|
+
interface DotCMSViewAs {
|
|
229
|
+
language: {
|
|
230
|
+
id: number;
|
|
231
|
+
languageCode: string;
|
|
232
|
+
countryCode: string;
|
|
233
|
+
language: string;
|
|
234
|
+
country: string;
|
|
235
|
+
};
|
|
236
|
+
mode: string;
|
|
237
|
+
}
|
|
238
|
+
interface DotCMSLayout {
|
|
239
|
+
pageWidth: string;
|
|
240
|
+
width: string;
|
|
241
|
+
layout: string;
|
|
242
|
+
title: string;
|
|
243
|
+
header: boolean;
|
|
244
|
+
footer: boolean;
|
|
245
|
+
body: DotPageAssetLayoutBody;
|
|
246
|
+
sidebar: DotPageAssetLayoutSidebar;
|
|
247
|
+
}
|
|
248
|
+
interface DotCMSContainerStructure {
|
|
249
|
+
id: string;
|
|
250
|
+
structureId: string;
|
|
251
|
+
containerInode: string;
|
|
252
|
+
containerId: string;
|
|
253
|
+
code: string;
|
|
254
|
+
contentTypeVar: string;
|
|
255
|
+
}
|
|
256
|
+
interface DotPageAssetLayoutSidebar {
|
|
257
|
+
preview: boolean;
|
|
258
|
+
containers: DotCMSContainer[];
|
|
259
|
+
location: string;
|
|
260
|
+
widthPercent: number;
|
|
261
|
+
width: string;
|
|
262
|
+
}
|
|
263
|
+
interface DotPageAssetLayoutBody {
|
|
264
|
+
rows: DotPageAssetLayoutRow[];
|
|
265
|
+
}
|
|
266
|
+
interface DotCMSSite {
|
|
267
|
+
lowIndexPriority: boolean;
|
|
268
|
+
name: string;
|
|
269
|
+
default: boolean;
|
|
270
|
+
aliases: string;
|
|
271
|
+
parent: boolean;
|
|
272
|
+
tagStorage: string;
|
|
273
|
+
systemHost: boolean;
|
|
274
|
+
inode: string;
|
|
275
|
+
versionType: string;
|
|
276
|
+
structureInode: string;
|
|
277
|
+
hostname: string;
|
|
278
|
+
hostThumbnail?: any;
|
|
279
|
+
owner: string;
|
|
280
|
+
permissionId: string;
|
|
281
|
+
permissionType: string;
|
|
282
|
+
type: string;
|
|
283
|
+
identifier: string;
|
|
284
|
+
modDate: number;
|
|
285
|
+
host: string;
|
|
286
|
+
live: boolean;
|
|
287
|
+
indexPolicy: string;
|
|
288
|
+
categoryId: string;
|
|
289
|
+
actionId?: any;
|
|
290
|
+
new: boolean;
|
|
291
|
+
archived: boolean;
|
|
292
|
+
locked: boolean;
|
|
293
|
+
disabledWysiwyg: any[];
|
|
294
|
+
modUser: string;
|
|
295
|
+
working: boolean;
|
|
296
|
+
titleImage: {
|
|
297
|
+
present: boolean;
|
|
298
|
+
};
|
|
299
|
+
folder: string;
|
|
300
|
+
htmlpage: boolean;
|
|
301
|
+
fileAsset: boolean;
|
|
302
|
+
vanityUrl: boolean;
|
|
303
|
+
keyValue: boolean;
|
|
304
|
+
structure?: DotCMSSiteStructure;
|
|
305
|
+
title: string;
|
|
306
|
+
languageId: number;
|
|
307
|
+
indexPolicyDependencies: string;
|
|
308
|
+
contentTypeId: string;
|
|
309
|
+
versionId: string;
|
|
310
|
+
lastReview: number;
|
|
311
|
+
nextReview?: any;
|
|
312
|
+
reviewInterval?: any;
|
|
313
|
+
sortOrder: number;
|
|
314
|
+
contentType: DotCMSSiteContentType;
|
|
315
|
+
}
|
|
316
|
+
interface DotCMSSiteContentType {
|
|
317
|
+
owner?: any;
|
|
318
|
+
parentPermissionable: DotCMSSiteParentPermissionable;
|
|
319
|
+
permissionId: string;
|
|
320
|
+
permissionType: string;
|
|
321
|
+
}
|
|
322
|
+
export interface DotCMSSiteParentPermissionable {
|
|
323
|
+
Inode: string;
|
|
324
|
+
Identifier: string;
|
|
325
|
+
permissionByIdentifier: boolean;
|
|
326
|
+
type: string;
|
|
327
|
+
owner?: any;
|
|
328
|
+
identifier: string;
|
|
329
|
+
permissionId: string;
|
|
330
|
+
parentPermissionable?: any;
|
|
331
|
+
permissionType: string;
|
|
332
|
+
inode: string;
|
|
333
|
+
childrenPermissionable?: any;
|
|
334
|
+
variantId?: string;
|
|
335
|
+
}
|
|
336
|
+
interface DotCMSSiteStructure {
|
|
337
|
+
iDate: number;
|
|
338
|
+
type: string;
|
|
339
|
+
owner?: any;
|
|
340
|
+
inode: string;
|
|
341
|
+
identifier: string;
|
|
342
|
+
name: string;
|
|
343
|
+
description: string;
|
|
344
|
+
defaultStructure: boolean;
|
|
345
|
+
reviewInterval?: any;
|
|
346
|
+
reviewerRole?: any;
|
|
347
|
+
pagedetail?: any;
|
|
348
|
+
structureType: number;
|
|
349
|
+
fixed: boolean;
|
|
350
|
+
system: boolean;
|
|
351
|
+
velocityVarName: string;
|
|
352
|
+
urlMapPattern?: any;
|
|
353
|
+
host: string;
|
|
354
|
+
folder: string;
|
|
355
|
+
publishDateVar?: any;
|
|
356
|
+
expireDateVar?: any;
|
|
357
|
+
modDate: number;
|
|
358
|
+
fields: DotCMSSiteField[];
|
|
359
|
+
widget: boolean;
|
|
360
|
+
detailPage?: any;
|
|
361
|
+
fieldsBySortOrder: DotCMSSiteField[];
|
|
362
|
+
form: boolean;
|
|
363
|
+
htmlpageAsset: boolean;
|
|
364
|
+
content: boolean;
|
|
365
|
+
fileAsset: boolean;
|
|
366
|
+
persona: boolean;
|
|
367
|
+
permissionId: string;
|
|
368
|
+
permissionType: string;
|
|
369
|
+
live: boolean;
|
|
370
|
+
categoryId: string;
|
|
371
|
+
idate: number;
|
|
372
|
+
new: boolean;
|
|
373
|
+
archived: boolean;
|
|
374
|
+
locked: boolean;
|
|
375
|
+
modUser: string;
|
|
376
|
+
working: boolean;
|
|
377
|
+
title: string;
|
|
378
|
+
versionId: string;
|
|
379
|
+
versionType: string;
|
|
380
|
+
}
|
|
381
|
+
interface DotCMSSiteField {
|
|
382
|
+
iDate: number;
|
|
383
|
+
type: string;
|
|
384
|
+
owner?: any;
|
|
385
|
+
inode: string;
|
|
386
|
+
identifier: string;
|
|
387
|
+
structureInode: string;
|
|
388
|
+
fieldName: string;
|
|
389
|
+
fieldType: string;
|
|
390
|
+
fieldRelationType?: any;
|
|
391
|
+
fieldContentlet: string;
|
|
392
|
+
required: boolean;
|
|
393
|
+
velocityVarName: string;
|
|
394
|
+
sortOrder: number;
|
|
395
|
+
values?: any;
|
|
396
|
+
regexCheck?: any;
|
|
397
|
+
hint?: any;
|
|
398
|
+
defaultValue?: any;
|
|
399
|
+
indexed: boolean;
|
|
400
|
+
listed: boolean;
|
|
401
|
+
fixed: boolean;
|
|
402
|
+
readOnly: boolean;
|
|
403
|
+
searchable: boolean;
|
|
404
|
+
unique: boolean;
|
|
405
|
+
modDate: number;
|
|
406
|
+
dataType: string;
|
|
407
|
+
live: boolean;
|
|
408
|
+
categoryId: string;
|
|
409
|
+
idate: number;
|
|
410
|
+
new: boolean;
|
|
411
|
+
archived: boolean;
|
|
412
|
+
locked: boolean;
|
|
413
|
+
modUser: string;
|
|
414
|
+
working: boolean;
|
|
415
|
+
permissionId: string;
|
|
416
|
+
parentPermissionable?: any;
|
|
417
|
+
permissionType: string;
|
|
418
|
+
title: string;
|
|
419
|
+
versionId: string;
|
|
420
|
+
versionType: string;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Represents a basic page structure returned from GraphQL queries
|
|
424
|
+
*/
|
|
425
|
+
export interface DotCMSBasicGraphQLPage {
|
|
426
|
+
publishDate: string;
|
|
427
|
+
type: string;
|
|
428
|
+
httpsRequired: boolean;
|
|
429
|
+
inode: string;
|
|
430
|
+
path: string;
|
|
431
|
+
identifier: string;
|
|
432
|
+
hasTitleImage: boolean;
|
|
433
|
+
sortOrder: number;
|
|
434
|
+
extension: string;
|
|
435
|
+
canRead: boolean;
|
|
436
|
+
pageURI: string;
|
|
437
|
+
canEdit: boolean;
|
|
438
|
+
archived: boolean;
|
|
439
|
+
friendlyName: string;
|
|
440
|
+
workingInode: string;
|
|
441
|
+
url: string;
|
|
442
|
+
hasLiveVersion: boolean;
|
|
443
|
+
deleted: boolean;
|
|
444
|
+
pageUrl: string;
|
|
445
|
+
shortyWorking: string;
|
|
446
|
+
mimeType: string;
|
|
447
|
+
locked: boolean;
|
|
448
|
+
stInode: string;
|
|
449
|
+
contentType: string;
|
|
450
|
+
creationDate: string;
|
|
451
|
+
liveInode: string;
|
|
452
|
+
name: string;
|
|
453
|
+
shortyLive: string;
|
|
454
|
+
modDate: string;
|
|
455
|
+
title: string;
|
|
456
|
+
baseType: string;
|
|
457
|
+
working: boolean;
|
|
458
|
+
canLock: boolean;
|
|
459
|
+
live: boolean;
|
|
460
|
+
isContentlet: boolean;
|
|
461
|
+
statusIcons: string;
|
|
462
|
+
conLanguage: {
|
|
463
|
+
id: number;
|
|
464
|
+
language: string;
|
|
465
|
+
languageCode: string;
|
|
466
|
+
};
|
|
467
|
+
template: {
|
|
468
|
+
drawed: boolean;
|
|
469
|
+
};
|
|
470
|
+
containers: {
|
|
471
|
+
path?: string;
|
|
472
|
+
identifier: string;
|
|
473
|
+
maxContentlets?: number;
|
|
474
|
+
containerStructures?: {
|
|
475
|
+
contentTypeVar: string;
|
|
476
|
+
}[];
|
|
477
|
+
containerContentlets?: {
|
|
478
|
+
uuid: string;
|
|
479
|
+
contentlets: DotCMSContentlet[];
|
|
480
|
+
}[];
|
|
481
|
+
};
|
|
482
|
+
layout: DotCMSLayout;
|
|
483
|
+
viewAs: DotCMSViewAs;
|
|
484
|
+
}
|
|
485
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DotCMSUVEConfig } from '../lib/types/editor/public';
|
|
2
|
+
/**
|
|
3
|
+
* Sets up scroll event handlers for the window to notify the editor about scroll events.
|
|
4
|
+
* Adds listeners for both 'scroll' and 'scrollend' events, sending appropriate messages
|
|
5
|
+
* to the editor when these events occur.
|
|
6
|
+
*/
|
|
7
|
+
export declare function scrollHandler(): {
|
|
8
|
+
destroyScrollHandler: () => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Adds 'empty-contentlet' class to contentlet elements that have no height.
|
|
12
|
+
* This helps identify and style empty contentlets in the editor view.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The function queries all elements with data-dot-object="contentlet" attribute
|
|
16
|
+
* and checks their clientHeight. If an element has no height (clientHeight = 0),
|
|
17
|
+
* it adds the 'empty-contentlet' class to that element.
|
|
18
|
+
*/
|
|
19
|
+
export declare function addClassToEmptyContentlets(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Registers event handlers for various UVE (Universal Visual Editor) events.
|
|
22
|
+
*
|
|
23
|
+
* This function sets up subscriptions for:
|
|
24
|
+
* - Page reload events that refresh the window
|
|
25
|
+
* - Bounds request events to update editor boundaries
|
|
26
|
+
* - Iframe scroll events to handle smooth scrolling within bounds
|
|
27
|
+
* - Contentlet hover events to notify the editor
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* For scroll events, the function includes logic to prevent scrolling beyond
|
|
31
|
+
* the top or bottom boundaries of the iframe, which helps maintain proper
|
|
32
|
+
* scroll event handling.
|
|
33
|
+
*/
|
|
34
|
+
export declare function registerUVEEvents(): {
|
|
35
|
+
subscriptions: import("../lib/types/editor/public").UVEEventSubscription[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Notifies the editor that the UVE client is ready to receive messages.
|
|
39
|
+
*
|
|
40
|
+
* This function sends a message to the editor indicating that the client-side
|
|
41
|
+
* initialization is complete and it's ready to handle editor interactions.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* This is typically called after all UVE event handlers and DOM listeners
|
|
45
|
+
* have been set up successfully.
|
|
46
|
+
*/
|
|
47
|
+
export declare function setClientIsReady(config?: DotCMSUVEConfig): void;
|
|
48
|
+
/**
|
|
49
|
+
* Listen for block editor inline event.
|
|
50
|
+
*/
|
|
51
|
+
export declare function listenBlockEditorInlineEvent(): {
|
|
52
|
+
destroyListenBlockEditorInlineEvent: () => void;
|
|
53
|
+
};
|
package/src/types.d.ts
ADDED
package/types.cjs.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./src/
|
|
1
|
+
export * from "./src/types";
|
package/types.cjs.js
CHANGED
|
@@ -11,8 +11,101 @@
|
|
|
11
11
|
*/
|
|
12
12
|
exports.UVE_MODE = void 0;
|
|
13
13
|
(function (UVE_MODE) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
UVE_MODE["EDIT"] = "EDIT_MODE";
|
|
15
|
+
UVE_MODE["PREVIEW"] = "PREVIEW_MODE";
|
|
16
|
+
UVE_MODE["LIVE"] = "LIVE";
|
|
17
|
+
UVE_MODE["UNKNOWN"] = "UNKNOWN";
|
|
18
18
|
})(exports.UVE_MODE || (exports.UVE_MODE = {}));
|
|
19
|
+
/**
|
|
20
|
+
* Actions send to the dotcms editor
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @enum {number}
|
|
24
|
+
*/
|
|
25
|
+
exports.DotCMSUVEAction = void 0;
|
|
26
|
+
(function (DotCMSUVEAction) {
|
|
27
|
+
/**
|
|
28
|
+
* Tell the dotcms editor that page change
|
|
29
|
+
*/
|
|
30
|
+
DotCMSUVEAction["NAVIGATION_UPDATE"] = "set-url";
|
|
31
|
+
/**
|
|
32
|
+
* Send the element position of the rows, columnsm containers and contentlets
|
|
33
|
+
*/
|
|
34
|
+
DotCMSUVEAction["SET_BOUNDS"] = "set-bounds";
|
|
35
|
+
/**
|
|
36
|
+
* Send the information of the hovered contentlet
|
|
37
|
+
*/
|
|
38
|
+
DotCMSUVEAction["SET_CONTENTLET"] = "set-contentlet";
|
|
39
|
+
/**
|
|
40
|
+
* Tell the editor that the page is being scrolled
|
|
41
|
+
*/
|
|
42
|
+
DotCMSUVEAction["IFRAME_SCROLL"] = "scroll";
|
|
43
|
+
/**
|
|
44
|
+
* Tell the editor that the page has stopped scrolling
|
|
45
|
+
*/
|
|
46
|
+
DotCMSUVEAction["IFRAME_SCROLL_END"] = "scroll-end";
|
|
47
|
+
/**
|
|
48
|
+
* Ping the editor to see if the page is inside the editor
|
|
49
|
+
*/
|
|
50
|
+
DotCMSUVEAction["PING_EDITOR"] = "ping-editor";
|
|
51
|
+
/**
|
|
52
|
+
* Tell the editor to init the inline editing editor.
|
|
53
|
+
*/
|
|
54
|
+
DotCMSUVEAction["INIT_INLINE_EDITING"] = "init-inline-editing";
|
|
55
|
+
/**
|
|
56
|
+
* Tell the editor to open the Copy-contentlet dialog
|
|
57
|
+
* To copy a content and then edit it inline.
|
|
58
|
+
*/
|
|
59
|
+
DotCMSUVEAction["COPY_CONTENTLET_INLINE_EDITING"] = "copy-contentlet-inline-editing";
|
|
60
|
+
/**
|
|
61
|
+
* Tell the editor to save inline edited contentlet
|
|
62
|
+
*/
|
|
63
|
+
DotCMSUVEAction["UPDATE_CONTENTLET_INLINE_EDITING"] = "update-contentlet-inline-editing";
|
|
64
|
+
/**
|
|
65
|
+
* Tell the editor to trigger a menu reorder
|
|
66
|
+
*/
|
|
67
|
+
DotCMSUVEAction["REORDER_MENU"] = "reorder-menu";
|
|
68
|
+
/**
|
|
69
|
+
* Tell the editor to send the page info to iframe
|
|
70
|
+
*/
|
|
71
|
+
DotCMSUVEAction["GET_PAGE_DATA"] = "get-page-data";
|
|
72
|
+
/**
|
|
73
|
+
* Tell the editor an user send a graphql query
|
|
74
|
+
*/
|
|
75
|
+
DotCMSUVEAction["CLIENT_READY"] = "client-ready";
|
|
76
|
+
/**
|
|
77
|
+
* Tell the editor to edit a contentlet
|
|
78
|
+
*/
|
|
79
|
+
DotCMSUVEAction["EDIT_CONTENTLET"] = "edit-contentlet";
|
|
80
|
+
/**
|
|
81
|
+
* Tell the editor to do nothing
|
|
82
|
+
*/
|
|
83
|
+
DotCMSUVEAction["NOOP"] = "noop";
|
|
84
|
+
})(exports.DotCMSUVEAction || (exports.DotCMSUVEAction = {}));
|
|
85
|
+
/**
|
|
86
|
+
* Available events in the Universal Visual Editor
|
|
87
|
+
* @enum {string}
|
|
88
|
+
*/
|
|
89
|
+
exports.UVEEventType = void 0;
|
|
90
|
+
(function (UVEEventType) {
|
|
91
|
+
/**
|
|
92
|
+
* Triggered when page data changes from the editor
|
|
93
|
+
*/
|
|
94
|
+
UVEEventType["CONTENT_CHANGES"] = "changes";
|
|
95
|
+
/**
|
|
96
|
+
* Triggered when the page needs to be reloaded
|
|
97
|
+
*/
|
|
98
|
+
UVEEventType["PAGE_RELOAD"] = "page-reload";
|
|
99
|
+
/**
|
|
100
|
+
* Triggered when the editor requests container bounds
|
|
101
|
+
*/
|
|
102
|
+
UVEEventType["REQUEST_BOUNDS"] = "request-bounds";
|
|
103
|
+
/**
|
|
104
|
+
* Triggered when scroll action is needed inside the iframe
|
|
105
|
+
*/
|
|
106
|
+
UVEEventType["IFRAME_SCROLL"] = "iframe-scroll";
|
|
107
|
+
/**
|
|
108
|
+
* Triggered when a contentlet is hovered
|
|
109
|
+
*/
|
|
110
|
+
UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered";
|
|
111
|
+
})(exports.UVEEventType || (exports.UVEEventType = {}));
|
package/types.esm.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./src/
|
|
1
|
+
export * from "./src/types";
|