@orangelogic/design-system 2.117.0 → 2.119.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 (166) hide show
  1. package/library/assets/diff.worker-ClilI1xm.js +1 -0
  2. package/library/chunks/{animation.8MjXJybe.js → animation.hpY88RxG.js} +106 -100
  3. package/library/chunks/{asset.CIWxY-Aw.js → asset.D_MQwP1C.js} +4 -4
  4. package/library/chunks/browser.BHOCIF_A.js +84 -0
  5. package/library/chunks/{button.DwJEeW2t.js → button.bufNNyTc.js} +1 -1
  6. package/library/chunks/{color-swatch-group.BvLicLI4.js → color-swatch-group.CeazdbIe.js} +6 -6
  7. package/library/chunks/{color-swatch.DVzEaNeL.js → color-swatch.LEvHo5G_.js} +2 -2
  8. package/library/chunks/{confirm-popover.BifwpSuf.js → confirm-popover.BLQFU6Hs.js} +3 -3
  9. package/library/chunks/{content-builder.OsUmm8Wu.js → content-builder.BGzxZUgi.js} +1 -1
  10. package/library/chunks/debounce.DaHuiSGU.js +15 -0
  11. package/library/chunks/{dialog.BYCWepBc.js → dialog.DdsJ_WqU.js} +2 -2
  12. package/library/chunks/{document-viewer.CKCX8ueu.js → document-viewer.B5VtBEEP.js} +7 -7
  13. package/library/chunks/{dot-pagination.C4l5vKor.js → dot-pagination.Bny2T6DA.js} +1 -1
  14. package/library/chunks/{endpoints.D4h8hp1m.js → endpoints.6E17hFiK.js} +385 -385
  15. package/library/chunks/{file-on-demand.AwMj4AfO.js → file-on-demand.DDuWnvmy.js} +10 -10
  16. package/library/chunks/{folder-select.CrWjwQcw.js → folder-select.D1jO1hB_.js} +295 -203
  17. package/library/chunks/{header.Cf9ujCpg.js → header.CfiA4TRu.js} +1 -1
  18. package/library/chunks/{i18n.CH-wak_P.js → i18n.DDj5y9px.js} +106 -11
  19. package/library/chunks/{icon-button.CQiBjznj.js → icon-button.DOrACmes.js} +1 -1
  20. package/library/chunks/{iframe.BQPVygBJ.js → iframe.qaVD1n1m.js} +1 -1
  21. package/library/chunks/{image.cT-FziNS.js → image.BugewF1g.js} +129 -146
  22. package/library/chunks/{input.CH4lKxPM.js → input.BYj6YXcM.js} +1 -1
  23. package/library/chunks/keyed.C0rkKrxH.js +22 -0
  24. package/library/chunks/{list-editor.BfpDIsU5.js → list-editor.D5szxqSM.js} +11 -11
  25. package/library/chunks/math.DuKzLacZ.js +26 -0
  26. package/library/chunks/{option.Bvh35v8S.js → option.CnxdM30G.js} +1 -1
  27. package/library/chunks/{pagination.zQ2FFtxB.js → pagination.Dxig0LoI.js} +6 -6
  28. package/library/chunks/{responsive.C8NCkfCG.js → responsive.Cf65FCWd.js} +1 -1
  29. package/library/chunks/{tab-group.DvMX02hY.js → tab-group.CGg9lPLP.js} +3 -3
  30. package/library/chunks/{table.GCs54Y2t.js → table.BkdcDorc.js} +1471 -1400
  31. package/library/chunks/{tree.Btf2Q4YZ.js → tree.yYbWIRnc.js} +3 -3
  32. package/library/components/alert.js +2 -2
  33. package/library/components/animation.js +1 -1
  34. package/library/components/asset-link-format.js +8 -8
  35. package/library/components/atoms.js +144 -142
  36. package/library/components/audio.js +2 -2
  37. package/library/components/border-input-group.js +2 -2
  38. package/library/components/breadcrumb.js +1 -1
  39. package/library/components/button.js +2 -2
  40. package/library/components/color-picker.js +5 -5
  41. package/library/components/color-swatch-group.js +7 -7
  42. package/library/components/color-swatch.js +3 -3
  43. package/library/components/confirm-popover.js +4 -4
  44. package/library/components/copy-button.js +1 -1
  45. package/library/components/corner-position-input-group.js +3 -3
  46. package/library/components/date-calendar.js +1 -1
  47. package/library/components/details.js +1 -1
  48. package/library/components/dialog.js +3 -3
  49. package/library/components/diff.d.ts +3 -0
  50. package/library/components/diff.js +104 -0
  51. package/library/components/document-viewer.js +3 -3
  52. package/library/components/dot-pagination.js +2 -2
  53. package/library/components/drawer.js +2 -2
  54. package/library/components/dropdown.js +2 -2
  55. package/library/components/dynamic-select.js +282 -211
  56. package/library/components/e-chart.js +1 -1
  57. package/library/components/element-clamp.js +2 -2
  58. package/library/components/file-on-demand.js +11 -11
  59. package/library/components/folder-select.js +5 -5
  60. package/library/components/format-bytes.js +1 -1
  61. package/library/components/format-date.js +1 -1
  62. package/library/components/format-number.js +1 -1
  63. package/library/components/format-time.js +1 -1
  64. package/library/components/header.js +2 -2
  65. package/library/components/icon-button.js +2 -2
  66. package/library/components/iframe.js +2 -2
  67. package/library/components/image-comparer.js +2 -2
  68. package/library/components/image.js +5 -4
  69. package/library/components/input.js +2 -2
  70. package/library/components/line-clamp.js +6 -5
  71. package/library/components/list-editor.js +8 -8
  72. package/library/components/masonry.js +2 -2
  73. package/library/components/menu-item.js +1 -1
  74. package/library/components/menu.js +1 -1
  75. package/library/components/molecules.js +4 -4
  76. package/library/components/option.js +2 -2
  77. package/library/components/organisms.js +2 -2
  78. package/library/components/padding-input-group.js +1 -1
  79. package/library/components/pagination.js +7 -7
  80. package/library/components/popup.js +76 -75
  81. package/library/components/position-picker.js +1 -1
  82. package/library/components/progress-bar.js +1 -1
  83. package/library/components/progress-ring.js +1 -1
  84. package/library/components/range.js +3 -3
  85. package/library/components/rating.js +2 -2
  86. package/library/components/relative-time.js +1 -1
  87. package/library/components/select.js +33 -32
  88. package/library/components/shadow-input-group.js +1 -1
  89. package/library/components/share-option-list.js +2 -2
  90. package/library/components/sidebar.js +1 -1
  91. package/library/components/size-input-group.js +3 -3
  92. package/library/components/spinner.js +1 -1
  93. package/library/components/split-panel.js +2 -2
  94. package/library/components/tab-group.js +4 -4
  95. package/library/components/tab.js +2 -2
  96. package/library/components/table.js +62 -60
  97. package/library/components/tag.js +2 -2
  98. package/library/components/tooltip.js +1 -1
  99. package/library/components/tree-item.js +2 -2
  100. package/library/components/tree.js +3 -3
  101. package/library/components/typeface.js +2 -2
  102. package/library/components/types.js +35403 -32971
  103. package/library/components/video.js +3 -3
  104. package/library/package.json +1 -1
  105. package/library/packages/atoms/src/animations/index.d.ts +2 -1
  106. package/library/packages/atoms/src/animations/rotating/rotate.d.ts +4 -0
  107. package/library/packages/atoms/src/components/diff/diff.d.ts +46 -0
  108. package/library/packages/atoms/src/components/diff/diff.styles.d.ts +2 -0
  109. package/library/packages/atoms/src/components/diff/utils/diff-worker-client.d.ts +10 -0
  110. package/library/packages/atoms/src/components/select/select.d.ts +9 -9
  111. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +1 -1
  112. package/library/packages/atoms/src/components/table/components/index.d.ts +1 -0
  113. package/library/packages/atoms/src/components/table/components/table-footer/table-footer.d.ts +25 -0
  114. package/library/packages/atoms/src/components/table/components/table-footer/table-footer.styles.d.ts +2 -0
  115. package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +7 -1
  116. package/library/packages/atoms/src/components/table/table.d.ts +14 -3
  117. package/library/packages/atoms/src/index.d.ts +1 -0
  118. package/library/packages/events/src/cx-capacity-change.d.ts +20 -0
  119. package/library/packages/events/src/cx-capacity-week-bar.d.ts +26 -0
  120. package/library/packages/events/src/cx-folder-select-children-loaded.d.ts +10 -0
  121. package/library/packages/events/src/cx-list-editor-change.d.ts +1 -1
  122. package/library/packages/events/src/cx-sb-dam-view-config-change.d.ts +8 -0
  123. package/library/packages/events/src/events.d.ts +4 -0
  124. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/diff.d.ts +5 -0
  125. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters.d.ts +2 -0
  126. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +19 -1
  127. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +11 -0
  128. package/library/packages/organisms/src/capacity-planner/capacity-core.d.ts +81 -0
  129. package/library/packages/organisms/src/capacity-planner/capacity-planner.d.ts +194 -0
  130. package/library/packages/organisms/src/capacity-planner/capacity-planner.styles.d.ts +2 -0
  131. package/library/packages/organisms/src/capacity-planner/components/capacity-toolbar/capacity-toolbar.d.ts +35 -0
  132. package/library/packages/organisms/src/capacity-planner/components/capacity-toolbar/capacity-toolbar.styles.d.ts +2 -0
  133. package/library/packages/organisms/src/capacity-planner/components/capacity-week-bar/capacity-week-bar.d.ts +101 -0
  134. package/library/packages/organisms/src/capacity-planner/components/capacity-week-bar/capacity-week-bar.styles.d.ts +2 -0
  135. package/library/packages/organisms/src/chatbot/chatbot.d.ts +1 -1
  136. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +12 -0
  137. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +6 -0
  138. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +66 -0
  139. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  140. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +110 -0
  141. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +3 -0
  142. package/library/packages/organisms/src/content-builder/content-builder.d.ts +1 -0
  143. package/library/packages/organisms/src/content-builder/plugins/dam-view.d.ts +5 -0
  144. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +1 -0
  145. package/library/packages/organisms/src/content-builder/styleController.d.ts +7 -3
  146. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +176 -0
  147. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.styles.d.ts +2 -0
  148. package/library/packages/organisms/src/index.d.ts +2 -0
  149. package/library/packages/services/src/api/cms5/cms5.d.ts +17 -1
  150. package/library/packages/services/src/api/endpoints.d.ts +13 -1
  151. package/library/packages/services/src/api/metadata/index.d.ts +1 -0
  152. package/library/packages/services/src/api/metadata/metadata.d.ts +3 -1
  153. package/library/packages/services/src/api/metadata/metadata.types.d.ts +53 -0
  154. package/library/packages/styles/src/table-select.styles.d.ts +2 -0
  155. package/library/packages/types/src/content-builder.d.ts +13 -5
  156. package/library/packages/types/src/dam-view.d.ts +48 -0
  157. package/library/packages/types/src/table.d.ts +17 -1
  158. package/library/packages/utils/src/custom-element/i18n.d.ts +95 -0
  159. package/library/packages/utils/src/custom-element/math.d.ts +8 -0
  160. package/library/packages/utils/src/date/index.d.ts +1 -0
  161. package/library/packages/utils/src/date/iso-week-number.d.ts +9 -0
  162. package/library/react-web-component.d.ts +545 -438
  163. package/library/utils.js +267 -253
  164. package/package.json +1 -1
  165. package/library/chunks/debounce.CIEhztrj.js +0 -97
  166. package/library/chunks/math.DqTA6ya4.js +0 -7
@@ -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.cT-FziNS.js";
4
+ import { C as Cb } from "../chunks/image.BugewF1g.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
- import { b as Ib } from "../chunks/debounce.CIEhztrj.js";
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.CH-wak_P.js";
10
+ import { L as kb } from "../chunks/i18n.DDj5y9px.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";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.117.0",
4
+ "version": "2.119.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -29,6 +29,7 @@ export * from './bouncing_exits/bounceOutDown';
29
29
  export * from './bouncing_exits/bounceOutLeft';
30
30
  export * from './bouncing_exits/bounceOutRight';
31
31
  export * from './bouncing_exits/bounceOutUp';
32
+ export { easings } from './easings/easings';
32
33
  export * from './fading_entrances/fadeIn';
33
34
  export * from './fading_entrances/fadeInBottomLeft';
34
35
  export * from './fading_entrances/fadeInBottomRight';
@@ -64,6 +65,7 @@ export * from './lightspeed/lightSpeedInLeft';
64
65
  export * from './lightspeed/lightSpeedInRight';
65
66
  export * from './lightspeed/lightSpeedOutLeft';
66
67
  export * from './lightspeed/lightSpeedOutRight';
68
+ export * from './rotating/rotate';
67
69
  export * from './rotating_entrances/rotateIn';
68
70
  export * from './rotating_entrances/rotateInDownLeft';
69
71
  export * from './rotating_entrances/rotateInDownRight';
@@ -96,4 +98,3 @@ export * from './zooming_exits/zoomOutDown';
96
98
  export * from './zooming_exits/zoomOutLeft';
97
99
  export * from './zooming_exits/zoomOutRight';
98
100
  export * from './zooming_exits/zoomOutUp';
99
- export { easings } from './easings/easings';
@@ -0,0 +1,4 @@
1
+ export declare const rotate: {
2
+ offset: number;
3
+ transform: string;
4
+ }[];
@@ -0,0 +1,46 @@
1
+ import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
2
+ import { CSSResultGroup } from 'lit';
3
+
4
+ /**
5
+ * @summary Renders a visual diff between two text or HTML values.
6
+ *
7
+ * In **auto mode** (default), pass `old-value` and `new-value` as attributes/properties.
8
+ * The component computes a word-level diff and highlights deleted text with strikethrough
9
+ * and inserted text in green.
10
+ *
11
+ * In **slot mode**, provide `slot="old"` and/or `slot="new"` children to fully control
12
+ * the rendering of each value — useful for non-text values like tags or icons.
13
+ *
14
+ * @slot old - Custom rendering for the old (deleted) value.
15
+ * @slot new - Custom rendering for the new (inserted) value.
16
+ *
17
+ * @csspart deleted - Wraps deleted content in slot mode.
18
+ * @csspart inserted - Wraps inserted content in slot mode.
19
+ *
20
+ * @cssproperty [--cx-diff-deleted-bg=var(--cx-color-neutral-200)] - Background color for deleted text.
21
+ * @cssproperty [--cx-diff-deleted-color=inherit] - Text color for deleted text.
22
+ * @cssproperty [--cx-diff-inserted-bg=var(--cx-color-success-200)] - Background color for inserted text.
23
+ * @cssproperty [--cx-diff-inserted-color=inherit] - Text color for inserted text.
24
+ * @cssproperty [--cx-diff-gap=var(--cx-spacing-2x-small)] - Gap between old and new values in slot mode.
25
+ */
26
+ export default class CxDiff extends CortexElement {
27
+ static readonly styles: CSSResultGroup;
28
+ static readonly dependencies: {};
29
+ private readonly hasSlotController;
30
+ /** The old/previous value (plain text or HTML). Used in auto mode. */
31
+ oldValue: string;
32
+ /** The new/current value (plain text or HTML). Used in auto mode. */
33
+ newValue: string;
34
+ private diffResult;
35
+ private latestRequestId;
36
+ handleValuesChange(): void;
37
+ private refreshDiff;
38
+ private renderSlotMode;
39
+ private renderAutoMode;
40
+ render(): symbol | import('lit').TemplateResult<1>;
41
+ }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ 'cx-diff': CxDiff;
45
+ }
46
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('lit').CSSResult;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Computes a word-level HTML diff between two values on a shared web worker.
3
+ *
4
+ * Every caller shares a single worker instance; requests are correlated to
5
+ * their responses by an internal id. Mounting many consumers therefore neither
6
+ * spawns multiple workers nor accumulates per-request listeners.
7
+ *
8
+ * Resolves with the diff HTML, or an empty string if the worker errors.
9
+ */
10
+ export declare function computeDiff(oldValue: string, newValue: string): Promise<string>;
@@ -70,7 +70,7 @@ export default class CxSelect extends CortexElement implements CortexFormControl
70
70
  popup: CxPopup;
71
71
  combobox: HTMLSlotElement;
72
72
  displayInput: HTMLInputElement;
73
- valueInput: HTMLInputElement;
73
+ valueInput: HTMLInputElement | null;
74
74
  listbox: HTMLSlotElement;
75
75
  private hasFocus;
76
76
  displayLabel: string;
@@ -272,6 +272,14 @@ export default class CxSelect extends CortexElement implements CortexFormControl
272
272
  * Gets the validation message
273
273
  */
274
274
  get validationMessage(): string;
275
+ /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
276
+ checkValidity(): boolean;
277
+ /** Gets the associated form, if one exists. */
278
+ getForm(): HTMLFormElement | null;
279
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
280
+ reportValidity(): boolean;
281
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
282
+ setCustomValidity(message: string): void;
275
283
  /**
276
284
  *
277
285
  * @param option The option to update the selected state
@@ -362,14 +370,6 @@ export default class CxSelect extends CortexElement implements CortexFormControl
362
370
  show(): Promise<void>;
363
371
  /** Hides the listbox. */
364
372
  hide(): Promise<void>;
365
- /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
366
- checkValidity(): boolean;
367
- /** Gets the associated form, if one exists. */
368
- getForm(): HTMLFormElement | null;
369
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
370
- reportValidity(): boolean;
371
- /** Sets a custom validation message. Pass an empty string to restore validity. */
372
- setCustomValidity(message: string): void;
373
373
  /** Sets focus on the control. */
374
374
  focus(options?: FocusOptions): void;
375
375
  /** Removes focus from the control. */
@@ -63,7 +63,7 @@ export default class CxTabGroup extends CortexElement {
63
63
  menu: CxMenu;
64
64
  tabButtons: HTMLElement;
65
65
  dropdownTrigger: CxButton;
66
- private allDots;
66
+ private readonly allDots;
67
67
  private activeTab?;
68
68
  private hasScrollControls;
69
69
  private shouldHideScrollStartButton;
@@ -1,2 +1,3 @@
1
+ export { default as CxTableFooter } from './table-footer/table-footer';
1
2
  export { default as CxTableRowActions } from './table-row-actions/table-row-actions';
2
3
  export { default as CxTableToolbar } from './table-toolbar/table-toolbar';
@@ -0,0 +1,25 @@
1
+ import { default as CortexElement } from '../../../../../../base/src/cortex-element.ts';
2
+ import { PaginationPlacement } from '../../../../../../types/src/table';
3
+ import { CSSResultGroup } from 'lit';
4
+
5
+ /**
6
+ * @summary Table footer that holds the pagination control for `bottom*` placement values.
7
+ *
8
+ * @slot pagination - The pagination control injected by `cx-table`.
9
+ *
10
+ * @csspart base - The component's host element (styled via `:host`).
11
+ */
12
+ export default class CxTableFooter extends CortexElement {
13
+ static readonly styles: CSSResultGroup;
14
+ /**
15
+ * Controls horizontal alignment of the pagination control.
16
+ * Driven by `cx-table` — consumers should not set this directly.
17
+ */
18
+ paginationPlacement: PaginationPlacement;
19
+ render(): import('lit').TemplateResult<1>;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ 'cx-table-footer': CxTableFooter;
24
+ }
25
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('lit').CSSResult;
2
+ export default _default;
@@ -10,7 +10,7 @@ import { default as CxSpace } from '../../../space/space.ts';
10
10
  import { default as CxTooltip } from '../../../tooltip/tooltip.ts';
11
11
  import { default as CxTypography } from '../../../typography/typography.ts';
12
12
  import { default as CortexElement } from '../../../../../../base/src/cortex-element.ts';
13
- import { SavedSearchItem, TableDropdownFilterData } from '../../../../../../types/src/table';
13
+ import { PaginationPlacement, SavedSearchItem, TableDropdownFilterData } from '../../../../../../types/src/table';
14
14
  import { CSSResultGroup } from 'lit';
15
15
  import { default as CxTableDropdownFilter } from './table-dropdown-filter';
16
16
  import { default as CxTableSavedSearchDropdown } from './table-saved-search-dropdown';
@@ -113,6 +113,11 @@ export default class CxTableToolbar extends CortexElement {
113
113
  */
114
114
  showSavedSearch: boolean;
115
115
  searchValue: string;
116
+ /**
117
+ * Where the pagination control is placed. Only the `top*` values render the
118
+ * paginator inside this toolbar; the value drives the header alignment.
119
+ */
120
+ paginationPlacement: PaginationPlacement;
116
121
  private handleSearchSubmit;
117
122
  private handleAdvancedSearchClick;
118
123
  private handleClearSearch;
@@ -126,6 +131,7 @@ export default class CxTableToolbar extends CortexElement {
126
131
  private renderSavedSearchDropdown;
127
132
  private renderExportDropdown;
128
133
  private renderDropdownFilters;
134
+ private renderPagination;
129
135
  render(): import('lit').TemplateResult<1>;
130
136
  }
131
137
  declare global {
@@ -9,14 +9,15 @@ 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, TableDataFormat } from '../../../../types/src/table';
12
+ import { HoverMenuOptions, PaginationPlacement, SavedSearchItem, TableClipboardAction, TableDropdownFilterData, ColumnDefinition, Options, OptionsColumns, OptionsSpreadsheet, SheetDefinition, TableDataFormat } from '../../../../types/src/table';
13
13
  import { CSSResultGroup, TemplateResult } from 'lit';
14
- import { CxTableRowActions, CxTableToolbar } from './components';
14
+ import { CxTableFooter, CxTableRowActions, CxTableToolbar } from './components';
15
15
 
16
16
  /**
17
17
  * @summary Tables are used to display data in a structured format.
18
18
  *
19
19
  * @csspart table - The table element.
20
+ * @csspart pagination-footer - The footer container that holds the pagination control when `pagination-placement` is a `bottom*` value.
20
21
  *
21
22
  * @cssproperty [--width=100%] - The width of the table.
22
23
  * @cssproperty [--table-height=auto] - The height of the table. By setting a height on the table, the Virtual DOM is enabled and the render speed is improved.
@@ -77,6 +78,7 @@ export default class CxTable extends CortexElement {
77
78
  'cx-select': typeof CxSelect;
78
79
  'cx-space': typeof CxSpace;
79
80
  'cx-spinner': typeof CxSpinner;
81
+ 'cx-table-footer': typeof CxTableFooter;
80
82
  'cx-table-row-actions': typeof CxTableRowActions;
81
83
  'cx-table-toolbar': typeof CxTableToolbar;
82
84
  };
@@ -90,6 +92,7 @@ export default class CxTable extends CortexElement {
90
92
  private readonly tabulatorElement;
91
93
  private readonly table;
92
94
  private readonly tableToolbar;
95
+ private readonly tableFooter;
93
96
  movableRows: boolean;
94
97
  movableColumns: boolean;
95
98
  data: Options['data'];
@@ -603,6 +606,10 @@ export default class CxTable extends CortexElement {
603
606
  * Whether to show the button to go the last page.
604
607
  */
605
608
  paginationShowLast: boolean;
609
+ /**
610
+ * Where to place the pagination control relative to the table.
611
+ */
612
+ paginationPlacement: PaginationPlacement;
606
613
  /**
607
614
  * The hover menu options.
608
615
  */
@@ -696,6 +703,9 @@ export default class CxTable extends CortexElement {
696
703
  private dataUrlRequestId;
697
704
  get initialized(): boolean | undefined;
698
705
  get searchValue(): string;
706
+ get isBottomPlacement(): boolean;
707
+ get showToolbarPagination(): boolean;
708
+ get showPaginationFooter(): boolean;
699
709
  get showTableToolbar(): string | boolean;
700
710
  get clipboardOption(): Options['clipboard'];
701
711
  initTable(): Promise<void>;
@@ -727,7 +737,8 @@ export default class CxTable extends CortexElement {
727
737
  handleGroupLoadMoreMetaChange(): void;
728
738
  handlePaginationSizeChange(): void;
729
739
  handlePaginationChange(): Promise<void>;
730
- private attachPaginatorToToolbar;
740
+ handlePaginationPlacementChange(): Promise<void>;
741
+ private placePaginator;
731
742
  handlePaginationInitialPageChange(): void;
732
743
  handleLoadingChange(): void;
733
744
  setLoading(value: boolean): void;
@@ -16,6 +16,7 @@ export { default as CxColorPicker } from './components/color-picker/color-picker
16
16
  export { default as CxCopyButton } from './components/copy-button/copy-button';
17
17
  export { default as CxDateCalendar } from './components/date-calendar/date-calendar';
18
18
  export { default as CxDetails } from './components/details/details';
19
+ export { default as CxDiff } from './components/diff/diff';
19
20
  export { default as CxDialog } from './components/dialog/dialog';
20
21
  export { default as CxDivider } from './components/divider/divider';
21
22
  export { default as CxDocumentViewer } from './components/document-viewer/document-viewer';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Emitted (debounced) by `cx-capacity-planner` when the user has edited one or
3
+ * more weeks. The detail carries the FULL category set for every edited week so
4
+ * the host's diff-by-(user, category, week) save create/update/deletes
5
+ * correctly within a week.
6
+ */
7
+ export type CxCapacityChangeEvent = CustomEvent<{
8
+ weeks: Array<{
9
+ allocations: Array<{
10
+ categoryId: string;
11
+ hours: number;
12
+ }>;
13
+ weekStart: string;
14
+ }>;
15
+ }>;
16
+ declare global {
17
+ interface GlobalEventHandlersEventMap {
18
+ 'cx-capacity-change': CxCapacityChangeEvent;
19
+ }
20
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Events emitted by `cx-capacity-week-bar` (a sub-component of
3
+ * `cx-capacity-planner` / `cx-team-capacity`). The week bar is purely
4
+ * presentational — it forwards pointer/keyboard intent to its container via
5
+ * these events; all allocation math lives in the container.
6
+ */
7
+ /** Fired when a resizable band is pressed (drag-to-rebalance start). */
8
+ export type CxCapacityWeekBarBandPointerDownEvent = CustomEvent<{
9
+ /** Measured pixel width of the bar element at press time (drift-proof). */
10
+ barWidth: number;
11
+ categoryId: string;
12
+ /** The originating pointer event (the container needs clientX / barW). */
13
+ pointerEvent: PointerEvent;
14
+ }>;
15
+ /** Fired when a band is stepped via the keyboard (Arrow / Page keys). */
16
+ export type CxCapacityWeekBarBandStepEvent = CustomEvent<{
17
+ categoryId: string;
18
+ /** Signed hours to apply to the grabbed band via the shared rebalance. */
19
+ deltaHours: number;
20
+ }>;
21
+ declare global {
22
+ interface GlobalEventHandlersEventMap {
23
+ 'cx-capacity-week-bar-band-pointer-down': CxCapacityWeekBarBandPointerDownEvent;
24
+ 'cx-capacity-week-bar-band-step': CxCapacityWeekBarBandStepEvent;
25
+ }
26
+ }
@@ -0,0 +1,10 @@
1
+ import { Folder } from '../../types/src/folder-select';
2
+
3
+ export type FolderSelectChildrenLoadedEvent = CustomEvent<{
4
+ folders: Folder[];
5
+ }>;
6
+ declare global {
7
+ interface GlobalEventHandlersEventMap {
8
+ 'cx-folder-select-children-loaded': FolderSelectChildrenLoadedEvent;
9
+ }
10
+ }
@@ -1,5 +1,5 @@
1
1
  export type CxListEditorChangeEvent = CustomEvent<{
2
- data: Array<Record<string, string>>;
2
+ data: Array<Record<string, unknown>>;
3
3
  }>;
4
4
  declare global {
5
5
  interface GlobalEventHandlersEventMap {
@@ -0,0 +1,8 @@
1
+ export type CxSbDamViewConfigChangeEvent = CustomEvent<{
2
+ id: string;
3
+ }>;
4
+ declare global {
5
+ interface GlobalEventHandlersEventMap {
6
+ 'cx-sb-dam-view-config-change': CxSbDamViewConfigChangeEvent;
7
+ }
8
+ }
@@ -26,6 +26,8 @@ export * from './cx-border-input-group-change';
26
26
  export * from './cx-cancel';
27
27
  export * from './cx-cancel-connection';
28
28
  export * from './cx-cancel-upload';
29
+ export * from './cx-capacity-change';
30
+ export * from './cx-capacity-week-bar';
29
31
  export * from './cx-change';
30
32
  export * from './cx-chart-plan-change';
31
33
  export * from './cx-clear';
@@ -79,6 +81,7 @@ export * from './cx-find-and-replace';
79
81
  export * from './cx-finish';
80
82
  export * from './cx-focus';
81
83
  export * from './cx-folder-select-search-term-change';
84
+ export * from './cx-folder-select-children-loaded';
82
85
  export * from './cx-gallery-chunk-request';
83
86
  export * from './cx-gallery-config-save';
84
87
  export * from './cx-gallery-item-click';
@@ -153,6 +156,7 @@ export * from './cx-rich-text-video-save';
153
156
  export * from './cx-save';
154
157
  export * from './cx-save-settings';
155
158
  export * from './cx-sb-button-click';
159
+ export * from './cx-sb-dam-view-config-change';
156
160
  export * from './cx-video-thumbnail-resolved';
157
161
  export * from './cx-search';
158
162
  export * from './cx-select';
@@ -0,0 +1,5 @@
1
+ import { DiffFormatterParams } from '../../../../../../../../types/src/table';
2
+ import { default as CellComponent } from '../../../../core/cell/CellComponent';
3
+ import { default as Format } from '../../Format';
4
+
5
+ export default function diff(this: Format, cell: CellComponent, formatterParams: DiffFormatterParams): HTMLElement | string;
@@ -6,6 +6,7 @@ import { default as color } from './formatters/color';
6
6
  import { default as composite } from './formatters/composite';
7
7
  import { default as datetime } from './formatters/datetime';
8
8
  import { default as datetimediff } from './formatters/datetimediff';
9
+ import { default as diff } from './formatters/diff';
9
10
  import { default as handle } from './formatters/handle';
10
11
  import { default as html } from './formatters/html';
11
12
  import { default as icon } from './formatters/icon';
@@ -36,6 +37,7 @@ declare const defaultFormatters: {
36
37
  composite: typeof composite;
37
38
  datetime: typeof datetime;
38
39
  datetimediff: typeof datetimediff;
40
+ diff: typeof diff;
39
41
  handle: typeof handle;
40
42
  html: typeof html;
41
43
  icon: typeof icon;
@@ -5,6 +5,7 @@ import { default as CxSelect } from '../../../atoms/src/components/select/select
5
5
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
6
6
  import { Option } from '../../../types/src/content-builder';
7
7
  import { DynamicSelectApi } from '../../../types/src/dynamic-select';
8
+ import { TableSelectColumn } from '../../../types/src/table-select';
8
9
 
9
10
  /**
10
11
  * @summary The `<cx-dynamic-select>` component is used to create a dynamic select input that can fetch options from an API.
@@ -162,6 +163,12 @@ export default class CxDynamicSelect extends CortexElement {
162
163
  */
163
164
  allowDefaultMouseDown: boolean;
164
165
  api?: DynamicSelectApi;
166
+ /**
167
+ * Column definitions for table-select mode.
168
+ * When provided, options are rendered as `<tr>` rows with the corresponding fields.
169
+ * The first column's cell text is used as the trigger label.
170
+ */
171
+ columns: TableSelectColumn[];
165
172
  useSearchTerm: boolean;
166
173
  /**
167
174
  * When set to true, the select will not select the current option when the user presses the Enter key.
@@ -197,10 +204,21 @@ export default class CxDynamicSelect extends CortexElement {
197
204
  private fetchOptions;
198
205
  handleStartChange(): Promise<void>;
199
206
  handleSearchTermChange(): Promise<void>;
207
+ handleColumnsChange(): Promise<void>;
208
+ private tableGetOptionValue;
209
+ private tableSetOptionSelected;
210
+ private tableSetOptionCurrent;
211
+ private tableGetOptionLabel;
212
+ private tableGetOptionSelected;
213
+ private tableGetOptionDisabled;
214
+ private tableFilterCallback;
215
+ private getCellValue;
216
+ private getColWidth;
200
217
  private handleInputChange;
201
218
  private handleLoadMore;
202
219
  private handleCustomChange;
203
- render(): import('lit').TemplateResult<1>;
220
+ private renderTableOptions;
221
+ render(): import('lit-html/development/directive').DirectiveResult<typeof import('lit/directives/keyed.js').Keyed>;
204
222
  }
205
223
  declare global {
206
224
  interface HTMLElementTagNameMap {
@@ -33,6 +33,12 @@ export default class CxFolderSelectTree extends CortexElement {
33
33
  data: Folder[];
34
34
  hasMore: boolean;
35
35
  loading: boolean;
36
+ /**
37
+ * Folders fetched for selected IDs not yet rendered in the tree (e.g. nested
38
+ * under an unexpanded parent). Rendered as hidden tree items so cx-select can
39
+ * show their tags before lazy loading.
40
+ */
41
+ private preloadedFolders;
36
42
  /**
37
43
  * Selected folders encoded as `${path}-${id}`. Owned by this component
38
44
  * and forwarded down to all cx-folder-select-tree-items so they can
@@ -65,7 +71,12 @@ export default class CxFolderSelectTree extends CortexElement {
65
71
  handleSelectedChange(event: CxSelectionChangeEvent<CxTreeItem>): Promise<void>;
66
72
  loadMore(event: MouseEvent): Promise<void>;
67
73
  handleFetchFolders(): Promise<void>;
74
+ handleSelectedValueChange(): Promise<void>;
68
75
  private fetchFolders;
76
+ private handleChildrenLoaded;
77
+ private removePreloadedFolders;
78
+ private preloadSelectedFolders;
79
+ private seedSelectionFromValue;
69
80
  private renderFolder;
70
81
  render(): TemplateResult;
71
82
  }
@@ -0,0 +1,81 @@
1
+ import { CapacityCategory } from '../../../types/src/capacity-planner';
2
+ import { clamp, quantizeLargestRemainder } from '../../../utils/src/custom-element/math';
3
+ import { isoWeekNumber } from '../../../utils/src/date';
4
+
5
+ export { clamp, isoWeekNumber, quantizeLargestRemainder };
6
+ /** Minimum hours a category bottoms out at when dragged down. */
7
+ export declare const FLOOR = 0.2;
8
+ /**
9
+ * Reserved id for the synthetic "Unavailable" pseudo-category. It is never
10
+ * part of the server-provided `categories` prop and is NEVER included in the
11
+ * emitted change payload — the component synthesizes it purely so the UI total
12
+ * is always exactly the weekly capacity while real categories may sum to less.
13
+ * The sentinel is deliberately collision-proof (double-underscore delimited) so
14
+ * it cannot clash with a real category id.
15
+ */
16
+ export declare const UNAVAILABLE_ID = "__unavailable__";
17
+ /** Display name for the synthetic Unavailable band. */
18
+ export declare const UNAVAILABLE_NAME = "Unavailable";
19
+ /**
20
+ * Neutral grey for the Unavailable band — a clear mid-grey from the
21
+ * design-system neutral scale (`--cx-color-neutral-400`, #A1A1AA in the light
22
+ * theme), distinct from the saturated category hues. Falls back to the literal
23
+ * when the token is unavailable (e.g. jsdom).
24
+ */
25
+ export declare const UNAVAILABLE_COLOR = "var(--cx-color-neutral-400, #A1A1AA)";
26
+ /** The weekly-capacity constraints a shared math function operates under. */
27
+ export interface CapacityConstraints {
28
+ /** Total hours available per week (C). */
29
+ capacity: number;
30
+ /** Optional per-category clamp (max hours a single REAL category may hold). */
31
+ maxHourPerCell?: number;
32
+ }
33
+ /**
34
+ * Adjust the largest non-pinned band so the total is exactly C, correcting any
35
+ * accumulated float drift. `pinned` is the index that must not be touched
36
+ * (the grabbed band on a drag); pass `-1` to allow correcting any band.
37
+ */
38
+ export declare function correctToCapacity(vals: number[], pinned: number, capacity: number): number[];
39
+ /**
40
+ * Per-band cap over the EFFECTIVE set (reals + Unavailable). The cap applies
41
+ * to REAL categories only — the synthetic Unavailable band (always the LAST
42
+ * effective band) is uncapped. The cap is ignored only when it is non-positive.
43
+ *
44
+ * `n` is the number of EFFECTIVE bands.
45
+ */
46
+ export declare function effectiveCapFor(index: number, n: number, maxHourPerCell?: number): number;
47
+ /**
48
+ * Distribute a `pool` of hours (the amount above all per-band floor baselines)
49
+ * across the bands at `indices`, proportional to `weightFor(j)`, writing the
50
+ * result into `vals[j]`. Implemented as a capped water-fill: whenever a band
51
+ * would exceed `capFor(j)`, it is pinned at its cap and its surplus spills onto
52
+ * the still-uncapped bands. Each band gets at least `floorFor(j)`. This is the
53
+ * ONE implementation shared by `rebalance` and the copy/fill/paste normalize so
54
+ * the cap behaviour cannot diverge between drag and copy.
55
+ */
56
+ export declare function cappedWaterFill(vals: number[], indices: number[], pool: number, capFor: (index: number) => number, floorFor: (index: number) => number, weightFor: (index: number) => number): void;
57
+ /**
58
+ * Normalize a source's REAL allocations into a written week under the
59
+ * Unavailable model. Real values are preserved verbatim (clamped ≥ 0), the
60
+ * synthetic Unavailable band absorbs the slack so the total is exactly C, and
61
+ * `maxHourPerCell` is enforced on the REAL categories only (a real that exceeds
62
+ * the cap spills its surplus onto the under-cap reals; the leftover still lands
63
+ * in Unavailable). A real category legitimately sitting at 0 stays 0, so a
64
+ * real-only week round-trips its values exactly. Routes copy / fill / paste.
65
+ * Returns a FULL effective map (reals + Unavailable).
66
+ */
67
+ export declare function normalizeWeekToCapacity(allocations: Record<string, number>, categories: CapacityCategory[], { capacity, maxHourPerCell }: CapacityConstraints): Record<string, number>;
68
+ /**
69
+ * Proportional rebalance for a drag on EFFECTIVE band `catIndex` (the reals
70
+ * followed by the synthetic Unavailable band). Grows/shrinks the grabbed band
71
+ * by the drag distance (`deltaHours`) and distributes the inverse change across
72
+ * the other bands — INCLUDING Unavailable — in proportion to their drag-start
73
+ * snapshot, never below FLOOR and never above `maxHourPerCell` (Unavailable is
74
+ * uncapped). The total is always exactly C. Implemented as a capped water-fill:
75
+ * the surplus from any band that hits its cap spills onto the uncapped bands.
76
+ *
77
+ * `snap` is the FULL effective snapshot (reals + Unavailable, Unavailable last).
78
+ */
79
+ export declare function rebalance(snap: number[], catIndex: number, deltaHours: number, { capacity, maxHourPerCell }: CapacityConstraints): number[];
80
+ /** Stable deterministic palette color for a category with no explicit color. */
81
+ export declare function colorForCategory(id: string, index: number): string;