@orangelogic/design-system 4.23.0 → 4.24.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 (159) hide show
  1. package/library/chunks/{alert.C-yzkTnx.js → alert.CuW7fOVy.js} +2 -2
  2. package/library/chunks/{array-line-clamp.Dtctfov9.js → array-line-clamp.Cs-rr4fT.js} +2 -2
  3. package/library/chunks/{asset-link-format.B-wi80wk.js → asset-link-format.D1u9Ot34.js} +9 -9
  4. package/library/chunks/{audio.CCM7gWK9.js → audio.BZJvTs_4.js} +2 -2
  5. package/library/chunks/{bicolor-picker.C24I8uyM.js → bicolor-picker.CJcbV2J-.js} +1 -1
  6. package/library/chunks/{block-width.Bz5EzBCs.js → block-width.WvrvegT9.js} +33 -33
  7. package/library/chunks/{border-input-group.BVEBWVeb.js → border-input-group.B1DtY6Ta.js} +3 -3
  8. package/library/chunks/{breadcrumb.CtZqzMBY.js → breadcrumb.qggcceb5.js} +1 -1
  9. package/library/chunks/{button.F15zfy2d.js → button.CI1tg4c9.js} +2 -2
  10. package/library/chunks/{color-picker.ykjO8Amy.js → color-picker.BoE5DUtr.js} +10 -10
  11. package/library/chunks/{color-swatch-group.DGDHKClr.js → color-swatch-group.CRrt23hy.js} +17 -17
  12. package/library/chunks/{color-swatch.D7dE-Qmf.js → color-swatch.CZv1XRXW.js} +3 -3
  13. package/library/chunks/{config-manager.zxgzNp3h.js → config-manager.D2U07uI4.js} +27 -27
  14. package/library/chunks/{configs-controller._cPlX4cC.js → configs-controller.CMWC6o1N.js} +337 -336
  15. package/library/chunks/{confirm-popover.DfSlgI9c.js → confirm-popover.DtgOWnvv.js} +4 -4
  16. package/library/chunks/{copy-button.DXNp4KvI.js → copy-button.kjSil5XI.js} +2 -2
  17. package/library/chunks/{corner-position-input-group.BVPOtopa.js → corner-position-input-group.EbVmXfuB.js} +4 -4
  18. package/library/chunks/{date-calendar.Dobpjwzs.js → date-calendar.UWxXkZCn.js} +1 -1
  19. package/library/chunks/{details.DRv08ocO.js → details.DLqFxjTf.js} +1 -1
  20. package/library/chunks/dialog.qaRoY3_s.js +1673 -0
  21. package/library/chunks/{document-viewer.j2AHXi5D.js → document-viewer.DNfJOtnX.js} +13 -13
  22. package/library/chunks/{dot-pagination.rTg08FAr.js → dot-pagination.BK2ppZ1A.js} +2 -2
  23. package/library/chunks/{drawer.rdGcXxzU.js → drawer.tfa9-G6a.js} +2 -2
  24. package/library/chunks/{dropdown.BFiWUTAN.js → dropdown.f2Kaf3fL.js} +4 -4
  25. package/library/chunks/{dynamic-select.C7bnEwn9.js → dynamic-select.CMw_RQ3b.js} +5 -5
  26. package/library/chunks/{e-chart.JrYFPEVr.js → e-chart.BopkVc04.js} +2 -2
  27. package/library/chunks/{element-clamp.CBWUv4n2.js → element-clamp.DIUYu8kK.js} +2 -2
  28. package/library/chunks/{file-on-demand.CurXWiIV.js → file-on-demand.C6a1aIG5.js} +16 -16
  29. package/library/chunks/{folder-select.DZ27acgw.js → folder-select.DuQBEXAx.js} +7 -7
  30. package/library/chunks/{format-time.Dx24Hlhc.js → format-time.BO9Y72qk.js} +1 -1
  31. package/library/chunks/{header.Ny2fWwyt.js → header.GBQ0uRU9.js} +2 -2
  32. package/library/chunks/{i18n.CpiuF-f4.js → i18n.BMXeDUpk.js} +1 -1
  33. package/library/chunks/{icon-button.8OdZOZsM.js → icon-button.CziUJUiX.js} +2 -2
  34. package/library/chunks/{iframe.C3N5F3yF.js → iframe.BnAR2-o2.js} +1 -1
  35. package/library/chunks/{image-comparer.Txi69uYU.js → image-comparer.DStatUUS.js} +1 -1
  36. package/library/chunks/{image.BjLoAnzR.js → image.CTiMflL8.js} +2 -2
  37. package/library/chunks/{input.HC75Gdv_.js → input.B3HfssSr.js} +1 -1
  38. package/library/chunks/{line-clamp.DUw4HDNG.js → line-clamp.CNik5DMZ.js} +2 -2
  39. package/library/chunks/{markdown.CFxeg159.js → markdown.C-q35PEY.js} +2 -2
  40. package/library/chunks/{masonry.MH1B7um_.js → masonry.DuxgFely.js} +3 -3
  41. package/library/chunks/{menu-item.DUN2x8Dd.js → menu-item.DBDWACZq.js} +3 -3
  42. package/library/chunks/{menu.D8EA_jFw.js → menu.CmCugaR_.js} +7 -3
  43. package/library/chunks/{option.B9yDGHPh.js → option.wsYX6Pp-.js} +1 -1
  44. package/library/chunks/{padding-input-group.DYHH1M0o.js → padding-input-group.DKIv6567.js} +1 -1
  45. package/library/chunks/{pagination.DofSI_W0.js → pagination.C8PXfYv0.js} +7 -7
  46. package/library/chunks/{popup.j2x8VdwB.js → popup.BzvyCsl2.js} +1 -1
  47. package/library/chunks/{position-picker.B3klGTsy.js → position-picker.CyXlSYCi.js} +1 -1
  48. package/library/chunks/{progress-bar.Br8Zi53n.js → progress-bar.Cp8jz3Cn.js} +1 -1
  49. package/library/chunks/{progress-ring.DjiHa9Bf.js → progress-ring.CMylJgKR.js} +1 -1
  50. package/library/chunks/{radio-card.DiC0-MMO.js → radio-card.Fz-PhWRZ.js} +1 -1
  51. package/library/chunks/{range.GRVgbJ_H.js → range.BgWk4zvl.js} +2 -2
  52. package/library/chunks/{rating.BqmvLuxp.js → rating.C-3rSMOT.js} +1 -1
  53. package/library/chunks/{relative-time.Tmj08T5g.js → relative-time.5fu63h4C.js} +1 -1
  54. package/library/chunks/{select.jlSyzF3u.js → select.B2NKCXGR.js} +6 -6
  55. package/library/chunks/{shadow-input-group.B8L8Zf9v.js → shadow-input-group.Dbs776dL.js} +2 -2
  56. package/library/chunks/{share-option-list.CP5eOort.js → share-option-list.DxQkZli1.js} +2 -2
  57. package/library/chunks/{sidebar.C7hLNDp-.js → sidebar.CDTaDQY_.js} +1 -1
  58. package/library/chunks/{size-input-group.D9EWFcr7.js → size-input-group.CeykT9QX.js} +5 -5
  59. package/library/chunks/{spinner.DXFJTymk.js → spinner.-79sJ3oo.js} +1 -1
  60. package/library/chunks/{split-panel.Bmfk4xJd.js → split-panel.DE2NmORY.js} +1 -1
  61. package/library/chunks/{src.BdGU064c.js → src.CFN9cg1F.js} +47 -47
  62. package/library/chunks/{step.cuzMbPuk.js → step.rqfqMxqi.js} +3 -3
  63. package/library/chunks/{stepper-wizard.Diwy_209.js → stepper-wizard.B52n6f8y.js} +2 -2
  64. package/library/chunks/{stepper.I6c9SSti.js → stepper.BcDcCwpI.js} +1 -1
  65. package/library/chunks/{tab-group.CuP7qBU8.js → tab-group.ROPBx4C0.js} +7 -7
  66. package/library/chunks/{tab.DrD0Ii5J.js → tab.BNnTFHDM.js} +3 -3
  67. package/library/chunks/{tag.BEHzfhc1.js → tag.LmkuK_d9.js} +3 -3
  68. package/library/chunks/{tooltip.EVa9qa8X.js → tooltip.CYPd2P_x.js} +2 -2
  69. package/library/chunks/{tree.B62nSrIi.js → tree.frUyPiZc.js} +3 -3
  70. package/library/chunks/{typeface.BrqvkPV7.js → typeface.BHdk69gz.js} +3 -3
  71. package/library/chunks/{video.DhZIlWXu.js → video.Ci7-upS9.js} +2 -2
  72. package/library/components/alert.js +1 -1
  73. package/library/components/array-line-clamp.js +1 -1
  74. package/library/components/asset-link-format.js +1 -1
  75. package/library/components/atoms.js +48 -48
  76. package/library/components/audio.js +1 -1
  77. package/library/components/bicolor-picker.js +1 -1
  78. package/library/components/border-input-group.js +1 -1
  79. package/library/components/breadcrumb.js +1 -1
  80. package/library/components/button.js +1 -1
  81. package/library/components/color-picker.js +1 -1
  82. package/library/components/color-swatch-group.js +1 -1
  83. package/library/components/color-swatch.js +1 -1
  84. package/library/components/confirm-popover.js +1 -1
  85. package/library/components/copy-button.js +1 -1
  86. package/library/components/corner-position-input-group.js +1 -1
  87. package/library/components/date-calendar.js +1 -1
  88. package/library/components/details.js +1 -1
  89. package/library/components/dialog.js +1 -1
  90. package/library/components/document-viewer.js +1 -1
  91. package/library/components/dot-pagination.js +1 -1
  92. package/library/components/drawer.js +1 -1
  93. package/library/components/dropdown.js +1 -1
  94. package/library/components/dynamic-select.js +1 -1
  95. package/library/components/e-chart.js +1 -1
  96. package/library/components/element-clamp.js +1 -1
  97. package/library/components/file-on-demand.js +1 -1
  98. package/library/components/folder-select.js +1 -1
  99. package/library/components/format-bytes.js +1 -1
  100. package/library/components/format-date.js +1 -1
  101. package/library/components/format-number.js +1 -1
  102. package/library/components/format-time.js +1 -1
  103. package/library/components/header.js +1 -1
  104. package/library/components/icon-button.js +1 -1
  105. package/library/components/iframe.js +1 -1
  106. package/library/components/image-comparer.js +1 -1
  107. package/library/components/image.js +1 -1
  108. package/library/components/input.js +1 -1
  109. package/library/components/line-clamp.js +1 -1
  110. package/library/components/markdown.js +1 -1
  111. package/library/components/masonry.js +1 -1
  112. package/library/components/menu-item.js +1 -1
  113. package/library/components/menu.js +1 -1
  114. package/library/components/molecules.js +16 -16
  115. package/library/components/option.js +1 -1
  116. package/library/components/organisms.js +3 -3
  117. package/library/components/padding-input-group.js +1 -1
  118. package/library/components/pagination.js +1 -1
  119. package/library/components/popup.js +1 -1
  120. package/library/components/position-picker.js +1 -1
  121. package/library/components/progress-bar.js +1 -1
  122. package/library/components/progress-ring.js +1 -1
  123. package/library/components/radio-card.js +1 -1
  124. package/library/components/range.js +1 -1
  125. package/library/components/rating.js +1 -1
  126. package/library/components/relative-time.js +1 -1
  127. package/library/components/select.js +1 -1
  128. package/library/components/shadow-input-group.js +1 -1
  129. package/library/components/share-option-list.js +1 -1
  130. package/library/components/sidebar.js +1 -1
  131. package/library/components/size-input-group.js +1 -1
  132. package/library/components/spinner.js +1 -1
  133. package/library/components/split-panel.js +1 -1
  134. package/library/components/step.js +1 -1
  135. package/library/components/stepper-wizard.js +1 -1
  136. package/library/components/stepper.js +1 -1
  137. package/library/components/tab-group.js +1 -1
  138. package/library/components/tab.js +1 -1
  139. package/library/components/tag.js +1 -1
  140. package/library/components/tooltip.js +1 -1
  141. package/library/components/tree-item.js +1 -1
  142. package/library/components/tree.js +1 -1
  143. package/library/components/typeface.js +1 -1
  144. package/library/components/types.js +6918 -6881
  145. package/library/components/video.js +1 -1
  146. package/library/package.json +1 -1
  147. package/library/packages/atoms/src/components/menu/menu.d.ts +1 -0
  148. package/library/packages/events/src/cx-capacity-week-bar.d.ts +2 -2
  149. package/library/packages/organisms/src/capacity-planner/capacity-core.d.ts +16 -19
  150. package/library/packages/organisms/src/capacity-planner/capacity-planner.d.ts +39 -17
  151. package/library/packages/organisms/src/capacity-planner/components/capacity-week-bar/capacity-week-bar.d.ts +51 -26
  152. package/library/packages/organisms/src/comment/comment.d.ts +5 -0
  153. package/library/packages/organisms/src/content-builder/configs/dam-view-panel-options.d.ts +12 -0
  154. package/library/packages/organisms/src/space-selector/space-selector.d.ts +2 -0
  155. package/library/packages/services/src/api/cms5/cms5.d.ts +1 -0
  156. package/library/react-web-component.d.ts +1 -1
  157. package/library/utils.js +1 -1
  158. package/package.json +1 -1
  159. package/library/chunks/dialog.DyVvpdaY.js +0 -1672
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/video.DhZIlWXu.js";
1
+ import { n as e, t } from "../chunks/video.Ci7-upS9.js";
2
2
  export { t as VIDEO_BACKGROUND_SIZE_BY_OBJECT_FIT, e as default };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "4.23.0",
4
+ "version": "4.24.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -49,6 +49,7 @@ export default class CxMenu extends CortexElement {
49
49
  runFirstUpdated(): void;
50
50
  private handleClick;
51
51
  private handleKeyDown;
52
+ private handleMouseDown;
52
53
  private handleSlotChange;
53
54
  /** Sets `tabindex="0"` on the selected item (`checked`/`active`), or the first item if none is selected. */
54
55
  private syncTabIndexToSelection;
@@ -4,7 +4,7 @@
4
4
  * presentational — it forwards pointer/keyboard intent to its container via
5
5
  * these events; all allocation math lives in the container.
6
6
  */
7
- /** Fired when a resizable band is pressed (drag-to-rebalance start). */
7
+ /** Fired when a resizable band is pressed (drag-to-resize start). */
8
8
  export type CxCapacityWeekBarBandPointerDownEvent = CustomEvent<{
9
9
  /** Measured pixel width of the bar element at press time (drift-proof). */
10
10
  barWidth: number;
@@ -15,7 +15,7 @@ export type CxCapacityWeekBarBandPointerDownEvent = CustomEvent<{
15
15
  /** Fired when a band is stepped via the keyboard (Arrow / Page keys). */
16
16
  export type CxCapacityWeekBarBandStepEvent = CustomEvent<{
17
17
  categoryId: string;
18
- /** Signed hours to apply to the grabbed band via the shared rebalance. */
18
+ /** Signed hours to apply to the stepped band only (the container clamps it). */
19
19
  deltaHours: number;
20
20
  }>;
21
21
  declare global {
@@ -2,7 +2,7 @@ import { CapacityCategory } from '../../../types/src/capacity-planner';
2
2
  import { clamp, quantizeLargestRemainder } from '../../../utils/src/custom-element/math';
3
3
  import { isoWeekNumber } from '../../../utils/src/date';
4
4
  export { clamp, isoWeekNumber, quantizeLargestRemainder };
5
- /** Minimum hours a category bottoms out at when dragged down. */
5
+ /** Minimum hours an active category bottoms out at when edited down. */
6
6
  export declare const FLOOR = 0.2;
7
7
  /**
8
8
  * Reserved id for the synthetic "Unavailable" pseudo-category. It is never
@@ -29,12 +29,6 @@ export interface CapacityConstraints {
29
29
  /** Optional per-category clamp (max hours a single REAL category may hold). */
30
30
  maxHourPerCell?: number;
31
31
  }
32
- /**
33
- * Adjust the largest non-pinned band so the total is exactly C, correcting any
34
- * accumulated float drift. `pinned` is the index that must not be touched
35
- * (the grabbed band on a drag); pass `-1` to allow correcting any band.
36
- */
37
- export declare function correctToCapacity(vals: number[], pinned: number, capacity: number): number[];
38
32
  /**
39
33
  * Per-band cap over the EFFECTIVE set (reals + Unavailable). The cap applies
40
34
  * to REAL categories only — the synthetic Unavailable band (always the LAST
@@ -48,9 +42,8 @@ export declare function effectiveCapFor(index: number, n: number, maxHourPerCell
48
42
  * across the bands at `indices`, proportional to `weightFor(j)`, writing the
49
43
  * result into `vals[j]`. Implemented as a capped water-fill: whenever a band
50
44
  * would exceed `capFor(j)`, it is pinned at its cap and its surplus spills onto
51
- * the still-uncapped bands. Each band gets at least `floorFor(j)`. This is the
52
- * ONE implementation shared by `rebalance` and the copy/fill/paste normalize so
53
- * the cap behaviour cannot diverge between drag and copy.
45
+ * the still-uncapped bands. Each band gets at least `floorFor(j)`. Used by the
46
+ * copy/fill/paste normalize (`normalizeWeekToCapacity`) to enforce the cap.
54
47
  */
55
48
  export declare function cappedWaterFill(vals: number[], indices: number[], pool: number, capFor: (index: number) => number, floorFor: (index: number) => number, weightFor: (index: number) => number): void;
56
49
  /**
@@ -65,16 +58,20 @@ export declare function cappedWaterFill(vals: number[], indices: number[], pool:
65
58
  */
66
59
  export declare function normalizeWeekToCapacity(allocations: Record<string, number>, categories: CapacityCategory[], { capacity, maxHourPerCell }: CapacityConstraints): Record<string, number>;
67
60
  /**
68
- * Proportional rebalance for a drag on EFFECTIVE band `catIndex` (the reals
69
- * followed by the synthetic Unavailable band). Grows/shrinks the grabbed band
70
- * by the drag distance (`deltaHours`) and distributes the inverse change across
71
- * the other bands — INCLUDING Unavailable — in proportion to their drag-start
72
- * snapshot, never below FLOOR and never above `maxHourPerCell` (Unavailable is
73
- * uncapped). The total is always exactly C. Implemented as a capped water-fill:
74
- * the surplus from any band that hits its cap spills onto the uncapped bands.
61
+ * Independent edit of ONE real category on EFFECTIVE band `catIndex` (the reals
62
+ * followed by the synthetic Unavailable band). Only the edited band and
63
+ * Unavailable change; every other band is returned exactly as it was in `snap`.
64
+ *
65
+ * - An increase takes only spare hours (what Unavailable holds), up to the
66
+ * band's cap (`maxHourPerCell`).
67
+ * - A decrease returns the hours to Unavailable. An active band (≥ FLOOR)
68
+ * bottoms at FLOOR, and a result in (0, FLOOR) snaps to 0.
69
+ * - Data already over the cap or over capacity can shrink but never grow.
70
+ * - Editing Unavailable itself returns the snapshot unchanged.
75
71
  *
76
- * `snap` is the FULL effective snapshot (reals + Unavailable, Unavailable last).
72
+ * `snap` is the FULL effective snapshot (reals + Unavailable, Unavailable last);
73
+ * its values are ≥ 0.
77
74
  */
78
- export declare function rebalance(snap: number[], catIndex: number, deltaHours: number, { capacity, maxHourPerCell }: CapacityConstraints): number[];
75
+ export declare function adjustBand(snap: number[], catIndex: number, deltaHours: number, { capacity, maxHourPerCell }: CapacityConstraints): number[];
79
76
  /** Stable deterministic palette color for a category with no explicit color. */
80
77
  export declare function colorForCategory(id: string, index: number): string;
@@ -13,20 +13,19 @@ export type CapacityEditMode = 'adjust' | 'copy';
13
13
  /**
14
14
  * @summary Individual weekly capacity planner. Each week distributes a fixed
15
15
  * weekly capacity across work categories as a horizontal bar of colored bands.
16
- * Users either drag a band to rebalance the split or copy whole weeks across a
17
- * range. A reserved, component-synthesized "Unavailable" (grey) band fills
18
- * each week up to the weekly capacity, so the UI total is ALWAYS exactly the
19
- * capacity while the REAL categories may sum to LESS. Dragging any band
20
- * (including Unavailable) rebalances proportionally against the others; an
21
- * empty week renders as 100% Unavailable with the real bands at 0 shown as
22
- * grabbable FLOOR-width slivers. Hours are floats internally and rounded only
23
- * for display/save. The Unavailable band is NEVER saved: edits emit a
24
- * debounced `cx-capacity-change` carrying ONLY the real categories for each
25
- * edited week, with integer hours (largest-remainder) that sum to
26
- * round(capacity) − round(unavailable) and match the visible labels.
27
- * Read `currentWeeks` to save the complete live allocation snapshot immediately,
28
- * including edits whose change event has not emitted yet. Untouched weeks keep
29
- * their original fractional hours; edited weeks match the integer labels.
16
+ * Users either drag (or arrow-key) a category band to change its hours or copy
17
+ * whole weeks across a range. A reserved, component-synthesized "Unavailable"
18
+ * (grey) band fills each week up to the weekly capacity, so the UI total is
19
+ * ALWAYS exactly the capacity while the REAL categories may sum to LESS.
20
+ * Editing one category only moves that category and Unavailable, which is
21
+ * derived and cannot be edited. Hours are rounded for display/save. The
22
+ * Unavailable band is NEVER saved: edits emit a debounced `cx-capacity-change`
23
+ * carrying ONLY the real categories for each edited week, with integer hours
24
+ * (largest-remainder) that sum to round(capacity) − round(unavailable) and
25
+ * match the visible labels. Read `currentWeeks` to save the complete live
26
+ * allocation snapshot immediately, including edits whose change event has not
27
+ * emitted yet. Untouched weeks keep their original fractional hours; edited
28
+ * weeks match the integer labels.
30
29
  *
31
30
  * @event {{ weeks: Array<{ weekStart: string, allocations: Array<{ categoryId: string, hours: number }> }> }} cx-capacity-change - Debounced (~1000ms) emit of every edited week's REAL category allocations (integer hours; the unallocated remainder is implicit and the synthetic Unavailable band is never included).
32
31
  */
@@ -64,8 +63,11 @@ export default class CxCapacityPlanner extends CortexElement {
64
63
  private filling;
65
64
  private fillToW;
66
65
  private copyMsg;
66
+ /** Measured width of a week bar (px); a fallback for the bars' own sizing. */
67
67
  private barWidth;
68
68
  private readonly scrollEl;
69
+ /** The first week bar; every week bar has the same width. */
70
+ private readonly rowBarEl;
69
71
  /**
70
72
  * Live plan: plan[weekIndex] = { categoryId -> hours } as floats. This is a
71
73
  * plain field (not reactive) because it mutates many times per drag frame; we
@@ -86,6 +88,7 @@ export default class CxCapacityPlanner extends CortexElement {
86
88
  constructor();
87
89
  runConnectedCallback(): void;
88
90
  disconnectedCallback(): void;
91
+ runFirstUpdated(): void;
89
92
  /**
90
93
  * Detached snapshot of all weeks, available synchronously before and after
91
94
  * `cx-capacity-change`. Edited weeks use the same integer hours as that event;
@@ -140,17 +143,31 @@ export default class CxCapacityPlanner extends CortexElement {
140
143
  */
141
144
  private get capacityConstraints();
142
145
  private clamp;
143
- private correctToCapacity;
144
146
  private effectiveCapFor;
145
147
  private cappedWaterFill;
146
148
  private normalizeWeekToCapacity;
147
- private rebalance;
149
+ private adjustBand;
150
+ /** Live float hours of a week over the effective set (reals + Unavailable). */
151
+ private weekValues;
152
+ /**
153
+ * Starting point for a band edit: the week snapped to its DISPLAYED integers
154
+ * (reals = the largest-remainder labels, Unavailable = C − Σreals). Editing
155
+ * one category then only moves that category and Unavailable, so leftover
156
+ * fractions in legacy data cannot flip the label of another category.
157
+ */
158
+ private editSnapshot;
148
159
  private writeWeek;
149
160
  private copyWeek;
150
161
  private markDirty;
151
162
  private scheduleEmit;
152
163
  private emitChange;
153
164
  private scheduleRender;
165
+ /**
166
+ * Cache the real width of a week bar as the `bar-width` fallback. The bars
167
+ * size their bands in CSS and measure themselves, and a drag snapshots the
168
+ * live bar width on pointer-down, so this value only matters before a bar
169
+ * has measured itself.
170
+ */
154
171
  private measure;
155
172
  private handleResize;
156
173
  private bandsForWeek;
@@ -158,10 +175,15 @@ export default class CxCapacityPlanner extends CortexElement {
158
175
  /** Read the week index from the `data-week-index` attr on the event target. */
159
176
  private weekIndexFromEvent;
160
177
  private handleBandPointerDown;
161
- /** Keyboard step on a band — routed through the SAME rebalance + emit. */
178
+ /** Keyboard step on a band — routed through the SAME adjustBand + emit. */
162
179
  private handleBandStep;
163
180
  private handlePointerMove;
164
181
  private handlePointerUp;
182
+ /**
183
+ * Snap a dragged week to the whole hours its labels show; keyboard edits
184
+ * already are.
185
+ */
186
+ private snapWeekToLabels;
165
187
  private weekFromY;
166
188
  private handleScrollPointerDown;
167
189
  private handleFillPointerDown;
@@ -12,7 +12,12 @@ export interface CapacityBand {
12
12
  categoryName: string;
13
13
  /** Background color (already resolved to a concrete CSS color). */
14
14
  color: string;
15
- /** Hours for this band — used as the flex-grow weight and aria-valuenow. */
15
+ /**
16
+ * Hours derived from the other bands (the synthetic "Unavailable" band): never
17
+ * a slider, even on a `resizable` bar, and it fills whatever the others leave.
18
+ */
19
+ derived?: boolean;
20
+ /** Hours for this band; a real band is `hours / capacity` of the bar wide. */
16
21
  hours: number;
17
22
  /** Full label text, e.g. "12h · Reviews". */
18
23
  label: string;
@@ -20,21 +25,24 @@ export interface CapacityBand {
20
25
  shortLabel: string;
21
26
  /** Tooltip text, e.g. "Reviews · 12h" (set when no inline label fits). */
22
27
  tip: string;
23
- /**
24
- * When true the band ignores `maxHourPerCell` for its slider ceiling (used by
25
- * the synthetic "Unavailable" band, which is uncapped). Optional; defaults
26
- * to capped behaviour.
27
- */
28
- uncapped?: boolean;
29
28
  }
30
29
  /**
31
- * @summary Presentational capacity bar: a flex row of category bands sized by
32
- * hours. All mutation/allocation logic lives in the `cx-capacity-planner`
33
- * container — this component only renders bands and forwards pointer/keyboard
34
- * intent. When `resizable`, bands are exposed as ARIA sliders (keyboard +
35
- * screen-reader accessible, mirroring `cx-range`). Every week always has bands
36
- * (the container synthesizes a grey "Unavailable" band that fills the week up
37
- * to capacity), so there is no empty/unplanned track to special-case.
30
+ * @summary Presentational capacity bar: a row of category bands on a FIXED
31
+ * scale. A real band is exactly `hours / capacity` of the bar wide, so the same
32
+ * hours give the same length in every week and at every position; a `derived`
33
+ * band (the grey "Unavailable" band the container synthesizes) fills the rest
34
+ * and shrinks to nothing when the week is full. All mutation/allocation logic
35
+ * lives in the `cx-capacity-planner` container — this component only renders
36
+ * bands and forwards pointer/keyboard intent. When `resizable`, real bands are
37
+ * exposed as ARIA sliders (mirroring `cx-range`); a 0-hour one stays focusable
38
+ * and is grabbed through a small handle outside the flow. Data over the
39
+ * capacity is clipped at the right edge, marked with a thin danger-coloured
40
+ * line.
41
+ *
42
+ * @cssproperty [--cx-capacity-bar-height=22px] - Height of the bar.
43
+ * @cssproperty [--cx-capacity-bar-radius=6px] - Corner radius of the bar.
44
+ * @cssproperty --cx-capacity-track-bg - Background of the track behind the bands.
45
+ * @cssproperty [--cx-capacity-zero-handle-width=10px] - Width of the grab handle shown for a 0-hour band.
38
46
  *
39
47
  * @event {{ barWidth: number, categoryId: string, pointerEvent: PointerEvent }} cx-capacity-week-bar-band-pointer-down - Fired when a resizable band is pressed.
40
48
  * @event {{ categoryId: string, deltaHours: number }} cx-capacity-week-bar-band-step - Fired when a band is stepped via the keyboard.
@@ -50,18 +58,22 @@ export default class CxCapacityWeekBar extends CortexElement {
50
58
  barWidth: number;
51
59
  /** Total weekly capacity (C). The bands always sum to it (incl. Unavailable). */
52
60
  capacity: number;
53
- /** Per-band slider floor (lowest hours a band may hold). */
61
+ /**
62
+ * Kept for backward compatibility; it no longer affects layout. Band widths
63
+ * follow the fixed `hours / capacity` scale, and a 0-hour band on a resizable
64
+ * bar is grabbed through its handle rather than a floor-width sliver.
65
+ */
54
66
  floor: number;
55
67
  /** Optional per-band slider ceiling (max hours a single band may hold). */
56
68
  maxHourPerCell?: number;
57
- /** Whether bands are resizable (drag-to-rebalance / keyboard steppable). */
69
+ /** Whether non-derived bands are resizable (draggable / keyboard steppable). */
58
70
  resizable: boolean;
59
71
  /**
60
- * When true, a band with 0 hours renders at 0px width (no FLOOR-clamped grab
61
- * sliver). For read-only displays (e.g. the team grid's mini-bars) there is no
62
- * need for a draggable zone, so a 0-hours category should simply not show.
63
- * Defaults false — the resizable planner/zoom bars keep the FLOOR-width grab
64
- * sliver so a 0-hours category stays clickable to grow back.
72
+ * When true, a band with 0 hours is removed from the accessibility tree and
73
+ * gets no grab handle, so a 0-hours category simply does not show — for
74
+ * read-only displays (e.g. mini-bars) where there is nothing to drag. Every
75
+ * 0-hour band is 0px wide either way; defaults false, so on a resizable bar a
76
+ * 0-hours category keeps its handle and stays grabbable to grow back.
65
77
  */
66
78
  collapseZeroBands: boolean;
67
79
  /** Px width threshold above which the full "{h}h · {name}" label is shown. */
@@ -70,6 +82,11 @@ export default class CxCapacityWeekBar extends CortexElement {
70
82
  shortLabelThreshold: number;
71
83
  private readonly barEl;
72
84
  private summary;
85
+ /** Hours not held by an editable band: capacity − Σ non-derived hours (≥ 0). */
86
+ private spareHours;
87
+ /** True when the editable bands hold more than the capacity (clipped data). */
88
+ private overCapacity;
89
+ /** Display geometry of each band, parallel to `bands`. */
73
90
  private geometries;
74
91
  /** Actual rendered width of the bar element, updated by ResizeObserver. */
75
92
  renderedBarWidth: number;
@@ -89,13 +106,21 @@ export default class CxCapacityWeekBar extends CortexElement {
89
106
  * `render` so the tip shows/hides in exact sync with the inline label (and so
90
107
  * the tip text tracks a band being resized under a captured pointer).
91
108
  *
92
- * In `collapseZeroBands` (read-only display) mode a 0-hours category renders at
93
- * 0px (no grab sliver needed — nothing to drag). Otherwise the DISPLAY width is
94
- * clamped to a FLOOR-equivalent minimum so a category at 0 (or below FLOOR)
95
- * still renders as a grabbable band, while its label/saved value stay the true
96
- * (quantized) hours.
109
+ * Every band is on the same fixed scale, so the label thresholds see the
110
+ * band's real width. A real 0-hour band on a resizable bar is `zero` (0px,
111
+ * grabbed through its handle); in `collapseZeroBands` mode a 0-hour band is
112
+ * `collapsed` instead.
97
113
  */
98
114
  private bandGeometry;
115
+ /**
116
+ * Place the handle of every `zero` band, writing `zeroIndex` / `zeroAtEnd`
117
+ * into `geometries`. Consecutive 0-hour handles would all sit on the same
118
+ * spot, so each run of them gets increasing indices and the handles are laid
119
+ * side by side. A run that starts at (or past) the right edge of the bar is
120
+ * drawn leftwards instead, so the edge does not clip it. Bands that take no
121
+ * width (other 0-hour bands) do not break a run.
122
+ */
123
+ private placeZeroHandles;
99
124
  private renderBand;
100
125
  render(): TemplateResult;
101
126
  }
@@ -179,6 +179,11 @@ export default class CxComment<TCommentMenu extends CxCommentMenu = CxCommentMen
179
179
  private handleCommentMousedown;
180
180
  handleEditableChange(): void;
181
181
  handlePlaceholderChange(): void;
182
+ /**
183
+ * Element focused when fullscreen was entered. Moving the container into the
184
+ * dialog blurs it, so the dialog itself only ever captures the body.
185
+ */
186
+ private fullscreenTrigger;
182
187
  handleFullscreenChange(): void;
183
188
  private handleRequestClose;
184
189
  protected renderMenu(): TemplateResult | DirectiveResult<typeof GuardDirective>;
@@ -0,0 +1,12 @@
1
+ import { GetDamViewAvailablePanelsResponse } from '../../../../services/src/api/cms5/cms5.types';
2
+ import { Option } from '../../../../types/src/content-builder';
3
+ /** A single side panel returned by the DAM view available-panels endpoint. */
4
+ export type DamViewPanel = GetDamViewAvailablePanelsResponse[number];
5
+ /**
6
+ * Reference id of the built-in "Standard Filters" side panel (`DamView_BO.Const.SIDE_PANEL_ID_FILTERS`).
7
+ * It is the default workspace filter button flavor and the DAM view's last-resort fallback for an
8
+ * empty or invalid one.
9
+ */
10
+ export declare const STANDARD_FILTERS_PANEL_ID = "OR1ND000001072386";
11
+ /** Maps a DAM view side panel to a table-select option (name, description, security point). */
12
+ export declare function toPanelOption(panel: DamViewPanel): Option;
@@ -22,6 +22,8 @@ import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
22
22
  *
23
23
  * @slot (default) - Entries the host renders above the space list, e.g. a drawer's "Back" item.
24
24
  *
25
+ * @csspart trigger - The trigger, a `cx-icon-button` or a `cx-button` depending on `trigger-variant`.
26
+ * @csspart trigger-base - The trigger's own `base` part, which carries its colour in every state. *
25
27
  * @event cx-space-select - The user picked a different space. Detail carries its module and URL.
26
28
  * @event cx-space-create - The user asked for a new space.
27
29
  * @event cx-space-settings - The user asked for the current space's settings.
@@ -50,6 +50,7 @@ export declare function apiGetDamViewAssetStatuses(): Promise<GetDamViewAssetSta
50
50
  export declare function apiGetDamViewAssetTypes(): Promise<GetDamViewAssetTypesResponse>;
51
51
  export declare function apiGetDamViewAvailablePanels(params?: {
52
52
  additionalFilterOnly?: boolean;
53
+ includeStandardFilters?: boolean;
53
54
  }): Promise<GetDamViewAvailablePanelsResponse>;
54
55
  export declare function apiGetDamViewDisplayModeOptions(): Promise<GetDamViewDisplayModeOptionsResponse>;
55
56
  export declare function apiGetDamViewAvailableTemplates(): Promise<GetDamViewAvailableTemplatesResponse>;
@@ -8446,7 +8446,7 @@
8446
8446
  preRender?: boolean;
8447
8447
  }
8448
8448
  /**
8449
- * Individual weekly capacity planner. Each week distributes a fixed weekly capacity across work categories as a horizontal bar of colored bands. Users either drag a band to rebalance the split or copy whole weeks across a range. A reserved, component-synthesized "Unavailable" (grey) band fills each week up to the weekly capacity, so the UI total is ALWAYS exactly the capacity while the REAL categories may sum to LESS. Dragging any band (including Unavailable) rebalances proportionally against the others; an empty week renders as 100% Unavailable with the real bands at 0 shown as grabbable FLOOR-width slivers. Hours are floats internally and rounded only for display/save. The Unavailable band is NEVER saved: edits emit a debounced `cx-capacity-change` carrying ONLY the real categories for each edited week, with integer hours (largest-remainder) that sum to round(capacity) − round(unavailable) and match the visible labels. Read `currentWeeks` to save the complete live allocation snapshot immediately, including edits whose change event has not emitted yet. Untouched weeks keep their original fractional hours; edited weeks match the integer labels.
8449
+ * Individual weekly capacity planner. Each week distributes a fixed weekly capacity across work categories as a horizontal bar of colored bands. Users either drag (or arrow-key) a category band to change its hours or copy whole weeks across a range. A reserved, component-synthesized "Unavailable" (grey) band fills each week up to the weekly capacity, so the UI total is ALWAYS exactly the capacity while the REAL categories may sum to LESS. Editing one category only moves that category and Unavailable, which is derived and cannot be edited. Hours are rounded for display/save. The Unavailable band is NEVER saved: edits emit a debounced `cx-capacity-change` carrying ONLY the real categories for each edited week, with integer hours (largest-remainder) that sum to round(capacity) − round(unavailable) and match the visible labels. Read `currentWeeks` to save the complete live allocation snapshot immediately, including edits whose change event has not emitted yet. Untouched weeks keep their original fractional hours; edited weeks match the integer labels.
8450
8450
  */
8451
8451
  interface CxCapacityPlannerAttributes extends HTMLAttributes<CxCapacityPlanner> {
8452
8452
 
package/library/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as e, i as t, n, o as r, r as i, t as a } from "./chunks/event.C11S4obG.js";
2
2
  import { t as o } from "./chunks/custom-element.BEMYNDK1.js";
3
- import { r as s, t as c } from "./chunks/i18n.CpiuF-f4.js";
3
+ import { r as s, t as c } from "./chunks/i18n.BMXeDUpk.js";
4
4
  import { n as l, r as u, t as d } from "./chunks/slot.CZUlACxT.js";
5
5
  import { t as f } from "./chunks/watch.Ub5r8btz.js";
6
6
  import { C as p, S as m, _ as h, a as g, b as _, c as ee, d as te, f as ne, g as re, h as ie, i as ae, l as oe, m as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as ge, x as _e, y as ve } from "./chunks/string.DamEXDH2.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "4.23.0",
4
+ "version": "4.24.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {