@orangelogic/design-system 2.139.0 → 2.140.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.
Files changed (25) hide show
  1. package/library/chunks/{asset-link-format.oOC8fxvV.js → asset-link-format.CoMUMoyK.js} +545 -490
  2. package/library/chunks/{color-swatch-group.CYI2N8gp.js → color-swatch-group.DedQQk4J.js} +199 -162
  3. package/library/chunks/{document-viewer.Ga2Ppgit.js → document-viewer.NA5cS7qW.js} +2 -0
  4. package/library/components/asset-link-format.js +1 -1
  5. package/library/components/atoms.js +1 -1
  6. package/library/components/audio.js +6 -3
  7. package/library/components/color-swatch-group.js +1 -1
  8. package/library/components/document-viewer.js +1 -1
  9. package/library/components/organisms.js +2 -2
  10. package/library/components/types.js +14719 -14822
  11. package/library/package.json +1 -1
  12. package/library/packages/atoms/src/components/audio/audio.d.ts +5 -0
  13. package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-toolbar.d.ts +1 -0
  14. package/library/packages/hybrid/table-core/src/table/table.d.ts +16 -0
  15. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Validate/Validate.d.ts +10 -0
  16. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
  17. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +0 -4
  18. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +0 -4
  19. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +0 -4
  20. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +5 -2
  21. package/library/packages/types/src/table.d.ts +8 -0
  22. package/library/react-web-component.d.ts +7 -3
  23. package/package.json +1 -1
  24. package/library/packages/organisms/src/_v1/comment-v1/extensions/time.d.ts +0 -63
  25. /package/library/packages/organisms/src/{annotator-comment → comment}/extensions/time.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.139.0",
4
+ "version": "2.140.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -110,6 +110,11 @@ export default class CxAudio extends ResizableElement {
110
110
  private audioSrc;
111
111
  /** Whether autoplay is deferred until the in-point seek completes after durationchange. */
112
112
  private pendingAutoplay;
113
+ /**
114
+ * Resolved filename override (e.g. an asset title fetched by subclasses). Falls back
115
+ * to `name` in the footer display when empty, without touching the `name` property.
116
+ */
117
+ protected resolvedName: string;
113
118
  private get clampedInPoint();
114
119
  runConnectedCallback(): void;
115
120
  disconnectedCallback(): void;
@@ -24,6 +24,7 @@ import { default as CxTableSavedSearchDropdown } from './table-saved-search-drop
24
24
  *
25
25
  * @slot label - Optional label content that replaces the label property fallback.
26
26
  * @slot pagination - Optional pagination content displayed opposite the label.
27
+ * @slot add-action - Replaces the default add button. When empty the default add button (controlled by `can-add`) is rendered unchanged.
27
28
  * @slot dialog-dynamic-filter - Filter UI shown beside the toolbar actions and hidden while rows are selected. `cx-table` renders a `cx-faceted-filter` here when facets are available.
28
29
  *
29
30
  * @event {{ value: string }} cx-search - Emitted when the search value is submitted or cleared.
@@ -64,6 +64,7 @@ import { CxTableFooter, CxTableRowActions, CxTableToolbar } from './components';
64
64
  * @cssproperty [--table-selected-cell-border-width=1px] - The border width of the active selected cell.
65
65
  * @cssproperty [--table-selected-cell-border-style=solid] - The border style of the active selected cell.
66
66
  * @cssproperty [--header-pagination-min-height=var(--cx-input-height-medium)] - Reserved height for the toolbar's label/pagination row (`cx-table-toolbar`) when `pagination` is enabled, regardless of `pagination-placement`. Set to `0` to remove the reservation.
67
+ * @slot add-action - Passed through to `cx-table-toolbar`'s `add-action` slot. Replaces the default add button when provided; when empty the toolbar's default add button (controlled by `can-add`) is rendered unchanged.
67
68
  *
68
69
  * @event {{ args: any[] }} cx-table.[event_name] - Emitted when the event with such name is emitted on the table.
69
70
  * Must register the event listener on the table element to receive the event.
@@ -76,6 +77,7 @@ export default class CxTable extends CortexElement {
76
77
  #private;
77
78
  static readonly styles: CSSResultGroup;
78
79
  private readonly localize;
80
+ private readonly hasSlotController;
79
81
  static readonly dependencies: {
80
82
  'cx-button': typeof CxButton;
81
83
  'cx-checkbox': typeof CxCheckbox;
@@ -772,6 +774,12 @@ export default class CxTable extends CortexElement {
772
774
  dateFilterCompareFormat: DateFilterCompareFormat;
773
775
  /** Format of the data at dataUrl. Use 'auto' to detect from URL extension or Content-Type header. */
774
776
  dataFormat: TableDataFormat;
777
+ /**
778
+ * When true, a `dataUrl` load keeps existing `columns` as-is instead of auto-populating them
779
+ * from the loaded file's headers. Has no effect when `columns` is empty — auto-detection still
780
+ * applies so the table has something to render.
781
+ */
782
+ preserveColumnsOnLoad: boolean;
775
783
  tabulatorInstance: Tabulator | null;
776
784
  /**
777
785
  * In case the table is re-initialized, we need to re-register the event listeners.
@@ -787,6 +795,8 @@ export default class CxTable extends CortexElement {
787
795
  get searchValue(): string;
788
796
  get isBottomPlacement(): boolean;
789
797
  get showPaginationFooter(): boolean;
798
+ /** True when either the default add button or a custom `add-action` slot should render. */
799
+ get hasAddAction(): boolean;
790
800
  get showTableToolbar(): string | boolean;
791
801
  /** True when all active enabled rows are selected (local) or select-all mode with no exclusions (remote). */
792
802
  get selectAllActive(): boolean;
@@ -862,6 +872,12 @@ export default class CxTable extends CortexElement {
862
872
  private handleDropdownFilterChange;
863
873
  private handleTableGroupByChange;
864
874
  private handleSelectAllChange;
875
+ /**
876
+ * Controlled by `preserveColumnsOnLoad`: when enabled and the consumer already defined
877
+ * `columns` (e.g. a custom column with its own `mutator`), a `dataUrl` load keeps them as-is.
878
+ * Otherwise columns are auto-detected from the loaded data's headers, same as before.
879
+ */
880
+ private resolveColumnsAfterLoad;
865
881
  private streamCsvData;
866
882
  private streamJsonData;
867
883
  private streamXmlData;
@@ -29,6 +29,8 @@ export default class Validate extends Module {
29
29
  * row/column (detached mocks) key by the cell itself.
30
30
  */
31
31
  private readonly invalidState;
32
+ /** Columns declaring `mutateOnValidate` — re-mutated whenever the row's validation state changes. */
33
+ private readonly mutateOnValidateColumns;
32
34
  get invalidCells(): Cell[];
33
35
  set invalidCells(cells: Cell[]);
34
36
  /**
@@ -60,6 +62,8 @@ export default class Validate extends Module {
60
62
  dataProcessed(): void;
61
63
  cellIsValid(cell: Cell): boolean;
62
64
  cellValidate(cell: Cell): CellValidationFailure[] | boolean;
65
+ /** Current validation failures for this cell — empty when the cell is valid or unvalidated. */
66
+ getCellValidationErrors(cell: Cell): CellValidationFailure[];
63
67
  columnValidate(column: Column): ICellComponent[] | boolean;
64
68
  rowValidate(row: Row): ICellComponent[] | boolean;
65
69
  userClearCellValidation(cells?: ICellComponent | ICellComponent[]): void;
@@ -80,6 +84,12 @@ export default class Validate extends Module {
80
84
  validate(validators: ValidatorConfig[] | false | undefined, cell: Cell, value: unknown): CellValidationFailure[] | boolean;
81
85
  getInvalidCells(): ICellComponent[];
82
86
  clearValidation(cell: Cell): void;
87
+ /**
88
+ * Forces every `mutateOnValidate` column to re-run its mutator (and re-render) for this row —
89
+ * called after this row's validation state changes, so a column aggregating row-level errors
90
+ * (e.g. via `getValidationErrors()` on sibling cells) stays in sync. No-op when no column opts in.
91
+ */
92
+ private refreshMutateOnValidateColumns;
83
93
  private rowKeyOf;
84
94
  private columnKeyOf;
85
95
  private getInvalidRecord;
@@ -248,6 +248,15 @@ export default class CxAssetLinkFormat extends CortexElement {
248
248
  width: number;
249
249
  };
250
250
  };
251
+ /**
252
+ * Returns the last applied rotation value. Without an asset, rotation applies replace
253
+ * (dedupe) a single Rotate entry, so this reflects the exact committed value — used to
254
+ * know when the rotation panel has no pending change to apply, and to restore this value
255
+ * when the panel is closed without applying. With an asset, rotation applies are
256
+ * cumulative deltas reprocessed by the backend, so there is no single "last applied"
257
+ * value and this always returns 0.
258
+ */
259
+ get lastRotation(): number;
251
260
  /**
252
261
  * Returns the transformation string for the asset link.
253
262
  */
@@ -106,10 +106,6 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
106
106
  * Whether the apply button is disabled.
107
107
  */
108
108
  disabledApply: boolean;
109
- /**
110
- * When true, shows the apply button. When false (default), changes take effect immediately (standalone mode).
111
- */
112
- canApply: boolean;
113
109
  /**
114
110
  * The last applied crop settings for each unit.
115
111
  * This is used to restore the last applied settings when the component is closed.
@@ -48,10 +48,6 @@ export default class CxAssetLinkFormatQuality extends CortexElement {
48
48
  * @default false
49
49
  */
50
50
  loading: boolean;
51
- /**
52
- * When true, shows the apply button. When false (default), changes take effect immediately (standalone mode).
53
- */
54
- canApply: boolean;
55
51
  scopedValue: number;
56
52
  /**
57
53
  * A computed property that checks if the current quality value is invalid.
@@ -104,10 +104,6 @@ export default class CxAssetLinkFormatResize extends CortexElement {
104
104
  * @default false
105
105
  */
106
106
  loading: boolean;
107
- /**
108
- * When true, shows the apply button. When false (default), changes take effect immediately (standalone mode).
109
- */
110
- canApply: boolean;
111
107
  /**
112
108
  * Whether to keep the aspect ratio when changing width or height.
113
109
  * This is used to automatically adjust the other dimension when one is changed.
@@ -57,9 +57,12 @@ export default class CxAssetLinkFormatRotation extends CortexElement {
57
57
  */
58
58
  loading: boolean;
59
59
  /**
60
- * When true, shows the apply button. When false (default), changes take effect immediately (standalone mode).
60
+ * The last applied rotation value. Used to know when there is no pending change to apply
61
+ * (instead of assuming 0 always means "unchanged"), and to restore this value when the
62
+ * details section is closed without applying.
63
+ * @default 0
61
64
  */
62
- canApply: boolean;
65
+ lastAppliedValue: number;
63
66
  handleOpenChange(): void;
64
67
  private handleRotationChange;
65
68
  private handleButtonClick;
@@ -152,6 +152,7 @@ export interface ICellComponent {
152
152
  getType(): string;
153
153
  getField(): string;
154
154
  getColumn(): IColumnComponent;
155
+ getValidationErrors(): CellValidationFailure[];
155
156
  setValue(value: any, mutate?: boolean): void;
156
157
  restoreOldValue(): void;
157
158
  restoreInitialValue(): void;
@@ -2102,6 +2103,13 @@ export interface ColumnDefinition extends ColumnLayout, CellCallbacks, Formatter
2102
2103
  /** only called when data is changed via a user editing a cell. */
2103
2104
  mutatorClipboard?: CustomMutator;
2104
2105
  mutatorClipboardParams?: CustomMutatorParams;
2106
+ /**
2107
+ * When true, this column's mutator is re-run (and the cell re-rendered) whenever any cell's
2108
+ * validation state changes elsewhere in the same row — cell edit, `validateAsync()`/`validate()`,
2109
+ * or `clearCellValidation()`. Use this for a column that aggregates row-level validation errors,
2110
+ * e.g. reading sibling cells' `getValidationErrors()` inside the `mutator`.
2111
+ */
2112
+ mutateOnValidate?: boolean;
2105
2113
  /**
2106
2114
  * Accessors are used to alter data as it is extracted from the table, through commands, the clipboard, or download.
2107
2115
  *