@orangelogic/design-system 3.19.0 → 3.20.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.ttcRQgDc.js → asset-link-format.BnE0FbUH.js} +1 -1
- package/library/chunks/{color-swatch-group.Bumfw-G2.js → color-swatch-group.GEu5gVrg.js} +2 -2
- package/library/chunks/{document-viewer.C9tM2Gc7.js → document-viewer.Bkf3JbWk.js} +1 -1
- package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.D8_6pC8Y.js} +1 -1
- package/library/chunks/{index.Coy2OPB4.js → index.Ct-dh3Y5.js} +5 -5
- package/library/chunks/{toast.BxiewnAG.js → toast.CGIDPKV8.js} +1 -1
- package/library/chunks/{transformation.CjWnFhab.js → transformation.OaRYixzE.js} +11 -12
- package/library/chunks/{tree.B7IKBX3n.js → tree.DB-QLic1.js} +3 -6
- package/library/chunks/{types.DVZ_cbKn.js → types.DrJgdbwu.js} +13849 -14162
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +2 -2
- package/library/components/audio.js +1 -1
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/document-viewer.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +2 -2
- package/library/components/molecules.js +1 -1
- package/library/components/mutation-observer.js +1 -1
- package/library/components/organisms.js +2 -2
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/types.js +151 -152
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/audio/audio.d.ts +0 -1
- package/library/packages/atoms/src/components/tree/tree.d.ts +2 -2
- package/library/packages/atoms/src/components/video/video.d.ts +0 -1
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +11 -32
- package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +0 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +4 -27
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +0 -12
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +0 -150
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +0 -20
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -11
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +2 -10
- package/library/packages/utils/src/transformation/transformation.d.ts +0 -2
- package/library/react-web-component.d.ts +0 -4
- package/library/utils.js +108 -109
- package/package.json +1 -1
|
@@ -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,11 +273,6 @@ 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;
|
|
281
276
|
/**
|
|
282
277
|
* Returns the visible viewport height for virtualization.
|
|
283
278
|
*
|
|
@@ -344,27 +339,8 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
344
339
|
* instead of stopping it.
|
|
345
340
|
*/
|
|
346
341
|
private scheduleRowRelease;
|
|
347
|
-
/**
|
|
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
|
-
*/
|
|
342
|
+
/** Clears any pending release and resets the gate back to its initial state. */
|
|
356
343
|
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;
|
|
368
344
|
/**
|
|
369
345
|
* Returns the index of the last item whose rowStart is within maxRows.
|
|
370
346
|
*/
|
|
@@ -401,18 +377,21 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
401
377
|
* idempotent — safe to call again on already-observed elements.
|
|
402
378
|
*/
|
|
403
379
|
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;
|
|
410
380
|
willUpdate(changed: PropertyValues): void;
|
|
411
381
|
/**
|
|
412
382
|
* Re-syncs row content heights whenever the layout recomputes (containerStyles
|
|
413
383
|
* changes on every computeLayout() call, including resize-driven reflows) or
|
|
414
384
|
* the sync-row-content-height flag itself is toggled.
|
|
415
385
|
*/
|
|
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;
|
|
416
395
|
handleRowContentHeightSync(): Promise<void>;
|
|
417
396
|
/**
|
|
418
397
|
* Get content position based on the size of the item.
|
|
@@ -42,7 +42,6 @@ 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;
|
|
46
45
|
handleSrcChange(): Promise<void>;
|
|
47
46
|
handleRecordIdChange(): Promise<void>;
|
|
48
47
|
handleFetchedAssetDataChange(): void;
|
|
@@ -151,8 +151,7 @@ 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
|
|
155
|
-
* delivery URL from the `path_*` fields here rather than searching for one.
|
|
154
|
+
* alt text and overlay content instead.
|
|
156
155
|
*/
|
|
157
156
|
fetchedAssetData: Record<string, unknown>;
|
|
158
157
|
/**
|
|
@@ -205,8 +204,6 @@ export default class CxSbImage extends CxImage {
|
|
|
205
204
|
private fetchAssetController?;
|
|
206
205
|
/** Monotonic token to drop out-of-order expired-URL recovery responses. */
|
|
207
206
|
private srcResolveVersion;
|
|
208
|
-
/** A source recovery is already queued for the current update cycle. */
|
|
209
|
-
private sourceRecoveryScheduled;
|
|
210
207
|
/**
|
|
211
208
|
* Support CMS5 edit mode for the image.
|
|
212
209
|
*/
|
|
@@ -312,30 +309,10 @@ export default class CxSbImage extends CxImage {
|
|
|
312
309
|
*/
|
|
313
310
|
private resolveClickSpace;
|
|
314
311
|
/**
|
|
315
|
-
*
|
|
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
|
|
312
|
+
* When a stored URL has expired, re-resolve a fresh one from the block's
|
|
336
313
|
* `record-id` + `format` (light and dark variants independently). Fires on every
|
|
337
|
-
* `src` / `srcDarkMode`
|
|
338
|
-
*
|
|
314
|
+
* `src` / `srcDarkMode` change and no-ops for non-expired URLs, so working paths
|
|
315
|
+
* are untouched. On failure it leaves the stored URL in place and lets the
|
|
339
316
|
* existing `@error` / fallback path handle it.
|
|
340
317
|
*/
|
|
341
318
|
private recoverExpiredSources;
|
|
@@ -30,18 +30,6 @@ 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;
|
|
45
33
|
export declare const OPEN_ON_NEWLY_ADDED_COMPONENT: Set<BlockType>;
|
|
46
34
|
export declare const MULTI_LANGUAGE_BLOCKS: Set<BlockType>;
|
|
47
35
|
export declare const DEFAULT_IMAGE_FORMAT = "TR1";
|
|
@@ -60,16 +60,6 @@ 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;
|
|
73
63
|
/**
|
|
74
64
|
* This property reflects the current device type being used in the content builder.
|
|
75
65
|
* It can be one of the predefined device types such as 'desktop', 'tablet', or 'mobile'.
|
|
@@ -250,17 +240,6 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
250
240
|
private _dsm;
|
|
251
241
|
private get dsm();
|
|
252
242
|
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;
|
|
264
243
|
/**
|
|
265
244
|
* In-flight/resolved block-types fetch, kept as a promise (not the awaited value) so the
|
|
266
245
|
* `component:open-picker` handler can share it even if it fires before the prefetch below
|
|
@@ -270,24 +249,6 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
270
249
|
private blockTypesPromise;
|
|
271
250
|
private prefetchBlockTypes;
|
|
272
251
|
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;
|
|
291
252
|
private readonly initializeCustomFrame;
|
|
292
253
|
private containerDropdownObservers;
|
|
293
254
|
private nextMapHoveredBadgeState;
|
|
@@ -353,112 +314,6 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
353
314
|
* effectively resetting the count of changes made since the last reset.
|
|
354
315
|
*/
|
|
355
316
|
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;
|
|
462
317
|
/**
|
|
463
318
|
* This method undoes the last change made in the content builder.
|
|
464
319
|
*/
|
|
@@ -485,11 +340,6 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
485
340
|
tryToGetSelectedComponent(): Component | undefined;
|
|
486
341
|
private fetchTeamSpaceRoles;
|
|
487
342
|
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
|
-
*/
|
|
493
343
|
private updateTemplatesDataSourceEntries;
|
|
494
344
|
private getHoveredComponentPlacement;
|
|
495
345
|
private mapHoveredComponent;
|
|
@@ -14,26 +14,6 @@ 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;
|
|
37
17
|
/**
|
|
38
18
|
* The `space-default` typeface inherits the team space's current font, so the
|
|
39
19
|
* backend returns it with no variants of its own. Populate its `families` from
|
|
@@ -1,15 +1,4 @@
|
|
|
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
|
-
*/
|
|
14
3
|
declare const WrapperContainerPlugin: (selector: string) => (editor: Editor) => void;
|
|
15
4
|
export default WrapperContainerPlugin;
|
|
@@ -9,9 +9,8 @@ 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
|
-
*
|
|
14
|
-
* image block takes its URL from the batch instead. Renders no UI. Blocks skip their own fetch whenever an ancestor supplies
|
|
12
|
+
* `securityBypassToken` to every record-id child (including `cx-timeline`, for
|
|
13
|
+
* expired-URL recovery only) so their own runtime Search calls are authorised. Renders no UI. Blocks skip their own fetch whenever an ancestor supplies
|
|
15
14
|
* it, so they must sit inside this element for that to apply — in the editor that means
|
|
16
15
|
* inside the canvas document.
|
|
17
16
|
*
|
|
@@ -46,13 +45,6 @@ export default class CxContentBuilderViewer extends CortexLightElement {
|
|
|
46
45
|
private getPrimaryRecordId;
|
|
47
46
|
/** Every field a block could map from fetched asset data. */
|
|
48
47
|
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;
|
|
56
48
|
private buildFetchPlan;
|
|
57
49
|
private fetchAllAssetData;
|
|
58
50
|
private applyFetchedData;
|
|
@@ -55,8 +55,6 @@ 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";
|
|
60
58
|
/** Proxy format that is always transcoded to a raster image, whatever the source file is. */
|
|
61
59
|
export declare const AUTO_FALLBACK_FORMAT = "TR1";
|
|
62
60
|
/**
|
|
@@ -10070,10 +10070,6 @@
|
|
|
10070
10070
|
* Initial data for the content builder This should be a JSON string representing the initial state of the content builder. <br/>@default ''
|
|
10071
10071
|
*/
|
|
10072
10072
|
initialData?: string;
|
|
10073
|
-
/**
|
|
10074
|
-
* 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 ''
|
|
10075
|
-
*/
|
|
10076
|
-
initialHtml?: string;
|
|
10077
10073
|
/**
|
|
10078
10074
|
* 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'
|
|
10079
10075
|
*/
|