@orangelogic/design-system 3.9.0 → 3.11.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.BLKOUD2l.js → asset-link-format.CxDu37Om.js} +591 -588
- package/library/chunks/{button.w0zH5Ivx.js → button.-Jl_NdgM.js} +1 -1
- package/library/chunks/{color-swatch-group.Bvq6xkM-.js → color-swatch-group.DGPlxYsp.js} +8 -8
- package/library/chunks/{color-swatch.Caved2kL.js → color-swatch.Dc-IqxsX.js} +1 -1
- package/library/chunks/{confirm-popover.BpYjy5nJ.js → confirm-popover.mgYIjZdo.js} +3 -3
- package/library/chunks/{dialog.ICoCAj6Z.js → dialog.YFc-HBc5.js} +2 -2
- package/library/chunks/{document-viewer.CRMRT7Ou.js → document-viewer.DhJ4jBNe.js} +6 -6
- package/library/chunks/{dot-pagination.CzVpiv00.js → dot-pagination.BgETAL2j.js} +1 -1
- package/library/chunks/{folder-select.CP0NPc0S.js → folder-select.Hl51n0ge.js} +4 -4
- package/library/chunks/{header.BQg_JjHw.js → header.BeZml2NV.js} +2 -2
- package/library/chunks/{i18n.BA19xtyU.js → i18n.CNnI4-0K.js} +4 -0
- package/library/chunks/{icon-button.BWJ1Vqn5.js → icon-button.ENVA7x3u.js} +1 -1
- package/library/chunks/{iframe.Dm-nXSBv.js → iframe.Cgy_DE7W.js} +1 -1
- package/library/chunks/{image.BsLsWySo.js → image.1ufrCtW1.js} +1 -1
- package/library/chunks/{index.4gEMGYGn.js → index.BAJfz5QI.js} +584 -619
- package/library/chunks/{input.D1TGTsxj.js → input.BJ5LN8of.js} +1 -1
- package/library/chunks/{markdown.CnX2rNeb.js → markdown.CrIkpd0h.js} +2 -2
- package/library/chunks/{menu-item.uFqeX_J6.js → menu-item.DfsfX25P.js} +1 -1
- package/library/chunks/{option.jeaj7_Lr.js → option.B34is9Z5.js} +1 -1
- package/library/chunks/{pagination.DDW-Lw16.js → pagination.DMAcWRyI.js} +5 -5
- package/library/chunks/{tab-group.Dpj7Lx8_.js → tab-group.D14m1Kel.js} +4 -4
- package/library/chunks/{tree.DYFFjW1-.js → tree.BEFWro0D.js} +1 -1
- package/library/chunks/{types.Bin5fi-e.js → types.D0NvE1EB.js} +21496 -21291
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +15 -15
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +328 -327
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-publish-page-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-publish-page-submit.d.ts +9 -0
- package/library/packages/events/src/cx-view-and-sort-action-click.d.ts +11 -0
- package/library/packages/events/src/events.d.ts +3 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/publish-page/publish-page.d.ts +169 -0
- package/library/packages/molecules/src/publish-page/publish-page.styles.d.ts +2 -0
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +11 -1
- package/library/packages/organisms/src/template-switcher/template-switcher-example.data.d.ts +1 -0
- package/library/packages/organisms/src/template-switcher/template-switcher.d.ts +3 -0
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/content-builder.d.ts +1 -5
- package/library/react-web-component.d.ts +116 -13
- package/library/utils.js +1 -1
- package/package.json +1 -1
|
@@ -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.1ufrCtW1.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.CNnI4-0K.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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CxViewAndSortActionClickEvent = CustomEvent<{
|
|
2
|
+
/** The action's own event name, opaque to the menu. */
|
|
3
|
+
eventName: string;
|
|
4
|
+
/** The menu item's value. */
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare global {
|
|
8
|
+
interface GlobalEventHandlersEventMap {
|
|
9
|
+
'cx-view-and-sort-action-click': CxViewAndSortActionClickEvent;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -151,6 +151,8 @@ export * from './cx-pdf-viewer-toolbar-scale-change';
|
|
|
151
151
|
export * from './cx-pdf-viewer-toolbar-view-toggle';
|
|
152
152
|
export * from './cx-pdf-viewer-view-on-asset-toggle';
|
|
153
153
|
export * from './cx-ready';
|
|
154
|
+
export * from './cx-publish-page-cancel';
|
|
155
|
+
export * from './cx-publish-page-submit';
|
|
154
156
|
export * from './cx-redo';
|
|
155
157
|
export * from './cx-refresh';
|
|
156
158
|
export * from './cx-register-tag';
|
|
@@ -253,6 +255,7 @@ export * from './cx-video-seeked';
|
|
|
253
255
|
export * from './cx-video-segment-change';
|
|
254
256
|
export * from './cx-video-time-update';
|
|
255
257
|
export * from './cx-video-thumbnail-resolved';
|
|
258
|
+
export * from './cx-view-and-sort-action-click';
|
|
256
259
|
export * from './cx-view-logs';
|
|
257
260
|
export * from './cx-xml-editor-asset-type-change';
|
|
258
261
|
export * from './cx-xml-editor-change';
|
|
@@ -32,6 +32,7 @@ export { default as CxPaddingInputGroup } from './padding-input-group/padding-in
|
|
|
32
32
|
export { default as CxPageOutline } from './page-outline/page-outline';
|
|
33
33
|
export { default as CxPdfViewerToolbar } from './pdf-viewer-toolbar/pdf-viewer-toolbar';
|
|
34
34
|
export { default as CxPositionPicker } from './position-picker/position-picker';
|
|
35
|
+
export { default as CxPublishPage } from './publish-page/publish-page';
|
|
35
36
|
export { default as CxSearchBox } from './search-box/search-box';
|
|
36
37
|
export { default as CxShadowInputGroup } from './shadow-input-group/shadow-input-group';
|
|
37
38
|
export { default as CxShareOptionList } from './share-option-list/share-option-list';
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
2
|
+
import { CxAfterHideEvent, CxChangeEvent, CxInitialFocusEvent, CxInputEvent, CxRequestCloseEvent } from '../../../events/src/events.ts';
|
|
3
|
+
import { CSSResultGroup } from 'lit';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @summary Collects the version metadata needed to publish a CMS page: a required version name, a
|
|
7
|
+
* read-only version number, and an optional description.
|
|
8
|
+
*
|
|
9
|
+
* @description Presentational only — it performs no network calls. The host listens for
|
|
10
|
+
* `cx-publish-page-submit` and owns the actual publish. Labels are supplied as properties so the
|
|
11
|
+
* server can drive them from configuration; each falls back to a localized term.
|
|
12
|
+
*
|
|
13
|
+
* @event {{ description: string, publishAncestors: boolean, versionName: string }}
|
|
14
|
+
* cx-publish-page-submit - The publish button was activated and the version name passed validation.
|
|
15
|
+
* `publishAncestors` reports the user's answer to the ancestors question, and is true when the page
|
|
16
|
+
* has no unpublished ancestors to decide about.
|
|
17
|
+
* @event cx-publish-page-cancel - The cancel button was activated, or Escape was pressed.
|
|
18
|
+
*
|
|
19
|
+
* @csspart base - The dialog element.
|
|
20
|
+
* @csspart header - The heading block in the dialog's label slot.
|
|
21
|
+
* @csspart title - The form heading.
|
|
22
|
+
* @csspart page-name - The name of the page being published.
|
|
23
|
+
* @csspart status - The page status badge.
|
|
24
|
+
* @csspart ancestors - The block asking what to do about unpublished ancestors.
|
|
25
|
+
* @csspart ancestors-warning - The warning naming pages that will also be published.
|
|
26
|
+
* @csspart ancestors-choice - The checkbox choosing whether to publish those pages too.
|
|
27
|
+
* @csspart blocking-error - The reason the page cannot be published at all.
|
|
28
|
+
* @csspart fields - The container that wraps the form fields.
|
|
29
|
+
* @csspart version-name - The version name field.
|
|
30
|
+
* @csspart version-id - The read-only version number field.
|
|
31
|
+
* @csspart description - The description field.
|
|
32
|
+
* @csspart actions - The container that wraps the action buttons.
|
|
33
|
+
* @csspart submit-button - The publish button.
|
|
34
|
+
* @csspart submit-spinner - The spinner shown in the publish button while the host completes a submit.
|
|
35
|
+
* @csspart cancel-button - The cancel button.
|
|
36
|
+
*
|
|
37
|
+
* @cssproperty [--publish-page-width=840px] - The width of the dialog panel.
|
|
38
|
+
*/
|
|
39
|
+
export default class CxPublishPage extends CortexElement {
|
|
40
|
+
static readonly styles: CSSResultGroup;
|
|
41
|
+
static readonly dependencies: Record<string, typeof CortexElement>;
|
|
42
|
+
private readonly localize;
|
|
43
|
+
private readonly versionNameInput;
|
|
44
|
+
private readonly dialog;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the dialog is showing. The host opens the dialog before its data has arrived (see
|
|
47
|
+
* `loading`), so this is driven independently of the field values.
|
|
48
|
+
*/
|
|
49
|
+
open: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The host is still fetching the values this form displays. Submitting is refused while true, so an
|
|
52
|
+
* optimistically-opened dialog cannot be submitted against fields that have not loaded yet.
|
|
53
|
+
*/
|
|
54
|
+
loading: boolean;
|
|
55
|
+
/** Heading shown at the top of the form. */
|
|
56
|
+
formTitle: string;
|
|
57
|
+
/** Name of the page being published, shown under the heading. */
|
|
58
|
+
pageName: string;
|
|
59
|
+
/** Current status of the page (e.g. "Draft"), shown as a badge beside the page name. */
|
|
60
|
+
statusLabel: string;
|
|
61
|
+
/**
|
|
62
|
+
* Why this page cannot be published at all. Shown in place of the form: there is nothing to fill in
|
|
63
|
+
* for a publish that cannot happen.
|
|
64
|
+
*/
|
|
65
|
+
blockingError: string;
|
|
66
|
+
/**
|
|
67
|
+
* Pages that publishing this one will also publish. Shown above the fields so the user sees the
|
|
68
|
+
* consequence before committing, rather than in a separate confirmation step.
|
|
69
|
+
*/
|
|
70
|
+
ancestorsWarning: string;
|
|
71
|
+
/** Label for the checkbox that answers the ancestors warning. */
|
|
72
|
+
ancestorsChoiceLabel: string;
|
|
73
|
+
/** Label for the version name field. */
|
|
74
|
+
versionNameLabel: string;
|
|
75
|
+
/** Label for the read-only version number field. */
|
|
76
|
+
versionIdLabel: string;
|
|
77
|
+
/** Label for the description field. */
|
|
78
|
+
descriptionLabel: string;
|
|
79
|
+
/** Placeholder shown in the empty version name field. */
|
|
80
|
+
versionNamePlaceholder: string;
|
|
81
|
+
/** Placeholder shown in the empty description field. */
|
|
82
|
+
descriptionPlaceholder: string;
|
|
83
|
+
/** The version number this publish will produce. Displayed read-only. */
|
|
84
|
+
versionId: string;
|
|
85
|
+
/** Text for the submit button. */
|
|
86
|
+
submitLabel: string;
|
|
87
|
+
/** Text for the cancel button. */
|
|
88
|
+
cancelLabel: string;
|
|
89
|
+
/** Message shown under the version name field when it is left empty. */
|
|
90
|
+
requiredMessage: string;
|
|
91
|
+
/**
|
|
92
|
+
* Disables both buttons while the host completes a submit, so a slow round trip cannot be
|
|
93
|
+
* submitted twice.
|
|
94
|
+
*/
|
|
95
|
+
busy: boolean;
|
|
96
|
+
/** The version name entered so far. */
|
|
97
|
+
private versionName;
|
|
98
|
+
/** The description entered so far. */
|
|
99
|
+
private description;
|
|
100
|
+
/** Whether the empty-version-name message is currently shown. */
|
|
101
|
+
private showVersionNameError;
|
|
102
|
+
/**
|
|
103
|
+
* Bumped on every open, and used to key the fields so each visit gets brand-new controls.
|
|
104
|
+
*
|
|
105
|
+
* Clearing the values is not enough on its own: the form controller marks a control as
|
|
106
|
+
* user-interacted the first time it is typed into and keeps that flag against the element itself.
|
|
107
|
+
* Because this dialog is created once and reused, the second publish reopened onto an input that
|
|
108
|
+
* was still flagged - empty, required and interacted - so it rendered in its invalid state before
|
|
109
|
+
* the user had touched anything.
|
|
110
|
+
*/
|
|
111
|
+
private openCount;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the user has declined to publish the unpublished ancestors along with this page.
|
|
114
|
+
*
|
|
115
|
+
* Held negatively so the default stays `false` while the checkbox reads checked: publishing the
|
|
116
|
+
* ancestors is what the server does unless told otherwise, and it is what keeps the page reachable.
|
|
117
|
+
*/
|
|
118
|
+
private skipAncestors;
|
|
119
|
+
/**
|
|
120
|
+
* Start every visit to the dialog from a clean slate. The element is created once and reused for
|
|
121
|
+
* every page, so nothing entered for one publish may carry over to the next - neither the ancestors
|
|
122
|
+
* answer nor the text fields, which describe one specific version.
|
|
123
|
+
*
|
|
124
|
+
* This resets on the transition into open, not on close, so a failed publish keeps what was typed:
|
|
125
|
+
* the dialog stays open in that case, ready to retry.
|
|
126
|
+
*/
|
|
127
|
+
handleOpenChange(): void;
|
|
128
|
+
/**
|
|
129
|
+
* The dialog owns focus while it is open, so take the initial focus from its own event rather than
|
|
130
|
+
* from first render - the component may be created and rendered long before it is opened.
|
|
131
|
+
*/
|
|
132
|
+
handleInitialFocus(event: CxInitialFocusEvent): void;
|
|
133
|
+
handleVersionNameInput(event: CxInputEvent): void;
|
|
134
|
+
handleAncestorsChoiceChange(event: CxChangeEvent): void;
|
|
135
|
+
handleDescriptionInput(event: CxInputEvent): void;
|
|
136
|
+
/**
|
|
137
|
+
* Enter submits, except inside the description, where it has to insert a newline - the box is
|
|
138
|
+
* multi-line and publishing on Enter would make it unusable.
|
|
139
|
+
*
|
|
140
|
+
* Escape is deliberately not handled here: the dialog already closes itself on Escape and reports it
|
|
141
|
+
* through cx-request-close, so handling it too would emit cancel twice.
|
|
142
|
+
*/
|
|
143
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
144
|
+
handleSubmitClick(): void;
|
|
145
|
+
handleCancelClick(): void;
|
|
146
|
+
/**
|
|
147
|
+
* The dialog's own close affordances - close button, Escape, overlay click - are a cancel. Let the
|
|
148
|
+
* dialog run its hide animation; the host closes it by clearing `open`.
|
|
149
|
+
*/
|
|
150
|
+
handleRequestClose(event: CxRequestCloseEvent): void;
|
|
151
|
+
/** Keep `open` in step when the dialog hides itself, so reopening it works. */
|
|
152
|
+
handleAfterHide(event: CxAfterHideEvent): void;
|
|
153
|
+
private submit;
|
|
154
|
+
private cancel;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the form is replaced by a notice.
|
|
157
|
+
*
|
|
158
|
+
* Only a blocking error does this. The ancestors warning is informational - publishing goes ahead
|
|
159
|
+
* and takes those pages with it - so hiding the fields for it would hide the required version name
|
|
160
|
+
* and make the page impossible to publish precisely when it has unpublished parents.
|
|
161
|
+
*/
|
|
162
|
+
private get hasNotice();
|
|
163
|
+
render(): import('lit').TemplateResult<1>;
|
|
164
|
+
}
|
|
165
|
+
declare global {
|
|
166
|
+
interface HTMLElementTagNameMap {
|
|
167
|
+
'cx-publish-page': CxPublishPage;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -21,6 +21,7 @@ import { CSSResultGroup, TemplateResult } from 'lit';
|
|
|
21
21
|
* @summary A dropdown menu that accepts a JSON string to render menu items for the template switcher dropdown.
|
|
22
22
|
*
|
|
23
23
|
* @event {{ item: MenuItem }} cx-select - Emitted when a menu item is selected.
|
|
24
|
+
* @event {{ eventName: string, value: string }} cx-view-and-sort-action-click - Emitted when a menu item's trailing action icon is pressed. A distinct behavior from selecting the item: `cx-select` is suppressed for that click.
|
|
24
25
|
*
|
|
25
26
|
* @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.
|
|
26
27
|
*/
|
|
@@ -59,6 +60,7 @@ export default class CxViewAndSort extends CortexElement {
|
|
|
59
60
|
hide(): void;
|
|
60
61
|
private handleButtonClick;
|
|
61
62
|
private handleSwitchClick;
|
|
63
|
+
private handleActionClick;
|
|
62
64
|
/**
|
|
63
65
|
* Whether an item is one option out of a set the user picks from, such as items per page, and
|
|
64
66
|
* so needs `aria-checked`. Options share a `group`; switches, buttons, submenu openers and
|
|
@@ -68,6 +70,11 @@ export default class CxViewAndSort extends CortexElement {
|
|
|
68
70
|
render(): TemplateResult<1>;
|
|
69
71
|
renderMenuSection(section: MenuSection): TemplateResult;
|
|
70
72
|
renderMenuItem(item: MenuItem, isHorizontal?: boolean, tooltip?: string): TemplateResult;
|
|
73
|
+
/**
|
|
74
|
+
* Trailing action button for items configured with `action`. Rendered last in
|
|
75
|
+
* the suffix group so it sits at the far right of the row.
|
|
76
|
+
*/
|
|
77
|
+
private renderItemAction;
|
|
71
78
|
}
|
|
72
79
|
declare global {
|
|
73
80
|
interface HTMLElementTagNameMap {
|
package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts
CHANGED
|
@@ -66,31 +66,6 @@ export default class CxConfigManager extends CortexElement {
|
|
|
66
66
|
* @default false
|
|
67
67
|
*/
|
|
68
68
|
enableFontFamilyControls: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Default asset format applied to image blocks.
|
|
71
|
-
* @default 'TRX'
|
|
72
|
-
*/
|
|
73
|
-
defaultImageFormat: string;
|
|
74
|
-
/**
|
|
75
|
-
* Default asset format applied to video poster (thumbnail) blocks.
|
|
76
|
-
* @default 'TRX'
|
|
77
|
-
*/
|
|
78
|
-
defaultVideoPosterFormat: string;
|
|
79
|
-
/**
|
|
80
|
-
* Default asset format applied to gallery blocks.
|
|
81
|
-
* @default 'TRX'
|
|
82
|
-
*/
|
|
83
|
-
defaultGalleryFormat: string;
|
|
84
|
-
/**
|
|
85
|
-
* Default asset format applied to carousel blocks.
|
|
86
|
-
* @default 'TRX'
|
|
87
|
-
*/
|
|
88
|
-
defaultCarouselFormat: string;
|
|
89
|
-
/**
|
|
90
|
-
* Default asset format applied to timeline blocks.
|
|
91
|
-
* @default 'TRX'
|
|
92
|
-
*/
|
|
93
|
-
defaultTimelineFormat: string;
|
|
94
69
|
/**
|
|
95
70
|
* Root folder ids the folder-picker controls are restricted to (forwarded to
|
|
96
71
|
* cx-config-form). Sourced from the space's configured root folders.
|
package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts
CHANGED
|
@@ -93,6 +93,14 @@ export default class CxGalleryPicker extends CortexElement implements CortexForm
|
|
|
93
93
|
private readonly maxColumns;
|
|
94
94
|
private readonly rowHeight;
|
|
95
95
|
private readonly spacing;
|
|
96
|
+
/**
|
|
97
|
+
* Proxy the picker's thumbnails are always served from.
|
|
98
|
+
*
|
|
99
|
+
* The picker shows the author which asset they are choosing, in a fixed-size grid, so it
|
|
100
|
+
* pins one small proxy instead of following the block's configured format — the format
|
|
101
|
+
* the block will render at says nothing about what this preview needs.
|
|
102
|
+
*/
|
|
103
|
+
private static readonly THUMBNAIL_FORMAT;
|
|
96
104
|
private autofetchController;
|
|
97
105
|
/** Gets the validity state object */
|
|
98
106
|
get validity(): {
|
|
@@ -18,11 +18,10 @@ import { CxRTEBubbleMenu, CxRTETableGenerator } from './plugins';
|
|
|
18
18
|
* download-format, and asset-format-picker controls on image, video, gallery,
|
|
19
19
|
* carousel, and timeline blocks. Off by default.
|
|
20
20
|
*
|
|
21
|
-
* `default-image-format`, `default-video-poster-format`,
|
|
22
|
-
* `default-gallery-format
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* fallback when a block has not had its format explicitly configured.
|
|
21
|
+
* `default-image-format`, `default-video-poster-format`, `default-timeline-format`,
|
|
22
|
+
* `default-gallery-format` and `default-carousel-format` are retained for backward
|
|
23
|
+
* compatibility but no longer do anything: every block type now starts in `Auto` and
|
|
24
|
+
* derives its proxy from the asset's own file extension.
|
|
26
25
|
*
|
|
27
26
|
* @event cx-change - Emitted when the content builder changes.
|
|
28
27
|
*/
|
|
@@ -121,38 +120,53 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
121
120
|
*/
|
|
122
121
|
enableMetrics: boolean;
|
|
123
122
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* `
|
|
127
|
-
*
|
|
123
|
+
* Retained for backward compatibility; it no longer changes how image blocks resolve.
|
|
124
|
+
*
|
|
125
|
+
* Image blocks always start in `Auto` now: no format is stored on creation or on pick, so
|
|
126
|
+
* each one derives its proxy from the asset's own file extension. Setting this attribute
|
|
127
|
+
* is accepted and reflected, but nothing reads it.
|
|
128
|
+
*
|
|
129
|
+
* @deprecated Image format is resolved from the asset; this value is ignored.
|
|
128
130
|
*/
|
|
129
131
|
defaultImageFormat: string;
|
|
130
132
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* `
|
|
134
|
-
*
|
|
133
|
+
* Retained for backward compatibility; it no longer changes how video posters resolve.
|
|
134
|
+
*
|
|
135
|
+
* A video poster always starts in `Auto` now: no thumbnail format is stored on creation
|
|
136
|
+
* or on pick, so the proxy is derived from the picked asset. Setting this attribute is
|
|
137
|
+
* accepted and reflected, but nothing reads it.
|
|
138
|
+
*
|
|
139
|
+
* @deprecated Poster format is resolved from the asset; this value is ignored.
|
|
135
140
|
*/
|
|
136
141
|
defaultVideoPosterFormat: string;
|
|
137
142
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* `
|
|
141
|
-
*
|
|
143
|
+
* Retained for backward compatibility; it no longer changes how galleries resolve.
|
|
144
|
+
*
|
|
145
|
+
* A gallery always starts in `Auto` now: no format is stored on creation, and switching
|
|
146
|
+
* source resets back to `Auto`, so each item derives its proxy from its own file
|
|
147
|
+
* extension. Setting this attribute is accepted and reflected, but nothing reads it.
|
|
148
|
+
*
|
|
149
|
+
* @deprecated Format is resolved per item from the asset; this value is ignored.
|
|
142
150
|
*/
|
|
143
151
|
defaultGalleryFormat: string;
|
|
144
152
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* `
|
|
148
|
-
*
|
|
153
|
+
* Retained for backward compatibility; it no longer changes how carousels resolve.
|
|
154
|
+
*
|
|
155
|
+
* A carousel always starts in `Auto` now: no format is stored on creation, and switching
|
|
156
|
+
* source resets back to `Auto`, so each item derives its proxy from its own file
|
|
157
|
+
* extension. Setting this attribute is accepted and reflected, but nothing reads it.
|
|
158
|
+
*
|
|
159
|
+
* @deprecated Format is resolved per item from the asset; this value is ignored.
|
|
149
160
|
*/
|
|
150
161
|
defaultCarouselFormat: string;
|
|
151
162
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* `
|
|
155
|
-
*
|
|
163
|
+
* Retained for backward compatibility; it no longer changes how timelines resolve.
|
|
164
|
+
*
|
|
165
|
+
* Timeline thumbnails always start in `Auto` now: no format is stored on creation, so
|
|
166
|
+
* each item derives its proxy from its own file extension. Setting this attribute is
|
|
167
|
+
* accepted and reflected, but nothing reads it.
|
|
168
|
+
*
|
|
169
|
+
* @deprecated Timeline format is resolved per item from the asset; this value is ignored.
|
|
156
170
|
*/
|
|
157
171
|
defaultTimelineFormat: string;
|
|
158
172
|
/**
|
|
@@ -4,11 +4,6 @@ import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
|
|
|
4
4
|
import { Component, ComponentDefinition, ComponentView, ComponentViewDefinition, Editor } from 'grapesjs';
|
|
5
5
|
|
|
6
6
|
export type EditorPluginOptions = {
|
|
7
|
-
defaultCarouselFormat?: string;
|
|
8
|
-
defaultGalleryFormat?: string;
|
|
9
|
-
defaultImageFormat?: string;
|
|
10
|
-
defaultTimelineFormat?: string;
|
|
11
|
-
defaultVideoPosterFormat?: string;
|
|
12
7
|
enableAssetFormatControls?: boolean;
|
|
13
8
|
localize: LocalizeController;
|
|
14
9
|
multiLanguage?: boolean;
|
|
@@ -21,8 +21,8 @@ export default class StyleController {
|
|
|
21
21
|
default?: any;
|
|
22
22
|
max?: number | undefined;
|
|
23
23
|
min?: number | undefined;
|
|
24
|
-
text?: string | undefined;
|
|
25
24
|
placeholder?: string;
|
|
25
|
+
text?: string | undefined;
|
|
26
26
|
category?: (string | import('grapesjs').BlockCategoryProperties) | undefined;
|
|
27
27
|
command?: string | ((editor: import('grapesjs').Editor, trait: import('grapesjs').Trait) => any) | undefined;
|
|
28
28
|
step?: number | undefined;
|
|
@@ -89,6 +89,7 @@ export default class StyleController {
|
|
|
89
89
|
objectIdKey?: string;
|
|
90
90
|
prescribedDocTypes?: import('../../../types/src/download-format-picker').DownloadDocType[];
|
|
91
91
|
};
|
|
92
|
+
excludeFromContentConfigs?: boolean;
|
|
92
93
|
folderPickerConfigs?: {
|
|
93
94
|
useAllowedFolders?: boolean;
|
|
94
95
|
useFullPath?: boolean;
|
|
@@ -93,8 +93,18 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
93
93
|
* values).
|
|
94
94
|
*/
|
|
95
95
|
data: DamCustomToolbarButton[];
|
|
96
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Column definitions forwarded to the inner `cx-list-editor` table. Attribute-settable, like
|
|
98
|
+
* `cx-list-editor`'s own `columns`, so a server-rendered host can supply them as JSON.
|
|
99
|
+
*/
|
|
97
100
|
columns: Array<Record<string, unknown>>;
|
|
101
|
+
/**
|
|
102
|
+
* Space that owns the page being configured. Scopes the "Add button" list to that space's
|
|
103
|
+
* quick actions and page buttons. Left empty, the backend resolves the space from the request
|
|
104
|
+
* context, which only answers where the request carries one — a host rendering this editor
|
|
105
|
+
* outside a space page (a settings panel, a popup) must set it or the list comes back empty.
|
|
106
|
+
*/
|
|
107
|
+
teamspaceModule: string;
|
|
98
108
|
/** Boundary element passed to the dialog (typically the content-builder host). */
|
|
99
109
|
boundary: HTMLElement;
|
|
100
110
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
2
|
+
import { CxViewAndSortActionClickEvent } from '../../../events/src/events.ts';
|
|
2
3
|
import { default as CxViewAndSort } from '../../../molecules/src/view-and-sort/view-and-sort.ts';
|
|
3
4
|
import { ButtonSize, ButtonVariant } from '../../../types/src/button';
|
|
4
5
|
import { Settings, TemplateSwitcherProps } from '../../../types/src/template-switcher';
|
|
@@ -18,6 +19,7 @@ import { TemplateResult } from 'lit';
|
|
|
18
19
|
* @property {boolean} _loading - Internal state to indicate if the component is loading.
|
|
19
20
|
*
|
|
20
21
|
* @event {{ item: MenuItem }} cx-select - Emitted when a menu item is selected.
|
|
22
|
+
* @event {{ eventName: string, value: string }} cx-view-and-sort-action-click - Emitted when a view's trailing action icon is pressed. Configure it via `Option.action` on a category's single non-setting view. Sends `action.eventName` to Cortex and closes the dropdown without changing the active view.
|
|
21
23
|
*/
|
|
22
24
|
export default class CxTemplateSwitcher extends CortexElement {
|
|
23
25
|
static readonly dependencies: {
|
|
@@ -47,6 +49,7 @@ export default class CxTemplateSwitcher extends CortexElement {
|
|
|
47
49
|
handleSettingsChange(): void;
|
|
48
50
|
handleAddCortexEvent(eventName: string, value: string, isSetting?: boolean): void;
|
|
49
51
|
handleItemSelect(event: CustomEvent): void;
|
|
52
|
+
handleActionClick(event: CxViewAndSortActionClickEvent): void;
|
|
50
53
|
render(): TemplateResult;
|
|
51
54
|
}
|
|
52
55
|
declare global {
|
|
@@ -14,6 +14,14 @@ type FetchImageControllerOptions = {
|
|
|
14
14
|
* asset exactly as stored (an editor preview, say) never picks this up by accident.
|
|
15
15
|
*/
|
|
16
16
|
autoFormat?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether items carry a `srcset` resize ladder.
|
|
19
|
+
*
|
|
20
|
+
* Defaults to `false`. A fixed-size surface (an editor preview, a thumbnail strip) renders
|
|
21
|
+
* one known size, so a ladder there only adds `/t/re_w_*` renditions the layout can never
|
|
22
|
+
* use. Opt in from a surface whose images are actually laid out responsively.
|
|
23
|
+
*/
|
|
24
|
+
buildSrcset?: boolean;
|
|
17
25
|
isSiteBuilder?: boolean;
|
|
18
26
|
maxEnd?: number;
|
|
19
27
|
pageSize?: number;
|
|
@@ -34,6 +42,8 @@ export declare class FetchImageController implements ReactiveController {
|
|
|
34
42
|
private readonly isSiteBuilder;
|
|
35
43
|
/** Whether delivery URLs carry the `.auto` marker. See `FetchImageControllerOptions`. */
|
|
36
44
|
private readonly autoFormat;
|
|
45
|
+
/** Whether items carry a `srcset` ladder. See `FetchImageControllerOptions`. */
|
|
46
|
+
private readonly buildSrcset;
|
|
37
47
|
private requestEpoch;
|
|
38
48
|
constructor(host: ReactiveElement, options?: FetchImageControllerOptions);
|
|
39
49
|
get totalDataCount(): number;
|
|
@@ -10,4 +10,4 @@ import { Schema } from '@tiptap/pm/model';
|
|
|
10
10
|
* Constructs the model cannot represent are not dropped: `html_block` and `html_inline` hold their
|
|
11
11
|
* source verbatim and are replayed on the way out.
|
|
12
12
|
*/
|
|
13
|
-
export declare const markdownSchema: Schema<"image" | "
|
|
13
|
+
export declare const markdownSchema: Schema<"image" | "heading" | "paragraph" | "table" | "text" | "blockquote" | "frontmatter" | "doc" | "bullet_list" | "code_block" | "horizontal_rule" | "list_item" | "ordered_list" | "table_row" | "table_cell" | "table_header" | "hard_break" | "html_block" | "html_inline", "link" | "code" | "em" | "strong" | "strike">;
|
|
@@ -100,6 +100,7 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
100
100
|
objectIdKey?: string;
|
|
101
101
|
prescribedDocTypes?: DownloadDocType[];
|
|
102
102
|
};
|
|
103
|
+
excludeFromContentConfigs?: boolean;
|
|
103
104
|
folderPickerConfigs?: {
|
|
104
105
|
useAllowedFolders?: boolean;
|
|
105
106
|
useFullPath?: boolean;
|
|
@@ -371,11 +372,6 @@ export declare enum DataSourceId {
|
|
|
371
372
|
TranslatableTexts = "TRANSLATABLE_TEXTS"
|
|
372
373
|
}
|
|
373
374
|
export type ConfigsOptions = {
|
|
374
|
-
defaultCarouselFormat?: string;
|
|
375
|
-
defaultGalleryFormat?: string;
|
|
376
|
-
defaultImageFormat?: string;
|
|
377
|
-
defaultTimelineFormat?: string;
|
|
378
|
-
defaultVideoPosterFormat?: string;
|
|
379
375
|
enableAssetFormatControls?: boolean;
|
|
380
376
|
enableFontFamilyControls?: boolean;
|
|
381
377
|
};
|