@trintel/zooy 1.14.2 → 1.15.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.
- package/README.md +6 -6
- package/dist/chunks/register-B0h_UWOz.js +1 -0
- package/dist/chunks/register-CSR-CzsT.js +1679 -0
- package/dist/zooy.cjs.js +1 -1
- package/dist/zooy.es.js +1 -1
- package/package.json +8 -2
- package/src/sass/carbon.scss +20 -0
- package/dist/chunks/register-Dq0hul2Y.js +0 -1
- package/dist/chunks/register-RDk7_sJH.js +0 -1632
|
@@ -0,0 +1,1679 @@
|
|
|
1
|
+
import { n as m, t as ze } from "./component-library-registry-BXnJ4Oqa.js";
|
|
2
|
+
import { n as i, r as Re, t as S } from "./attributes-DLvrzXzz.js";
|
|
3
|
+
import { isDefAndNotNull as qe, objToPaths as Ue } from "badu";
|
|
4
|
+
import * as U from "ramda";
|
|
5
|
+
import { TABLE_SORT_DIRECTION as $e } from "@carbon/web-components/lib/components/data-table/defs.js";
|
|
6
|
+
var He = /* @__PURE__ */ m({ cdsTableWrap: () => Ze }), oe = (e, t, o) => {
|
|
7
|
+
const s = customElements.get("cds-table"), n = customElements.get("cds-pagination"), r = customElements.get(s.selectorTableBatchActions);
|
|
8
|
+
customElements.get("cds-popover");
|
|
9
|
+
const a = t.dataBinder, c = t.pagination, d = t.skeleton, g = t.querySelector(s.selectorTableToolbarSearch), E = t.querySelector(s.selectorTableBatchActions), x = t.querySelector(s.selectorTableBody), G = [
|
|
10
|
+
"button",
|
|
11
|
+
"a",
|
|
12
|
+
"input",
|
|
13
|
+
"select",
|
|
14
|
+
"textarea",
|
|
15
|
+
'[role="button"]',
|
|
16
|
+
".cds--table-expand",
|
|
17
|
+
".cds--table-column-checkbox"
|
|
18
|
+
].join(","), ee = t.querySelectorAll(s.selectorHeaderCell + "[is-sortable]"), ye = t.isSortable || ee.length > 0, j = /* @__PURE__ */ Symbol(), V = /* @__PURE__ */ Symbol(), D = /* @__PURE__ */ new Map(), Pe = (l) => {
|
|
19
|
+
e.listen(t, "click", (p) => {
|
|
20
|
+
const u = p.target.closest(s.selectorTableRow);
|
|
21
|
+
if (!u || p.composedPath().some((k) => k.matches && k.matches(G))) return;
|
|
22
|
+
p.stopPropagation();
|
|
23
|
+
const f = i(u);
|
|
24
|
+
e.dispatchPanelEvent(l, { ...f });
|
|
25
|
+
});
|
|
26
|
+
}, Ce = (l) => {
|
|
27
|
+
e.listen(t, s.eventExpandoToggle, (p) => {
|
|
28
|
+
const u = p.target, f = u.tagName === "CDS-TABLE-HEADER-ROW", k = p.detail.expanded, W = {
|
|
29
|
+
tableAttrs: o,
|
|
30
|
+
...i(u),
|
|
31
|
+
target: u,
|
|
32
|
+
allRows: f,
|
|
33
|
+
didExpand: k
|
|
34
|
+
};
|
|
35
|
+
e.dispatchPanelEvent(l, W);
|
|
36
|
+
});
|
|
37
|
+
}, Ae = (l) => {
|
|
38
|
+
D.set(j, (p) => {
|
|
39
|
+
e.dispatchPanelEvent(l, p);
|
|
40
|
+
});
|
|
41
|
+
}, we = (l) => {
|
|
42
|
+
D.set(V, (p) => {
|
|
43
|
+
const u = p.detail.selectedRows, f = Math.min(u.length, E.totalRowsCount), k = p.target, W = i(k), I = u.map(i), C = {
|
|
44
|
+
tableAttrs: o,
|
|
45
|
+
...W,
|
|
46
|
+
target: k,
|
|
47
|
+
selectCount: f,
|
|
48
|
+
selection: I
|
|
49
|
+
};
|
|
50
|
+
e.dispatchPanelEvent(l, C);
|
|
51
|
+
});
|
|
52
|
+
}, xe = (l) => {
|
|
53
|
+
e.listen(t, s.eventTableRowSelect, (p) => {
|
|
54
|
+
const u = p.target, f = p.detail.selectedRows || [], k = f.length, W = f.map(i), I = {
|
|
55
|
+
tableAttrs: o,
|
|
56
|
+
...i(u),
|
|
57
|
+
selectCount: k,
|
|
58
|
+
selection: W,
|
|
59
|
+
target: u
|
|
60
|
+
};
|
|
61
|
+
e.dispatchPanelEvent(l, I);
|
|
62
|
+
});
|
|
63
|
+
}, De = () => {
|
|
64
|
+
e.listen(t, s.eventBeforeSort, (l) => {
|
|
65
|
+
const p = l.target, u = l.detail.oldSortDirection, f = l.detail.sortDirection, k = i(p), W = k.sortField, I = f === $e.DESCENDING ? `-${W}` : W;
|
|
66
|
+
l.cancelBubble = !0, l.stopPropagation(), l.preventDefault(), x.innerHTML = "", d && d.show(), ee.forEach((A, h) => {
|
|
67
|
+
A === p ? (A.setAttribute("sort-active", "true"), A.setAttribute("sort-direction", f)) : (A.removeAttribute("sort-active"), A.setAttribute("sort-direction", "none"));
|
|
68
|
+
});
|
|
69
|
+
const C = { ordering: I };
|
|
70
|
+
a.fetchData(C).then(() => {
|
|
71
|
+
c.setData(a), d && d.hide();
|
|
72
|
+
}), D.has(j) && D.get(j)({
|
|
73
|
+
tableAttrs: o,
|
|
74
|
+
...k,
|
|
75
|
+
sortNow: f,
|
|
76
|
+
sortWas: u,
|
|
77
|
+
sortField: W,
|
|
78
|
+
ordering: I,
|
|
79
|
+
target: p
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}, Te = () => {
|
|
83
|
+
e.listen(t, s.eventTableRowSelectAll, (l) => {
|
|
84
|
+
l.detail.selectedRows.length === 0 && t.querySelectorAll(s.selectorTableRow).forEach((p) => {
|
|
85
|
+
p.disabled = !1, p.selected = !1;
|
|
86
|
+
}), D.has(V) && D.get(V)(l);
|
|
87
|
+
});
|
|
88
|
+
}, _e = () => {
|
|
89
|
+
e.listen(t, s.eventBeforeChangeSelectionAll, (l) => {
|
|
90
|
+
l.stopPropagation(), l.detail.callback && l.detail.callback();
|
|
91
|
+
});
|
|
92
|
+
}, Be = (l) => {
|
|
93
|
+
const p = t.querySelector("cds-table-header-row");
|
|
94
|
+
e.listen(l, r.eventClickSelectAll, (u) => {
|
|
95
|
+
u.stopPropagation(), p.dispatchEvent(new CustomEvent(s.eventBeforeChangeSelectionAll, {
|
|
96
|
+
bubbles: !0,
|
|
97
|
+
cancelable: !0,
|
|
98
|
+
composed: !0,
|
|
99
|
+
detail: {
|
|
100
|
+
selected: !0,
|
|
101
|
+
callback: () => {
|
|
102
|
+
l.selectedRowsCount = l.totalRowsCount, t.querySelectorAll(s.selectorTableRow).forEach((f) => {
|
|
103
|
+
f.disabled = !0;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
}, Ne = (l) => {
|
|
110
|
+
e.listen(l, "keydown", (p) => {
|
|
111
|
+
if (p.key === "Enter") {
|
|
112
|
+
d && d.show(), c.totalItems = 0, t.querySelector("cds-table-body").replaceChildren();
|
|
113
|
+
const u = {
|
|
114
|
+
search: l.value || "",
|
|
115
|
+
offset: 0
|
|
116
|
+
};
|
|
117
|
+
a.fetchData(u).then(() => {
|
|
118
|
+
c.setData(a), d && d.hide();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}, Me = (l) => {
|
|
123
|
+
e.listen(l, s.eventSearchInput, (p) => {
|
|
124
|
+
if ((p.detail.value || "") === "") {
|
|
125
|
+
const u = {
|
|
126
|
+
search: "",
|
|
127
|
+
offset: 0
|
|
128
|
+
};
|
|
129
|
+
d && d.show(), a.fetchData(u).then(() => {
|
|
130
|
+
d && d.hide(), c.setData(a);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}, Fe = (l) => {
|
|
135
|
+
l.caret = !1;
|
|
136
|
+
const p = l.querySelector("cds-icon-button, button:not([slot])"), u = l.querySelectorAll("cds-checkbox"), f = l.querySelectorAll("cds-modal-footer-button"), k = [...l.querySelectorAll("cds-checkbox-group")].map(i).map(U.pathOr("noop", [
|
|
137
|
+
"zoo",
|
|
138
|
+
"filter",
|
|
139
|
+
"field"
|
|
140
|
+
])).reduce((h, b) => (h[b] = null, h), { offset: 0 });
|
|
141
|
+
if (!p || !f) {
|
|
142
|
+
console.error("Improperly configured Batch Filter popover");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
new MutationObserver(() => {
|
|
146
|
+
l.classList.toggle("cds--overflow-menu--open", l.open);
|
|
147
|
+
}).observe(l, {
|
|
148
|
+
attributes: !0,
|
|
149
|
+
attributeFilter: ["open"]
|
|
150
|
+
});
|
|
151
|
+
const W = /* @__PURE__ */ Symbol(), I = /* @__PURE__ */ Symbol(), C = [...f].reduce((h, b, w) => (b.hasAttribute("reset-filter") && h.set(W, b), b.hasAttribute("apply-filter") && h.set(I, b), h), /* @__PURE__ */ new Map()), A = () => {
|
|
152
|
+
const h = /* @__PURE__ */ new Map();
|
|
153
|
+
return u.forEach((b) => {
|
|
154
|
+
const w = b.getAttribute("id");
|
|
155
|
+
if (!w || !w.includes(":")) return;
|
|
156
|
+
const [_, B] = w.split(":");
|
|
157
|
+
h.has(_) || h.set(_, []), b.checked && h.get(_).push(B);
|
|
158
|
+
}), h;
|
|
159
|
+
};
|
|
160
|
+
if (C.has(W)) {
|
|
161
|
+
const h = (b) => b.checked = !1;
|
|
162
|
+
e.listen(C.get(W), "click", (b) => {
|
|
163
|
+
b.stopPropagation(), u.forEach(h), d && d.show(), a.fetchData(k).then(() => {
|
|
164
|
+
c && c.setData(a), d && d.hide(), l.open = !1;
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
C.has(I) && e.listen(C.get(I), "click", (h) => {
|
|
169
|
+
h.stopPropagation();
|
|
170
|
+
const b = [...A()].reduce((w, [_, B]) => (w[_] = Array.isArray(B) && B.length === 0 ? null : B, w), { offset: 0 });
|
|
171
|
+
d && d.show(), a.fetchData(b).then(() => {
|
|
172
|
+
c && c.setData(a), d && d.hide(), l.open = !1;
|
|
173
|
+
});
|
|
174
|
+
}), e.listen(p, "click", (h) => {
|
|
175
|
+
h.stopPropagation(), l.open = !l.open, l.classList.toggle("cds--overflow-menu--open", l.open);
|
|
176
|
+
});
|
|
177
|
+
}, Le = () => {
|
|
178
|
+
e.listen(c, n.eventPageSizeChanged, (l) => {
|
|
179
|
+
const p = {
|
|
180
|
+
limit: c.pageSize,
|
|
181
|
+
offset: 0
|
|
182
|
+
};
|
|
183
|
+
a.fetchData(p).then(() => {
|
|
184
|
+
c.setData(a);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}, Oe = () => {
|
|
188
|
+
e.listen(c, n.eventChangeCurrent, (l) => {
|
|
189
|
+
const { page: p } = l.detail, u = c.pageSize, f = {
|
|
190
|
+
limit: u,
|
|
191
|
+
offset: (p - 1) * u
|
|
192
|
+
};
|
|
193
|
+
a.fetchData(f).then(() => {
|
|
194
|
+
c.setData(a), d && d.hide();
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
a && c && (Le(), Oe()), a && g && (Ne(g), Me(g));
|
|
199
|
+
const te = t.querySelector(s.selectorTableToolbarContent);
|
|
200
|
+
if (te) {
|
|
201
|
+
const l = te.querySelectorAll("cds-popover[data-batch-filter]");
|
|
202
|
+
a && l && l.forEach(Fe);
|
|
203
|
+
}
|
|
204
|
+
t.isSelectable && (Te(), _e(), E && Be(E)), a && ye && De();
|
|
205
|
+
const se = { zoo: { event: {
|
|
206
|
+
row: {
|
|
207
|
+
click: Pe,
|
|
208
|
+
expand: Ce,
|
|
209
|
+
check: {
|
|
210
|
+
one: xe,
|
|
211
|
+
all: we
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
column: { sort: Ae }
|
|
215
|
+
} } };
|
|
216
|
+
Ue(o).forEach(([l, p]) => {
|
|
217
|
+
U.hasPath(l, se) && U.path(l, se)(p);
|
|
218
|
+
});
|
|
219
|
+
}, Ge = (e) => {
|
|
220
|
+
const t = document.createElement("cds-pagination");
|
|
221
|
+
return t.backwardText = "Previous page", t.forwardText = "Next page", t.itemsPerPageText = "Items per page:", t.pageSize = e.limit, t.size = "lg", [
|
|
222
|
+
10,
|
|
223
|
+
25,
|
|
224
|
+
50,
|
|
225
|
+
100,
|
|
226
|
+
500
|
|
227
|
+
].forEach((o) => {
|
|
228
|
+
const s = document.createElement("cds-select-item");
|
|
229
|
+
s.value = o.toString(), s.textContent = o.toString(), t.appendChild(s);
|
|
230
|
+
}), t.setData = (o) => {
|
|
231
|
+
if (o.isPaginated) {
|
|
232
|
+
const { count: s } = U.pick(["count"], o.data), n = Math.ceil(s / o.limit);
|
|
233
|
+
t.pagesUnknown = n > 100, t.totalItems = s, t.pagesUnknown ? t.formatStatusWithIndeterminateTotal = ({ start: r, end: a }) => `${r}–${a} of ${s} item${s <= 1 ? "" : "s"}` : delete t.formatStatusWithIndeterminateTotal;
|
|
234
|
+
}
|
|
235
|
+
}, t;
|
|
236
|
+
}, je = (e) => {
|
|
237
|
+
if (!e.parentNode) {
|
|
238
|
+
console.error("[Carbon Table] Cannot create skeleton: table has no parent node");
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const t = !!e.querySelector("cds-table-header-title"), o = !!e.querySelector("cds-table-header-description"), s = !!e.querySelector("cds-table-toolbar"), n = [...e.querySelectorAll("cds-table-header-cell")].length, r = e.hasAttribute("zebra"), a = e.getAttribute("size"), c = document.createElement("cds-table-skeleton");
|
|
242
|
+
c.showHeader = t || o, c.showToolbar = s, c.zebra = r, c.columnCount = n, c.size = a, c.show = () => c.classList.remove("hidden"), c.hide = () => c.classList.add("hidden");
|
|
243
|
+
const d = document.createElement("div");
|
|
244
|
+
return d.classList.add("zoo-datatable-skeleton-wrapper"), e.parentNode.insertBefore(d, e), d.appendChild(c), d.appendChild(e), c;
|
|
245
|
+
}, Ve = (e, t) => {
|
|
246
|
+
const o = t.getAttribute("zoo-url-api"), s = parseInt(t.getAttribute("data-page-size") || 25, 10);
|
|
247
|
+
if (o) return new Re(e, o, t, { urlParams: { limit: s } });
|
|
248
|
+
}, Ze = {
|
|
249
|
+
selector: "cds-table",
|
|
250
|
+
init: function(e) {
|
|
251
|
+
const t = i(e), o = this, s = Ve(o, e);
|
|
252
|
+
if (qe(s)) {
|
|
253
|
+
e.dataBinder = s;
|
|
254
|
+
const n = je(e);
|
|
255
|
+
e.skeleton = n;
|
|
256
|
+
const r = Ge(s);
|
|
257
|
+
e.pagination = r, e.after(r), s.fetchData().then((a) => {
|
|
258
|
+
n.hide(), r.setData(s), oe(o, e, t);
|
|
259
|
+
});
|
|
260
|
+
} else oe(o, e, t);
|
|
261
|
+
}
|
|
262
|
+
}, Je = /* @__PURE__ */ m({
|
|
263
|
+
cdsPaginationNavWrap: () => Qe,
|
|
264
|
+
cdsPaginationWrap: () => Ke
|
|
265
|
+
}), Ke = {
|
|
266
|
+
selector: "cds-pagination",
|
|
267
|
+
init: function(e) {
|
|
268
|
+
const t = this, o = customElements.get("cds-pagination");
|
|
269
|
+
let s = null;
|
|
270
|
+
t.listen(e, o.eventChangeCurrent, (n) => {
|
|
271
|
+
const r = n.detail.page, a = e.pageSize, c = (r - 1) * a;
|
|
272
|
+
c !== s && (s = c, t.dispatchPanelEvent("pagination-changed-current", { detail: {
|
|
273
|
+
page: r,
|
|
274
|
+
pageSize: a,
|
|
275
|
+
action: "page-change"
|
|
276
|
+
} }));
|
|
277
|
+
}), t.listen(e, o.eventPageSizeChanged, (n) => {
|
|
278
|
+
const r = e.pageSize;
|
|
279
|
+
s = null, t.dispatchPanelEvent("pagination-changed-page-size", { detail: {
|
|
280
|
+
page: 1,
|
|
281
|
+
pageSize: r,
|
|
282
|
+
action: "page-size-change"
|
|
283
|
+
} });
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}, Qe = {
|
|
287
|
+
selector: "cds-pagination-nav",
|
|
288
|
+
event: "cds-page-changed",
|
|
289
|
+
getData: (e, t, o) => ({
|
|
290
|
+
...t,
|
|
291
|
+
page: e.detail.page,
|
|
292
|
+
pageNumber: e.detail.page + 1,
|
|
293
|
+
totalItems: o.totalItems
|
|
294
|
+
})
|
|
295
|
+
}, Xe = /* @__PURE__ */ m({
|
|
296
|
+
cdsModalBodyContentWrap: () => rt,
|
|
297
|
+
cdsModalBodyWrap: () => nt,
|
|
298
|
+
cdsModalCloseButWrap: () => ot,
|
|
299
|
+
cdsModalFooterButWrap: () => ct,
|
|
300
|
+
cdsModalFooterWrap: () => at,
|
|
301
|
+
cdsModalHeaderWrap: () => et,
|
|
302
|
+
cdsModalHeadingWrap: () => tt,
|
|
303
|
+
cdsModalLabelWrap: () => st,
|
|
304
|
+
cdsModalWrap: () => Ye
|
|
305
|
+
}), Ye = {
|
|
306
|
+
selector: "cds-modal",
|
|
307
|
+
init: function(e) {
|
|
308
|
+
const t = customElements.get("cds-modal"), o = i(e), s = e === this.getElement(), n = S(e, "open-event", "event");
|
|
309
|
+
if (n) {
|
|
310
|
+
const c = new MutationObserver(() => {
|
|
311
|
+
e.hasAttribute("open") && this.dispatchPanelEvent(n, {
|
|
312
|
+
...o,
|
|
313
|
+
action: "opened"
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
c.observe(e, {
|
|
317
|
+
attributes: !0,
|
|
318
|
+
attributeFilter: ["open"]
|
|
319
|
+
}), e._openObserver = c;
|
|
320
|
+
}
|
|
321
|
+
const r = e.getAttribute("before-close-event");
|
|
322
|
+
r && this.listen(e, t.eventBeforeClose, (c) => {
|
|
323
|
+
this.dispatchPanelEvent(r, {
|
|
324
|
+
...o,
|
|
325
|
+
action: "closing",
|
|
326
|
+
cancelable: !0
|
|
327
|
+
});
|
|
328
|
+
}), this.listen(e, t.eventClose, (c) => {
|
|
329
|
+
const d = {
|
|
330
|
+
...o,
|
|
331
|
+
action: "closed",
|
|
332
|
+
triggeredBy: c.detail?.triggeredBy
|
|
333
|
+
};
|
|
334
|
+
if (s) {
|
|
335
|
+
this.dispatchPanelEvent("destroy_me", d);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const g = e.getAttribute("close-event");
|
|
339
|
+
g && this.dispatchPanelEvent(g, d);
|
|
340
|
+
});
|
|
341
|
+
const a = e.getAttribute("primary-event");
|
|
342
|
+
a && this.listen(e, "click", (c) => {
|
|
343
|
+
const d = c.target.closest?.('cds-modal-footer-button[kind="primary"]');
|
|
344
|
+
d && e.contains(d) && this.dispatchPanelEvent(a, {
|
|
345
|
+
...o,
|
|
346
|
+
action: "primary"
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}, et = { selector: "cds-modal-header" }, tt = { selector: "cds-modal-heading" }, st = { selector: "cds-modal-label" }, ot = { selector: "cds-modal-close-button" }, nt = { selector: "cds-modal-body" }, rt = { selector: "cds-modal-body-content" }, at = { selector: "cds-modal-footer" }, ct = {
|
|
351
|
+
selector: "cds-modal-footer-button",
|
|
352
|
+
init: function(e) {
|
|
353
|
+
const t = i(e);
|
|
354
|
+
if (e.getAttribute("type") === "submit") {
|
|
355
|
+
this.listen(e, "click", (s) => {
|
|
356
|
+
let n = e.closest("form");
|
|
357
|
+
if (!n) {
|
|
358
|
+
const r = e.getAttribute("form");
|
|
359
|
+
r && (n = document.getElementById(r));
|
|
360
|
+
}
|
|
361
|
+
n && n.requestSubmit();
|
|
362
|
+
});
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const o = t.event;
|
|
366
|
+
o && this.listen(e, "click", (s) => {
|
|
367
|
+
s.stopPropagation(), this.dispatchPanelEvent(o, t);
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}, it = /* @__PURE__ */ m({
|
|
371
|
+
cdsMenuButtonWrap: () => dt,
|
|
372
|
+
cdsMenuWrap: () => lt
|
|
373
|
+
}), lt = {
|
|
374
|
+
selector: "cds-menu",
|
|
375
|
+
init: function(e) {
|
|
376
|
+
const t = i(e), o = S(e, "open-event");
|
|
377
|
+
o && this.listen(e, "cds-menu-opened", (n) => {
|
|
378
|
+
this.dispatchPanelEvent(o, {
|
|
379
|
+
...t,
|
|
380
|
+
action: "opened"
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
const s = S(e, "close-event");
|
|
384
|
+
s && this.listen(e, "cds-menu-closed", (n) => {
|
|
385
|
+
this.dispatchPanelEvent(s, {
|
|
386
|
+
...t,
|
|
387
|
+
action: "closed"
|
|
388
|
+
});
|
|
389
|
+
}), this.listen(e, "click", (n) => {
|
|
390
|
+
if (n.target.tagName === "CDS-MENU-ITEM") {
|
|
391
|
+
const r = i(n.target), a = r.event || t.event;
|
|
392
|
+
a && (n.stopPropagation(), this.dispatchPanelEvent(a, {
|
|
393
|
+
...t,
|
|
394
|
+
...r
|
|
395
|
+
}));
|
|
396
|
+
}
|
|
397
|
+
}), this.listen(e, "cds-item-changed", (n) => {
|
|
398
|
+
const r = n.detail.triggeredBy, a = i(r), c = a.event || t.event;
|
|
399
|
+
c && this.dispatchPanelEvent(c, {
|
|
400
|
+
...t,
|
|
401
|
+
...a,
|
|
402
|
+
action: "selection-changed"
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}, dt = {
|
|
407
|
+
selector: "cds-menu-button",
|
|
408
|
+
init: function(e) {
|
|
409
|
+
const t = i(e), o = e.querySelector("cds-menu");
|
|
410
|
+
o && this.listen(o, "click", (s) => {
|
|
411
|
+
if (s.target.tagName === "CDS-MENU-ITEM") {
|
|
412
|
+
const n = i(s.target), r = n.event || t.event;
|
|
413
|
+
r && (s.stopPropagation(), this.dispatchPanelEvent(r, {
|
|
414
|
+
...t,
|
|
415
|
+
...n
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}, pt = /* @__PURE__ */ m({
|
|
421
|
+
cdsButFabWrap: () => ft,
|
|
422
|
+
cdsButtonWrap: () => ut,
|
|
423
|
+
cdsComboButWrap: () => gt,
|
|
424
|
+
cdsCopyButWrap: () => ht,
|
|
425
|
+
cdsIconButToggleWrap: () => mt,
|
|
426
|
+
cdsIconButWrap: () => vt
|
|
427
|
+
}), ut = {
|
|
428
|
+
selector: "cds-button",
|
|
429
|
+
init: function(e) {
|
|
430
|
+
const t = i(e);
|
|
431
|
+
if (e.getAttribute("type") === "submit") {
|
|
432
|
+
this.listen(e, "click", (s) => {
|
|
433
|
+
let n = e.closest("form");
|
|
434
|
+
if (!n) {
|
|
435
|
+
const r = e.getAttribute("form");
|
|
436
|
+
r && (n = document.getElementById(r));
|
|
437
|
+
}
|
|
438
|
+
n && n.requestSubmit();
|
|
439
|
+
});
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
const o = t.event;
|
|
443
|
+
o && this.listen(e, "click", (s) => {
|
|
444
|
+
s.stopPropagation(), this.dispatchPanelEvent(o, i(e));
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}, vt = {
|
|
448
|
+
selector: "cds-icon-button:not([data-toggle])",
|
|
449
|
+
event: "click",
|
|
450
|
+
getData: (e, t) => t
|
|
451
|
+
}, mt = {
|
|
452
|
+
selector: "cds-icon-button[data-toggle]",
|
|
453
|
+
init: function(e) {
|
|
454
|
+
const t = i(e);
|
|
455
|
+
t.event && this.listen(e, "click", (o) => {
|
|
456
|
+
o.stopPropagation(), e.isSelected = !e.isSelected, this.dispatchPanelEvent(t.event, {
|
|
457
|
+
...t,
|
|
458
|
+
isOn: e.isSelected
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
}, ft = {
|
|
463
|
+
selector: "cds-button[data-fab]",
|
|
464
|
+
event: "click",
|
|
465
|
+
getData: (e, t) => t
|
|
466
|
+
}, ht = {
|
|
467
|
+
selector: "cds-copy-button",
|
|
468
|
+
init: function(e) {
|
|
469
|
+
const t = i(e), o = t.event;
|
|
470
|
+
o && this.listen(e, "click", (n) => {
|
|
471
|
+
n.stopPropagation(), this.dispatchPanelEvent(o, {
|
|
472
|
+
...t,
|
|
473
|
+
action: "copy"
|
|
474
|
+
});
|
|
475
|
+
});
|
|
476
|
+
const s = e.getAttribute("success-event");
|
|
477
|
+
if (s) {
|
|
478
|
+
const n = new MutationObserver(() => {
|
|
479
|
+
e.hasAttribute("feedback-shown") && this.dispatchPanelEvent(s, {
|
|
480
|
+
...t,
|
|
481
|
+
action: "copied"
|
|
482
|
+
});
|
|
483
|
+
});
|
|
484
|
+
n.observe(e, {
|
|
485
|
+
attributes: !0,
|
|
486
|
+
attributeFilter: ["feedback-shown"]
|
|
487
|
+
}), e._copyObserver = n;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}, gt = {
|
|
491
|
+
selector: "cds-combo-button",
|
|
492
|
+
init: function(e) {
|
|
493
|
+
const t = i(e);
|
|
494
|
+
t.event && this.listen(e, "click", (s) => {
|
|
495
|
+
const n = s.composedPath(), r = n.some((c) => c.tagName === "CDS-MENU-ITEM"), a = n.some((c) => c.tagName === "CDS-ICON-BUTTON");
|
|
496
|
+
!r && !a && (s.stopPropagation(), this.dispatchPanelEvent(t.event, {
|
|
497
|
+
...t,
|
|
498
|
+
action: "primary"
|
|
499
|
+
}));
|
|
500
|
+
});
|
|
501
|
+
const o = e.querySelector("cds-menu");
|
|
502
|
+
o && this.listen(o, "click", (s) => {
|
|
503
|
+
if (s.target.tagName === "CDS-MENU-ITEM") {
|
|
504
|
+
const n = i(s.target), r = n.event || S(e, "menu-event", "event");
|
|
505
|
+
r && this.dispatchPanelEvent(r, {
|
|
506
|
+
...t,
|
|
507
|
+
...n,
|
|
508
|
+
action: "menu-item"
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}, bt = /* @__PURE__ */ m({
|
|
514
|
+
cdsComboBoxWrap: () => Wt,
|
|
515
|
+
cdsDropdownWrap: () => kt,
|
|
516
|
+
cdsMultiSelectWrap: () => St
|
|
517
|
+
}), kt = {
|
|
518
|
+
selector: "cds-dropdown",
|
|
519
|
+
init: function(e) {
|
|
520
|
+
const t = customElements.get("cds-dropdown"), o = i(e), s = o.event;
|
|
521
|
+
s && this.listen(e, t.eventSelect, (r) => {
|
|
522
|
+
this.dispatchPanelEvent(s, {
|
|
523
|
+
...o,
|
|
524
|
+
value: e.value,
|
|
525
|
+
selectedValue: r.detail?.item?.value,
|
|
526
|
+
selectedText: r.detail?.item?.textContent?.trim()
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
const n = e.getAttribute("toggle-event");
|
|
530
|
+
n && this.listen(e, t.eventToggle, (r) => {
|
|
531
|
+
this.dispatchPanelEvent(n, {
|
|
532
|
+
...o,
|
|
533
|
+
open: e.hasAttribute("open")
|
|
534
|
+
});
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
}, Wt = {
|
|
538
|
+
selector: "cds-combo-box",
|
|
539
|
+
init: function(e) {
|
|
540
|
+
const t = customElements.get("cds-combo-box"), o = i(e), s = o.event;
|
|
541
|
+
s && this.listen(e, t.eventSelect, (r) => {
|
|
542
|
+
const a = r.detail?.item;
|
|
543
|
+
this.dispatchPanelEvent(s, {
|
|
544
|
+
...o,
|
|
545
|
+
value: e.value,
|
|
546
|
+
selectedValue: a?.value,
|
|
547
|
+
selectedText: a?.textContent?.trim()
|
|
548
|
+
});
|
|
549
|
+
});
|
|
550
|
+
const n = e.getAttribute("toggle-event");
|
|
551
|
+
n && this.listen(e, t.eventToggle, (r) => {
|
|
552
|
+
this.dispatchPanelEvent(n, {
|
|
553
|
+
...o,
|
|
554
|
+
open: e.hasAttribute("open")
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
}, St = {
|
|
559
|
+
selector: "cds-multi-select",
|
|
560
|
+
init: function(e) {
|
|
561
|
+
const t = customElements.get("cds-multi-select"), o = i(e), s = o.event;
|
|
562
|
+
s && this.listen(e, t.eventSelect, (r) => {
|
|
563
|
+
const a = e.value ? e.value.split(",") : [];
|
|
564
|
+
this.dispatchPanelEvent(s, {
|
|
565
|
+
...o,
|
|
566
|
+
selectedItems: a
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
const n = e.getAttribute("toggle-event");
|
|
570
|
+
n && this.listen(e, t.eventToggle, (r) => {
|
|
571
|
+
this.dispatchPanelEvent(n, {
|
|
572
|
+
...o,
|
|
573
|
+
open: e.hasAttribute("open")
|
|
574
|
+
});
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
}, Et = /* @__PURE__ */ m({
|
|
578
|
+
cdsDatePickerWrap: () => It,
|
|
579
|
+
cdsTimePickerWrap: () => yt
|
|
580
|
+
}), It = {
|
|
581
|
+
selector: "cds-date-picker",
|
|
582
|
+
init: function(e) {
|
|
583
|
+
const t = customElements.get("cds-date-picker"), o = i(e), s = e.querySelector('cds-date-picker-input[kind="from"]'), n = e.querySelector('cds-date-picker-input[kind="to"]'), r = s && n, a = o.event;
|
|
584
|
+
a && this.listen(e, t.eventChange, (d) => {
|
|
585
|
+
let g;
|
|
586
|
+
r ? g = {
|
|
587
|
+
from: s.value || "",
|
|
588
|
+
to: n.value || ""
|
|
589
|
+
} : g = e.value, this.dispatchPanelEvent(a, {
|
|
590
|
+
...o,
|
|
591
|
+
value: g
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
const c = e.getAttribute("error-event");
|
|
595
|
+
c && this.listen(e, t.eventFlatpickrError, (d) => {
|
|
596
|
+
this.dispatchPanelEvent(c, {
|
|
597
|
+
...o,
|
|
598
|
+
error: d.detail
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
}, yt = {
|
|
603
|
+
selector: "cds-time-picker",
|
|
604
|
+
event: "cds-time-picker-changed",
|
|
605
|
+
getData: (e, t, o) => ({
|
|
606
|
+
...t,
|
|
607
|
+
value: o.value
|
|
608
|
+
})
|
|
609
|
+
}, Pt = /* @__PURE__ */ m({
|
|
610
|
+
cdsFileUploaderButtonWrap: () => wt,
|
|
611
|
+
cdsFileUploaderDropContainerWrap: () => Tt,
|
|
612
|
+
cdsFileUploaderWrap: () => At
|
|
613
|
+
});
|
|
614
|
+
function We(e) {
|
|
615
|
+
customElements.whenDefined(e).then((t) => {
|
|
616
|
+
if (!(!t || t.prototype.__zooyAcceptCasePatched)) {
|
|
617
|
+
if (typeof t.prototype._getFiles != "function") {
|
|
618
|
+
console.warn(`[Zooy] ${e}._getFiles missing; accept case-insensitivity shim skipped (Carbon may have refactored).`);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
t.prototype._getFiles = function(o, s) {
|
|
622
|
+
if (s === void 0 && (s = (o.type === "drop" ? o.dataTransfer : o.target)?.files), !this.accept || !/^(change|drop)$/.test(o.type)) return Array.from(s ?? []);
|
|
623
|
+
const n = new Set(this.accept.toLowerCase().split(/[\s,]+/).filter(Boolean));
|
|
624
|
+
return Array.prototype.filter.call(s ?? [], ({ name: r, type: a = "" }) => {
|
|
625
|
+
const c = r.match(/\.[^.]+$/), d = c ? c[0].toLowerCase() : void 0;
|
|
626
|
+
return n.has(a.toLowerCase()) || d && n.has(d);
|
|
627
|
+
});
|
|
628
|
+
}, t.prototype.__zooyAcceptCasePatched = !0;
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
We("cds-file-uploader-drop-container");
|
|
633
|
+
We("cds-file-uploader-button");
|
|
634
|
+
function Ct(e) {
|
|
635
|
+
customElements.whenDefined(e).then((t) => {
|
|
636
|
+
if (!t || t.prototype.__zooyDisabledGuardPatched) return;
|
|
637
|
+
if (typeof t.selectorUploaderItem != "string") {
|
|
638
|
+
console.warn(`[Zooy] ${e}.selectorUploaderItem missing; disabled null-guard shim skipped (Carbon may have refactored).`);
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
const o = t.prototype.updated;
|
|
642
|
+
t.prototype.updated = function(s) {
|
|
643
|
+
return s.has("disabled") && !this.querySelector(this.constructor.selectorUploaderItem) && (s = new Map(s), s.delete("disabled")), o.call(this, s);
|
|
644
|
+
}, t.prototype.__zooyDisabledGuardPatched = !0;
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
Ct("cds-file-uploader");
|
|
648
|
+
var At = {
|
|
649
|
+
selector: "cds-file-uploader",
|
|
650
|
+
init: function(e) {
|
|
651
|
+
const t = i(e), o = t.event;
|
|
652
|
+
if (o) {
|
|
653
|
+
const a = e.querySelector('input[type="file"]');
|
|
654
|
+
a && this.listen(a, "change", (c) => {
|
|
655
|
+
this.dispatchPanelEvent(o, {
|
|
656
|
+
...t,
|
|
657
|
+
files: Array.from(c.target.files || [])
|
|
658
|
+
});
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
const s = (a) => {
|
|
662
|
+
const c = a.target;
|
|
663
|
+
return {
|
|
664
|
+
...t,
|
|
665
|
+
...i(c),
|
|
666
|
+
fileName: c.textContent.trim(),
|
|
667
|
+
state: c.getAttribute("state"),
|
|
668
|
+
item: c
|
|
669
|
+
};
|
|
670
|
+
}, n = e.getAttribute("before-delete-event");
|
|
671
|
+
n && this.listen(e, "cds-file-uploader-item-beingdeleted", (a) => {
|
|
672
|
+
this.dispatchPanelEvent(n, {
|
|
673
|
+
...s(a),
|
|
674
|
+
action: "deleting",
|
|
675
|
+
cancelable: !0
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
const r = e.getAttribute("delete-event");
|
|
679
|
+
r && this.listen(e, "cds-file-uploader-item-deleted", (a) => {
|
|
680
|
+
this.dispatchPanelEvent(r, {
|
|
681
|
+
...s(a),
|
|
682
|
+
action: "deleted"
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
function Se(e, t) {
|
|
688
|
+
const o = new DataTransfer();
|
|
689
|
+
for (const s of t) o.items.add(s);
|
|
690
|
+
e.files = o.files, e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
691
|
+
}
|
|
692
|
+
function Ee(e) {
|
|
693
|
+
const t = e.getAttribute("for");
|
|
694
|
+
if (!t)
|
|
695
|
+
return console.warn(`[Zooy] ${e.tagName.toLowerCase()} missing 'for' attribute; cannot bind to a form input.`, e), null;
|
|
696
|
+
const o = e.ownerDocument.getElementById(t);
|
|
697
|
+
return !o || o.tagName !== "INPUT" || o.type !== "file" ? (console.warn(`[Zooy] 'for=${t}' did not resolve to an <input type="file">.`, e), null) : o;
|
|
698
|
+
}
|
|
699
|
+
var wt = {
|
|
700
|
+
selector: "cds-file-uploader-button",
|
|
701
|
+
init: function(e) {
|
|
702
|
+
const t = Ee(e), o = i(e), s = o.event;
|
|
703
|
+
this.listen(e, "cds-file-uploader-button-changed", (n) => {
|
|
704
|
+
const r = n.detail?.addedFiles || [];
|
|
705
|
+
t && Se(t, r), s && this.dispatchPanelEvent(s, {
|
|
706
|
+
...o,
|
|
707
|
+
files: Array.from(r)
|
|
708
|
+
});
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
function xt(e, t, o, s) {
|
|
713
|
+
const n = e.querySelector(`[data-file-list-for="${t}"]`);
|
|
714
|
+
if (n) {
|
|
715
|
+
n.replaceChildren();
|
|
716
|
+
for (const r of o) {
|
|
717
|
+
const a = e.createElement("cds-file-uploader-item");
|
|
718
|
+
a.setAttribute("state", "edit"), a.textContent = r.name, a.addEventListener("cds-file-uploader-item-deleted", () => {
|
|
719
|
+
s(r.name);
|
|
720
|
+
}), n.appendChild(a);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
function Dt(e, t) {
|
|
725
|
+
const o = new DataTransfer();
|
|
726
|
+
for (const s of e.files) s.name !== t && o.items.add(s);
|
|
727
|
+
e.files = o.files, e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
728
|
+
}
|
|
729
|
+
var Tt = {
|
|
730
|
+
selector: "cds-file-uploader-drop-container",
|
|
731
|
+
init: function(e) {
|
|
732
|
+
const t = Ee(e), o = i(e), s = o.event, n = e.getAttribute("for"), r = () => {
|
|
733
|
+
if (!n || !t) return;
|
|
734
|
+
const a = Array.from(t.files);
|
|
735
|
+
xt(e.ownerDocument, n, a, (c) => {
|
|
736
|
+
Dt(t, c), r();
|
|
737
|
+
}), e.multiple || (e.style.display = a.length > 0 ? "none" : "");
|
|
738
|
+
};
|
|
739
|
+
this.listen(e, "cds-file-uploader-drop-container-changed", (a) => {
|
|
740
|
+
const c = a.detail?.addedFiles || [], d = e.multiple ? c : c.slice(0, 1);
|
|
741
|
+
t && Se(t, d), r(), s && this.dispatchPanelEvent(s, {
|
|
742
|
+
...o,
|
|
743
|
+
files: Array.from(d)
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
}, _t = /* @__PURE__ */ m({
|
|
748
|
+
cdsAccordionWrap: () => Nt,
|
|
749
|
+
cdsContentSwitcherWrap: () => Mt,
|
|
750
|
+
cdsTabsVerticalWrap: () => Ft,
|
|
751
|
+
cdsTabsWrap: () => Bt
|
|
752
|
+
}), Bt = {
|
|
753
|
+
selector: "cds-tabs",
|
|
754
|
+
init: function(e) {
|
|
755
|
+
const t = customElements.get("cds-tabs"), o = i(e), s = e.getAttribute("before-select-event");
|
|
756
|
+
s && this.listen(e, t.eventBeforeSelect, (r) => {
|
|
757
|
+
this.dispatchPanelEvent(s, {
|
|
758
|
+
...o,
|
|
759
|
+
tabValue: r.detail.item?.getAttribute("value"),
|
|
760
|
+
cancelable: !0
|
|
761
|
+
});
|
|
762
|
+
});
|
|
763
|
+
const n = o.event;
|
|
764
|
+
n && this.listen(e, t.eventSelect, (r) => {
|
|
765
|
+
const a = r.detail.item, c = i(a);
|
|
766
|
+
this.dispatchPanelEvent(n, {
|
|
767
|
+
...o,
|
|
768
|
+
...c,
|
|
769
|
+
tabValue: a.getAttribute("value"),
|
|
770
|
+
tabIndex: r.detail.index,
|
|
771
|
+
tabText: r.detail.text
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
}, Nt = {
|
|
776
|
+
selector: "cds-accordion",
|
|
777
|
+
init: function(e) {
|
|
778
|
+
const t = customElements.get("cds-accordion-item"), o = i(e);
|
|
779
|
+
[...e.querySelectorAll("cds-accordion-item")].forEach((s) => {
|
|
780
|
+
const n = i(s), r = n.event || o.event;
|
|
781
|
+
r && this.listen(s, t.eventToggle, (a) => {
|
|
782
|
+
this.dispatchPanelEvent(r, {
|
|
783
|
+
...o,
|
|
784
|
+
...n,
|
|
785
|
+
open: a.detail.open
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
}, Mt = {
|
|
791
|
+
selector: "cds-content-switcher",
|
|
792
|
+
init: function(e) {
|
|
793
|
+
const t = customElements.get("cds-content-switcher"), o = i(e), s = e.getAttribute("before-select-event");
|
|
794
|
+
s && this.listen(e, t.eventBeforeSelect, (r) => {
|
|
795
|
+
this.dispatchPanelEvent(s, {
|
|
796
|
+
...o,
|
|
797
|
+
value: r.detail.item?.getAttribute("value"),
|
|
798
|
+
cancelable: !0
|
|
799
|
+
});
|
|
800
|
+
});
|
|
801
|
+
const n = o.event;
|
|
802
|
+
n && this.listen(e, t.eventSelect, (r) => {
|
|
803
|
+
const a = r.detail.item, c = i(a);
|
|
804
|
+
this.dispatchPanelEvent(n, {
|
|
805
|
+
...o,
|
|
806
|
+
...c,
|
|
807
|
+
value: a.getAttribute("value")
|
|
808
|
+
});
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
}, Ft = { selector: "cds-tabs-vertical" }, Lt = /* @__PURE__ */ m({
|
|
812
|
+
cdsBreadCrumbWrap: () => Rt,
|
|
813
|
+
cdsBreadcrumbItemWrap: () => Ot,
|
|
814
|
+
cdsBreadcrumbLinkWrap: () => zt
|
|
815
|
+
}), Ot = { selector: "cds-breadcrumb-item" }, zt = {
|
|
816
|
+
selector: "cds-breadcrumb-link",
|
|
817
|
+
event: "click",
|
|
818
|
+
getData: (e, t, o) => (e.preventDefault(), {
|
|
819
|
+
...t,
|
|
820
|
+
href: o.getAttribute("href")
|
|
821
|
+
})
|
|
822
|
+
}, Rt = {
|
|
823
|
+
selector: "cds-breadcrumb",
|
|
824
|
+
init: function(e) {
|
|
825
|
+
const t = this, o = i(e), s = o.event;
|
|
826
|
+
if (s) {
|
|
827
|
+
const n = (a) => {
|
|
828
|
+
t.dispatchPanelEvent(s, {
|
|
829
|
+
...o,
|
|
830
|
+
...a
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
t.listen(e, "click", (a) => {
|
|
834
|
+
const c = a.target.closest("cds-breadcrumb-link");
|
|
835
|
+
if (c) {
|
|
836
|
+
a.preventDefault(), a.stopPropagation();
|
|
837
|
+
const d = i(c);
|
|
838
|
+
n(d);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
const r = e.querySelector("cds-overflow-menu-body");
|
|
842
|
+
r && t.listen(r, "cds-overflow-menu-item-clicked", (a) => {
|
|
843
|
+
a.stopPropagation();
|
|
844
|
+
const c = i(a.target);
|
|
845
|
+
n(c);
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}, qt = /* @__PURE__ */ m({
|
|
850
|
+
cdsNumberInputWrap: () => Ht,
|
|
851
|
+
cdsPasswordInputWrap: () => Gt,
|
|
852
|
+
cdsSearchWrap: () => jt,
|
|
853
|
+
cdsTextAreaWrap: () => $t,
|
|
854
|
+
cdsTextInputWrap: () => Ut
|
|
855
|
+
}), Ut = {
|
|
856
|
+
selector: "cds-text-input",
|
|
857
|
+
multiEvent: !0,
|
|
858
|
+
events: [{
|
|
859
|
+
type: "input",
|
|
860
|
+
attrName: "event",
|
|
861
|
+
getData: (e, t) => ({
|
|
862
|
+
...t,
|
|
863
|
+
value: e.currentTarget.value
|
|
864
|
+
})
|
|
865
|
+
}, {
|
|
866
|
+
type: "change",
|
|
867
|
+
attrName: "change-event",
|
|
868
|
+
getData: (e, t) => ({
|
|
869
|
+
...t,
|
|
870
|
+
value: e.currentTarget.value
|
|
871
|
+
})
|
|
872
|
+
}]
|
|
873
|
+
}, $t = {
|
|
874
|
+
selector: "cds-textarea",
|
|
875
|
+
multiEvent: !0,
|
|
876
|
+
events: [{
|
|
877
|
+
type: "input",
|
|
878
|
+
attrName: "event",
|
|
879
|
+
getData: (e, t) => ({
|
|
880
|
+
...t,
|
|
881
|
+
value: e.currentTarget.value
|
|
882
|
+
})
|
|
883
|
+
}, {
|
|
884
|
+
type: "change",
|
|
885
|
+
attrName: "change-event",
|
|
886
|
+
getData: (e, t) => ({
|
|
887
|
+
...t,
|
|
888
|
+
value: e.currentTarget.value
|
|
889
|
+
})
|
|
890
|
+
}]
|
|
891
|
+
}, Ht = {
|
|
892
|
+
selector: "cds-number-input",
|
|
893
|
+
event: "cds-number-input",
|
|
894
|
+
getData: (e, t, o) => ({
|
|
895
|
+
...t,
|
|
896
|
+
value: e.detail.value,
|
|
897
|
+
direction: e.detail.direction
|
|
898
|
+
})
|
|
899
|
+
}, Gt = {
|
|
900
|
+
selector: "cds-password-input",
|
|
901
|
+
multiEvent: !0,
|
|
902
|
+
events: [{
|
|
903
|
+
type: "input",
|
|
904
|
+
attrName: "event",
|
|
905
|
+
getData: (e, t) => ({
|
|
906
|
+
...t,
|
|
907
|
+
value: e.currentTarget.value
|
|
908
|
+
})
|
|
909
|
+
}, {
|
|
910
|
+
type: "change",
|
|
911
|
+
attrName: "change-event",
|
|
912
|
+
getData: (e, t) => ({
|
|
913
|
+
...t,
|
|
914
|
+
value: e.currentTarget.value
|
|
915
|
+
})
|
|
916
|
+
}]
|
|
917
|
+
}, jt = {
|
|
918
|
+
selector: "cds-search",
|
|
919
|
+
event: "cds-search-input",
|
|
920
|
+
getData: (e, t, o) => ({
|
|
921
|
+
...t,
|
|
922
|
+
value: o.value
|
|
923
|
+
})
|
|
924
|
+
}, Vt = /* @__PURE__ */ m({
|
|
925
|
+
cdsCheckboxWrap: () => Zt,
|
|
926
|
+
cdsRadioButGroupWrap: () => Jt,
|
|
927
|
+
cdsSelectWrap: () => Qt,
|
|
928
|
+
cdsSliderWrap: () => Xt,
|
|
929
|
+
cdsToggleWrap: () => Kt
|
|
930
|
+
}), Zt = {
|
|
931
|
+
selector: "cds-checkbox",
|
|
932
|
+
event: "cds-checkbox-changed",
|
|
933
|
+
getData: (e, t, o) => ({
|
|
934
|
+
...t,
|
|
935
|
+
checked: e.detail.checked,
|
|
936
|
+
value: o.value
|
|
937
|
+
})
|
|
938
|
+
}, Jt = {
|
|
939
|
+
selector: "cds-radio-button-group",
|
|
940
|
+
event: "cds-radio-button-group-changed",
|
|
941
|
+
getData: (e, t) => ({
|
|
942
|
+
...t,
|
|
943
|
+
value: e.detail?.value
|
|
944
|
+
})
|
|
945
|
+
}, Kt = {
|
|
946
|
+
selector: "cds-toggle",
|
|
947
|
+
event: "cds-toggle-changed",
|
|
948
|
+
getData: (e, t) => ({
|
|
949
|
+
...t,
|
|
950
|
+
isOn: e.detail.checked,
|
|
951
|
+
value: e.detail.checked
|
|
952
|
+
})
|
|
953
|
+
}, Qt = {
|
|
954
|
+
selector: "cds-select",
|
|
955
|
+
event: "cds-select-selected",
|
|
956
|
+
getData: (e, t) => ({
|
|
957
|
+
...t,
|
|
958
|
+
value: e.detail.value
|
|
959
|
+
})
|
|
960
|
+
}, Xt = {
|
|
961
|
+
selector: "cds-slider",
|
|
962
|
+
init: function(e) {
|
|
963
|
+
const t = i(e), o = t.event;
|
|
964
|
+
o && this.listen(e, "cds-slider-changed", (n) => {
|
|
965
|
+
this.dispatchPanelEvent(o, {
|
|
966
|
+
...t,
|
|
967
|
+
value: n.detail.value
|
|
968
|
+
});
|
|
969
|
+
});
|
|
970
|
+
const s = e.getAttribute("input-event");
|
|
971
|
+
s && this.listen(e, "cds-slider-input-changed", (n) => {
|
|
972
|
+
this.dispatchPanelEvent(s, {
|
|
973
|
+
...t,
|
|
974
|
+
value: n.detail.value
|
|
975
|
+
});
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
}, Yt = /* @__PURE__ */ m({
|
|
979
|
+
cdsOperationalTagWrap: () => os,
|
|
980
|
+
cdsSDismissibleTagWrap: () => ts,
|
|
981
|
+
cdsSelectableTagWrap: () => ss,
|
|
982
|
+
cdsTagSkeletonWrap: () => ns,
|
|
983
|
+
cdsTagsWrap: () => es
|
|
984
|
+
}), es = {
|
|
985
|
+
selector: "cds-tag",
|
|
986
|
+
event: "click",
|
|
987
|
+
getData: (e, t) => t
|
|
988
|
+
}, ts = {
|
|
989
|
+
selector: "cds-dismissible-tag",
|
|
990
|
+
init: function(e) {
|
|
991
|
+
const t = i(e), o = e.getAttribute("click-event");
|
|
992
|
+
o && this.listen(e, "click", (n) => {
|
|
993
|
+
n.target.closest("button") || this.dispatchPanelEvent(o, { ...t });
|
|
994
|
+
});
|
|
995
|
+
const s = t.event;
|
|
996
|
+
s && this.listen(e, "cds-dismissible-tag-closed", (n) => {
|
|
997
|
+
this.dispatchPanelEvent(s, {
|
|
998
|
+
...t,
|
|
999
|
+
action: "closed"
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
}, Ie = (e) => function(t) {
|
|
1004
|
+
const o = i(t), s = t.constructor, n = s.eventBeforeSelected || `${e}-beingselected`, r = s.eventSelected || `${e}-selected`, a = t.getAttribute("before-select-event");
|
|
1005
|
+
a && this.listen(t, n, (d) => {
|
|
1006
|
+
this.dispatchPanelEvent(a, {
|
|
1007
|
+
...o,
|
|
1008
|
+
selected: t.selected,
|
|
1009
|
+
text: t.text,
|
|
1010
|
+
action: "selecting",
|
|
1011
|
+
cancelable: !0
|
|
1012
|
+
});
|
|
1013
|
+
});
|
|
1014
|
+
const c = o.event;
|
|
1015
|
+
c && this.listen(t, r, (d) => {
|
|
1016
|
+
this.dispatchPanelEvent(c, {
|
|
1017
|
+
...o,
|
|
1018
|
+
selected: t.selected,
|
|
1019
|
+
text: t.text,
|
|
1020
|
+
action: t.selected ? "selected" : "deselected"
|
|
1021
|
+
});
|
|
1022
|
+
});
|
|
1023
|
+
}, ss = {
|
|
1024
|
+
selector: "cds-selectable-tag",
|
|
1025
|
+
init: Ie("cds-selectable-tag")
|
|
1026
|
+
}, os = {
|
|
1027
|
+
selector: "cds-operational-tag",
|
|
1028
|
+
init: Ie("cds-operational-tag")
|
|
1029
|
+
}, ns = { selector: "cds-tag-skeleton" }, rs = /* @__PURE__ */ m({
|
|
1030
|
+
cdsContainedListDescriptionWrap: () => ls,
|
|
1031
|
+
cdsContainedListItemWrap: () => ds,
|
|
1032
|
+
cdsContainedListWrap: () => is,
|
|
1033
|
+
cdsListItemWrap: () => ms,
|
|
1034
|
+
cdsOrderedListWrap: () => vs,
|
|
1035
|
+
cdsOverflowMenuWrap: () => as,
|
|
1036
|
+
cdsStructuredListWrap: () => cs,
|
|
1037
|
+
cdsTreeViewWrap: () => ps,
|
|
1038
|
+
cdsUnorderedListWrap: () => us
|
|
1039
|
+
}), as = {
|
|
1040
|
+
selector: "cds-overflow-menu",
|
|
1041
|
+
init: function(e) {
|
|
1042
|
+
const t = i(e), o = t.event, s = e.querySelector("cds-overflow-menu-body");
|
|
1043
|
+
o && s && this.listen(s, "cds-overflow-menu-item-clicked", (n) => {
|
|
1044
|
+
n.stopPropagation();
|
|
1045
|
+
const r = i(n.target);
|
|
1046
|
+
this.dispatchPanelEvent(o, {
|
|
1047
|
+
...t,
|
|
1048
|
+
...r
|
|
1049
|
+
});
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
}, cs = {
|
|
1053
|
+
selector: "cds-structured-list",
|
|
1054
|
+
init: function(e) {
|
|
1055
|
+
const t = i(e);
|
|
1056
|
+
[...e.querySelectorAll("cds-structured-list-row")].forEach((o) => {
|
|
1057
|
+
const s = i(o), n = s.event || t.event;
|
|
1058
|
+
n && this.listen(o, "click", (r) => {
|
|
1059
|
+
r.stopPropagation(), this.dispatchPanelEvent(n, {
|
|
1060
|
+
...t,
|
|
1061
|
+
...s
|
|
1062
|
+
});
|
|
1063
|
+
});
|
|
1064
|
+
}), e.hasAttribute("selection") && this.listen(e, "cds-structured-list-selected", (o) => {
|
|
1065
|
+
const s = o.detail.row, n = i(s), r = t.event;
|
|
1066
|
+
r && this.dispatchPanelEvent(r, {
|
|
1067
|
+
...t,
|
|
1068
|
+
...n
|
|
1069
|
+
});
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
}, is = { selector: "cds-contained-list" }, ls = { selector: "cds-contained-list-description" }, ds = {
|
|
1073
|
+
selector: "cds-contained-list-item",
|
|
1074
|
+
event: "cds-contained-list-item-click",
|
|
1075
|
+
getData: (e, t) => t
|
|
1076
|
+
}, ps = {
|
|
1077
|
+
selector: "cds-tree-view",
|
|
1078
|
+
init: function(e) {
|
|
1079
|
+
const t = i(e);
|
|
1080
|
+
this.listen(e, "cds-tree-node-selected", (s) => {
|
|
1081
|
+
const n = s.detail.node, r = i(n), a = r.event || t.event;
|
|
1082
|
+
a && this.dispatchPanelEvent(a, {
|
|
1083
|
+
...t,
|
|
1084
|
+
...r,
|
|
1085
|
+
nodeId: n.id,
|
|
1086
|
+
label: n.getAttribute("label")
|
|
1087
|
+
});
|
|
1088
|
+
});
|
|
1089
|
+
const o = S(e, "expand-event");
|
|
1090
|
+
o && this.listen(e, "cds-tree-node-expanded", (s) => {
|
|
1091
|
+
this.dispatchPanelEvent(o, {
|
|
1092
|
+
...t,
|
|
1093
|
+
nodeId: s.detail.node.id,
|
|
1094
|
+
expanded: s.detail.expanded
|
|
1095
|
+
});
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
}, us = { selector: "cds-unordered-list" }, vs = { selector: "cds-ordered-list" }, ms = { selector: "cds-list-item" }, fs = /* @__PURE__ */ m({
|
|
1099
|
+
cdsActionableNotificationWrap: () => bs,
|
|
1100
|
+
cdsCalloutNotificationWrap: () => ks,
|
|
1101
|
+
cdsInlineNotificationWrap: () => gs,
|
|
1102
|
+
cdsToastNotificationWrap: () => hs
|
|
1103
|
+
}), hs = {
|
|
1104
|
+
selector: "cds-toast-notification",
|
|
1105
|
+
event: "cds-notification-closed",
|
|
1106
|
+
getData: (e, t) => ({
|
|
1107
|
+
...t,
|
|
1108
|
+
action: "closed"
|
|
1109
|
+
})
|
|
1110
|
+
}, gs = {
|
|
1111
|
+
selector: "cds-inline-notification",
|
|
1112
|
+
event: "cds-notification-closed",
|
|
1113
|
+
getData: (e, t) => ({
|
|
1114
|
+
...t,
|
|
1115
|
+
action: "closed"
|
|
1116
|
+
})
|
|
1117
|
+
}, bs = {
|
|
1118
|
+
selector: "cds-actionable-notification",
|
|
1119
|
+
init: function(e) {
|
|
1120
|
+
const t = i(e), o = S(e, "close-event", "event");
|
|
1121
|
+
o && this.listen(e, "cds-notification-closed", (n) => {
|
|
1122
|
+
this.dispatchPanelEvent(o, {
|
|
1123
|
+
...t,
|
|
1124
|
+
action: "closed"
|
|
1125
|
+
});
|
|
1126
|
+
});
|
|
1127
|
+
const s = S(e, "action-event");
|
|
1128
|
+
s && this.listen(e, "cds-notification-actioned", (n) => {
|
|
1129
|
+
this.dispatchPanelEvent(s, {
|
|
1130
|
+
...t,
|
|
1131
|
+
action: "actioned"
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
}, ks = { selector: "cds-callout-notification" }, Ws = /* @__PURE__ */ m({
|
|
1136
|
+
cdsClickableTileWrap: () => Is,
|
|
1137
|
+
cdsExpandableTileWrap: () => ys,
|
|
1138
|
+
cdsRadioTileWrap: () => Cs,
|
|
1139
|
+
cdsSelectableTileWrap: () => Ps,
|
|
1140
|
+
cdsTileGroupWrap: () => As,
|
|
1141
|
+
cdsTileWrap: () => Es
|
|
1142
|
+
});
|
|
1143
|
+
function Ss(e) {
|
|
1144
|
+
customElements.whenDefined(e).then((t) => {
|
|
1145
|
+
if (!t || t.prototype.__zooyChevronListenerPatched) return;
|
|
1146
|
+
const o = t.prototype.render;
|
|
1147
|
+
t.prototype.render = function() {
|
|
1148
|
+
const s = o.call(this), n = s?.strings?.findIndex?.((a) => /@click="$/.test(a)) ?? -1;
|
|
1149
|
+
if (n < 0 || s.values[n] !== "") return s;
|
|
1150
|
+
const r = s.values.slice();
|
|
1151
|
+
return r[n] = void 0, {
|
|
1152
|
+
...s,
|
|
1153
|
+
values: r
|
|
1154
|
+
};
|
|
1155
|
+
}, t.prototype.__zooyChevronListenerPatched = !0;
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
Ss("cds-expandable-tile");
|
|
1159
|
+
var Es = { selector: "cds-tile" }, Is = {
|
|
1160
|
+
selector: "cds-clickable-tile",
|
|
1161
|
+
init: function(e) {
|
|
1162
|
+
const t = i(e), o = t.event;
|
|
1163
|
+
if (o) {
|
|
1164
|
+
const s = t.href || e.getAttribute("href") || "";
|
|
1165
|
+
e.removeAttribute("href"), e.addEventListener("click", (n) => {
|
|
1166
|
+
n.preventDefault(), n.stopPropagation(), this.dispatchPanelEvent(o, {
|
|
1167
|
+
...t,
|
|
1168
|
+
href: s
|
|
1169
|
+
});
|
|
1170
|
+
}, !0);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}, ys = {
|
|
1174
|
+
selector: "cds-expandable-tile",
|
|
1175
|
+
init: function(e) {
|
|
1176
|
+
const t = i(e), o = e.getAttribute("before-toggle-event");
|
|
1177
|
+
o && this.listen(e, "cds-expandable-tile-beingtoggled", (n) => {
|
|
1178
|
+
this.dispatchPanelEvent(o, {
|
|
1179
|
+
...t,
|
|
1180
|
+
expanded: n.detail.expanded,
|
|
1181
|
+
cancelable: !0
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
const s = t.event;
|
|
1185
|
+
s && this.listen(e, "cds-expandable-tile-toggled", (n) => {
|
|
1186
|
+
this.dispatchPanelEvent(s, {
|
|
1187
|
+
...t,
|
|
1188
|
+
expanded: n.detail.expanded
|
|
1189
|
+
});
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
}, Ps = {
|
|
1193
|
+
selector: "cds-selectable-tile",
|
|
1194
|
+
event: "cds-selectable-tile-changed",
|
|
1195
|
+
getData: (e, t, o) => ({
|
|
1196
|
+
...t,
|
|
1197
|
+
selected: e.detail.selected,
|
|
1198
|
+
value: o.value
|
|
1199
|
+
})
|
|
1200
|
+
}, Cs = {
|
|
1201
|
+
selector: "cds-radio-tile",
|
|
1202
|
+
event: "cds-radio-tile-selected",
|
|
1203
|
+
getData: (e, t, o) => ({
|
|
1204
|
+
...t,
|
|
1205
|
+
selected: e.detail.selected,
|
|
1206
|
+
name: e.detail.name,
|
|
1207
|
+
value: o.value
|
|
1208
|
+
})
|
|
1209
|
+
}, As = {
|
|
1210
|
+
selector: "cds-tile-group",
|
|
1211
|
+
init: function(e) {
|
|
1212
|
+
const t = i(e), o = t.event;
|
|
1213
|
+
o && (this.listen(e, "cds-current-radio-tile-selection", (s) => {
|
|
1214
|
+
const n = s.detail.target;
|
|
1215
|
+
this.dispatchPanelEvent(o, {
|
|
1216
|
+
...t,
|
|
1217
|
+
value: n?.value,
|
|
1218
|
+
name: n?.name,
|
|
1219
|
+
selected: n?.selected
|
|
1220
|
+
});
|
|
1221
|
+
}), this.listen(e, "cds-current-selectable-tile-selections", (s) => {
|
|
1222
|
+
const n = s.detail.currentSelections || [];
|
|
1223
|
+
this.dispatchPanelEvent(o, {
|
|
1224
|
+
...t,
|
|
1225
|
+
values: n.map((r) => r.value),
|
|
1226
|
+
names: n.map((r) => r.name),
|
|
1227
|
+
count: n.length
|
|
1228
|
+
});
|
|
1229
|
+
}));
|
|
1230
|
+
}
|
|
1231
|
+
}, ws = /* @__PURE__ */ m({
|
|
1232
|
+
cdsInlineLoadingWrap: () => Ts,
|
|
1233
|
+
cdsProgressBarWrap: () => xs,
|
|
1234
|
+
cdsProgressIndicatorWrap: () => Ds
|
|
1235
|
+
}), xs = {
|
|
1236
|
+
selector: "cds-progress-bar",
|
|
1237
|
+
init: function(e) {
|
|
1238
|
+
const t = i(e);
|
|
1239
|
+
if (t.event) {
|
|
1240
|
+
const o = new MutationObserver(() => {
|
|
1241
|
+
const s = parseFloat(e.getAttribute("value") || "0");
|
|
1242
|
+
s >= parseFloat(e.getAttribute("max") || "100") && this.dispatchPanelEvent(t.event, {
|
|
1243
|
+
...t,
|
|
1244
|
+
value: s,
|
|
1245
|
+
status: "complete"
|
|
1246
|
+
});
|
|
1247
|
+
});
|
|
1248
|
+
o.observe(e, {
|
|
1249
|
+
attributes: !0,
|
|
1250
|
+
attributeFilter: ["value"]
|
|
1251
|
+
}), e._progressObserver = o;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
}, Ds = {
|
|
1255
|
+
selector: "cds-progress-indicator",
|
|
1256
|
+
init: function(e) {
|
|
1257
|
+
const t = i(e), o = () => [...e.querySelectorAll("cds-progress-step")];
|
|
1258
|
+
(t.event || o().some((s) => i(s).event)) && typeof e.onChange != "function" && (e.onChange = () => {
|
|
1259
|
+
}), this.listen(e, "cds-progress-step-click", (s) => {
|
|
1260
|
+
const n = s.target, r = i(n), a = r.event || t.event;
|
|
1261
|
+
a && this.dispatchPanelEvent(a, {
|
|
1262
|
+
...t,
|
|
1263
|
+
...r,
|
|
1264
|
+
stepIndex: o().indexOf(n),
|
|
1265
|
+
stepLabel: n.getAttribute("label")
|
|
1266
|
+
});
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
}, Ts = {
|
|
1270
|
+
selector: "cds-inline-loading",
|
|
1271
|
+
init: function(e) {
|
|
1272
|
+
const t = i(e), o = t.event;
|
|
1273
|
+
o && this.listen(e, "cds-inline-loading-onsuccess", (n) => {
|
|
1274
|
+
this.dispatchPanelEvent(o, {
|
|
1275
|
+
...t,
|
|
1276
|
+
status: "finished"
|
|
1277
|
+
});
|
|
1278
|
+
});
|
|
1279
|
+
const s = e.getAttribute("status-event");
|
|
1280
|
+
if (s) {
|
|
1281
|
+
const n = new MutationObserver((r) => {
|
|
1282
|
+
r.forEach((a) => {
|
|
1283
|
+
if (a.attributeName === "status") {
|
|
1284
|
+
const c = e.getAttribute("status");
|
|
1285
|
+
this.dispatchPanelEvent(s, {
|
|
1286
|
+
...t,
|
|
1287
|
+
status: c
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
});
|
|
1292
|
+
n.observe(e, {
|
|
1293
|
+
attributes: !0,
|
|
1294
|
+
attributeFilter: ["status"]
|
|
1295
|
+
}), e._statusObserver = n;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}, _s = /* @__PURE__ */ m({
|
|
1299
|
+
cdsDefinitionTooltipWrap: () => Fs,
|
|
1300
|
+
cdsPopoverWrap: () => Ns,
|
|
1301
|
+
cdsToggletipWrap: () => Ms,
|
|
1302
|
+
cdsTooltipWrap: () => Bs
|
|
1303
|
+
}), Bs = {
|
|
1304
|
+
selector: "cds-tooltip",
|
|
1305
|
+
init: function(e) {
|
|
1306
|
+
const t = i(e), o = S(e, "open-event");
|
|
1307
|
+
o && this.listen(e, "cds-tooltip-beingopened", (n) => {
|
|
1308
|
+
this.dispatchPanelEvent(o, {
|
|
1309
|
+
...t,
|
|
1310
|
+
action: "opened"
|
|
1311
|
+
});
|
|
1312
|
+
});
|
|
1313
|
+
const s = S(e, "close-event");
|
|
1314
|
+
s && this.listen(e, "cds-tooltip-closed", (n) => {
|
|
1315
|
+
this.dispatchPanelEvent(s, {
|
|
1316
|
+
...t,
|
|
1317
|
+
action: "closed"
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
}, Ns = {
|
|
1322
|
+
selector: "cds-popover",
|
|
1323
|
+
init: function(e) {
|
|
1324
|
+
const t = i(e), o = S(e, "open-event");
|
|
1325
|
+
o && this.listen(e, "cds-popover-beingopened", (n) => {
|
|
1326
|
+
this.dispatchPanelEvent(o, {
|
|
1327
|
+
...t,
|
|
1328
|
+
action: "opened"
|
|
1329
|
+
});
|
|
1330
|
+
});
|
|
1331
|
+
const s = S(e, "close-event");
|
|
1332
|
+
s && this.listen(e, "cds-popover-closed", (n) => {
|
|
1333
|
+
this.dispatchPanelEvent(s, {
|
|
1334
|
+
...t,
|
|
1335
|
+
action: "closed"
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
}, Ms = {
|
|
1340
|
+
selector: "cds-toggletip",
|
|
1341
|
+
init: function(e) {
|
|
1342
|
+
const t = i(e);
|
|
1343
|
+
if (t.event) {
|
|
1344
|
+
const o = new MutationObserver((s) => {
|
|
1345
|
+
s.forEach((n) => {
|
|
1346
|
+
if (n.attributeName === "open") {
|
|
1347
|
+
const r = e.hasAttribute("open");
|
|
1348
|
+
this.dispatchPanelEvent(t.event, {
|
|
1349
|
+
...t,
|
|
1350
|
+
action: r ? "opened" : "closed",
|
|
1351
|
+
open: r
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
});
|
|
1355
|
+
});
|
|
1356
|
+
o.observe(e, {
|
|
1357
|
+
attributes: !0,
|
|
1358
|
+
attributeFilter: ["open"]
|
|
1359
|
+
}), e._toggletipObserver = o;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
}, Fs = { selector: "cds-definition-tooltip" }, Ls = /* @__PURE__ */ m({
|
|
1363
|
+
cdsCodeSnipWrap: () => zs,
|
|
1364
|
+
cdsLinkWrap: () => Os
|
|
1365
|
+
}), Os = {
|
|
1366
|
+
selector: "cds-link",
|
|
1367
|
+
event: "click",
|
|
1368
|
+
getData: (e, t, o) => ({
|
|
1369
|
+
...t,
|
|
1370
|
+
href: o.getAttribute("href")
|
|
1371
|
+
})
|
|
1372
|
+
}, zs = {
|
|
1373
|
+
selector: "cds-code-snippet",
|
|
1374
|
+
event: "cds-copy-button-clicked",
|
|
1375
|
+
getData: (e, t) => ({
|
|
1376
|
+
...t,
|
|
1377
|
+
action: "copied"
|
|
1378
|
+
})
|
|
1379
|
+
}, Rs = /* @__PURE__ */ m({
|
|
1380
|
+
cdsBadgeIndicatorWrap: () => Js,
|
|
1381
|
+
cdsColumnHangWrap: () => eo,
|
|
1382
|
+
cdsColumnWrap: () => Ys,
|
|
1383
|
+
cdsFormGroupWrap: () => $s,
|
|
1384
|
+
cdsFormItemWrap: () => Us,
|
|
1385
|
+
cdsFormWrap: () => qs,
|
|
1386
|
+
cdsGridWrap: () => Xs,
|
|
1387
|
+
cdsHeadingWrap: () => Gs,
|
|
1388
|
+
cdsIconIndicatorWrap: () => Zs,
|
|
1389
|
+
cdsIconWrap: () => Vs,
|
|
1390
|
+
cdsLayerWrap: () => Qs,
|
|
1391
|
+
cdsLoadingWrap: () => Ks,
|
|
1392
|
+
cdsSectionWrap: () => js,
|
|
1393
|
+
cdsStackWrap: () => Hs
|
|
1394
|
+
}), qs = { selector: "cds-form" }, Us = { selector: "cds-form-item" }, $s = { selector: "cds-form-group" }, Hs = { selector: "cds-stack" }, Gs = { selector: "cds-heading" }, js = { selector: "cds-section" }, Vs = { selector: "cds-icon" }, Zs = { selector: "cds-icon-indicator" }, Js = { selector: "cds-badge-indicator" }, Ks = { selector: "cds-loading" }, Qs = { selector: "cds-layer" }, Xs = { selector: "cds-grid" }, Ys = { selector: "cds-column" }, eo = { selector: "cds-column-hang" }, to = /* @__PURE__ */ m({
|
|
1395
|
+
cdsAccordionItemSkeletonWrap: () => ao,
|
|
1396
|
+
cdsAccordionSkeletonWrap: () => ro,
|
|
1397
|
+
cdsBreadcrumbSkeletonWrap: () => co,
|
|
1398
|
+
cdsButtonSkeletonWrap: () => io,
|
|
1399
|
+
cdsCheckboxSkeletonWrap: () => lo,
|
|
1400
|
+
cdsCodeSnippetSkeletonWrap: () => po,
|
|
1401
|
+
cdsDatePickerInputSkeletonWrap: () => vo,
|
|
1402
|
+
cdsDropdownSkeletonWrap: () => mo,
|
|
1403
|
+
cdsFileUploaderSkeletonWrap: () => fo,
|
|
1404
|
+
cdsNumberInputSkeletonWrap: () => ho,
|
|
1405
|
+
cdsPasswordInputSkeletonWrap: () => go,
|
|
1406
|
+
cdsProgressIndicatorSkeletonWrap: () => bo,
|
|
1407
|
+
cdsProgressStepSkeletonWrap: () => ko,
|
|
1408
|
+
cdsRadioButtonSkeletonWrap: () => Wo,
|
|
1409
|
+
cdsSearchSkeletonWrap: () => So,
|
|
1410
|
+
cdsSelectSkeletonWrap: () => Eo,
|
|
1411
|
+
cdsSkeletonIconWrap: () => no,
|
|
1412
|
+
cdsSkeletonPlaceholderWrap: () => oo,
|
|
1413
|
+
cdsSkeletonTextWrap: () => so,
|
|
1414
|
+
cdsSliderSkeletonWrap: () => Io,
|
|
1415
|
+
cdsStructuredListHeaderCellSkeletonWrap: () => yo,
|
|
1416
|
+
cdsTabSkeletonWrap: () => Co,
|
|
1417
|
+
cdsTableSkeletonWrap: () => uo,
|
|
1418
|
+
cdsTabsSkeletonWrap: () => Po,
|
|
1419
|
+
cdsTextInputSkeletonWrap: () => Ao,
|
|
1420
|
+
cdsTextareaSkeletonWrap: () => wo,
|
|
1421
|
+
cdsToggleSkeletonWrap: () => xo
|
|
1422
|
+
}), so = { selector: "cds-skeleton-text" }, oo = { selector: "cds-skeleton-placeholder" }, no = { selector: "cds-skeleton-icon" }, ro = { selector: "cds-accordion-skeleton" }, ao = { selector: "cds-accordion-item-skeleton" }, co = { selector: "cds-breadcrumb-skeleton" }, io = { selector: "cds-button-skeleton" }, lo = { selector: "cds-checkbox-skeleton" }, po = { selector: "cds-code-snippet-skeleton" }, uo = { selector: "cds-table-skeleton" }, vo = { selector: "cds-date-picker-input-skeleton" }, mo = { selector: "cds-dropdown-skeleton" }, fo = { selector: "cds-file-uploader-skeleton" }, ho = { selector: "cds-number-input-skeleton" }, go = { selector: "cds-password-input-skeleton" }, bo = { selector: "cds-progress-indicator-skeleton" }, ko = { selector: "cds-progress-step-skeleton" }, Wo = { selector: "cds-radio-button-skeleton" }, So = { selector: "cds-search-skeleton" }, Eo = { selector: "cds-select-skeleton" }, Io = { selector: "cds-slider-skeleton" }, yo = { selector: "cds-structured-list-header-cell-skeleton" }, Po = { selector: "cds-tabs-skeleton" }, Co = { selector: "cds-tab-skeleton" }, Ao = { selector: "cds-text-input-skeleton" }, wo = { selector: "cds-textarea-skeleton" }, xo = { selector: "cds-toggle-skeleton" };
|
|
1423
|
+
function v(e) {
|
|
1424
|
+
return Object.values(e).filter((t) => typeof t == "object" && t !== null && t.selector);
|
|
1425
|
+
}
|
|
1426
|
+
var Do = [
|
|
1427
|
+
...v(Je),
|
|
1428
|
+
...v(He),
|
|
1429
|
+
...v(Xe),
|
|
1430
|
+
...v(it),
|
|
1431
|
+
...v(pt),
|
|
1432
|
+
...v(bt),
|
|
1433
|
+
...v(Et),
|
|
1434
|
+
...v(Pt),
|
|
1435
|
+
...v(_t),
|
|
1436
|
+
...v(Lt),
|
|
1437
|
+
...v(qt),
|
|
1438
|
+
...v(Vt),
|
|
1439
|
+
...v(Yt),
|
|
1440
|
+
...v(rs),
|
|
1441
|
+
...v(fs),
|
|
1442
|
+
...v(Ws),
|
|
1443
|
+
...v(ws),
|
|
1444
|
+
...v(_s),
|
|
1445
|
+
...v(Ls),
|
|
1446
|
+
...v(Rs),
|
|
1447
|
+
...v(to)
|
|
1448
|
+
];
|
|
1449
|
+
function To() {
|
|
1450
|
+
const e = /* @__PURE__ */ new Map();
|
|
1451
|
+
return Do.forEach((t) => {
|
|
1452
|
+
e.set(t.selector, t);
|
|
1453
|
+
}), e;
|
|
1454
|
+
}
|
|
1455
|
+
var Z = () => import("@carbon/web-components/es/components/accordion/index.js"), F = () => import("@carbon/web-components/es/components/breadcrumb/index.js"), _o = () => import("@carbon/web-components/es/components/stack/index.js"), ne = () => import("@carbon/web-components/es/components/structured-list/index.js"), J = () => import("@carbon/web-components/es/components/contained-list/index.js"), T = () => import("@carbon/web-components/es/components/tile/index.js"), Bo = () => import("@carbon/web-components/es/components/tree-view/index.js"), No = () => import("@carbon/web-components/es/components/link/index.js"), L = () => import("@carbon/web-components/es/components/tabs/index.js"), Mo = () => import("@carbon/web-components/es/components/content-switcher/index.js"), Fo = () => import("@carbon/web-components/es/components/menu/index.js"), Lo = () => import("@carbon/web-components/es/components/menu-button/index.js"), Oo = () => import("@carbon/web-components/es/components/overflow-menu/index.js"), O = () => import("@carbon/web-components/es/components/button/index.js"), re = () => import("@carbon/web-components/es/components/icon-button/index.js"), zo = () => import("@carbon/web-components/es/components/combo-button/index.js"), Ro = () => import("@carbon/web-components/es/components/copy-button/index.js"), ae = () => import("@carbon/web-components/es/components/checkbox/index.js"), ce = () => import("@carbon/web-components/es/components/radio-button/index.js"), ie = () => import("@carbon/web-components/es/components/toggle/index.js"), z = () => import("@carbon/web-components/es/components/select/index.js"), le = () => import("@carbon/web-components/es/components/slider/index.js"), R = () => import("@carbon/web-components/es/components/text-input/index.js"), de = () => import("@carbon/web-components/es/components/textarea/index.js"), pe = () => import("@carbon/web-components/es/components/number-input/index.js"), ue = () => import("@carbon/web-components/es/components/password-input/index.js"), K = () => import("@carbon/web-components/es/components/search/index.js"), qo = () => import("@carbon/web-components/es/components/combo-box/index.js"), ve = () => import("@carbon/web-components/es/components/dropdown/index.js"), Uo = () => import("@carbon/web-components/es/components/multi-select/index.js"), me = () => import("@carbon/web-components/es/components/date-picker/index.js"), $o = () => import("@carbon/web-components/es/components/time-picker/index.js"), N = () => import("@carbon/web-components/es/components/file-uploader/index.js"), fe = () => import("@carbon/web-components/es/components/form/index.js"), Ho = () => import("@carbon/web-components/es/components/form-group/index.js"), he = () => import("@carbon/web-components/es/components/data-table/index.js"), ge = () => import("@carbon/web-components/es/components/pagination/index.js"), be = () => import("@carbon/web-components/es/components/code-snippet/index.js"), M = () => import("@carbon/web-components/es/components/tag/index.js"), Go = () => import("@carbon/web-components/es/components/badge-indicator/index.js"), q = () => import("@carbon/web-components/es/components/notification/index.js"), jo = () => import("@carbon/web-components/es/components/loading/index.js"), Vo = () => import("@carbon/web-components/es/components/inline-loading/index.js"), Zo = () => import("@carbon/web-components/es/components/progress-bar/index.js"), Q = () => import("@carbon/web-components/es/components/progress-indicator/index.js"), Jo = () => import("@carbon/web-components/es/components/skeleton-placeholder/index.js"), Ko = () => import("@carbon/web-components/es/components/skeleton-text/index.js"), Qo = () => import("@carbon/web-components/es/components/skeleton-icon/index.js"), X = () => import("@carbon/web-components/es/components/list/index.js"), Xo = () => import("@carbon/web-components/es/components/layer/index.js"), Y = () => import("@carbon/web-components/es/components/grid/index.js"), Yo = () => import("@carbon/web-components/es/components/pagination-nav/index.js"), P = () => import("@carbon/web-components/es/components/modal/index.js"), y = () => import("@carbon/web-components/es/components/tooltip/index.js"), en = () => import("@carbon/web-components/es/components/popover/index.js"), tn = () => import("@carbon/web-components/es/components/toggle-tip/index.js"), ke = () => import("@carbon/web-components/es/components/heading/index.js"), sn = () => import("@carbon/web-components/es/components/icon/index.js"), on = () => import("@carbon/web-components/es/components/icon-indicator/index.js"), H = {
|
|
1456
|
+
"cds-table": [
|
|
1457
|
+
y,
|
|
1458
|
+
O,
|
|
1459
|
+
R,
|
|
1460
|
+
K,
|
|
1461
|
+
z,
|
|
1462
|
+
ge,
|
|
1463
|
+
he
|
|
1464
|
+
],
|
|
1465
|
+
"cds-pagination": [
|
|
1466
|
+
z,
|
|
1467
|
+
R,
|
|
1468
|
+
ge
|
|
1469
|
+
],
|
|
1470
|
+
"cds-button": [y, O],
|
|
1471
|
+
"cds-icon-button:not([data-toggle])": [y, re],
|
|
1472
|
+
"cds-icon-button[data-toggle]": [y, re],
|
|
1473
|
+
"cds-button[data-fab]": [y, O],
|
|
1474
|
+
"cds-copy-button": [y, Ro],
|
|
1475
|
+
"cds-combo-button": [y, zo],
|
|
1476
|
+
"cds-checkbox": [ae],
|
|
1477
|
+
"cds-radio-button-group": [ce],
|
|
1478
|
+
"cds-toggle": [ie],
|
|
1479
|
+
"cds-select": [z],
|
|
1480
|
+
"cds-slider": [le],
|
|
1481
|
+
"cds-text-input": [R],
|
|
1482
|
+
"cds-textarea": [de],
|
|
1483
|
+
"cds-number-input": [pe],
|
|
1484
|
+
"cds-password-input": [y, ue],
|
|
1485
|
+
"cds-search": [K],
|
|
1486
|
+
"cds-dropdown": [ve],
|
|
1487
|
+
"cds-combo-box": [qo],
|
|
1488
|
+
"cds-multi-select": [Uo],
|
|
1489
|
+
"cds-date-picker": [me],
|
|
1490
|
+
"cds-time-picker": [$o],
|
|
1491
|
+
"cds-file-uploader": [N],
|
|
1492
|
+
"cds-file-uploader-button": [N],
|
|
1493
|
+
"cds-file-uploader-drop-container": [N],
|
|
1494
|
+
"cds-file-uploader-item": [N],
|
|
1495
|
+
"cds-tabs": [L],
|
|
1496
|
+
"cds-accordion": [Z],
|
|
1497
|
+
"cds-content-switcher": [Mo],
|
|
1498
|
+
"cds-breadcrumb": [F],
|
|
1499
|
+
"cds-breadcrumb-item": [F],
|
|
1500
|
+
"cds-breadcrumb-link": [F],
|
|
1501
|
+
"cds-menu": [Fo],
|
|
1502
|
+
"cds-menu-button": [Lo],
|
|
1503
|
+
"cds-overflow-menu": [Oo],
|
|
1504
|
+
"cds-structured-list": [ne],
|
|
1505
|
+
"cds-contained-list": [J],
|
|
1506
|
+
"cds-contained-list-item": [J],
|
|
1507
|
+
"cds-contained-list-description": [J],
|
|
1508
|
+
"cds-tree-view": [Bo],
|
|
1509
|
+
"cds-modal": [P],
|
|
1510
|
+
"cds-modal-header": [P],
|
|
1511
|
+
"cds-modal-heading": [P],
|
|
1512
|
+
"cds-modal-label": [P],
|
|
1513
|
+
"cds-modal-close-button": [P],
|
|
1514
|
+
"cds-modal-body": [P],
|
|
1515
|
+
"cds-modal-body-content": [P],
|
|
1516
|
+
"cds-modal-footer": [P],
|
|
1517
|
+
"cds-modal-footer-button": [P],
|
|
1518
|
+
"cds-toast-notification": [q],
|
|
1519
|
+
"cds-inline-notification": [q],
|
|
1520
|
+
"cds-actionable-notification": [q],
|
|
1521
|
+
"cds-tile": [T],
|
|
1522
|
+
"cds-tile-group": [T],
|
|
1523
|
+
"cds-clickable-tile": [T],
|
|
1524
|
+
"cds-expandable-tile": [T],
|
|
1525
|
+
"cds-selectable-tile": [T],
|
|
1526
|
+
"cds-radio-tile": [T],
|
|
1527
|
+
"cds-progress-bar": [Zo],
|
|
1528
|
+
"cds-progress-indicator": [Q],
|
|
1529
|
+
"cds-inline-loading": [Vo],
|
|
1530
|
+
"cds-tooltip": [y],
|
|
1531
|
+
"cds-popover": [en],
|
|
1532
|
+
"cds-toggletip": [tn],
|
|
1533
|
+
"cds-tag": [M],
|
|
1534
|
+
"cds-dismissible-tag": [M],
|
|
1535
|
+
"cds-selectable-tag": [M],
|
|
1536
|
+
"cds-operational-tag": [M],
|
|
1537
|
+
"cds-tag-skeleton": [M],
|
|
1538
|
+
"cds-link": [No],
|
|
1539
|
+
"cds-code-snippet": [be],
|
|
1540
|
+
"cds-form": [fe],
|
|
1541
|
+
"cds-form-item": [fe],
|
|
1542
|
+
"cds-form-group": [Ho],
|
|
1543
|
+
"cds-stack": [_o],
|
|
1544
|
+
"cds-heading": [ke],
|
|
1545
|
+
"cds-section": [ke],
|
|
1546
|
+
"cds-icon": [sn],
|
|
1547
|
+
"cds-icon-indicator": [on],
|
|
1548
|
+
"cds-badge-indicator": [Go],
|
|
1549
|
+
"cds-loading": [jo],
|
|
1550
|
+
"cds-skeleton-text": [Ko],
|
|
1551
|
+
"cds-skeleton-placeholder": [Jo],
|
|
1552
|
+
"cds-skeleton-icon": [Qo],
|
|
1553
|
+
"cds-accordion-skeleton": [Z],
|
|
1554
|
+
"cds-accordion-item-skeleton": [Z],
|
|
1555
|
+
"cds-breadcrumb-skeleton": [F],
|
|
1556
|
+
"cds-button-skeleton": [O],
|
|
1557
|
+
"cds-checkbox-skeleton": [ae],
|
|
1558
|
+
"cds-code-snippet-skeleton": [be],
|
|
1559
|
+
"cds-table-skeleton": [he],
|
|
1560
|
+
"cds-date-picker-input-skeleton": [me],
|
|
1561
|
+
"cds-dropdown-skeleton": [ve],
|
|
1562
|
+
"cds-file-uploader-skeleton": [N],
|
|
1563
|
+
"cds-number-input-skeleton": [pe],
|
|
1564
|
+
"cds-password-input-skeleton": [ue],
|
|
1565
|
+
"cds-progress-indicator-skeleton": [Q],
|
|
1566
|
+
"cds-progress-step-skeleton": [Q],
|
|
1567
|
+
"cds-radio-button-skeleton": [ce],
|
|
1568
|
+
"cds-search-skeleton": [K],
|
|
1569
|
+
"cds-select-skeleton": [z],
|
|
1570
|
+
"cds-slider-skeleton": [le],
|
|
1571
|
+
"cds-structured-list-header-cell-skeleton": [ne],
|
|
1572
|
+
"cds-tabs-skeleton": [L],
|
|
1573
|
+
"cds-tab-skeleton": [L],
|
|
1574
|
+
"cds-text-input-skeleton": [R],
|
|
1575
|
+
"cds-textarea-skeleton": [de],
|
|
1576
|
+
"cds-toggle-skeleton": [ie],
|
|
1577
|
+
"cds-callout-notification": [q],
|
|
1578
|
+
"cds-definition-tooltip": [y],
|
|
1579
|
+
"cds-tabs-vertical": [L],
|
|
1580
|
+
"cds-unordered-list": [X],
|
|
1581
|
+
"cds-ordered-list": [X],
|
|
1582
|
+
"cds-list-item": [X],
|
|
1583
|
+
"cds-layer": [Xo],
|
|
1584
|
+
"cds-grid": [Y],
|
|
1585
|
+
"cds-column": [Y],
|
|
1586
|
+
"cds-column-hang": [Y],
|
|
1587
|
+
"cds-pagination-nav": [Yo]
|
|
1588
|
+
};
|
|
1589
|
+
function nn(e) {
|
|
1590
|
+
const t = /* @__PURE__ */ new Map();
|
|
1591
|
+
if (!e || !(e instanceof Element)) return t;
|
|
1592
|
+
for (const s of Object.keys($)) t.set(s, []);
|
|
1593
|
+
for (const [s] of Object.entries($)) e.matches(s) && t.get(s).push(e);
|
|
1594
|
+
const o = e.querySelectorAll("*");
|
|
1595
|
+
for (const s of o) for (const [n] of Object.entries($)) s.matches(n) && t.get(n).push(s);
|
|
1596
|
+
for (const [s, n] of t.entries()) n.length === 0 && t.delete(s);
|
|
1597
|
+
return t;
|
|
1598
|
+
}
|
|
1599
|
+
function rn(e) {
|
|
1600
|
+
const t = /* @__PURE__ */ new Set();
|
|
1601
|
+
for (const [o, s] of e.entries()) s.length > 0 && H[o] && H[o].forEach((n) => t.add(n));
|
|
1602
|
+
return t;
|
|
1603
|
+
}
|
|
1604
|
+
async function an(e, t) {
|
|
1605
|
+
if (e.size === 0) return;
|
|
1606
|
+
const o = Array.from(e).map(async (s) => (t.has(s) || t.set(s, s()), t.get(s)));
|
|
1607
|
+
await Promise.all(o);
|
|
1608
|
+
}
|
|
1609
|
+
function cn(e, t) {
|
|
1610
|
+
let o = 0;
|
|
1611
|
+
for (const [s, n] of e.entries()) {
|
|
1612
|
+
const r = $[s];
|
|
1613
|
+
n.forEach((a) => {
|
|
1614
|
+
if (r.init) {
|
|
1615
|
+
r.init.call(t, a);
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
if (r.multiEvent) {
|
|
1619
|
+
const g = i(a);
|
|
1620
|
+
r.events.forEach((E) => {
|
|
1621
|
+
const x = S(a, E.attrName, "event");
|
|
1622
|
+
x && t.listen(a, E.type, (G) => {
|
|
1623
|
+
t.dispatchPanelEvent(x, E.getData(G, g, a));
|
|
1624
|
+
});
|
|
1625
|
+
});
|
|
1626
|
+
return;
|
|
1627
|
+
}
|
|
1628
|
+
const c = i(a), d = c.event;
|
|
1629
|
+
d && t.listen(a, r.event, (g) => {
|
|
1630
|
+
g.stopPropagation();
|
|
1631
|
+
const E = r.getData(g, c, a), x = E._eventOverride || d;
|
|
1632
|
+
delete E._eventOverride, t.dispatchPanelEvent(x, E);
|
|
1633
|
+
});
|
|
1634
|
+
}), o += n.length;
|
|
1635
|
+
}
|
|
1636
|
+
return o;
|
|
1637
|
+
}
|
|
1638
|
+
var $ = Object.fromEntries(To()), ln = async function(e, t) {
|
|
1639
|
+
const o = nn(e);
|
|
1640
|
+
if (o.size === 0) {
|
|
1641
|
+
this.debugMe("[Carbon] No Carbon components found in panel");
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1644
|
+
this.carbonComponents || (this.carbonComponents = /* @__PURE__ */ new Map());
|
|
1645
|
+
for (const [r, a] of o.entries()) this.carbonComponents.set(r, a);
|
|
1646
|
+
const s = rn(o);
|
|
1647
|
+
if (s.size > 0) try {
|
|
1648
|
+
await an(s, t);
|
|
1649
|
+
} catch (r) {
|
|
1650
|
+
console.error("[Carbon] Failed to load some component modules:", r);
|
|
1651
|
+
}
|
|
1652
|
+
const n = cn(o, this);
|
|
1653
|
+
n > 0 && this.debugMe(`[Carbon] Total components initialized: ${n}`);
|
|
1654
|
+
}, mn = (e = {}) => {
|
|
1655
|
+
const { preload: t = [] } = e, o = /* @__PURE__ */ new Map();
|
|
1656
|
+
if (t.length > 0) {
|
|
1657
|
+
const s = t.filter((r) => H[r] ? !0 : (console.warn(`[Carbon] No import found for selector: ${r}`), !1)), n = s.flatMap((r) => H[r].map((a) => (o.has(a) || o.set(a, a()), o.get(a))));
|
|
1658
|
+
Promise.all(n).then(() => console.debug(`[Carbon] Preloaded: ${s.join(", ")}`)).catch((r) => console.warn("[Carbon] Preload error:", r));
|
|
1659
|
+
}
|
|
1660
|
+
ze.register("carbon", {
|
|
1661
|
+
cache: o,
|
|
1662
|
+
render: async function(s, n) {
|
|
1663
|
+
try {
|
|
1664
|
+
await ln.call(this, s, n);
|
|
1665
|
+
} catch (r) {
|
|
1666
|
+
console.error("[Carbon] Initialization error:", r);
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
dispose: function(s) {
|
|
1670
|
+
},
|
|
1671
|
+
config: {
|
|
1672
|
+
version: "2.0",
|
|
1673
|
+
description: "IBM Carbon Design System Web Components"
|
|
1674
|
+
}
|
|
1675
|
+
}), console.debug("[Zooy] Carbon Design System library registered");
|
|
1676
|
+
};
|
|
1677
|
+
export {
|
|
1678
|
+
mn as registerCarbonLibrary
|
|
1679
|
+
};
|