@orangelogic/design-system 3.0.0 → 3.2.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.D--xQVgR.js → asset-link-format.BnIUG_vO.js} +19 -18
- package/library/chunks/{button.BnkkUqiI.js → button.CpY4FCwE.js} +1 -1
- package/library/chunks/{color-swatch-group.CCgwey9f.js → color-swatch-group.CTcv62MK.js} +367 -330
- package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
- package/library/chunks/{confirm-popover.CrQKEChc.js → confirm-popover.BSS1VhB2.js} +3 -3
- package/library/chunks/content-builder.BX4pHujE.js +60 -0
- package/library/chunks/{dialog.CWGtufDA.js → dialog.ICoCAj6Z.js} +4 -4
- package/library/chunks/{document-viewer.C90j1Xrr.js → document-viewer.D6PxGcEL.js} +8 -7
- package/library/chunks/{dot-pagination.BqGFeFXK.js → dot-pagination.CzVpiv00.js} +1 -1
- package/library/chunks/{folder-select.CIqVGGFl.js → folder-select.DN-JomDt.js} +4 -4
- package/library/chunks/{header.CWlWNree.js → header.BQg_JjHw.js} +1 -1
- package/library/chunks/{i18n.DbXTTLXx.js → i18n.BA19xtyU.js} +6 -3
- package/library/chunks/{icon-button.CVrxJcZq.js → icon-button.BWJ1Vqn5.js} +17 -11
- package/library/chunks/{iframe.-GCTFas1.js → iframe.Dm-nXSBv.js} +1 -1
- package/library/chunks/{image.CTMzUqCC.js → image.B-4cVbol.js} +187 -188
- package/library/chunks/{input.33UmFGqR.js → input.xgeLCG8I.js} +1 -1
- package/library/chunks/{markdown.DOHru2Rz.js → markdown.bkEjjjS9.js} +2 -2
- package/library/chunks/menu-item.DgUMVYe5.js +493 -0
- package/library/chunks/{option.B6odSlS2.js → option.jeaj7_Lr.js} +1 -1
- package/library/chunks/{pagination.mzolTIpF.js → pagination.CSPKsj4y.js} +5 -5
- package/library/chunks/{tab-group.uSHlsFu8.js → tab-group.BSl6GdIO.js} +4 -4
- package/library/chunks/{toast.CXEAfCvN.js → toast.C5Ir5yKA.js} +1 -1
- package/library/chunks/transformation.CWKaoGaY.js +254 -0
- package/library/chunks/{tree.CmEdKtzK.js → tree.DYFFjW1-.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +31 -31
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +4 -4
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -4
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +113 -100
- package/library/components/menu-item.js +15 -483
- package/library/components/menu.js +20 -20
- package/library/components/molecules.js +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +101 -98
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +18 -13
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +18617 -18388
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +11 -0
- package/library/packages/atoms/src/components/image/image.d.ts +30 -4
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
- package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +1 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
- package/library/packages/atoms/src/components/select/select.d.ts +8 -0
- package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +4 -4
- package/library/packages/hybrid/table-core/src/table/styles/table-overlay-scrollbar.styles.d.ts +8 -5
- package/library/packages/hybrid/table-core/src/table/table.d.ts +2 -12
- package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +5 -3
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
- package/library/packages/molecules/src/masonry/masonry.d.ts +9 -0
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +88 -0
- package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +31 -6
- package/library/packages/organisms/src/downloader/downloader.d.ts +1 -1
- package/library/packages/types/src/menu-item.d.ts +12 -1
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +52 -0
- package/library/react-web-component.d.ts +25 -1
- package/library/utils.js +173 -167
- package/package.json +1 -1
- package/library/chunks/transformation.8uLv6uwG.js +0 -264
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { _ as kd, a as Sa, b as Be, c as Je } from "../chunks/inheritsLoose.BuSn_CvZ.js";
|
|
2
2
|
import { c as ps, a as Bn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
|
|
3
3
|
import { r as Sb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
|
|
4
|
-
import { C as Cb } from "../chunks/image.
|
|
4
|
+
import { C as Cb } from "../chunks/image.B-4cVbol.js";
|
|
5
5
|
import Mb from "./resize-observer.js";
|
|
6
6
|
import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.CAfXABBc.js";
|
|
7
7
|
import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
8
|
import { b as Ib } from "../chunks/browser.BHOCIF_A.js";
|
|
9
9
|
import { c as Ob } from "../chunks/custom-element.L4WJXn1j.js";
|
|
10
|
-
import { L as kb } from "../chunks/i18n.
|
|
10
|
+
import { L as kb } from "../chunks/i18n.BA19xtyU.js";
|
|
11
11
|
import { w as Ki } from "../chunks/watch.DJF5K-8U.js";
|
|
12
12
|
import { i as Bb, x as Qc } from "../chunks/lit-element.jLBm65_O.js";
|
|
13
13
|
import { n as Ri } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
package/library/package.json
CHANGED
|
@@ -84,6 +84,17 @@ export default class CxIconButton extends CortexElement {
|
|
|
84
84
|
* Draws a circular icon button.
|
|
85
85
|
*/
|
|
86
86
|
circle: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Marks this button as a toggle control and reflects its state via `aria-pressed`.
|
|
89
|
+
* Leave unset for buttons that are not toggles (the default `role="button"` stays unchanged either way).
|
|
90
|
+
*/
|
|
91
|
+
pressed?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Overrides the button's tabindex (e.g. for a roving-tabindex toolbar). Leave unset to keep the
|
|
94
|
+
* default behavior: `0` when enabled, `-1` when `disabled` or `loading`.
|
|
95
|
+
* Attribute is `tab-index` (not the derived `tab-index-value`) to mirror the native `tabindex` attribute.
|
|
96
|
+
*/
|
|
97
|
+
tabIndexValue?: number;
|
|
87
98
|
private styleObserver?;
|
|
88
99
|
connectedUpdatedCallback(): void;
|
|
89
100
|
disconnectedCallback(): void;
|
|
@@ -9,15 +9,18 @@ import { default as CxPopup } from '../popup/popup';
|
|
|
9
9
|
import { default as CxResizeObserver } from '../resize-observer/resize-observer';
|
|
10
10
|
import { default as CxSkeleton } from '../skeleton/skeleton';
|
|
11
11
|
import { default as CxSpace } from '../space/space';
|
|
12
|
-
import { default as CxSpinner } from '../spinner/spinner';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* @summary Images are wrappers for img elements with built-in lazy loading, skeleton, and fallback support.
|
|
16
15
|
* The cx-image component is a simple way to display images in your application.
|
|
17
16
|
*
|
|
17
|
+
* @description Set `srcset` and `sizes` to let the browser download and decode only the
|
|
18
|
+
* pixels the layout needs. This is what bounds memory on image-heavy pages: a large
|
|
19
|
+
* original decodes to `naturalWidth × naturalHeight × 4` bytes no matter how small it
|
|
20
|
+
* is displayed, so many full-resolution images on one page can exhaust the renderer.
|
|
21
|
+
*
|
|
18
22
|
* @csspart image - The `img` element.
|
|
19
|
-
* @csspart skeleton - The skeleton element,
|
|
20
|
-
* @csspart retry-spinner - The spinner overlay shown while a failed load is being retried (when `retry-on-error` is enabled).
|
|
23
|
+
* @csspart skeleton - The skeleton element, shown while the image is loading (including while a failed load is being retried) and the `skeleton` property is set.
|
|
21
24
|
* @csspart fallback - The fallback element, always shown when the image fails to load (after retries, when applicable).
|
|
22
25
|
* @csspart base - The component’s outer wrapper.
|
|
23
26
|
* @csspart fallback-icon - The icon rendered inside the fallback slot.
|
|
@@ -48,7 +51,6 @@ export default class CxImage extends ResizableElement {
|
|
|
48
51
|
'cx-resize-observer': typeof CxResizeObserver;
|
|
49
52
|
'cx-skeleton': typeof CxSkeleton;
|
|
50
53
|
'cx-space': typeof CxSpace;
|
|
51
|
-
'cx-spinner': typeof CxSpinner;
|
|
52
54
|
};
|
|
53
55
|
readonly localize: LocalizeController;
|
|
54
56
|
imageElement?: HTMLImageElement;
|
|
@@ -66,6 +68,21 @@ export default class CxImage extends ResizableElement {
|
|
|
66
68
|
* The path to the image to load.
|
|
67
69
|
*/
|
|
68
70
|
src: string;
|
|
71
|
+
/**
|
|
72
|
+
* Candidate sources for the underlying `<img>`, as a standard `srcset` value
|
|
73
|
+
* (e.g. `"…/re_w_400/img.jpg 400w, …/re_w_800/img.jpg 800w"`).
|
|
74
|
+
*
|
|
75
|
+
* Lets the browser fetch and decode only the pixels the layout needs, which is what
|
|
76
|
+
* bounds memory on image-heavy pages — a large original decodes to
|
|
77
|
+
* `naturalWidth × naturalHeight × 4` bytes regardless of its display size.
|
|
78
|
+
* Pair with `sizes`; without it the browser assumes the image is `100vw` wide.
|
|
79
|
+
*/
|
|
80
|
+
srcset: string;
|
|
81
|
+
/**
|
|
82
|
+
* The `sizes` attribute for the underlying `<img>`, describing the rendered width
|
|
83
|
+
* (e.g. `"400px"`). Only meaningful together with `srcset`.
|
|
84
|
+
*/
|
|
85
|
+
sizes: string;
|
|
69
86
|
/**
|
|
70
87
|
* The path to the placeholder image to be shown if src is not available.
|
|
71
88
|
*/
|
|
@@ -151,6 +168,15 @@ export default class CxImage extends ResizableElement {
|
|
|
151
168
|
};
|
|
152
169
|
/** The crossorigin value for the `<img>`; `undefined` (attribute omitted) when `noCrossorigin` is set. */
|
|
153
170
|
get crossorigin(): string | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Whether to hold the box with a skeleton rather than the loaded image.
|
|
173
|
+
*
|
|
174
|
+
* Retries are included: a retry is still "not loaded yet", so it keeps the same
|
|
175
|
+
* skeleton instead of swapping in a spinner. A spinner would restate what the
|
|
176
|
+
* skeleton already shows while changing the visual weight of the cell mid-load,
|
|
177
|
+
* which reads as a layout change on an image-heavy page.
|
|
178
|
+
*/
|
|
179
|
+
protected get showPlaceholderSkeleton(): boolean;
|
|
154
180
|
/**
|
|
155
181
|
* Whether the image have zoom action.
|
|
156
182
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
2
|
-
import { AriaCurrentValue, MenuItemCheckPlacement } from '../../../../types/src/menu-item';
|
|
2
|
+
import { AriaCurrentValue, MenuItemCheckPlacement, MenuItemRole, MenuItemType } from '../../../../types/src/menu-item';
|
|
3
3
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
4
4
|
import { default as CxIcon } from '../icon/icon';
|
|
5
5
|
import { default as CxPopup } from '../popup/popup';
|
|
@@ -33,6 +33,7 @@ import { default as CxSpinner } from '../spinner/spinner';
|
|
|
33
33
|
* @cssproperty [--submenu-offset=-2px] - The distance submenus shift to overlap the parent menu.
|
|
34
34
|
* @cssproperty [--checked-icon-size=1.5em] - The size of the checked icon.
|
|
35
35
|
* @cssproperty [--checked-icon-color=var(--cx-color-primary)] - The color of the checked icon when the item is checked.
|
|
36
|
+
* @cssproperty [--checked-label-color=var(--cx-color-primary)] - The color of the label when the item is checked.
|
|
36
37
|
*/
|
|
37
38
|
export default class CxMenuItem extends CortexElement {
|
|
38
39
|
static readonly styles: CSSResultGroup;
|
|
@@ -47,7 +48,9 @@ export default class CxMenuItem extends CortexElement {
|
|
|
47
48
|
menuItem: HTMLElement;
|
|
48
49
|
submenuIcon: HTMLElement;
|
|
49
50
|
/** The type of menu item to render. To use `checked`, this value must be set to `checkbox`. */
|
|
50
|
-
type:
|
|
51
|
+
type: MenuItemType;
|
|
52
|
+
/** Overrides the ARIA role derived from `type`. Use `menuitemradio` for a checkbox item that is one choice out of a set. */
|
|
53
|
+
itemRole?: MenuItemRole;
|
|
51
54
|
/** The trigger type for the submenu. */
|
|
52
55
|
submenuTrigger: 'hover' | 'click' | 'both';
|
|
53
56
|
/** Draws the item in a checked state. */
|
|
@@ -33,6 +33,7 @@ export declare class SubmenuController implements ReactiveController {
|
|
|
33
33
|
hostConnected(): void;
|
|
34
34
|
hostDisconnected(): void;
|
|
35
35
|
hostUpdated(): void;
|
|
36
|
+
private syncAriaExpanded;
|
|
36
37
|
private addListeners;
|
|
37
38
|
private removeListeners;
|
|
38
39
|
private syncIsHorizontalMenu;
|
|
@@ -42,6 +42,16 @@ export default class CxPopup extends CortexElement {
|
|
|
42
42
|
static styles: CSSResultGroup;
|
|
43
43
|
private anchorEl;
|
|
44
44
|
private cleanup;
|
|
45
|
+
/**
|
|
46
|
+
* Set when the element disconnects, cleared when it reconnects.
|
|
47
|
+
*
|
|
48
|
+
* `start()` is debounced, so a pending invocation can still run after
|
|
49
|
+
* `disconnectedCallback()` has already executed `stopImmediate()` — at which
|
|
50
|
+
* point nothing is left to release the `autoUpdate()` listeners it registers
|
|
51
|
+
* on `window`. Checked alongside `isConnected`, which a popup inside a shadow
|
|
52
|
+
* tree that is discarded as a whole can still report as `true`.
|
|
53
|
+
*/
|
|
54
|
+
private isTornDown;
|
|
45
55
|
private readonly localize;
|
|
46
56
|
/** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */
|
|
47
57
|
popup: HTMLElement;
|
|
@@ -172,6 +182,7 @@ export default class CxPopup extends CortexElement {
|
|
|
172
182
|
*/
|
|
173
183
|
autoWidthFactor: number;
|
|
174
184
|
private get isSizeMiddleWareUsed();
|
|
185
|
+
connectedCallback(): void;
|
|
175
186
|
disconnectedCallback(): void;
|
|
176
187
|
connectedUpdatedCallback(): void;
|
|
177
188
|
updated(changedProps: Map<string, unknown>): Promise<void>;
|
|
@@ -68,6 +68,13 @@ export default class CxSelect extends CortexElement implements CortexFormControl
|
|
|
68
68
|
private readonly localize;
|
|
69
69
|
private typeToSelectString;
|
|
70
70
|
private closeWatcher;
|
|
71
|
+
/**
|
|
72
|
+
* The root node the `focusin` listener was attached to, captured at attach
|
|
73
|
+
* time. `getRootNode()` returns a different node once the element is
|
|
74
|
+
* detached, so re-calling it during cleanup would fail to remove the
|
|
75
|
+
* listener that was actually added.
|
|
76
|
+
*/
|
|
77
|
+
private openListenersRoot;
|
|
71
78
|
popup: CxPopup;
|
|
72
79
|
combobox: HTMLSlotElement;
|
|
73
80
|
displayInput: HTMLInputElement;
|
|
@@ -310,6 +317,7 @@ export default class CxSelect extends CortexElement implements CortexFormControl
|
|
|
310
317
|
*/
|
|
311
318
|
filterCallback(option: HTMLElement, value: string): boolean;
|
|
312
319
|
connectedCallback(): void;
|
|
320
|
+
disconnectedCallback(): void;
|
|
313
321
|
runFirstUpdated(): void;
|
|
314
322
|
private addOpenListeners;
|
|
315
323
|
private removeOpenListeners;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Frozen columns are pinned by `position: sticky` written from `FrozenColumns.layoutElement`, and
|
|
3
|
+
* their resize handles by matching insets from `ResizeColumns.reinitializeColumn`. Both resolve
|
|
4
|
+
* against `.tabulator-tableholder`, the table's single scroll container — keep it that way. This
|
|
5
|
+
* sheet only owns what sticky cannot express: the freeze divider and the stacking order around it.
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: import('lit').CSSResult;
|
|
8
8
|
export default _default;
|
package/library/packages/hybrid/table-core/src/table/styles/table-overlay-scrollbar.styles.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* use-overlay-scrollbar: table-scoped OverlayScrollbars rules —
|
|
3
|
-
* the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* use-overlay-scrollbar: table-scoped OverlayScrollbars rules — positioning of
|
|
3
|
+
* the scrollbars slotted into `.table` (see initScrollbars) and the mapping of
|
|
4
|
+
* the `:host` scrollbar css vars (declared below) onto the OverlayScrollbars
|
|
5
|
+
* theme so tables with and without use-overlay-scrollbar look the same.
|
|
6
|
+
*
|
|
7
|
+
* There are deliberately no rules for a generated viewport element: the single
|
|
8
|
+
* instance runs in `viewportIsTarget` mode so `.tabulator-tableholder` stays
|
|
9
|
+
* the scroll container that frozen columns pin against.
|
|
7
10
|
*/
|
|
8
11
|
declare const _default: import('lit').CSSResult;
|
|
9
12
|
export default _default;
|
|
@@ -102,10 +102,7 @@ export default class CxTable extends CortexElement {
|
|
|
102
102
|
'cx-table-toolbar': typeof CxTableToolbar;
|
|
103
103
|
'cx-tooltip': typeof CxTooltip;
|
|
104
104
|
};
|
|
105
|
-
private
|
|
106
|
-
private horizontalOsInstance;
|
|
107
|
-
/** Removes the horizontal scrollbar's scroll listener (see syncFrozenOffset). */
|
|
108
|
-
private frozenScrollOff;
|
|
105
|
+
private osInstance;
|
|
109
106
|
private resizeObserver;
|
|
110
107
|
private overflowObserver;
|
|
111
108
|
private readonly ajaxFacetsController;
|
|
@@ -926,14 +923,7 @@ export default class CxTable extends CortexElement {
|
|
|
926
923
|
private repositionValidationTooltipNow;
|
|
927
924
|
private handleValidationMouseOut;
|
|
928
925
|
disconnectedCallback(): void;
|
|
929
|
-
private
|
|
930
|
-
private initHorizontalScrollbar;
|
|
931
|
-
/**
|
|
932
|
-
* Mirrors the horizontal scroller's offset into `--frozen-offset-start/end` so
|
|
933
|
-
* `table-frozen.styles.ts` can pin frozen columns. Deliberately not debounced: the offset must
|
|
934
|
-
* land in the same frame as the scroll, and it is only two custom-property writes.
|
|
935
|
-
*/
|
|
936
|
-
private syncFrozenOffset;
|
|
926
|
+
private initScrollbars;
|
|
937
927
|
private readonly checkHorizontalOverflow;
|
|
938
928
|
private initOverflowObserver;
|
|
939
929
|
private registerEventListeners;
|
|
@@ -28,6 +28,8 @@ export default class ResizeColumns extends Module {
|
|
|
28
28
|
* walks `columns` because `columnsByIndex` is still empty when `column-rendered` creates handles.
|
|
29
29
|
*/
|
|
30
30
|
private isPinnedEnd;
|
|
31
|
+
private pinHandle;
|
|
32
|
+
private repinFrozenHandles;
|
|
31
33
|
/**
|
|
32
34
|
* The in-flow handle goes right after the element it resizes — except for an end-pinned column,
|
|
33
35
|
* whose right edge is the table edge: its handle goes before the element, onto the freeze
|
|
@@ -35,9 +37,9 @@ export default class ResizeColumns extends Module {
|
|
|
35
37
|
*/
|
|
36
38
|
private attachHandle;
|
|
37
39
|
/**
|
|
38
|
-
* Re-inserts handles next to the element they resize
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* Re-inserts handles next to the element they resize and re-pins the frozen ones. Runs off
|
|
41
|
+
* `column-width`, which `FrozenColumns` subscribes to first (in `initialize()`, whereas this
|
|
42
|
+
* module subscribes lazily from `column-rendered`), so the margins read here are already current.
|
|
41
43
|
*/
|
|
42
44
|
reinitializeColumn(column: Column): void;
|
|
43
45
|
initializeColumn(type: string, component: any, column: Column, element: HTMLElement): void;
|
|
@@ -85,6 +85,16 @@ export default class CxGalleryItem extends HighlightableElement {
|
|
|
85
85
|
* The source of the image.
|
|
86
86
|
*/
|
|
87
87
|
src: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Candidate sources forwarded to the inner `<cx-image>` as a standard `srcset` value,
|
|
90
|
+
* so the browser downloads and decodes only the pixels the grid cell needs.
|
|
91
|
+
*/
|
|
92
|
+
srcset: string;
|
|
93
|
+
/**
|
|
94
|
+
* The rendered width forwarded to the inner `<cx-image>` as `sizes` (e.g. `"400px"`).
|
|
95
|
+
* Only meaningful together with `srcset`.
|
|
96
|
+
*/
|
|
97
|
+
sizes: string;
|
|
88
98
|
/**
|
|
89
99
|
* The alt text for the image.
|
|
90
100
|
*/
|
|
@@ -129,6 +129,7 @@ export default class CxIconPicker extends CortexElement {
|
|
|
129
129
|
private handleSearchInput;
|
|
130
130
|
private handleMenuSelect;
|
|
131
131
|
private handleBicolorChange;
|
|
132
|
+
private setValueMenuSelect;
|
|
132
133
|
setSelectOptionCurrent(option: HTMLElement, current?: boolean): void;
|
|
133
134
|
selectGetOptionLabel(option: HTMLElement): string;
|
|
134
135
|
selectFilterCallback(option: HTMLElement, value: string): boolean;
|
|
@@ -81,6 +81,15 @@ export default class CxMasonry extends CortexElement {
|
|
|
81
81
|
handleSortableChange(): void;
|
|
82
82
|
connectedUpdatedCallback(): void;
|
|
83
83
|
disconnectedCallback(): void;
|
|
84
|
+
/**
|
|
85
|
+
* The `sizes` hint for item images, expressed as a viewport fraction.
|
|
86
|
+
*
|
|
87
|
+
* The layout is CSS-column based, so no exact pixel width is available the way a
|
|
88
|
+
* measured grid provides one. Each item spans exactly one of `cols` columns, which
|
|
89
|
+
* makes the fraction an accurate upper bound and keeps the browser from assuming
|
|
90
|
+
* the default `100vw`.
|
|
91
|
+
*/
|
|
92
|
+
private get itemSizes();
|
|
84
93
|
handleItemClick(event: MouseEvent, item: MasonryItem): void;
|
|
85
94
|
handleSortableUpdate(event: Sortable.SortableEvent): void;
|
|
86
95
|
renderActions(item: MasonryItem): import('lit').TemplateResult<1>;
|
|
@@ -20,6 +20,8 @@ import { CSSResultGroup, TemplateResult } from 'lit';
|
|
|
20
20
|
* @summary A dropdown menu that accepts a JSON string to render menu items for the template switcher dropdown.
|
|
21
21
|
*
|
|
22
22
|
* @event {{ item: MenuItem }} cx-select - Emitted when a menu item is selected.
|
|
23
|
+
*
|
|
24
|
+
* @cssproperty [--view-and-sort-switch-label-color=var(--cx-color-neutral)] - Label color for switch rows. Switch rows stay neutral because the switch conveys the state; set this to re-enable a checked highlight.
|
|
23
25
|
*/
|
|
24
26
|
export default class CxViewAndSort extends CortexElement {
|
|
25
27
|
static readonly styles: CSSResultGroup;
|
|
@@ -55,6 +57,12 @@ export default class CxViewAndSort extends CortexElement {
|
|
|
55
57
|
hide(): void;
|
|
56
58
|
private handleButtonClick;
|
|
57
59
|
private handleSwitchClick;
|
|
60
|
+
/**
|
|
61
|
+
* Whether an item is one option out of a set the user picks from, such as items per page, and
|
|
62
|
+
* so needs `aria-checked`. Options share a `group`; switches, buttons, submenu openers and
|
|
63
|
+
* settings actions are excluded.
|
|
64
|
+
*/
|
|
65
|
+
private isSelectableOption;
|
|
58
66
|
render(): TemplateResult<1>;
|
|
59
67
|
renderMenuSection(section: MenuSection): TemplateResult;
|
|
60
68
|
renderMenuItem(item: MenuItem, isHorizontal?: boolean, tooltip?: string): TemplateResult;
|
|
@@ -23,6 +23,13 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
23
23
|
static readonly styles: CSSResultGroup;
|
|
24
24
|
/** Minimum scroll delta (px) required to trigger a virtual range update. */
|
|
25
25
|
private static readonly SCROLL_THRESHOLD;
|
|
26
|
+
/**
|
|
27
|
+
* Longest a row may block the next release while waiting for its images.
|
|
28
|
+
*
|
|
29
|
+
* Bounds the adaptive wait so a hanging request or an image that never fires
|
|
30
|
+
* `load`/`error` cannot stall the remaining rows indefinitely.
|
|
31
|
+
*/
|
|
32
|
+
private static readonly ROW_RELEASE_TIMEOUT;
|
|
26
33
|
static readonly dependencies: {
|
|
27
34
|
'cx-gallery-item': typeof CxGalleryItem;
|
|
28
35
|
'cx-tooltip': typeof CxTooltip;
|
|
@@ -109,6 +116,18 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
109
116
|
* Unloaded slots are approximated as 1×1 items.
|
|
110
117
|
*/
|
|
111
118
|
totalItems: number;
|
|
119
|
+
/**
|
|
120
|
+
* Delay in milliseconds between releasing one row of images and the next.
|
|
121
|
+
*
|
|
122
|
+
* Images are held back until their row is released, so the browser opens roughly one
|
|
123
|
+
* row's worth of requests at a time instead of one per rendered item. Each transform
|
|
124
|
+
* URL is an uncached backend render, and enough of them in parallel returns 503.
|
|
125
|
+
*
|
|
126
|
+
* A row also waits for the previous row's images to finish (capped by
|
|
127
|
+
* `ROW_RELEASE_TIMEOUT`), so this is the floor between releases rather than the exact
|
|
128
|
+
* cadence. Set to `0` to disable gating and let every rendered row load immediately.
|
|
129
|
+
*/
|
|
130
|
+
rowReleaseDelay: number;
|
|
112
131
|
/**
|
|
113
132
|
* The show content type.
|
|
114
133
|
*/
|
|
@@ -198,6 +217,29 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
198
217
|
private virtualFirst;
|
|
199
218
|
/** Inclusive index of the last item in the rendered virtual window. */
|
|
200
219
|
private virtualLast;
|
|
220
|
+
/**
|
|
221
|
+
* Exclusive upper bound of the grid rows whose images are allowed to load.
|
|
222
|
+
*
|
|
223
|
+
* A row's worth of items entering the DOM together makes the browser open that many
|
|
224
|
+
* image requests at once, and each distinct transform URL is an uncached backend
|
|
225
|
+
* render — enough parallelism there returns 503. Releasing one row at a time keeps
|
|
226
|
+
* the request count bounded by the row width instead of the rendered range.
|
|
227
|
+
*
|
|
228
|
+
* `Infinity` disables gating entirely (see `rowReleaseDelay`).
|
|
229
|
+
*/
|
|
230
|
+
private releasedRowCount;
|
|
231
|
+
/** Pending timer for the next row release; null when no release is scheduled. */
|
|
232
|
+
private rowReleaseTimer;
|
|
233
|
+
/**
|
|
234
|
+
* Images still loading in the most recently released row, by item index.
|
|
235
|
+
*
|
|
236
|
+
* The next row waits for this to drain so releases track real network progress
|
|
237
|
+
* rather than a fixed cadence, with `ROW_RELEASE_TIMEOUT` as the upper bound so a
|
|
238
|
+
* hanging or broken image cannot stall the rest of the grid.
|
|
239
|
+
*/
|
|
240
|
+
private readonly pendingRowImages;
|
|
241
|
+
/** Guards against scheduling a release while one is already in flight. */
|
|
242
|
+
private isRowReleaseScheduled;
|
|
201
243
|
private isTooltipShown;
|
|
202
244
|
protected galleryItemTag: string;
|
|
203
245
|
/**
|
|
@@ -249,6 +291,43 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
249
291
|
private computeLayout;
|
|
250
292
|
/** Recalculates which items fall within the current scroll viewport. */
|
|
251
293
|
private updateActiveRange;
|
|
294
|
+
/**
|
|
295
|
+
* Highest row index currently rendered, or -1 when nothing is rendered.
|
|
296
|
+
*
|
|
297
|
+
* Releases stop here rather than at the dataset's last row so scrolled-away rows are
|
|
298
|
+
* not fetched ahead of the ones the viewer is actually looking at.
|
|
299
|
+
*/
|
|
300
|
+
private get lastRenderedRow();
|
|
301
|
+
/**
|
|
302
|
+
* Whether the item at `index` may load its image yet.
|
|
303
|
+
*
|
|
304
|
+
* Items in unreleased rows render their cell and skeleton but receive no `src`, which
|
|
305
|
+
* is what keeps the grid's shape stable while images fill in progressively.
|
|
306
|
+
*/
|
|
307
|
+
protected isRowReleased(index: number): boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Marks every rendered item in `row` as awaiting its image, synchronously.
|
|
310
|
+
*
|
|
311
|
+
* Runs in the same tick as the release so `scheduleRowRelease()` sees a non-empty
|
|
312
|
+
* set on its next call. Items without a `src` are skipped: they never fire
|
|
313
|
+
* `cx-load` / `cx-error`, so they would hold the queue open until the timeout.
|
|
314
|
+
*/
|
|
315
|
+
private markRowImagesPending;
|
|
316
|
+
/**
|
|
317
|
+
* Clears an item from the in-flight set once its image settles (loaded or failed) and
|
|
318
|
+
* lets the next row through as soon as the row drains.
|
|
319
|
+
*/
|
|
320
|
+
private handleItemImageSettled;
|
|
321
|
+
/**
|
|
322
|
+
* Queues the next row release, if one is warranted and not already pending.
|
|
323
|
+
*
|
|
324
|
+
* Waits `rowReleaseDelay` when the previous row has drained, or up to
|
|
325
|
+
* `ROW_RELEASE_TIMEOUT` when it has not, so a stuck image only delays the grid
|
|
326
|
+
* instead of stopping it.
|
|
327
|
+
*/
|
|
328
|
+
private scheduleRowRelease;
|
|
329
|
+
/** Clears any pending release and resets the gate back to its initial state. */
|
|
330
|
+
private resetRowRelease;
|
|
252
331
|
/**
|
|
253
332
|
* Returns the index of the last item whose rowStart is within maxRows.
|
|
254
333
|
*/
|
|
@@ -291,6 +370,15 @@ export default class CxBentoGrid extends CortexElement {
|
|
|
291
370
|
* changes on every computeLayout() call, including resize-driven reflows) or
|
|
292
371
|
* the sync-row-content-height flag itself is toggled.
|
|
293
372
|
*/
|
|
373
|
+
/**
|
|
374
|
+
* Restarts row gating when the dataset shrinks or is replaced wholesale.
|
|
375
|
+
*
|
|
376
|
+
* Row indices refer to a specific layout, so keeping a release count across a new
|
|
377
|
+
* dataset would let its rows load all at once — the burst this gate exists to prevent.
|
|
378
|
+
* A dataset that only grew is treated as an appended page: the already-released rows
|
|
379
|
+
* still hold the same items, so their progress is kept and the new rows queue behind.
|
|
380
|
+
*/
|
|
381
|
+
handleDataChangeForRowRelease(oldData?: unknown, newData?: unknown): void;
|
|
294
382
|
handleRowContentHeightSync(): Promise<void>;
|
|
295
383
|
/**
|
|
296
384
|
* Get content position based on the size of the item.
|
|
@@ -29,6 +29,7 @@ export default class CxCommentMenu extends CortexElement {
|
|
|
29
29
|
popup: CxPopup;
|
|
30
30
|
linkTextInput: HTMLInputElement;
|
|
31
31
|
linkUrlInput: HTMLInputElement;
|
|
32
|
+
private formatButtons;
|
|
32
33
|
editor: Editor;
|
|
33
34
|
fullscreen: boolean;
|
|
34
35
|
canUpload: boolean;
|
|
@@ -49,6 +50,8 @@ export default class CxCommentMenu extends CortexElement {
|
|
|
49
50
|
*/
|
|
50
51
|
hideTimeBasedIcon: boolean;
|
|
51
52
|
private showTextFormats;
|
|
53
|
+
/** Index (within `formatButtons`) of the toolbar control that currently has `tabindex="0"`. */
|
|
54
|
+
private rovingIndex;
|
|
52
55
|
private showLinkPopup;
|
|
53
56
|
private linkTextValue;
|
|
54
57
|
private linkUrlValue;
|
|
@@ -70,6 +73,10 @@ export default class CxCommentMenu extends CortexElement {
|
|
|
70
73
|
private handleBulletListClick;
|
|
71
74
|
private handleOrderedListClick;
|
|
72
75
|
private handleLinkClick;
|
|
76
|
+
/** Roving-tabindex arrow-key navigation for the formatting toolbar (APG toolbar pattern). */
|
|
77
|
+
private handleToolbarKeyDown;
|
|
78
|
+
/** Keeps the roving tabindex in sync when a toolbar button is focused directly (click, or Tab back in). */
|
|
79
|
+
private handleToolbarFocusIn;
|
|
73
80
|
private handleLinkPopupOpen;
|
|
74
81
|
private handleLinkPopupSave;
|
|
75
82
|
private handleLinkTextInputChange;
|
|
@@ -84,6 +91,9 @@ export default class CxCommentMenu extends CortexElement {
|
|
|
84
91
|
handleEditorChange(): void;
|
|
85
92
|
runConnectedCallback(): void;
|
|
86
93
|
disconnectedCallback(): void;
|
|
94
|
+
/** Config for the toolbar's mark-toggle buttons (the Link button is rendered separately; it needs the popup wrapper). */
|
|
95
|
+
private get markFormatButtons();
|
|
96
|
+
private renderMarkFormatButton;
|
|
87
97
|
renderTextFormatMenu(): import('lit').TemplateResult<1>;
|
|
88
98
|
protected renderLeftMenu(): import('lit').TemplateResult<1>;
|
|
89
99
|
protected renderRightActions(): import('lit').TemplateResult<1>;
|
|
@@ -41,12 +41,13 @@ export default class CxSbImage extends CxImage {
|
|
|
41
41
|
'cx-resize-observer': typeof import('../../../../../atoms/src/index.ts').CxResizeObserver;
|
|
42
42
|
'cx-skeleton': typeof import('../../../../../atoms/src/index.ts').CxSkeleton;
|
|
43
43
|
'cx-space': typeof import('../../../../../atoms/src/index.ts').CxSpace;
|
|
44
|
-
'cx-spinner': typeof import('../../../../../atoms/src/index.ts').CxSpinner;
|
|
45
44
|
};
|
|
46
45
|
/**
|
|
47
46
|
* Override the default behavior of retrying to load the image when it fails to load.
|
|
48
47
|
*/
|
|
49
48
|
retryOnError: boolean;
|
|
49
|
+
/** Content-builder images keep their measured box visible while the asset loads. */
|
|
50
|
+
skeleton: boolean;
|
|
50
51
|
/**
|
|
51
52
|
* The path to the image to load in dark mode.
|
|
52
53
|
*/
|
|
@@ -214,6 +215,15 @@ export default class CxSbImage extends CxImage {
|
|
|
214
215
|
* Whether the image has an click action.
|
|
215
216
|
*/
|
|
216
217
|
private get hasClickAction();
|
|
218
|
+
/**
|
|
219
|
+
* The rendered width in CSS pixels, used as the `sizes` hint so the browser can pick
|
|
220
|
+
* the smallest `srcset` candidate that still covers the box.
|
|
221
|
+
*
|
|
222
|
+
* A `%` width carries no pixel value, so the measured `clientWidth` is used instead.
|
|
223
|
+
* Returns 0 when neither is known yet (before first layout), which makes the caller
|
|
224
|
+
* omit `sizes` and fall back to the browser's default `100vw` assumption.
|
|
225
|
+
*/
|
|
226
|
+
private get displayWidth();
|
|
217
227
|
handleClickActionChange(): Promise<void>;
|
|
218
228
|
handleClickSpaceChange(): void;
|
|
219
229
|
handleObjectFitChange(): Promise<void>;
|
|
@@ -5,7 +5,7 @@ import { default as CxSpinner } from '../../../atoms/src/components/spinner/spin
|
|
|
5
5
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
6
6
|
import { AssetFormatValue } from '../../../types/src/asset-format-picker';
|
|
7
7
|
import { Asset, AssetTypeString, Device, EditorMode, TeamSpaceRole } from '../../../types/src/content-builder';
|
|
8
|
-
import { Component, Editor
|
|
8
|
+
import { Component, Editor } from 'grapesjs';
|
|
9
9
|
import { TemplateResult } from 'lit';
|
|
10
10
|
import { CxBlockPicker } from './components/block-picker';
|
|
11
11
|
import { CxConfigManager } from './components/config-manager';
|
|
@@ -326,6 +326,35 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
326
326
|
private handleCanvasScroll;
|
|
327
327
|
private handleHorizontalScroll;
|
|
328
328
|
private handleRootToolbarRightClick;
|
|
329
|
+
/**
|
|
330
|
+
* Re-applies the toolbar position GrapesJS computed, clamped to the visible
|
|
331
|
+
* canvas so the toolbar never gets clipped.
|
|
332
|
+
*
|
|
333
|
+
* `getTargetToElementFixed` derives `left` from `elRect.width - toolbarWidth`
|
|
334
|
+
* (right-aligned to the selected element) and clamps it with
|
|
335
|
+
* `canvasLiftLimit`, which is measured against the frame rather than the
|
|
336
|
+
* visible canvas viewport. On an element near the left edge of the visible
|
|
337
|
+
* area that limit still allows a negative offset, so the toolbar overflows
|
|
338
|
+
* past the canvas and gets clipped. Clamping against the real canvas box
|
|
339
|
+
* turns that case into left-alignment.
|
|
340
|
+
*
|
|
341
|
+
* Both `left` and `top` are relative to the tools wrapper, which GrapesJS
|
|
342
|
+
* sizes to the selected element's box — hence the wrapper-to-canvas delta.
|
|
343
|
+
*
|
|
344
|
+
* Values are written with `important` so stylesheet rules on `.gjs-toolbar`
|
|
345
|
+
* cannot override the computed placement.
|
|
346
|
+
*/
|
|
347
|
+
private clampToolbarPosition;
|
|
348
|
+
/**
|
|
349
|
+
* Wraps `updateToolbarPos` so the toolbar position is re-applied after
|
|
350
|
+
* GrapesJS writes its own inline position.
|
|
351
|
+
*
|
|
352
|
+
* `updateToolbarPos` lives on the `select-comp` command (GrapesJS'
|
|
353
|
+
* `SelectComponent`), which owns the component toolbar / badge / highlight
|
|
354
|
+
* boxes — not on `CanvasView`. It is absent from the published `grapesjs`
|
|
355
|
+
* typings, so the command is narrowed through a local structural type.
|
|
356
|
+
*/
|
|
357
|
+
private patchToolbarPositioning;
|
|
329
358
|
private handleCanvasClick;
|
|
330
359
|
private handleCanvasKeydown;
|
|
331
360
|
private handleTemplateManagerUpdated;
|
|
@@ -388,11 +417,7 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
388
417
|
* @param components - The components to be updated in the component.
|
|
389
418
|
* @param styleProps - The style properties to be set for the component.
|
|
390
419
|
*/
|
|
391
|
-
updateComponent
|
|
392
|
-
attributes?: Record<string, string>;
|
|
393
|
-
properties?: Record<string, unknown>;
|
|
394
|
-
styleProps?: StyleProps;
|
|
395
|
-
}): void;
|
|
420
|
+
private updateComponent;
|
|
396
421
|
private handleOtherChange;
|
|
397
422
|
private handleMouseMove;
|
|
398
423
|
private getScrollableElements;
|
|
@@ -168,7 +168,7 @@ export default class CxDownloader extends CortexElement {
|
|
|
168
168
|
handleDrag(event: PointerEvent): void;
|
|
169
169
|
hide(): void;
|
|
170
170
|
show(): void;
|
|
171
|
-
|
|
171
|
+
updateVisibilityAttributes(): void;
|
|
172
172
|
getDownloadingFilesFromLocalStorage(): void;
|
|
173
173
|
onFilter(key: keyof DownloadItem, value: any): void;
|
|
174
174
|
updateFilteredFiles(): void;
|