@trintel/zooy 1.0.20 → 1.1.1

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 (224) hide show
  1. package/dist/chunks/component-library-registry-BBQV6Kpv.js +1 -0
  2. package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
  3. package/dist/chunks/register-D3pWAXhm.js +266 -0
  4. package/dist/chunks/register-D7SMu1Gy.js +1372 -0
  5. package/dist/chunks/register-HYODt48Q.js +1 -0
  6. package/dist/chunks/register-g5KUNRdI.js +1 -0
  7. package/dist/chunks/{tree-utils-D7kpr-Wj.js → tree-utils-B2JEGXHR.js} +2 -1
  8. package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
  9. package/dist/chunks/zoo-CY2QpG41.js +52 -0
  10. package/dist/chunks/zoo-DgdxBjlN.js +390 -0
  11. package/dist/zooy.cjs.js +4 -4
  12. package/dist/zooy.es.js +226 -237
  13. package/package.json +1 -1
  14. package/dist/chunks/16-B2HVhDIW.js +0 -1
  15. package/dist/chunks/16-B9Ad4Fob.js +0 -19
  16. package/dist/chunks/16-BXsOcjPx.js +0 -19
  17. package/dist/chunks/16-BZCBqUx6.js +0 -1
  18. package/dist/chunks/16-BmOXGjZf.js +0 -1
  19. package/dist/chunks/16-BsQdCz_w.js +0 -27
  20. package/dist/chunks/16-C-Rp3Nso.js +0 -1
  21. package/dist/chunks/16-C36sVk5F.js +0 -26
  22. package/dist/chunks/16-CZycT1I8.js +0 -1
  23. package/dist/chunks/16-Ce_hDgPW.js +0 -1
  24. package/dist/chunks/16-CinLDpNC.js +0 -19
  25. package/dist/chunks/16-Cj0hOjaI.js +0 -1
  26. package/dist/chunks/16-Cx-PCMJJ.js +0 -26
  27. package/dist/chunks/16-D8XFc44J.js +0 -110
  28. package/dist/chunks/16-DVx7Niko.js +0 -33
  29. package/dist/chunks/16-DZJZDJYY.js +0 -1
  30. package/dist/chunks/16-DoCnqtvj.js +0 -35
  31. package/dist/chunks/16-DyCV3lkl.js +0 -19
  32. package/dist/chunks/16-SwMpxJpB.js +0 -19
  33. package/dist/chunks/16-jVjxC8Bu.js +0 -1
  34. package/dist/chunks/16-ma2Q_204.js +0 -1
  35. package/dist/chunks/16-qZ3FOIw0.js +0 -1
  36. package/dist/chunks/20-BwzzGcZC.js +0 -80
  37. package/dist/chunks/20-CqNSki3g.js +0 -1
  38. package/dist/chunks/accordion-0mybViUv.js +0 -236
  39. package/dist/chunks/accordion-CvcaulG8.js +0 -45
  40. package/dist/chunks/badge-indicator-BUdDkz6Z.js +0 -18
  41. package/dist/chunks/badge-indicator-DuYbJV5o.js +0 -1
  42. package/dist/chunks/breadcrumb-CYKgjbdB.js +0 -19
  43. package/dist/chunks/breadcrumb-DB0PkiBX.js +0 -140
  44. package/dist/chunks/button-1g5b3tWS.js +0 -268
  45. package/dist/chunks/button-BKj8189A.js +0 -4
  46. package/dist/chunks/button-DAOoyQ8b.js +0 -67
  47. package/dist/chunks/button-DfRkC-OR.js +0 -72
  48. package/dist/chunks/button-skeleton-C0mW3D7v.js +0 -44
  49. package/dist/chunks/button-skeleton-KFGdwtUH.js +0 -21
  50. package/dist/chunks/carbon-element-BsPGNbmz.js +0 -1
  51. package/dist/chunks/carbon-element-Z5iEnFdr.js +0 -24
  52. package/dist/chunks/checkbox-CBD8Qmjx.js +0 -37
  53. package/dist/chunks/checkbox-CewERWBu.js +0 -40
  54. package/dist/chunks/checkbox-CxxD4wgP.js +0 -176
  55. package/dist/chunks/checkbox-DKS7fw29.js +0 -168
  56. package/dist/chunks/class-map-BwUbMyhc.js +0 -1
  57. package/dist/chunks/class-map-qeLb1IA_.js +0 -27
  58. package/dist/chunks/code-snippet-BJhK27fG.js +0 -205
  59. package/dist/chunks/code-snippet-BUQFh_v7.js +0 -53
  60. package/dist/chunks/collection-helpers-DPVzwwb8.js +0 -7
  61. package/dist/chunks/collection-helpers-g7DrZSRQ.js +0 -1
  62. package/dist/chunks/combo-box-BCOUQHyG.js +0 -39
  63. package/dist/chunks/combo-box-Bms5blM6.js +0 -325
  64. package/dist/chunks/combo-button-BSBAvBIW.js +0 -15
  65. package/dist/chunks/combo-button-Bc3hx7VJ.js +0 -92
  66. package/dist/chunks/component-library-registry-CJ1Yb_8E.js +0 -98
  67. package/dist/chunks/component-library-registry-Co7WzTfw.js +0 -1
  68. package/dist/chunks/content-switcher-BuLZ3Aae.js +0 -1
  69. package/dist/chunks/content-switcher-DIODRHwc.js +0 -2
  70. package/dist/chunks/content-switcher-item-0YPDXW1z.js +0 -27
  71. package/dist/chunks/content-switcher-item-DkRD8k8n.js +0 -272
  72. package/dist/chunks/copy-button-XD4reiTK.js +0 -121
  73. package/dist/chunks/copy-button-eI9B8iKc.js +0 -17
  74. package/dist/chunks/data-table-BImLEoIA.js +0 -1243
  75. package/dist/chunks/data-table-YLNCQhJx.js +0 -158
  76. package/dist/chunks/date-picker-CWIAwkKj.js +0 -66
  77. package/dist/chunks/date-picker-CXjiOkZH.js +0 -2167
  78. package/dist/chunks/decorate-Cnz2C5jL.js +0 -62
  79. package/dist/chunks/decorate-DT052P_1.js +0 -72
  80. package/dist/chunks/decorators-CHZSYVOk.js +0 -1
  81. package/dist/chunks/decorators-CK8kfuyw.js +0 -87
  82. package/dist/chunks/deep-shadow-contains-BlQ_KSu4.js +0 -15
  83. package/dist/chunks/deep-shadow-contains-OTuAt1VE.js +0 -1
  84. package/dist/chunks/directive-CtTB8jL3.js +0 -31
  85. package/dist/chunks/directive-DWoJrOxt.js +0 -1
  86. package/dist/chunks/dropdown-Cg9JduA5.js +0 -4
  87. package/dist/chunks/dropdown-item-CYwutWei.js +0 -677
  88. package/dist/chunks/dropdown-item-H53zayYk.js +0 -73
  89. package/dist/chunks/dropdown-jdFaaXEa.js +0 -32
  90. package/dist/chunks/file-uploader-6FOP_GAh.js +0 -79
  91. package/dist/chunks/file-uploader-BTk1MqcJ.js +0 -342
  92. package/dist/chunks/floating-controller-BphaSUPY.js +0 -1012
  93. package/dist/chunks/floating-controller-C4ivnNvp.js +0 -1
  94. package/dist/chunks/focus-C1mbe9-i.js +0 -1
  95. package/dist/chunks/focus-Dpis0wA_.js +0 -13
  96. package/dist/chunks/form-BEmId1-D.js +0 -20
  97. package/dist/chunks/form-BmSVyKnm.js +0 -1
  98. package/dist/chunks/form-DUzcwJO9.js +0 -23
  99. package/dist/chunks/form-crnrWPVH.js +0 -3
  100. package/dist/chunks/form-group-Dax3eYD4.js +0 -43
  101. package/dist/chunks/form-group-dIvuqjw2.js +0 -12
  102. package/dist/chunks/heading-BbB6mvMG.js +0 -47
  103. package/dist/chunks/heading-UN9MO1TN.js +0 -5
  104. package/dist/chunks/host-listener-BBI7oAFw.js +0 -37
  105. package/dist/chunks/host-listener-BzjpIsFF.js +0 -1
  106. package/dist/chunks/host-listener-CtA1D-wt.js +0 -1
  107. package/dist/chunks/host-listener-DJEakRMM.js +0 -17
  108. package/dist/chunks/icon-B_S1_kDJ.js +0 -1
  109. package/dist/chunks/icon-CINf5Icb.js +0 -28
  110. package/dist/chunks/icon-button-BtE0-oCE.js +0 -1
  111. package/dist/chunks/icon-button-CACU21y5.js +0 -16
  112. package/dist/chunks/icon-button-D2STrB4d.js +0 -6
  113. package/dist/chunks/icon-button-D569kvcZ.js +0 -84
  114. package/dist/chunks/icon-indicator-BkILzP5o.js +0 -1
  115. package/dist/chunks/icon-indicator-D_IHkSon.js +0 -445
  116. package/dist/chunks/icon-loader-B9uu2SkP.js +0 -7
  117. package/dist/chunks/icon-loader-CZ8MQjNl.js +0 -1
  118. package/dist/chunks/icon-loader-utils-BKulYpY6.js +0 -110
  119. package/dist/chunks/icon-loader-utils-C-vWa1iy.js +0 -1
  120. package/dist/chunks/if-defined-C4rY5CqG.js +0 -1
  121. package/dist/chunks/if-defined-DvPh-nZx.js +0 -5
  122. package/dist/chunks/if-non-empty-CqihXhSU.js +0 -1
  123. package/dist/chunks/if-non-empty-DIcT03Pc.js +0 -5
  124. package/dist/chunks/inline-loading-BIB-coVZ.js +0 -83
  125. package/dist/chunks/inline-loading-C4MpPNzv.js +0 -12
  126. package/dist/chunks/link-Bz8knkhr.js +0 -1
  127. package/dist/chunks/link-CyrOt3Yx.js +0 -24
  128. package/dist/chunks/link-DlDoN1r0.js +0 -1
  129. package/dist/chunks/link-MrslkhR7.js +0 -106
  130. package/dist/chunks/lit-BNk7ncU9.js +0 -3
  131. package/dist/chunks/lit-uyM4-HrV.js +0 -552
  132. package/dist/chunks/loading-CUUY8ITP.js +0 -68
  133. package/dist/chunks/loading-CX_B-YYv.js +0 -1
  134. package/dist/chunks/loading-SDDHeWof.js +0 -1
  135. package/dist/chunks/loading-icon-BsInpAjb.js +0 -16
  136. package/dist/chunks/loading-icon-iCI-C5ZG.js +0 -24
  137. package/dist/chunks/loading-xKooWNUJ.js +0 -2
  138. package/dist/chunks/menu-D2kFhclQ.js +0 -56
  139. package/dist/chunks/menu-DG7s9yXJ.js +0 -682
  140. package/dist/chunks/modal-C2EEHjQh.js +0 -27
  141. package/dist/chunks/modal-DEGWE2iT.js +0 -414
  142. package/dist/chunks/multi-select-BXST526m.js +0 -63
  143. package/dist/chunks/multi-select-CgDCOBWa.js +0 -384
  144. package/dist/chunks/notification-BEvb6zBP.js +0 -89
  145. package/dist/chunks/notification-DLOgEfr6.js +0 -426
  146. package/dist/chunks/number-input-CRIgLD3k.js +0 -284
  147. package/dist/chunks/number-input-CiXkIGVz.js +0 -76
  148. package/dist/chunks/on-D2_IwJad.js +0 -8
  149. package/dist/chunks/on-_BJL2XbM.js +0 -1
  150. package/dist/chunks/overflow-menu-BSMy7pUY.js +0 -34
  151. package/dist/chunks/overflow-menu-CGghH3Mz.js +0 -387
  152. package/dist/chunks/pagination-4SuGaSx6.js +0 -77
  153. package/dist/chunks/pagination-D7VFRyN2.js +0 -293
  154. package/dist/chunks/password-input-Cx2ItLqG.js +0 -68
  155. package/dist/chunks/password-input-NoZg_DjL.js +0 -210
  156. package/dist/chunks/popover--wvkgqdv.js +0 -1
  157. package/dist/chunks/popover-Ca4f4ZCE.js +0 -6
  158. package/dist/chunks/popover-content-BOaLSQt3.js +0 -15
  159. package/dist/chunks/popover-content-Bi-ydBhZ.js +0 -277
  160. package/dist/chunks/progress-bar-BTHREDPK.js +0 -101
  161. package/dist/chunks/progress-bar-p0YwLsuh.js +0 -22
  162. package/dist/chunks/progress-indicator-BP8k-xTC.js +0 -252
  163. package/dist/chunks/progress-indicator-cr687P29.js +0 -35
  164. package/dist/chunks/radio-button-CNOPBUK8.js +0 -396
  165. package/dist/chunks/radio-button-CU2ngHxo.js +0 -44
  166. package/dist/chunks/radio-group-manager-iPCcbWB8.js +0 -60
  167. package/dist/chunks/radio-group-manager-zfU1GLIW.js +0 -1
  168. package/dist/chunks/register-BXKEXKsC.js +0 -15
  169. package/dist/chunks/register-Bx7SlevL.js +0 -8198
  170. package/dist/chunks/register-CnJjkv07.js +0 -1
  171. package/dist/chunks/register-DqgfpeXv.js +0 -1399
  172. package/dist/chunks/search-BYWQ80wI.js +0 -4
  173. package/dist/chunks/search-BgSG9LA9.js +0 -22
  174. package/dist/chunks/search-CET7sHGW.js +0 -173
  175. package/dist/chunks/search-CUuRRsTX.js +0 -31
  176. package/dist/chunks/select-BifhTIxt.js +0 -37
  177. package/dist/chunks/select-Dh4AFZ2v.js +0 -4
  178. package/dist/chunks/select-item-BvwJ4Wc-.js +0 -77
  179. package/dist/chunks/select-item-DLWdT1CE.js +0 -272
  180. package/dist/chunks/shared-enums-BdDASwq-.js +0 -1
  181. package/dist/chunks/shared-enums-Cd0vBQFM.js +0 -6
  182. package/dist/chunks/skeleton-placeholder-Czj5sAeI.js +0 -28
  183. package/dist/chunks/skeleton-placeholder-aS-woCl8.js +0 -1
  184. package/dist/chunks/skeleton-text-BIHdj7Jx.js +0 -1
  185. package/dist/chunks/skeleton-text-CZ2bSuDE.js +0 -6
  186. package/dist/chunks/skeleton-text-DJrow5mh.js +0 -1
  187. package/dist/chunks/skeleton-text-INjLvc2Y.js +0 -71
  188. package/dist/chunks/slider-CoHP_UJ2.js +0 -878
  189. package/dist/chunks/slider-DhIZP9Ms.js +0 -246
  190. package/dist/chunks/stack-C66k74Zo.js +0 -1
  191. package/dist/chunks/stack-vrK3hQYJ.js +0 -85
  192. package/dist/chunks/structured-list-BWjXHFbX.js +0 -19
  193. package/dist/chunks/structured-list-lqhD2RqL.js +0 -234
  194. package/dist/chunks/tabs-DixpRz83.js +0 -58
  195. package/dist/chunks/tabs-DkIGB3cC.js +0 -316
  196. package/dist/chunks/tag-DpezbQqm.js +0 -93
  197. package/dist/chunks/tag-rQOD2v2s.js +0 -412
  198. package/dist/chunks/text-input-BYjtsh0H.js +0 -26
  199. package/dist/chunks/text-input-C2jRG8Lb.js +0 -72
  200. package/dist/chunks/text-input-DvygxhCJ.js +0 -4
  201. package/dist/chunks/text-input-DzSNpORC.js +0 -309
  202. package/dist/chunks/textarea-BZ34-RaT.js +0 -190
  203. package/dist/chunks/textarea-Be3YTme6.js +0 -57
  204. package/dist/chunks/tile-CQ9nINGM.js +0 -524
  205. package/dist/chunks/tile-DNWy90OU.js +0 -74
  206. package/dist/chunks/time-picker-CJ_ONMZi.js +0 -267
  207. package/dist/chunks/time-picker-DK_Lu3AK.js +0 -52
  208. package/dist/chunks/toggle-BBdusHAx.js +0 -36
  209. package/dist/chunks/toggle-Bfx6cOUM.js +0 -156
  210. package/dist/chunks/toggle-tip-CkH7fFX4.js +0 -46
  211. package/dist/chunks/toggle-tip-DF_GKfoM.js +0 -169
  212. package/dist/chunks/tooltip-COwRDvmc.js +0 -85
  213. package/dist/chunks/tooltip-DbGsUOZ8.js +0 -23
  214. package/dist/chunks/tooltip-content-BDcgoT6r.js +0 -1
  215. package/dist/chunks/tooltip-content-CkxKIMDr.js +0 -116
  216. package/dist/chunks/tree-utils-AeNlEhIR.js +0 -1
  217. package/dist/chunks/tree-view-BmoD8n0Y.js +0 -292
  218. package/dist/chunks/tree-view-Drfa7DNm.js +0 -82
  219. package/dist/chunks/unsafe-html-BP-z2WTp.js +0 -26
  220. package/dist/chunks/unsafe-html-Dego4Lbw.js +0 -1
  221. package/dist/chunks/validity-CMW3OiFU.js +0 -31
  222. package/dist/chunks/validity-zT-XWh2t.js +0 -1
  223. package/dist/chunks/zoo-Bb5HHyrn.js +0 -721
  224. package/dist/chunks/zoo-C_CBOaHL.js +0 -52
@@ -1,1399 +0,0 @@
1
- import { _ as h, a as gt, g as ft, l as bt, t as Et } from "./component-library-registry-CJ1Yb_8E.js";
2
- import { a as St, i as Wt, l as It, n as S, o as Pt, r as i, s as Ct, u as tt } from "./zoo-Bb5HHyrn.js";
3
- var kt = /* @__PURE__ */ tt(function(e, s) {
4
- return s == null || s !== s ? e : s;
5
- }), Dt = /* @__PURE__ */ It(function(e, s, n) {
6
- return kt(e, Pt(s, n));
7
- }), At = /* @__PURE__ */ tt(function(e, s) {
8
- for (var n = {}, o = 0; o < e.length; )
9
- e[o] in s && (n[e[o]] = s[e[o]]), o += 1;
10
- return n;
11
- }), yt = /* @__PURE__ */ ft(((t) => {
12
- Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
13
- var e = /* @__PURE__ */ (function(a) {
14
- return a.XS = "xs", a.SM = "sm", a.MD = "md", a.LG = "lg", a.XL = "xl", a;
15
- })({}), s = /* @__PURE__ */ (function(a) {
16
- return a.NONE = "none", a.ASCENDING = "ascending", a.DESCENDING = "descending", a;
17
- })({}), n = /* @__PURE__ */ (function(a) {
18
- return a.BI_STATES_FROM_ASCENDING = "bi-states-from-ascending", a.BI_STATES_FROM_DESCENDING = "bi-states-from-descending", a.TRI_STATES_FROM_ASCENDING = "tri-states-from-ascending", a.TRI_STATES_FROM_DESCENDING = "tri-states-from-descending", a;
19
- })({}), o = {
20
- [n.BI_STATES_FROM_ASCENDING]: [s.ASCENDING, s.DESCENDING],
21
- [n.BI_STATES_FROM_DESCENDING]: [s.DESCENDING, s.ASCENDING],
22
- [n.TRI_STATES_FROM_ASCENDING]: [
23
- s.NONE,
24
- s.ASCENDING,
25
- s.DESCENDING
26
- ],
27
- [n.TRI_STATES_FROM_DESCENDING]: [
28
- s.NONE,
29
- s.DESCENDING,
30
- s.ASCENDING
31
- ]
32
- };
33
- t.TABLE_SIZE = e, t.TABLE_SORT_CYCLE = n, t.TABLE_SORT_CYCLES = o, t.TABLE_SORT_DIRECTION = s;
34
- })), Nt = /* @__PURE__ */ h({ cdsTableWrap: () => Tt }), wt = yt(), X = (t, e, s) => {
35
- const n = customElements.get("cds-table"), o = customElements.get("cds-pagination"), a = customElements.get(n.selectorTableBatchActions);
36
- customElements.get("cds-popover");
37
- const r = e.dataBinder, l = e.pagination, p = e.skeleton, W = e.querySelector(n.selectorTableToolbarSearch), I = e.querySelector(n.selectorTableBatchActions), N = e.querySelector(n.selectorTableBody), O = [
38
- "button",
39
- "a",
40
- "input",
41
- "select",
42
- "textarea",
43
- '[role="button"]',
44
- ".cds--table-expand",
45
- ".cds--table-column-checkbox"
46
- ].join(","), j = e.querySelectorAll(n.selectorHeaderCell + "[is-sortable]"), et = e.isSortable || j.length > 0, R = /* @__PURE__ */ Symbol(), F = /* @__PURE__ */ Symbol(), w = /* @__PURE__ */ new Map(), st = (c) => {
47
- t.listen(e, "click", (d) => {
48
- const v = d.target.closest(n.selectorTableRow);
49
- if (!v || d.composedPath().some((g) => g.matches && g.matches(O))) return;
50
- d.stopPropagation();
51
- const u = i(v);
52
- t.dispatchPanelEvent(c, { ...u });
53
- });
54
- }, nt = (c) => {
55
- t.listen(e, n.eventExpandoToggle, (d) => {
56
- const v = d.target, u = v.tagName === "CDS-TABLE-HEADER-ROW", g = d.detail.expanded, b = {
57
- tableAttrs: s,
58
- ...i(v),
59
- target: v,
60
- allRows: u,
61
- didExpand: g
62
- };
63
- t.dispatchPanelEvent(c, b);
64
- });
65
- }, ot = (c) => {
66
- w.set(R, (d) => {
67
- t.dispatchPanelEvent(c, d);
68
- });
69
- }, at = (c) => {
70
- w.set(F, (d) => {
71
- const v = d.detail.selectedRows, u = Math.min(v.length, I.totalRowsCount), g = d.target, b = i(g), P = v.map(i), D = {
72
- tableAttrs: s,
73
- ...b,
74
- target: g,
75
- selectCount: u,
76
- selection: P
77
- };
78
- t.dispatchPanelEvent(c, D);
79
- });
80
- }, rt = (c) => {
81
- t.listen(e, n.eventTableRowSelect, (d) => {
82
- const v = d.target, u = d.detail.selectedRows || [], g = u.length, b = u.map(i), P = {
83
- tableAttrs: s,
84
- ...i(v),
85
- selectCount: g,
86
- selection: b,
87
- target: v
88
- };
89
- t.dispatchPanelEvent(c, P);
90
- });
91
- }, ct = () => {
92
- t.listen(e, n.eventBeforeSort, (c) => {
93
- const d = c.target, v = c.detail.oldSortDirection, u = c.detail.sortDirection, g = i(d), b = g.sortField, P = u === wt.TABLE_SORT_DIRECTION.DESCENDING ? `-${b}` : b;
94
- c.cancelBubble = !0, c.stopPropagation(), c.preventDefault(), N.innerHTML = "", p && p.show(), j.forEach((A, f) => {
95
- A === d ? (A.setAttribute("sort-active", "true"), A.setAttribute("sort-direction", u)) : (A.removeAttribute("sort-active"), A.setAttribute("sort-direction", "none"));
96
- });
97
- const D = { ordering: P };
98
- r.fetchData(D).then(() => {
99
- l.setData(r), p && p.hide();
100
- }), w.has(R) && w.get(R)({
101
- tableAttrs: s,
102
- ...g,
103
- sortNow: u,
104
- sortWas: v,
105
- sortField: b,
106
- ordering: P,
107
- target: d
108
- });
109
- });
110
- }, it = () => {
111
- t.listen(e, n.eventTableRowSelectAll, (c) => {
112
- c.detail.selectedRows.length === 0 && e.querySelectorAll(n.selectorTableRow).forEach((d) => {
113
- d.disabled = !1, d.selected = !1;
114
- }), w.has(F) && w.get(F)(c);
115
- });
116
- }, lt = () => {
117
- t.listen(e, n.eventBeforeChangeSelectionAll, (c) => {
118
- c.stopPropagation(), c.detail.callback && c.detail.callback();
119
- });
120
- }, dt = (c) => {
121
- const d = e.querySelector("cds-table-header-row");
122
- t.listen(c, a.eventClickSelectAll, (v) => {
123
- v.stopPropagation(), d.dispatchEvent(new CustomEvent(n.eventBeforeChangeSelectionAll, {
124
- bubbles: !0,
125
- cancelable: !0,
126
- composed: !0,
127
- detail: {
128
- selected: !0,
129
- callback: () => {
130
- c.selectedRowsCount = c.totalRowsCount, e.querySelectorAll(n.selectorTableRow).forEach((u) => {
131
- u.disabled = !0;
132
- });
133
- }
134
- }
135
- }));
136
- });
137
- }, pt = (c) => {
138
- t.listen(c, "keydown", (d) => {
139
- if (d.key === "Enter") {
140
- p && p.show(), l.totalItems = 0, e.querySelector("cds-table-body").replaceChildren();
141
- const v = {
142
- search: c.value || "",
143
- offset: 0
144
- };
145
- r.fetchData(v).then(() => {
146
- l.setData(r), p && p.hide();
147
- });
148
- }
149
- });
150
- }, vt = (c) => {
151
- t.listen(c, n.eventSearchInput, (d) => {
152
- if ((d.detail.value || "") === "") {
153
- const v = {
154
- search: "",
155
- offset: 0
156
- };
157
- p && p.show(), r.fetchData(v).then(() => {
158
- p && p.hide(), l.setData(r);
159
- });
160
- }
161
- });
162
- }, ut = (c) => {
163
- c.caret = !1;
164
- const d = c.querySelector("cds-icon-button, button:not([slot])"), v = c.querySelectorAll("cds-checkbox"), u = c.querySelectorAll("cds-modal-footer-button"), g = [...c.querySelectorAll("cds-checkbox-group")].map(i).map(Dt("noop", [
165
- "zoo",
166
- "filter",
167
- "field"
168
- ])).reduce((f, E) => (f[E] = null, f), { offset: 0 });
169
- if (!d || !u) {
170
- console.error("Improperly configured Batch Filter popover");
171
- return;
172
- }
173
- new MutationObserver(() => {
174
- c.classList.toggle("cds--overflow-menu--open", c.open);
175
- }).observe(c, {
176
- attributes: !0,
177
- attributeFilter: ["open"]
178
- });
179
- const b = /* @__PURE__ */ Symbol(), P = /* @__PURE__ */ Symbol(), D = [...u].reduce((f, E, y) => (E.hasAttribute("reset-filter") && f.set(b, E), E.hasAttribute("apply-filter") && f.set(P, E), f), /* @__PURE__ */ new Map()), A = () => {
180
- const f = /* @__PURE__ */ new Map();
181
- return v.forEach((E) => {
182
- const y = E.getAttribute("id");
183
- if (!y || !y.includes(":")) return;
184
- const [_, x] = y.split(":");
185
- f.has(_) || f.set(_, []), E.checked && f.get(_).push(x);
186
- }), f;
187
- };
188
- if (D.has(b)) {
189
- const f = (E) => E.checked = !1;
190
- t.listen(D.get(b), "click", (E) => {
191
- E.stopPropagation(), v.forEach(f), p && p.show(), r.fetchData(g).then(() => {
192
- l && l.setData(r), p && p.hide(), c.open = !1;
193
- });
194
- });
195
- }
196
- D.has(P) && t.listen(D.get(P), "click", (f) => {
197
- f.stopPropagation();
198
- const E = [...A()].reduce((y, [_, x]) => (y[_] = x === [] ? null : x, y), { offset: 0 });
199
- p && p.show(), r.fetchData(E).then(() => {
200
- l && l.setData(r), p && p.hide(), c.open = !1;
201
- });
202
- }), t.listen(d, "click", (f) => {
203
- f.stopPropagation(), c.open = !c.open, c.classList.toggle("cds--overflow-menu--open", c.open);
204
- });
205
- }, mt = () => {
206
- t.listen(l, o.eventPageSizeChanged, (c) => {
207
- const d = {
208
- limit: l.pageSize,
209
- offset: 0
210
- };
211
- r.fetchData(d).then(() => {
212
- l.setData(r);
213
- });
214
- });
215
- }, ht = () => {
216
- let c = null;
217
- t.listen(l, o.eventChangeCurrent, (d) => {
218
- const { page: v } = d.detail, u = l.pageSize, g = (v - 1) * u;
219
- if (g !== c) {
220
- c = g;
221
- const b = {
222
- limit: u,
223
- offset: g
224
- };
225
- r.fetchData(b).then(() => {
226
- l.setData(r), p && p.hide();
227
- });
228
- }
229
- });
230
- };
231
- r && l && (mt(), ht()), r && W && (pt(W), vt(W));
232
- const V = e.querySelector(n.selectorTableToolbarContent);
233
- if (V) {
234
- const c = V.querySelectorAll("cds-popover[data-batch-filter]");
235
- r && c && c.forEach(ut);
236
- }
237
- e.isSelectable && (it(), lt(), I && dt(I)), r && et && ct();
238
- const $ = { zoo: { event: {
239
- row: {
240
- click: st,
241
- expand: nt,
242
- check: {
243
- one: rt,
244
- all: at
245
- }
246
- },
247
- column: { sort: ot }
248
- } } };
249
- bt(s).forEach(([c, d]) => {
250
- Ct(c, $) && St(c, $)(d);
251
- });
252
- }, _t = (t) => {
253
- const e = document.createElement("cds-pagination");
254
- return e.backwardText = "Previous page", e.forwardText = "Next page", e.itemsPerPageText = "Items per page:", e.pageSize = t.limit, e.size = "lg", [
255
- 10,
256
- 25,
257
- 50,
258
- 100,
259
- 500
260
- ].forEach((s) => {
261
- const n = document.createElement("cds-select-item");
262
- n.value = s.toString(), n.textContent = s.toString(), e.appendChild(n);
263
- }), e.setData = (s) => {
264
- if (s.isPaginated) {
265
- const { count: n } = At(["count"], s.data);
266
- e.pagesUnknown = Math.ceil(n / s.limit) > 100, e.totalItems = n, e.pagesUnknown ? e.formatStatusWithIndeterminateTotal = ({ start: o, end: a }) => `${o}–${a} of ${n} item${n <= 1 ? "" : "s"}` : delete e.formatStatusWithIndeterminateTotal;
267
- }
268
- }, e;
269
- }, xt = (t) => {
270
- if (!t.parentNode) {
271
- console.error("[Carbon Table] Cannot create skeleton: table has no parent node");
272
- return;
273
- }
274
- const e = !!t.querySelector("cds-table-header-title"), s = !!t.querySelector("cds-table-header-description"), n = !!t.querySelector("cds-table-toolbar"), o = [...t.querySelectorAll("cds-table-header-cell")].length, a = t.hasAttribute("zebra"), r = t.getAttribute("size"), l = document.createElement("cds-table-skeleton");
275
- l.showHeader = e || s, l.showToolbar = n, l.zebra = a, l.columnCount = o, l.size = r, l.show = () => l.classList.remove("hidden"), l.hide = () => l.classList.add("hidden");
276
- const p = document.createElement("div");
277
- return p.classList.add("zoo-datatable-skeleton-wrapper"), t.parentNode.insertBefore(p, t), p.appendChild(l), p.appendChild(t), l;
278
- }, Mt = (t, e) => {
279
- const s = e.getAttribute("zoo-url-api"), n = parseInt(e.getAttribute("data-page-size") || 25, 10);
280
- if (s) return new Wt(t, s, e, { urlParams: { limit: n } });
281
- }, Tt = {
282
- selector: "cds-table",
283
- init: function(t) {
284
- const e = i(t), s = this, n = Mt(s, t);
285
- if (gt(n)) {
286
- t.dataBinder = n;
287
- const o = xt(t);
288
- t.skeleton = o;
289
- const a = _t(n);
290
- t.pagination = a, t.after(a), n.fetchData().then((r) => {
291
- o.hide(), a.setData(n), X(s, t, e);
292
- });
293
- } else X(s, t, e);
294
- }
295
- }, Bt = /* @__PURE__ */ h({ cdsPaginationWrap: () => Ot }), Ot = {
296
- selector: "cds-pagination",
297
- init: function(t) {
298
- const e = this, s = customElements.get("cds-pagination");
299
- let n = null;
300
- e.listen(t, s.eventChangeCurrent, (o) => {
301
- const a = o.detail.page, r = t.pageSize, l = (a - 1) * r;
302
- l !== n && (n = l, e.dispatchPanelEvent("pagination-changed-current", { detail: {
303
- page: a,
304
- pageSize: r,
305
- action: "page-change"
306
- } }));
307
- }), e.listen(t, s.eventPageSizeChanged, (o) => {
308
- const a = t.pageSize;
309
- n = null, e.dispatchPanelEvent("pagination-changed-page-size", { detail: {
310
- page: 1,
311
- pageSize: a,
312
- action: "page-size-change"
313
- } });
314
- });
315
- }
316
- }, Rt = /* @__PURE__ */ h({
317
- cdsModalBodyContentWrap: () => Ut,
318
- cdsModalBodyWrap: () => Ht,
319
- cdsModalCloseButWrap: () => Lt,
320
- cdsModalFooterButWrap: () => Vt,
321
- cdsModalFooterWrap: () => jt,
322
- cdsModalHeaderWrap: () => zt,
323
- cdsModalHeadingWrap: () => qt,
324
- cdsModalLabelWrap: () => Gt,
325
- cdsModalWrap: () => Ft
326
- }), Ft = {
327
- selector: "cds-modal",
328
- init: function(t) {
329
- const e = customElements.get("cds-modal"), s = i(t), n = S(t, "open-event", "event");
330
- n && this.listen(t, "cds-modal-beingopened", (r) => {
331
- this.dispatchPanelEvent(n, {
332
- ...s,
333
- action: "opened"
334
- });
335
- });
336
- const o = t.getAttribute("before-close-event");
337
- o && this.listen(t, e.eventBeforeClose, (r) => {
338
- this.dispatchPanelEvent(o, {
339
- ...s,
340
- action: "closing",
341
- cancelable: !0
342
- });
343
- }), this.listen(t, e.eventClose, (r) => {
344
- this.dispatchPanelEvent("destroy_me", {
345
- ...s,
346
- action: "closed",
347
- triggeredBy: r.detail?.triggeredBy
348
- });
349
- });
350
- const a = S(t, "primary-event", "event");
351
- a && this.listen(t, "cds-modal-primary-focus", (r) => {
352
- this.dispatchPanelEvent(a, {
353
- ...s,
354
- action: "primary"
355
- });
356
- });
357
- }
358
- }, zt = { selector: "cds-modal-header" }, qt = { selector: "cds-modal-heading" }, Gt = { selector: "cds-modal-label" }, Lt = { selector: "cds-modal-close-button" }, Ht = { selector: "cds-modal-body" }, Ut = { selector: "cds-modal-body-content" }, jt = { selector: "cds-modal-footer" }, Vt = {
359
- selector: "cds-modal-footer-button",
360
- init: function(t) {
361
- const e = i(t);
362
- if (t.getAttribute("type") === "submit") {
363
- this.listen(t, "click", (n) => {
364
- let o = t.closest("form");
365
- if (!o) {
366
- const a = t.getAttribute("form");
367
- a && (o = document.getElementById(a));
368
- }
369
- o && o.requestSubmit();
370
- });
371
- return;
372
- }
373
- const s = e.event;
374
- s && this.listen(t, "click", (n) => {
375
- n.stopPropagation(), this.dispatchPanelEvent(s, e);
376
- });
377
- }
378
- }, $t = /* @__PURE__ */ h({
379
- cdsMenuButtonWrap: () => Jt,
380
- cdsMenuWrap: () => Xt
381
- }), Xt = {
382
- selector: "cds-menu",
383
- init: function(t) {
384
- const e = i(t), s = S(t, "open-event");
385
- s && this.listen(t, "cds-menu-opened", (o) => {
386
- this.dispatchPanelEvent(s, {
387
- ...e,
388
- action: "opened"
389
- });
390
- });
391
- const n = S(t, "close-event");
392
- n && this.listen(t, "cds-menu-closed", (o) => {
393
- this.dispatchPanelEvent(n, {
394
- ...e,
395
- action: "closed"
396
- });
397
- }), this.listen(t, "click", (o) => {
398
- if (o.target.tagName === "CDS-MENU-ITEM") {
399
- const a = i(o.target), r = a.event || e.event;
400
- r && (o.stopPropagation(), this.dispatchPanelEvent(r, {
401
- ...e,
402
- ...a
403
- }));
404
- }
405
- }), this.listen(t, "cds-item-changed", (o) => {
406
- const a = o.detail.triggeredBy, r = i(a), l = r.event || e.event;
407
- l && this.dispatchPanelEvent(l, {
408
- ...e,
409
- ...r,
410
- action: "selection-changed"
411
- });
412
- });
413
- }
414
- }, Jt = {
415
- selector: "cds-menu-button",
416
- init: function(t) {
417
- const e = i(t), s = t.querySelector("cds-menu");
418
- s && this.listen(s, "click", (n) => {
419
- if (n.target.tagName === "CDS-MENU-ITEM") {
420
- const o = i(n.target), a = o.event || e.event;
421
- a && (n.stopPropagation(), this.dispatchPanelEvent(a, {
422
- ...e,
423
- ...o
424
- }));
425
- }
426
- });
427
- }
428
- }, Kt = /* @__PURE__ */ h({
429
- cdsButFabWrap: () => te,
430
- cdsButtonWrap: () => Qt,
431
- cdsComboButWrap: () => se,
432
- cdsCopyButWrap: () => ee,
433
- cdsIconButToggleWrap: () => Zt,
434
- cdsIconButWrap: () => Yt
435
- }), Qt = {
436
- selector: "cds-button",
437
- init: function(t) {
438
- const e = i(t);
439
- if (t.getAttribute("type") === "submit") {
440
- this.listen(t, "click", (n) => {
441
- let o = t.closest("form");
442
- if (!o) {
443
- const a = t.getAttribute("form");
444
- a && (o = document.getElementById(a));
445
- }
446
- o && o.requestSubmit();
447
- });
448
- return;
449
- }
450
- const s = e.event;
451
- s && this.listen(t, "click", (n) => {
452
- n.stopPropagation(), this.dispatchPanelEvent(s, i(t));
453
- });
454
- }
455
- }, Yt = {
456
- selector: "cds-icon-button:not([data-toggle])",
457
- event: "click",
458
- getData: (t, e) => e
459
- }, Zt = {
460
- selector: "cds-icon-button[data-toggle]",
461
- init: function(t) {
462
- const e = i(t);
463
- e.event && this.listen(t, "click", (s) => {
464
- s.stopPropagation(), t.isSelected = !t.isSelected, this.dispatchPanelEvent(e.event, {
465
- ...e,
466
- isOn: t.isSelected
467
- });
468
- });
469
- }
470
- }, te = {
471
- selector: "cds-button[data-fab]",
472
- event: "click",
473
- getData: (t, e) => e
474
- }, ee = {
475
- selector: "cds-copy-button",
476
- init: function(t) {
477
- const e = i(t), s = e.event;
478
- s && this.listen(t, "click", (o) => {
479
- o.stopPropagation(), this.dispatchPanelEvent(s, {
480
- ...e,
481
- action: "copy"
482
- });
483
- });
484
- const n = t.getAttribute("success-event");
485
- if (n) {
486
- const o = new MutationObserver(() => {
487
- t.hasAttribute("feedback-shown") && this.dispatchPanelEvent(n, {
488
- ...e,
489
- action: "copied"
490
- });
491
- });
492
- o.observe(t, {
493
- attributes: !0,
494
- attributeFilter: ["feedback-shown"]
495
- }), t._copyObserver = o;
496
- }
497
- }
498
- }, se = {
499
- selector: "cds-combo-button",
500
- init: function(t) {
501
- const e = i(t);
502
- e.event && this.listen(t, "click", (n) => {
503
- const o = n.composedPath(), a = o.some((l) => l.tagName === "CDS-MENU-ITEM"), r = o.some((l) => l.tagName === "CDS-ICON-BUTTON");
504
- !a && !r && (n.stopPropagation(), this.dispatchPanelEvent(e.event, {
505
- ...e,
506
- action: "primary"
507
- }));
508
- });
509
- const s = t.querySelector("cds-menu");
510
- s && this.listen(s, "click", (n) => {
511
- if (n.target.tagName === "CDS-MENU-ITEM") {
512
- const o = i(n.target), a = o.event || S(t, "menu-event", "event");
513
- a && this.dispatchPanelEvent(a, {
514
- ...e,
515
- ...o,
516
- action: "menu-item"
517
- });
518
- }
519
- });
520
- }
521
- }, ne = /* @__PURE__ */ h({
522
- cdsComboBoxWrap: () => ae,
523
- cdsDropdownWrap: () => oe,
524
- cdsMultiSelectWrap: () => re
525
- }), oe = {
526
- selector: "cds-dropdown",
527
- init: function(t) {
528
- const e = customElements.get("cds-dropdown"), s = i(t), n = s.event;
529
- n && this.listen(t, e.eventSelect, (a) => {
530
- this.dispatchPanelEvent(n, {
531
- ...s,
532
- value: t.value,
533
- selectedValue: a.detail?.item?.value,
534
- selectedText: a.detail?.item?.textContent?.trim()
535
- });
536
- });
537
- const o = t.getAttribute("toggle-event");
538
- o && this.listen(t, e.eventToggle, (a) => {
539
- this.dispatchPanelEvent(o, {
540
- ...s,
541
- open: t.hasAttribute("open")
542
- });
543
- });
544
- }
545
- }, ae = {
546
- selector: "cds-combo-box",
547
- init: function(t) {
548
- const e = customElements.get("cds-combo-box"), s = i(t), n = s.event;
549
- n && this.listen(t, e.eventSelect, (a) => {
550
- const r = a.detail?.item;
551
- this.dispatchPanelEvent(n, {
552
- ...s,
553
- value: t.value,
554
- selectedValue: r?.value,
555
- selectedText: r?.textContent?.trim()
556
- });
557
- });
558
- const o = t.getAttribute("toggle-event");
559
- o && this.listen(t, e.eventToggle, (a) => {
560
- this.dispatchPanelEvent(o, {
561
- ...s,
562
- open: t.hasAttribute("open")
563
- });
564
- });
565
- }
566
- }, re = {
567
- selector: "cds-multi-select",
568
- init: function(t) {
569
- const e = customElements.get("cds-multi-select"), s = i(t), n = s.event;
570
- n && this.listen(t, e.eventSelect, (a) => {
571
- const r = t.value ? t.value.split(",") : [];
572
- this.dispatchPanelEvent(n, {
573
- ...s,
574
- selectedItems: r
575
- });
576
- });
577
- const o = t.getAttribute("toggle-event");
578
- o && this.listen(t, e.eventToggle, (a) => {
579
- this.dispatchPanelEvent(o, {
580
- ...s,
581
- open: t.hasAttribute("open")
582
- });
583
- });
584
- }
585
- }, ce = /* @__PURE__ */ h({
586
- cdsDatePickerWrap: () => ie,
587
- cdsTimePickerWrap: () => le
588
- }), ie = {
589
- selector: "cds-date-picker",
590
- init: function(t) {
591
- const e = customElements.get("cds-date-picker"), s = i(t), n = t.querySelector('cds-date-picker-input[kind="from"]'), o = t.querySelector('cds-date-picker-input[kind="to"]'), a = n && o, r = s.event;
592
- r && this.listen(t, e.eventChange, (p) => {
593
- let W;
594
- a ? W = {
595
- from: n.value || "",
596
- to: o.value || ""
597
- } : W = t.value, this.dispatchPanelEvent(r, {
598
- ...s,
599
- value: W
600
- });
601
- });
602
- const l = t.getAttribute("error-event");
603
- l && this.listen(t, e.eventFlatpickrError, (p) => {
604
- this.dispatchPanelEvent(l, {
605
- ...s,
606
- error: p.detail
607
- });
608
- });
609
- }
610
- }, le = {
611
- selector: "cds-time-picker",
612
- event: "cds-time-picker-changed",
613
- getData: (t, e, s) => ({
614
- ...e,
615
- value: s.value
616
- })
617
- }, de = /* @__PURE__ */ h({ cdsFileUploaderWrap: () => pe }), pe = {
618
- selector: "cds-file-uploader",
619
- init: function(t) {
620
- const e = i(t), s = e.event;
621
- if (s) {
622
- const o = t.querySelector('input[type="file"]');
623
- o && this.listen(o, "change", (a) => {
624
- this.dispatchPanelEvent(s, {
625
- ...e,
626
- files: Array.from(a.target.files || [])
627
- });
628
- });
629
- }
630
- const n = t.getAttribute("delete-event");
631
- n && this.listen(t, "cds-file-uploader-item-deleted", (o) => {
632
- this.dispatchPanelEvent(n, {
633
- ...e,
634
- fileName: o.detail?.fileName,
635
- fileId: o.detail?.fileId
636
- });
637
- });
638
- }
639
- }, ve = /* @__PURE__ */ h({
640
- cdsAccordionWrap: () => me,
641
- cdsContentSwitcherWrap: () => he,
642
- cdsTabsWrap: () => ue
643
- }), ue = {
644
- selector: "cds-tabs",
645
- init: function(t) {
646
- const e = customElements.get("cds-tabs"), s = i(t), n = t.getAttribute("before-select-event");
647
- n && this.listen(t, e.eventBeforeSelect, (a) => {
648
- this.dispatchPanelEvent(n, {
649
- ...s,
650
- tabValue: a.detail.value,
651
- cancelable: !0
652
- });
653
- });
654
- const o = s.event;
655
- o && this.listen(t, e.eventSelect, (a) => {
656
- const r = a.detail.item, l = i(r);
657
- this.dispatchPanelEvent(o, {
658
- ...s,
659
- ...l,
660
- tabValue: a.detail.value
661
- });
662
- });
663
- }
664
- }, me = {
665
- selector: "cds-accordion",
666
- init: function(t) {
667
- const e = customElements.get("cds-accordion-item"), s = i(t);
668
- [...t.querySelectorAll("cds-accordion-item")].forEach((n) => {
669
- const o = i(n), a = o.event || s.event;
670
- a && this.listen(n, e.eventToggle, (r) => {
671
- this.dispatchPanelEvent(a, {
672
- ...s,
673
- ...o,
674
- open: r.detail.open
675
- });
676
- });
677
- });
678
- }
679
- }, he = {
680
- selector: "cds-content-switcher",
681
- init: function(t) {
682
- const e = customElements.get("cds-content-switcher"), s = i(t), n = t.getAttribute("before-select-event");
683
- n && this.listen(t, e.eventBeforeSelect, (a) => {
684
- this.dispatchPanelEvent(n, {
685
- ...s,
686
- value: a.detail.value,
687
- cancelable: !0
688
- });
689
- });
690
- const o = s.event;
691
- o && this.listen(t, e.eventSelect, (a) => {
692
- const r = a.detail.item, l = i(r);
693
- this.dispatchPanelEvent(o, {
694
- ...s,
695
- ...l,
696
- value: r.getAttribute("value")
697
- });
698
- });
699
- }
700
- }, ge = /* @__PURE__ */ h({
701
- cdsBreadCrumbWrap: () => Ee,
702
- cdsBreadcrumbItemWrap: () => fe,
703
- cdsBreadcrumbLinkWrap: () => be
704
- }), fe = { selector: "cds-breadcrumb-item" }, be = {
705
- selector: "cds-breadcrumb-link",
706
- event: "click",
707
- getData: (t, e, s) => (t.preventDefault(), {
708
- ...e,
709
- href: s.getAttribute("href")
710
- })
711
- }, Ee = {
712
- selector: "cds-breadcrumb",
713
- init: function(t) {
714
- const e = this, s = i(t), n = s.event;
715
- if (n) {
716
- const o = (r) => {
717
- e.dispatchPanelEvent(n, {
718
- ...s,
719
- ...r
720
- });
721
- };
722
- e.listen(t, "click", (r) => {
723
- const l = r.target.closest("cds-breadcrumb-link");
724
- l && (r.preventDefault(), r.stopPropagation(), o(i(l)));
725
- });
726
- const a = t.querySelector("cds-overflow-menu-body");
727
- a && e.listen(a, "cds-overflow-menu-item-clicked", (r) => {
728
- r.stopPropagation(), o(i(r.target));
729
- });
730
- }
731
- }
732
- }, Se = /* @__PURE__ */ h({
733
- cdsNumberInputWrap: () => Pe,
734
- cdsPasswordInputWrap: () => Ce,
735
- cdsSearchWrap: () => ke,
736
- cdsTextAreaWrap: () => Ie,
737
- cdsTextInputWrap: () => We
738
- }), We = {
739
- selector: "cds-text-input",
740
- multiEvent: !0,
741
- events: [{
742
- type: "input",
743
- attrName: "event",
744
- getData: (t, e) => ({
745
- ...e,
746
- value: t.currentTarget.value
747
- })
748
- }, {
749
- type: "change",
750
- attrName: "change-event",
751
- getData: (t, e) => ({
752
- ...e,
753
- value: t.currentTarget.value
754
- })
755
- }]
756
- }, Ie = {
757
- selector: "cds-textarea",
758
- multiEvent: !0,
759
- events: [{
760
- type: "input",
761
- attrName: "event",
762
- getData: (t, e) => ({
763
- ...e,
764
- value: t.currentTarget.value
765
- })
766
- }, {
767
- type: "change",
768
- attrName: "change-event",
769
- getData: (t, e) => ({
770
- ...e,
771
- value: t.currentTarget.value
772
- })
773
- }]
774
- }, Pe = {
775
- selector: "cds-number-input",
776
- event: "cds-number-input",
777
- getData: (t, e, s) => ({
778
- ...e,
779
- value: t.detail.value,
780
- direction: t.detail.direction
781
- })
782
- }, Ce = {
783
- selector: "cds-password-input",
784
- multiEvent: !0,
785
- events: [{
786
- type: "input",
787
- attrName: "event",
788
- getData: (t, e) => ({
789
- ...e,
790
- value: t.currentTarget.value
791
- })
792
- }, {
793
- type: "change",
794
- attrName: "change-event",
795
- getData: (t, e) => ({
796
- ...e,
797
- value: t.currentTarget.value
798
- })
799
- }]
800
- }, ke = {
801
- selector: "cds-search",
802
- event: "cds-search-input",
803
- getData: (t, e, s) => ({
804
- ...e,
805
- value: s.value
806
- })
807
- }, De = /* @__PURE__ */ h({
808
- cdsCheckboxWrap: () => Ae,
809
- cdsRadioButGroupWrap: () => ye,
810
- cdsSelectWrap: () => we,
811
- cdsSliderWrap: () => _e,
812
- cdsToggleWrap: () => Ne
813
- }), Ae = {
814
- selector: "cds-checkbox",
815
- event: "cds-checkbox-changed",
816
- getData: (t, e, s) => ({
817
- ...e,
818
- checked: t.detail.checked,
819
- value: s.value
820
- })
821
- }, ye = {
822
- selector: "cds-radio-button-group",
823
- event: "cds-radio-button-group-changed",
824
- getData: (t, e) => ({
825
- ...e,
826
- value: t.detail?.value
827
- })
828
- }, Ne = {
829
- selector: "cds-toggle",
830
- event: "cds-toggle-changed",
831
- getData: (t, e) => ({
832
- ...e,
833
- isOn: t.detail.checked,
834
- value: t.detail.checked
835
- })
836
- }, we = {
837
- selector: "cds-select",
838
- event: "cds-select-selected",
839
- getData: (t, e) => ({
840
- ...e,
841
- value: t.detail.value
842
- })
843
- }, _e = {
844
- selector: "cds-slider",
845
- init: function(t) {
846
- const e = i(t), s = e.event;
847
- s && this.listen(t, "cds-slider-changed", (o) => {
848
- this.dispatchPanelEvent(s, {
849
- ...e,
850
- value: o.detail.value
851
- });
852
- });
853
- const n = t.getAttribute("input-event");
854
- n && this.listen(t, "cds-slider-input-changed", (o) => {
855
- this.dispatchPanelEvent(n, {
856
- ...e,
857
- value: o.detail.value
858
- });
859
- });
860
- }
861
- }, xe = /* @__PURE__ */ h({
862
- cdsFilterTagWrap: () => Be,
863
- cdsSDismissibleTagWrap: () => Te,
864
- cdsTagsWrap: () => Me
865
- }), Me = {
866
- selector: "cds-tag",
867
- event: "click",
868
- getData: (t, e) => e
869
- }, Te = {
870
- selector: "cds-dismissible-tag",
871
- init: function(t) {
872
- const e = i(t), s = t.getAttribute("click-event");
873
- s && this.listen(t, "click", (o) => {
874
- o.target.closest("button") || this.dispatchPanelEvent(s, { ...e });
875
- });
876
- const n = e.event;
877
- n && this.listen(t, "cds-dismissible-tag-closed", (o) => {
878
- this.dispatchPanelEvent(n, {
879
- ...e,
880
- action: "closed"
881
- });
882
- });
883
- }
884
- }, Be = {
885
- selector: "cds-filter-tag",
886
- event: "cds-filter-tag-closed",
887
- getData: (t, e) => ({
888
- ...e,
889
- action: "remove"
890
- })
891
- }, Oe = /* @__PURE__ */ h({
892
- cdsOverflowMenuWrap: () => Re,
893
- cdsStructuredListWrap: () => Fe,
894
- cdsTreeViewWrap: () => ze
895
- }), Re = {
896
- selector: "cds-overflow-menu",
897
- init: function(t) {
898
- const e = i(t), s = e.event, n = t.querySelector("cds-overflow-menu-body");
899
- s && n && this.listen(n, "cds-overflow-menu-item-clicked", (o) => {
900
- o.stopPropagation();
901
- const a = i(o.target);
902
- this.dispatchPanelEvent(s, {
903
- ...e,
904
- ...a
905
- });
906
- });
907
- }
908
- }, Fe = {
909
- selector: "cds-structured-list",
910
- init: function(t) {
911
- const e = i(t);
912
- [...t.querySelectorAll("cds-structured-list-row")].forEach((s) => {
913
- const n = i(s), o = n.event || e.event;
914
- o && this.listen(s, "click", (a) => {
915
- a.stopPropagation(), this.dispatchPanelEvent(o, {
916
- ...e,
917
- ...n
918
- });
919
- });
920
- }), t.hasAttribute("selection") && this.listen(t, "cds-structured-list-selected", (s) => {
921
- const n = s.detail.row, o = i(n), a = e.event;
922
- a && this.dispatchPanelEvent(a, {
923
- ...e,
924
- ...o
925
- });
926
- });
927
- }
928
- }, ze = {
929
- selector: "cds-tree-view",
930
- init: function(t) {
931
- const e = i(t);
932
- this.listen(t, "cds-tree-node-selected", (n) => {
933
- const o = n.detail.node, a = i(o), r = a.event || e.event;
934
- r && this.dispatchPanelEvent(r, {
935
- ...e,
936
- ...a,
937
- nodeId: o.id,
938
- label: o.getAttribute("label")
939
- });
940
- });
941
- const s = S(t, "expand-event");
942
- s && this.listen(t, "cds-tree-node-expanded", (n) => {
943
- this.dispatchPanelEvent(s, {
944
- ...e,
945
- nodeId: n.detail.node.id,
946
- expanded: n.detail.expanded
947
- });
948
- });
949
- }
950
- }, qe = /* @__PURE__ */ h({
951
- cdsActionableNotificationWrap: () => He,
952
- cdsInlineNotificationWrap: () => Le,
953
- cdsToastNotificationWrap: () => Ge
954
- }), Ge = {
955
- selector: "cds-toast-notification",
956
- event: "cds-notification-closed",
957
- getData: (t, e) => ({
958
- ...e,
959
- action: "closed"
960
- })
961
- }, Le = {
962
- selector: "cds-inline-notification",
963
- event: "cds-notification-closed",
964
- getData: (t, e) => ({
965
- ...e,
966
- action: "closed"
967
- })
968
- }, He = {
969
- selector: "cds-actionable-notification",
970
- init: function(t) {
971
- const e = i(t), s = S(t, "close-event", "event");
972
- s && this.listen(t, "cds-notification-closed", (o) => {
973
- this.dispatchPanelEvent(s, {
974
- ...e,
975
- action: "closed"
976
- });
977
- });
978
- const n = S(t, "action-event");
979
- n && this.listen(t, "cds-notification-actioned", (o) => {
980
- this.dispatchPanelEvent(n, {
981
- ...e,
982
- action: "actioned"
983
- });
984
- });
985
- }
986
- }, Ue = /* @__PURE__ */ h({
987
- cdsClickableTileWrap: () => je,
988
- cdsExpandableTileWrap: () => Ve,
989
- cdsRadioTileWrap: () => Xe,
990
- cdsSelectableTileWrap: () => $e
991
- }), je = {
992
- selector: "cds-clickable-tile",
993
- event: "click",
994
- getData: (t, e) => ({
995
- ...e,
996
- href: t.currentTarget.getAttribute("href")
997
- })
998
- }, Ve = {
999
- selector: "cds-expandable-tile",
1000
- init: function(t) {
1001
- const e = i(t), s = t.getAttribute("before-toggle-event");
1002
- s && this.listen(t, "cds-expandable-tile-beingtoggled", (o) => {
1003
- this.dispatchPanelEvent(s, {
1004
- ...e,
1005
- expanded: o.detail.expanded,
1006
- cancelable: !0
1007
- });
1008
- });
1009
- const n = e.event;
1010
- n && this.listen(t, "cds-expandable-tile-toggled", (o) => {
1011
- this.dispatchPanelEvent(n, {
1012
- ...e,
1013
- expanded: o.detail.expanded
1014
- });
1015
- });
1016
- }
1017
- }, $e = {
1018
- selector: "cds-selectable-tile",
1019
- event: "cds-selectable-tile-changed",
1020
- getData: (t, e, s) => ({
1021
- ...e,
1022
- selected: t.detail.selected,
1023
- value: s.value
1024
- })
1025
- }, Xe = {
1026
- selector: "cds-radio-tile",
1027
- event: "cds-selectable-tile-changed",
1028
- getData: (t, e, s) => ({
1029
- ...e,
1030
- selected: t.detail.selected,
1031
- value: s.value
1032
- })
1033
- }, Je = /* @__PURE__ */ h({
1034
- cdsInlineLoadingWrap: () => Ye,
1035
- cdsProgressBarWrap: () => Ke,
1036
- cdsProgressIndicatorWrap: () => Qe
1037
- }), Ke = {
1038
- selector: "cds-progress-bar",
1039
- init: function(t) {
1040
- const e = i(t);
1041
- if (e.event) {
1042
- const s = new MutationObserver(() => {
1043
- const n = parseFloat(t.getAttribute("value") || "0");
1044
- n >= parseFloat(t.getAttribute("max") || "100") && this.dispatchPanelEvent(e.event, {
1045
- ...e,
1046
- value: n,
1047
- status: "complete"
1048
- });
1049
- });
1050
- s.observe(t, {
1051
- attributes: !0,
1052
- attributeFilter: ["value"]
1053
- }), t._progressObserver = s;
1054
- }
1055
- }
1056
- }, Qe = {
1057
- selector: "cds-progress-indicator",
1058
- init: function(t) {
1059
- const e = i(t);
1060
- this.listen(t, "cds-progress-step-click", (s) => {
1061
- const n = s.target, o = i(n), a = o.event || e.event;
1062
- a && this.dispatchPanelEvent(a, {
1063
- ...e,
1064
- ...o,
1065
- stepIndex: n.getAttribute("data-index"),
1066
- stepLabel: n.getAttribute("label")
1067
- });
1068
- });
1069
- }
1070
- }, Ye = {
1071
- selector: "cds-inline-loading",
1072
- init: function(t) {
1073
- const e = i(t), s = e.event;
1074
- s && this.listen(t, "cds-inline-loading-onsuccess", (o) => {
1075
- this.dispatchPanelEvent(s, {
1076
- ...e,
1077
- status: "finished"
1078
- });
1079
- });
1080
- const n = t.getAttribute("status-event");
1081
- if (n) {
1082
- const o = new MutationObserver((a) => {
1083
- a.forEach((r) => {
1084
- if (r.attributeName === "status") {
1085
- const l = t.getAttribute("status");
1086
- this.dispatchPanelEvent(n, {
1087
- ...e,
1088
- status: l
1089
- });
1090
- }
1091
- });
1092
- });
1093
- o.observe(t, {
1094
- attributes: !0,
1095
- attributeFilter: ["status"]
1096
- }), t._statusObserver = o;
1097
- }
1098
- }
1099
- }, Ze = /* @__PURE__ */ h({
1100
- cdsPopoverWrap: () => es,
1101
- cdsToggletipWrap: () => ss,
1102
- cdsTooltipWrap: () => ts
1103
- }), ts = {
1104
- selector: "cds-tooltip",
1105
- init: function(t) {
1106
- const e = i(t), s = S(t, "open-event");
1107
- s && this.listen(t, "cds-tooltip-beingopened", (o) => {
1108
- this.dispatchPanelEvent(s, {
1109
- ...e,
1110
- action: "opened"
1111
- });
1112
- });
1113
- const n = S(t, "close-event");
1114
- n && this.listen(t, "cds-tooltip-closed", (o) => {
1115
- this.dispatchPanelEvent(n, {
1116
- ...e,
1117
- action: "closed"
1118
- });
1119
- });
1120
- }
1121
- }, es = {
1122
- selector: "cds-popover",
1123
- init: function(t) {
1124
- const e = i(t), s = S(t, "open-event");
1125
- s && this.listen(t, "cds-popover-beingopened", (o) => {
1126
- this.dispatchPanelEvent(s, {
1127
- ...e,
1128
- action: "opened"
1129
- });
1130
- });
1131
- const n = S(t, "close-event");
1132
- n && this.listen(t, "cds-popover-closed", (o) => {
1133
- this.dispatchPanelEvent(n, {
1134
- ...e,
1135
- action: "closed"
1136
- });
1137
- });
1138
- }
1139
- }, ss = {
1140
- selector: "cds-toggletip",
1141
- init: function(t) {
1142
- const e = i(t);
1143
- if (e.event) {
1144
- const s = new MutationObserver((n) => {
1145
- n.forEach((o) => {
1146
- if (o.attributeName === "open") {
1147
- const a = t.hasAttribute("open");
1148
- this.dispatchPanelEvent(e.event, {
1149
- ...e,
1150
- action: a ? "opened" : "closed",
1151
- open: a
1152
- });
1153
- }
1154
- });
1155
- });
1156
- s.observe(t, {
1157
- attributes: !0,
1158
- attributeFilter: ["open"]
1159
- }), t._toggletipObserver = s;
1160
- }
1161
- }
1162
- }, ns = /* @__PURE__ */ h({
1163
- cdsCodeSnipWrap: () => as,
1164
- cdsLinkWrap: () => os
1165
- }), os = {
1166
- selector: "cds-link",
1167
- event: "click",
1168
- getData: (t, e, s) => ({
1169
- ...e,
1170
- href: s.getAttribute("href")
1171
- })
1172
- }, as = {
1173
- selector: "cds-code-snippet",
1174
- event: "cds-copy-button-clicked",
1175
- getData: (t, e) => ({
1176
- ...e,
1177
- action: "copied"
1178
- })
1179
- }, rs = /* @__PURE__ */ h({
1180
- cdsBadgeIndicatorWrap: () => ms,
1181
- cdsFormGroupWrap: () => ls,
1182
- cdsFormItemWrap: () => is,
1183
- cdsFormWrap: () => cs,
1184
- cdsHeadingWrap: () => ps,
1185
- cdsIconIndicatorWrap: () => us,
1186
- cdsIconWrap: () => vs,
1187
- cdsLoadingWrap: () => hs,
1188
- cdsSkeletonPlaceholderWrap: () => fs,
1189
- cdsSkeletonTextWrap: () => gs,
1190
- cdsStackWrap: () => ds
1191
- }), cs = { selector: "cds-form" }, is = { selector: "cds-form-item" }, ls = { selector: "cds-form-group" }, ds = { selector: "cds-stack" }, ps = { selector: "cds-heading" }, vs = { selector: "cds-icon" }, us = { selector: "cds-icon-indicator" }, ms = { selector: "cds-badge-indicator" }, hs = { selector: "cds-loading" }, gs = { selector: "cds-skeleton-text" }, fs = { selector: "cds-skeleton-placeholder" };
1192
- function m(t) {
1193
- return Object.values(t).filter((e) => typeof e == "object" && e !== null && e.selector);
1194
- }
1195
- var bs = [
1196
- ...m(Bt),
1197
- ...m(Nt),
1198
- ...m(Rt),
1199
- ...m($t),
1200
- ...m(Kt),
1201
- ...m(ne),
1202
- ...m(ce),
1203
- ...m(de),
1204
- ...m(ve),
1205
- ...m(ge),
1206
- ...m(Se),
1207
- ...m(De),
1208
- ...m(xe),
1209
- ...m(Oe),
1210
- ...m(qe),
1211
- ...m(Ue),
1212
- ...m(Je),
1213
- ...m(Ze),
1214
- ...m(ns),
1215
- ...m(rs)
1216
- ];
1217
- function Es() {
1218
- const t = /* @__PURE__ */ new Map();
1219
- return bs.forEach((e) => {
1220
- t.set(e.selector, e);
1221
- }), t;
1222
- }
1223
- var Ss = () => import("./accordion-0mybViUv.js"), z = () => import("./breadcrumb-DB0PkiBX.js"), Ws = () => import("./stack-vrK3hQYJ.js"), Is = () => import("./structured-list-lqhD2RqL.js"), M = () => import("./tile-CQ9nINGM.js"), Ps = () => import("./tree-view-BmoD8n0Y.js"), Cs = () => import("./link-DlDoN1r0.js"), ks = () => import("./tabs-DkIGB3cC.js"), Ds = () => import("./content-switcher-DIODRHwc.js"), J = () => import("./menu-DG7s9yXJ.js").then((t) => t.t), As = () => import("./overflow-menu-CGghH3Mz.js"), q = () => import("./button-DfRkC-OR.js").then((t) => t.t), K = () => import("./icon-button-D2STrB4d.js").then((t) => t.t), ys = () => import("./combo-button-Bc3hx7VJ.js"), Ns = () => import("./copy-button-XD4reiTK.js").then((t) => t.t), ws = () => import("./checkbox-DKS7fw29.js").then((t) => t.t), _s = () => import("./radio-button-CNOPBUK8.js").then((t) => t.t), xs = () => import("./toggle-Bfx6cOUM.js"), G = () => import("./select-BifhTIxt.js"), Ms = () => import("./slider-CoHP_UJ2.js"), L = () => import("./text-input-BYjtsh0H.js"), Ts = () => import("./textarea-BZ34-RaT.js"), Bs = () => import("./number-input-CRIgLD3k.js"), Os = () => import("./password-input-NoZg_DjL.js"), Q = () => import("./search-BgSG9LA9.js"), Rs = () => import("./combo-box-Bms5blM6.js"), Fs = () => import("./dropdown-jdFaaXEa.js"), zs = () => import("./multi-select-CgDCOBWa.js"), qs = () => import("./date-picker-CXjiOkZH.js"), Gs = () => import("./time-picker-CJ_ONMZi.js"), Ls = () => import("./file-uploader-BTk1MqcJ.js"), Y = () => import("./form-DUzcwJO9.js"), Hs = () => import("./form-group-Dax3eYD4.js"), Us = () => import("./data-table-BImLEoIA.js"), Z = () => import("./pagination-D7VFRyN2.js"), js = () => import("./code-snippet-BJhK27fG.js"), H = () => import("./tag-rQOD2v2s.js"), Vs = () => import("./badge-indicator-BUdDkz6Z.js"), U = () => import("./notification-DLOgEfr6.js"), $s = () => import("./loading-xKooWNUJ.js"), Xs = () => import("./inline-loading-BIB-coVZ.js").then((t) => t.t), Js = () => import("./progress-bar-BTHREDPK.js"), Ks = () => import("./progress-indicator-BP8k-xTC.js"), Qs = () => import("./skeleton-placeholder-Czj5sAeI.js"), Ys = () => import("./skeleton-text-CZ2bSuDE.js").then((t) => t.t), C = () => import("./modal-DEGWE2iT.js"), k = () => import("./tooltip-COwRDvmc.js").then((t) => t.t), Zs = () => import("./popover-Ca4f4ZCE.js").then((t) => t.t), tn = () => import("./toggle-tip-DF_GKfoM.js"), en = () => import("./heading-BbB6mvMG.js"), sn = () => import("./icon-CINf5Icb.js"), nn = () => import("./icon-indicator-D_IHkSon.js"), B = {
1224
- "cds-table": [
1225
- k,
1226
- q,
1227
- L,
1228
- Q,
1229
- G,
1230
- Z,
1231
- Us
1232
- ],
1233
- "cds-pagination": [
1234
- G,
1235
- L,
1236
- Z
1237
- ],
1238
- "cds-button": [k, q],
1239
- "cds-icon-button:not([data-toggle])": [k, K],
1240
- "cds-icon-button[data-toggle]": [k, K],
1241
- "cds-button[data-fab]": [k, q],
1242
- "cds-copy-button": [k, Ns],
1243
- "cds-combo-button": [k, ys],
1244
- "cds-checkbox": [ws],
1245
- "cds-radio-button-group": [_s],
1246
- "cds-toggle": [xs],
1247
- "cds-select": [G],
1248
- "cds-slider": [Ms],
1249
- "cds-text-input": [L],
1250
- "cds-textarea": [Ts],
1251
- "cds-number-input": [Bs],
1252
- "cds-password-input": [k, Os],
1253
- "cds-search": [Q],
1254
- "cds-dropdown": [Fs],
1255
- "cds-combo-box": [Rs],
1256
- "cds-multi-select": [zs],
1257
- "cds-date-picker": [qs],
1258
- "cds-time-picker": [Gs],
1259
- "cds-file-uploader": [Ls],
1260
- "cds-tabs": [ks],
1261
- "cds-accordion": [Ss],
1262
- "cds-content-switcher": [Ds],
1263
- "cds-breadcrumb": [z],
1264
- "cds-breadcrumb-item": [z],
1265
- "cds-breadcrumb-link": [z],
1266
- "cds-menu": [J],
1267
- "cds-menu-button": [J],
1268
- "cds-overflow-menu": [As],
1269
- "cds-structured-list": [Is],
1270
- "cds-tree-view": [Ps],
1271
- "cds-modal": [C],
1272
- "cds-modal-header": [C],
1273
- "cds-modal-heading": [C],
1274
- "cds-modal-label": [C],
1275
- "cds-modal-close-button": [C],
1276
- "cds-modal-body": [C],
1277
- "cds-modal-body-content": [C],
1278
- "cds-modal-footer": [C],
1279
- "cds-modal-footer-button": [C],
1280
- "cds-toast-notification": [U],
1281
- "cds-inline-notification": [U],
1282
- "cds-actionable-notification": [U],
1283
- "cds-clickable-tile": [M],
1284
- "cds-expandable-tile": [M],
1285
- "cds-selectable-tile": [M],
1286
- "cds-radio-tile": [M],
1287
- "cds-progress-bar": [Js],
1288
- "cds-progress-indicator": [Ks],
1289
- "cds-inline-loading": [Xs],
1290
- "cds-tooltip": [k],
1291
- "cds-popover": [Zs],
1292
- "cds-toggletip": [tn],
1293
- "cds-tag": [H],
1294
- "cds-dismissible-tag": [H],
1295
- "cds-filter-tag": [H],
1296
- "cds-link": [Cs],
1297
- "cds-code-snippet": [js],
1298
- "cds-form": [Y],
1299
- "cds-form-item": [Y],
1300
- "cds-form-group": [Hs],
1301
- "cds-stack": [Ws],
1302
- "cds-heading": [en],
1303
- "cds-icon": [sn],
1304
- "cds-icon-indicator": [nn],
1305
- "cds-badge-indicator": [Vs],
1306
- "cds-loading": [$s],
1307
- "cds-skeleton-text": [Ys],
1308
- "cds-skeleton-placeholder": [Qs]
1309
- };
1310
- function on(t) {
1311
- const e = /* @__PURE__ */ new Map();
1312
- if (!t || !(t instanceof Element)) return e;
1313
- for (const n of Object.keys(T)) e.set(n, []);
1314
- for (const [n, o] of Object.entries(T)) t.matches(n) && e.get(n).push(t);
1315
- const s = t.querySelectorAll("*");
1316
- for (const n of s) for (const [o, a] of Object.entries(T)) n.matches(o) && e.get(o).push(n);
1317
- for (const [n, o] of e.entries()) o.length === 0 && e.delete(n);
1318
- return e;
1319
- }
1320
- function an(t) {
1321
- const e = /* @__PURE__ */ new Set();
1322
- for (const [s, n] of t.entries()) n.length > 0 && B[s] && B[s].forEach((o) => e.add(o));
1323
- return e;
1324
- }
1325
- async function rn(t, e) {
1326
- if (t.size === 0) return;
1327
- const s = Array.from(t).map(async (n) => (e.has(n) || e.set(n, n()), e.get(n)));
1328
- await Promise.all(s);
1329
- }
1330
- function cn(t, e) {
1331
- let s = 0;
1332
- for (const [n, o] of t.entries()) {
1333
- const a = T[n];
1334
- o.forEach((r) => {
1335
- if (a.init) {
1336
- a.init.call(e, r);
1337
- return;
1338
- }
1339
- if (a.multiEvent) {
1340
- const W = i(r);
1341
- a.events.forEach((I) => {
1342
- const N = S(r, I.attrName, "event");
1343
- N && e.listen(r, I.type, (O) => {
1344
- e.dispatchPanelEvent(N, I.getData(O, W, r));
1345
- });
1346
- });
1347
- return;
1348
- }
1349
- const l = i(r), p = l.event;
1350
- p && e.listen(r, a.event, (W) => {
1351
- W.stopPropagation();
1352
- const I = a.getData(W, l, r), N = I._eventOverride || p;
1353
- delete I._eventOverride, e.dispatchPanelEvent(N, I);
1354
- });
1355
- }), s += o.length;
1356
- }
1357
- return s;
1358
- }
1359
- var T = { ...Object.fromEntries(Es()) }, ln = async function(t, e) {
1360
- const s = on(t);
1361
- if (s.size === 0) {
1362
- this.debugMe("[Carbon] No Carbon components found in panel");
1363
- return;
1364
- }
1365
- this.carbonComponents || (this.carbonComponents = /* @__PURE__ */ new Map());
1366
- for (const [a, r] of s.entries()) this.carbonComponents.set(a, r);
1367
- const n = an(s);
1368
- if (n.size > 0) try {
1369
- await rn(n, e);
1370
- } catch (a) {
1371
- console.error("[Carbon] Failed to load some component modules:", a);
1372
- }
1373
- const o = cn(s, this);
1374
- o > 0 && this.debugMe(`[Carbon] Total components initialized: ${o}`);
1375
- }, vn = (t = {}) => {
1376
- const { preload: e = [] } = t;
1377
- if (e.length > 0) {
1378
- const s = e.filter((o) => B[o] ? !0 : (console.warn(`[Carbon] No import found for selector: ${o}`), !1)), n = s.flatMap((o) => B[o].map((a) => a()));
1379
- Promise.all(n).then(() => console.debug(`[Carbon] Preloaded: ${s.join(", ")}`)).catch((o) => console.warn("[Carbon] Preload error:", o));
1380
- }
1381
- Et.register("carbon", {
1382
- render: async function(s, n) {
1383
- try {
1384
- await ln.call(this, s, n);
1385
- } catch (o) {
1386
- console.error("[Carbon] Initialization error:", o);
1387
- }
1388
- },
1389
- dispose: function(s) {
1390
- },
1391
- config: {
1392
- version: "2.0",
1393
- description: "IBM Carbon Design System Web Components"
1394
- }
1395
- }), console.debug("[Zooy] Carbon Design System library registered");
1396
- };
1397
- export {
1398
- vn as registerCarbonLibrary
1399
- };