@trintel/zooy 1.0.6 → 1.0.8
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/{button-ipPZo47H.js → button-C0ysaw92.js} +1 -1
- package/dist/chunks/{button-B0pHcmMI.js → button-J_l629CJ.js} +4 -4
- package/dist/chunks/{button-skeleton-k3oSeCNN.js → button-skeleton-B_Sgp5GT.js} +4 -4
- package/dist/chunks/{button-skeleton-B6LNPMkm.js → button-skeleton-C6DFZmZH.js} +1 -1
- package/dist/chunks/{checkbox-DIl3-QIU.js → checkbox-CgRvu8uo.js} +1 -1
- package/dist/chunks/{checkbox-CbojCj7Q.js → checkbox-zD4SZkfz.js} +5 -5
- package/dist/chunks/{class-map-YDvRldcS.js → class-map-C3HqAjJs.js} +1 -1
- package/dist/chunks/{class-map-CzV93n0F.js → class-map-CZy_lapI.js} +1 -1
- package/dist/chunks/{content-switcher-item-BImKB6ec.js → content-switcher-item-BwGyOcvG.js} +1 -1
- package/dist/chunks/{content-switcher-item-ITN6pSnn.js → content-switcher-item-D7my36A_.js} +4 -4
- package/dist/chunks/{dropdown-item-kRfkvScw.js → dropdown-item-B4aGGhUu.js} +1 -1
- package/dist/chunks/{dropdown-item-CsDrcPOQ.js → dropdown-item-sj9_Q-2Y.js} +6 -6
- package/dist/chunks/{icon-loader-mGBPivE_.js → icon-loader-ChdGfSmj.js} +1 -1
- package/dist/chunks/{icon-loader-Dow8ZZc6.js → icon-loader-pWXWFpAd.js} +1 -1
- package/dist/chunks/{icon-loader-utils-Bu4uywG7.js → icon-loader-utils-CD3l842s.js} +1 -1
- package/dist/chunks/{icon-loader-utils-DyTEZTmU.js → icon-loader-utils-DdfPalr5.js} +1 -1
- package/dist/chunks/{if-defined-BDPFnNTF.js → if-defined-C0WXUd0n.js} +1 -1
- package/dist/chunks/{if-defined-8Z59Lgbt.js → if-defined-h0V4oPE0.js} +1 -1
- package/dist/chunks/if-non-empty-4oodvODv.js +1 -0
- package/dist/chunks/{if-non-empty-PXsZdrZY.js → if-non-empty-DsNNfSW1.js} +1 -1
- package/dist/chunks/{index-dvBCRXrm.js → index--nPiAPdI.js} +3 -3
- package/dist/chunks/{index-S--lY3tt.js → index-5HiyK8z_.js} +1 -1
- package/dist/chunks/{index-DKAiRnw5.js → index-90TKvaQz.js} +7 -7
- package/dist/chunks/{index-CGgfnUw2.js → index-B80vAz9U.js} +1 -1
- package/dist/chunks/{index-IFR1tBYd.js → index-B9WY40Mg.js} +8 -8
- package/dist/chunks/{index-qE5bNTwO.js → index-BCd5o-O6.js} +4 -4
- package/dist/chunks/{index-B1HY13ji.js → index-BGWhDeBi.js} +2 -2
- package/dist/chunks/{index-DWBna1oy.js → index-BGh5ukZB.js} +3 -3
- package/dist/chunks/{index-BKZY1peh.js → index-BIz0BjjL.js} +1 -1
- package/dist/chunks/{index-BxYuKaia.js → index-BLJaTPjJ.js} +10 -10
- package/dist/chunks/{index-CTCHzPo9.js → index-BM6jRp79.js} +5 -5
- package/dist/chunks/{index-BnGRdxLM.js → index-BN42k7S9.js} +1 -1
- package/dist/chunks/{index-DwyQjc9z.js → index-BNR5ONEM.js} +1 -1
- package/dist/chunks/{index-AIOAeqkA.js → index-BOOSwnW2.js} +1 -1
- package/dist/chunks/{index-BZa4lAPZ.js → index-BOdoMpSP.js} +1 -1
- package/dist/chunks/{index-xA7Xy6rP.js → index-BRUV1CNi.js} +7 -7
- package/dist/chunks/{index-DaPLGBBg.js → index-BTM514kF.js} +5 -5
- package/dist/chunks/{index-BgL2QyGL.js → index-BUX_B_Go.js} +6 -6
- package/dist/chunks/{index-BbbS7f42.js → index-BVNauB67.js} +2 -2
- package/dist/chunks/{index-BXkpcsH3.js → index-BVuFwiy8.js} +1 -1
- package/dist/chunks/{index-BN3-hMLP.js → index-BXCZNGbC.js} +1 -1
- package/dist/chunks/{index-D1nMSslt.js → index-B_-ytvrp.js} +1 -1
- package/dist/chunks/{index-PFLnPKPE.js → index-BdCneYBx.js} +2 -2
- package/dist/chunks/{index-ahaFzumj.js → index-BfyiB6r5.js} +1 -1
- package/dist/chunks/{index-stqanTdz.js → index-Bg1BBBMy.js} +1 -1
- package/dist/chunks/{index-Cqq6DFEH.js → index-BhdW2QbN.js} +1 -1
- package/dist/chunks/{index-HZx30Dhs.js → index-Bm7ePd1P.js} +5 -5
- package/dist/chunks/{index-BvewYlR6.js → index-Bo68CzXB.js} +1 -1
- package/dist/chunks/{index-LXKAODF5.js → index-BoxMbYX3.js} +3 -3
- package/dist/chunks/{index-DnqBivkj.js → index-BqYoAbjK.js} +1 -1
- package/dist/chunks/index-BuuxULtA.js +4 -0
- package/dist/chunks/{index-B6dAUFGm.js → index-By_1f8e1.js} +1 -1
- package/dist/chunks/{index-DAp9FO-q.js → index-Bzp_dDt9.js} +4 -4
- package/dist/chunks/{index-BxGnpgtA.js → index-C-y2nrc1.js} +3 -3
- package/dist/chunks/{index-BX6awuOJ.js → index-C1BCLU9c.js} +7 -7
- package/dist/chunks/{index-DHoTp3xF.js → index-C4MmJOdJ.js} +1 -1
- package/dist/chunks/{index-B9EQl0eG.js → index-C8Epo2Nt.js} +4 -4
- package/dist/chunks/{index-Bwg9JvxU.js → index-C8sCBvHj.js} +1 -1
- package/dist/chunks/{index-BXU45N6f.js → index-CANkW4Or.js} +1 -1
- package/dist/chunks/{index-BMibCYm9.js → index-CI4IDokw.js} +6 -6
- package/dist/chunks/{index-Bg7fp8eN.js → index-CIhGaNHB.js} +9 -9
- package/dist/chunks/{index-Bsg-X5g6.js → index-CKplFFc-.js} +2 -2
- package/dist/chunks/{index-DDrcJDBe.js → index-CQxC5gdy.js} +5 -5
- package/dist/chunks/{index-6SYj2oOF.js → index-CTt-WSM-.js} +1 -1
- package/dist/chunks/{index-HDrN-36Q.js → index-CZIkoNzI.js} +1 -1
- package/dist/chunks/{index-BYEi67oz.js → index-ChqgnI6f.js} +1 -1
- package/dist/chunks/index-ClkBeEyN.js +77 -0
- package/dist/chunks/{index-CwGCzAjy.js → index-CmPWJUnL.js} +1 -1
- package/dist/chunks/{index-DjiQpWrp.js → index-Co8vob2d.js} +7 -7
- package/dist/chunks/{index-aYMyslt1.js → index-Coav7Owj.js} +6 -6
- package/dist/chunks/{index-D6A8xmd2.js → index-CuqzTZu2.js} +6 -6
- package/dist/chunks/{index-Xu24xEY5.js → index-Cvvea2-F.js} +5 -5
- package/dist/chunks/{index-CnMeUAwm.js → index-Cy2K76Ai.js} +1 -1
- package/dist/chunks/{index-DH3GxHNZ.js → index-D0qgF0lD.js} +7 -7
- package/dist/chunks/{index-CakpnEVH.js → index-D64233nd.js} +5 -5
- package/dist/chunks/{index-Ck0UGXjG.js → index-D6_et4O5.js} +4 -4
- package/dist/chunks/{index-BI6a_hyH.js → index-DBcWalCu.js} +1 -1
- package/dist/chunks/{index-BfNg6Bfq.js → index-DD8IhgVt.js} +1 -1
- package/dist/chunks/{index-BAoe1j9r.js → index-DE9QLbNF.js} +1 -1
- package/dist/chunks/{index-Bc6QDBfO.js → index-DMtD0b_3.js} +4 -4
- package/dist/chunks/{index-B-Yx5Hy2.js → index-DNP3ng82.js} +1 -1
- package/dist/chunks/{index-CDogTzrE.js → index-DNQ1-jUj.js} +5 -5
- package/dist/chunks/{index-BWFaxGTp.js → index-DPfXz4s4.js} +1 -1
- package/dist/chunks/{index-C8U2hhih.js → index-DRnD7wpG.js} +1 -1
- package/dist/chunks/{index-DnkzqA37.js → index-DTy7Kl9T.js} +1 -1
- package/dist/chunks/{index-Ds7klCOs.js → index-DV4mpy_b.js} +1 -1
- package/dist/chunks/{index-BrES15QR.js → index-DgkK15bX.js} +1 -1
- package/dist/chunks/{index-BNHMp_x_.js → index-Di4YY_Ua.js} +1 -1
- package/dist/chunks/index-DjW0vKON.js +2 -0
- package/dist/chunks/{index-DLLtonpF.js → index-DoczycjW.js} +1 -1
- package/dist/chunks/{index-DQpYsYAB.js → index-Dp1sKeLf.js} +1 -1
- package/dist/chunks/{index-Ibt0J2Et.js → index-Dt-eWAJs.js} +5 -5
- package/dist/chunks/{index-C78nOW55.js → index-DtKsNvQ_.js} +1 -1
- package/dist/chunks/{index-Cogd5TV0.js → index-DtqsUG21.js} +3 -3
- package/dist/chunks/{index-BbkJWRo0.js → index-DuePdA69.js} +5 -5
- package/dist/chunks/index-DwZ-6zgN.js +1 -0
- package/dist/chunks/{index-D0YPAPQg.js → index-DxZy3oU4.js} +1 -1
- package/dist/chunks/{index-CM5SpejK.js → index-Dy_V6Qce.js} +3 -3
- package/dist/chunks/{index-BMwdiru1.js → index-Eo0QL5BD.js} +6 -6
- package/dist/chunks/{index-0GgWrbOC.js → index-FyLcWuoP.js} +1 -1
- package/dist/chunks/{index-kxMxVHET.js → index-GgCbc4A-.js} +8 -8
- package/dist/chunks/{index-DxLh8qIT.js → index-KHZmzPoF.js} +1 -1
- package/dist/chunks/{index-DmO2xqTL.js → index-LoWfGWWA.js} +1 -1
- package/dist/chunks/{index-Cp8qvks4.js → index-M2ihC48l.js} +1 -1
- package/dist/chunks/{index-WZTepZq8.js → index-Oa3v3_7X.js} +4 -4
- package/dist/chunks/{index-DNAwj4nV.js → index-Q_jttfI5.js} +7 -7
- package/dist/chunks/{index-DlGr9Xg0.js → index-Ss_rpifk.js} +3 -3
- package/dist/chunks/{index-DtEEVxFL.js → index-TZUVB-W3.js} +5 -5
- package/dist/chunks/{index-QGOiUcMf.js → index-_YrjxtQS.js} +8 -8
- package/dist/chunks/{index-C4_lq5Gk.js → index-aMr7w_kx.js} +1 -1
- package/dist/chunks/{index-B2gykqN9.js → index-dygVIOMF.js} +1 -1
- package/dist/chunks/{index-7GkEyUE1.js → index-eTqONZnk.js} +1 -1
- package/dist/chunks/{index-D9QkLbZ1.js → index-g_0TpuQy.js} +1 -1
- package/dist/chunks/{index-BI5zwXiD.js → index-hsgeVwtf.js} +5 -5
- package/dist/chunks/{index-XQC8MAEe.js → index-jwYklbEt.js} +5 -5
- package/dist/chunks/{index-DotbnSU-.js → index-pE6aTBiZ.js} +5 -5
- package/dist/chunks/{index-uX8xG4Vo.js → index-poW5zIu0.js} +1 -1
- package/dist/chunks/{index-3DFPYYjC.js → index-qCBuo7Dj.js} +3 -3
- package/dist/chunks/{index-DrqxeFX2.js → index-sP0n4M3S.js} +4 -4
- package/dist/chunks/{index-DhmD363c.js → index-tyzdclid.js} +1 -1
- package/dist/chunks/{index-BzEYhXCp.js → index-u-6uWe_o.js} +4 -4
- package/dist/chunks/{index-DqcQzBNJ.js → index-v9RmWFs_.js} +1 -1
- package/dist/chunks/{index--36H8tEu.js → index-vVzSlOxh.js} +1 -1
- package/dist/chunks/{index-BWRKkjuC.js → index-ze2WZhYO.js} +3 -3
- package/dist/chunks/{loading-icon-cx8c6lGR.js → loading-icon-BLLYUpvs.js} +1 -1
- package/dist/chunks/{loading-icon-Du-W6uYg.js → loading-icon-Cp8xIAZy.js} +1 -1
- package/dist/chunks/{main-CzT-ERU9.js → main-AZkvXZM1.js} +1 -1
- package/dist/chunks/{main-drDSYMFZ.js → main-CPeOiLq5.js} +6 -6
- package/dist/chunks/{property-D_322E-w.js → property-CpWqCPHX.js} +1 -1
- package/dist/chunks/{property-BCpjYZvp.js → property-Cti8Pknb.js} +1 -1
- package/dist/chunks/{register-D2Du9nP6.js → register-BDgKT87m.js} +1 -1
- package/dist/chunks/register-BT1eatec.js +1 -0
- package/dist/chunks/{register-BccP7PcJ.js → register-BZYvuwHN.js} +1 -1
- package/dist/chunks/register-D01rr_6V.js +1676 -0
- package/dist/chunks/{search-W_YGbHlx.js → search-B-sFlTAG.js} +1 -1
- package/dist/chunks/{search-cMvVciXy.js → search-BoFbUjIa.js} +6 -6
- package/dist/chunks/{select-CqHLAMa8.js → select-item-BdZ5OqWH.js} +32 -32
- package/dist/chunks/select-item-Uyiqlm7Q.js +80 -0
- package/dist/chunks/{state-BMCv3deJ.js → state-Czcme0IZ.js} +1 -1
- package/dist/chunks/{state-CSz_uJVe.js → state-D3hzHQXM.js} +1 -1
- package/dist/chunks/{text-input-Bj0yhsyz.js → text-input-R3AwYWSw.js} +5 -5
- package/dist/chunks/{text-input--Eu83Ioh.js → text-input-iJP2nFN5.js} +1 -1
- package/dist/chunks/{tooltip-content-BJ9-iov_.js → tooltip-content-Brl7yv5K.js} +1 -1
- package/dist/chunks/{tooltip-content-vhQrj4r2.js → tooltip-content-Bug744xy.js} +3 -3
- package/dist/chunks/{unsafe-html-CDTy78HP.js → unsafe-html-BKdKIEJy.js} +1 -1
- package/dist/chunks/{unsafe-html-CjIbXhDp.js → unsafe-html-NpLKNGt_.js} +1 -1
- package/dist/zooy.cjs.js +1 -1
- package/dist/zooy.es.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/if-non-empty-D97PxarH.js +0 -1
- package/dist/chunks/index-BbzTQivK.js +0 -4
- package/dist/chunks/index-C7bMRqDp.js +0 -77
- package/dist/chunks/index-Cp8R3aIT.js +0 -2
- package/dist/chunks/index-DUgugnka.js +0 -1
- package/dist/chunks/register-CkIAvkFm.js +0 -1622
- package/dist/chunks/register-c8kclAIe.js +0 -1
- package/dist/chunks/select-D504gjBr.js +0 -80
|
@@ -1,1622 +0,0 @@
|
|
|
1
|
-
import { _ as W, c as pt, d as mt, g as l, e as ut, B as ht, o as vt, h as ft, p as gt, j as E, C as Et } from "./main-drDSYMFZ.js";
|
|
2
|
-
var bt = /* @__PURE__ */ W(function(e, n) {
|
|
3
|
-
return n == null || n !== n ? e : n;
|
|
4
|
-
}), Ct = /* @__PURE__ */ pt(function(e, n, o) {
|
|
5
|
-
return bt(e, mt(n, o));
|
|
6
|
-
}), St = /* @__PURE__ */ W(function(e, n) {
|
|
7
|
-
for (var o = {}, s = 0; s < e.length; )
|
|
8
|
-
e[s] in n && (o[e[s]] = n[e[s]]), s += 1;
|
|
9
|
-
return o;
|
|
10
|
-
}), B = {}, U;
|
|
11
|
-
function It() {
|
|
12
|
-
return U || (U = 1, (function(t) {
|
|
13
|
-
t.TABLE_SIZE = void 0, (function(n) {
|
|
14
|
-
n.XS = "xs", n.SM = "sm", n.MD = "md", n.LG = "lg", n.XL = "xl";
|
|
15
|
-
})(t.TABLE_SIZE || (t.TABLE_SIZE = {})), t.TABLE_SORT_DIRECTION = void 0, (function(n) {
|
|
16
|
-
n.NONE = "none", n.ASCENDING = "ascending", n.DESCENDING = "descending";
|
|
17
|
-
})(t.TABLE_SORT_DIRECTION || (t.TABLE_SORT_DIRECTION = {})), t.TABLE_SORT_CYCLE = void 0, (function(n) {
|
|
18
|
-
n.BI_STATES_FROM_ASCENDING = "bi-states-from-ascending", n.BI_STATES_FROM_DESCENDING = "bi-states-from-descending", n.TRI_STATES_FROM_ASCENDING = "tri-states-from-ascending", n.TRI_STATES_FROM_DESCENDING = "tri-states-from-descending";
|
|
19
|
-
})(t.TABLE_SORT_CYCLE || (t.TABLE_SORT_CYCLE = {}));
|
|
20
|
-
const e = {
|
|
21
|
-
[t.TABLE_SORT_CYCLE.BI_STATES_FROM_ASCENDING]: [
|
|
22
|
-
t.TABLE_SORT_DIRECTION.ASCENDING,
|
|
23
|
-
t.TABLE_SORT_DIRECTION.DESCENDING
|
|
24
|
-
],
|
|
25
|
-
[t.TABLE_SORT_CYCLE.BI_STATES_FROM_DESCENDING]: [
|
|
26
|
-
t.TABLE_SORT_DIRECTION.DESCENDING,
|
|
27
|
-
t.TABLE_SORT_DIRECTION.ASCENDING
|
|
28
|
-
],
|
|
29
|
-
[t.TABLE_SORT_CYCLE.TRI_STATES_FROM_ASCENDING]: [
|
|
30
|
-
t.TABLE_SORT_DIRECTION.NONE,
|
|
31
|
-
t.TABLE_SORT_DIRECTION.ASCENDING,
|
|
32
|
-
t.TABLE_SORT_DIRECTION.DESCENDING
|
|
33
|
-
],
|
|
34
|
-
[t.TABLE_SORT_CYCLE.TRI_STATES_FROM_DESCENDING]: [
|
|
35
|
-
t.TABLE_SORT_DIRECTION.NONE,
|
|
36
|
-
t.TABLE_SORT_DIRECTION.DESCENDING,
|
|
37
|
-
t.TABLE_SORT_DIRECTION.ASCENDING
|
|
38
|
-
]
|
|
39
|
-
};
|
|
40
|
-
t.TABLE_SORT_CYCLES = e;
|
|
41
|
-
})(B)), B;
|
|
42
|
-
}
|
|
43
|
-
var At = It();
|
|
44
|
-
const Dt = () => import("./index-BxYuKaia.js"), Y = () => import("./index-DNAwj4nV.js"), Nt = {
|
|
45
|
-
"cds-pagination": {
|
|
46
|
-
import: Y,
|
|
47
|
-
/**
|
|
48
|
-
* Initialize a standalone pagination component.
|
|
49
|
-
*
|
|
50
|
-
* Note: The pagination parameter is a CDSPagination instance from @carbon/web-components.
|
|
51
|
-
* To access the CDSPagination class and its static properties:
|
|
52
|
-
* const CDSPagination = customElements.get('cds-pagination');
|
|
53
|
-
* // or
|
|
54
|
-
* const CDSPagination = pagination.constructor;
|
|
55
|
-
*
|
|
56
|
-
* @param {CDSPagination} pagination - The CDSPagination custom element instance
|
|
57
|
-
* @this {Panel} The panel instance
|
|
58
|
-
*/
|
|
59
|
-
init: function(t) {
|
|
60
|
-
const e = this, n = customElements.get("cds-pagination");
|
|
61
|
-
let o = null;
|
|
62
|
-
e.listen(t, n.eventChangeCurrent, (s) => {
|
|
63
|
-
const i = s.detail.page, c = t.pageSize, a = (i - 1) * c;
|
|
64
|
-
a !== o && (o = a, e.dispatchPanelEvent("pagination-changed-current", {
|
|
65
|
-
detail: {
|
|
66
|
-
page: i,
|
|
67
|
-
pageSize: c,
|
|
68
|
-
action: "page-change"
|
|
69
|
-
}
|
|
70
|
-
}));
|
|
71
|
-
}), e.listen(t, n.eventPageSizeChanged, (s) => {
|
|
72
|
-
const i = t.pageSize;
|
|
73
|
-
o = null, e.dispatchPanelEvent("pagination-changed-page-size", {
|
|
74
|
-
detail: {
|
|
75
|
-
page: 1,
|
|
76
|
-
// Reset to page 1 when changing size
|
|
77
|
-
pageSize: i,
|
|
78
|
-
action: "page-size-change"
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}, V = (t, e, n) => {
|
|
85
|
-
const o = customElements.get("cds-table"), s = customElements.get("cds-pagination"), i = customElements.get(o.selectorTableBatchActions);
|
|
86
|
-
customElements.get("cds-popover");
|
|
87
|
-
const c = e.dataBinder, a = e.pagination, d = e.skeleton, b = e.querySelector(o.selectorTableToolbarSearch), S = e.querySelector(o.selectorTableBatchActions), P = e.querySelector(o.selectorTableBody), O = ["button", "a", "input", "select", "textarea", '[role="button"]', ".cds--table-expand", ".cds--table-column-checkbox"].join(","), x = e.querySelectorAll(o.selectorHeaderCell + "[is-sortable]"), Z = e.isSortable || x.length > 0, R = Symbol(), M = Symbol(), _ = /* @__PURE__ */ new Map(), J = (r) => {
|
|
88
|
-
t.listen(e, "click", (p) => {
|
|
89
|
-
const m = p.target.closest(o.selectorTableRow);
|
|
90
|
-
if (!m || p.composedPath().some((h) => h.matches && h.matches(O))) return;
|
|
91
|
-
p.stopPropagation();
|
|
92
|
-
const u = l(m);
|
|
93
|
-
t.dispatchPanelEvent(r, {
|
|
94
|
-
...u
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}, K = (r) => {
|
|
98
|
-
t.listen(e, o.eventExpandoToggle, (p) => {
|
|
99
|
-
const m = p.target, u = m.tagName === "CDS-TABLE-HEADER-ROW", h = p.detail.expanded, f = l(m), C = {
|
|
100
|
-
tableAttrs: n,
|
|
101
|
-
...f,
|
|
102
|
-
target: m,
|
|
103
|
-
allRows: u,
|
|
104
|
-
didExpand: h
|
|
105
|
-
};
|
|
106
|
-
t.dispatchPanelEvent(r, C);
|
|
107
|
-
});
|
|
108
|
-
}, Q = (r) => {
|
|
109
|
-
_.set(R, (p) => {
|
|
110
|
-
t.dispatchPanelEvent(r, p);
|
|
111
|
-
});
|
|
112
|
-
}, tt = (r) => {
|
|
113
|
-
_.set(M, (p) => {
|
|
114
|
-
const m = p.detail.selectedRows, u = Math.min(m.length, S.totalRowsCount), h = p.target, f = l(h), C = m.map(l), I = {
|
|
115
|
-
tableAttrs: n,
|
|
116
|
-
...f,
|
|
117
|
-
target: h,
|
|
118
|
-
selectCount: u,
|
|
119
|
-
selection: C
|
|
120
|
-
};
|
|
121
|
-
t.dispatchPanelEvent(r, I);
|
|
122
|
-
});
|
|
123
|
-
}, et = (r) => {
|
|
124
|
-
t.listen(e, o.eventTableRowSelect, (p) => {
|
|
125
|
-
const m = p.target, u = p.detail.selectedRows || [], h = u.length, f = u.map(l), C = l(m), I = {
|
|
126
|
-
tableAttrs: n,
|
|
127
|
-
...C,
|
|
128
|
-
selectCount: h,
|
|
129
|
-
selection: f,
|
|
130
|
-
target: m
|
|
131
|
-
};
|
|
132
|
-
t.dispatchPanelEvent(r, I);
|
|
133
|
-
});
|
|
134
|
-
}, nt = () => {
|
|
135
|
-
t.listen(e, o.eventBeforeSort, (r) => {
|
|
136
|
-
const p = r.target, m = r.detail.oldSortDirection, u = r.detail.sortDirection, h = l(p), f = h.sortField, C = u === At.TABLE_SORT_DIRECTION.DESCENDING ? `-${f}` : f;
|
|
137
|
-
r.cancelBubble = !0, r.stopPropagation(), r.preventDefault(), P.innerHTML = "", d && d.show(), x.forEach((D, v) => {
|
|
138
|
-
D === p ? (D.setAttribute("sort-active", "true"), D.setAttribute("sort-direction", u)) : (D.removeAttribute("sort-active"), D.setAttribute("sort-direction", "none"));
|
|
139
|
-
});
|
|
140
|
-
const I = { ordering: C };
|
|
141
|
-
c.fetchData(I).then(() => {
|
|
142
|
-
a.setData(c), d && d.hide();
|
|
143
|
-
}), _.has(R) && _.get(R)({
|
|
144
|
-
tableAttrs: n,
|
|
145
|
-
...h,
|
|
146
|
-
sortNow: u,
|
|
147
|
-
sortWas: m,
|
|
148
|
-
sortField: f,
|
|
149
|
-
ordering: C,
|
|
150
|
-
target: p
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
}, ot = () => {
|
|
154
|
-
t.listen(e, o.eventTableRowSelectAll, (r) => {
|
|
155
|
-
r.detail.selectedRows.length === 0 && e.querySelectorAll(o.selectorTableRow).forEach((p) => {
|
|
156
|
-
p.disabled = !1, p.selected = !1;
|
|
157
|
-
}), _.has(M) && _.get(M)(r);
|
|
158
|
-
});
|
|
159
|
-
}, st = () => {
|
|
160
|
-
t.listen(e, o.eventBeforeChangeSelectionAll, (r) => {
|
|
161
|
-
r.stopPropagation(), r.detail.callback && r.detail.callback();
|
|
162
|
-
});
|
|
163
|
-
}, it = (r) => {
|
|
164
|
-
const p = e.querySelector("cds-table-header-row");
|
|
165
|
-
t.listen(r, i.eventClickSelectAll, (m) => {
|
|
166
|
-
m.stopPropagation(), p.dispatchEvent(new CustomEvent(o.eventBeforeChangeSelectionAll, {
|
|
167
|
-
bubbles: !0,
|
|
168
|
-
cancelable: !0,
|
|
169
|
-
composed: !0,
|
|
170
|
-
detail: {
|
|
171
|
-
selected: !0,
|
|
172
|
-
callback: () => {
|
|
173
|
-
r.selectedRowsCount = r.totalRowsCount, e.querySelectorAll(o.selectorTableRow).forEach((u) => {
|
|
174
|
-
u.disabled = !0;
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}));
|
|
179
|
-
});
|
|
180
|
-
}, ct = (r) => {
|
|
181
|
-
t.listen(r, "keydown", (p) => {
|
|
182
|
-
if (p.key === "Enter") {
|
|
183
|
-
d && d.show(), a.totalItems = 0, e.querySelector("cds-table-body").replaceChildren();
|
|
184
|
-
const u = { search: r.value || "", offset: 0 };
|
|
185
|
-
c.fetchData(u).then(() => {
|
|
186
|
-
a.setData(c), d && d.hide();
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}, at = (r) => {
|
|
191
|
-
t.listen(r, o.eventSearchInput, (p) => {
|
|
192
|
-
if ((p.detail.value || "") === "") {
|
|
193
|
-
const u = { search: "", offset: 0 };
|
|
194
|
-
d && d.show(), c.fetchData(u).then(() => {
|
|
195
|
-
d && d.hide(), a.setData(c);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}, rt = (r) => {
|
|
200
|
-
r.caret = !1;
|
|
201
|
-
const p = r.querySelector("cds-icon-button, button:not([slot])"), m = r.querySelectorAll("cds-checkbox"), u = r.querySelectorAll("cds-modal-footer-button"), h = [...r.querySelectorAll("cds-checkbox-group")].map(l).map(Ct("noop", ["zoo", "filter", "field"])).reduce(
|
|
202
|
-
(v, g) => (v[g] = null, v),
|
|
203
|
-
{ offset: 0 }
|
|
204
|
-
);
|
|
205
|
-
if (!p || !u) {
|
|
206
|
-
console.error("Improperly configured Batch Filter popover");
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
new MutationObserver(() => {
|
|
210
|
-
r.classList.toggle("cds--overflow-menu--open", r.open);
|
|
211
|
-
}).observe(r, {
|
|
212
|
-
attributes: !0,
|
|
213
|
-
attributeFilter: ["open"]
|
|
214
|
-
});
|
|
215
|
-
const f = Symbol(), C = Symbol(), I = [...u].reduce((v, g, N) => (g.hasAttribute("reset-filter") && v.set(f, g), g.hasAttribute("apply-filter") && v.set(C, g), v), /* @__PURE__ */ new Map()), D = () => {
|
|
216
|
-
const v = /* @__PURE__ */ new Map();
|
|
217
|
-
return m.forEach((g) => {
|
|
218
|
-
const N = g.getAttribute("id");
|
|
219
|
-
if (!N || !N.includes(":")) return;
|
|
220
|
-
const [k, T] = N.split(":");
|
|
221
|
-
v.has(k) || v.set(k, []), g.checked && v.get(k).push(T);
|
|
222
|
-
}), v;
|
|
223
|
-
};
|
|
224
|
-
if (I.has(f)) {
|
|
225
|
-
const v = (g) => g.checked = !1;
|
|
226
|
-
t.listen(I.get(f), "click", (g) => {
|
|
227
|
-
g.stopPropagation(), m.forEach(v), d && d.show(), c.fetchData(h).then(() => {
|
|
228
|
-
a && a.setData(c), d && d.hide(), r.open = !1;
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
I.has(C) && t.listen(I.get(C), "click", (v) => {
|
|
233
|
-
v.stopPropagation();
|
|
234
|
-
const g = [...D()].reduce((N, [k, T]) => (N[k] = T === [] ? null : T, N), { offset: 0 });
|
|
235
|
-
d && d.show(), c.fetchData(g).then(() => {
|
|
236
|
-
a && a.setData(c), d && d.hide(), r.open = !1;
|
|
237
|
-
});
|
|
238
|
-
}), t.listen(p, "click", (v) => {
|
|
239
|
-
v.stopPropagation(), r.open = !r.open, r.classList.toggle("cds--overflow-menu--open", r.open);
|
|
240
|
-
});
|
|
241
|
-
}, lt = () => {
|
|
242
|
-
t.listen(a, s.eventPageSizeChanged, (r) => {
|
|
243
|
-
const m = {
|
|
244
|
-
limit: a.pageSize,
|
|
245
|
-
offset: 0
|
|
246
|
-
};
|
|
247
|
-
c.fetchData(m).then(() => {
|
|
248
|
-
a.setData(c);
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
}, dt = () => {
|
|
252
|
-
let r = null;
|
|
253
|
-
t.listen(a, s.eventChangeCurrent, (p) => {
|
|
254
|
-
const { page: m } = p.detail, u = a.pageSize, h = (m - 1) * u;
|
|
255
|
-
if (h !== r) {
|
|
256
|
-
r = h;
|
|
257
|
-
const f = { limit: u, offset: h };
|
|
258
|
-
c.fetchData(f).then(() => {
|
|
259
|
-
a.setData(c), d && d.hide();
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
c && a && (lt(), dt()), c && b && (ct(b), at(b));
|
|
265
|
-
const F = e.querySelector(o.selectorTableToolbarContent);
|
|
266
|
-
if (F) {
|
|
267
|
-
const r = F.querySelectorAll("cds-popover[data-batch-filter]");
|
|
268
|
-
c && r && r.forEach(rt);
|
|
269
|
-
}
|
|
270
|
-
e.isSelectable && (ot(), st(), S && it(S)), c && Z && nt();
|
|
271
|
-
const G = {
|
|
272
|
-
zoo: {
|
|
273
|
-
event: {
|
|
274
|
-
row: {
|
|
275
|
-
click: J,
|
|
276
|
-
expand: K,
|
|
277
|
-
check: {
|
|
278
|
-
one: et,
|
|
279
|
-
all: tt
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
column: {
|
|
283
|
-
sort: Q
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
vt(n).forEach(([r, p]) => {
|
|
289
|
-
ft(r, G) && gt(r, G)(p);
|
|
290
|
-
});
|
|
291
|
-
}, Pt = (t) => {
|
|
292
|
-
const e = document.createElement("cds-pagination");
|
|
293
|
-
return e.backwardText = "Previous page", e.forwardText = "Next page", e.itemsPerPageText = "Items per page:", e.pageSize = t.limit, e.size = "lg", [10, 25, 50, 100, 500].forEach((n) => {
|
|
294
|
-
const o = document.createElement("cds-select-item");
|
|
295
|
-
o.value = n.toString(), o.textContent = n.toString(), e.appendChild(o);
|
|
296
|
-
}), e.setData = (n) => {
|
|
297
|
-
if (n.isPaginated) {
|
|
298
|
-
const { count: o } = St(["count"], n.data), s = Math.ceil(o / n.limit), i = 100;
|
|
299
|
-
e.pagesUnknown = s > i, e.totalItems = o, e.pagesUnknown ? e.formatStatusWithIndeterminateTotal = ({ start: c, end: a }) => `${c}–${a} of ${o} item${o <= 1 ? "" : "s"}` : delete e.formatStatusWithIndeterminateTotal;
|
|
300
|
-
}
|
|
301
|
-
}, e;
|
|
302
|
-
}, _t = (t) => {
|
|
303
|
-
if (!t.parentNode) {
|
|
304
|
-
console.error("[Carbon Table] Cannot create skeleton: table has no parent node");
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
const e = !!t.querySelector("cds-table-header-title"), n = !!t.querySelector("cds-table-header-description"), o = !!t.querySelector("cds-table-toolbar"), s = [...t.querySelectorAll("cds-table-header-cell")].length, i = t.hasAttribute("zebra"), c = t.getAttribute("size"), a = document.createElement("cds-table-skeleton");
|
|
308
|
-
a.showHeader = e || n, a.showToolbar = o, a.zebra = i, a.columnCount = s, a.size = c, a.show = () => a.classList.remove("hidden"), a.hide = () => a.classList.add("hidden");
|
|
309
|
-
const d = document.createElement("div");
|
|
310
|
-
return d.classList.add("zoo-datatable-skeleton-wrapper"), t.parentNode.insertBefore(d, t), d.appendChild(a), d.appendChild(t), a;
|
|
311
|
-
}, kt = (t, e) => {
|
|
312
|
-
const n = e.getAttribute("zoo-url-api"), o = parseInt(e.getAttribute("data-page-size") || 25, 10);
|
|
313
|
-
if (n)
|
|
314
|
-
return new ht(t, n, e, {
|
|
315
|
-
urlParams: { limit: o }
|
|
316
|
-
});
|
|
317
|
-
}, yt = {
|
|
318
|
-
selector: "cds-table",
|
|
319
|
-
import: [Dt, Y],
|
|
320
|
-
/**
|
|
321
|
-
* Initialize a Carbon data table component.
|
|
322
|
-
*
|
|
323
|
-
* Note: The cdsTable parameter is a CDSTable instance from @carbon/web-components.
|
|
324
|
-
* To access the CDSTable class and its static properties/methods, use:
|
|
325
|
-
* const CDSTable = customElements.get('cds-table');
|
|
326
|
-
* // or
|
|
327
|
-
* const CDSTable = cdsTable.constructor;
|
|
328
|
-
*
|
|
329
|
-
* Example - Using static event names:
|
|
330
|
-
* const CDSTable = customElements.get('cds-table');
|
|
331
|
-
* panel.listen(cdsTable, CDSTable.eventBeforeChangeSelection, e => {...});
|
|
332
|
-
*
|
|
333
|
-
* Initialization flow:
|
|
334
|
-
* 1. Extract semantic attributes from table element
|
|
335
|
-
* 2. Check for zoo-url-api attribute to determine if Binder is needed
|
|
336
|
-
* 3. If Binder:
|
|
337
|
-
* - Create Binder instance with configured page size
|
|
338
|
-
* - Create and show skeleton loader
|
|
339
|
-
* - Create pagination component
|
|
340
|
-
* - Fetch initial data
|
|
341
|
-
* - Remove skeleton and configure pagination when data arrives
|
|
342
|
-
* - Set up event handlers after data is loaded (prevents duplicate initial fetch)
|
|
343
|
-
* 4. If no Binder:
|
|
344
|
-
* - Set up event handlers immediately for client-side behavior
|
|
345
|
-
*
|
|
346
|
-
* @param {CDSTable} cdsTable - The CDSTable custom element instance (from @carbon/web-components)
|
|
347
|
-
* @this {Panel} The panel instance
|
|
348
|
-
*/
|
|
349
|
-
init: function(t) {
|
|
350
|
-
const e = l(t), n = this, o = kt(n, t);
|
|
351
|
-
if (ut(o)) {
|
|
352
|
-
t.dataBinder = o;
|
|
353
|
-
const s = _t(t);
|
|
354
|
-
t.skeleton = s;
|
|
355
|
-
const i = Pt(o);
|
|
356
|
-
t.pagination = i, t.after(i), o.fetchData().then((c) => {
|
|
357
|
-
s.hide(), i.setData(o), V(n, t, e);
|
|
358
|
-
});
|
|
359
|
-
} else
|
|
360
|
-
V(n, t, e);
|
|
361
|
-
}
|
|
362
|
-
}, A = () => import("./index-BgL2QyGL.js"), Tt = {
|
|
363
|
-
selector: "cds-modal",
|
|
364
|
-
import: A,
|
|
365
|
-
/**
|
|
366
|
-
* @param {CDSModal} modal - The CDSModal custom element instance
|
|
367
|
-
* @this {Panel} The panel instance
|
|
368
|
-
*/
|
|
369
|
-
init: function(t) {
|
|
370
|
-
const e = customElements.get("cds-modal"), n = l(t), o = E(t, "open-event", "event");
|
|
371
|
-
o && this.listen(t, "cds-modal-beingopened", (c) => {
|
|
372
|
-
this.dispatchPanelEvent(o, {
|
|
373
|
-
...n,
|
|
374
|
-
action: "opened"
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
const s = t.getAttribute("before-close-event");
|
|
378
|
-
s && this.listen(t, e.eventBeforeClose, (c) => {
|
|
379
|
-
this.dispatchPanelEvent(s, {
|
|
380
|
-
...n,
|
|
381
|
-
action: "closing",
|
|
382
|
-
cancelable: !0
|
|
383
|
-
});
|
|
384
|
-
}), this.listen(t, e.eventClose, (c) => {
|
|
385
|
-
this.dispatchPanelEvent("destroy_me", {
|
|
386
|
-
...n,
|
|
387
|
-
action: "closed",
|
|
388
|
-
triggeredBy: c.detail?.triggeredBy
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
|
-
const i = E(t, "primary-event", "event");
|
|
392
|
-
i && this.listen(t, "cds-modal-primary-focus", (c) => {
|
|
393
|
-
this.dispatchPanelEvent(i, {
|
|
394
|
-
...n,
|
|
395
|
-
action: "primary"
|
|
396
|
-
});
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
}, wt = {
|
|
400
|
-
"cds-modal-header": {
|
|
401
|
-
import: A
|
|
402
|
-
// No event handling - presentational header wrapper
|
|
403
|
-
},
|
|
404
|
-
"cds-modal-heading": {
|
|
405
|
-
import: A
|
|
406
|
-
// No event handling - presentational heading element
|
|
407
|
-
},
|
|
408
|
-
"cds-modal-label": {
|
|
409
|
-
import: A
|
|
410
|
-
// No event handling - presentational label element
|
|
411
|
-
},
|
|
412
|
-
"cds-modal-close-button": {
|
|
413
|
-
import: A
|
|
414
|
-
// No event handling - close button handled by modal itself via data-modal-close
|
|
415
|
-
},
|
|
416
|
-
"cds-modal-body": {
|
|
417
|
-
import: A
|
|
418
|
-
// No event handling - presentational body wrapper
|
|
419
|
-
},
|
|
420
|
-
"cds-modal-body-content": {
|
|
421
|
-
import: A
|
|
422
|
-
// No event handling - presentational content wrapper
|
|
423
|
-
},
|
|
424
|
-
"cds-modal-footer": {
|
|
425
|
-
import: A
|
|
426
|
-
// No event handling - presentational footer wrapper
|
|
427
|
-
},
|
|
428
|
-
"cds-modal-footer-button": {
|
|
429
|
-
import: A,
|
|
430
|
-
init: function(t) {
|
|
431
|
-
const e = l(t);
|
|
432
|
-
if (t.getAttribute("type") === "submit") {
|
|
433
|
-
this.listen(t, "click", (s) => {
|
|
434
|
-
let i = t.closest("form");
|
|
435
|
-
if (!i) {
|
|
436
|
-
const c = t.getAttribute("form");
|
|
437
|
-
c && (i = document.getElementById(c));
|
|
438
|
-
}
|
|
439
|
-
i && i.requestSubmit();
|
|
440
|
-
});
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
const o = e.event;
|
|
444
|
-
o && this.listen(t, "click", (s) => {
|
|
445
|
-
s.stopPropagation(), this.dispatchPanelEvent(o, e);
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}, $ = () => import("./index-DaPLGBBg.js"), Ot = {
|
|
450
|
-
selector: "cds-menu",
|
|
451
|
-
import: $,
|
|
452
|
-
/**
|
|
453
|
-
* @param {CDSMenu} menu - The CDSMenu custom element instance
|
|
454
|
-
* @this {Panel} The panel instance
|
|
455
|
-
*/
|
|
456
|
-
init: function(t) {
|
|
457
|
-
const e = l(t), n = E(t, "open-event");
|
|
458
|
-
n && this.listen(t, "cds-menu-opened", (s) => {
|
|
459
|
-
this.dispatchPanelEvent(n, {
|
|
460
|
-
...e,
|
|
461
|
-
action: "opened"
|
|
462
|
-
});
|
|
463
|
-
});
|
|
464
|
-
const o = E(t, "close-event");
|
|
465
|
-
o && this.listen(t, "cds-menu-closed", (s) => {
|
|
466
|
-
this.dispatchPanelEvent(o, {
|
|
467
|
-
...e,
|
|
468
|
-
action: "closed"
|
|
469
|
-
});
|
|
470
|
-
}), this.listen(t, "click", (s) => {
|
|
471
|
-
if (s.target.tagName === "CDS-MENU-ITEM") {
|
|
472
|
-
const i = l(s.target), c = i.event || e.event;
|
|
473
|
-
c && (s.stopPropagation(), this.dispatchPanelEvent(c, {
|
|
474
|
-
...e,
|
|
475
|
-
...i
|
|
476
|
-
}));
|
|
477
|
-
}
|
|
478
|
-
}), this.listen(t, "cds-item-changed", (s) => {
|
|
479
|
-
const i = s.detail.triggeredBy, c = l(i), a = c.event || e.event;
|
|
480
|
-
a && this.dispatchPanelEvent(a, {
|
|
481
|
-
...e,
|
|
482
|
-
...c,
|
|
483
|
-
action: "selection-changed"
|
|
484
|
-
});
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
}, Rt = {
|
|
488
|
-
"cds-menu-button": {
|
|
489
|
-
import: $,
|
|
490
|
-
/**
|
|
491
|
-
* @param {CDSMenuButton} menuButton - The CDSMenuButton custom element instance
|
|
492
|
-
* @this {Panel} The panel instance
|
|
493
|
-
*/
|
|
494
|
-
init: function(t) {
|
|
495
|
-
const e = l(t), n = t.querySelector("cds-menu");
|
|
496
|
-
n && this.listen(n, "click", (o) => {
|
|
497
|
-
if (o.target.tagName === "CDS-MENU-ITEM") {
|
|
498
|
-
const s = l(o.target), i = s.event || e.event;
|
|
499
|
-
i && (o.stopPropagation(), this.dispatchPanelEvent(i, {
|
|
500
|
-
...e,
|
|
501
|
-
...s
|
|
502
|
-
}));
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}, X = () => import("./index-BbkJWRo0.js"), j = () => import("./index-DjiQpWrp.js").then((t) => t.i), Mt = () => import("./index-IFR1tBYd.js"), Bt = () => import("./index-BzEYhXCp.js"), zt = {
|
|
508
|
-
selector: "cds-button",
|
|
509
|
-
import: X,
|
|
510
|
-
/**
|
|
511
|
-
* @param {CDSButton} button - The CDSButton custom element instance
|
|
512
|
-
* @this {Panel} The panel instance
|
|
513
|
-
*/
|
|
514
|
-
init: function(t) {
|
|
515
|
-
const e = l(t);
|
|
516
|
-
if (t.getAttribute("type") === "submit") {
|
|
517
|
-
this.listen(t, "click", (s) => {
|
|
518
|
-
let i = t.closest("form");
|
|
519
|
-
if (!i) {
|
|
520
|
-
const c = t.getAttribute("form");
|
|
521
|
-
c && (i = document.getElementById(c));
|
|
522
|
-
}
|
|
523
|
-
i && i.requestSubmit();
|
|
524
|
-
});
|
|
525
|
-
return;
|
|
526
|
-
}
|
|
527
|
-
const o = e.event;
|
|
528
|
-
o && this.listen(t, "click", (s) => {
|
|
529
|
-
s.stopPropagation(), this.dispatchPanelEvent(o, l(t));
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
}, Lt = {
|
|
533
|
-
// Icon Button (non-toggle)
|
|
534
|
-
"cds-icon-button:not([data-toggle])": {
|
|
535
|
-
import: j,
|
|
536
|
-
event: "click",
|
|
537
|
-
getData: (t, e) => e
|
|
538
|
-
},
|
|
539
|
-
// Icon Toggle - Toggles Carbon's built-in isSelected state for ghost icon buttons
|
|
540
|
-
// Visual styling (subtle background change) is handled by Carbon's CSS
|
|
541
|
-
"cds-icon-button[data-toggle]": {
|
|
542
|
-
import: j,
|
|
543
|
-
init: function(t) {
|
|
544
|
-
const e = l(t);
|
|
545
|
-
e.event && this.listen(t, "click", (n) => {
|
|
546
|
-
n.stopPropagation(), t.isSelected = !t.isSelected, this.dispatchPanelEvent(e.event, {
|
|
547
|
-
...e,
|
|
548
|
-
isOn: t.isSelected
|
|
549
|
-
});
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
// FAB (Floating Action Button) - just a styled button
|
|
554
|
-
"cds-button[data-fab]": {
|
|
555
|
-
import: X,
|
|
556
|
-
event: "click",
|
|
557
|
-
getData: (t, e) => e
|
|
558
|
-
},
|
|
559
|
-
// Copy Button - Button that copies text to clipboard
|
|
560
|
-
"cds-copy-button": {
|
|
561
|
-
import: Bt,
|
|
562
|
-
init: function(t) {
|
|
563
|
-
const e = l(t), n = e.event;
|
|
564
|
-
n && this.listen(t, "click", (s) => {
|
|
565
|
-
s.stopPropagation(), this.dispatchPanelEvent(n, {
|
|
566
|
-
...e,
|
|
567
|
-
action: "copy"
|
|
568
|
-
});
|
|
569
|
-
});
|
|
570
|
-
const o = t.getAttribute("success-event");
|
|
571
|
-
if (o) {
|
|
572
|
-
const s = new MutationObserver(() => {
|
|
573
|
-
t.hasAttribute("feedback-shown") && this.dispatchPanelEvent(o, {
|
|
574
|
-
...e,
|
|
575
|
-
action: "copied"
|
|
576
|
-
});
|
|
577
|
-
});
|
|
578
|
-
s.observe(t, {
|
|
579
|
-
attributes: !0,
|
|
580
|
-
attributeFilter: ["feedback-shown"]
|
|
581
|
-
}), t._copyObserver = s;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
// Combo Button - composed of button + menu
|
|
586
|
-
"cds-combo-button": {
|
|
587
|
-
import: Mt,
|
|
588
|
-
init: function(t) {
|
|
589
|
-
const e = l(t);
|
|
590
|
-
e.event && this.listen(t, "click", (o) => {
|
|
591
|
-
const s = o.composedPath(), i = s.some((a) => a.tagName === "CDS-MENU-ITEM"), c = s.some((a) => a.tagName === "CDS-ICON-BUTTON");
|
|
592
|
-
!i && !c && (o.stopPropagation(), this.dispatchPanelEvent(e.event, {
|
|
593
|
-
...e,
|
|
594
|
-
action: "primary"
|
|
595
|
-
}));
|
|
596
|
-
});
|
|
597
|
-
const n = t.querySelector("cds-menu");
|
|
598
|
-
n && this.listen(n, "click", (o) => {
|
|
599
|
-
if (o.target.tagName === "CDS-MENU-ITEM") {
|
|
600
|
-
const s = l(o.target), i = s.event || E(t, "menu-event", "event");
|
|
601
|
-
i && this.dispatchPanelEvent(i, {
|
|
602
|
-
...e,
|
|
603
|
-
...s,
|
|
604
|
-
action: "menu-item"
|
|
605
|
-
});
|
|
606
|
-
}
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}, qt = () => import("./index-PFLnPKPE.js"), xt = () => import("./index-DH3GxHNZ.js"), Ft = () => import("./index-QGOiUcMf.js"), Gt = {
|
|
611
|
-
selector: "cds-dropdown",
|
|
612
|
-
import: qt,
|
|
613
|
-
/**
|
|
614
|
-
* @param {CDSDropdown} dropdown - The CDSDropdown custom element instance
|
|
615
|
-
* @this {Panel} The panel instance
|
|
616
|
-
*/
|
|
617
|
-
init: function(t) {
|
|
618
|
-
const e = customElements.get("cds-dropdown"), n = l(t), o = n.event;
|
|
619
|
-
o && this.listen(t, e.eventSelect, (i) => {
|
|
620
|
-
this.dispatchPanelEvent(o, {
|
|
621
|
-
...n,
|
|
622
|
-
value: t.value,
|
|
623
|
-
selectedValue: i.detail?.item?.value,
|
|
624
|
-
selectedText: i.detail?.item?.textContent?.trim()
|
|
625
|
-
});
|
|
626
|
-
});
|
|
627
|
-
const s = t.getAttribute("toggle-event");
|
|
628
|
-
s && this.listen(t, e.eventToggle, (i) => {
|
|
629
|
-
this.dispatchPanelEvent(s, {
|
|
630
|
-
...n,
|
|
631
|
-
open: t.hasAttribute("open")
|
|
632
|
-
});
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
}, Ut = {
|
|
636
|
-
// Combo Box
|
|
637
|
-
"cds-combo-box": {
|
|
638
|
-
import: xt,
|
|
639
|
-
/**
|
|
640
|
-
* @param {CDSComboBox} comboBox - The CDSComboBox custom element instance
|
|
641
|
-
* @this {Panel} The panel instance
|
|
642
|
-
*/
|
|
643
|
-
init: function(t) {
|
|
644
|
-
const e = customElements.get("cds-combo-box"), n = l(t), o = n.event;
|
|
645
|
-
o && this.listen(t, e.eventSelect, (i) => {
|
|
646
|
-
const c = i.detail?.item;
|
|
647
|
-
this.dispatchPanelEvent(o, {
|
|
648
|
-
...n,
|
|
649
|
-
value: t.value,
|
|
650
|
-
selectedValue: c?.value,
|
|
651
|
-
selectedText: c?.textContent?.trim()
|
|
652
|
-
});
|
|
653
|
-
});
|
|
654
|
-
const s = t.getAttribute("toggle-event");
|
|
655
|
-
s && this.listen(t, e.eventToggle, (i) => {
|
|
656
|
-
this.dispatchPanelEvent(s, {
|
|
657
|
-
...n,
|
|
658
|
-
open: t.hasAttribute("open")
|
|
659
|
-
});
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
// Multi Select
|
|
664
|
-
"cds-multi-select": {
|
|
665
|
-
import: Ft,
|
|
666
|
-
/**
|
|
667
|
-
* @param {CDSMultiSelect} multiSelect - The CDSMultiSelect custom element instance
|
|
668
|
-
* @this {Panel} The panel instance
|
|
669
|
-
*/
|
|
670
|
-
init: function(t) {
|
|
671
|
-
const e = customElements.get("cds-multi-select"), n = l(t), o = n.event;
|
|
672
|
-
o && this.listen(t, e.eventSelect, (i) => {
|
|
673
|
-
const c = t.value ? t.value.split(",") : [];
|
|
674
|
-
this.dispatchPanelEvent(o, {
|
|
675
|
-
...n,
|
|
676
|
-
selectedItems: c
|
|
677
|
-
});
|
|
678
|
-
});
|
|
679
|
-
const s = t.getAttribute("toggle-event");
|
|
680
|
-
s && this.listen(t, e.eventToggle, (i) => {
|
|
681
|
-
this.dispatchPanelEvent(s, {
|
|
682
|
-
...n,
|
|
683
|
-
open: t.hasAttribute("open")
|
|
684
|
-
});
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}, Vt = () => import("./index-xA7Xy6rP.js"), jt = () => import("./index-BMibCYm9.js"), Ht = {
|
|
689
|
-
selector: "cds-date-picker",
|
|
690
|
-
import: Vt,
|
|
691
|
-
/**
|
|
692
|
-
* @param {CDSDatePicker} datePicker - The CDSDatePicker custom element instance
|
|
693
|
-
* @this {Panel} The panel instance
|
|
694
|
-
*/
|
|
695
|
-
init: function(t) {
|
|
696
|
-
const e = customElements.get("cds-date-picker"), n = l(t), o = t.querySelector('cds-date-picker-input[kind="from"]'), s = t.querySelector('cds-date-picker-input[kind="to"]'), i = o && s, c = n.event;
|
|
697
|
-
c && this.listen(t, e.eventChange, (d) => {
|
|
698
|
-
let b;
|
|
699
|
-
i ? b = {
|
|
700
|
-
from: o.value || "",
|
|
701
|
-
to: s.value || ""
|
|
702
|
-
} : b = t.value, this.dispatchPanelEvent(c, {
|
|
703
|
-
...n,
|
|
704
|
-
value: b
|
|
705
|
-
});
|
|
706
|
-
});
|
|
707
|
-
const a = t.getAttribute("error-event");
|
|
708
|
-
a && this.listen(t, e.eventFlatpickrError, (d) => {
|
|
709
|
-
this.dispatchPanelEvent(a, {
|
|
710
|
-
...n,
|
|
711
|
-
error: d.detail
|
|
712
|
-
});
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
}, Wt = {
|
|
716
|
-
"cds-time-picker": {
|
|
717
|
-
import: jt,
|
|
718
|
-
event: "cds-time-picker-changed",
|
|
719
|
-
getData: (t, e, n) => ({
|
|
720
|
-
...e,
|
|
721
|
-
value: n.value
|
|
722
|
-
})
|
|
723
|
-
}
|
|
724
|
-
}, Yt = () => import("./index-Bg7fp8eN.js"), $t = {
|
|
725
|
-
selector: "cds-file-uploader",
|
|
726
|
-
import: Yt,
|
|
727
|
-
/**
|
|
728
|
-
* @param {CDSFileUploader} uploader - The CDSFileUploader custom element instance
|
|
729
|
-
* @this {Panel} The panel instance
|
|
730
|
-
*/
|
|
731
|
-
init: function(t) {
|
|
732
|
-
const e = l(t), n = e.event;
|
|
733
|
-
if (n) {
|
|
734
|
-
const s = t.querySelector('input[type="file"]');
|
|
735
|
-
s && this.listen(s, "change", (i) => {
|
|
736
|
-
this.dispatchPanelEvent(n, {
|
|
737
|
-
...e,
|
|
738
|
-
files: Array.from(i.target.files || [])
|
|
739
|
-
});
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
const o = t.getAttribute("delete-event");
|
|
743
|
-
o && this.listen(t, "cds-file-uploader-item-deleted", (s) => {
|
|
744
|
-
this.dispatchPanelEvent(o, {
|
|
745
|
-
...e,
|
|
746
|
-
fileName: s.detail?.fileName,
|
|
747
|
-
fileId: s.detail?.fileId
|
|
748
|
-
});
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
}, Xt = () => import("./index-BMwdiru1.js"), Zt = () => import("./index-Ibt0J2Et.js"), Jt = () => import("./index-Cp8R3aIT.js"), Kt = {
|
|
752
|
-
selector: "cds-tabs",
|
|
753
|
-
import: Xt,
|
|
754
|
-
/**
|
|
755
|
-
* @param {CDSTabs} tabs - The CDSTabs custom element instance
|
|
756
|
-
* @this {Panel} The panel instance
|
|
757
|
-
*/
|
|
758
|
-
init: function(t) {
|
|
759
|
-
const e = customElements.get("cds-tabs"), n = l(t), o = t.getAttribute("before-select-event");
|
|
760
|
-
o && this.listen(t, e.eventBeforeSelect, (i) => {
|
|
761
|
-
this.dispatchPanelEvent(o, {
|
|
762
|
-
...n,
|
|
763
|
-
tabValue: i.detail.value,
|
|
764
|
-
cancelable: !0
|
|
765
|
-
});
|
|
766
|
-
});
|
|
767
|
-
const s = n.event;
|
|
768
|
-
s && this.listen(t, e.eventSelect, (i) => {
|
|
769
|
-
const c = i.detail.item, a = l(c);
|
|
770
|
-
this.dispatchPanelEvent(s, {
|
|
771
|
-
...n,
|
|
772
|
-
...a,
|
|
773
|
-
tabValue: i.detail.value
|
|
774
|
-
});
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
}, Qt = {
|
|
778
|
-
// Accordion
|
|
779
|
-
"cds-accordion": {
|
|
780
|
-
import: Zt,
|
|
781
|
-
/**
|
|
782
|
-
* @param {CDSAccordion} accordion - The CDSAccordion custom element instance
|
|
783
|
-
* @this {Panel} The panel instance
|
|
784
|
-
*/
|
|
785
|
-
init: function(t) {
|
|
786
|
-
const e = customElements.get("cds-accordion-item"), n = l(t);
|
|
787
|
-
[...t.querySelectorAll("cds-accordion-item")].forEach((s) => {
|
|
788
|
-
const i = l(s), c = i.event || n.event;
|
|
789
|
-
c && this.listen(s, e.eventToggle, (a) => {
|
|
790
|
-
this.dispatchPanelEvent(c, {
|
|
791
|
-
...n,
|
|
792
|
-
...i,
|
|
793
|
-
open: a.detail.open
|
|
794
|
-
});
|
|
795
|
-
});
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
// Content Switcher
|
|
800
|
-
"cds-content-switcher": {
|
|
801
|
-
import: Jt,
|
|
802
|
-
/**
|
|
803
|
-
* @param {CDSContentSwitcher} switcher - The CDSContentSwitcher custom element instance
|
|
804
|
-
* @this {Panel} The panel instance
|
|
805
|
-
*/
|
|
806
|
-
init: function(t) {
|
|
807
|
-
const e = customElements.get("cds-content-switcher"), n = l(t), o = t.getAttribute("before-select-event");
|
|
808
|
-
o && this.listen(t, e.eventBeforeSelect, (i) => {
|
|
809
|
-
this.dispatchPanelEvent(o, {
|
|
810
|
-
...n,
|
|
811
|
-
value: i.detail.value,
|
|
812
|
-
cancelable: !0
|
|
813
|
-
});
|
|
814
|
-
});
|
|
815
|
-
const s = n.event;
|
|
816
|
-
s && this.listen(t, e.eventSelect, (i) => {
|
|
817
|
-
const c = i.detail.item, a = l(c);
|
|
818
|
-
this.dispatchPanelEvent(s, {
|
|
819
|
-
...n,
|
|
820
|
-
...a,
|
|
821
|
-
value: c.getAttribute("value")
|
|
822
|
-
});
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}, z = () => import("./index-B9EQl0eG.js"), te = {
|
|
827
|
-
selector: "cds-breadcrumb",
|
|
828
|
-
import: z,
|
|
829
|
-
/**
|
|
830
|
-
* @param {CDSBreadcrumb} breadcrumb - The CDSBreadcrumb custom element instance
|
|
831
|
-
* @this {Panel} The panel instance
|
|
832
|
-
*/
|
|
833
|
-
init: function(t) {
|
|
834
|
-
const e = this, n = l(t), o = n.event;
|
|
835
|
-
if (o) {
|
|
836
|
-
const s = (c) => {
|
|
837
|
-
e.dispatchPanelEvent(o, {
|
|
838
|
-
...n,
|
|
839
|
-
...c
|
|
840
|
-
});
|
|
841
|
-
};
|
|
842
|
-
e.listen(t, "click", (c) => {
|
|
843
|
-
const a = c.target.closest("cds-breadcrumb-link");
|
|
844
|
-
if (a) {
|
|
845
|
-
c.preventDefault(), c.stopPropagation();
|
|
846
|
-
const d = l(a);
|
|
847
|
-
s(d);
|
|
848
|
-
}
|
|
849
|
-
});
|
|
850
|
-
const i = t.querySelector("cds-overflow-menu-body");
|
|
851
|
-
i && e.listen(i, "cds-overflow-menu-item-clicked", (c) => {
|
|
852
|
-
c.stopPropagation();
|
|
853
|
-
const a = l(c.target);
|
|
854
|
-
s(a);
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}, ee = {
|
|
859
|
-
// Breadcrumb Item - Wrapper for breadcrumb links
|
|
860
|
-
"cds-breadcrumb-item": {
|
|
861
|
-
import: z
|
|
862
|
-
// No event handling - presentational wrapper
|
|
863
|
-
},
|
|
864
|
-
// Breadcrumb Link - Individual breadcrumb link
|
|
865
|
-
"cds-breadcrumb-link": {
|
|
866
|
-
import: z,
|
|
867
|
-
event: "click",
|
|
868
|
-
getData: (t, e, n) => (t.preventDefault(), {
|
|
869
|
-
...e,
|
|
870
|
-
href: n.getAttribute("href")
|
|
871
|
-
})
|
|
872
|
-
}
|
|
873
|
-
}, ne = () => import("./index-Cogd5TV0.js"), oe = () => import("./index-DKAiRnw5.js"), se = () => import("./index-D6A8xmd2.js"), ie = () => import("./index-kxMxVHET.js"), ce = () => import("./index-Ck0UGXjG.js"), ae = {
|
|
874
|
-
selector: "cds-text-input",
|
|
875
|
-
import: ne,
|
|
876
|
-
multiEvent: !0,
|
|
877
|
-
events: [
|
|
878
|
-
{
|
|
879
|
-
type: "input",
|
|
880
|
-
attrName: "event",
|
|
881
|
-
getData: (t, e) => ({
|
|
882
|
-
...e,
|
|
883
|
-
value: t.currentTarget.value
|
|
884
|
-
})
|
|
885
|
-
},
|
|
886
|
-
{
|
|
887
|
-
type: "change",
|
|
888
|
-
attrName: "change-event",
|
|
889
|
-
getData: (t, e) => ({
|
|
890
|
-
...e,
|
|
891
|
-
value: t.currentTarget.value
|
|
892
|
-
})
|
|
893
|
-
}
|
|
894
|
-
]
|
|
895
|
-
}, re = {
|
|
896
|
-
// Text Area
|
|
897
|
-
"cds-textarea": {
|
|
898
|
-
import: oe,
|
|
899
|
-
multiEvent: !0,
|
|
900
|
-
events: [
|
|
901
|
-
{
|
|
902
|
-
type: "input",
|
|
903
|
-
attrName: "event",
|
|
904
|
-
getData: (t, e) => ({
|
|
905
|
-
...e,
|
|
906
|
-
value: t.currentTarget.value
|
|
907
|
-
})
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
type: "change",
|
|
911
|
-
attrName: "change-event",
|
|
912
|
-
getData: (t, e) => ({
|
|
913
|
-
...e,
|
|
914
|
-
value: t.currentTarget.value
|
|
915
|
-
})
|
|
916
|
-
}
|
|
917
|
-
]
|
|
918
|
-
},
|
|
919
|
-
// Number Input
|
|
920
|
-
"cds-number-input": {
|
|
921
|
-
import: se,
|
|
922
|
-
event: "cds-number-input",
|
|
923
|
-
getData: (t, e, n) => ({
|
|
924
|
-
...e,
|
|
925
|
-
value: t.detail.value,
|
|
926
|
-
direction: t.detail.direction
|
|
927
|
-
// 'up' or 'down' when using steppers
|
|
928
|
-
})
|
|
929
|
-
},
|
|
930
|
-
// Password Input
|
|
931
|
-
"cds-password-input": {
|
|
932
|
-
import: ie,
|
|
933
|
-
multiEvent: !0,
|
|
934
|
-
events: [
|
|
935
|
-
{
|
|
936
|
-
type: "input",
|
|
937
|
-
attrName: "event",
|
|
938
|
-
getData: (t, e) => ({
|
|
939
|
-
...e,
|
|
940
|
-
value: t.currentTarget.value
|
|
941
|
-
})
|
|
942
|
-
},
|
|
943
|
-
{
|
|
944
|
-
type: "change",
|
|
945
|
-
attrName: "change-event",
|
|
946
|
-
getData: (t, e) => ({
|
|
947
|
-
...e,
|
|
948
|
-
value: t.currentTarget.value
|
|
949
|
-
})
|
|
950
|
-
}
|
|
951
|
-
]
|
|
952
|
-
},
|
|
953
|
-
// Search
|
|
954
|
-
"cds-search": {
|
|
955
|
-
import: ce,
|
|
956
|
-
event: "cds-search-input",
|
|
957
|
-
getData: (t, e, n) => ({
|
|
958
|
-
...e,
|
|
959
|
-
value: n.value
|
|
960
|
-
})
|
|
961
|
-
}
|
|
962
|
-
}, le = () => import("./index-Xu24xEY5.js"), de = () => import("./index-XQC8MAEe.js"), pe = () => import("./index-CTCHzPo9.js"), me = () => import("./index-BxGnpgtA.js"), ue = () => import("./index-CDogTzrE.js"), he = {
|
|
963
|
-
selector: "cds-checkbox",
|
|
964
|
-
import: le,
|
|
965
|
-
event: "cds-checkbox-changed",
|
|
966
|
-
getData: (t, e, n) => ({
|
|
967
|
-
...e,
|
|
968
|
-
checked: t.detail.checked,
|
|
969
|
-
value: n.value
|
|
970
|
-
})
|
|
971
|
-
}, ve = {
|
|
972
|
-
// Radio Button Group - only listen to the group, not individual buttons
|
|
973
|
-
"cds-radio-button-group": {
|
|
974
|
-
import: de,
|
|
975
|
-
event: "cds-radio-button-group-changed",
|
|
976
|
-
getData: (t, e) => ({
|
|
977
|
-
...e,
|
|
978
|
-
value: t.detail?.value
|
|
979
|
-
})
|
|
980
|
-
},
|
|
981
|
-
// Toggle
|
|
982
|
-
"cds-toggle": {
|
|
983
|
-
import: pe,
|
|
984
|
-
event: "cds-toggle-changed",
|
|
985
|
-
getData: (t, e) => ({
|
|
986
|
-
...e,
|
|
987
|
-
isOn: t.detail.checked,
|
|
988
|
-
value: t.detail.checked
|
|
989
|
-
})
|
|
990
|
-
},
|
|
991
|
-
// Select
|
|
992
|
-
"cds-select": {
|
|
993
|
-
import: me,
|
|
994
|
-
event: "cds-select-selected",
|
|
995
|
-
getData: (t, e) => ({
|
|
996
|
-
...e,
|
|
997
|
-
value: t.detail.value
|
|
998
|
-
})
|
|
999
|
-
},
|
|
1000
|
-
// Slider
|
|
1001
|
-
"cds-slider": {
|
|
1002
|
-
import: ue,
|
|
1003
|
-
/**
|
|
1004
|
-
* @param {CDSSlider} slider - The CDSSlider custom element instance
|
|
1005
|
-
* @this {Panel} The panel instance
|
|
1006
|
-
*/
|
|
1007
|
-
init: function(t) {
|
|
1008
|
-
const e = l(t), n = e.event;
|
|
1009
|
-
n && this.listen(t, "cds-slider-changed", (s) => {
|
|
1010
|
-
this.dispatchPanelEvent(n, {
|
|
1011
|
-
...e,
|
|
1012
|
-
value: s.detail.value
|
|
1013
|
-
});
|
|
1014
|
-
});
|
|
1015
|
-
const o = t.getAttribute("input-event");
|
|
1016
|
-
o && this.listen(t, "cds-slider-input-changed", (s) => {
|
|
1017
|
-
this.dispatchPanelEvent(o, {
|
|
1018
|
-
...e,
|
|
1019
|
-
value: s.detail.value
|
|
1020
|
-
});
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
}, L = () => import("./index-BX6awuOJ.js"), fe = {
|
|
1025
|
-
selector: "cds-tag",
|
|
1026
|
-
import: L,
|
|
1027
|
-
event: "click",
|
|
1028
|
-
getData: (t, e) => e
|
|
1029
|
-
}, ge = {
|
|
1030
|
-
// Dismissible tags (closeable tags with X button)
|
|
1031
|
-
"cds-dismissible-tag": {
|
|
1032
|
-
import: L,
|
|
1033
|
-
/**
|
|
1034
|
-
* @param {CDSDismissibleTag} tag - The CDSDismissibleTag custom element instance
|
|
1035
|
-
* @this {Panel} The panel instance
|
|
1036
|
-
*/
|
|
1037
|
-
init: function(t) {
|
|
1038
|
-
const e = l(t), n = t.getAttribute("click-event");
|
|
1039
|
-
n && this.listen(t, "click", (s) => {
|
|
1040
|
-
s.target.closest("button") || this.dispatchPanelEvent(n, {
|
|
1041
|
-
...e
|
|
1042
|
-
});
|
|
1043
|
-
});
|
|
1044
|
-
const o = e.event;
|
|
1045
|
-
o && this.listen(t, "cds-dismissible-tag-closed", (s) => {
|
|
1046
|
-
this.dispatchPanelEvent(o, {
|
|
1047
|
-
...e,
|
|
1048
|
-
action: "closed"
|
|
1049
|
-
});
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
},
|
|
1053
|
-
// Filter tags (closeable tags used for filters)
|
|
1054
|
-
"cds-filter-tag": {
|
|
1055
|
-
import: L,
|
|
1056
|
-
event: "cds-filter-tag-closed",
|
|
1057
|
-
getData: (t, e) => ({
|
|
1058
|
-
...e,
|
|
1059
|
-
action: "remove"
|
|
1060
|
-
})
|
|
1061
|
-
}
|
|
1062
|
-
}, Ee = () => import("./index-3DFPYYjC.js"), be = () => import("./index-DotbnSU-.js"), Ce = () => import("./index-DDrcJDBe.js"), Se = {
|
|
1063
|
-
selector: "cds-overflow-menu",
|
|
1064
|
-
import: Ee,
|
|
1065
|
-
// We collect the menu attributes from the menu, but we listen for the
|
|
1066
|
-
// events on the menu body.
|
|
1067
|
-
/**
|
|
1068
|
-
* @param {CDSOverflowMenu} overflowMenu - The CDSOverflowMenu custom element instance
|
|
1069
|
-
* @this {Panel} The panel instance
|
|
1070
|
-
*/
|
|
1071
|
-
init: function(t) {
|
|
1072
|
-
const e = l(t), n = e.event, o = t.querySelector("cds-overflow-menu-body");
|
|
1073
|
-
n && o && this.listen(o, "cds-overflow-menu-item-clicked", (s) => {
|
|
1074
|
-
s.stopPropagation();
|
|
1075
|
-
const i = l(s.target);
|
|
1076
|
-
this.dispatchPanelEvent(n, {
|
|
1077
|
-
...e,
|
|
1078
|
-
...i
|
|
1079
|
-
});
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
}, Ie = {
|
|
1083
|
-
// Structured List
|
|
1084
|
-
"cds-structured-list": {
|
|
1085
|
-
import: be,
|
|
1086
|
-
/**
|
|
1087
|
-
* @param {CDSStructuredList} list - The CDSStructuredList custom element instance
|
|
1088
|
-
* @this {Panel} The panel instance
|
|
1089
|
-
*/
|
|
1090
|
-
init: function(t) {
|
|
1091
|
-
const e = l(t);
|
|
1092
|
-
[...t.querySelectorAll("cds-structured-list-row")].forEach((o) => {
|
|
1093
|
-
const s = l(o), i = s.event || e.event;
|
|
1094
|
-
i && this.listen(o, "click", (c) => {
|
|
1095
|
-
c.stopPropagation(), this.dispatchPanelEvent(i, {
|
|
1096
|
-
...e,
|
|
1097
|
-
...s
|
|
1098
|
-
});
|
|
1099
|
-
});
|
|
1100
|
-
}), t.hasAttribute("selection") && this.listen(t, "cds-structured-list-selected", (o) => {
|
|
1101
|
-
const s = o.detail.row, i = l(s), c = e.event;
|
|
1102
|
-
c && this.dispatchPanelEvent(c, {
|
|
1103
|
-
...e,
|
|
1104
|
-
...i
|
|
1105
|
-
});
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
},
|
|
1109
|
-
// Tree View
|
|
1110
|
-
"cds-tree-view": {
|
|
1111
|
-
import: Ce,
|
|
1112
|
-
/**
|
|
1113
|
-
* @param {CDSTreeView} tree - The CDSTreeView custom element instance
|
|
1114
|
-
* @this {Panel} The panel instance
|
|
1115
|
-
*/
|
|
1116
|
-
init: function(t) {
|
|
1117
|
-
const e = l(t);
|
|
1118
|
-
this.listen(t, "cds-tree-node-selected", (o) => {
|
|
1119
|
-
const s = o.detail.node, i = l(s), c = i.event || e.event;
|
|
1120
|
-
c && this.dispatchPanelEvent(c, {
|
|
1121
|
-
...e,
|
|
1122
|
-
...i,
|
|
1123
|
-
nodeId: s.id,
|
|
1124
|
-
label: s.getAttribute("label")
|
|
1125
|
-
});
|
|
1126
|
-
});
|
|
1127
|
-
const n = E(t, "expand-event");
|
|
1128
|
-
n && this.listen(t, "cds-tree-node-expanded", (o) => {
|
|
1129
|
-
this.dispatchPanelEvent(n, {
|
|
1130
|
-
...e,
|
|
1131
|
-
nodeId: o.detail.node.id,
|
|
1132
|
-
expanded: o.detail.expanded
|
|
1133
|
-
});
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
}, q = () => import("./index-DtEEVxFL.js"), Ae = {
|
|
1138
|
-
selector: "cds-toast-notification",
|
|
1139
|
-
import: q,
|
|
1140
|
-
event: "cds-notification-closed",
|
|
1141
|
-
getData: (t, e) => ({
|
|
1142
|
-
...e,
|
|
1143
|
-
action: "closed"
|
|
1144
|
-
})
|
|
1145
|
-
}, De = {
|
|
1146
|
-
// Inline Notification
|
|
1147
|
-
"cds-inline-notification": {
|
|
1148
|
-
import: q,
|
|
1149
|
-
event: "cds-notification-closed",
|
|
1150
|
-
getData: (t, e) => ({
|
|
1151
|
-
...e,
|
|
1152
|
-
action: "closed"
|
|
1153
|
-
})
|
|
1154
|
-
},
|
|
1155
|
-
// Actionable Notification
|
|
1156
|
-
"cds-actionable-notification": {
|
|
1157
|
-
import: q,
|
|
1158
|
-
/**
|
|
1159
|
-
* @param {CDSActionableNotification} notification - The CDSActionableNotification custom element instance
|
|
1160
|
-
* @this {Panel} The panel instance
|
|
1161
|
-
*/
|
|
1162
|
-
init: function(t) {
|
|
1163
|
-
const e = l(t), n = E(t, "close-event", "event");
|
|
1164
|
-
n && this.listen(t, "cds-notification-closed", (s) => {
|
|
1165
|
-
this.dispatchPanelEvent(n, {
|
|
1166
|
-
...e,
|
|
1167
|
-
action: "closed"
|
|
1168
|
-
});
|
|
1169
|
-
});
|
|
1170
|
-
const o = E(t, "action-event");
|
|
1171
|
-
o && this.listen(t, "cds-notification-actioned", (s) => {
|
|
1172
|
-
this.dispatchPanelEvent(o, {
|
|
1173
|
-
...e,
|
|
1174
|
-
action: "actioned"
|
|
1175
|
-
});
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
}, w = () => import("./index-aYMyslt1.js"), Ne = {
|
|
1180
|
-
selector: "cds-clickable-tile",
|
|
1181
|
-
import: w,
|
|
1182
|
-
event: "click",
|
|
1183
|
-
getData: (t, e) => ({
|
|
1184
|
-
...e,
|
|
1185
|
-
href: t.currentTarget.getAttribute("href")
|
|
1186
|
-
})
|
|
1187
|
-
}, Pe = {
|
|
1188
|
-
// Expandable Tile
|
|
1189
|
-
"cds-expandable-tile": {
|
|
1190
|
-
import: w,
|
|
1191
|
-
/**
|
|
1192
|
-
* @param {CDSExpandableTile} tile - The CDSExpandableTile custom element instance
|
|
1193
|
-
* @this {Panel} The panel instance
|
|
1194
|
-
*/
|
|
1195
|
-
init: function(t) {
|
|
1196
|
-
const e = l(t), n = t.getAttribute("before-toggle-event");
|
|
1197
|
-
n && this.listen(t, "cds-expandable-tile-beingtoggled", (s) => {
|
|
1198
|
-
this.dispatchPanelEvent(n, {
|
|
1199
|
-
...e,
|
|
1200
|
-
expanded: s.detail.expanded,
|
|
1201
|
-
cancelable: !0
|
|
1202
|
-
});
|
|
1203
|
-
});
|
|
1204
|
-
const o = e.event;
|
|
1205
|
-
o && this.listen(t, "cds-expandable-tile-toggled", (s) => {
|
|
1206
|
-
this.dispatchPanelEvent(o, {
|
|
1207
|
-
...e,
|
|
1208
|
-
expanded: s.detail.expanded
|
|
1209
|
-
});
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
},
|
|
1213
|
-
// Selectable Tile
|
|
1214
|
-
"cds-selectable-tile": {
|
|
1215
|
-
import: w,
|
|
1216
|
-
event: "cds-selectable-tile-changed",
|
|
1217
|
-
getData: (t, e, n) => ({
|
|
1218
|
-
...e,
|
|
1219
|
-
selected: t.detail.selected,
|
|
1220
|
-
value: n.value
|
|
1221
|
-
})
|
|
1222
|
-
},
|
|
1223
|
-
// Radio Tile
|
|
1224
|
-
"cds-radio-tile": {
|
|
1225
|
-
import: w,
|
|
1226
|
-
event: "cds-selectable-tile-changed",
|
|
1227
|
-
getData: (t, e, n) => ({
|
|
1228
|
-
...e,
|
|
1229
|
-
selected: t.detail.selected,
|
|
1230
|
-
value: n.value
|
|
1231
|
-
})
|
|
1232
|
-
}
|
|
1233
|
-
}, _e = () => import("./index-DAp9FO-q.js"), ke = () => import("./index-DrqxeFX2.js"), ye = () => import("./index-HZx30Dhs.js"), Te = {
|
|
1234
|
-
selector: "cds-progress-bar",
|
|
1235
|
-
import: _e,
|
|
1236
|
-
/**
|
|
1237
|
-
* @param {CDSProgressBar} progressBar - The CDSProgressBar custom element instance
|
|
1238
|
-
* @this {Panel} The panel instance
|
|
1239
|
-
*/
|
|
1240
|
-
init: function(t) {
|
|
1241
|
-
const e = l(t);
|
|
1242
|
-
if (e.event) {
|
|
1243
|
-
const n = new MutationObserver(() => {
|
|
1244
|
-
const o = parseFloat(t.getAttribute("value") || "0"), s = parseFloat(t.getAttribute("max") || "100");
|
|
1245
|
-
o >= s && this.dispatchPanelEvent(e.event, {
|
|
1246
|
-
...e,
|
|
1247
|
-
value: o,
|
|
1248
|
-
status: "complete"
|
|
1249
|
-
});
|
|
1250
|
-
});
|
|
1251
|
-
n.observe(t, {
|
|
1252
|
-
attributes: !0,
|
|
1253
|
-
attributeFilter: ["value"]
|
|
1254
|
-
}), t._progressObserver = n;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
}, we = {
|
|
1258
|
-
// Progress Indicator
|
|
1259
|
-
"cds-progress-indicator": {
|
|
1260
|
-
import: ke,
|
|
1261
|
-
/**
|
|
1262
|
-
* @param {CDSProgressIndicator} indicator - The CDSProgressIndicator custom element instance
|
|
1263
|
-
* @this {Panel} The panel instance
|
|
1264
|
-
*/
|
|
1265
|
-
init: function(t) {
|
|
1266
|
-
const e = l(t);
|
|
1267
|
-
this.listen(t, "cds-progress-step-click", (n) => {
|
|
1268
|
-
const o = n.target, s = l(o), i = s.event || e.event;
|
|
1269
|
-
i && this.dispatchPanelEvent(i, {
|
|
1270
|
-
...e,
|
|
1271
|
-
...s,
|
|
1272
|
-
stepIndex: o.getAttribute("data-index"),
|
|
1273
|
-
stepLabel: o.getAttribute("label")
|
|
1274
|
-
});
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
},
|
|
1278
|
-
// Inline Loading - Loading indicator for inline actions (e.g., form submit)
|
|
1279
|
-
"cds-inline-loading": {
|
|
1280
|
-
import: ye,
|
|
1281
|
-
/**
|
|
1282
|
-
* @param {CDSInlineLoading} inlineLoading - The CDSInlineLoading custom element instance
|
|
1283
|
-
* @this {Panel} The panel instance
|
|
1284
|
-
*/
|
|
1285
|
-
init: function(t) {
|
|
1286
|
-
const e = l(t), n = e.event;
|
|
1287
|
-
n && this.listen(t, "cds-inline-loading-onsuccess", (s) => {
|
|
1288
|
-
this.dispatchPanelEvent(n, {
|
|
1289
|
-
...e,
|
|
1290
|
-
status: "finished"
|
|
1291
|
-
});
|
|
1292
|
-
});
|
|
1293
|
-
const o = t.getAttribute("status-event");
|
|
1294
|
-
if (o) {
|
|
1295
|
-
const s = new MutationObserver((i) => {
|
|
1296
|
-
i.forEach((c) => {
|
|
1297
|
-
if (c.attributeName === "status") {
|
|
1298
|
-
const a = t.getAttribute("status");
|
|
1299
|
-
this.dispatchPanelEvent(o, {
|
|
1300
|
-
...e,
|
|
1301
|
-
status: a
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
});
|
|
1306
|
-
s.observe(t, {
|
|
1307
|
-
attributes: !0,
|
|
1308
|
-
attributeFilter: ["status"]
|
|
1309
|
-
}), t._statusObserver = s;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}, Oe = () => import("./index-BI5zwXiD.js"), Re = () => import("./index-DlGr9Xg0.js").then((t) => t.i), Me = () => import("./index-WZTepZq8.js"), Be = {
|
|
1314
|
-
selector: "cds-tooltip",
|
|
1315
|
-
import: Oe,
|
|
1316
|
-
/**
|
|
1317
|
-
* @param {CDSTooltip} tooltip - The CDSTooltip custom element instance
|
|
1318
|
-
* @this {Panel} The panel instance
|
|
1319
|
-
*/
|
|
1320
|
-
init: function(t) {
|
|
1321
|
-
const e = l(t), n = E(t, "open-event");
|
|
1322
|
-
n && this.listen(t, "cds-tooltip-beingopened", (s) => {
|
|
1323
|
-
this.dispatchPanelEvent(n, {
|
|
1324
|
-
...e,
|
|
1325
|
-
action: "opened"
|
|
1326
|
-
});
|
|
1327
|
-
});
|
|
1328
|
-
const o = E(t, "close-event");
|
|
1329
|
-
o && this.listen(t, "cds-tooltip-closed", (s) => {
|
|
1330
|
-
this.dispatchPanelEvent(o, {
|
|
1331
|
-
...e,
|
|
1332
|
-
action: "closed"
|
|
1333
|
-
});
|
|
1334
|
-
});
|
|
1335
|
-
}
|
|
1336
|
-
}, ze = {
|
|
1337
|
-
// Popover
|
|
1338
|
-
"cds-popover": {
|
|
1339
|
-
import: Re,
|
|
1340
|
-
/**
|
|
1341
|
-
* @param {CDSPopover} popover - The CDSPopover custom element instance
|
|
1342
|
-
* @this {Panel} The panel instance
|
|
1343
|
-
*/
|
|
1344
|
-
init: function(t) {
|
|
1345
|
-
const e = l(t), n = E(t, "open-event");
|
|
1346
|
-
n && this.listen(t, "cds-popover-beingopened", (s) => {
|
|
1347
|
-
this.dispatchPanelEvent(n, {
|
|
1348
|
-
...e,
|
|
1349
|
-
action: "opened"
|
|
1350
|
-
});
|
|
1351
|
-
});
|
|
1352
|
-
const o = E(t, "close-event");
|
|
1353
|
-
o && this.listen(t, "cds-popover-closed", (s) => {
|
|
1354
|
-
this.dispatchPanelEvent(o, {
|
|
1355
|
-
...e,
|
|
1356
|
-
action: "closed"
|
|
1357
|
-
});
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
},
|
|
1361
|
-
// Toggletip - tooltip that stays open until dismissed
|
|
1362
|
-
"cds-toggletip": {
|
|
1363
|
-
import: Me,
|
|
1364
|
-
/**
|
|
1365
|
-
* @param {CDSToggletip} toggletip - The CDSToggletip custom element instance
|
|
1366
|
-
* @this {Panel} The panel instance
|
|
1367
|
-
*/
|
|
1368
|
-
init: function(t) {
|
|
1369
|
-
const e = l(t);
|
|
1370
|
-
if (e.event) {
|
|
1371
|
-
const n = new MutationObserver((o) => {
|
|
1372
|
-
o.forEach((s) => {
|
|
1373
|
-
if (s.attributeName === "open") {
|
|
1374
|
-
const i = t.hasAttribute("open");
|
|
1375
|
-
this.dispatchPanelEvent(e.event, {
|
|
1376
|
-
...e,
|
|
1377
|
-
action: i ? "opened" : "closed",
|
|
1378
|
-
open: i
|
|
1379
|
-
});
|
|
1380
|
-
}
|
|
1381
|
-
});
|
|
1382
|
-
});
|
|
1383
|
-
n.observe(t, {
|
|
1384
|
-
attributes: !0,
|
|
1385
|
-
attributeFilter: ["open"]
|
|
1386
|
-
}), t._toggletipObserver = n;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
}, Le = () => import("./index-qE5bNTwO.js").then((t) => t.i), qe = () => import("./index-CakpnEVH.js"), xe = {
|
|
1391
|
-
selector: "cds-link",
|
|
1392
|
-
import: Le,
|
|
1393
|
-
event: "click",
|
|
1394
|
-
getData: (t, e, n) => ({
|
|
1395
|
-
...e,
|
|
1396
|
-
href: n.getAttribute("href")
|
|
1397
|
-
})
|
|
1398
|
-
}, Fe = {
|
|
1399
|
-
// Code Snippet
|
|
1400
|
-
"cds-code-snippet": {
|
|
1401
|
-
import: qe,
|
|
1402
|
-
event: "cds-copy-button-clicked",
|
|
1403
|
-
getData: (t, e) => ({
|
|
1404
|
-
...e,
|
|
1405
|
-
action: "copied"
|
|
1406
|
-
})
|
|
1407
|
-
}
|
|
1408
|
-
}, H = () => import("./index-uX8xG4Vo.js"), Ge = () => import("./index-B1HY13ji.js"), Ue = () => import("./index-Bsg-X5g6.js"), Ve = () => import("./index-CM5SpejK.js"), je = () => import("./index-DWBna1oy.js"), He = () => import("./index-BWRKkjuC.js"), We = () => import("./index-Bc6QDBfO.js").then((t) => t.i), Ye = () => import("./index-dvBCRXrm.js").then((t) => t.i), $e = () => import("./index-LXKAODF5.js"), Xe = () => import("./index-BbbS7f42.js"), Ze = {
|
|
1409
|
-
// Form structure components (presentational only - no event handling needed)
|
|
1410
|
-
"cds-form": {
|
|
1411
|
-
import: H
|
|
1412
|
-
// No event handling - wraps native <form> which works naturally
|
|
1413
|
-
},
|
|
1414
|
-
"cds-form-item": {
|
|
1415
|
-
import: H
|
|
1416
|
-
// No event handling - presentational wrapper for form fields
|
|
1417
|
-
},
|
|
1418
|
-
"cds-form-group": {
|
|
1419
|
-
import: Ge
|
|
1420
|
-
// No event handling - presentational fieldset wrapper
|
|
1421
|
-
},
|
|
1422
|
-
"cds-stack": {
|
|
1423
|
-
import: Ue
|
|
1424
|
-
// No event handling - layout utility for spacing items vertically or horizontally
|
|
1425
|
-
},
|
|
1426
|
-
// Typography & Icons (Presentational)
|
|
1427
|
-
"cds-heading": {
|
|
1428
|
-
import: Ve
|
|
1429
|
-
// No event handling - semantic heading component
|
|
1430
|
-
},
|
|
1431
|
-
"cds-icon": {
|
|
1432
|
-
import: je
|
|
1433
|
-
// No event handling - icon display component
|
|
1434
|
-
},
|
|
1435
|
-
"cds-icon-indicator": {
|
|
1436
|
-
import: He
|
|
1437
|
-
// No event handling - status indicator icon
|
|
1438
|
-
},
|
|
1439
|
-
// Badge Indicator - Status badge component (typically used in tabs/icons)
|
|
1440
|
-
"cds-badge-indicator": {
|
|
1441
|
-
import: Xe
|
|
1442
|
-
// No event handling - presentational status indicator
|
|
1443
|
-
// Typically appears as a dot on tabs or icons to show notifications/status
|
|
1444
|
-
},
|
|
1445
|
-
// Loading - Full-page or section loading spinner
|
|
1446
|
-
"cds-loading": {
|
|
1447
|
-
import: We
|
|
1448
|
-
// No event handling - presentational loading spinner
|
|
1449
|
-
},
|
|
1450
|
-
// Skeleton components - Loading placeholders
|
|
1451
|
-
"cds-skeleton-text": {
|
|
1452
|
-
import: Ye
|
|
1453
|
-
// No event handling - presentational loading placeholder
|
|
1454
|
-
},
|
|
1455
|
-
"cds-skeleton-placeholder": {
|
|
1456
|
-
import: $e
|
|
1457
|
-
// No event handling - presentational loading placeholder
|
|
1458
|
-
}
|
|
1459
|
-
}, Je = [
|
|
1460
|
-
yt,
|
|
1461
|
-
Tt,
|
|
1462
|
-
Ot,
|
|
1463
|
-
zt,
|
|
1464
|
-
Gt,
|
|
1465
|
-
Ht,
|
|
1466
|
-
$t,
|
|
1467
|
-
Kt,
|
|
1468
|
-
te,
|
|
1469
|
-
ae,
|
|
1470
|
-
he,
|
|
1471
|
-
fe,
|
|
1472
|
-
Se,
|
|
1473
|
-
Ae,
|
|
1474
|
-
Ne,
|
|
1475
|
-
Te,
|
|
1476
|
-
Be,
|
|
1477
|
-
xe
|
|
1478
|
-
];
|
|
1479
|
-
function Ke() {
|
|
1480
|
-
const t = /* @__PURE__ */ new Map();
|
|
1481
|
-
return Je.forEach((n) => {
|
|
1482
|
-
t.set(n.selector, n);
|
|
1483
|
-
}), [
|
|
1484
|
-
wt,
|
|
1485
|
-
Rt,
|
|
1486
|
-
Lt,
|
|
1487
|
-
Ut,
|
|
1488
|
-
Wt,
|
|
1489
|
-
Qt,
|
|
1490
|
-
ee,
|
|
1491
|
-
Nt,
|
|
1492
|
-
re,
|
|
1493
|
-
ve,
|
|
1494
|
-
ge,
|
|
1495
|
-
Ie,
|
|
1496
|
-
De,
|
|
1497
|
-
Pe,
|
|
1498
|
-
we,
|
|
1499
|
-
ze,
|
|
1500
|
-
Fe,
|
|
1501
|
-
Ze
|
|
1502
|
-
].forEach((n) => {
|
|
1503
|
-
Object.entries(n).forEach(([o, s]) => {
|
|
1504
|
-
t.set(o, s);
|
|
1505
|
-
});
|
|
1506
|
-
}), t;
|
|
1507
|
-
}
|
|
1508
|
-
function Qe(t) {
|
|
1509
|
-
const e = /* @__PURE__ */ new Map();
|
|
1510
|
-
if (!t || !(t instanceof Element))
|
|
1511
|
-
return e;
|
|
1512
|
-
for (const o of Object.keys(y))
|
|
1513
|
-
e.set(o, []);
|
|
1514
|
-
for (const [o, s] of Object.entries(y))
|
|
1515
|
-
t.matches(o) && e.get(o).push(t);
|
|
1516
|
-
const n = t.querySelectorAll("*");
|
|
1517
|
-
for (const o of n)
|
|
1518
|
-
for (const [s, i] of Object.entries(y))
|
|
1519
|
-
o.matches(s) && e.get(s).push(o);
|
|
1520
|
-
for (const [o, s] of e.entries())
|
|
1521
|
-
s.length === 0 && e.delete(o);
|
|
1522
|
-
return e;
|
|
1523
|
-
}
|
|
1524
|
-
function tn(t) {
|
|
1525
|
-
const e = /* @__PURE__ */ new Set();
|
|
1526
|
-
for (const [n, o] of t.entries()) {
|
|
1527
|
-
const s = y[n];
|
|
1528
|
-
s && s.import && o.length > 0 && (Array.isArray(s.import) ? s.import : [s.import]).forEach((c) => e.add(c));
|
|
1529
|
-
}
|
|
1530
|
-
return e;
|
|
1531
|
-
}
|
|
1532
|
-
async function en(t, e) {
|
|
1533
|
-
if (t.size === 0)
|
|
1534
|
-
return;
|
|
1535
|
-
const n = Array.from(t).map(async (o) => (e.has(o) || e.set(o, o()), e.get(o)));
|
|
1536
|
-
await Promise.all(n);
|
|
1537
|
-
}
|
|
1538
|
-
function nn(t, e) {
|
|
1539
|
-
let n = 0;
|
|
1540
|
-
for (const [o, s] of t.entries()) {
|
|
1541
|
-
const i = y[o];
|
|
1542
|
-
s.forEach((c) => {
|
|
1543
|
-
if (i.init) {
|
|
1544
|
-
i.init.call(e, c);
|
|
1545
|
-
return;
|
|
1546
|
-
}
|
|
1547
|
-
if (i.multiEvent) {
|
|
1548
|
-
const b = l(c);
|
|
1549
|
-
i.events.forEach((S) => {
|
|
1550
|
-
const P = E(c, S.attrName, "event");
|
|
1551
|
-
P && e.listen(c, S.type, (O) => {
|
|
1552
|
-
e.dispatchPanelEvent(P, S.getData(O, b, c));
|
|
1553
|
-
});
|
|
1554
|
-
});
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
|
-
const a = l(c), d = a.event;
|
|
1558
|
-
d && e.listen(c, i.event, (b) => {
|
|
1559
|
-
b.stopPropagation();
|
|
1560
|
-
const S = i.getData(b, a, c), P = S._eventOverride || d;
|
|
1561
|
-
delete S._eventOverride, e.dispatchPanelEvent(P, S);
|
|
1562
|
-
});
|
|
1563
|
-
}), n += s.length;
|
|
1564
|
-
}
|
|
1565
|
-
return n;
|
|
1566
|
-
}
|
|
1567
|
-
const y = {
|
|
1568
|
-
...Object.fromEntries(Ke())
|
|
1569
|
-
}, on = async function(t, e) {
|
|
1570
|
-
const n = Qe(t);
|
|
1571
|
-
if (n.size === 0) {
|
|
1572
|
-
this.debugMe("[Carbon] No Carbon components found in panel");
|
|
1573
|
-
return;
|
|
1574
|
-
}
|
|
1575
|
-
this.carbonComponents || (this.carbonComponents = /* @__PURE__ */ new Map());
|
|
1576
|
-
for (const [i, c] of n.entries())
|
|
1577
|
-
this.carbonComponents.set(i, c);
|
|
1578
|
-
const o = tn(n);
|
|
1579
|
-
if (o.size > 0)
|
|
1580
|
-
try {
|
|
1581
|
-
await en(o, e);
|
|
1582
|
-
} catch (i) {
|
|
1583
|
-
console.error("[Carbon] Failed to load some component modules:", i);
|
|
1584
|
-
}
|
|
1585
|
-
const s = nn(n, this);
|
|
1586
|
-
s > 0 && this.debugMe(`[Carbon] Total components initialized: ${s}`);
|
|
1587
|
-
}, cn = () => {
|
|
1588
|
-
Et.register("carbon", {
|
|
1589
|
-
/**
|
|
1590
|
-
* Main render function that orchestrates Carbon component initialization.
|
|
1591
|
-
* Called by Panel.parseContent() for each panel that enters the document.
|
|
1592
|
-
*
|
|
1593
|
-
* @param {Element} panel - The panel DOM element to scan and initialize
|
|
1594
|
-
* @param {Map} cache - Import cache to prevent duplicate module loads
|
|
1595
|
-
* @returns {Promise<void>}
|
|
1596
|
-
*/
|
|
1597
|
-
render: async function(t, e) {
|
|
1598
|
-
try {
|
|
1599
|
-
await on.call(this, t, e);
|
|
1600
|
-
} catch (n) {
|
|
1601
|
-
console.error("[Carbon] Initialization error:", n);
|
|
1602
|
-
}
|
|
1603
|
-
},
|
|
1604
|
-
/**
|
|
1605
|
-
* Cleans up Carbon components when a component is disposed.
|
|
1606
|
-
* Carbon Web Components (native web components) automatically cleanup when
|
|
1607
|
-
* removed from the DOM, so this is primarily here for completeness and
|
|
1608
|
-
* future extensibility.
|
|
1609
|
-
*
|
|
1610
|
-
* @param {Element} _element - The element being disposed
|
|
1611
|
-
*/
|
|
1612
|
-
dispose: function(t) {
|
|
1613
|
-
},
|
|
1614
|
-
config: {
|
|
1615
|
-
version: "2.0",
|
|
1616
|
-
description: "IBM Carbon Design System Web Components"
|
|
1617
|
-
}
|
|
1618
|
-
}), console.debug("[Zooy] Carbon Design System library registered");
|
|
1619
|
-
};
|
|
1620
|
-
export {
|
|
1621
|
-
cn as registerCarbonLibrary
|
|
1622
|
-
};
|