@orangelogic/design-system 3.16.0 → 3.18.0
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/library/chunks/{asset-link-format.GZb85GYh.js → asset-link-format.Bk1qHIQA.js} +890 -893
- package/library/chunks/{button.BQoebhw_.js → button.DCyoZrRj.js} +1 -1
- package/library/chunks/{color-swatch-group.D25fjSK-.js → color-swatch-group.BtVbKp-v.js} +7 -7
- package/library/chunks/{confirm-popover.C35rVtVI.js → confirm-popover.-_1n24v-.js} +1 -1
- package/library/chunks/{document-viewer.sz5uTo3c.js → document-viewer.B-jtpLuD.js} +4 -4
- package/library/chunks/{dom.DShN_5Jh.js → dom.DL-cNKsj.js} +40 -38
- package/library/chunks/{folder-select.CHY44KlA.js → folder-select.DWaC4EWa.js} +3 -3
- package/library/chunks/{form.C8LMdQB4.js → form.DN2v7-DH.js} +1 -1
- package/library/chunks/{index.RctUlply.js → index.Byin4Jfx.js} +10 -10
- package/library/chunks/{input.BRZzv6Zk.js → input.Csf-S2nB.js} +1 -1
- package/library/chunks/{pagination.DtdNeZZD.js → pagination.C9NblxKt.js} +2 -2
- package/library/chunks/{tab-group.BQh_hMDd.js → tab-group.B6Aej-jM.js} +2 -2
- package/library/chunks/{toast.CGIDPKV8.js → toast.BxiewnAG.js} +1 -1
- package/library/chunks/{transformation.OaRYixzE.js → transformation.CjWnFhab.js} +12 -11
- package/library/chunks/{tree.DKofDMGu.js → tree.pId63hLe.js} +6 -3
- package/library/chunks/{types.C7C66KUV.js → types.Fkwo_sYp.js} +14223 -13895
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +6 -6
- package/library/components/audio.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/confirm-popover.js +2 -2
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +5 -5
- package/library/components/folder-select.js +3 -3
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/molecules.js +2 -2
- package/library/components/mutation-observer.js +1 -1
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +3 -3
- package/library/components/radio-group.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +3 -3
- package/library/components/textarea.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/types.js +185 -183
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/audio/audio.d.ts +1 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +2 -2
- package/library/packages/atoms/src/components/video/video.d.ts +1 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +32 -11
- package/library/packages/organisms/src/carousel/carousel.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +27 -4
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +12 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +150 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +11 -0
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +10 -2
- package/library/packages/services/src/api/asset/asset.d.ts +6 -25
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +4 -0
- package/library/packages/types/src/gallery-item.d.ts +1 -0
- package/library/packages/types/src/xml-editor.d.ts +1 -1
- package/library/packages/utils/src/dom/dom.d.ts +9 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +2 -0
- package/library/react-web-component.d.ts +6 -2
- package/library/utils.js +117 -115
- package/package.json +1 -1
|
@@ -46983,7 +46983,7 @@ let bt = class extends Pb {
|
|
|
46983
46983
|
onLoadedMetadata() {
|
|
46984
46984
|
this.isLoaded = !0, this.videoWidth = this.player?.videoWidth() || 0, this.videoHeight = this.player?.videoHeight() || 0, this.emit("cx-loaded-metadata", {
|
|
46985
46985
|
detail: this
|
|
46986
|
-
});
|
|
46986
|
+
}), this.emit("cx-load");
|
|
46987
46987
|
}
|
|
46988
46988
|
onError() {
|
|
46989
46989
|
this.isLoaded = !0, this.emit("cx-error");
|
package/library/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import { default as CxTypography } from '../typography/typography';
|
|
|
19
19
|
* @event cx-pause - Emitted when playback pauses.
|
|
20
20
|
* @event {{ time: number }} cx-time-update - Emitted while the playback position changes. `time` is relative to `in-point` (starts at 0).
|
|
21
21
|
* @event cx-ended - Emitted when playback reaches the end (or out-point when set).
|
|
22
|
+
* @event cx-load - Emitted once the waveform has loaded and the player is ready; pairs with `cx-error` so a consumer can wait for either outcome.
|
|
22
23
|
* @event cx-error - Emitted when the audio or waveform image fails to load.
|
|
23
24
|
*
|
|
24
25
|
* @csspart base - The main container.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
2
2
|
import { TreeSelection } from '../../../../types/src/tree';
|
|
3
3
|
import { ExpandButtonPlacement, TreeItemVariant } from '../../../../types/src/tree-item';
|
|
4
|
-
import { CSSResultGroup
|
|
4
|
+
import { CSSResultGroup } from 'lit';
|
|
5
5
|
import { default as Sortable } from 'sortablejs';
|
|
6
6
|
import { default as CxTreeItem } from '../tree-item/tree-item';
|
|
7
7
|
|
|
@@ -144,7 +144,7 @@ export default class CxTree extends CortexElement {
|
|
|
144
144
|
handleSortableEnd(): void;
|
|
145
145
|
private initSortable;
|
|
146
146
|
handleSelectionChange(): Promise<void>;
|
|
147
|
-
|
|
147
|
+
handleSortableChange(): Promise<void>;
|
|
148
148
|
/**
|
|
149
149
|
* Returns the list of tree items that are selected in the tree.
|
|
150
150
|
*
|
|
@@ -21,6 +21,7 @@ import { VideoJsPlayer } from './videojs/index.js';
|
|
|
21
21
|
* @event cx-ended - Emitted when playback reaches the end.
|
|
22
22
|
* @event cx-seeked - Emitted after a seek operation.
|
|
23
23
|
* @event cx-loaded-metadata - Emitted when metadata is loaded.
|
|
24
|
+
* @event cx-load - Emitted once the media is ready, alongside `cx-loaded-metadata`; pairs with `cx-error` so a consumer can wait for either outcome.
|
|
24
25
|
* @event cx-error - Emitted when the video fails to load.
|
|
25
26
|
*
|
|
26
27
|
* @slot placeholder - The placeholder element, shown while the `src` is not set.
|
|
@@ -42,7 +42,7 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
42
42
|
/** Cached viewport height — updated on resize only, not on every scroll. */
|
|
43
43
|
private _viewportHeight;
|
|
44
44
|
/** Watches the host element for size changes so the grid reflows when its container resizes. */
|
|
45
|
-
private
|
|
45
|
+
private resizeObserver;
|
|
46
46
|
/** Tracks the last emitted range to avoid firing cx-bento-range-change when the range hasn't changed. */
|
|
47
47
|
private _lastEmittedFirst;
|
|
48
48
|
private _lastEmittedLast;
|
|
@@ -273,6 +273,11 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
273
273
|
runConnectedCallback(): void;
|
|
274
274
|
disconnectedCallback(): void;
|
|
275
275
|
runFirstUpdated(): void;
|
|
276
|
+
/**
|
|
277
|
+
* ResizeObserver on the container covers both window resize and any container-driven
|
|
278
|
+
* width changes (sidebar toggle, flex layout shifts, etc.).
|
|
279
|
+
*/
|
|
280
|
+
private observeContainerResize;
|
|
276
281
|
/**
|
|
277
282
|
* Returns the visible viewport height for virtualization.
|
|
278
283
|
*
|
|
@@ -339,8 +344,27 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
339
344
|
* instead of stopping it.
|
|
340
345
|
*/
|
|
341
346
|
private scheduleRowRelease;
|
|
342
|
-
/**
|
|
347
|
+
/** Drops the pending release, keeping the rows already released. */
|
|
348
|
+
private cancelRowRelease;
|
|
349
|
+
/**
|
|
350
|
+
* Clears any pending release and resets the gate back to its initial state.
|
|
351
|
+
*
|
|
352
|
+
* Must run BEFORE `computeLayout()` in the same pass: that call ends by arming the
|
|
353
|
+
* next release, and a reset landing after it cancels the arm with nothing left to
|
|
354
|
+
* re-arm, which gates every row for good.
|
|
355
|
+
*/
|
|
343
356
|
private resetRowRelease;
|
|
357
|
+
/**
|
|
358
|
+
* Restarts row gating when the dataset shrinks or is replaced wholesale.
|
|
359
|
+
*
|
|
360
|
+
* Row indices refer to a specific layout, so keeping a release count across a new
|
|
361
|
+
* dataset would let its rows load all at once — the burst this gate exists to prevent.
|
|
362
|
+
* Progress is kept only for an appended page: the new dataset must repeat the previous
|
|
363
|
+
* items, in order, as its prefix, so the already-released rows still hold the same
|
|
364
|
+
* items and the new rows queue behind them. Any other replacement restarts the gate,
|
|
365
|
+
* including a same-length or larger array carrying different items.
|
|
366
|
+
*/
|
|
367
|
+
private resetRowReleaseForNewData;
|
|
344
368
|
/**
|
|
345
369
|
* Returns the index of the last item whose rowStart is within maxRows.
|
|
346
370
|
*/
|
|
@@ -377,21 +401,18 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
377
401
|
* idempotent — safe to call again on already-observed elements.
|
|
378
402
|
*/
|
|
379
403
|
private observeItemContentSlots;
|
|
404
|
+
/**
|
|
405
|
+
* Decides whether this pass restarts row gating, and does so.
|
|
406
|
+
*
|
|
407
|
+
* Must run BEFORE `computeLayout()` — see `resetRowRelease()`.
|
|
408
|
+
*/
|
|
409
|
+
private applyRowReleaseResets;
|
|
380
410
|
willUpdate(changed: PropertyValues): void;
|
|
381
411
|
/**
|
|
382
412
|
* Re-syncs row content heights whenever the layout recomputes (containerStyles
|
|
383
413
|
* changes on every computeLayout() call, including resize-driven reflows) or
|
|
384
414
|
* the sync-row-content-height flag itself is toggled.
|
|
385
415
|
*/
|
|
386
|
-
/**
|
|
387
|
-
* Restarts row gating when the dataset shrinks or is replaced wholesale.
|
|
388
|
-
*
|
|
389
|
-
* Row indices refer to a specific layout, so keeping a release count across a new
|
|
390
|
-
* dataset would let its rows load all at once — the burst this gate exists to prevent.
|
|
391
|
-
* A dataset that only grew is treated as an appended page: the already-released rows
|
|
392
|
-
* still hold the same items, so their progress is kept and the new rows queue behind.
|
|
393
|
-
*/
|
|
394
|
-
handleDataChangeForRowRelease(oldData?: unknown, newData?: unknown): void;
|
|
395
416
|
handleRowContentHeightSync(): Promise<void>;
|
|
396
417
|
/**
|
|
397
418
|
* Get content position based on the size of the item.
|
|
@@ -328,6 +328,7 @@ export default class CxCarousel extends CortexElement {
|
|
|
328
328
|
* Synchronizes the slides with the IntersectionObserver API.
|
|
329
329
|
*/
|
|
330
330
|
private synchronizeSlides;
|
|
331
|
+
private synchronizeSlidesNow;
|
|
331
332
|
private handleScrollEnd;
|
|
332
333
|
private handleSlideContainerResize;
|
|
333
334
|
private isCarouselItem;
|
|
@@ -42,6 +42,7 @@ export default class CxSbAudio extends CxAudio {
|
|
|
42
42
|
* Support CMS5 edit mode for the audio.
|
|
43
43
|
*/
|
|
44
44
|
get isInEditMode(): boolean;
|
|
45
|
+
runConnectedCallback(): void;
|
|
45
46
|
handleSrcChange(): Promise<void>;
|
|
46
47
|
handleRecordIdChange(): Promise<void>;
|
|
47
48
|
handleFetchedAssetDataChange(): void;
|
|
@@ -151,7 +151,8 @@ export default class CxSbImage extends CxImage {
|
|
|
151
151
|
* `cx-content-builder-viewer`) that has already batch-fetched asset data
|
|
152
152
|
* for the page. When set outside edit mode, the block stops its child
|
|
153
153
|
* `cx-asset-data-display` from fetching on its own and maps this data into
|
|
154
|
-
* alt text and overlay content instead
|
|
154
|
+
* alt text and overlay content instead — and, inside a viewer, takes its
|
|
155
|
+
* delivery URL from the `path_*` fields here rather than searching for one.
|
|
155
156
|
*/
|
|
156
157
|
fetchedAssetData: Record<string, unknown>;
|
|
157
158
|
/**
|
|
@@ -204,6 +205,8 @@ export default class CxSbImage extends CxImage {
|
|
|
204
205
|
private fetchAssetController?;
|
|
205
206
|
/** Monotonic token to drop out-of-order expired-URL recovery responses. */
|
|
206
207
|
private srcResolveVersion;
|
|
208
|
+
/** A source recovery is already queued for the current update cycle. */
|
|
209
|
+
private sourceRecoveryScheduled;
|
|
207
210
|
/**
|
|
208
211
|
* Support CMS5 edit mode for the image.
|
|
209
212
|
*/
|
|
@@ -309,10 +312,30 @@ export default class CxSbImage extends CxImage {
|
|
|
309
312
|
*/
|
|
310
313
|
private resolveClickSpace;
|
|
311
314
|
/**
|
|
312
|
-
*
|
|
315
|
+
* Runs one source recovery per update cycle. A block mounted with both `record-id`
|
|
316
|
+
* and `src` changes both in the same cycle, and a block with `record-id` alone never
|
|
317
|
+
* changes `src` at all, so the record watch has to trigger recovery too; coalescing
|
|
318
|
+
* keeps that from fetching the same URL twice.
|
|
319
|
+
*/
|
|
320
|
+
private scheduleSourceRecovery;
|
|
321
|
+
/**
|
|
322
|
+
* In read mode inside a `cx-content-builder-viewer` the viewer's batched Search already
|
|
323
|
+
* carries every `path_*` field a recovery could need, so the block never searches for
|
|
324
|
+
* itself — one call per page instead of one (or more) per block.
|
|
325
|
+
*/
|
|
326
|
+
private get hasAssetDataProvider();
|
|
327
|
+
/**
|
|
328
|
+
* Picks one variant's delivery URL out of the viewer's batched data. Mirrors
|
|
329
|
+
* `FetchAssetController.refetchFormatUrl`: the original-file proxy is only used for a
|
|
330
|
+
* browser-displayable original and otherwise falls back to the transcoded one. Empty
|
|
331
|
+
* until the batch lands, and for a variant the batch did not cover.
|
|
332
|
+
*/
|
|
333
|
+
private readProvidedSource;
|
|
334
|
+
/**
|
|
335
|
+
* When a stored URL has expired, or none was stored, resolve one from the block's
|
|
313
336
|
* `record-id` + `format` (light and dark variants independently). Fires on every
|
|
314
|
-
* `src` / `srcDarkMode` change and no-ops for non-expired URLs, so working
|
|
315
|
-
* are untouched. On failure it leaves the stored URL in place and lets the
|
|
337
|
+
* `src` / `srcDarkMode` / record change and no-ops for non-expired URLs, so working
|
|
338
|
+
* paths are untouched. On failure it leaves the stored URL in place and lets the
|
|
316
339
|
* existing `@error` / fallback path handle it.
|
|
317
340
|
*/
|
|
318
341
|
private recoverExpiredSources;
|
|
@@ -30,6 +30,18 @@ export declare const OMITTED_ATTRIBUTES: string[];
|
|
|
30
30
|
export declare const OMITTED_PROPERTIES: never[];
|
|
31
31
|
export declare const BLOCK_CAROUSEL_LIMITED_BLOCKS: BlockType[];
|
|
32
32
|
export declare const NEWLY_ADDED_COMPONENT_DELAY = 500;
|
|
33
|
+
/**
|
|
34
|
+
* Grace period the load settle waits for GrapesJS's `update` after its own timer has
|
|
35
|
+
* elapsed. A swap that produced no countable change never fires `update`, so the settle
|
|
36
|
+
* must give up rather than latch the change suppression for the element's lifetime.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SETTLE_UPDATE_GRACE = 50;
|
|
39
|
+
/**
|
|
40
|
+
* Ceiling on how long the load settle waits for the templates refresh. A hung or very
|
|
41
|
+
* slow `apiGetTemplates` must not keep `softLoading` on - late writes are already made
|
|
42
|
+
* harmless by the load-generation check.
|
|
43
|
+
*/
|
|
44
|
+
export declare const SETTLE_TEMPLATES_TIMEOUT = 5000;
|
|
33
45
|
export declare const OPEN_ON_NEWLY_ADDED_COMPONENT: Set<BlockType>;
|
|
34
46
|
export declare const MULTI_LANGUAGE_BLOCKS: Set<BlockType>;
|
|
35
47
|
export declare const DEFAULT_IMAGE_FORMAT = "TR1";
|
|
@@ -60,6 +60,16 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
60
60
|
* @default ''
|
|
61
61
|
*/
|
|
62
62
|
initialData: string;
|
|
63
|
+
/**
|
|
64
|
+
* Published HTML of the page, used as the content source when it holds more
|
|
65
|
+
* content blocks than `initial-data` (a page whose JSON was never produced by
|
|
66
|
+
* this editor, e.g. published through the API with HTML only or with a
|
|
67
|
+
* partial JSON). Parsed through the registered block types, so every block
|
|
68
|
+
* the editor knows is recovered. Ignored when `initial-data` has at least as
|
|
69
|
+
* many blocks.
|
|
70
|
+
* @default ''
|
|
71
|
+
*/
|
|
72
|
+
initialHtml: string;
|
|
63
73
|
/**
|
|
64
74
|
* This property reflects the current device type being used in the content builder.
|
|
65
75
|
* It can be one of the predefined device types such as 'desktop', 'tablet', or 'mobile'.
|
|
@@ -240,6 +250,17 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
240
250
|
private _dsm;
|
|
241
251
|
private get dsm();
|
|
242
252
|
private hasBoundUpdate;
|
|
253
|
+
/**
|
|
254
|
+
* True while `loadPage` swaps project data into the running editor, so the
|
|
255
|
+
* swap is never mistaken for an authoring change (no `cx-change`, no
|
|
256
|
+
* builder re-init from the property watch).
|
|
257
|
+
*/
|
|
258
|
+
private softLoading;
|
|
259
|
+
/**
|
|
260
|
+
* True when the last project load took its content from `initial-html`
|
|
261
|
+
* rather than `initial-data`; such content settles later than a JSON load.
|
|
262
|
+
*/
|
|
263
|
+
private adoptedInitialHtml;
|
|
243
264
|
/**
|
|
244
265
|
* In-flight/resolved block-types fetch, kept as a promise (not the awaited value) so the
|
|
245
266
|
* `component:open-picker` handler can share it even if it fires before the prefetch below
|
|
@@ -249,6 +270,24 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
249
270
|
private blockTypesPromise;
|
|
250
271
|
private prefetchBlockTypes;
|
|
251
272
|
private newlyAddedComponentTimeout;
|
|
273
|
+
/**
|
|
274
|
+
* Pending tail of a `loadPage` soft switch: lifts the change suppression and
|
|
275
|
+
* wipes the undo/dirty bookkeeping once GrapesJS has settled.
|
|
276
|
+
*/
|
|
277
|
+
private loadPageSettleTimeout;
|
|
278
|
+
/**
|
|
279
|
+
* The one-shot `update` listener the settle waits on, kept so it can be detached
|
|
280
|
+
* along with the timer whenever the editor is torn down or a new load starts.
|
|
281
|
+
*/
|
|
282
|
+
private loadPageSettleUpdateHandler;
|
|
283
|
+
/**
|
|
284
|
+
* Bumped on every project load. Async work started by a load compares against it
|
|
285
|
+
* so a response belonging to a superseded page is dropped instead of written to
|
|
286
|
+
* the editor the newer page now owns.
|
|
287
|
+
*/
|
|
288
|
+
private loadGeneration;
|
|
289
|
+
/** The templates refresh started by the current load, awaited before settling. */
|
|
290
|
+
private templatesRefreshPromise;
|
|
252
291
|
private readonly initializeCustomFrame;
|
|
253
292
|
private containerDropdownObservers;
|
|
254
293
|
private nextMapHoveredBadgeState;
|
|
@@ -314,6 +353,112 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
314
353
|
* effectively resetting the count of changes made since the last reset.
|
|
315
354
|
*/
|
|
316
355
|
resetDirtyCount(): void;
|
|
356
|
+
/**
|
|
357
|
+
* Load another page's content into the running editor without recreating the
|
|
358
|
+
* GrapesJS instance or reloading the canvas frame document (a soft page
|
|
359
|
+
* switch). Only the project data is swapped here - the canvas document's own
|
|
360
|
+
* chrome (header, navigation, per-page styles) is the host's responsibility,
|
|
361
|
+
* typically by asking the frame to re-render itself in place.
|
|
362
|
+
*
|
|
363
|
+
* The switch resets selection, undo history and the dirty count, and never
|
|
364
|
+
* emits `cx-change`, so it cannot trigger an auto-save of the incoming page.
|
|
365
|
+
*
|
|
366
|
+
* @param options New page's `canvas-src`, `initial-data` JSON string,
|
|
367
|
+
* `initial-html` fallback and `page-id`. Omitted fields keep their current
|
|
368
|
+
* values, except `initial-html`, which belongs to one page and is cleared.
|
|
369
|
+
* @returns `true` when the switch was applied to a running editor; `false`
|
|
370
|
+
* when the editor has not booted yet - the caller must then fall back to a
|
|
371
|
+
* full render/init cycle.
|
|
372
|
+
*/
|
|
373
|
+
loadPage(options: {
|
|
374
|
+
canvasSrc?: string;
|
|
375
|
+
initialData?: string;
|
|
376
|
+
initialHtml?: string;
|
|
377
|
+
pageId?: string;
|
|
378
|
+
}): Promise<boolean>;
|
|
379
|
+
/**
|
|
380
|
+
* Drop any pending load settle: both its timer and the `update` listener it is
|
|
381
|
+
* waiting on.
|
|
382
|
+
*
|
|
383
|
+
* Must run before every `contentBuilder.destroy()`. The scheduled callback closes
|
|
384
|
+
* over the editor it was armed for, and destroying does not null the field, so a
|
|
385
|
+
* surviving callback would clear the undo history of - and reset the dirty count
|
|
386
|
+
* of - whichever editor replaced it.
|
|
387
|
+
*/
|
|
388
|
+
private cancelLoadPageSettle;
|
|
389
|
+
/**
|
|
390
|
+
* Run `finish` once GrapesJS has flushed the load, at the earliest after `delay`.
|
|
391
|
+
*
|
|
392
|
+
* GrapesJS chains two zero-delay timers on its way to `update`
|
|
393
|
+
* (`handleUpdates` -> `changesCount` -> `updateChanges` -> `update`), so a bare
|
|
394
|
+
* timer here fires before the swap's own `update` and would lift the change
|
|
395
|
+
* suppression while the load is still counted as authoring - emitting `cx-change`
|
|
396
|
+
* for the page that was just loaded. Waiting for both the delay and that event
|
|
397
|
+
* closes the gap; a swap that produced no countable change never fires it at all,
|
|
398
|
+
* so `SETTLE_UPDATE_GRACE` gives up rather than latching the suppression.
|
|
399
|
+
*/
|
|
400
|
+
private scheduleSettle;
|
|
401
|
+
/**
|
|
402
|
+
* Parse the current `initial-data` JSON string into project data, treating a
|
|
403
|
+
* missing or malformed payload as an empty project.
|
|
404
|
+
*/
|
|
405
|
+
private parseInitialProjectData;
|
|
406
|
+
/**
|
|
407
|
+
* Swap the project in place rather than via `loadProjectData`: that clears
|
|
408
|
+
* every module including pages/frames, and recreating the frame reloads the
|
|
409
|
+
* canvas iframe - the very reload this method exists to avoid. Pages and
|
|
410
|
+
* frames are kept; data sources, styles and the wrapper's component tree
|
|
411
|
+
* are what actually differ between pages.
|
|
412
|
+
*/
|
|
413
|
+
private swapProjectData;
|
|
414
|
+
/**
|
|
415
|
+
* Number of blocks an author would see under `root`: every component other
|
|
416
|
+
* than the layout scaffolding (wrapper, cells, column groups), nested ones
|
|
417
|
+
* included.
|
|
418
|
+
*/
|
|
419
|
+
private countComponentBlocks;
|
|
420
|
+
/**
|
|
421
|
+
* Whether `initial-html` carries blocks the loaded JSON does not. The
|
|
422
|
+
* published HTML is what readers see, so it wins whenever it holds strictly
|
|
423
|
+
* more blocks than the project JSON: a page whose JSON was never produced by
|
|
424
|
+
* this editor (published through the API) may carry only the blocks the
|
|
425
|
+
* server needs. Both sides are always counted, and after the same block-type
|
|
426
|
+
* resolution, so JSON that the editor saved itself always matches its HTML
|
|
427
|
+
* and keeps precedence - and markup with no recognized blocks is never
|
|
428
|
+
* adopted over JSON that has none either.
|
|
429
|
+
*/
|
|
430
|
+
private initialHtmlHasMoreBlocks;
|
|
431
|
+
/**
|
|
432
|
+
* Fill a project from `initial-html` when the JSON lacks blocks the HTML
|
|
433
|
+
* has. GrapesJS parses the markup through the block types' `isComponent`
|
|
434
|
+
* recognizers, so each element comes back as its block with the plugin
|
|
435
|
+
* defaults merged in - the same component the picker would create. The one
|
|
436
|
+
* shape the parser cannot produce is the rich-text `content` string: it
|
|
437
|
+
* yields bare text nodes instead, which the host rejects as an empty block,
|
|
438
|
+
* so those are folded back into `content`.
|
|
439
|
+
*/
|
|
440
|
+
private adoptInitialHtml;
|
|
441
|
+
/**
|
|
442
|
+
* The page viewer's `--row-gap`, as both the raw CSS value written back into
|
|
443
|
+
* the root column's style and its parsed pixel value (used for add-block
|
|
444
|
+
* popup spacing). Falls back to `12px` when the viewer or the property is
|
|
445
|
+
* missing.
|
|
446
|
+
*/
|
|
447
|
+
private measureDefaultRowGap;
|
|
448
|
+
/**
|
|
449
|
+
* Guarantee the wrapper's root BlockCell: add a locked one when the body has
|
|
450
|
+
* none, otherwise re-apply that cell's locked settings and keep every
|
|
451
|
+
* column's drag/drop targets in sync.
|
|
452
|
+
*/
|
|
453
|
+
private normalizeRootColumn;
|
|
454
|
+
/**
|
|
455
|
+
* Normalize a freshly loaded project: fall back to `initial-html` when the
|
|
456
|
+
* JSON lacks its blocks, lock the wrapper, guarantee the root BlockCell, rebind
|
|
457
|
+
* the templates data source, and reset the dirty count. Runs on the editor
|
|
458
|
+
* `load` event and again after every `loadPage` soft switch, outside the
|
|
459
|
+
* undo history in both cases.
|
|
460
|
+
*/
|
|
461
|
+
private initializeProjectContent;
|
|
317
462
|
/**
|
|
318
463
|
* This method undoes the last change made in the content builder.
|
|
319
464
|
*/
|
|
@@ -340,6 +485,11 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
340
485
|
tryToGetSelectedComponent(): Component | undefined;
|
|
341
486
|
private fetchTeamSpaceRoles;
|
|
342
487
|
private updateTranslatableTextsDataSourceEntries;
|
|
488
|
+
/**
|
|
489
|
+
* @param generation The load this refresh belongs to. Once `apiGetTemplates`
|
|
490
|
+
* resolves, a mismatch means a newer page load (or a new editor) owns the canvas,
|
|
491
|
+
* and applying this response would write an older page's templates over it.
|
|
492
|
+
*/
|
|
343
493
|
private updateTemplatesDataSourceEntries;
|
|
344
494
|
private getHoveredComponentPlacement;
|
|
345
495
|
private mapHoveredComponent;
|
|
@@ -14,6 +14,26 @@ type FontPickerStoredValues = {
|
|
|
14
14
|
export declare function getTemplateClass(templateId: string): string;
|
|
15
15
|
export declare function getContentConfigs(traits: PropertyConfig[], adHocProperties: string[]): string[];
|
|
16
16
|
export declare function getLimitedBlocks(blockType: BlockType): BlockType[];
|
|
17
|
+
/**
|
|
18
|
+
* Whether a GrapesJS component type is a block an author would see - any
|
|
19
|
+
* registered block type except the layout scaffolding (cells, column groups).
|
|
20
|
+
*/
|
|
21
|
+
export declare function isContentBlockType(type: string | undefined): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A component tree in the shape GrapesJS parsers and `toJSON` produce: one
|
|
24
|
+
* definition, a list of them, or a text string.
|
|
25
|
+
*/
|
|
26
|
+
export type ParsedComponentTree = string | ParsedComponentDefinition | ParsedComponentTree[] | undefined;
|
|
27
|
+
export type ParsedComponentDefinition = {
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
components?: ParsedComponentTree;
|
|
30
|
+
type?: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Number of content blocks (see {@link isContentBlockType}) in a parsed
|
|
34
|
+
* component tree, nested ones included.
|
|
35
|
+
*/
|
|
36
|
+
export declare function countContentBlocks(tree: ParsedComponentTree): number;
|
|
17
37
|
/**
|
|
18
38
|
* The `space-default` typeface inherits the team space's current font, so the
|
|
19
39
|
* backend returns it with no variants of its own. Populate its `families` from
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { Editor } from 'grapesjs';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Hosts the editable wrapper inside the canvas document's content container
|
|
5
|
+
* instead of the frame body.
|
|
6
|
+
*
|
|
7
|
+
* The canvas document is a real page render, and it does not always carry the
|
|
8
|
+
* container: the same running editor can be pointed at a page with no block
|
|
9
|
+
* content (a DAM/workspace page) and later back at one that has it. While the
|
|
10
|
+
* container is absent the wrapper is kept detached and every canvas click is
|
|
11
|
+
* left to the page itself - GrapesJS's select handler prevents the default
|
|
12
|
+
* action, which would break the links and buttons of a page it does not own.
|
|
13
|
+
*/
|
|
3
14
|
declare const WrapperContainerPlugin: (selector: string) => (editor: Editor) => void;
|
|
4
15
|
export default WrapperContainerPlugin;
|
|
@@ -9,8 +9,9 @@ import { default as CortexLightElement } from '../../../base/src/cortex-light-el
|
|
|
9
9
|
* call, and for blocks needing the team-space list (`cx-sb-button`, `cx-sb-image`,
|
|
10
10
|
* `cx-sb-video` linking to a space, and `cx-gallery` showing space cards), fetching
|
|
11
11
|
* the space list once and assigning it as `spaces`. It also distributes its
|
|
12
|
-
* `securityBypassToken` to
|
|
13
|
-
* expired-URL recovery only)
|
|
12
|
+
* `securityBypassToken` to the record-id children that still search for themselves
|
|
13
|
+
* (`cx-sb-video`, `cx-sb-audio`, and `cx-timeline` for expired-URL recovery only); an
|
|
14
|
+
* image block takes its URL from the batch instead. Renders no UI. Blocks skip their own fetch whenever an ancestor supplies
|
|
14
15
|
* it, so they must sit inside this element for that to apply — in the editor that means
|
|
15
16
|
* inside the canvas document.
|
|
16
17
|
*
|
|
@@ -45,6 +46,13 @@ export default class CxContentBuilderViewer extends CortexLightElement {
|
|
|
45
46
|
private getPrimaryRecordId;
|
|
46
47
|
/** Every field a block could map from fetched asset data. */
|
|
47
48
|
private getRequestedFields;
|
|
49
|
+
/**
|
|
50
|
+
* Proxy fields that can serve as an image's delivery URL. A hand-picked format names one
|
|
51
|
+
* proxy; `Auto` is decided by the extension this same response carries, so both candidates
|
|
52
|
+
* are requested up front rather than in a follow-up call. The original-file proxy always
|
|
53
|
+
* comes with the transcoded fallback, which is what a non-image original falls back to.
|
|
54
|
+
*/
|
|
55
|
+
private getImagePathFields;
|
|
48
56
|
private buildFetchPlan;
|
|
49
57
|
private fetchAllAssetData;
|
|
50
58
|
private applyFetchedData;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { GetAllFormatCodesResponse, GetAssetsInFolderRequest, GetAssetsInFolderResponse, GetAssetsRequest, GetAssetsResponse, GetAuthorizedObjectsRequest, GetAuthorizedObjectsResponse, GetAvailableProxiesResponse, GetCropZoneSuggestionRequest, GetCropZoneSuggestionResponse, GetTransformAssetLinkResponse,
|
|
1
|
+
import { GetAllFormatCodesResponse, GetAssetsInFolderRequest, GetAssetsInFolderResponse, GetAssetsRequest, GetAssetsResponse, GetAuthorizedObjectsRequest, GetAuthorizedObjectsResponse, GetAvailableProxiesResponse, GetCropZoneSuggestionRequest, GetCropZoneSuggestionResponse, GetTransformAssetLinkResponse, SearchAssetsParams, SearchAssetsResponse } from './asset.types';
|
|
2
2
|
|
|
3
|
-
export declare const DEFAULT_VIEW_SIZE = "CoreField.LargeSizePreview";
|
|
4
|
-
export declare const FIELD_CORTEX_PATH = "Document.CortexPath";
|
|
5
3
|
export declare const FIELD_DOC_TYPE = "CoreField.DocType";
|
|
6
4
|
export declare const FIELD_DOC_TITLE = "Document.Title";
|
|
7
|
-
export declare const FIELD_DOC_CAPTION_LONG = "Document.CaptionLong";
|
|
8
5
|
export declare const FIELD_EXTENSION = "Document.FileExtension";
|
|
9
6
|
export declare const FIELD_FILE_SIZE = "CoreField.FileSize";
|
|
10
7
|
export declare const FIELD_IDENTIFIER = "CoreField.Identifier";
|
|
@@ -13,25 +10,16 @@ export declare const FIELD_MAX_WIDTH = "CoreField.MaxWidth";
|
|
|
13
10
|
export declare const FIELD_RECORD_ID = "Document.RecordID";
|
|
14
11
|
export declare const FIELD_SUBTYPE = "CoreField.DocSubType";
|
|
15
12
|
export declare const FIELD_TITLE_WITH_FALLBACK = "CoreField.TitleWithFallback";
|
|
16
|
-
export declare const FIELD_HAS_BROWSER_CHILDREN = "Document.HasBrowserChildren";
|
|
17
13
|
export declare const FIELD_ORIGINAL_FILE_NAME = "CoreField.OriginalFileName";
|
|
18
|
-
export declare const FIELD_UPDATED_FILE_NAME = "CoreField.UpdatedFileName";
|
|
19
|
-
export declare const FIELD_LARGE_SIZE_PREVIEW_ID = "Document.DocumentDirectRepresentativeRID";
|
|
20
|
-
export declare const LIBRARY_NAME = "Library";
|
|
21
14
|
/** Appended to a `path_*` key to carry that proxy's rendered width alongside its URI. */
|
|
22
15
|
export declare const MEDIA_FIELD_WIDTH_SUFFIX = "__width";
|
|
23
|
-
|
|
24
|
-
export declare const
|
|
16
|
+
/** Same, for the height — a proxy keeps the source aspect ratio, so the pair stands in for it. */
|
|
17
|
+
export declare const MEDIA_FIELD_HEIGHT_SUFFIX = "__height";
|
|
25
18
|
export declare const FIELD_DOC_SUBTYPE = "Document.DocSubType";
|
|
26
19
|
export declare const FIELD_IN_POINT = "Document.InPoint";
|
|
27
20
|
export declare const FIELD_OUT_POINT = "Document.OutPoint";
|
|
28
|
-
export declare const SEARCH_FIELDS: {
|
|
29
|
-
DEFAULT_VIEW_SIZE: string;
|
|
30
|
-
FIELD_TITLE_WITH_FALLBACK: string;
|
|
31
|
-
ORIGINAL_VIEW_SIZE: string;
|
|
32
|
-
};
|
|
33
21
|
export declare function resolveAssetExtraFilters(selectedFacets?: Record<string, string[]>): Record<string, string[]>;
|
|
34
|
-
export declare function apiSearchAssets({ countPerPage, fields, getPermanentAssetsPaths, httpMethod, isSiteBuilder, pageNumber, query, securityByPassToken, siteUrl, sort, token, useSession, }: SearchAssetsParams): Promise<SearchAssetsResponse>;
|
|
22
|
+
export declare function apiSearchAssets({ consistency, countPerPage, fields, getPermanentAssetsPaths, httpMethod, isSiteBuilder, pageNumber, query, securityByPassToken, siteUrl, sort, token, useSession, }: SearchAssetsParams): Promise<SearchAssetsResponse>;
|
|
35
23
|
export declare function apiGetTransformAssetLink({ assetId, extension, format, siteUrl, token, transformations, useSession, }: {
|
|
36
24
|
assetId: string;
|
|
37
25
|
extension?: string;
|
|
@@ -41,15 +29,8 @@ export declare function apiGetTransformAssetLink({ assetId, extension, format, s
|
|
|
41
29
|
transformations?: string;
|
|
42
30
|
useSession?: string;
|
|
43
31
|
}): Promise<GetTransformAssetLinkResponse | null>;
|
|
44
|
-
export declare function apiGetAssets({ extraFields, getPermanentAssetsPaths, isSiteBuilder, recordIds, securityByPassToken, token, }: GetAssetsRequest): Promise<GetAssetsResponse>;
|
|
45
|
-
|
|
46
|
-
* Reads the pixel width a `path_*` proxy field actually has.
|
|
47
|
-
*
|
|
48
|
-
* Each proxy is rendered at its own size, so this is the ceiling for resizing that URL —
|
|
49
|
-
* distinct from `CoreField.MaximumWidth`, which describes the original file.
|
|
50
|
-
*/
|
|
51
|
-
export declare function readSearchAssetItemWidth(item: SearchAssetsItem, field: string): number | undefined;
|
|
52
|
-
export declare function apiGetAssetsInFolder({ countPerPage, directParentFolderIdentifier, extraFields, getPermanentAssetsPaths, isSiteBuilder, limitedDocTypes, pageNumber, parentFolderIdentifier, searchTerm, securityByPassToken, sortOrder, token, }: GetAssetsInFolderRequest): Promise<GetAssetsInFolderResponse>;
|
|
32
|
+
export declare function apiGetAssets({ consistency, extraFields, getPermanentAssetsPaths, isSiteBuilder, recordIds, securityByPassToken, token, }: GetAssetsRequest): Promise<GetAssetsResponse>;
|
|
33
|
+
export declare function apiGetAssetsInFolder({ consistency, countPerPage, directParentFolderIdentifier, extraFields, getPermanentAssetsPaths, isSiteBuilder, limitedDocTypes, pageNumber, parentFolderIdentifier, searchTerm, securityByPassToken, sortOrder, token, }: GetAssetsInFolderRequest): Promise<GetAssetsInFolderResponse>;
|
|
53
34
|
export declare function apiGetCropFocusMode({ autoCropMode, cropHeight, cropWidth, imageUrl, useSession, }: GetCropZoneSuggestionRequest): Promise<GetCropZoneSuggestionResponse | null>;
|
|
54
35
|
export declare function apiGetAvailableProxies({ assetRecordId, isSiteBuilder, siteUrl, token, useSession, }: {
|
|
55
36
|
assetRecordId: string;
|
|
@@ -22,6 +22,8 @@ type FetchImageControllerOptions = {
|
|
|
22
22
|
* use. Opt in from a surface whose images are actually laid out responsively.
|
|
23
23
|
*/
|
|
24
24
|
buildSrcset?: boolean;
|
|
25
|
+
/** How fresh the fetched values must be. See `SearchAssetsParams.consistency`. */
|
|
26
|
+
consistency?: string;
|
|
25
27
|
isSiteBuilder?: boolean;
|
|
26
28
|
maxEnd?: number;
|
|
27
29
|
pageSize?: number;
|
|
@@ -44,6 +46,8 @@ export declare class FetchImageController implements ReactiveController {
|
|
|
44
46
|
private readonly autoFormat;
|
|
45
47
|
/** Whether items carry a `srcset` ladder. See `FetchImageControllerOptions`. */
|
|
46
48
|
private readonly buildSrcset;
|
|
49
|
+
/** See `FetchImageControllerOptions.consistency`. */
|
|
50
|
+
private readonly consistency;
|
|
47
51
|
private requestEpoch;
|
|
48
52
|
constructor(host: ReactiveElement, options?: FetchImageControllerOptions);
|
|
49
53
|
get totalDataCount(): number;
|
|
@@ -37,7 +37,7 @@ export declare enum XmlEditorNotifyType {
|
|
|
37
37
|
* as record keys and index-signature values across `TagMap`, `TagActionMap`, `AttributeDefaultValue`, and the tree
|
|
38
38
|
* mutation helpers — an enum would force `String(Tag.X)` conversions at every one of those call sites.
|
|
39
39
|
*/
|
|
40
|
-
export type XmlEditorTag = 'Ancestors' | 'Descendants' | 'DescendantsSeeThru' | 'ExtraFilters' | 'FetchRules' | 'Generation' | 'LexicallySimilar' | 'Limit' | 'OrderBy' | 'Packet' | 'Relation' | 'Relations' | 'SameFieldValue' | 'SemanticallySimilar' | 'Self' | 'TypeFilters';
|
|
40
|
+
export type XmlEditorTag = 'Ancestors' | 'Descendants' | 'DescendantsSeeThru' | 'ExtraFilters' | 'FetchRules' | 'Generation' | 'LexicallySimilar' | 'Limit' | 'LinkedOrderProject' | 'OrderBy' | 'Packet' | 'Relation' | 'Relations' | 'SameFieldValue' | 'SemanticallySimilar' | 'Self' | 'TypeFilters';
|
|
41
41
|
/** One Fetch Rules tree element (an `Element` node or a text leaf). */
|
|
42
42
|
export type XmlEditorElement = {
|
|
43
43
|
attributes?: {
|
|
@@ -33,3 +33,12 @@ export declare function getAttributes(attributes: NamedNodeMap): {
|
|
|
33
33
|
[id: string]: string;
|
|
34
34
|
};
|
|
35
35
|
export declare function isElementInHorizontalView(container: HTMLElement, el: HTMLElement, offset?: number): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* How fresh the values behind this element's asset searches have to be, as configured server-side and
|
|
38
|
+
* stamped onto an ancestor.
|
|
39
|
+
*
|
|
40
|
+
* The front end cannot read Cortex parameters (that endpoint is restricted to OrangeLogic users, and a
|
|
41
|
+
* published page renders for anonymous visitors), so the value travels in the markup. Absent means "not
|
|
42
|
+
* configured" - the caller sends nothing and the Search API applies its own default, a consistent read.
|
|
43
|
+
*/
|
|
44
|
+
export declare const readSearchConsistency: (element: Element) => string | undefined;
|
|
@@ -55,6 +55,8 @@ export declare function applyWidthToAssetUrl(url: string, width: number): string
|
|
|
55
55
|
* crop or proxy format), so a ladder must not add a competing one.
|
|
56
56
|
*/
|
|
57
57
|
export declare function hasTransformSegment(url: string): boolean;
|
|
58
|
+
/** Proxy format that serves the asset's original file rather than a rendered variant. */
|
|
59
|
+
export declare const ORIGINAL_FORMAT = "TRX";
|
|
58
60
|
/** Proxy format that is always transcoded to a raster image, whatever the source file is. */
|
|
59
61
|
export declare const AUTO_FALLBACK_FORMAT = "TR1";
|
|
60
62
|
/**
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
export type CxAssetLinkFormatFocusMode = { auto: boolean; label: string; value: string; };
|
|
34
34
|
export type CxAssetLinkFormatProxy = { cdnName: string; extension: string; formatHeight: number; formatWidth: number; height: number; id: string; permanentLink: string; proxyLabel: string; proxyName: string; width: number; };
|
|
35
35
|
export type CxAssetLinkFormatTransformation = { key: 'Crop' | 'Metadata' | 'Proxy' | 'Quality' | 'Resize' | 'Rotate'; value: { disabledSize: boolean; focusMode: string; height: number; isFocusModeAuto: boolean; keepMetadata: boolean; mode: string; position: 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right' | 'top-center' | 'top-left' | 'top-right'; quality: number; ratioHeight: number; ratioWidth: number; rotation: number; unit: '%' | 'px'; width: number; x: number; y: number; }; };
|
|
36
|
-
export type CxBentoGridGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; srcset: string; url: string; };
|
|
37
|
-
export type CxCarouselGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; srcset: string; url: string; };
|
|
36
|
+
export type CxBentoGridGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxHeight: string; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; srcset: string; url: string; };
|
|
37
|
+
export type CxCarouselGalleryItem = { additions: string[]; alt: string; cardType: 'asset' | 'folder' | 'link' | 'page' | 'space'; className: string; details: string; docType: '' | 'Album' | 'Audio' | 'Audio segment' | 'Image' | 'Multimedia' | 'ProjectDocument' | 'Story' | 'Video' | 'Widget'; extension: string; filler: boolean; header: string; id: string; isClone: boolean; maxHeight: string; maxWidth: string; name: string; objectFit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; openInNewTab: boolean; pageId: string; rawId: string; size: string; src: string; srcset: string; url: string; };
|
|
38
38
|
export type CxChatbotChatbotEvent = { event: string; excludedFromPurposes: string[]; label: string; };
|
|
39
39
|
export type CxTableTimeFormatterParams = { color: string; fontSize: string; fontWeight: string; inputUnit: string; locale: string; placeholder: string; style: dictionary; unitsFormat: string; displayStyle: string; paramsMapField: string; paramsMap: dictionary; };
|
|
40
40
|
export type CxTableTextFormatParams = { colorMap: dictionary; color: string; };
|
|
@@ -10046,6 +10046,10 @@
|
|
|
10046
10046
|
* Initial data for the content builder This should be a JSON string representing the initial state of the content builder. <br/>@default ''
|
|
10047
10047
|
*/
|
|
10048
10048
|
initialData?: string;
|
|
10049
|
+
/**
|
|
10050
|
+
* Published HTML of the page, used as the content source when it holds more content blocks than `initial-data` (a page whose JSON was never produced by this editor, e.g. published through the API with HTML only or with a partial JSON). Parsed through the registered block types, so every block the editor knows is recovered. Ignored when `initial-data` has at least as many blocks. <br/>@default ''
|
|
10051
|
+
*/
|
|
10052
|
+
initialHtml?: string;
|
|
10049
10053
|
/**
|
|
10050
10054
|
* This property reflects the current device type being used in the content builder. It can be one of the predefined device types such as 'desktop', 'tablet', or 'mobile'. <br/>@default 'desktop'
|
|
10051
10055
|
*/
|