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