@orangelogic/design-system 2.118.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 (165) 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 +35400 -32968
  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/content-builder/components/config-form/config-form.d.ts +12 -0
  136. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +6 -0
  137. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +66 -0
  138. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  139. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +110 -0
  140. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +3 -0
  141. package/library/packages/organisms/src/content-builder/content-builder.d.ts +1 -0
  142. package/library/packages/organisms/src/content-builder/plugins/dam-view.d.ts +5 -0
  143. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +1 -0
  144. package/library/packages/organisms/src/content-builder/styleController.d.ts +7 -3
  145. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +176 -0
  146. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.styles.d.ts +2 -0
  147. package/library/packages/organisms/src/index.d.ts +2 -0
  148. package/library/packages/services/src/api/cms5/cms5.d.ts +17 -1
  149. package/library/packages/services/src/api/endpoints.d.ts +13 -1
  150. package/library/packages/services/src/api/metadata/index.d.ts +1 -0
  151. package/library/packages/services/src/api/metadata/metadata.d.ts +3 -1
  152. package/library/packages/services/src/api/metadata/metadata.types.d.ts +53 -0
  153. package/library/packages/styles/src/table-select.styles.d.ts +2 -0
  154. package/library/packages/types/src/content-builder.d.ts +13 -5
  155. package/library/packages/types/src/dam-view.d.ts +48 -0
  156. package/library/packages/types/src/table.d.ts +17 -1
  157. package/library/packages/utils/src/custom-element/i18n.d.ts +95 -0
  158. package/library/packages/utils/src/custom-element/math.d.ts +8 -0
  159. package/library/packages/utils/src/date/index.d.ts +1 -0
  160. package/library/packages/utils/src/date/iso-week-number.d.ts +9 -0
  161. package/library/react-web-component.d.ts +545 -438
  162. package/library/utils.js +267 -253
  163. package/package.json +1 -1
  164. package/library/chunks/debounce.CIEhztrj.js +0 -97
  165. package/library/chunks/math.DqTA6ya4.js +0 -7
@@ -1,62 +1,66 @@
1
- import { C as y } from "../chunks/button.DwJEeW2t.js";
2
- import { C as b } from "../chunks/icon-button.CQiBjznj.js";
3
- import { C as l, a as g } from "../chunks/option.Bvh35v8S.js";
4
- import $ from "./select.js";
5
- import { n as o, C as v } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
- import { c as x } from "../chunks/custom-element.L4WJXn1j.js";
7
- import { d as O } from "../chunks/debounce.CIEhztrj.js";
8
- import { L as w } from "../chunks/i18n.CH-wak_P.js";
9
- import { w as f } from "../chunks/watch.CThbualB.js";
10
- import { x as h } from "../chunks/lit-element.jLBm65_O.js";
11
- import { r as p } from "../chunks/state.CSDxrqLd.js";
12
- import { e as C } from "../chunks/query.BBf1UFkC.js";
13
- import { o as d } from "../chunks/if-defined.BRoBj_Rp.js";
14
- import { c as B } from "../chunks/repeat.DbF2p5ae.js";
15
- import { n as m } from "../chunks/when.Dr1es41R.js";
16
- import { b as S } from "../chunks/_baseIteratee.DpzDid58.js";
17
- import { b as E } from "../chunks/_baseUniq.HFKneygy.js";
18
- function T(i, r) {
19
- return i && i.length ? E(i, S(r)) : [];
1
+ import { C as g } from "../chunks/button.bufNNyTc.js";
2
+ import { C as $ } from "../chunks/icon-button.DOrACmes.js";
3
+ import { C as p, a as O } from "../chunks/option.CnxdM30G.js";
4
+ import C from "./select.js";
5
+ import { n as s, C as x } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
+ import { c as v } from "../chunks/custom-element.L4WJXn1j.js";
7
+ import { d as w } from "../chunks/debounce.DaHuiSGU.js";
8
+ import { L as S } from "../chunks/i18n.DDj5y9px.js";
9
+ import { w as c } from "../chunks/watch.CThbualB.js";
10
+ import { x as r } from "../chunks/lit-element.jLBm65_O.js";
11
+ import { r as h } from "../chunks/state.CSDxrqLd.js";
12
+ import { e as E } from "../chunks/query.BBf1UFkC.js";
13
+ import { e as B } from "../chunks/class-map.BiVq-cVR.js";
14
+ import { o as m } from "../chunks/if-defined.BRoBj_Rp.js";
15
+ import { i as T } from "../chunks/keyed.C0rkKrxH.js";
16
+ import { o as b } from "../chunks/map.D8heArFD.js";
17
+ import { c as y } from "../chunks/repeat.DbF2p5ae.js";
18
+ import { o as D } from "../chunks/style-map.llVFPd__.js";
19
+ import { n as f } from "../chunks/when.Dr1es41R.js";
20
+ import { b as _ } from "../chunks/_baseIteratee.DpzDid58.js";
21
+ import { b as V } from "../chunks/_baseUniq.HFKneygy.js";
22
+ function z(t, i) {
23
+ return t && t.length ? V(t, _(i)) : [];
20
24
  }
21
- var D = Object.defineProperty, z = Object.getOwnPropertyDescriptor, e = (i, r, s, n) => {
22
- for (var a = n > 1 ? void 0 : n ? z(r, s) : r, u = i.length - 1, c; u >= 0; u--)
23
- (c = i[u]) && (a = (n ? c(r, s, a) : c(a)) || a);
24
- return n && a && D(r, s, a), a;
25
+ var F = Object.defineProperty, A = Object.getOwnPropertyDescriptor, o = (t, i, l, a) => {
26
+ for (var n = a > 1 ? void 0 : a ? A(i, l) : i, u = t.length - 1, d; u >= 0; u--)
27
+ (d = t[u]) && (n = (a ? d(i, l, n) : d(n)) || n);
28
+ return a && n && F(i, l, n), n;
25
29
  };
26
- let t = class extends v {
30
+ let e = class extends x {
27
31
  constructor() {
28
- super(...arguments), this.localize = new w(this), this.name = "", this.value = "", this.size = "medium", this.placeholder = "", this.allowFreetext = !1, this.multiple = !1, this.maxOptionsVisible = 3, this.disabled = !1, this.clearable = !1, this.open = !1, this.hoist = !1, this.freeWidth = !1, this.autosizePadding = 10, this.filled = !1, this.pill = !1, this.label = "", this.placement = "bottom", this.helpText = "", this.form = "", this.required = !1, this.useTag = !1, this.inputBehavior = "filter", this.getOptionValue = (i) => !i || !(i instanceof l) ? "" : typeof i.value == "string" ? i.value : "", this.setOptionCurrent = (i, r) => {
29
- if (i instanceof l) {
30
- if (r === void 0) {
31
- i.current = !i.current;
32
+ super(...arguments), this.localize = new S(this), this.name = "", this.value = "", this.size = "medium", this.placeholder = "", this.allowFreetext = !1, this.multiple = !1, this.maxOptionsVisible = 3, this.disabled = !1, this.clearable = !1, this.open = !1, this.hoist = !1, this.freeWidth = !1, this.autosizePadding = 10, this.filled = !1, this.pill = !1, this.label = "", this.placement = "bottom", this.helpText = "", this.form = "", this.required = !1, this.useTag = !1, this.inputBehavior = "filter", this.getOptionValue = (t) => !t || !(t instanceof p) ? "" : typeof t.value == "string" ? t.value : "", this.setOptionCurrent = (t, i) => {
33
+ if (t instanceof p) {
34
+ if (i === void 0) {
35
+ t.current = !t.current;
32
36
  return;
33
37
  }
34
- i.current = r;
38
+ t.current = i;
35
39
  }
36
- }, this.setOptionSelected = (i, r) => {
37
- if (!(!(i instanceof l) || i.getAttribute("role") !== "option")) {
38
- if (r === void 0) {
39
- i.selected = !i.selected;
40
+ }, this.setOptionSelected = (t, i) => {
41
+ if (!(!(t instanceof p) || t.getAttribute("role") !== "option")) {
42
+ if (i === void 0) {
43
+ t.selected = !t.selected;
40
44
  return;
41
45
  }
42
- i.selected = r, r && this.selectEl.setCurrentOption(i);
46
+ t.selected = i, i && this.selectEl.setCurrentOption(t);
43
47
  }
44
- }, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.useSearchTerm = !1, this.noSelectOnEnter = !1, this.noResetCurrent = !1, this.iconName = "", this.noDropdown = !1, this.noDropdownOnEmpty = !1, this.noFlip = !1, this.customChangeEvent = "", this.options = [], this.start = 0, this.searchTerm = "", this.hasMore = !1, this.loading = !1;
48
+ }, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.columns = [], this.useSearchTerm = !1, this.noSelectOnEnter = !1, this.noResetCurrent = !1, this.iconName = "", this.noDropdown = !1, this.noDropdownOnEmpty = !1, this.noFlip = !1, this.customChangeEvent = "", this.options = [], this.start = 0, this.searchTerm = "", this.hasMore = !1, this.loading = !1;
45
49
  }
46
50
  createRenderRoot() {
47
51
  return this;
48
52
  }
49
- async fetchOptions(i = !1) {
53
+ async fetchOptions(t = !1) {
50
54
  if (this.api)
51
55
  try {
52
56
  this.loading = !0;
53
- const r = await this.api({
57
+ const i = await this.api({
54
58
  searchTerm: this.searchTerm,
55
59
  start: this.start
56
60
  });
57
- if (i ? this.options = r.data : this.options = T([...this.options, ...r.data], "value"), this.hasMore = r.hasMore, await this.updateComplete, this.selectEl) {
58
- let s;
59
- this.multiple ? s = this.value?.trim() ? this.value.trim().split(/\s+/) : [] : s = this.value, this.selectEl.value = s;
61
+ if (t ? this.options = i.data : this.options = z([...this.options, ...i.data], "value"), this.hasMore = i.hasMore, await this.updateComplete, this.selectEl) {
62
+ let l;
63
+ this.multiple ? l = this.value?.trim() ? this.value.trim().split(/\s+/) : [] : l = this.value, this.selectEl.value = l;
60
64
  }
61
65
  } catch {
62
66
  this.options = [];
@@ -70,204 +74,271 @@ let t = class extends v {
70
74
  async handleSearchTermChange() {
71
75
  this.api ? (this.start = 0, await this.updateComplete, await this.fetchOptions(!0)) : this.options = [];
72
76
  }
73
- handleInputChange(i) {
74
- const { value: r } = i.target.displayInput;
75
- this.searchTerm = r, this.selectEl.getOptionLabel = (s) => !s || !(s instanceof l) ? r : s.getTextLabel() || r;
77
+ async handleColumnsChange() {
78
+ await this.updateComplete, this.selectEl && (this.columns.length > 0 ? (this.selectEl.filterCallback = this.tableFilterCallback, this.selectEl.getOptionDisabled = this.tableGetOptionDisabled, this.selectEl.getOptionLabel = this.tableGetOptionLabel, this.selectEl.getOptionSelected = this.tableGetOptionSelected, this.selectEl.getOptionValue = this.tableGetOptionValue, this.selectEl.setOptionCurrent = this.tableSetOptionCurrent, this.selectEl.setOptionSelected = this.tableSetOptionSelected) : (this.selectEl.getOptionValue = this.getOptionValue, this.selectEl.setOptionCurrent = this.setOptionCurrent, this.selectEl.setOptionSelected = this.setOptionSelected));
79
+ }
80
+ tableGetOptionValue(t) {
81
+ return t?.getAttribute("data-value") ?? "";
82
+ }
83
+ tableSetOptionSelected(t, i) {
84
+ const l = i ?? !t?.hasAttribute("selected");
85
+ t?.toggleAttribute("selected", l), t?.setAttribute("aria-selected", String(l));
86
+ }
87
+ tableSetOptionCurrent(t, i) {
88
+ t?.toggleAttribute("current", i ?? !t?.hasAttribute("current"));
89
+ }
90
+ tableGetOptionLabel(t) {
91
+ return t?.querySelector("td")?.textContent?.trim() ?? "";
92
+ }
93
+ tableGetOptionSelected(t) {
94
+ return t?.hasAttribute("selected") ?? !1;
95
+ }
96
+ tableGetOptionDisabled(t) {
97
+ return t?.hasAttribute("disabled") ?? !1;
98
+ }
99
+ tableFilterCallback(t, i) {
100
+ const l = i.toLowerCase();
101
+ return [...t?.querySelectorAll("td") || []].some(
102
+ (a) => a.textContent?.toLowerCase().includes(l)
103
+ );
104
+ }
105
+ getCellValue(t, i) {
106
+ if (i in t) {
107
+ const l = t[i];
108
+ return l == null ? "" : String(l);
109
+ }
110
+ return t.extra?.[i] ?? "";
111
+ }
112
+ getColWidth(t) {
113
+ const i = this.columns.reduce((l, a) => l + (a.flex ?? 1), 0);
114
+ return `${((t.flex ?? 1) / i * 100).toFixed(1)}%`;
115
+ }
116
+ handleInputChange(t) {
117
+ const { value: i } = t.target.displayInput;
118
+ this.searchTerm = i, this.selectEl.getOptionLabel = (l) => !l || !(l instanceof p) ? i : l.getTextLabel() || i;
76
119
  }
77
120
  handleLoadMore() {
78
121
  this.start += 10;
79
122
  }
80
- handleCustomChange(i) {
81
- if (!i.target)
123
+ handleCustomChange(t) {
124
+ if (!t.target)
82
125
  return;
83
- const r = i.target, s = this.options.find(
84
- (n) => n.value === r.value
126
+ const i = t.target, l = this.options.find(
127
+ (a) => a.value === i.value
85
128
  );
86
- s && this.emit(this.customChangeEvent, {
87
- detail: s
129
+ l && this.emit(this.customChangeEvent, {
130
+ detail: l
88
131
  });
89
132
  }
90
- render() {
91
- const i = this.noDropdown || this.noDropdownOnEmpty && !this.options.length;
92
- return h`<cx-select ?allow-freetext=${this.allowFreetext} auto-size-padding=${this.autosizePadding} ?clearable=${this.clearable} data-id=${d(this.dataset.id || void 0)} data-label=${d(this.dataset.label || void 0)} ?disabled=${this.disabled} ?filled=${this.filled} ?force-on-change=${this.forceOnChange} form=${this.form} .syncElement=${this.syncElement} ?free-width=${this.freeWidth} .getOptionValue=${this.getOptionValue} .setOptionCurrent=${this.setOptionCurrent} .setOptionSelected=${this.setOptionSelected} help-text=${this.helpText} ?hoist=${this.hoist} input-behavior=${this.inputBehavior} label=${this.label} max-options-visible=${this.maxOptionsVisible} name=${this.name} ?multiple=${this.multiple} ?open=${this.open} ?pill=${this.pill} placeholder=${this.placeholder} ?required=${this.required} size=${this.size} ?stay-open-on-select=${this.stayOpenOnSelect} ?no-flip=${this.noFlip} ?use-tag=${this.useTag} value=${this.value} @input=${this.useSearchTerm ? this.handleInputChange : void 0} ?no-reset-current=${this.noResetCurrent} ?no-select-on-enter=${this.noSelectOnEnter} ?no-dropdown=${i} ?loading=${this.loading} ?allow-default-mouse-down=${this.allowDefaultMouseDown} @cx-change=${this.customChangeEvent ? this.handleCustomChange : void 0}>${m(this.iconName, () => h`<cx-icon-button class="icon-button" tabindex="-1" label=${this.localize.term("search")} name=${this.iconName} slot="prefix"></cx-icon-button>`)}
93
- ${B(
133
+ renderTableOptions() {
134
+ return r`<table class="table-select__table"><thead class="table-select__thead"><tr>${b(
135
+ this.columns,
136
+ (t) => r`<th class="table-select__th" style=${D({ width: this.getColWidth(t) })}>${t.header}</th>`
137
+ )}</tr></thead>${y(
94
138
  this.options,
95
- (r) => r.value ?? "",
96
- (r) => h`<cx-option value=${r.value ?? ""} ?disabled=${r.disabled} show-check check-placement=${g.Right}>${r.label ?? r.value ?? ""}</cx-option>`
97
- )}
98
- ${m(
99
- this.hasMore,
100
- () => h`<cx-option value="load-more" class="tree-item__actions"><cx-button variant="text" ?loading=${this.loading} @click=${this.handleLoadMore}>${this.localize.term("more")}</cx-button></cx-option>`
101
- )}</cx-select>`;
139
+ (t) => t.value ?? "",
140
+ (t) => r`<tr role="option" aria-selected="false" aria-disabled=${t.disabled ? "true" : "false"} data-value=${t.value ?? ""} ?disabled=${t.disabled ?? !1}>${b(
141
+ this.columns,
142
+ (i) => r`<td class="table-select__td">${this.getCellValue(t, i.field)}</td>`
143
+ )}</tr>`
144
+ )}</table>`;
145
+ }
146
+ render() {
147
+ const t = this.noDropdown || this.noDropdownOnEmpty && !this.options.length, i = this.columns.length > 0;
148
+ return T(i, r`<cx-select auto-size-padding=${this.autosizePadding} class=${B({
149
+ "dynamic-select": !0,
150
+ "table-select": i
151
+ })} data-id=${m(this.dataset.id || void 0)} data-label=${m(this.dataset.label || void 0)} form=${this.form} help-text=${this.helpText} input-behavior=${this.inputBehavior} label=${this.label} max-options-visible=${this.maxOptionsVisible} name=${this.name} placeholder=${this.placeholder} placement=${this.placement} size=${this.size} value=${this.value} .syncElement=${this.syncElement} ?allow-default-mouse-down=${this.allowDefaultMouseDown} ?allow-freetext=${this.allowFreetext} ?clearable=${this.clearable} ?disabled=${this.disabled} ?filled=${this.filled} ?force-on-change=${this.forceOnChange} ?free-width=${this.freeWidth} ?hoist=${this.hoist} ?loading=${this.loading} ?multiple=${this.multiple} ?no-dropdown=${t} ?no-flip=${this.noFlip} ?no-reset-current=${this.noResetCurrent} ?no-select-on-enter=${this.noSelectOnEnter} ?open=${this.open} ?pill=${this.pill} ?required=${this.required} ?stay-open-on-select=${this.stayOpenOnSelect} ?use-tag=${this.useTag} @cx-change=${this.customChangeEvent ? this.handleCustomChange : void 0} @input=${this.useSearchTerm ? this.handleInputChange : void 0}>${f(this.iconName, () => r`<cx-icon-button class="icon-button" tabindex="-1" label=${this.localize.term("search")} name=${this.iconName} slot="prefix"></cx-icon-button>`)}
152
+ ${f(
153
+ i,
154
+ () => this.renderTableOptions(),
155
+ () => r`
156
+ ${y(
157
+ this.options,
158
+ (l) => l.value ?? "",
159
+ (l) => r`<cx-option value=${l.value ?? ""} ?disabled=${l.disabled} show-check check-placement=${O.Right}>${l.label ?? l.value ?? ""}</cx-option>`
160
+ )}
161
+ ${f(
162
+ this.hasMore,
163
+ () => r`<cx-option value="load-more" class="tree-item__actions"><cx-button variant="text" ?loading=${this.loading} @click=${this.handleLoadMore}>${this.localize.term("more")}</cx-button></cx-option>`
164
+ )}
165
+ `
166
+ )}</cx-select>`);
102
167
  }
103
168
  };
104
- t.dependencies = {
105
- "cx-button": y,
106
- "cx-icon-button": b,
107
- "cx-option": l,
108
- "cx-select": $
169
+ e.dependencies = {
170
+ "cx-button": g,
171
+ "cx-icon-button": $,
172
+ "cx-option": p,
173
+ "cx-select": C
109
174
  };
110
- e([
111
- C("cx-select")
112
- ], t.prototype, "selectEl", 2);
113
- e([
114
- o()
115
- ], t.prototype, "name", 2);
116
- e([
117
- o({ reflect: !0, type: String })
118
- ], t.prototype, "value", 2);
119
- e([
120
- o({ reflect: !0 })
121
- ], t.prototype, "size", 2);
122
- e([
123
- o()
124
- ], t.prototype, "placeholder", 2);
125
- e([
126
- o({ attribute: "allow-freetext", reflect: !0, type: Boolean })
127
- ], t.prototype, "allowFreetext", 2);
128
- e([
129
- o({ reflect: !0, type: Boolean })
130
- ], t.prototype, "multiple", 2);
131
- e([
132
- o({ attribute: "max-options-visible", type: Number })
133
- ], t.prototype, "maxOptionsVisible", 2);
134
- e([
135
- o({ reflect: !0, type: Boolean })
136
- ], t.prototype, "disabled", 2);
137
- e([
138
- o({ type: Boolean })
139
- ], t.prototype, "clearable", 2);
140
- e([
141
- o({ reflect: !0, type: Boolean })
142
- ], t.prototype, "open", 2);
143
- e([
144
- o({ type: Boolean })
145
- ], t.prototype, "hoist", 2);
146
- e([
147
- o({ attribute: "sync-element" })
148
- ], t.prototype, "syncElement", 2);
149
- e([
150
- o({ attribute: "free-width", reflect: !0, type: Boolean })
151
- ], t.prototype, "freeWidth", 2);
152
- e([
153
- o({ attribute: "auto-size-padding", type: Number })
154
- ], t.prototype, "autosizePadding", 2);
155
- e([
156
- o({ reflect: !0, type: Boolean })
157
- ], t.prototype, "filled", 2);
158
- e([
159
- o({ reflect: !0, type: Boolean })
160
- ], t.prototype, "pill", 2);
161
- e([
162
- o()
163
- ], t.prototype, "label", 2);
164
- e([
165
- o({ reflect: !0 })
166
- ], t.prototype, "placement", 2);
167
- e([
168
- o({ attribute: "help-text" })
169
- ], t.prototype, "helpText", 2);
170
- e([
171
- o({ reflect: !0 })
172
- ], t.prototype, "form", 2);
173
- e([
174
- o({ reflect: !0, type: Boolean })
175
- ], t.prototype, "required", 2);
176
- e([
177
- o({ attribute: "use-tag", reflect: !0, type: Boolean })
178
- ], t.prototype, "useTag", 2);
179
- e([
180
- o({ attribute: "input-behavior" })
181
- ], t.prototype, "inputBehavior", 2);
182
- e([
183
- o({ attribute: "get-option-value" })
184
- ], t.prototype, "getOptionValue", 2);
185
- e([
186
- o({ attribute: "set-option-current" })
187
- ], t.prototype, "setOptionCurrent", 2);
188
- e([
189
- o({ attribute: "set-option-selected" })
190
- ], t.prototype, "setOptionSelected", 2);
191
- e([
192
- o({ attribute: "stay-open-on-select", type: Boolean })
193
- ], t.prototype, "stayOpenOnSelect", 2);
194
- e([
195
- o({ attribute: "force-on-change", type: Boolean })
196
- ], t.prototype, "forceOnChange", 2);
197
- e([
198
- o({ attribute: "allow-default-mouse-down", type: Boolean })
199
- ], t.prototype, "allowDefaultMouseDown", 2);
200
- e([
201
- o({ attribute: "api", type: Function })
202
- ], t.prototype, "api", 2);
203
- e([
204
- o({ attribute: "use-search-term", reflect: !0, type: Boolean })
205
- ], t.prototype, "useSearchTerm", 2);
206
- e([
207
- o({
175
+ o([
176
+ E("cx-select")
177
+ ], e.prototype, "selectEl", 2);
178
+ o([
179
+ s()
180
+ ], e.prototype, "name", 2);
181
+ o([
182
+ s({ reflect: !0, type: String })
183
+ ], e.prototype, "value", 2);
184
+ o([
185
+ s({ reflect: !0 })
186
+ ], e.prototype, "size", 2);
187
+ o([
188
+ s()
189
+ ], e.prototype, "placeholder", 2);
190
+ o([
191
+ s({ attribute: "allow-freetext", reflect: !0, type: Boolean })
192
+ ], e.prototype, "allowFreetext", 2);
193
+ o([
194
+ s({ reflect: !0, type: Boolean })
195
+ ], e.prototype, "multiple", 2);
196
+ o([
197
+ s({ attribute: "max-options-visible", type: Number })
198
+ ], e.prototype, "maxOptionsVisible", 2);
199
+ o([
200
+ s({ reflect: !0, type: Boolean })
201
+ ], e.prototype, "disabled", 2);
202
+ o([
203
+ s({ type: Boolean })
204
+ ], e.prototype, "clearable", 2);
205
+ o([
206
+ s({ reflect: !0, type: Boolean })
207
+ ], e.prototype, "open", 2);
208
+ o([
209
+ s({ type: Boolean })
210
+ ], e.prototype, "hoist", 2);
211
+ o([
212
+ s({ attribute: "sync-element" })
213
+ ], e.prototype, "syncElement", 2);
214
+ o([
215
+ s({ attribute: "free-width", reflect: !0, type: Boolean })
216
+ ], e.prototype, "freeWidth", 2);
217
+ o([
218
+ s({ attribute: "auto-size-padding", type: Number })
219
+ ], e.prototype, "autosizePadding", 2);
220
+ o([
221
+ s({ reflect: !0, type: Boolean })
222
+ ], e.prototype, "filled", 2);
223
+ o([
224
+ s({ reflect: !0, type: Boolean })
225
+ ], e.prototype, "pill", 2);
226
+ o([
227
+ s()
228
+ ], e.prototype, "label", 2);
229
+ o([
230
+ s({ reflect: !0 })
231
+ ], e.prototype, "placement", 2);
232
+ o([
233
+ s({ attribute: "help-text" })
234
+ ], e.prototype, "helpText", 2);
235
+ o([
236
+ s({ reflect: !0 })
237
+ ], e.prototype, "form", 2);
238
+ o([
239
+ s({ reflect: !0, type: Boolean })
240
+ ], e.prototype, "required", 2);
241
+ o([
242
+ s({ attribute: "use-tag", reflect: !0, type: Boolean })
243
+ ], e.prototype, "useTag", 2);
244
+ o([
245
+ s({ attribute: "input-behavior" })
246
+ ], e.prototype, "inputBehavior", 2);
247
+ o([
248
+ s({ attribute: "get-option-value" })
249
+ ], e.prototype, "getOptionValue", 2);
250
+ o([
251
+ s({ attribute: "set-option-current" })
252
+ ], e.prototype, "setOptionCurrent", 2);
253
+ o([
254
+ s({ attribute: "set-option-selected" })
255
+ ], e.prototype, "setOptionSelected", 2);
256
+ o([
257
+ s({ attribute: "stay-open-on-select", type: Boolean })
258
+ ], e.prototype, "stayOpenOnSelect", 2);
259
+ o([
260
+ s({ attribute: "force-on-change", type: Boolean })
261
+ ], e.prototype, "forceOnChange", 2);
262
+ o([
263
+ s({ attribute: "allow-default-mouse-down", type: Boolean })
264
+ ], e.prototype, "allowDefaultMouseDown", 2);
265
+ o([
266
+ s({ attribute: "api", type: Function })
267
+ ], e.prototype, "api", 2);
268
+ o([
269
+ s({ attribute: !1, type: Array })
270
+ ], e.prototype, "columns", 2);
271
+ o([
272
+ s({ attribute: "use-search-term", reflect: !0, type: Boolean })
273
+ ], e.prototype, "useSearchTerm", 2);
274
+ o([
275
+ s({
208
276
  attribute: "no-select-on-enter",
209
277
  reflect: !0,
210
278
  type: Boolean
211
279
  })
212
- ], t.prototype, "noSelectOnEnter", 2);
213
- e([
214
- o({
280
+ ], e.prototype, "noSelectOnEnter", 2);
281
+ o([
282
+ s({
215
283
  attribute: "no-reset-current",
216
284
  reflect: !0,
217
285
  type: Boolean
218
286
  })
219
- ], t.prototype, "noResetCurrent", 2);
220
- e([
221
- o({ attribute: "icon-name", reflect: !0, type: String })
222
- ], t.prototype, "iconName", 2);
223
- e([
224
- o({
287
+ ], e.prototype, "noResetCurrent", 2);
288
+ o([
289
+ s({ attribute: "icon-name", reflect: !0, type: String })
290
+ ], e.prototype, "iconName", 2);
291
+ o([
292
+ s({
225
293
  attribute: "no-dropdown",
226
294
  reflect: !0,
227
295
  type: Boolean
228
296
  })
229
- ], t.prototype, "noDropdown", 2);
230
- e([
231
- o({
297
+ ], e.prototype, "noDropdown", 2);
298
+ o([
299
+ s({
232
300
  attribute: "no-dropdown-on-empty",
233
301
  reflect: !0,
234
302
  type: Boolean
235
303
  })
236
- ], t.prototype, "noDropdownOnEmpty", 2);
237
- e([
238
- o({ attribute: "no-flip", reflect: !0, type: Boolean })
239
- ], t.prototype, "noFlip", 2);
240
- e([
241
- o({ attribute: "custom-change-event", type: String })
242
- ], t.prototype, "customChangeEvent", 2);
243
- e([
244
- p()
245
- ], t.prototype, "options", 2);
246
- e([
247
- p()
248
- ], t.prototype, "start", 2);
249
- e([
250
- p()
251
- ], t.prototype, "searchTerm", 2);
252
- e([
253
- p()
254
- ], t.prototype, "hasMore", 2);
255
- e([
256
- p()
257
- ], t.prototype, "loading", 2);
258
- e([
259
- O(200)
260
- ], t.prototype, "fetchOptions", 1);
261
- e([
262
- f("api"),
263
- f("start", { waitUntilFirstUpdate: !0 })
264
- ], t.prototype, "handleStartChange", 1);
265
- e([
266
- f("searchTerm", { waitUntilFirstUpdate: !0 })
267
- ], t.prototype, "handleSearchTermChange", 1);
268
- t = e([
269
- x("cx-dynamic-select")
270
- ], t);
304
+ ], e.prototype, "noDropdownOnEmpty", 2);
305
+ o([
306
+ s({ attribute: "no-flip", reflect: !0, type: Boolean })
307
+ ], e.prototype, "noFlip", 2);
308
+ o([
309
+ s({ attribute: "custom-change-event", type: String })
310
+ ], e.prototype, "customChangeEvent", 2);
311
+ o([
312
+ h()
313
+ ], e.prototype, "options", 2);
314
+ o([
315
+ h()
316
+ ], e.prototype, "start", 2);
317
+ o([
318
+ h()
319
+ ], e.prototype, "searchTerm", 2);
320
+ o([
321
+ h()
322
+ ], e.prototype, "hasMore", 2);
323
+ o([
324
+ h()
325
+ ], e.prototype, "loading", 2);
326
+ o([
327
+ w(200)
328
+ ], e.prototype, "fetchOptions", 1);
329
+ o([
330
+ c("api"),
331
+ c("start", { waitUntilFirstUpdate: !0 })
332
+ ], e.prototype, "handleStartChange", 1);
333
+ o([
334
+ c("searchTerm", { waitUntilFirstUpdate: !0 })
335
+ ], e.prototype, "handleSearchTermChange", 1);
336
+ o([
337
+ c("columns")
338
+ ], e.prototype, "handleColumnsChange", 1);
339
+ e = o([
340
+ v("cx-dynamic-select")
341
+ ], e);
271
342
  export {
272
- t as default
343
+ e as default
273
344
  };
@@ -3,7 +3,7 @@ import EP from "./spinner.js";
3
3
  import { n as lm, C as PP } from "../chunks/lib-cortex-element.CVMmyPMC.js";
4
4
  import { c as NP } from "../chunks/component.styles.CRO4Odto.js";
5
5
  import { c as RP } from "../chunks/custom-element.L4WJXn1j.js";
6
- import { L as kP } from "../chunks/i18n.CH-wak_P.js";
6
+ import { L as kP } from "../chunks/i18n.DDj5y9px.js";
7
7
  import { w as OP } from "../chunks/watch.CThbualB.js";
8
8
  import { i as VP, x as A_ } from "../chunks/lit-element.jLBm65_O.js";
9
9
  import { e as BP } from "../chunks/query.BBf1UFkC.js";
@@ -2,14 +2,14 @@ import { n as a, C as b } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as w } from "../chunks/component.styles.CRO4Odto.js";
3
3
  import { s as d, a as c, b as m, w as u } from "../chunks/event.BeKOsirN.js";
4
4
  import { c as x } from "../chunks/custom-element.L4WJXn1j.js";
5
- import { L as v } from "../chunks/i18n.CH-wak_P.js";
5
+ import { L as v } from "../chunks/i18n.DDj5y9px.js";
6
6
  import { w as y } from "../chunks/watch.CThbualB.js";
7
7
  import { i as C, x as f } from "../chunks/lit-element.jLBm65_O.js";
8
8
  import { r as k } from "../chunks/state.CSDxrqLd.js";
9
9
  import { e as E } from "../chunks/query.BBf1UFkC.js";
10
10
  import { e as H } from "../chunks/class-map.BiVq-cVR.js";
11
11
  import { a as p, g } from "../chunks/animation-registry.HmpwNuGH.js";
12
- import { C as B } from "../chunks/button.DwJEeW2t.js";
12
+ import { C as B } from "../chunks/button.bufNNyTc.js";
13
13
  const T = C`:host{--toggler-color:var(--cx-color-primary);display:block;overflow:hidden}.element-clamp{overflow-anchor:none}.element-clamp--disabled{opacity:.5}.element-clamp-icon{transition:var(--cx-transition-medium) rotate ease;flex:none;align-items:center;display:flex}.details--open .element-clamp-icon{rotate:90deg}.details--open.details--rtl .element-clamp-icon{rotate:-90deg}.element-clamp--open slot[name=expand-icon],.element-clamp:not(.element-clamp--open) slot[name=collapse-icon]{display:none}.element-clamp__content{display:block;overflow:hidden}.toggler{margin-top:var(--cx-spacing-2x-small);display:block}.toggler::part(base){color:var(--toggler-color);font-weight:var(--cx-font-weight-medium);text-transform:none;width:auto}.toggler::part(label){padding-left:0}`;
14
14
  var z = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (e, t, i, r) => {
15
15
  for (var s = r > 1 ? void 0 : r ? O(t, i) : t, h = e.length - 1, l; h >= 0; h--)
@@ -1,28 +1,28 @@
1
- import { C as K } from "../chunks/file-on-demand.AwMj4AfO.js";
1
+ import { C as K } from "../chunks/file-on-demand.DDuWnvmy.js";
2
2
  import "./avatar.js";
3
- import "../chunks/button.DwJEeW2t.js";
4
- import "../chunks/dialog.BYCWepBc.js";
3
+ import "../chunks/button.bufNNyTc.js";
4
+ import "../chunks/dialog.DdsJ_WqU.js";
5
5
  import "./divider.js";
6
6
  import "./format-bytes.js";
7
7
  import "../chunks/icon.DnBh6-56.js";
8
- import "../chunks/icon-button.CQiBjznj.js";
9
- import "../chunks/input.CH4lKxPM.js";
8
+ import "../chunks/icon-button.DOrACmes.js";
9
+ import "../chunks/input.BYj6YXcM.js";
10
10
  import "./line-clamp.js";
11
- import "../chunks/option.Bvh35v8S.js";
11
+ import "../chunks/option.CnxdM30G.js";
12
12
  import "./relative-time.js";
13
13
  import "./select.js";
14
14
  import "./space.js";
15
15
  import "./tab.js";
16
- import "../chunks/tab-group.DvMX02hY.js";
16
+ import "../chunks/tab-group.CGg9lPLP.js";
17
17
  import "./tab-panel.js";
18
18
  import "./tooltip.js";
19
- import "../chunks/tree.Btf2Q4YZ.js";
19
+ import "../chunks/tree.yYbWIRnc.js";
20
20
  import "../chunks/typography.DJC_UXgs.js";
21
21
  import "../chunks/lib-cortex-element.CVMmyPMC.js";
22
- import "../chunks/confirm-popover.BifwpSuf.js";
22
+ import "../chunks/confirm-popover.BLQFU6Hs.js";
23
23
  import "../chunks/custom-element.L4WJXn1j.js";
24
- import "../chunks/debounce.CIEhztrj.js";
25
- import "../chunks/i18n.CH-wak_P.js";
24
+ import "../chunks/debounce.DaHuiSGU.js";
25
+ import "../chunks/i18n.DDj5y9px.js";
26
26
  import "../chunks/watch.CThbualB.js";
27
27
  import "../chunks/number.B4PQLJIg.js";
28
28
  import "../chunks/string.DUgD4c9f.js";