@orangelogic/design-system 2.148.0 → 2.150.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.DyUDG8er.js → asset-link-format.CrSdl1zX.js} +201 -180
- package/library/chunks/{button.W0tW1LJ-.js → button.BHIyGIB2.js} +1 -1
- package/library/chunks/{calendar-grid.CvdcwfTo.js → calendar-grid.BWjcZL5W.js} +1 -1
- package/library/chunks/{color-swatch-group.BQYOjoiA.js → color-swatch-group.BB8EmEAc.js} +1164 -1134
- package/library/chunks/{color-swatch.B7X9wSl2.js → color-swatch.B2qHfRcj.js} +1 -1
- package/library/chunks/{confirm-popover.DWLFTk2n.js → confirm-popover.CYIZynVQ.js} +3 -3
- package/library/chunks/{date-picker.DTUICGb9.js → date-picker.BGHn6qg8.js} +27 -16
- package/library/chunks/date.iWq_pkIk.js +97 -0
- package/library/chunks/{dialog.yZCtJRtl.js → dialog.CwkvxMDM.js} +2 -2
- package/library/chunks/{document-viewer.Cr-tkwYo.js → document-viewer.B9C_4TEb.js} +6 -6
- package/library/chunks/{dot-pagination.C8dxu87e.js → dot-pagination.DQNVHzNH.js} +1 -1
- package/library/chunks/{folder-select.CLDy4FKy.js → folder-select.BnvzmNLY.js} +4 -4
- package/library/chunks/{header.BJnsijee.js → header.DwmSpdtF.js} +1 -1
- package/library/chunks/{i18n.D07sG_CU.js → i18n.BwXikn4k.js} +1 -1
- package/library/chunks/{icon-button.CaUkGny9.js → icon-button.Bwv0pBA9.js} +1 -1
- package/library/chunks/{iframe.Bj3JzA9b.js → iframe.5FgxxThO.js} +1 -1
- package/library/chunks/{image.DaYfKRf4.js → image.C-rHqDVB.js} +1 -1
- package/library/chunks/{input.CtpPKmen.js → input.D28SuP1Z.js} +1 -1
- package/library/chunks/{option.DoCfNbP9.js → option.BQt-5Vdg.js} +1 -1
- package/library/chunks/{pagination.B0VIa8Pm.js → pagination.B8l2Cvm9.js} +5 -5
- package/library/chunks/{tab-group.CRIY9Wby.js → tab-group.C4u2fCN7.js} +3 -3
- package/library/chunks/{tree.uSEgW--4.js → tree.C9d7pyKM.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +13 -13
- 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 +4 -4
- 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/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- 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 +4 -4
- 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 +22204 -22082
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +6 -1
- package/library/packages/molecules/src/faceted-filter/components/facet-date-picker/facet-date-picker.d.ts +3 -0
- package/library/packages/molecules/src/faceted-filter/components/facet-date-range/facet-date-range.d.ts +3 -0
- package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +9 -1
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +14 -3
- package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.d.ts +8 -0
- package/library/packages/molecules/src/type-subtype-select/type-subtype-select.d.ts +64 -0
- package/library/packages/molecules/src/type-subtype-select/type-subtype-select.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +5 -4
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +5 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +4 -6
- package/library/packages/types/src/content-builder.d.ts +8 -1
- package/library/packages/types/src/date-picker.d.ts +20 -0
- package/library/packages/types/src/faceted-filter.d.ts +6 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -1
- package/library/packages/utils/src/date/date.d.ts +12 -4
- package/library/react-web-component.d.ts +57 -7
- package/library/utils.js +104 -103
- package/package.json +1 -1
- package/library/chunks/date.dSYNLBVO.js +0 -77
|
@@ -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.C-rHqDVB.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.BwXikn4k.js";
|
|
11
11
|
import { w as Ki } from "../chunks/watch.K-dbDP6P.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
|
@@ -2,7 +2,7 @@ import { default as Filter } from '../modules/Filter/Filter';
|
|
|
2
2
|
import { default as Page } from '../modules/Page/Page';
|
|
3
3
|
import { default as SelectRow } from '../modules/SelectRow/SelectRow';
|
|
4
4
|
import { default as Tabulator } from './Tabulator';
|
|
5
|
-
import { GroupArg, GroupValuesArg, ITabulatorFull, Options, SheetLookup, SortDirection, Sorter, SpreadsheetComponent } from './types';
|
|
5
|
+
import { GroupArg, GroupValuesArg, ICellComponent, ITabulatorFull, Options, SheetLookup, SortDirection, Sorter, SpreadsheetComponent, ValidationSummary } from './types';
|
|
6
6
|
|
|
7
7
|
declare class TabulatorFull extends Tabulator implements ITabulatorFull {
|
|
8
8
|
static extendModule(...args: Parameters<typeof Tabulator._extendModule>): void;
|
|
@@ -50,5 +50,10 @@ declare class TabulatorFull extends Tabulator implements ITabulatorFull {
|
|
|
50
50
|
deselectRow: SelectRow['deselectRows'];
|
|
51
51
|
toggleSelectRow: SelectRow['toggleRow'];
|
|
52
52
|
setSort: (sortList: string | Sorter[], dir?: SortDirection) => void;
|
|
53
|
+
validate: () => true | ICellComponent[];
|
|
54
|
+
validateAsync: () => Promise<ValidationSummary>;
|
|
55
|
+
getValidationSummary: () => ValidationSummary;
|
|
56
|
+
getInvalidCells: () => ICellComponent[];
|
|
57
|
+
clearCellValidation: (cells?: ICellComponent | ICellComponent[]) => void;
|
|
53
58
|
}
|
|
54
59
|
export default TabulatorFull;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as CxDetails } from '../../../../../atoms/src/components/details/details.ts';
|
|
2
2
|
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
3
3
|
import { default as CxInputDatePicker } from '../../../input-date-picker/input-date-picker.ts';
|
|
4
|
+
import { DateDisplayFormat } from '../../../../../types/src/date-picker';
|
|
4
5
|
import { CSSResultGroup } from 'lit';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -32,6 +33,8 @@ export default class CxFacetDatePicker extends CortexElement {
|
|
|
32
33
|
min: string;
|
|
33
34
|
/** Maximum selectable date in `YYYY-MM-DD`. */
|
|
34
35
|
max: string;
|
|
36
|
+
/** How the date is shown/typed in the picker. Committed value stays ISO. */
|
|
37
|
+
displayFormat: DateDisplayFormat;
|
|
35
38
|
private handleChange;
|
|
36
39
|
private emitFacetChange;
|
|
37
40
|
render(): import('lit').TemplateResult<1>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as CxDetails } from '../../../../../atoms/src/components/details/details.ts';
|
|
2
2
|
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
3
3
|
import { default as CxInputDateRangePicker } from '../../../input-date-range-picker/input-date-range-picker.ts';
|
|
4
|
+
import { DateDisplayFormat } from '../../../../../types/src/date-picker';
|
|
4
5
|
import { CSSResultGroup } from 'lit';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -40,6 +41,8 @@ export default class CxFacetDateRange extends CortexElement {
|
|
|
40
41
|
min: string;
|
|
41
42
|
/** Maximum selectable date in `YYYY-MM-DD`. */
|
|
42
43
|
max: string;
|
|
44
|
+
/** How the date is shown/typed in both pickers. Committed value stays ISO. */
|
|
45
|
+
displayFormat: DateDisplayFormat;
|
|
43
46
|
private handleChange;
|
|
44
47
|
private emitFacetChange;
|
|
45
48
|
render(): import('lit').TemplateResult<1>;
|
|
@@ -67,7 +67,10 @@ export default class CxFacetedFilter extends CortexElement {
|
|
|
67
67
|
private internalDateRanges;
|
|
68
68
|
/** Maps facetFieldName → (value → displayValue) for rendering applied-filter tags. */
|
|
69
69
|
private mappedDisplayNames;
|
|
70
|
+
/** field → facet config from both bound sources (availableFacets wins). Rebuilt only when the sources change, not per render. */
|
|
71
|
+
private facetDetailsByField;
|
|
70
72
|
handleFacetsChange(): void;
|
|
73
|
+
rebuildFacetDetailsByField(): void;
|
|
71
74
|
handleSelectedFacetsChange(): void;
|
|
72
75
|
handleSelectedDateRangesChange(): void;
|
|
73
76
|
handleInternalSelectionChange(): void;
|
|
@@ -81,7 +84,12 @@ export default class CxFacetedFilter extends CortexElement {
|
|
|
81
84
|
private handleClearAllClick;
|
|
82
85
|
private emitChange;
|
|
83
86
|
private renderAppliedFilters;
|
|
84
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Resolves the display pattern (e.g. `DD/MM/YYYY`) configured for a date facet,
|
|
89
|
+
* so chip labels match how the facet's picker renders dates. Falls back to the
|
|
90
|
+
* default format when the facet has none.
|
|
91
|
+
*/
|
|
92
|
+
private getDateFacetPattern;
|
|
85
93
|
private formatDateRangeDisplay;
|
|
86
94
|
private renderDateTags;
|
|
87
95
|
private renderExternalFilterTags;
|
|
@@ -40,6 +40,7 @@ export { default as CxStatCard } from './stat-card/stat-card';
|
|
|
40
40
|
export { default as CxStepperWizard } from './stepper-wizard/stepper-wizard';
|
|
41
41
|
export { default as CxStorybook } from './storybook/storybook';
|
|
42
42
|
export { default as CxTypeface } from './typeface/typeface';
|
|
43
|
+
export { default as CxTypeSubtypeSelect } from './type-subtype-select/type-subtype-select';
|
|
43
44
|
export { default as CxAssetFormatPicker } from './asset-format-picker/asset-format-picker';
|
|
44
45
|
export { default as CxInputDatePicker } from './input-date-picker/input-date-picker';
|
|
45
46
|
export { default as CxInputDateRangePicker } from './input-date-range-picker/input-date-range-picker';
|
|
@@ -6,6 +6,7 @@ import { default as CxOption } from '../../../atoms/src/components/option/option
|
|
|
6
6
|
import { default as CxPopup } from '../../../atoms/src/components/popup/popup.ts';
|
|
7
7
|
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
8
8
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
9
|
+
import { DateDisplayFormat } from '../../../types/src/date-picker';
|
|
9
10
|
import { CSSResultGroup } from 'lit';
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -49,8 +50,15 @@ export default class CxInputDatePicker extends CortexElement {
|
|
|
49
50
|
value: string;
|
|
50
51
|
/** The selected time in 24-hour `HH:mm:ss` format (e.g. `14:30:00`). Values outside this format are not parsed. */
|
|
51
52
|
timeValue: string;
|
|
52
|
-
/** Placeholder for the date input. Defaults to
|
|
53
|
+
/** Placeholder for the date input. Defaults to the current `displayFormat`. */
|
|
53
54
|
placeholder: string;
|
|
55
|
+
/**
|
|
56
|
+
* Controls how the date is shown and parsed in the text field. Accepts a
|
|
57
|
+
* `DateDisplayFormat` token or a literal pattern (e.g. `MM/DD/YYYY` from the
|
|
58
|
+
* backend). Defaults to `DD/MM/YYYY`. The committed `value` (read via
|
|
59
|
+
* `el.value` when `cx-change` fires) always stays ISO `YYYY-MM-DD`.
|
|
60
|
+
*/
|
|
61
|
+
displayFormat: DateDisplayFormat;
|
|
54
62
|
/** Shows the hour/minute/second time selects below the date row. */
|
|
55
63
|
showTime: boolean;
|
|
56
64
|
/** The name submitted as a name/value pair for the time field. */
|
|
@@ -77,15 +85,17 @@ export default class CxInputDatePicker extends CortexElement {
|
|
|
77
85
|
maskMaxMessage: string;
|
|
78
86
|
/** Controls whether the calendar popup is visible. */
|
|
79
87
|
private calendarOpen;
|
|
80
|
-
/** Date shown in the text input formatted
|
|
88
|
+
/** Date shown in the text input, formatted according to `displayFormat`. */
|
|
81
89
|
private displayValue;
|
|
82
90
|
constructor();
|
|
83
91
|
connectedCallback(): void;
|
|
84
92
|
disconnectedCallback(): void;
|
|
85
93
|
runFirstUpdated(): Promise<void>;
|
|
86
94
|
private readonly dateMaskBlocks;
|
|
87
|
-
private get datePlaceholder();
|
|
88
95
|
getForm(): HTMLFormElement | undefined;
|
|
96
|
+
/** The concrete pattern (e.g. `DD/MM/YYYY`) resolved from `displayFormat`. */
|
|
97
|
+
private get datePattern();
|
|
98
|
+
private get datePlaceholder();
|
|
89
99
|
private get minDate();
|
|
90
100
|
private get maxDate();
|
|
91
101
|
/** Sets a custom validation message on the inner date input. Pass an empty string to restore validity. */
|
|
@@ -100,6 +110,7 @@ export default class CxInputDatePicker extends CortexElement {
|
|
|
100
110
|
private renderHiddenTimeInput;
|
|
101
111
|
private handleTimePartChange;
|
|
102
112
|
handleValueChange(): void;
|
|
113
|
+
handleDisplayFormatChange(): void;
|
|
103
114
|
handleMinMaxChange(): void;
|
|
104
115
|
handleAccessStateChange(): void;
|
|
105
116
|
private resetDateValue;
|
|
@@ -2,6 +2,7 @@ import { default as CxOption } from '../../../atoms/src/components/option/option
|
|
|
2
2
|
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
3
3
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
4
4
|
import { default as CxInputDatePicker } from '../input-date-picker/input-date-picker.ts';
|
|
5
|
+
import { DateDisplayFormat } from '../../../types/src/date-picker';
|
|
5
6
|
import { CSSResultGroup } from 'lit';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -50,6 +51,13 @@ export default class CxInputDateRangePicker extends CortexElement {
|
|
|
50
51
|
toLabel: string;
|
|
51
52
|
/** Shared placeholder for both child date pickers. */
|
|
52
53
|
placeholder: string;
|
|
54
|
+
/**
|
|
55
|
+
* Shared date display format for both child date pickers. Accepts a
|
|
56
|
+
* `DateDisplayFormat` token or a literal pattern (e.g. `MM/DD/YYYY` from the
|
|
57
|
+
* backend). Defaults to `DD/MM/YYYY`. The committed `fromDate`/`toDate` stay
|
|
58
|
+
* ISO `YYYY-MM-DD`.
|
|
59
|
+
*/
|
|
60
|
+
displayFormat: DateDisplayFormat;
|
|
53
61
|
/** Shows the time selects on both child date pickers. */
|
|
54
62
|
showTime: boolean;
|
|
55
63
|
/** Shows the preset selector. */
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
|
|
3
|
+
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
|
|
4
|
+
import { default as CxOption } from '../../../atoms/src/components/option/option.ts';
|
|
5
|
+
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
6
|
+
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
7
|
+
import { TypeSubtypeOption, TypeSubtypeSelectRow } from '../../../types/src/type-subtype-select';
|
|
8
|
+
import { CSSResultGroup } from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @summary Cascading type/subtype picker. Renders one or more rows of a
|
|
12
|
+
* "type" select and a dependent "subtype" select (disabled until a type is
|
|
13
|
+
* chosen). In `multiple` mode, rows can be added and removed with `+` / `-`
|
|
14
|
+
* controls. The emitted `value` is a space-separated list of one token per
|
|
15
|
+
* row, each token being `{type}.{subtype}`. In single mode, exactly one row
|
|
16
|
+
* is rendered and `value` is that row's single token.
|
|
17
|
+
*
|
|
18
|
+
* @event cx-change - Emitted whenever the selected type/subtype rows change.
|
|
19
|
+
*/
|
|
20
|
+
export default class CxTypeSubtypeSelect extends CortexElement {
|
|
21
|
+
static readonly styles: CSSResultGroup;
|
|
22
|
+
static readonly dependencies: {
|
|
23
|
+
'cx-button': typeof CxButton;
|
|
24
|
+
'cx-icon': typeof CxIcon;
|
|
25
|
+
'cx-icon-button': typeof CxIconButton;
|
|
26
|
+
'cx-option': typeof CxOption;
|
|
27
|
+
'cx-select': typeof CxSelect;
|
|
28
|
+
};
|
|
29
|
+
/** Encodes one row's type/subtype pair into the token format used by `value`. */
|
|
30
|
+
static encodeRowToken(row: TypeSubtypeSelectRow): string;
|
|
31
|
+
/** Decodes one `value` token back into its type/subtype pair. */
|
|
32
|
+
static decodeRowToken(token: string): TypeSubtypeSelectRow;
|
|
33
|
+
private readonly localize;
|
|
34
|
+
/** Available types, each with its own list of subtypes. */
|
|
35
|
+
options: TypeSubtypeOption[];
|
|
36
|
+
/** When true, allows multiple type/subtype rows (add with `+`, remove with `-`). */
|
|
37
|
+
multiple: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Space-separated row tokens, each `{type}.{subtype}`. In single mode,
|
|
40
|
+
* holds at most one token.
|
|
41
|
+
*/
|
|
42
|
+
value: string;
|
|
43
|
+
/** When true, each row's type select participates in native form validation. */
|
|
44
|
+
required: boolean;
|
|
45
|
+
/** Editable rows, derived from `value` whenever it changes externally. */
|
|
46
|
+
private rows;
|
|
47
|
+
/** Row ids are only used for keyed rendering; they never leave the component. */
|
|
48
|
+
private rowIds;
|
|
49
|
+
syncRowsFromValue(): void;
|
|
50
|
+
private subOptionsFor;
|
|
51
|
+
private applyRows;
|
|
52
|
+
private rowIndexOf;
|
|
53
|
+
private handleTypeChange;
|
|
54
|
+
private handleSubtypeChange;
|
|
55
|
+
private handleAddRowClick;
|
|
56
|
+
private handleRemoveRowClick;
|
|
57
|
+
private renderRow;
|
|
58
|
+
render(): import('lit').TemplateResult<1>;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface HTMLElementTagNameMap {
|
|
62
|
+
'cx-type-subtype-select': CxTypeSubtypeSelect;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -196,6 +196,12 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
196
196
|
* been applied yet.
|
|
197
197
|
*/
|
|
198
198
|
get lastAppliedCropUnit(): Unit;
|
|
199
|
+
/**
|
|
200
|
+
* The focus mode of the last applied crop transformation, for the no-asset case only.
|
|
201
|
+
* Reflects whatever focus mode the last committed Crop transformation used, or 'manual'
|
|
202
|
+
* when nothing has been applied yet.
|
|
203
|
+
*/
|
|
204
|
+
get lastAppliedCropFocusMode(): string;
|
|
199
205
|
/**
|
|
200
206
|
* Checks if the crop apply button should be disabled.
|
|
201
207
|
* This is determined by comparing the current crop size with the last crop size.
|
|
@@ -41,7 +41,7 @@ export type CxAssetLinkFormatCropFocusModeChangeEvent = CustomEvent<{
|
|
|
41
41
|
* @event `cx-asset-link-format-crop-apply` - Emitted when the crop settings are applied.
|
|
42
42
|
* @event `cx-asset-link-format-crop-auto` - Emitted when the auto cropping is applied.
|
|
43
43
|
*
|
|
44
|
-
* @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.).
|
|
44
|
+
* @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.) and the unit select (Pixels / Aspect Ratio).
|
|
45
45
|
*/
|
|
46
46
|
export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
47
47
|
static readonly styles: CSSResultGroup;
|
|
@@ -109,9 +109,10 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
|
109
109
|
*/
|
|
110
110
|
disabledApply: boolean;
|
|
111
111
|
/**
|
|
112
|
-
* Whether to hide the ratio mode select (Free, Widescreen, Square, etc.)
|
|
113
|
-
* Useful when no asset is attached yet, since
|
|
114
|
-
* without known dimensions only produces tiny,
|
|
112
|
+
* Whether to hide the ratio mode select (Free, Widescreen, Square, etc.) and the
|
|
113
|
+
* unit select (Pixels / Aspect Ratio). Useful when no asset is attached yet, since
|
|
114
|
+
* switching between ratios or units without known dimensions only produces tiny,
|
|
115
|
+
* meaningless pixel values.
|
|
115
116
|
*/
|
|
116
117
|
noRatioModes: boolean;
|
|
117
118
|
/**
|
|
@@ -27,6 +27,8 @@ export type CxAssetLinkFormatResizeApplyEvent = CustomEvent<{
|
|
|
27
27
|
* @summary The `cx-asset-link-format-resize` component is used to define resize values for an asset link.
|
|
28
28
|
*
|
|
29
29
|
* @event `cx-asset-link-format-resize-change` - Emitted when the resize values are changed.
|
|
30
|
+
*
|
|
31
|
+
* @property {boolean} no-ratio-modes - When true, hides the unit select (Pixels / Aspect Ratio).
|
|
30
32
|
*/
|
|
31
33
|
export default class CxAssetLinkFormatResize extends CortexElement {
|
|
32
34
|
static readonly styles: CSSResultGroup;
|
|
@@ -104,6 +106,12 @@ export default class CxAssetLinkFormatResize extends CortexElement {
|
|
|
104
106
|
* @default false
|
|
105
107
|
*/
|
|
106
108
|
loading: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether to hide the unit select (Pixels / Aspect Ratio). Useful when no asset is
|
|
111
|
+
* attached yet, since switching between units without known dimensions only
|
|
112
|
+
* produces tiny, meaningless pixel values.
|
|
113
|
+
*/
|
|
114
|
+
noRatioModes: boolean;
|
|
107
115
|
/**
|
|
108
116
|
* Whether to keep the aspect ratio when changing width or height.
|
|
109
117
|
* This is used to automatically adjust the other dimension when one is changed.
|
|
@@ -10,6 +10,8 @@ export declare class ConfigFormController implements ReactiveController {
|
|
|
10
10
|
private readonly pendingGalleryPickerSaves;
|
|
11
11
|
private readonly fontFamiliesCache;
|
|
12
12
|
private readonly pendingFontFamilyFetches;
|
|
13
|
+
private readonly typeSubtypeOptionsCache;
|
|
14
|
+
private readonly pendingTypeSubtypeOptionsFetches;
|
|
13
15
|
constructor(host: ReactiveControllerHost & CxConfigForm);
|
|
14
16
|
hostConnected(): void;
|
|
15
17
|
/**
|
package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import { default as CxPaddingInputGroup } from '../../../../../molecules/src/pad
|
|
|
40
40
|
import { default as CxPositionPicker } from '../../../../../molecules/src/position-picker/position-picker.ts';
|
|
41
41
|
import { default as CxShadowInputGroup } from '../../../../../molecules/src/shadow-input-group/shadow-input-group.ts';
|
|
42
42
|
import { default as CxSizeInputGroup } from '../../../../../molecules/src/size-input-group/size-input-group.ts';
|
|
43
|
+
import { default as CxTypeSubtypeSelect } from '../../../../../molecules/src/type-subtype-select/type-subtype-select.ts';
|
|
43
44
|
import { default as CxAssetTransformationDialog } from '../../../asset-transformation-dialog/asset-transformation-dialog.ts';
|
|
44
45
|
import { AssetFormatValue } from '../../../../../types/src/asset-format-picker';
|
|
45
46
|
import { Asset, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
|
|
@@ -125,6 +126,7 @@ export default class CxConfigForm extends CortexElement {
|
|
|
125
126
|
'cx-tab-panel': typeof CxTabPanel;
|
|
126
127
|
'cx-textarea': typeof CxTextarea;
|
|
127
128
|
'cx-tooltip': typeof CxTooltip;
|
|
129
|
+
'cx-type-subtype-select': typeof CxTypeSubtypeSelect;
|
|
128
130
|
'cx-typography': typeof CxTypography;
|
|
129
131
|
'cx-visually-hidden': typeof CxVisuallyHidden;
|
|
130
132
|
};
|
|
@@ -74,7 +74,7 @@ export default class StyleController {
|
|
|
74
74
|
checkedValue?: string | boolean;
|
|
75
75
|
children?: PropertyConfig[];
|
|
76
76
|
clearable?: boolean;
|
|
77
|
-
controlType: "asset-transformation" | "bicolor-picker" | "border-input-group" | "button-group" | "checkbox" | "checkbox-group" | "color-swatch-picker" | "corner-position-input-group" | "dam-custom-toolbar-buttons" | "download-format-picker" | "file" | "folder-picker" | "gallery-picker" | "group" | "group-heading" | "icon-picker" | "image-picker" | "info-text" | "input" | "list-editor" | "all-picker" | "other-picker" | "padding-input-group" | "page-picker" | "placeholder" | "position-picker" | "radio-card-group" | "radio-group" | "select" | "shadow-input-group" | "size-input-group" | "switch" | "table" | "text" | "audio-picker" | "asset-format-picker" | "font-picker" | "video-picker";
|
|
77
|
+
controlType: "asset-transformation" | "bicolor-picker" | "border-input-group" | "button-group" | "checkbox" | "checkbox-group" | "color-swatch-picker" | "corner-position-input-group" | "dam-custom-toolbar-buttons" | "download-format-picker" | "file" | "folder-picker" | "gallery-picker" | "group" | "group-heading" | "icon-picker" | "image-picker" | "info-text" | "input" | "list-editor" | "all-picker" | "other-picker" | "padding-input-group" | "page-picker" | "placeholder" | "position-picker" | "radio-card-group" | "radio-group" | "select" | "shadow-input-group" | "size-input-group" | "switch" | "table" | "text" | "type-subtype-select" | "audio-picker" | "asset-format-picker" | "font-picker" | "video-picker";
|
|
78
78
|
cornerStyleKey?: {
|
|
79
79
|
offsetX: string;
|
|
80
80
|
offsetY: string;
|
|
@@ -166,6 +166,10 @@ export default class StyleController {
|
|
|
166
166
|
translatable?: boolean;
|
|
167
167
|
translateGroup?: string;
|
|
168
168
|
type: "attribute" | "property" | "style" | "decorative";
|
|
169
|
+
typeSubtypeSelectConfigs?: {
|
|
170
|
+
api: () => Promise<import('../../../types/src/type-subtype-select').TypeSubtypeOption[]>;
|
|
171
|
+
multiple?: boolean;
|
|
172
|
+
};
|
|
169
173
|
uncheckedValue?: string | boolean;
|
|
170
174
|
useSearchTerm?: boolean;
|
|
171
175
|
width?: ((record: Record<string, unknown>) => string | number) | string | number;
|
|
@@ -17,6 +17,7 @@ import { CxAssetRequestStatusEvent, CxChangeEvent, CxRequestCloseEvent } from '.
|
|
|
17
17
|
import { default as CxConfirmPopover } from '../../../molecules/src/confirm-popover/confirm-popover.ts';
|
|
18
18
|
import { default as CxDynamicSelect } from '../../../molecules/src/dynamic-select/dynamic-select.ts';
|
|
19
19
|
import { default as CxIconPicker } from '../../../molecules/src/icon-picker/icon-picker.ts';
|
|
20
|
+
import { default as CxTypeSubtypeSelect } from '../../../molecules/src/type-subtype-select/type-subtype-select.ts';
|
|
20
21
|
import { Option } from '../../../types/src/content-builder';
|
|
21
22
|
import { DamCustomToolbarButton } from '../../../types/src/dam-view';
|
|
22
23
|
import { CSSResultGroup } from 'lit';
|
|
@@ -59,6 +60,7 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
59
60
|
'cx-radio-group': typeof CxRadioGroup;
|
|
60
61
|
'cx-select': typeof CxSelect;
|
|
61
62
|
'cx-space': typeof CxSpace;
|
|
63
|
+
'cx-type-subtype-select': typeof CxTypeSubtypeSelect;
|
|
62
64
|
'cx-typography': typeof CxTypography;
|
|
63
65
|
};
|
|
64
66
|
private readonly localize;
|
|
@@ -120,6 +122,7 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
120
122
|
private availableButtonsApi;
|
|
121
123
|
private get pageSelectColumns();
|
|
122
124
|
private get addSelectColumns();
|
|
125
|
+
private get typeSubtypeOptions();
|
|
123
126
|
handleCreateNewClick(): void;
|
|
124
127
|
handleAvailableButtonSelect(event: CustomEvent<Option>): void;
|
|
125
128
|
handleListEditorEdit(event: CxListEditorRowActionEvent): void;
|
|
@@ -141,17 +144,12 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
141
144
|
handleFormIdChange(event: CustomEvent<Option>): void;
|
|
142
145
|
handlePageChange(event: CxChangeEvent): void;
|
|
143
146
|
handleSpaceIdChange(event: CustomEvent<Option>): void;
|
|
144
|
-
|
|
145
|
-
handleRecordSubTypeChange(event: CxChangeEvent): void;
|
|
147
|
+
handleRecordTypeSubtypeChange(event: CxChangeEvent): void;
|
|
146
148
|
handleAccessLevelChange(event: CustomEvent<Option>): void;
|
|
147
149
|
handleConfigureWorkflowClick(): Promise<void>;
|
|
148
150
|
handleSaveClick(): void;
|
|
149
151
|
handleDialogFormSubmit(event: SubmitEvent): void;
|
|
150
152
|
private loadSubTypesIfNeeded;
|
|
151
|
-
/** Returns the `typeLabel` key (underscored) that matches a given `typeDbBOName`. */
|
|
152
|
-
private findTypeKeyByDbBOName;
|
|
153
|
-
/** Picks the wildcard subTypeValue (or first available) for a given `typeDbBOName`. */
|
|
154
|
-
private findDefaultSubTypeFor;
|
|
155
153
|
private createNewButton;
|
|
156
154
|
private updateEditedItem;
|
|
157
155
|
/**
|
|
@@ -5,6 +5,7 @@ import { DownloadDocType } from './download-format-picker';
|
|
|
5
5
|
import { FolderSelectApi, FolderSelectVariant } from './folder-select';
|
|
6
6
|
import { FontTypeface } from './font-picker';
|
|
7
7
|
import { TableSelectColumn } from './table-select';
|
|
8
|
+
import { TypeSubtypeOption } from './type-subtype-select';
|
|
8
9
|
|
|
9
10
|
export declare const SPACE_DEFAULT_FONT_FAMILY = "space-default";
|
|
10
11
|
export declare enum DeviceType {
|
|
@@ -80,7 +81,7 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
80
81
|
checkedValue?: string | boolean;
|
|
81
82
|
children?: PropertyConfig[];
|
|
82
83
|
clearable?: boolean;
|
|
83
|
-
controlType: 'asset-transformation' | 'bicolor-picker' | 'border-input-group' | 'button-group' | 'checkbox' | 'checkbox-group' | 'color-swatch-picker' | 'corner-position-input-group' | 'dam-custom-toolbar-buttons' | 'download-format-picker' | 'file' | 'folder-picker' | 'gallery-picker' | 'group' | 'group-heading' | 'icon-picker' | 'image-picker' | 'info-text' | 'input' | 'list-editor' | 'all-picker' | 'other-picker' | 'padding-input-group' | 'page-picker' | 'placeholder' | 'position-picker' | 'radio-card-group' | 'radio-group' | 'select' | 'shadow-input-group' | 'size-input-group' | 'switch' | 'table' | 'text' | 'audio-picker' | 'asset-format-picker' | 'font-picker' | 'video-picker';
|
|
84
|
+
controlType: 'asset-transformation' | 'bicolor-picker' | 'border-input-group' | 'button-group' | 'checkbox' | 'checkbox-group' | 'color-swatch-picker' | 'corner-position-input-group' | 'dam-custom-toolbar-buttons' | 'download-format-picker' | 'file' | 'folder-picker' | 'gallery-picker' | 'group' | 'group-heading' | 'icon-picker' | 'image-picker' | 'info-text' | 'input' | 'list-editor' | 'all-picker' | 'other-picker' | 'padding-input-group' | 'page-picker' | 'placeholder' | 'position-picker' | 'radio-card-group' | 'radio-group' | 'select' | 'shadow-input-group' | 'size-input-group' | 'switch' | 'table' | 'text' | 'type-subtype-select' | 'audio-picker' | 'asset-format-picker' | 'font-picker' | 'video-picker';
|
|
84
85
|
cornerStyleKey?: {
|
|
85
86
|
offsetX: string;
|
|
86
87
|
offsetY: string;
|
|
@@ -190,6 +191,12 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
190
191
|
translatable?: boolean;
|
|
191
192
|
translateGroup?: string;
|
|
192
193
|
type: 'attribute' | 'property' | 'style' | 'decorative';
|
|
194
|
+
typeSubtypeSelectConfigs?: {
|
|
195
|
+
/** Resolves the available type/subtype options. Fetched once and cached by trait id. */
|
|
196
|
+
api: () => Promise<TypeSubtypeOption[]>;
|
|
197
|
+
/** Whether multiple type/subtype rows can be added (space-separated subtype values). */
|
|
198
|
+
multiple?: boolean;
|
|
199
|
+
};
|
|
193
200
|
uncheckedValue?: string | boolean;
|
|
194
201
|
useSearchTerm?: boolean;
|
|
195
202
|
width?: ((record: Record<string, unknown>) => string | number) | string | number;
|
|
@@ -43,3 +43,23 @@ export type DateParts = {
|
|
|
43
43
|
month: number;
|
|
44
44
|
year: number;
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Selectable date display formats. The enum value is a separator-neutral token
|
|
48
|
+
* (safe to embed in packed config strings like `cx-table`'s `facet-config`); the
|
|
49
|
+
* concrete pattern — including the separator — lives only in
|
|
50
|
+
* `DATE_DISPLAY_PATTERN`. New formats or a different separator are added there
|
|
51
|
+
* without touching parsers or config strings.
|
|
52
|
+
*/
|
|
53
|
+
export declare enum DateDisplayFormat {
|
|
54
|
+
DdMmYyyy = "ddmmyyyy",
|
|
55
|
+
MmDdYyyy = "mmddyyyy",
|
|
56
|
+
YyyyMmDd = "yyyymmdd"
|
|
57
|
+
}
|
|
58
|
+
/** Maps each format token to its concrete display pattern. Separators live only here. */
|
|
59
|
+
export declare const DATE_DISPLAY_PATTERN: Record<DateDisplayFormat, string>;
|
|
60
|
+
/**
|
|
61
|
+
* Resolves a display format to its concrete pattern. Accepts either a
|
|
62
|
+
* `DateDisplayFormat` token or an already-literal pattern (e.g. a value the
|
|
63
|
+
* backend sends such as `MM/DD/YYYY`), which is returned unchanged.
|
|
64
|
+
*/
|
|
65
|
+
export declare function toDatePattern(format: string): string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DateDisplayFormat } from './date-picker';
|
|
2
|
+
|
|
1
3
|
export declare enum FacetSelectionMode {
|
|
2
4
|
Multiple = "multiple",
|
|
3
5
|
Single = "single"
|
|
@@ -21,6 +23,8 @@ export type CheckboxFacetDetails = {
|
|
|
21
23
|
};
|
|
22
24
|
/** Single date-picker facet. */
|
|
23
25
|
export type DatePickerFacetDetails = {
|
|
26
|
+
/** How the date is shown/typed in the picker. Committed value stays ISO. */
|
|
27
|
+
displayFormat?: DateDisplayFormat;
|
|
24
28
|
displayName: string;
|
|
25
29
|
facetFieldName: string;
|
|
26
30
|
facetIndexedFieldName?: string;
|
|
@@ -35,6 +39,8 @@ export type DatePickerFacetDetails = {
|
|
|
35
39
|
};
|
|
36
40
|
/** From/to date-range facet. */
|
|
37
41
|
export type DateRangeFacetDetails = {
|
|
42
|
+
/** How the date is shown/typed in both pickers. Committed value stays ISO. */
|
|
43
|
+
displayFormat?: DateDisplayFormat;
|
|
38
44
|
displayName: string;
|
|
39
45
|
facetFieldName: string;
|
|
40
46
|
facetIndexedFieldName?: string;
|
|
@@ -471,7 +471,6 @@ export interface Translation extends DefaultTranslation {
|
|
|
471
471
|
fonts: string;
|
|
472
472
|
formToOpen: string;
|
|
473
473
|
format: string;
|
|
474
|
-
formatDDMMYYYY: string;
|
|
475
474
|
formats: string;
|
|
476
475
|
forward: string;
|
|
477
476
|
fourPageView: string;
|
|
@@ -939,6 +938,7 @@ export interface Translation extends DefaultTranslation {
|
|
|
939
938
|
styling: string;
|
|
940
939
|
subfolders: string;
|
|
941
940
|
subscript: string;
|
|
941
|
+
subtype: string;
|
|
942
942
|
suggestDeletion: string;
|
|
943
943
|
suggestedEdits: string;
|
|
944
944
|
superscript: string;
|
|
@@ -12,10 +12,18 @@ export declare function parseIsoDate(date: CalendarDate): {
|
|
|
12
12
|
};
|
|
13
13
|
/** Converts a valid CalendarDate into a local Date object. */
|
|
14
14
|
export declare function isoToDate(value: string): Date | undefined;
|
|
15
|
-
/**
|
|
16
|
-
export declare function
|
|
17
|
-
/**
|
|
18
|
-
|
|
15
|
+
/** Returns the IMask pattern for a display format, e.g. `DD/MM/YYYY` -> `d{/}m{/}Y`. */
|
|
16
|
+
export declare function getDateMask(format: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Converts a YYYY-MM-DD value to the given display format, e.g.
|
|
19
|
+
* `2026-06-08` + `MM/DD/YYYY` -> `06/08/2026`. Returns empty for empty input.
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatIsoToDisplay(value: string, format: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Converts a complete display-format string back to YYYY-MM-DD, honoring the
|
|
24
|
+
* part order of `format`. Returns empty for partial input.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseDisplayToIso(value: string, format: string): CalendarDate | '';
|
|
19
27
|
/** Returns today's date as a CalendarDate in the browser's local timezone. */
|
|
20
28
|
export declare function getTodayIsoDate(): CalendarDate;
|
|
21
29
|
/**
|