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