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