@orangelogic/design-system 2.111.0 → 2.112.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.Ci6rP56l.js +458 -0
- package/library/chunks/{button.i88sSbTZ.js → button.BvBgxmvw.js} +3 -3
- package/library/chunks/calendar-grid.CXYoS6VA.js +108 -0
- package/library/chunks/{color-swatch-group.mIHaCJsh.js → color-swatch-group.D8KPblw2.js} +3 -3
- package/library/chunks/{color-swatch.D9vkPoV2.js → color-swatch.DQxReKYX.js} +2 -2
- package/library/chunks/{color.vLD2sNTs.js → color.LzSGBy7o.js} +2 -2
- package/library/chunks/{confirm-popover.UuBhn8GA.js → confirm-popover.dyPIFLWa.js} +3 -3
- package/library/chunks/date-picker.D0SJADN6.js +77 -0
- package/library/chunks/{dialog.Bso6gK-8.js → dialog.BoCFGpPO.js} +2 -2
- package/library/chunks/{document-viewer.C6eclRvd.js → document-viewer.B90s20gM.js} +8 -7
- package/library/chunks/{dot-pagination.CNnUuI-Z.js → dot-pagination.uz9GFrMP.js} +1 -1
- package/library/chunks/{file-on-demand.Cf2ujTeF.js → file-on-demand.DLVH0DID.js} +10 -10
- package/library/chunks/{folder-select.ByNUfTia.js → folder-select.C2ruplAB.js} +5 -5
- package/library/chunks/{form.Ch1cwYzO.js → form.B-5nQJva.js} +46 -34
- package/library/chunks/{header.hj2Kw-N7.js → header.By_Mfx47.js} +1 -1
- package/library/chunks/{i18n.D6AYDPK-.js → i18n.BcD4Ohsq.js} +46 -13
- package/library/chunks/{icon-button.ztYU-DHy.js → icon-button.DO6DHXwo.js} +2 -2
- package/library/chunks/icon.DnBh6-56.js +111 -0
- package/library/chunks/{iframe.uLxZ6LsL.js → iframe.C4jZSmOr.js} +1 -1
- package/library/chunks/{image.DKB6yEQO.js → image.Cx4hbc4L.js} +2 -2
- package/library/chunks/input.B7SaYNrr.js +2855 -0
- package/library/chunks/{list-editor.GT2kQsmR.js → list-editor.Hag-nXN-.js} +86 -86
- package/library/chunks/{option.BAYtHIvG.js → option.CA-HtVdP.js} +2 -2
- package/library/chunks/{pagination.CCJD61IB.js → pagination.jgAGwDyt.js} +5 -5
- package/library/chunks/{tab-group.BsR8tdVY.js → tab-group.DyxpVNOn.js} +3 -3
- package/library/chunks/{table.DL_CEeYh.js → table.Crb35At8.js} +2905 -2306
- package/library/chunks/{tree.KmZRWZ0F.js → tree.jg0MjIB8.js} +2 -2
- package/library/components/alert.js +2 -2
- package/library/components/animated-image.js +15 -15
- package/library/components/asset-link-format.js +7 -7
- package/library/components/atoms.js +194 -180
- package/library/components/audio.js +2 -2
- package/library/components/avatar.js +1 -1
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +4 -4
- package/library/components/button.js +4 -4
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +5 -5
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.d.ts +3 -0
- package/library/components/date-calendar.js +107 -0
- package/library/components/details.js +12 -12
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +4 -4
- 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/faceted-filter.d.ts +3 -0
- package/library/components/faceted-filter.js +295 -0
- package/library/components/file-on-demand.js +11 -11
- package/library/components/folder-select.js +5 -5
- 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 +3 -3
- package/library/components/icon.js +10 -109
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/input.js +19 -2852
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +7 -7
- 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 +4 -4
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +9 -9
- 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/radio-group.js +1 -1
- package/library/components/radio.js +1 -1
- package/library/components/range.js +2 -2
- package/library/components/rating.js +6 -6
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +5 -5
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +2 -2
- 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/step.js +1 -1
- package/library/components/stepper-wizard.js +16 -16
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +3 -3
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +25164 -24599
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/date-calendar/date-calendar.d.ts +61 -0
- package/library/packages/atoms/src/components/date-calendar/date-calendar.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/details/details.d.ts +1 -0
- package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.d.ts +58 -0
- package/library/packages/atoms/src/components/faceted-filter/components/facet/facet.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/faceted-filter/faceted-filter.d.ts +71 -0
- package/library/packages/atoms/src/components/faceted-filter/faceted-filter.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/icon/font-awesome-icons.d.ts +1 -0
- package/library/packages/atoms/src/components/icon/icon.d.ts +1 -0
- package/library/packages/atoms/src/components/image/image.d.ts +1 -1
- package/library/packages/atoms/src/components/table/table-data-loader.d.ts +13 -0
- package/library/packages/atoms/src/components/table/table.d.ts +13 -1
- package/library/packages/atoms/src/index.d.ts +3 -0
- package/library/packages/events/src/cx-date-select.d.ts +9 -0
- package/library/packages/events/src/cx-faceted-filter-change.d.ts +8 -0
- package/library/packages/events/src/cx-table-data-load.d.ts +17 -0
- package/library/packages/events/src/events.d.ts +3 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ClickableCell/ClickableCell.d.ts +5 -0
- package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -1
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +73 -13
- package/library/packages/molecules/src/index.d.ts +2 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +127 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.d.ts +90 -0
- package/library/packages/molecules/src/input-date-range-picker/input-date-range-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/timeline/timeline.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +0 -1
- package/library/packages/services/src/api/asset/asset.d.ts +3 -3
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -2
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +4 -4
- package/library/packages/types/src/date-picker.d.ts +45 -0
- package/library/packages/types/src/faceted-filter.d.ts +23 -0
- package/library/packages/types/src/icon-picker.d.ts +8 -0
- package/library/packages/types/src/index.d.ts +1 -1
- package/library/packages/types/src/table.d.ts +12 -0
- package/library/packages/utils/src/custom-element/form.d.ts +5 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +33 -0
- package/library/packages/utils/src/date/calendar-grid.d.ts +40 -0
- package/library/packages/utils/src/date/date-range-preset.d.ts +12 -0
- package/library/packages/utils/src/date/date.d.ts +42 -0
- package/library/packages/utils/src/date/index.d.ts +3 -0
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/react-web-component.d.ts +491 -195
- package/library/utils.js +539 -332
- package/package.json +1 -1
- package/library/chunks/asset.NgymQ3Zx.js +0 -454
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { _ as Bd, 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.Cx4hbc4L.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.DpK0TTP5.js";
|
|
7
7
|
import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
8
|
import { b as Ib } from "../chunks/debounce.CIEhztrj.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.BcD4Ohsq.js";
|
|
11
11
|
import { w as gn } from "../chunks/watch.CThbualB.js";
|
|
12
12
|
import { i as Bb, x as Kc } from "../chunks/lit-element.jLBm65_O.js";
|
|
13
13
|
import { n as ki } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
package/library/package.json
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
2
|
+
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
3
|
+
import { default as CxIconButton } from '../icon-button/icon-button';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @summary A standalone calendar grid for picking a single date.
|
|
7
|
+
*
|
|
8
|
+
* @event {{ value: string }} cx-date-select - Emitted when the user selects a date. Value is always YYYY-MM-DD.
|
|
9
|
+
*
|
|
10
|
+
* @csspart base - The component's outer container.
|
|
11
|
+
* @csspart header - The month/year navigation header.
|
|
12
|
+
* @csspart grid - The date cell grid.
|
|
13
|
+
* @csspart cell - An individual date cell button.
|
|
14
|
+
*
|
|
15
|
+
* @cssproperty [--cell-size=30px] - Width and height of each date cell.
|
|
16
|
+
* @cssproperty [--cell-border-radius=0] - Border radius of date cells. Set to 50% for circular cells.
|
|
17
|
+
* @cssproperty [--cell-selected-background=var(--cx-color-neutral-300)] - Background of the selected date cell.
|
|
18
|
+
* @cssproperty [--cell-selected-color=var(--cx-color-neutral-0)] - Text color of the selected date cell.
|
|
19
|
+
* @cssproperty [--cell-today-background=var(--cx-color-primary-200)] - Background highlight for today's date.
|
|
20
|
+
* @cssproperty [--cell-hover-background=var(--cx-color-primary-50)] - Background on cell hover.
|
|
21
|
+
* @cssproperty [--header-background=var(--cx-color-neutral-100)] - Background of the month/year header.
|
|
22
|
+
*/
|
|
23
|
+
export default class CxDateCalendar extends CortexElement {
|
|
24
|
+
static readonly styles: CSSResultGroup;
|
|
25
|
+
static dependencies: {
|
|
26
|
+
'cx-icon-button': typeof CxIconButton;
|
|
27
|
+
};
|
|
28
|
+
/** Today's CalendarDate — computed once at construction, used to highlight today's cell. */
|
|
29
|
+
private readonly today;
|
|
30
|
+
/** Derived grid cells — recomputed in willUpdate before every render. */
|
|
31
|
+
private cells;
|
|
32
|
+
/** Normalized selected date (YYYY-MM-DD). Empty string means no selection. */
|
|
33
|
+
private selectedDate;
|
|
34
|
+
/** Year of the currently displayed month. */
|
|
35
|
+
private viewYear;
|
|
36
|
+
/** 1-based month of the currently displayed month. */
|
|
37
|
+
private viewMonth;
|
|
38
|
+
/**
|
|
39
|
+
* The selected date. Accepts YYYY-MM-DD or ISO UTC datetime (2026-06-05T00:00:00.000Z).
|
|
40
|
+
* ISO datetimes are converted to the browser's local date.
|
|
41
|
+
*/
|
|
42
|
+
value: string;
|
|
43
|
+
/** Minimum selectable date in YYYY-MM-DD format. */
|
|
44
|
+
min: string;
|
|
45
|
+
/** Maximum selectable date in YYYY-MM-DD format. */
|
|
46
|
+
max: string;
|
|
47
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
48
|
+
private syncViewDate;
|
|
49
|
+
private handlePrevMonth;
|
|
50
|
+
private handleNextMonth;
|
|
51
|
+
private handleGridClick;
|
|
52
|
+
private renderHeader;
|
|
53
|
+
private renderWeekdays;
|
|
54
|
+
private renderCell;
|
|
55
|
+
render(): import('lit').TemplateResult<1>;
|
|
56
|
+
}
|
|
57
|
+
declare global {
|
|
58
|
+
interface HTMLElementTagNameMap {
|
|
59
|
+
'cx-date-calendar': CxDateCalendar;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -26,6 +26,7 @@ import { default as CxIcon } from '../icon/icon';
|
|
|
26
26
|
*
|
|
27
27
|
* @cssproperty --details-background-color - The background color of the details.
|
|
28
28
|
* @cssproperty --details-border - The border of the details.
|
|
29
|
+
* @cssproperty --expand-icon-size - The size of the expand/collapse icon.
|
|
29
30
|
*/
|
|
30
31
|
export default class CxDetails extends CortexElement {
|
|
31
32
|
static styles: CSSResultGroup;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../button/button.ts';
|
|
2
|
+
import { default as CxDetails } from '../../../details/details.ts';
|
|
3
|
+
import { default as CxIcon } from '../../../icon/icon.ts';
|
|
4
|
+
import { default as CxSpace } from '../../../space/space.ts';
|
|
5
|
+
import { default as CxSpinner } from '../../../spinner/spinner.ts';
|
|
6
|
+
import { default as CxTree } from '../../../tree/tree.ts';
|
|
7
|
+
import { default as CxTreeItem } from '../../../tree-item/tree-item.ts';
|
|
8
|
+
import { default as CortexElement } from '../../../../../../base/src/cortex-element.ts';
|
|
9
|
+
import { FacetSelectionMode, FacetValue } from '../../../../../../types/src/faceted-filter';
|
|
10
|
+
import { CSSResultGroup } from 'lit';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @summary Internal facet section for cx-faceted-filter. Renders one collapsible
|
|
14
|
+
* filter group with a multi-select tree supporting hierarchical values ("parent>>child").
|
|
15
|
+
*
|
|
16
|
+
* @event cx-selection-change - Bubbles from the internal cx-tree when selection changes.
|
|
17
|
+
*/
|
|
18
|
+
export default class CxFacetedFilterFacet extends CortexElement {
|
|
19
|
+
static readonly styles: CSSResultGroup;
|
|
20
|
+
static readonly dependencies: {
|
|
21
|
+
'cx-button': typeof CxButton;
|
|
22
|
+
'cx-details': typeof CxDetails;
|
|
23
|
+
'cx-icon': typeof CxIcon;
|
|
24
|
+
'cx-space': typeof CxSpace;
|
|
25
|
+
'cx-spinner': typeof CxSpinner;
|
|
26
|
+
'cx-tree': typeof CxTree;
|
|
27
|
+
'cx-tree-item': typeof CxTreeItem;
|
|
28
|
+
};
|
|
29
|
+
private readonly localize;
|
|
30
|
+
private static readonly itemsPerPage;
|
|
31
|
+
/** Whether the facet is loading new values from the API. */
|
|
32
|
+
loading: boolean;
|
|
33
|
+
/** Human-readable label shown in the collapsible header. */
|
|
34
|
+
displayName: string;
|
|
35
|
+
/** Facet field name — used as data-facet on cx-tree so the parent can identify which facet changed. */
|
|
36
|
+
type: string;
|
|
37
|
+
/** Available filter options with counts. */
|
|
38
|
+
values: FacetValue[];
|
|
39
|
+
/** Currently selected values for this facet. */
|
|
40
|
+
collections: string[];
|
|
41
|
+
/** Whether the facet allows single or multi-select. */
|
|
42
|
+
selection: FacetSelectionMode;
|
|
43
|
+
/** Hierarchical structure: { parent: { child: count, all: totalCount } } */
|
|
44
|
+
private mappedSubtypes;
|
|
45
|
+
/** Maps raw value → display name for all parent and child entries. */
|
|
46
|
+
private mappedDisplayNames;
|
|
47
|
+
/** Current pagination page — incremented by "Load more". */
|
|
48
|
+
private page;
|
|
49
|
+
private static parseFacetValue;
|
|
50
|
+
handleValuesChange(): void;
|
|
51
|
+
private loadMore;
|
|
52
|
+
render(): import('lit').TemplateResult<1>;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'cx-faceted-filter-facet': CxFacetedFilterFacet;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as CxBadge } from '../badge/badge.ts';
|
|
2
|
+
import { default as CxButton } from '../button/button.ts';
|
|
3
|
+
import { default as CxDetails } from '../details/details.ts';
|
|
4
|
+
import { default as CxDropdown } from '../dropdown/dropdown.ts';
|
|
5
|
+
import { default as CxIcon } from '../icon/icon.ts';
|
|
6
|
+
import { default as CxIconButton } from '../icon-button/icon-button.ts';
|
|
7
|
+
import { default as CxSpace } from '../space/space.ts';
|
|
8
|
+
import { default as CxSpinner } from '../spinner/spinner.ts';
|
|
9
|
+
import { default as CxTag } from '../tag/tag.ts';
|
|
10
|
+
import { default as CxTooltip } from '../tooltip/tooltip.ts';
|
|
11
|
+
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
12
|
+
import { Facet, FacetDetails, FacetSelectionMode, SelectedFacets } from '../../../../types/src/faceted-filter';
|
|
13
|
+
import { CSSResultGroup } from 'lit';
|
|
14
|
+
import { default as CxFacetedFilterFacet } from './components/facet/facet';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @summary Filter icon button that opens a dropdown panel with collapsible facet groups.
|
|
18
|
+
* Applied filters are shown as removable tags with a "Clear" action.
|
|
19
|
+
*
|
|
20
|
+
* @event {{ selection: SelectedFacets }} cx-faceted-filter-change - Fired whenever
|
|
21
|
+
* the user changes a selection, removes a tag, or clears all filters.
|
|
22
|
+
*/
|
|
23
|
+
export default class CxFacetedFilter extends CortexElement {
|
|
24
|
+
static readonly styles: CSSResultGroup;
|
|
25
|
+
static readonly dependencies: {
|
|
26
|
+
'cx-badge': typeof CxBadge;
|
|
27
|
+
'cx-button': typeof CxButton;
|
|
28
|
+
'cx-details': typeof CxDetails;
|
|
29
|
+
'cx-dropdown': typeof CxDropdown;
|
|
30
|
+
'cx-faceted-filter-facet': typeof CxFacetedFilterFacet;
|
|
31
|
+
'cx-icon': typeof CxIcon;
|
|
32
|
+
'cx-icon-button': typeof CxIconButton;
|
|
33
|
+
'cx-space': typeof CxSpace;
|
|
34
|
+
'cx-spinner': typeof CxSpinner;
|
|
35
|
+
'cx-tag': typeof CxTag;
|
|
36
|
+
'cx-tooltip': typeof CxTooltip;
|
|
37
|
+
};
|
|
38
|
+
private readonly localize;
|
|
39
|
+
/** Active facets with their metadata and available option values. */
|
|
40
|
+
facets: Facet[];
|
|
41
|
+
/** Ordered list of facets to display. Controls which facets render and in what order. */
|
|
42
|
+
availableFacets: FacetDetails[];
|
|
43
|
+
/** Currently selected filter values. See `SelectedFacets` type. Can be set to reset selection. */
|
|
44
|
+
selectedFacets: SelectedFacets;
|
|
45
|
+
/** Default selection mode for all facets. Per-facet selection in FacetDetails takes precedence. */
|
|
46
|
+
selection: FacetSelectionMode;
|
|
47
|
+
/** Whether the current selection is being applied by the consumer. */
|
|
48
|
+
loading: boolean;
|
|
49
|
+
/** Total count of selected filter values that have a matching display name. */
|
|
50
|
+
private appliedFiltersCount;
|
|
51
|
+
/** Internal selection state maintained by the component. */
|
|
52
|
+
private internalSelection;
|
|
53
|
+
/** Maps facetFieldName → (value → displayValue) for rendering applied-filter tags. */
|
|
54
|
+
private mappedDisplayNames;
|
|
55
|
+
handleFacetsChange(): void;
|
|
56
|
+
handleSelectedFacetsChange(): void;
|
|
57
|
+
handleInternalSelectionChange(): void;
|
|
58
|
+
private updateAppliedFiltersCount;
|
|
59
|
+
private getFacetSelectionMode;
|
|
60
|
+
private handleSelectionChange;
|
|
61
|
+
private handleRemove;
|
|
62
|
+
private handleClearAllClick;
|
|
63
|
+
private renderAppliedFilters;
|
|
64
|
+
private renderFooter;
|
|
65
|
+
render(): import('lit').TemplateResult<1>;
|
|
66
|
+
}
|
|
67
|
+
declare global {
|
|
68
|
+
interface HTMLElementTagNameMap {
|
|
69
|
+
'cx-faceted-filter': CxFacetedFilter;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fontAwesomeIconNames: readonly string[];
|
|
@@ -31,6 +31,7 @@ export default class CxIcon extends CortexElement {
|
|
|
31
31
|
private customIconSrc;
|
|
32
32
|
private customIconSvg;
|
|
33
33
|
private loadingIconName;
|
|
34
|
+
private get effectiveVariant();
|
|
34
35
|
protected runFirstUpdated(): void;
|
|
35
36
|
handleNameChange(): Promise<void>;
|
|
36
37
|
handleLabelChange(): void;
|
|
@@ -121,7 +121,7 @@ export default class CxImage extends ResizableElement {
|
|
|
121
121
|
get currentAltValue(): string;
|
|
122
122
|
get currentSrc(): string;
|
|
123
123
|
get highlighterTabindex(): "0" | undefined;
|
|
124
|
-
get highlighterRole(): "
|
|
124
|
+
get highlighterRole(): "button" | "img";
|
|
125
125
|
get highlighterClass(): {
|
|
126
126
|
[x: string]: boolean;
|
|
127
127
|
'highlightable-item': boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ColumnDefinition, TableDataFormat } from '../../../../types/src/table';
|
|
2
|
+
|
|
3
|
+
export type StreamChunkCallback = (rows: Array<Record<string, unknown>>) => Promise<void>;
|
|
4
|
+
export declare function parseCsvStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number): Promise<number>;
|
|
5
|
+
export declare function parseJsonStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number): Promise<number>;
|
|
6
|
+
export interface ParsedTableData {
|
|
7
|
+
columns: ColumnDefinition[];
|
|
8
|
+
data: Array<Record<string, unknown>>;
|
|
9
|
+
}
|
|
10
|
+
export type DataParser = (raw: string) => ParsedTableData | Promise<ParsedTableData>;
|
|
11
|
+
export declare const tableDataParsers: Record<Exclude<TableDataFormat, TableDataFormat.Auto>, DataParser>;
|
|
12
|
+
export declare function detectTableDataFormat(url: string, contentType: string | null): Exclude<TableDataFormat, TableDataFormat.Auto>;
|
|
13
|
+
export declare function resolveTableDataFormat(requested: TableDataFormat, url: string, contentType: string | null): Exclude<TableDataFormat, TableDataFormat.Auto>;
|
|
@@ -9,7 +9,7 @@ import { default as CxSpinner } from '../spinner/spinner.ts';
|
|
|
9
9
|
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
10
10
|
import { RowComponent, TabulatorFull as Tabulator } from '../../../../hybrid/table-core/src/index.ts';
|
|
11
11
|
import { PaginationCounter } from '../../../../types/src/pagination';
|
|
12
|
-
import { HoverMenuOptions, SavedSearchItem, TableClipboardAction, TableDropdownFilterData, ColumnDefinition, Options, OptionsColumns, OptionsSpreadsheet, SheetDefinition } from '../../../../types/src/table';
|
|
12
|
+
import { HoverMenuOptions, SavedSearchItem, TableClipboardAction, TableDropdownFilterData, ColumnDefinition, Options, OptionsColumns, OptionsSpreadsheet, SheetDefinition, TableDataFormat } from '../../../../types/src/table';
|
|
13
13
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
14
14
|
import { CxTableRowActions, CxTableToolbar } from './components';
|
|
15
15
|
|
|
@@ -61,6 +61,8 @@ import { CxTableRowActions, CxTableToolbar } from './components';
|
|
|
61
61
|
* @event {{ args: any[] }} cx-table.[event_name] - Emitted when the event with such name is emitted on the table.
|
|
62
62
|
* Must register the event listener on the table element to receive the event.
|
|
63
63
|
* E.g: `cx-table.rowMoved` will fire when `rowMoved` event is emitted.
|
|
64
|
+
* @event {{ url: string, format: string, rowCount: number }} cx-table-data-load - Emitted when data is successfully loaded from dataUrl.
|
|
65
|
+
* @event {{ url: string, error: unknown }} cx-table-data-load-error - Emitted when fetching or parsing data from dataUrl fails.
|
|
64
66
|
*/
|
|
65
67
|
export default class CxTable extends CortexElement {
|
|
66
68
|
#private;
|
|
@@ -679,6 +681,10 @@ export default class CxTable extends CortexElement {
|
|
|
679
681
|
* the externally set state, not the internal data fetch.
|
|
680
682
|
*/
|
|
681
683
|
loading: boolean;
|
|
684
|
+
/** URL to fetch tabular data from. When set, the table fetches, parses, and populates columns and data. */
|
|
685
|
+
dataUrl: string;
|
|
686
|
+
/** Format of the data at dataUrl. Use 'auto' to detect from URL extension or Content-Type header. */
|
|
687
|
+
dataFormat: TableDataFormat;
|
|
682
688
|
tabulatorInstance: Tabulator | null;
|
|
683
689
|
/**
|
|
684
690
|
* In case the table is re-initialized, we need to re-register the event listeners.
|
|
@@ -686,6 +692,8 @@ export default class CxTable extends CortexElement {
|
|
|
686
692
|
*/
|
|
687
693
|
private readonly watchedEvents;
|
|
688
694
|
private activeSearchValue;
|
|
695
|
+
/** Monotonic counter to discard responses from superseded dataUrl fetches. */
|
|
696
|
+
private dataUrlRequestId;
|
|
689
697
|
get initialized(): boolean | undefined;
|
|
690
698
|
get searchValue(): string;
|
|
691
699
|
get showTableToolbar(): string | boolean;
|
|
@@ -729,8 +737,12 @@ export default class CxTable extends CortexElement {
|
|
|
729
737
|
handleSearchFieldsChange(): void;
|
|
730
738
|
handleSearchMatchAnyKeywordChange(): void;
|
|
731
739
|
handleDropdownFiltersPropChange(): void;
|
|
740
|
+
handleDataUrlChange(): void;
|
|
732
741
|
private handleTableExport;
|
|
733
742
|
private handleDropdownFilterChange;
|
|
743
|
+
private streamCsvData;
|
|
744
|
+
private streamJsonData;
|
|
745
|
+
private loadFromDataUrl;
|
|
734
746
|
render(): TemplateResult;
|
|
735
747
|
}
|
|
736
748
|
declare global {
|
|
@@ -14,6 +14,7 @@ export { default as CxCard } from './components/card/card';
|
|
|
14
14
|
export { default as CxCheckbox } from './components/checkbox/checkbox';
|
|
15
15
|
export { default as CxColorPicker } from './components/color-picker/color-picker';
|
|
16
16
|
export { default as CxCopyButton } from './components/copy-button/copy-button';
|
|
17
|
+
export { default as CxDateCalendar } from './components/date-calendar/date-calendar';
|
|
17
18
|
export { default as CxDetails } from './components/details/details';
|
|
18
19
|
export { default as CxDialog } from './components/dialog/dialog';
|
|
19
20
|
export { default as CxDivider } from './components/divider/divider';
|
|
@@ -24,6 +25,7 @@ export { default as CxDrawer } from './components/drawer/drawer';
|
|
|
24
25
|
export { default as CxDropdown } from './components/dropdown/dropdown';
|
|
25
26
|
export { default as CxEChart } from './components/e-chart/e-chart';
|
|
26
27
|
export { default as CxElementClamp } from './components/element-clamp/element-clamp';
|
|
28
|
+
export { default as CxFacetedFilter } from './components/faceted-filter/faceted-filter';
|
|
27
29
|
export { default as CxFormatBytes } from './components/format-bytes/format-bytes';
|
|
28
30
|
export { default as CxFormatDate } from './components/format-date/format-date';
|
|
29
31
|
export { default as CxFormatNumber } from './components/format-number/format-number';
|
|
@@ -85,3 +87,4 @@ export { default as CxVisuallyHidden } from './components/visually-hidden/visual
|
|
|
85
87
|
export { getAnimationNames, getEasingNames } from './utilities/animation';
|
|
86
88
|
export { default as componentStyles } from '../../styles/src/component.styles';
|
|
87
89
|
export { getAnimation, setAnimation, setDefaultAnimation, } from './utilities/animation-registry';
|
|
90
|
+
export { fontAwesomeIconNames } from './components/icon/font-awesome-icons';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Emitted by cx-date-calendar when the user selects a date. Value is always YYYY-MM-DD. */
|
|
2
|
+
export type CxDateSelectEvent = CustomEvent<{
|
|
3
|
+
value: string;
|
|
4
|
+
}>;
|
|
5
|
+
declare global {
|
|
6
|
+
interface GlobalEventHandlersEventMap {
|
|
7
|
+
'cx-date-select': CxDateSelectEvent;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TableDataFormat } from '../../types/src/table';
|
|
2
|
+
|
|
3
|
+
export type CxTableDataLoadEvent = CustomEvent<{
|
|
4
|
+
format: TableDataFormat;
|
|
5
|
+
rowCount: number;
|
|
6
|
+
url: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type CxTableDataLoadErrorEvent = CustomEvent<{
|
|
9
|
+
error: unknown;
|
|
10
|
+
url: string;
|
|
11
|
+
}>;
|
|
12
|
+
declare global {
|
|
13
|
+
interface GlobalEventHandlersEventMap {
|
|
14
|
+
'cx-table-data-load': CxTableDataLoadEvent;
|
|
15
|
+
'cx-table-data-load-error': CxTableDataLoadErrorEvent;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -52,6 +52,7 @@ export * from './cx-copy';
|
|
|
52
52
|
export * from './cx-corner-position-input-group-change';
|
|
53
53
|
export * from './cx-dashboard-filter-change';
|
|
54
54
|
export * from './cx-dashboard-table-load-more';
|
|
55
|
+
export * from './cx-date-select';
|
|
55
56
|
export * from './cx-disconnect';
|
|
56
57
|
export * from './cx-document-viewer-open-asset';
|
|
57
58
|
export * from './cx-dot-pagination-change';
|
|
@@ -69,6 +70,7 @@ export * from './cx-enter';
|
|
|
69
70
|
export * from './cx-error';
|
|
70
71
|
export * from './cx-expand';
|
|
71
72
|
export * from './cx-export-settings';
|
|
73
|
+
export * from './cx-faceted-filter-change';
|
|
72
74
|
export * from './cx-file-on-demand-load-more';
|
|
73
75
|
export * from './cx-file-on-demand-pin';
|
|
74
76
|
export * from './cx-file-on-demand-unpin';
|
|
@@ -165,6 +167,7 @@ export * from './cx-swatch-add';
|
|
|
165
167
|
export * from './cx-tab-hide';
|
|
166
168
|
export * from './cx-tab-show';
|
|
167
169
|
export * from './cx-table-advanced-search-click';
|
|
170
|
+
export * from './cx-table-data-load';
|
|
168
171
|
export * from './cx-table-dropdown-filter-change';
|
|
169
172
|
export * from './cx-table-export';
|
|
170
173
|
export * from './cx-table-row-action-click';
|
|
@@ -29,6 +29,10 @@ export declare const CLICKABLE_CELL_CLASS = "tabulator-clickable-cell";
|
|
|
29
29
|
* order: column > row > table. The optional `clickableActionName` column
|
|
30
30
|
* property targets a specific action by name; if no match is found the
|
|
31
31
|
* activation is a no-op.
|
|
32
|
+
*
|
|
33
|
+
* `clickableEventName` bypasses hover menu resolution entirely: clicking fires
|
|
34
|
+
* `cx-table-row-action-click` with `detail.name` equal to the provided value.
|
|
35
|
+
* Takes priority over `clickableActionName` when both are set.
|
|
32
36
|
*/
|
|
33
37
|
export default class ClickableCell extends Module {
|
|
34
38
|
static readonly moduleName = "clickableCell";
|
|
@@ -39,6 +43,7 @@ export default class ClickableCell extends Module {
|
|
|
39
43
|
handleCellClick(event: MouseEvent, cell: Cell): void;
|
|
40
44
|
private emitCellAction;
|
|
41
45
|
private getCxTableHost;
|
|
46
|
+
private resolveEmitName;
|
|
42
47
|
private resolveAction;
|
|
43
48
|
private pickAction;
|
|
44
49
|
}
|
|
@@ -30,7 +30,7 @@ export default class CxAssetDataDisplay extends CortexElement {
|
|
|
30
30
|
position: AssetDataDisplayPosition;
|
|
31
31
|
fetchMode: AssetDataDisplayFetchMode;
|
|
32
32
|
token: string;
|
|
33
|
-
|
|
33
|
+
siteBuilderToken: string;
|
|
34
34
|
recordId: string;
|
|
35
35
|
headerSourceField: string;
|
|
36
36
|
detailsSourceField: string;
|
|
@@ -10,6 +10,8 @@ import { Asset, AssetType, AssetTypeString } from '../../../types/src/content-bu
|
|
|
10
10
|
/**
|
|
11
11
|
* @summary The `cx-asset-picker` component lets users choose and clear assets for a trait/control.
|
|
12
12
|
*
|
|
13
|
+
* @slot trigger - Custom element to use as the trigger instead of the default choose button.
|
|
14
|
+
*
|
|
13
15
|
* @event cx-content-builder-asset-select - Emitted when an asset is selected.
|
|
14
16
|
* @event cx-asset-request-status - Emitted when the asset request status changes.
|
|
15
17
|
*/
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
|
|
1
2
|
import { default as CxDivider } from '../../../atoms/src/components/divider/divider.ts';
|
|
3
|
+
import { default as CxDropdown } from '../../../atoms/src/components/dropdown/dropdown.ts';
|
|
2
4
|
import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
|
|
5
|
+
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
|
|
6
|
+
import { default as CxInput } from '../../../atoms/src/components/input/input.ts';
|
|
7
|
+
import { default as CxMenu } from '../../../atoms/src/components/menu/menu.ts';
|
|
8
|
+
import { default as CxMenuItem } from '../../../atoms/src/components/menu-item/menu-item.ts';
|
|
3
9
|
import { default as CxOption } from '../../../atoms/src/components/option/option.ts';
|
|
4
10
|
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
5
11
|
import { default as CxSpace } from '../../../atoms/src/components/space/space.ts';
|
|
6
12
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
7
13
|
import { CxAssetPickerSelectEvent } from '../../../events/src/events.ts';
|
|
8
14
|
import { default as CxAssetPicker } from '../asset-picker/asset-picker.ts';
|
|
15
|
+
import { default as CxBicolorPicker } from '../bicolor-picker/bicolor-picker.ts';
|
|
9
16
|
import { Asset, AssetTypeString } from '../../../types/src/content-builder';
|
|
17
|
+
import { IconPickerValue, IconPickerVariant } from '../../../types/src/icon-picker';
|
|
10
18
|
import { CSSResultGroup, nothing } from 'lit';
|
|
11
19
|
|
|
12
20
|
type IconData = {
|
|
@@ -16,28 +24,66 @@ type IconData = {
|
|
|
16
24
|
};
|
|
17
25
|
/**
|
|
18
26
|
* @summary <cx-icon-picker> is a component that allows the user to select an icon from a list of icons.
|
|
27
|
+
*
|
|
28
|
+
* @csspart base - The component's base select wrapper (select mode).
|
|
29
|
+
* @csspart option - Each icon option in the select list.
|
|
30
|
+
* @csspart prefix - The prefix icon shown in the select trigger.
|
|
31
|
+
* @csspart footer - The footer area of the select dropdown containing the custom option.
|
|
32
|
+
* @csspart footer-divider - The divider above the custom option in the select footer.
|
|
33
|
+
* @csspart custom-button - The custom icon option in the select footer.
|
|
34
|
+
* @csspart panel - The button-mode dropdown panel.
|
|
35
|
+
*
|
|
36
|
+
* @event cx-change - Emitted when the selected icon value changes.
|
|
37
|
+
* @event {{ value: [string, string] }} cx-bicolor-picker-change - Emitted when the embedded bicolor picker value changes (only when `show-bicolor-picker` is true).
|
|
19
38
|
*/
|
|
20
39
|
export default class CxIconPicker extends CortexElement {
|
|
21
40
|
static readonly styles: CSSResultGroup;
|
|
22
41
|
static readonly dependencies: {
|
|
23
42
|
'cx-asset-picker': typeof CxAssetPicker;
|
|
43
|
+
'cx-bicolor-picker': typeof CxBicolorPicker;
|
|
44
|
+
'cx-button': typeof CxButton;
|
|
24
45
|
'cx-divider': typeof CxDivider;
|
|
46
|
+
'cx-dropdown': typeof CxDropdown;
|
|
25
47
|
'cx-icon': typeof CxIcon;
|
|
48
|
+
'cx-icon-button': typeof CxIconButton;
|
|
49
|
+
'cx-input': typeof CxInput;
|
|
50
|
+
'cx-menu': typeof CxMenu;
|
|
51
|
+
'cx-menu-item': typeof CxMenuItem;
|
|
26
52
|
'cx-option': typeof CxOption;
|
|
27
53
|
'cx-select': typeof CxSelect;
|
|
28
54
|
'cx-space': typeof CxSpace;
|
|
29
55
|
};
|
|
30
56
|
private readonly localize;
|
|
31
|
-
private select;
|
|
32
|
-
private customOption;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
src: string;
|
|
36
|
-
};
|
|
57
|
+
private readonly select;
|
|
58
|
+
private readonly customOption;
|
|
59
|
+
private readonly dropdown?;
|
|
60
|
+
value: IconPickerValue;
|
|
37
61
|
/**
|
|
38
62
|
* Adds a clear button when the select is not empty.
|
|
39
63
|
*/
|
|
40
64
|
clearable: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Controls the visual variant of the icon picker.
|
|
67
|
+
* In 'select' mode a cx-select is rendered inline.
|
|
68
|
+
* In 'button' mode a cx-button trigger opens a cx-dropdown panel with a search input and icon list.
|
|
69
|
+
* @default 'select'
|
|
70
|
+
*/
|
|
71
|
+
variant: IconPickerVariant;
|
|
72
|
+
/**
|
|
73
|
+
* When true, adds a Font Awesome section alongside the default Cortex icon library.
|
|
74
|
+
*/
|
|
75
|
+
fontAwesome: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* When true, renders a cx-bicolor-picker below the icon selector.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
showColorPicker: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Color value in light-dark() CSS format, managed by the embedded bicolor picker.
|
|
83
|
+
* Only relevant when show-bicolor-picker is true.
|
|
84
|
+
* @default ''
|
|
85
|
+
*/
|
|
86
|
+
color: string;
|
|
41
87
|
/**
|
|
42
88
|
* Function to request an asset.
|
|
43
89
|
* This is used to open the asset picker dialog when the user selects an asset from the DAM.
|
|
@@ -53,23 +99,37 @@ export default class CxIconPicker extends CortexElement {
|
|
|
53
99
|
* Since the virtualizer have a defect that not re-render when the parent is hidden once
|
|
54
100
|
*/
|
|
55
101
|
private showVirtualizer;
|
|
56
|
-
get
|
|
102
|
+
private get filteredCortexIcons();
|
|
103
|
+
private get filteredFaIcons();
|
|
104
|
+
private get virtualListItems();
|
|
57
105
|
constructor();
|
|
58
106
|
runFirstUpdated(): void;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
107
|
+
handleVariantChange(): Promise<void>;
|
|
108
|
+
renderOption(item: IconData): import('lit').TemplateResult<1> | typeof nothing;
|
|
109
|
+
private renderMenuItem;
|
|
110
|
+
private handleSelectValueChange;
|
|
111
|
+
private handleClear;
|
|
112
|
+
private handleSelectShow;
|
|
113
|
+
private handleSelectHide;
|
|
114
|
+
private handleDropdownShow;
|
|
115
|
+
private handleDropdownHide;
|
|
63
116
|
/**
|
|
64
117
|
* Mount virtualizer when select is focused (before it opens)
|
|
65
118
|
*/
|
|
66
|
-
handleSelectFocus
|
|
119
|
+
private handleSelectFocus;
|
|
67
120
|
handleContentBuilderAssetSelect(event: CxAssetPickerSelectEvent): Promise<void>;
|
|
68
121
|
handleContentBuilderAssetDelete(): Promise<void>;
|
|
122
|
+
private handleSearchInput;
|
|
123
|
+
private handleMenuSelect;
|
|
124
|
+
private handleBicolorChange;
|
|
69
125
|
setSelectOptionCurrent(option: HTMLElement, current?: boolean): void;
|
|
70
126
|
selectGetOptionLabel(option: HTMLElement): string;
|
|
71
127
|
selectFilterCallback(option: HTMLElement, value: string): boolean;
|
|
72
|
-
|
|
128
|
+
private renderIcon;
|
|
129
|
+
private renderCustomIconPickerMenuItem;
|
|
130
|
+
private renderCustomIconPicker;
|
|
131
|
+
private renderSelectMode;
|
|
132
|
+
private renderButtonMode;
|
|
73
133
|
render(): import('lit').TemplateResult<1>;
|
|
74
134
|
}
|
|
75
135
|
declare global {
|
|
@@ -35,4 +35,6 @@ export { default as CxStorybook } from './storybook/storybook';
|
|
|
35
35
|
export { default as CxTimeline } from './timeline/timeline';
|
|
36
36
|
export { default as CxTypeface } from './typeface/typeface';
|
|
37
37
|
export { default as CxAssetFormatPicker } from './asset-format-picker/asset-format-picker';
|
|
38
|
+
export { default as CxInputDatePicker } from './input-date-picker/input-date-picker';
|
|
39
|
+
export { default as CxInputDateRangePicker } from './input-date-range-picker/input-date-range-picker';
|
|
38
40
|
export { default as CxViewAndSort } from './view-and-sort/view-and-sort';
|