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