@trintel/zooy 1.0.7 → 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-DXiFxUx8.js → button-C0ysaw92.js} +1 -1
- package/dist/chunks/{button-TQ5Z_213.js → button-J_l629CJ.js} +4 -4
- package/dist/chunks/{button-skeleton-BXdxtWxx.js → button-skeleton-B_Sgp5GT.js} +4 -4
- package/dist/chunks/{button-skeleton-CQt93l0e.js → button-skeleton-C6DFZmZH.js} +1 -1
- package/dist/chunks/{checkbox-BLqSgzPl.js → checkbox-CgRvu8uo.js} +1 -1
- package/dist/chunks/{checkbox-Ce4iv245.js → checkbox-zD4SZkfz.js} +5 -5
- package/dist/chunks/{class-map-DRKcPEMq.js → class-map-C3HqAjJs.js} +1 -1
- package/dist/chunks/{class-map-B8BVmL9r.js → class-map-CZy_lapI.js} +1 -1
- package/dist/chunks/{content-switcher-item-BNzxXCQj.js → content-switcher-item-BwGyOcvG.js} +1 -1
- package/dist/chunks/{content-switcher-item-C4poRBhP.js → content-switcher-item-D7my36A_.js} +4 -4
- package/dist/chunks/{dropdown-item-3hXddUyA.js → dropdown-item-B4aGGhUu.js} +1 -1
- package/dist/chunks/{dropdown-item-B1PbWipg.js → dropdown-item-sj9_Q-2Y.js} +6 -6
- package/dist/chunks/{icon-loader-HxMZmG1S.js → icon-loader-ChdGfSmj.js} +1 -1
- package/dist/chunks/{icon-loader-l936Y1Y2.js → icon-loader-pWXWFpAd.js} +1 -1
- package/dist/chunks/{icon-loader-utils-D2_soUEJ.js → icon-loader-utils-CD3l842s.js} +1 -1
- package/dist/chunks/{icon-loader-utils-xTU_7Gkv.js → icon-loader-utils-DdfPalr5.js} +1 -1
- package/dist/chunks/{if-defined-CyKOTQoD.js → if-defined-C0WXUd0n.js} +1 -1
- package/dist/chunks/{if-defined-Cg6S0WRd.js → if-defined-h0V4oPE0.js} +1 -1
- package/dist/chunks/if-non-empty-4oodvODv.js +1 -0
- package/dist/chunks/{if-non-empty-DZ7mMVRO.js → if-non-empty-DsNNfSW1.js} +1 -1
- package/dist/chunks/{index-O55HRlOa.js → index--nPiAPdI.js} +3 -3
- package/dist/chunks/{index-cy4Z2pfI.js → index-5HiyK8z_.js} +1 -1
- package/dist/chunks/{index-Burct9SW.js → index-90TKvaQz.js} +7 -7
- package/dist/chunks/{index-C7X38aQp.js → index-B80vAz9U.js} +1 -1
- package/dist/chunks/{index-BBtImtqf.js → index-B9WY40Mg.js} +8 -8
- package/dist/chunks/{index-C3bqrUco.js → index-BCd5o-O6.js} +4 -4
- package/dist/chunks/{index-DFGqcn1K.js → index-BGWhDeBi.js} +2 -2
- package/dist/chunks/{index-B8pBsLur.js → index-BGh5ukZB.js} +3 -3
- package/dist/chunks/{index-C5DktJE6.js → index-BIz0BjjL.js} +1 -1
- package/dist/chunks/{index-B4Cub9lZ.js → index-BLJaTPjJ.js} +10 -10
- package/dist/chunks/{index-j7S_4l8J.js → index-BM6jRp79.js} +5 -5
- package/dist/chunks/{index-BpOQerSE.js → index-BN42k7S9.js} +1 -1
- package/dist/chunks/{index-Bbb3ajlK.js → index-BNR5ONEM.js} +1 -1
- package/dist/chunks/{index-CjwO7zvd.js → index-BOOSwnW2.js} +1 -1
- package/dist/chunks/{index-DuozJDSN.js → index-BOdoMpSP.js} +1 -1
- package/dist/chunks/{index-gdF6Bio7.js → index-BRUV1CNi.js} +7 -7
- package/dist/chunks/{index-CdOow-p_.js → index-BTM514kF.js} +5 -5
- package/dist/chunks/{index-Bzbuw3yc.js → index-BUX_B_Go.js} +6 -6
- package/dist/chunks/{index-CL9hiht6.js → index-BVNauB67.js} +2 -2
- package/dist/chunks/{index-BsLnUTt2.js → index-BVuFwiy8.js} +1 -1
- package/dist/chunks/{index-v8Mej-zS.js → index-BXCZNGbC.js} +1 -1
- package/dist/chunks/{index-D23kSFT_.js → index-B_-ytvrp.js} +1 -1
- package/dist/chunks/{index-Dqq-jEHd.js → index-BdCneYBx.js} +2 -2
- package/dist/chunks/{index-DGzE2hxO.js → index-BfyiB6r5.js} +1 -1
- package/dist/chunks/{index-Cih_eNJk.js → index-Bg1BBBMy.js} +1 -1
- package/dist/chunks/{index-C5BoQgTc.js → index-BhdW2QbN.js} +1 -1
- package/dist/chunks/{index-BpXTO-26.js → index-Bm7ePd1P.js} +5 -5
- package/dist/chunks/{index-DctJ73IF.js → index-Bo68CzXB.js} +1 -1
- package/dist/chunks/{index-CftYyZu7.js → index-BoxMbYX3.js} +3 -3
- package/dist/chunks/{index-CvY-7pXV.js → index-BqYoAbjK.js} +1 -1
- package/dist/chunks/index-BuuxULtA.js +4 -0
- package/dist/chunks/{index-O65Gc9nS.js → index-By_1f8e1.js} +1 -1
- package/dist/chunks/{index-CmX7hAxw.js → index-Bzp_dDt9.js} +4 -4
- package/dist/chunks/{index-BRj3l6eo.js → index-C-y2nrc1.js} +3 -3
- package/dist/chunks/{index-0q2seZ_8.js → index-C1BCLU9c.js} +7 -7
- package/dist/chunks/{index-DOg7jdf1.js → index-C4MmJOdJ.js} +1 -1
- package/dist/chunks/{index-C_raMAyX.js → index-C8Epo2Nt.js} +4 -4
- package/dist/chunks/{index-CmSIemMe.js → index-C8sCBvHj.js} +1 -1
- package/dist/chunks/{index-CA51gBqW.js → index-CANkW4Or.js} +1 -1
- package/dist/chunks/{index-xTZMbzwZ.js → index-CI4IDokw.js} +6 -6
- package/dist/chunks/{index-DnJkSee7.js → index-CIhGaNHB.js} +9 -9
- package/dist/chunks/{index-0Lh4HDpB.js → index-CKplFFc-.js} +2 -2
- package/dist/chunks/{index-BI2UKnaQ.js → index-CQxC5gdy.js} +5 -5
- package/dist/chunks/{index-hqRCDkdq.js → index-CTt-WSM-.js} +1 -1
- package/dist/chunks/{index-DDZQVOSB.js → index-CZIkoNzI.js} +1 -1
- package/dist/chunks/{index-CvE8pMER.js → index-ChqgnI6f.js} +1 -1
- package/dist/chunks/index-ClkBeEyN.js +77 -0
- package/dist/chunks/{index-kFuNICSc.js → index-CmPWJUnL.js} +1 -1
- package/dist/chunks/{index-xg2SMEcO.js → index-Co8vob2d.js} +7 -7
- package/dist/chunks/{index-iN8x96sv.js → index-Coav7Owj.js} +6 -6
- package/dist/chunks/{index-BmHPEq-x.js → index-CuqzTZu2.js} +6 -6
- package/dist/chunks/{index-BDFyGWAo.js → index-Cvvea2-F.js} +5 -5
- package/dist/chunks/{index-DzX6ELl7.js → index-Cy2K76Ai.js} +1 -1
- package/dist/chunks/{index-CxHVh1p1.js → index-D0qgF0lD.js} +7 -7
- package/dist/chunks/{index-QH_p6nSd.js → index-D64233nd.js} +5 -5
- package/dist/chunks/{index-DxXhIc-b.js → index-D6_et4O5.js} +4 -4
- package/dist/chunks/{index-Cp9vq51a.js → index-DBcWalCu.js} +1 -1
- package/dist/chunks/{index-BOjkgfX5.js → index-DD8IhgVt.js} +1 -1
- package/dist/chunks/{index-BjPbzP32.js → index-DE9QLbNF.js} +1 -1
- package/dist/chunks/{index-CxH5pDYR.js → index-DMtD0b_3.js} +4 -4
- package/dist/chunks/{index-PMtj9tz1.js → index-DNP3ng82.js} +1 -1
- package/dist/chunks/{index-D1Thmc8o.js → index-DNQ1-jUj.js} +5 -5
- package/dist/chunks/{index-iDpB9zzg.js → index-DPfXz4s4.js} +1 -1
- package/dist/chunks/{index-Cm71ZZ2p.js → index-DRnD7wpG.js} +1 -1
- package/dist/chunks/{index-CukkZSZU.js → index-DTy7Kl9T.js} +1 -1
- package/dist/chunks/{index-Cm4XjDTR.js → index-DV4mpy_b.js} +1 -1
- package/dist/chunks/{index-Dl5FFbv7.js → index-DgkK15bX.js} +1 -1
- package/dist/chunks/{index-ChNYD8Dd.js → index-Di4YY_Ua.js} +1 -1
- package/dist/chunks/index-DjW0vKON.js +2 -0
- package/dist/chunks/{index-DiIjZO0F.js → index-DoczycjW.js} +1 -1
- package/dist/chunks/{index-Bq2MmIX9.js → index-Dp1sKeLf.js} +1 -1
- package/dist/chunks/{index-BKKlb0J7.js → index-Dt-eWAJs.js} +5 -5
- package/dist/chunks/{index-ClrFW2rW.js → index-DtKsNvQ_.js} +1 -1
- package/dist/chunks/{index-DAjx5ZMD.js → index-DtqsUG21.js} +3 -3
- package/dist/chunks/{index-BeW5et-a.js → index-DuePdA69.js} +5 -5
- package/dist/chunks/index-DwZ-6zgN.js +1 -0
- package/dist/chunks/{index-DMh9lcW4.js → index-DxZy3oU4.js} +1 -1
- package/dist/chunks/{index-ByGJtavW.js → index-Dy_V6Qce.js} +3 -3
- package/dist/chunks/{index-CuftEO4n.js → index-Eo0QL5BD.js} +6 -6
- package/dist/chunks/{index-CP3IQOrv.js → index-FyLcWuoP.js} +1 -1
- package/dist/chunks/{index-iyY99q2y.js → index-GgCbc4A-.js} +8 -8
- package/dist/chunks/{index-DB-v93tm.js → index-KHZmzPoF.js} +1 -1
- package/dist/chunks/{index-ChiL5ZcD.js → index-LoWfGWWA.js} +1 -1
- package/dist/chunks/{index-8gFTsVpU.js → index-M2ihC48l.js} +1 -1
- package/dist/chunks/{index-CH_UJgBt.js → index-Oa3v3_7X.js} +4 -4
- package/dist/chunks/{index-7EHleExF.js → index-Q_jttfI5.js} +7 -7
- package/dist/chunks/{index-BliqP2AV.js → index-Ss_rpifk.js} +3 -3
- package/dist/chunks/{index-D14WfIVq.js → index-TZUVB-W3.js} +5 -5
- package/dist/chunks/{index-Cveej1JO.js → index-_YrjxtQS.js} +8 -8
- package/dist/chunks/{index-BI7Rc11b.js → index-aMr7w_kx.js} +1 -1
- package/dist/chunks/{index-BbN7FHHT.js → index-dygVIOMF.js} +1 -1
- package/dist/chunks/{index-BE10kyvs.js → index-eTqONZnk.js} +1 -1
- package/dist/chunks/{index-BcwmUX5U.js → index-g_0TpuQy.js} +1 -1
- package/dist/chunks/{index-D0-FP58R.js → index-hsgeVwtf.js} +5 -5
- package/dist/chunks/{index-D64SgGEt.js → index-jwYklbEt.js} +5 -5
- package/dist/chunks/{index-CUY1VtLr.js → index-pE6aTBiZ.js} +5 -5
- package/dist/chunks/{index-Dh5yT9_B.js → index-poW5zIu0.js} +1 -1
- package/dist/chunks/{index-_Sa5BYRO.js → index-qCBuo7Dj.js} +3 -3
- package/dist/chunks/{index-BSGMH-5J.js → index-sP0n4M3S.js} +4 -4
- package/dist/chunks/{index-Ci2eq45L.js → index-tyzdclid.js} +1 -1
- package/dist/chunks/{index-PONQKFP4.js → index-u-6uWe_o.js} +4 -4
- package/dist/chunks/{index-BlNNYi81.js → index-v9RmWFs_.js} +1 -1
- package/dist/chunks/{index-O_mx3px1.js → index-vVzSlOxh.js} +1 -1
- package/dist/chunks/{index-r12okTDD.js → index-ze2WZhYO.js} +3 -3
- package/dist/chunks/{loading-icon-Bc7ZUsBX.js → loading-icon-BLLYUpvs.js} +1 -1
- package/dist/chunks/{loading-icon-0rgLngL8.js → loading-icon-Cp8xIAZy.js} +1 -1
- package/dist/chunks/{main-riBD0E5n.js → main-AZkvXZM1.js} +1 -1
- package/dist/chunks/{main-jVeZRB91.js → main-CPeOiLq5.js} +6 -6
- package/dist/chunks/{property-1hLlCJhn.js → property-CpWqCPHX.js} +1 -1
- package/dist/chunks/{property-CaIoT4YE.js → property-Cti8Pknb.js} +1 -1
- package/dist/chunks/{register-Dhwzu75D.js → register-BDgKT87m.js} +1 -1
- package/dist/chunks/register-BT1eatec.js +1 -0
- package/dist/chunks/{register-EjYAUKbP.js → register-BZYvuwHN.js} +1 -1
- package/dist/chunks/register-D01rr_6V.js +1676 -0
- package/dist/chunks/{search-BNcImhhb.js → search-B-sFlTAG.js} +1 -1
- package/dist/chunks/{search-CHy8KUEr.js → search-BoFbUjIa.js} +6 -6
- package/dist/chunks/{select-CE-WFB8J.js → select-item-BdZ5OqWH.js} +32 -32
- package/dist/chunks/select-item-Uyiqlm7Q.js +80 -0
- package/dist/chunks/{state-DqznQRLe.js → state-Czcme0IZ.js} +1 -1
- package/dist/chunks/{state-IflcMO5o.js → state-D3hzHQXM.js} +1 -1
- package/dist/chunks/{text-input-DQKK3f2L.js → text-input-R3AwYWSw.js} +5 -5
- package/dist/chunks/{text-input-CLVbLjFT.js → text-input-iJP2nFN5.js} +1 -1
- package/dist/chunks/{tooltip-content-CEgi8B6v.js → tooltip-content-Brl7yv5K.js} +1 -1
- package/dist/chunks/{tooltip-content-CQHg7T5-.js → tooltip-content-Bug744xy.js} +3 -3
- package/dist/chunks/{unsafe-html-bHNwXACd.js → unsafe-html-BKdKIEJy.js} +1 -1
- package/dist/chunks/{unsafe-html-paXBFqeo.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-Dx4pitmj.js +0 -1
- package/dist/chunks/index-BvwBHGZ_.js +0 -4
- package/dist/chunks/index-DMMym9Yx.js +0 -1
- package/dist/chunks/index-Dp_RyMLM.js +0 -2
- package/dist/chunks/index-ibm_789V.js +0 -77
- package/dist/chunks/register-BZGWnDHd.js +0 -1622
- package/dist/chunks/register-DSUjA_iL.js +0 -1
- package/dist/chunks/select-Dnt9tUQJ.js +0 -80
|
@@ -0,0 +1,1676 @@
|
|
|
1
|
+
import { _ as et, c as vt, d as bt, g as l, e as Et, h as St, o as _t, j as It, p as yt, k as E, C as Ct } from "./main-CPeOiLq5.js";
|
|
2
|
+
var Pt = /* @__PURE__ */ et(function(e, n) {
|
|
3
|
+
return n == null || n !== n ? e : n;
|
|
4
|
+
}), At = /* @__PURE__ */ vt(function(e, n, o) {
|
|
5
|
+
return Pt(e, bt(n, o));
|
|
6
|
+
}), Tt = /* @__PURE__ */ et(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
|
+
}), z = {}, Y;
|
|
11
|
+
function Dt() {
|
|
12
|
+
return Y || (Y = 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
|
+
})(z)), z;
|
|
42
|
+
}
|
|
43
|
+
var kt = Dt();
|
|
44
|
+
const Nt = {
|
|
45
|
+
selector: "cds-pagination",
|
|
46
|
+
/**
|
|
47
|
+
* Initialize a standalone pagination component.
|
|
48
|
+
*
|
|
49
|
+
* Note: The pagination parameter is a CDSPagination instance from @carbon/web-components.
|
|
50
|
+
* To access the CDSPagination class and its static properties:
|
|
51
|
+
* const CDSPagination = customElements.get('cds-pagination');
|
|
52
|
+
* // or
|
|
53
|
+
* const CDSPagination = pagination.constructor;
|
|
54
|
+
*
|
|
55
|
+
* @param {CDSPagination} pagination - The CDSPagination custom element instance
|
|
56
|
+
* @this {Panel} The panel instance
|
|
57
|
+
*/
|
|
58
|
+
init: function(t) {
|
|
59
|
+
const e = this, n = customElements.get("cds-pagination");
|
|
60
|
+
let o = null;
|
|
61
|
+
e.listen(t, n.eventChangeCurrent, (s) => {
|
|
62
|
+
const c = s.detail.page, i = t.pageSize, a = (c - 1) * i;
|
|
63
|
+
a !== o && (o = a, e.dispatchPanelEvent("pagination-changed-current", {
|
|
64
|
+
detail: {
|
|
65
|
+
page: c,
|
|
66
|
+
pageSize: i,
|
|
67
|
+
action: "page-change"
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
}), e.listen(t, n.eventPageSizeChanged, (s) => {
|
|
71
|
+
const c = t.pageSize;
|
|
72
|
+
o = null, e.dispatchPanelEvent("pagination-changed-page-size", {
|
|
73
|
+
detail: {
|
|
74
|
+
page: 1,
|
|
75
|
+
// Reset to page 1 when changing size
|
|
76
|
+
pageSize: c,
|
|
77
|
+
action: "page-size-change"
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}, $ = (t, e, n) => {
|
|
83
|
+
const o = customElements.get("cds-table"), s = customElements.get("cds-pagination"), c = customElements.get(o.selectorTableBatchActions);
|
|
84
|
+
customElements.get("cds-popover");
|
|
85
|
+
const i = e.dataBinder, a = e.pagination, d = e.skeleton, S = e.querySelector(o.selectorTableToolbarSearch), I = e.querySelector(o.selectorTableBatchActions), D = e.querySelector(o.selectorTableBody), W = ["button", "a", "input", "select", "textarea", '[role="button"]', ".cds--table-expand", ".cds--table-column-checkbox"].join(","), U = e.querySelectorAll(o.selectorHeaderCell + "[is-sortable]"), nt = e.isSortable || U.length > 0, R = Symbol(), B = Symbol(), k = /* @__PURE__ */ new Map(), ot = (r) => {
|
|
86
|
+
t.listen(e, "click", (p) => {
|
|
87
|
+
const u = p.target.closest(o.selectorTableRow);
|
|
88
|
+
if (!u || p.composedPath().some((f) => f.matches && f.matches(W))) return;
|
|
89
|
+
p.stopPropagation();
|
|
90
|
+
const m = l(u);
|
|
91
|
+
t.dispatchPanelEvent(r, {
|
|
92
|
+
...m
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}, st = (r) => {
|
|
96
|
+
t.listen(e, o.eventExpandoToggle, (p) => {
|
|
97
|
+
const u = p.target, m = u.tagName === "CDS-TABLE-HEADER-ROW", f = p.detail.expanded, v = l(u), _ = {
|
|
98
|
+
tableAttrs: n,
|
|
99
|
+
...v,
|
|
100
|
+
target: u,
|
|
101
|
+
allRows: m,
|
|
102
|
+
didExpand: f
|
|
103
|
+
};
|
|
104
|
+
t.dispatchPanelEvent(r, _);
|
|
105
|
+
});
|
|
106
|
+
}, ct = (r) => {
|
|
107
|
+
k.set(R, (p) => {
|
|
108
|
+
t.dispatchPanelEvent(r, p);
|
|
109
|
+
});
|
|
110
|
+
}, it = (r) => {
|
|
111
|
+
k.set(B, (p) => {
|
|
112
|
+
const u = p.detail.selectedRows, m = Math.min(u.length, I.totalRowsCount), f = p.target, v = l(f), _ = u.map(l), y = {
|
|
113
|
+
tableAttrs: n,
|
|
114
|
+
...v,
|
|
115
|
+
target: f,
|
|
116
|
+
selectCount: m,
|
|
117
|
+
selection: _
|
|
118
|
+
};
|
|
119
|
+
t.dispatchPanelEvent(r, y);
|
|
120
|
+
});
|
|
121
|
+
}, at = (r) => {
|
|
122
|
+
t.listen(e, o.eventTableRowSelect, (p) => {
|
|
123
|
+
const u = p.target, m = p.detail.selectedRows || [], f = m.length, v = m.map(l), _ = l(u), y = {
|
|
124
|
+
tableAttrs: n,
|
|
125
|
+
..._,
|
|
126
|
+
selectCount: f,
|
|
127
|
+
selection: v,
|
|
128
|
+
target: u
|
|
129
|
+
};
|
|
130
|
+
t.dispatchPanelEvent(r, y);
|
|
131
|
+
});
|
|
132
|
+
}, rt = () => {
|
|
133
|
+
t.listen(e, o.eventBeforeSort, (r) => {
|
|
134
|
+
const p = r.target, u = r.detail.oldSortDirection, m = r.detail.sortDirection, f = l(p), v = f.sortField, _ = m === kt.TABLE_SORT_DIRECTION.DESCENDING ? `-${v}` : v;
|
|
135
|
+
r.cancelBubble = !0, r.stopPropagation(), r.preventDefault(), D.innerHTML = "", d && d.show(), U.forEach((A, h) => {
|
|
136
|
+
A === p ? (A.setAttribute("sort-active", "true"), A.setAttribute("sort-direction", m)) : (A.removeAttribute("sort-active"), A.setAttribute("sort-direction", "none"));
|
|
137
|
+
});
|
|
138
|
+
const y = { ordering: _ };
|
|
139
|
+
i.fetchData(y).then(() => {
|
|
140
|
+
a.setData(i), d && d.hide();
|
|
141
|
+
}), k.has(R) && k.get(R)({
|
|
142
|
+
tableAttrs: n,
|
|
143
|
+
...f,
|
|
144
|
+
sortNow: m,
|
|
145
|
+
sortWas: u,
|
|
146
|
+
sortField: v,
|
|
147
|
+
ordering: _,
|
|
148
|
+
target: p
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}, lt = () => {
|
|
152
|
+
t.listen(e, o.eventTableRowSelectAll, (r) => {
|
|
153
|
+
r.detail.selectedRows.length === 0 && e.querySelectorAll(o.selectorTableRow).forEach((p) => {
|
|
154
|
+
p.disabled = !1, p.selected = !1;
|
|
155
|
+
}), k.has(B) && k.get(B)(r);
|
|
156
|
+
});
|
|
157
|
+
}, dt = () => {
|
|
158
|
+
t.listen(e, o.eventBeforeChangeSelectionAll, (r) => {
|
|
159
|
+
r.stopPropagation(), r.detail.callback && r.detail.callback();
|
|
160
|
+
});
|
|
161
|
+
}, pt = (r) => {
|
|
162
|
+
const p = e.querySelector("cds-table-header-row");
|
|
163
|
+
t.listen(r, c.eventClickSelectAll, (u) => {
|
|
164
|
+
u.stopPropagation(), p.dispatchEvent(new CustomEvent(o.eventBeforeChangeSelectionAll, {
|
|
165
|
+
bubbles: !0,
|
|
166
|
+
cancelable: !0,
|
|
167
|
+
composed: !0,
|
|
168
|
+
detail: {
|
|
169
|
+
selected: !0,
|
|
170
|
+
callback: () => {
|
|
171
|
+
r.selectedRowsCount = r.totalRowsCount, e.querySelectorAll(o.selectorTableRow).forEach((m) => {
|
|
172
|
+
m.disabled = !0;
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
});
|
|
178
|
+
}, ut = (r) => {
|
|
179
|
+
t.listen(r, "keydown", (p) => {
|
|
180
|
+
if (p.key === "Enter") {
|
|
181
|
+
d && d.show(), a.totalItems = 0, e.querySelector("cds-table-body").replaceChildren();
|
|
182
|
+
const m = { search: r.value || "", offset: 0 };
|
|
183
|
+
i.fetchData(m).then(() => {
|
|
184
|
+
a.setData(i), d && d.hide();
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}, mt = (r) => {
|
|
189
|
+
t.listen(r, o.eventSearchInput, (p) => {
|
|
190
|
+
if ((p.detail.value || "") === "") {
|
|
191
|
+
const m = { search: "", offset: 0 };
|
|
192
|
+
d && d.show(), i.fetchData(m).then(() => {
|
|
193
|
+
d && d.hide(), a.setData(i);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}, gt = (r) => {
|
|
198
|
+
r.caret = !1;
|
|
199
|
+
const p = r.querySelector("cds-icon-button, button:not([slot])"), u = r.querySelectorAll("cds-checkbox"), m = r.querySelectorAll("cds-modal-footer-button"), f = [...r.querySelectorAll("cds-checkbox-group")].map(l).map(At("noop", ["zoo", "filter", "field"])).reduce(
|
|
200
|
+
(h, b) => (h[b] = null, h),
|
|
201
|
+
{ offset: 0 }
|
|
202
|
+
);
|
|
203
|
+
if (!p || !m) {
|
|
204
|
+
console.error("Improperly configured Batch Filter popover");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
new MutationObserver(() => {
|
|
208
|
+
r.classList.toggle("cds--overflow-menu--open", r.open);
|
|
209
|
+
}).observe(r, {
|
|
210
|
+
attributes: !0,
|
|
211
|
+
attributeFilter: ["open"]
|
|
212
|
+
});
|
|
213
|
+
const v = Symbol(), _ = Symbol(), y = [...m].reduce((h, b, T) => (b.hasAttribute("reset-filter") && h.set(v, b), b.hasAttribute("apply-filter") && h.set(_, b), h), /* @__PURE__ */ new Map()), A = () => {
|
|
214
|
+
const h = /* @__PURE__ */ new Map();
|
|
215
|
+
return u.forEach((b) => {
|
|
216
|
+
const T = b.getAttribute("id");
|
|
217
|
+
if (!T || !T.includes(":")) return;
|
|
218
|
+
const [N, O] = T.split(":");
|
|
219
|
+
h.has(N) || h.set(N, []), b.checked && h.get(N).push(O);
|
|
220
|
+
}), h;
|
|
221
|
+
};
|
|
222
|
+
if (y.has(v)) {
|
|
223
|
+
const h = (b) => b.checked = !1;
|
|
224
|
+
t.listen(y.get(v), "click", (b) => {
|
|
225
|
+
b.stopPropagation(), u.forEach(h), d && d.show(), i.fetchData(f).then(() => {
|
|
226
|
+
a && a.setData(i), d && d.hide(), r.open = !1;
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
y.has(_) && t.listen(y.get(_), "click", (h) => {
|
|
231
|
+
h.stopPropagation();
|
|
232
|
+
const b = [...A()].reduce((T, [N, O]) => (T[N] = O === [] ? null : O, T), { offset: 0 });
|
|
233
|
+
d && d.show(), i.fetchData(b).then(() => {
|
|
234
|
+
a && a.setData(i), d && d.hide(), r.open = !1;
|
|
235
|
+
});
|
|
236
|
+
}), t.listen(p, "click", (h) => {
|
|
237
|
+
h.stopPropagation(), r.open = !r.open, r.classList.toggle("cds--overflow-menu--open", r.open);
|
|
238
|
+
});
|
|
239
|
+
}, ft = () => {
|
|
240
|
+
t.listen(a, s.eventPageSizeChanged, (r) => {
|
|
241
|
+
const u = {
|
|
242
|
+
limit: a.pageSize,
|
|
243
|
+
offset: 0
|
|
244
|
+
};
|
|
245
|
+
i.fetchData(u).then(() => {
|
|
246
|
+
a.setData(i);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}, ht = () => {
|
|
250
|
+
let r = null;
|
|
251
|
+
t.listen(a, s.eventChangeCurrent, (p) => {
|
|
252
|
+
const { page: u } = p.detail, m = a.pageSize, f = (u - 1) * m;
|
|
253
|
+
if (f !== r) {
|
|
254
|
+
r = f;
|
|
255
|
+
const v = { limit: m, offset: f };
|
|
256
|
+
i.fetchData(v).then(() => {
|
|
257
|
+
a.setData(i), d && d.hide();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
i && a && (ft(), ht()), i && S && (ut(S), mt(S));
|
|
263
|
+
const H = e.querySelector(o.selectorTableToolbarContent);
|
|
264
|
+
if (H) {
|
|
265
|
+
const r = H.querySelectorAll("cds-popover[data-batch-filter]");
|
|
266
|
+
i && r && r.forEach(gt);
|
|
267
|
+
}
|
|
268
|
+
e.isSelectable && (lt(), dt(), I && pt(I)), i && nt && rt();
|
|
269
|
+
const V = {
|
|
270
|
+
zoo: {
|
|
271
|
+
event: {
|
|
272
|
+
row: {
|
|
273
|
+
click: ot,
|
|
274
|
+
expand: st,
|
|
275
|
+
check: {
|
|
276
|
+
one: at,
|
|
277
|
+
all: it
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
column: {
|
|
281
|
+
sort: ct
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
_t(n).forEach(([r, p]) => {
|
|
287
|
+
It(r, V) && yt(r, V)(p);
|
|
288
|
+
});
|
|
289
|
+
}, Ot = (t) => {
|
|
290
|
+
const e = document.createElement("cds-pagination");
|
|
291
|
+
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) => {
|
|
292
|
+
const o = document.createElement("cds-select-item");
|
|
293
|
+
o.value = n.toString(), o.textContent = n.toString(), e.appendChild(o);
|
|
294
|
+
}), e.setData = (n) => {
|
|
295
|
+
if (n.isPaginated) {
|
|
296
|
+
const { count: o } = Tt(["count"], n.data), s = Math.ceil(o / n.limit), c = 100;
|
|
297
|
+
e.pagesUnknown = s > c, e.totalItems = o, e.pagesUnknown ? e.formatStatusWithIndeterminateTotal = ({ start: i, end: a }) => `${i}–${a} of ${o} item${o <= 1 ? "" : "s"}` : delete e.formatStatusWithIndeterminateTotal;
|
|
298
|
+
}
|
|
299
|
+
}, e;
|
|
300
|
+
}, wt = (t) => {
|
|
301
|
+
if (!t.parentNode) {
|
|
302
|
+
console.error("[Carbon Table] Cannot create skeleton: table has no parent node");
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
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, c = t.hasAttribute("zebra"), i = t.getAttribute("size"), a = document.createElement("cds-table-skeleton");
|
|
306
|
+
a.showHeader = e || n, a.showToolbar = o, a.zebra = c, a.columnCount = s, a.size = i, a.show = () => a.classList.remove("hidden"), a.hide = () => a.classList.add("hidden");
|
|
307
|
+
const d = document.createElement("div");
|
|
308
|
+
return d.classList.add("zoo-datatable-skeleton-wrapper"), t.parentNode.insertBefore(d, t), d.appendChild(a), d.appendChild(t), a;
|
|
309
|
+
}, Mt = (t, e) => {
|
|
310
|
+
const n = e.getAttribute("zoo-url-api"), o = parseInt(e.getAttribute("data-page-size") || 25, 10);
|
|
311
|
+
if (n)
|
|
312
|
+
return new St(t, n, e, {
|
|
313
|
+
urlParams: { limit: o }
|
|
314
|
+
});
|
|
315
|
+
}, Wt = {
|
|
316
|
+
selector: "cds-table",
|
|
317
|
+
/**
|
|
318
|
+
* Initialize a Carbon data table component.
|
|
319
|
+
*
|
|
320
|
+
* Note: The cdsTable parameter is a CDSTable instance from @carbon/web-components.
|
|
321
|
+
* To access the CDSTable class and its static properties/methods, use:
|
|
322
|
+
* const CDSTable = customElements.get('cds-table');
|
|
323
|
+
* // or
|
|
324
|
+
* const CDSTable = cdsTable.constructor;
|
|
325
|
+
*
|
|
326
|
+
* Example - Using static event names:
|
|
327
|
+
* const CDSTable = customElements.get('cds-table');
|
|
328
|
+
* panel.listen(cdsTable, CDSTable.eventBeforeChangeSelection, e => {...});
|
|
329
|
+
*
|
|
330
|
+
* Initialization flow:
|
|
331
|
+
* 1. Extract semantic attributes from table element
|
|
332
|
+
* 2. Check for zoo-url-api attribute to determine if Binder is needed
|
|
333
|
+
* 3. If Binder:
|
|
334
|
+
* - Create Binder instance with configured page size
|
|
335
|
+
* - Create and show skeleton loader
|
|
336
|
+
* - Create pagination component
|
|
337
|
+
* - Fetch initial data
|
|
338
|
+
* - Remove skeleton and configure pagination when data arrives
|
|
339
|
+
* - Set up event handlers after data is loaded (prevents duplicate initial fetch)
|
|
340
|
+
* 4. If no Binder:
|
|
341
|
+
* - Set up event handlers immediately for client-side behavior
|
|
342
|
+
*
|
|
343
|
+
* @param {CDSTable} cdsTable - The CDSTable custom element instance (from @carbon/web-components)
|
|
344
|
+
* @this {Panel} The panel instance
|
|
345
|
+
*/
|
|
346
|
+
init: function(t) {
|
|
347
|
+
const e = l(t), n = this, o = Mt(n, t);
|
|
348
|
+
if (Et(o)) {
|
|
349
|
+
t.dataBinder = o;
|
|
350
|
+
const s = wt(t);
|
|
351
|
+
t.skeleton = s;
|
|
352
|
+
const c = Ot(o);
|
|
353
|
+
t.pagination = c, t.after(c), o.fetchData().then((i) => {
|
|
354
|
+
s.hide(), c.setData(o), $(n, t, e);
|
|
355
|
+
});
|
|
356
|
+
} else
|
|
357
|
+
$(n, t, e);
|
|
358
|
+
}
|
|
359
|
+
}, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
360
|
+
__proto__: null,
|
|
361
|
+
cdsPaginationWrap: Nt,
|
|
362
|
+
cdsTableWrap: Wt
|
|
363
|
+
}, Symbol.toStringTag, { value: "Module" })), Bt = {
|
|
364
|
+
selector: "cds-modal",
|
|
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", (i) => {
|
|
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, (i) => {
|
|
379
|
+
this.dispatchPanelEvent(s, {
|
|
380
|
+
...n,
|
|
381
|
+
action: "closing",
|
|
382
|
+
cancelable: !0
|
|
383
|
+
});
|
|
384
|
+
}), this.listen(t, e.eventClose, (i) => {
|
|
385
|
+
this.dispatchPanelEvent("destroy_me", {
|
|
386
|
+
...n,
|
|
387
|
+
action: "closed",
|
|
388
|
+
triggeredBy: i.detail?.triggeredBy
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
const c = E(t, "primary-event", "event");
|
|
392
|
+
c && this.listen(t, "cds-modal-primary-focus", (i) => {
|
|
393
|
+
this.dispatchPanelEvent(c, {
|
|
394
|
+
...n,
|
|
395
|
+
action: "primary"
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}, zt = {
|
|
400
|
+
selector: "cds-modal-header"
|
|
401
|
+
}, jt = {
|
|
402
|
+
selector: "cds-modal-heading"
|
|
403
|
+
}, xt = {
|
|
404
|
+
selector: "cds-modal-label"
|
|
405
|
+
}, Lt = {
|
|
406
|
+
selector: "cds-modal-close-button"
|
|
407
|
+
}, Ft = {
|
|
408
|
+
selector: "cds-modal-body"
|
|
409
|
+
}, qt = {
|
|
410
|
+
selector: "cds-modal-body-content"
|
|
411
|
+
}, Gt = {
|
|
412
|
+
selector: "cds-modal-footer"
|
|
413
|
+
}, Ut = {
|
|
414
|
+
selector: "cds-modal-footer-button",
|
|
415
|
+
/**
|
|
416
|
+
* @param {CDSModalFooterButton} button - The CDSModal custom element instance
|
|
417
|
+
* @this {Panel} The panel instance
|
|
418
|
+
*/
|
|
419
|
+
init: function(t) {
|
|
420
|
+
const e = l(t);
|
|
421
|
+
if (t.getAttribute("type") === "submit") {
|
|
422
|
+
this.listen(t, "click", (s) => {
|
|
423
|
+
let c = t.closest("form");
|
|
424
|
+
if (!c) {
|
|
425
|
+
const i = t.getAttribute("form");
|
|
426
|
+
i && (c = document.getElementById(i));
|
|
427
|
+
}
|
|
428
|
+
c && c.requestSubmit();
|
|
429
|
+
});
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
const o = e.event;
|
|
433
|
+
o && this.listen(t, "click", (s) => {
|
|
434
|
+
s.stopPropagation(), this.dispatchPanelEvent(o, e);
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}, Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
438
|
+
__proto__: null,
|
|
439
|
+
cdsModalBodyContentWrap: qt,
|
|
440
|
+
cdsModalBodyWrap: Ft,
|
|
441
|
+
cdsModalCloseButWrap: Lt,
|
|
442
|
+
cdsModalFooterButWrap: Ut,
|
|
443
|
+
cdsModalFooterWrap: Gt,
|
|
444
|
+
cdsModalHeaderWrap: zt,
|
|
445
|
+
cdsModalHeadingWrap: jt,
|
|
446
|
+
cdsModalLabelWrap: xt,
|
|
447
|
+
cdsModalWrap: Bt
|
|
448
|
+
}, Symbol.toStringTag, { value: "Module" })), Vt = {
|
|
449
|
+
selector: "cds-menu",
|
|
450
|
+
/**
|
|
451
|
+
* @param {CDSMenu} menu - The CDSMenu custom element instance
|
|
452
|
+
* @this {Panel} The panel instance
|
|
453
|
+
*/
|
|
454
|
+
init: function(t) {
|
|
455
|
+
const e = l(t), n = E(t, "open-event");
|
|
456
|
+
n && this.listen(t, "cds-menu-opened", (s) => {
|
|
457
|
+
this.dispatchPanelEvent(n, {
|
|
458
|
+
...e,
|
|
459
|
+
action: "opened"
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
const o = E(t, "close-event");
|
|
463
|
+
o && this.listen(t, "cds-menu-closed", (s) => {
|
|
464
|
+
this.dispatchPanelEvent(o, {
|
|
465
|
+
...e,
|
|
466
|
+
action: "closed"
|
|
467
|
+
});
|
|
468
|
+
}), this.listen(t, "click", (s) => {
|
|
469
|
+
if (s.target.tagName === "CDS-MENU-ITEM") {
|
|
470
|
+
const c = l(s.target), i = c.event || e.event;
|
|
471
|
+
i && (s.stopPropagation(), this.dispatchPanelEvent(i, {
|
|
472
|
+
...e,
|
|
473
|
+
...c
|
|
474
|
+
}));
|
|
475
|
+
}
|
|
476
|
+
}), this.listen(t, "cds-item-changed", (s) => {
|
|
477
|
+
const c = s.detail.triggeredBy, i = l(c), a = i.event || e.event;
|
|
478
|
+
a && this.dispatchPanelEvent(a, {
|
|
479
|
+
...e,
|
|
480
|
+
...i,
|
|
481
|
+
action: "selection-changed"
|
|
482
|
+
});
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}, Yt = {
|
|
486
|
+
selector: "cds-menu-button",
|
|
487
|
+
/**
|
|
488
|
+
* @param {CDSMenuButton} menuButton - The CDSMenuButton custom element instance
|
|
489
|
+
* @this {Panel} The panel instance
|
|
490
|
+
*/
|
|
491
|
+
init: function(t) {
|
|
492
|
+
const e = l(t), n = t.querySelector("cds-menu");
|
|
493
|
+
n && this.listen(n, "click", (o) => {
|
|
494
|
+
if (o.target.tagName === "CDS-MENU-ITEM") {
|
|
495
|
+
const s = l(o.target), c = s.event || e.event;
|
|
496
|
+
c && (o.stopPropagation(), this.dispatchPanelEvent(c, {
|
|
497
|
+
...e,
|
|
498
|
+
...s
|
|
499
|
+
}));
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}, $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
504
|
+
__proto__: null,
|
|
505
|
+
cdsMenuButtonWrap: Yt,
|
|
506
|
+
cdsMenuWrap: Vt
|
|
507
|
+
}, Symbol.toStringTag, { value: "Module" })), Xt = {
|
|
508
|
+
selector: "cds-button",
|
|
509
|
+
/**
|
|
510
|
+
* @param {CDSButton} button - The CDSButton custom element instance
|
|
511
|
+
* @this {Panel} The panel instance
|
|
512
|
+
*/
|
|
513
|
+
init: function(t) {
|
|
514
|
+
const e = l(t);
|
|
515
|
+
if (t.getAttribute("type") === "submit") {
|
|
516
|
+
this.listen(t, "click", (s) => {
|
|
517
|
+
let c = t.closest("form");
|
|
518
|
+
if (!c) {
|
|
519
|
+
const i = t.getAttribute("form");
|
|
520
|
+
i && (c = document.getElementById(i));
|
|
521
|
+
}
|
|
522
|
+
c && c.requestSubmit();
|
|
523
|
+
});
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
const o = e.event;
|
|
527
|
+
o && this.listen(t, "click", (s) => {
|
|
528
|
+
s.stopPropagation(), this.dispatchPanelEvent(o, l(t));
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}, Zt = {
|
|
532
|
+
selector: "cds-icon-button:not([data-toggle])",
|
|
533
|
+
event: "click",
|
|
534
|
+
getData: (t, e) => e
|
|
535
|
+
}, Jt = {
|
|
536
|
+
selector: "cds-icon-button[data-toggle]",
|
|
537
|
+
/**
|
|
538
|
+
* @param {CDSIconButton} button - The CDSButton custom element instance
|
|
539
|
+
* @this {Panel} The panel instance
|
|
540
|
+
*/
|
|
541
|
+
init: function(t) {
|
|
542
|
+
const e = l(t);
|
|
543
|
+
e.event && this.listen(t, "click", (n) => {
|
|
544
|
+
n.stopPropagation(), t.isSelected = !t.isSelected, this.dispatchPanelEvent(e.event, {
|
|
545
|
+
...e,
|
|
546
|
+
isOn: t.isSelected
|
|
547
|
+
});
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
}, Kt = {
|
|
551
|
+
selector: "cds-button[data-fab]",
|
|
552
|
+
event: "click",
|
|
553
|
+
getData: (t, e) => e
|
|
554
|
+
}, Qt = {
|
|
555
|
+
selector: "cds-copy-button",
|
|
556
|
+
/**
|
|
557
|
+
* @param {CDSCopyButton} button - The CDSCopyButton custom element instance
|
|
558
|
+
* @this {Panel} The panel instance
|
|
559
|
+
*/
|
|
560
|
+
init: function(t) {
|
|
561
|
+
const e = l(t), n = e.event;
|
|
562
|
+
n && this.listen(t, "click", (s) => {
|
|
563
|
+
s.stopPropagation(), this.dispatchPanelEvent(n, {
|
|
564
|
+
...e,
|
|
565
|
+
action: "copy"
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
const o = t.getAttribute("success-event");
|
|
569
|
+
if (o) {
|
|
570
|
+
const s = new MutationObserver(() => {
|
|
571
|
+
t.hasAttribute("feedback-shown") && this.dispatchPanelEvent(o, {
|
|
572
|
+
...e,
|
|
573
|
+
action: "copied"
|
|
574
|
+
});
|
|
575
|
+
});
|
|
576
|
+
s.observe(t, {
|
|
577
|
+
attributes: !0,
|
|
578
|
+
attributeFilter: ["feedback-shown"]
|
|
579
|
+
}), t._copyObserver = s;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}, te = {
|
|
583
|
+
selector: "cds-combo-button",
|
|
584
|
+
/**
|
|
585
|
+
* @param {CDSComboButton} button - The CDSComboButton custom element instance
|
|
586
|
+
* @this {Panel} The panel instance
|
|
587
|
+
*/
|
|
588
|
+
init: function(t) {
|
|
589
|
+
const e = l(t);
|
|
590
|
+
e.event && this.listen(t, "click", (o) => {
|
|
591
|
+
const s = o.composedPath(), c = s.some((a) => a.tagName === "CDS-MENU-ITEM"), i = s.some((a) => a.tagName === "CDS-ICON-BUTTON");
|
|
592
|
+
!c && !i && (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), c = s.event || E(t, "menu-event", "event");
|
|
601
|
+
c && this.dispatchPanelEvent(c, {
|
|
602
|
+
...e,
|
|
603
|
+
...s,
|
|
604
|
+
action: "menu-item"
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
}, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
610
|
+
__proto__: null,
|
|
611
|
+
cdsButFabWrap: Kt,
|
|
612
|
+
cdsButtonWrap: Xt,
|
|
613
|
+
cdsComboButWrap: te,
|
|
614
|
+
cdsCopyButWrap: Qt,
|
|
615
|
+
cdsIconButToggleWrap: Jt,
|
|
616
|
+
cdsIconButWrap: Zt
|
|
617
|
+
}, Symbol.toStringTag, { value: "Module" })), ne = {
|
|
618
|
+
selector: "cds-dropdown",
|
|
619
|
+
/**
|
|
620
|
+
* @param {CDSDropdown} dropdown - The CDSDropdown custom element instance
|
|
621
|
+
* @this {Panel} The panel instance
|
|
622
|
+
*/
|
|
623
|
+
init: function(t) {
|
|
624
|
+
const e = customElements.get("cds-dropdown"), n = l(t), o = n.event;
|
|
625
|
+
o && this.listen(t, e.eventSelect, (c) => {
|
|
626
|
+
this.dispatchPanelEvent(o, {
|
|
627
|
+
...n,
|
|
628
|
+
value: t.value,
|
|
629
|
+
selectedValue: c.detail?.item?.value,
|
|
630
|
+
selectedText: c.detail?.item?.textContent?.trim()
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
const s = t.getAttribute("toggle-event");
|
|
634
|
+
s && this.listen(t, e.eventToggle, (c) => {
|
|
635
|
+
this.dispatchPanelEvent(s, {
|
|
636
|
+
...n,
|
|
637
|
+
open: t.hasAttribute("open")
|
|
638
|
+
});
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
}, oe = {
|
|
642
|
+
selector: "cds-combo-box",
|
|
643
|
+
/**
|
|
644
|
+
* @param {CDSComboBox} comboBox - The CDSComboBox custom element instance
|
|
645
|
+
* @this {Panel} The panel instance
|
|
646
|
+
*/
|
|
647
|
+
init: function(t) {
|
|
648
|
+
const e = customElements.get("cds-combo-box"), n = l(t), o = n.event;
|
|
649
|
+
o && this.listen(t, e.eventSelect, (c) => {
|
|
650
|
+
const i = c.detail?.item;
|
|
651
|
+
this.dispatchPanelEvent(o, {
|
|
652
|
+
...n,
|
|
653
|
+
value: t.value,
|
|
654
|
+
selectedValue: i?.value,
|
|
655
|
+
selectedText: i?.textContent?.trim()
|
|
656
|
+
});
|
|
657
|
+
});
|
|
658
|
+
const s = t.getAttribute("toggle-event");
|
|
659
|
+
s && this.listen(t, e.eventToggle, (c) => {
|
|
660
|
+
this.dispatchPanelEvent(s, {
|
|
661
|
+
...n,
|
|
662
|
+
open: t.hasAttribute("open")
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
}, se = {
|
|
667
|
+
selector: "cds-multi-select",
|
|
668
|
+
/**
|
|
669
|
+
* @param {CDSMultiSelect} multiSelect - The CDSMultiSelect custom element instance
|
|
670
|
+
* @this {Panel} The panel instance
|
|
671
|
+
*/
|
|
672
|
+
init: function(t) {
|
|
673
|
+
const e = customElements.get("cds-multi-select"), n = l(t), o = n.event;
|
|
674
|
+
o && this.listen(t, e.eventSelect, (c) => {
|
|
675
|
+
const i = t.value ? t.value.split(",") : [];
|
|
676
|
+
this.dispatchPanelEvent(o, {
|
|
677
|
+
...n,
|
|
678
|
+
selectedItems: i
|
|
679
|
+
});
|
|
680
|
+
});
|
|
681
|
+
const s = t.getAttribute("toggle-event");
|
|
682
|
+
s && this.listen(t, e.eventToggle, (c) => {
|
|
683
|
+
this.dispatchPanelEvent(s, {
|
|
684
|
+
...n,
|
|
685
|
+
open: t.hasAttribute("open")
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
}, ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
690
|
+
__proto__: null,
|
|
691
|
+
cdsComboBoxWrap: oe,
|
|
692
|
+
cdsDropdownWrap: ne,
|
|
693
|
+
cdsMultiSelectWrap: se
|
|
694
|
+
}, Symbol.toStringTag, { value: "Module" })), ie = {
|
|
695
|
+
selector: "cds-date-picker",
|
|
696
|
+
/**
|
|
697
|
+
* @param {CDSDatePicker} datePicker - The CDSDatePicker custom element instance
|
|
698
|
+
* @this {Panel} The panel instance
|
|
699
|
+
*/
|
|
700
|
+
init: function(t) {
|
|
701
|
+
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"]'), c = o && s, i = n.event;
|
|
702
|
+
i && this.listen(t, e.eventChange, (d) => {
|
|
703
|
+
let S;
|
|
704
|
+
c ? S = {
|
|
705
|
+
from: o.value || "",
|
|
706
|
+
to: s.value || ""
|
|
707
|
+
} : S = t.value, this.dispatchPanelEvent(i, {
|
|
708
|
+
...n,
|
|
709
|
+
value: S
|
|
710
|
+
});
|
|
711
|
+
});
|
|
712
|
+
const a = t.getAttribute("error-event");
|
|
713
|
+
a && this.listen(t, e.eventFlatpickrError, (d) => {
|
|
714
|
+
this.dispatchPanelEvent(a, {
|
|
715
|
+
...n,
|
|
716
|
+
error: d.detail
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
}, ae = {
|
|
721
|
+
selector: "cds-time-picker",
|
|
722
|
+
event: "cds-time-picker-changed",
|
|
723
|
+
getData: (t, e, n) => ({
|
|
724
|
+
...e,
|
|
725
|
+
value: n.value
|
|
726
|
+
})
|
|
727
|
+
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
728
|
+
__proto__: null,
|
|
729
|
+
cdsDatePickerWrap: ie,
|
|
730
|
+
cdsTimePickerWrap: ae
|
|
731
|
+
}, Symbol.toStringTag, { value: "Module" })), le = {
|
|
732
|
+
selector: "cds-file-uploader",
|
|
733
|
+
/**
|
|
734
|
+
* @param {CDSFileUploader} uploader - The CDSFileUploader custom element instance
|
|
735
|
+
* @this {Panel} The panel instance
|
|
736
|
+
*/
|
|
737
|
+
init: function(t) {
|
|
738
|
+
const e = l(t), n = e.event;
|
|
739
|
+
if (n) {
|
|
740
|
+
const s = t.querySelector('input[type="file"]');
|
|
741
|
+
s && this.listen(s, "change", (c) => {
|
|
742
|
+
this.dispatchPanelEvent(n, {
|
|
743
|
+
...e,
|
|
744
|
+
files: Array.from(c.target.files || [])
|
|
745
|
+
});
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
const o = t.getAttribute("delete-event");
|
|
749
|
+
o && this.listen(t, "cds-file-uploader-item-deleted", (s) => {
|
|
750
|
+
this.dispatchPanelEvent(o, {
|
|
751
|
+
...e,
|
|
752
|
+
fileName: s.detail?.fileName,
|
|
753
|
+
fileId: s.detail?.fileId
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
}, de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
758
|
+
__proto__: null,
|
|
759
|
+
cdsFileUploaderWrap: le
|
|
760
|
+
}, Symbol.toStringTag, { value: "Module" })), pe = {
|
|
761
|
+
selector: "cds-tabs",
|
|
762
|
+
/**
|
|
763
|
+
* @param {CDSTabs} tabs - The CDSTabs custom element instance
|
|
764
|
+
* @this {Panel} The panel instance
|
|
765
|
+
*/
|
|
766
|
+
init: function(t) {
|
|
767
|
+
const e = customElements.get("cds-tabs"), n = l(t), o = t.getAttribute("before-select-event");
|
|
768
|
+
o && this.listen(t, e.eventBeforeSelect, (c) => {
|
|
769
|
+
this.dispatchPanelEvent(o, {
|
|
770
|
+
...n,
|
|
771
|
+
tabValue: c.detail.value,
|
|
772
|
+
cancelable: !0
|
|
773
|
+
});
|
|
774
|
+
});
|
|
775
|
+
const s = n.event;
|
|
776
|
+
s && this.listen(t, e.eventSelect, (c) => {
|
|
777
|
+
const i = c.detail.item, a = l(i);
|
|
778
|
+
this.dispatchPanelEvent(s, {
|
|
779
|
+
...n,
|
|
780
|
+
...a,
|
|
781
|
+
tabValue: c.detail.value
|
|
782
|
+
});
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
}, ue = {
|
|
786
|
+
selector: "cds-accordion",
|
|
787
|
+
/**
|
|
788
|
+
* @param {CDSAccordion} accordion - The CDSAccordion custom element instance
|
|
789
|
+
* @this {Panel} The panel instance
|
|
790
|
+
*/
|
|
791
|
+
init: function(t) {
|
|
792
|
+
const e = customElements.get("cds-accordion-item"), n = l(t);
|
|
793
|
+
[...t.querySelectorAll("cds-accordion-item")].forEach((s) => {
|
|
794
|
+
const c = l(s), i = c.event || n.event;
|
|
795
|
+
i && this.listen(s, e.eventToggle, (a) => {
|
|
796
|
+
this.dispatchPanelEvent(i, {
|
|
797
|
+
...n,
|
|
798
|
+
...c,
|
|
799
|
+
open: a.detail.open
|
|
800
|
+
});
|
|
801
|
+
});
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
}, me = {
|
|
805
|
+
selector: "cds-content-switcher",
|
|
806
|
+
/**
|
|
807
|
+
* @param {CDSContentSwitcher} switcher - The CDSContentSwitcher custom element instance
|
|
808
|
+
* @this {Panel} The panel instance
|
|
809
|
+
*/
|
|
810
|
+
init: function(t) {
|
|
811
|
+
const e = customElements.get("cds-content-switcher"), n = l(t), o = t.getAttribute("before-select-event");
|
|
812
|
+
o && this.listen(t, e.eventBeforeSelect, (c) => {
|
|
813
|
+
this.dispatchPanelEvent(o, {
|
|
814
|
+
...n,
|
|
815
|
+
value: c.detail.value,
|
|
816
|
+
cancelable: !0
|
|
817
|
+
});
|
|
818
|
+
});
|
|
819
|
+
const s = n.event;
|
|
820
|
+
s && this.listen(t, e.eventSelect, (c) => {
|
|
821
|
+
const i = c.detail.item, a = l(i);
|
|
822
|
+
this.dispatchPanelEvent(s, {
|
|
823
|
+
...n,
|
|
824
|
+
...a,
|
|
825
|
+
value: i.getAttribute("value")
|
|
826
|
+
});
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
}, ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
830
|
+
__proto__: null,
|
|
831
|
+
cdsAccordionWrap: ue,
|
|
832
|
+
cdsContentSwitcherWrap: me,
|
|
833
|
+
cdsTabsWrap: pe
|
|
834
|
+
}, Symbol.toStringTag, { value: "Module" })), fe = {
|
|
835
|
+
selector: "cds-breadcrumb-item"
|
|
836
|
+
}, he = {
|
|
837
|
+
selector: "cds-breadcrumb-link",
|
|
838
|
+
event: "click",
|
|
839
|
+
getData: (t, e, n) => (t.preventDefault(), {
|
|
840
|
+
...e,
|
|
841
|
+
href: n.getAttribute("href")
|
|
842
|
+
})
|
|
843
|
+
}, ve = {
|
|
844
|
+
selector: "cds-breadcrumb",
|
|
845
|
+
/**
|
|
846
|
+
* @param {CDSBreadcrumb} breadcrumb - The CDSBreadcrumb custom element instance
|
|
847
|
+
* @this {Panel} The panel instance
|
|
848
|
+
*/
|
|
849
|
+
init: function(t) {
|
|
850
|
+
const e = this, n = l(t), o = n.event;
|
|
851
|
+
if (o) {
|
|
852
|
+
const s = (i) => {
|
|
853
|
+
e.dispatchPanelEvent(o, {
|
|
854
|
+
...n,
|
|
855
|
+
...i
|
|
856
|
+
});
|
|
857
|
+
};
|
|
858
|
+
e.listen(t, "click", (i) => {
|
|
859
|
+
const a = i.target.closest("cds-breadcrumb-link");
|
|
860
|
+
if (a) {
|
|
861
|
+
i.preventDefault(), i.stopPropagation();
|
|
862
|
+
const d = l(a);
|
|
863
|
+
s(d);
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
const c = t.querySelector("cds-overflow-menu-body");
|
|
867
|
+
c && e.listen(c, "cds-overflow-menu-item-clicked", (i) => {
|
|
868
|
+
i.stopPropagation();
|
|
869
|
+
const a = l(i.target);
|
|
870
|
+
s(a);
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
875
|
+
__proto__: null,
|
|
876
|
+
cdsBreadCrumbWrap: ve,
|
|
877
|
+
cdsBreadcrumbItemWrap: fe,
|
|
878
|
+
cdsBreadcrumbLinkWrap: he
|
|
879
|
+
}, Symbol.toStringTag, { value: "Module" })), Ee = {
|
|
880
|
+
selector: "cds-text-input",
|
|
881
|
+
multiEvent: !0,
|
|
882
|
+
events: [
|
|
883
|
+
{
|
|
884
|
+
type: "input",
|
|
885
|
+
attrName: "event",
|
|
886
|
+
getData: (t, e) => ({
|
|
887
|
+
...e,
|
|
888
|
+
value: t.currentTarget.value
|
|
889
|
+
})
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
type: "change",
|
|
893
|
+
attrName: "change-event",
|
|
894
|
+
getData: (t, e) => ({
|
|
895
|
+
...e,
|
|
896
|
+
value: t.currentTarget.value
|
|
897
|
+
})
|
|
898
|
+
}
|
|
899
|
+
]
|
|
900
|
+
}, Se = {
|
|
901
|
+
selector: "cds-textarea",
|
|
902
|
+
multiEvent: !0,
|
|
903
|
+
events: [
|
|
904
|
+
{
|
|
905
|
+
type: "input",
|
|
906
|
+
attrName: "event",
|
|
907
|
+
getData: (t, e) => ({
|
|
908
|
+
...e,
|
|
909
|
+
value: t.currentTarget.value
|
|
910
|
+
})
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
type: "change",
|
|
914
|
+
attrName: "change-event",
|
|
915
|
+
getData: (t, e) => ({
|
|
916
|
+
...e,
|
|
917
|
+
value: t.currentTarget.value
|
|
918
|
+
})
|
|
919
|
+
}
|
|
920
|
+
]
|
|
921
|
+
}, _e = {
|
|
922
|
+
selector: "cds-number-input",
|
|
923
|
+
event: "cds-number-input",
|
|
924
|
+
getData: (t, e, n) => ({
|
|
925
|
+
...e,
|
|
926
|
+
value: t.detail.value,
|
|
927
|
+
direction: t.detail.direction
|
|
928
|
+
// 'up' or 'down' when using steppers
|
|
929
|
+
})
|
|
930
|
+
}, Ie = {
|
|
931
|
+
selector: "cds-password-input",
|
|
932
|
+
multiEvent: !0,
|
|
933
|
+
events: [
|
|
934
|
+
{
|
|
935
|
+
type: "input",
|
|
936
|
+
attrName: "event",
|
|
937
|
+
getData: (t, e) => ({
|
|
938
|
+
...e,
|
|
939
|
+
value: t.currentTarget.value
|
|
940
|
+
})
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
type: "change",
|
|
944
|
+
attrName: "change-event",
|
|
945
|
+
getData: (t, e) => ({
|
|
946
|
+
...e,
|
|
947
|
+
value: t.currentTarget.value
|
|
948
|
+
})
|
|
949
|
+
}
|
|
950
|
+
]
|
|
951
|
+
}, ye = {
|
|
952
|
+
selector: "cds-search",
|
|
953
|
+
event: "cds-search-input",
|
|
954
|
+
getData: (t, e, n) => ({
|
|
955
|
+
...e,
|
|
956
|
+
value: n.value
|
|
957
|
+
})
|
|
958
|
+
}, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
959
|
+
__proto__: null,
|
|
960
|
+
cdsNumberInputWrap: _e,
|
|
961
|
+
cdsPasswordInputWrap: Ie,
|
|
962
|
+
cdsSearchWrap: ye,
|
|
963
|
+
cdsTextAreaWrap: Se,
|
|
964
|
+
cdsTextInputWrap: Ee
|
|
965
|
+
}, Symbol.toStringTag, { value: "Module" })), Pe = {
|
|
966
|
+
selector: "cds-checkbox",
|
|
967
|
+
event: "cds-checkbox-changed",
|
|
968
|
+
getData: (t, e, n) => ({
|
|
969
|
+
...e,
|
|
970
|
+
checked: t.detail.checked,
|
|
971
|
+
value: n.value
|
|
972
|
+
})
|
|
973
|
+
}, Ae = {
|
|
974
|
+
selector: "cds-radio-button-group",
|
|
975
|
+
event: "cds-radio-button-group-changed",
|
|
976
|
+
getData: (t, e) => ({
|
|
977
|
+
...e,
|
|
978
|
+
value: t.detail?.value
|
|
979
|
+
})
|
|
980
|
+
}, Te = {
|
|
981
|
+
selector: "cds-toggle",
|
|
982
|
+
event: "cds-toggle-changed",
|
|
983
|
+
getData: (t, e) => ({
|
|
984
|
+
...e,
|
|
985
|
+
isOn: t.detail.checked,
|
|
986
|
+
value: t.detail.checked
|
|
987
|
+
})
|
|
988
|
+
}, De = {
|
|
989
|
+
selector: "cds-select",
|
|
990
|
+
event: "cds-select-selected",
|
|
991
|
+
getData: (t, e) => ({
|
|
992
|
+
...e,
|
|
993
|
+
value: t.detail.value
|
|
994
|
+
})
|
|
995
|
+
}, ke = {
|
|
996
|
+
selector: "cds-slider",
|
|
997
|
+
/**
|
|
998
|
+
* @param {CDSSlider} slider - The CDSSlider custom element instance
|
|
999
|
+
* @this {Panel} The panel instance
|
|
1000
|
+
*/
|
|
1001
|
+
init: function(t) {
|
|
1002
|
+
const e = l(t), n = e.event;
|
|
1003
|
+
n && this.listen(t, "cds-slider-changed", (s) => {
|
|
1004
|
+
this.dispatchPanelEvent(n, {
|
|
1005
|
+
...e,
|
|
1006
|
+
value: s.detail.value
|
|
1007
|
+
});
|
|
1008
|
+
});
|
|
1009
|
+
const o = t.getAttribute("input-event");
|
|
1010
|
+
o && this.listen(t, "cds-slider-input-changed", (s) => {
|
|
1011
|
+
this.dispatchPanelEvent(o, {
|
|
1012
|
+
...e,
|
|
1013
|
+
value: s.detail.value
|
|
1014
|
+
});
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
}, Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1018
|
+
__proto__: null,
|
|
1019
|
+
cdsCheckboxWrap: Pe,
|
|
1020
|
+
cdsRadioButGroupWrap: Ae,
|
|
1021
|
+
cdsSelectWrap: De,
|
|
1022
|
+
cdsSliderWrap: ke,
|
|
1023
|
+
cdsToggleWrap: Te
|
|
1024
|
+
}, Symbol.toStringTag, { value: "Module" })), Oe = {
|
|
1025
|
+
selector: "cds-tag",
|
|
1026
|
+
event: "click",
|
|
1027
|
+
getData: (t, e) => e
|
|
1028
|
+
}, we = {
|
|
1029
|
+
selector: "cds-dismissible-tag",
|
|
1030
|
+
/**
|
|
1031
|
+
* @param {CDSDismissibleTag} tag - The CDSDismissibleTag custom element instance
|
|
1032
|
+
* @this {Panel} The panel instance
|
|
1033
|
+
*/
|
|
1034
|
+
init: function(t) {
|
|
1035
|
+
const e = l(t), n = t.getAttribute("click-event");
|
|
1036
|
+
n && this.listen(t, "click", (s) => {
|
|
1037
|
+
s.target.closest("button") || this.dispatchPanelEvent(n, {
|
|
1038
|
+
...e
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
const o = e.event;
|
|
1042
|
+
o && this.listen(t, "cds-dismissible-tag-closed", (s) => {
|
|
1043
|
+
this.dispatchPanelEvent(o, {
|
|
1044
|
+
...e,
|
|
1045
|
+
action: "closed"
|
|
1046
|
+
});
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
}, Me = {
|
|
1050
|
+
selector: "cds-filter-tag",
|
|
1051
|
+
event: "cds-filter-tag-closed",
|
|
1052
|
+
getData: (t, e) => ({
|
|
1053
|
+
...e,
|
|
1054
|
+
action: "remove"
|
|
1055
|
+
})
|
|
1056
|
+
}, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1057
|
+
__proto__: null,
|
|
1058
|
+
cdsFilterTagWrap: Me,
|
|
1059
|
+
cdsSDismissibleTagWrap: we,
|
|
1060
|
+
cdsTagsWrap: Oe
|
|
1061
|
+
}, Symbol.toStringTag, { value: "Module" })), Re = {
|
|
1062
|
+
selector: "cds-overflow-menu",
|
|
1063
|
+
/**
|
|
1064
|
+
* @param {CDSOverflowMenu} overflowMenu - The CDSOverflowMenu custom element instance
|
|
1065
|
+
* @this {Panel} The panel instance
|
|
1066
|
+
*/
|
|
1067
|
+
init: function(t) {
|
|
1068
|
+
const e = l(t), n = e.event, o = t.querySelector("cds-overflow-menu-body");
|
|
1069
|
+
n && o && this.listen(o, "cds-overflow-menu-item-clicked", (s) => {
|
|
1070
|
+
s.stopPropagation();
|
|
1071
|
+
const c = l(s.target);
|
|
1072
|
+
this.dispatchPanelEvent(n, {
|
|
1073
|
+
...e,
|
|
1074
|
+
...c
|
|
1075
|
+
});
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
}, Be = {
|
|
1079
|
+
selector: "cds-structured-list",
|
|
1080
|
+
/**
|
|
1081
|
+
* @param {CDSStructuredList} list - The CDSStructuredList custom element instance
|
|
1082
|
+
* @this {Panel} The panel instance
|
|
1083
|
+
*/
|
|
1084
|
+
init: function(t) {
|
|
1085
|
+
const e = l(t);
|
|
1086
|
+
[...t.querySelectorAll("cds-structured-list-row")].forEach((o) => {
|
|
1087
|
+
const s = l(o), c = s.event || e.event;
|
|
1088
|
+
c && this.listen(o, "click", (i) => {
|
|
1089
|
+
i.stopPropagation(), this.dispatchPanelEvent(c, {
|
|
1090
|
+
...e,
|
|
1091
|
+
...s
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
}), t.hasAttribute("selection") && this.listen(t, "cds-structured-list-selected", (o) => {
|
|
1095
|
+
const s = o.detail.row, c = l(s), i = e.event;
|
|
1096
|
+
i && this.dispatchPanelEvent(i, {
|
|
1097
|
+
...e,
|
|
1098
|
+
...c
|
|
1099
|
+
});
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
}, ze = {
|
|
1103
|
+
selector: "cds-tree-view",
|
|
1104
|
+
/**
|
|
1105
|
+
* @param {CDSTreeView} tree - The CDSTreeView custom element instance
|
|
1106
|
+
* @this {Panel} The panel instance
|
|
1107
|
+
*/
|
|
1108
|
+
init: function(t) {
|
|
1109
|
+
const e = l(t);
|
|
1110
|
+
this.listen(t, "cds-tree-node-selected", (o) => {
|
|
1111
|
+
const s = o.detail.node, c = l(s), i = c.event || e.event;
|
|
1112
|
+
i && this.dispatchPanelEvent(i, {
|
|
1113
|
+
...e,
|
|
1114
|
+
...c,
|
|
1115
|
+
nodeId: s.id,
|
|
1116
|
+
label: s.getAttribute("label")
|
|
1117
|
+
});
|
|
1118
|
+
});
|
|
1119
|
+
const n = E(t, "expand-event");
|
|
1120
|
+
n && this.listen(t, "cds-tree-node-expanded", (o) => {
|
|
1121
|
+
this.dispatchPanelEvent(n, {
|
|
1122
|
+
...e,
|
|
1123
|
+
nodeId: o.detail.node.id,
|
|
1124
|
+
expanded: o.detail.expanded
|
|
1125
|
+
});
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
}, je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1129
|
+
__proto__: null,
|
|
1130
|
+
cdsOverflowMenuWrap: Re,
|
|
1131
|
+
cdsStructuredListWrap: Be,
|
|
1132
|
+
cdsTreeViewWrap: ze
|
|
1133
|
+
}, Symbol.toStringTag, { value: "Module" })), xe = {
|
|
1134
|
+
selector: "cds-toast-notification",
|
|
1135
|
+
event: "cds-notification-closed",
|
|
1136
|
+
getData: (t, e) => ({
|
|
1137
|
+
...e,
|
|
1138
|
+
action: "closed"
|
|
1139
|
+
})
|
|
1140
|
+
}, Le = {
|
|
1141
|
+
selector: "cds-inline-notification",
|
|
1142
|
+
event: "cds-notification-closed",
|
|
1143
|
+
getData: (t, e) => ({
|
|
1144
|
+
...e,
|
|
1145
|
+
action: "closed"
|
|
1146
|
+
})
|
|
1147
|
+
}, Fe = {
|
|
1148
|
+
selector: "cds-actionable-notification",
|
|
1149
|
+
/**
|
|
1150
|
+
* @param {CDSActionableNotification} notification - The CDSActionableNotification custom element instance
|
|
1151
|
+
* @this {Panel} The panel instance
|
|
1152
|
+
*/
|
|
1153
|
+
init: function(t) {
|
|
1154
|
+
const e = l(t), n = E(t, "close-event", "event");
|
|
1155
|
+
n && this.listen(t, "cds-notification-closed", (s) => {
|
|
1156
|
+
this.dispatchPanelEvent(n, {
|
|
1157
|
+
...e,
|
|
1158
|
+
action: "closed"
|
|
1159
|
+
});
|
|
1160
|
+
});
|
|
1161
|
+
const o = E(t, "action-event");
|
|
1162
|
+
o && this.listen(t, "cds-notification-actioned", (s) => {
|
|
1163
|
+
this.dispatchPanelEvent(o, {
|
|
1164
|
+
...e,
|
|
1165
|
+
action: "actioned"
|
|
1166
|
+
});
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
}, qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1170
|
+
__proto__: null,
|
|
1171
|
+
cdsActionableNotificationWrap: Fe,
|
|
1172
|
+
cdsInlineNotificationWrap: Le,
|
|
1173
|
+
cdsToastNotificationWrap: xe
|
|
1174
|
+
}, Symbol.toStringTag, { value: "Module" })), Ge = {
|
|
1175
|
+
selector: "cds-clickable-tile",
|
|
1176
|
+
event: "click",
|
|
1177
|
+
getData: (t, e) => ({
|
|
1178
|
+
...e,
|
|
1179
|
+
href: t.currentTarget.getAttribute("href")
|
|
1180
|
+
})
|
|
1181
|
+
}, Ue = {
|
|
1182
|
+
selector: "cds-expandable-tile",
|
|
1183
|
+
/**
|
|
1184
|
+
* @param {CDSExpandableTile} tile - The CDSExpandableTile custom element instance
|
|
1185
|
+
* @this {Panel} The panel instance
|
|
1186
|
+
*/
|
|
1187
|
+
init: function(t) {
|
|
1188
|
+
const e = l(t), n = t.getAttribute("before-toggle-event");
|
|
1189
|
+
n && this.listen(t, "cds-expandable-tile-beingtoggled", (s) => {
|
|
1190
|
+
this.dispatchPanelEvent(n, {
|
|
1191
|
+
...e,
|
|
1192
|
+
expanded: s.detail.expanded,
|
|
1193
|
+
cancelable: !0
|
|
1194
|
+
});
|
|
1195
|
+
});
|
|
1196
|
+
const o = e.event;
|
|
1197
|
+
o && this.listen(t, "cds-expandable-tile-toggled", (s) => {
|
|
1198
|
+
this.dispatchPanelEvent(o, {
|
|
1199
|
+
...e,
|
|
1200
|
+
expanded: s.detail.expanded
|
|
1201
|
+
});
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
}, He = {
|
|
1205
|
+
selector: "cds-selectable-tile",
|
|
1206
|
+
event: "cds-selectable-tile-changed",
|
|
1207
|
+
getData: (t, e, n) => ({
|
|
1208
|
+
...e,
|
|
1209
|
+
selected: t.detail.selected,
|
|
1210
|
+
value: n.value
|
|
1211
|
+
})
|
|
1212
|
+
}, Ve = {
|
|
1213
|
+
selector: "cds-radio-tile",
|
|
1214
|
+
event: "cds-selectable-tile-changed",
|
|
1215
|
+
getData: (t, e, n) => ({
|
|
1216
|
+
...e,
|
|
1217
|
+
selected: t.detail.selected,
|
|
1218
|
+
value: n.value
|
|
1219
|
+
})
|
|
1220
|
+
}, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1221
|
+
__proto__: null,
|
|
1222
|
+
cdsClickableTileWrap: Ge,
|
|
1223
|
+
cdsExpandableTileWrap: Ue,
|
|
1224
|
+
cdsRadioTileWrap: Ve,
|
|
1225
|
+
cdsSelectableTileWrap: He
|
|
1226
|
+
}, Symbol.toStringTag, { value: "Module" })), $e = {
|
|
1227
|
+
selector: "cds-progress-bar",
|
|
1228
|
+
/**
|
|
1229
|
+
* @param {CDSProgressBar} progressBar - The CDSProgressBar custom element instance
|
|
1230
|
+
* @this {Panel} The panel instance
|
|
1231
|
+
*/
|
|
1232
|
+
init: function(t) {
|
|
1233
|
+
const e = l(t);
|
|
1234
|
+
if (e.event) {
|
|
1235
|
+
const n = new MutationObserver(() => {
|
|
1236
|
+
const o = parseFloat(t.getAttribute("value") || "0"), s = parseFloat(t.getAttribute("max") || "100");
|
|
1237
|
+
o >= s && this.dispatchPanelEvent(e.event, {
|
|
1238
|
+
...e,
|
|
1239
|
+
value: o,
|
|
1240
|
+
status: "complete"
|
|
1241
|
+
});
|
|
1242
|
+
});
|
|
1243
|
+
n.observe(t, {
|
|
1244
|
+
attributes: !0,
|
|
1245
|
+
attributeFilter: ["value"]
|
|
1246
|
+
}), t._progressObserver = n;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
}, Xe = {
|
|
1250
|
+
selector: "cds-progress-indicator",
|
|
1251
|
+
/**
|
|
1252
|
+
* @param {CDSProgressIndicator} indicator - The CDSProgressIndicator custom element instance
|
|
1253
|
+
* @this {Panel} The panel instance
|
|
1254
|
+
*/
|
|
1255
|
+
init: function(t) {
|
|
1256
|
+
const e = l(t);
|
|
1257
|
+
this.listen(t, "cds-progress-step-click", (n) => {
|
|
1258
|
+
const o = n.target, s = l(o), c = s.event || e.event;
|
|
1259
|
+
c && this.dispatchPanelEvent(c, {
|
|
1260
|
+
...e,
|
|
1261
|
+
...s,
|
|
1262
|
+
stepIndex: o.getAttribute("data-index"),
|
|
1263
|
+
stepLabel: o.getAttribute("label")
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
}, Ze = {
|
|
1268
|
+
selector: "cds-inline-loading",
|
|
1269
|
+
/**
|
|
1270
|
+
* @param {CDSInlineLoading} inlineLoading - The CDSInlineLoading custom element instance
|
|
1271
|
+
* @this {Panel} The panel instance
|
|
1272
|
+
*/
|
|
1273
|
+
init: function(t) {
|
|
1274
|
+
const e = l(t), n = e.event;
|
|
1275
|
+
n && this.listen(t, "cds-inline-loading-onsuccess", (s) => {
|
|
1276
|
+
this.dispatchPanelEvent(n, {
|
|
1277
|
+
...e,
|
|
1278
|
+
status: "finished"
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
1281
|
+
const o = t.getAttribute("status-event");
|
|
1282
|
+
if (o) {
|
|
1283
|
+
const s = new MutationObserver((c) => {
|
|
1284
|
+
c.forEach((i) => {
|
|
1285
|
+
if (i.attributeName === "status") {
|
|
1286
|
+
const a = t.getAttribute("status");
|
|
1287
|
+
this.dispatchPanelEvent(o, {
|
|
1288
|
+
...e,
|
|
1289
|
+
status: a
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
});
|
|
1294
|
+
s.observe(t, {
|
|
1295
|
+
attributes: !0,
|
|
1296
|
+
attributeFilter: ["status"]
|
|
1297
|
+
}), t._statusObserver = s;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}, Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1301
|
+
__proto__: null,
|
|
1302
|
+
cdsInlineLoadingWrap: Ze,
|
|
1303
|
+
cdsProgressBarWrap: $e,
|
|
1304
|
+
cdsProgressIndicatorWrap: Xe
|
|
1305
|
+
}, Symbol.toStringTag, { value: "Module" })), Ke = {
|
|
1306
|
+
selector: "cds-tooltip",
|
|
1307
|
+
/**
|
|
1308
|
+
* @param {CDSTooltip} tooltip - The CDSTooltip custom element instance
|
|
1309
|
+
* @this {Panel} The panel instance
|
|
1310
|
+
*/
|
|
1311
|
+
init: function(t) {
|
|
1312
|
+
const e = l(t), n = E(t, "open-event");
|
|
1313
|
+
n && this.listen(t, "cds-tooltip-beingopened", (s) => {
|
|
1314
|
+
this.dispatchPanelEvent(n, {
|
|
1315
|
+
...e,
|
|
1316
|
+
action: "opened"
|
|
1317
|
+
});
|
|
1318
|
+
});
|
|
1319
|
+
const o = E(t, "close-event");
|
|
1320
|
+
o && this.listen(t, "cds-tooltip-closed", (s) => {
|
|
1321
|
+
this.dispatchPanelEvent(o, {
|
|
1322
|
+
...e,
|
|
1323
|
+
action: "closed"
|
|
1324
|
+
});
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
}, Qe = {
|
|
1328
|
+
selector: "cds-popover",
|
|
1329
|
+
/**
|
|
1330
|
+
* @param {CDSPopover} popover - The CDSPopover custom element instance
|
|
1331
|
+
* @this {Panel} The panel instance
|
|
1332
|
+
*/
|
|
1333
|
+
init: function(t) {
|
|
1334
|
+
const e = l(t), n = E(t, "open-event");
|
|
1335
|
+
n && this.listen(t, "cds-popover-beingopened", (s) => {
|
|
1336
|
+
this.dispatchPanelEvent(n, {
|
|
1337
|
+
...e,
|
|
1338
|
+
action: "opened"
|
|
1339
|
+
});
|
|
1340
|
+
});
|
|
1341
|
+
const o = E(t, "close-event");
|
|
1342
|
+
o && this.listen(t, "cds-popover-closed", (s) => {
|
|
1343
|
+
this.dispatchPanelEvent(o, {
|
|
1344
|
+
...e,
|
|
1345
|
+
action: "closed"
|
|
1346
|
+
});
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
}, tn = {
|
|
1350
|
+
selector: "cds-toggletip",
|
|
1351
|
+
/**
|
|
1352
|
+
* @param {CDSToggletip} toggletip - The CDSToggletip custom element instance
|
|
1353
|
+
* @this {Panel} The panel instance
|
|
1354
|
+
*/
|
|
1355
|
+
init: function(t) {
|
|
1356
|
+
const e = l(t);
|
|
1357
|
+
if (e.event) {
|
|
1358
|
+
const n = new MutationObserver((o) => {
|
|
1359
|
+
o.forEach((s) => {
|
|
1360
|
+
if (s.attributeName === "open") {
|
|
1361
|
+
const c = t.hasAttribute("open");
|
|
1362
|
+
this.dispatchPanelEvent(e.event, {
|
|
1363
|
+
...e,
|
|
1364
|
+
action: c ? "opened" : "closed",
|
|
1365
|
+
open: c
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
});
|
|
1369
|
+
});
|
|
1370
|
+
n.observe(t, {
|
|
1371
|
+
attributes: !0,
|
|
1372
|
+
attributeFilter: ["open"]
|
|
1373
|
+
}), t._toggletipObserver = n;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1377
|
+
__proto__: null,
|
|
1378
|
+
cdsPopoverWrap: Qe,
|
|
1379
|
+
cdsToggletipWrap: tn,
|
|
1380
|
+
cdsTooltipWrap: Ke
|
|
1381
|
+
}, Symbol.toStringTag, { value: "Module" })), nn = {
|
|
1382
|
+
selector: "cds-link",
|
|
1383
|
+
event: "click",
|
|
1384
|
+
getData: (t, e, n) => ({
|
|
1385
|
+
...e,
|
|
1386
|
+
href: n.getAttribute("href")
|
|
1387
|
+
})
|
|
1388
|
+
}, on = {
|
|
1389
|
+
selector: "cds-code-snippet",
|
|
1390
|
+
event: "cds-copy-button-clicked",
|
|
1391
|
+
getData: (t, e) => ({
|
|
1392
|
+
...e,
|
|
1393
|
+
action: "copied"
|
|
1394
|
+
})
|
|
1395
|
+
}, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1396
|
+
__proto__: null,
|
|
1397
|
+
cdsCodeSnipWrap: on,
|
|
1398
|
+
cdsLinkWrap: nn
|
|
1399
|
+
}, Symbol.toStringTag, { value: "Module" })), cn = {
|
|
1400
|
+
selector: "cds-form"
|
|
1401
|
+
}, an = {
|
|
1402
|
+
selector: "cds-form-item"
|
|
1403
|
+
}, rn = {
|
|
1404
|
+
selector: "cds-form-group"
|
|
1405
|
+
}, ln = {
|
|
1406
|
+
selector: "cds-stack"
|
|
1407
|
+
}, dn = {
|
|
1408
|
+
selector: "cds-heading"
|
|
1409
|
+
}, pn = {
|
|
1410
|
+
selector: "cds-icon"
|
|
1411
|
+
}, un = {
|
|
1412
|
+
selector: "cds-icon-indicator"
|
|
1413
|
+
}, mn = {
|
|
1414
|
+
selector: "cds-badge-indicator"
|
|
1415
|
+
}, gn = {
|
|
1416
|
+
selector: "cds-loading"
|
|
1417
|
+
}, fn = {
|
|
1418
|
+
selector: "cds-skeleton-text"
|
|
1419
|
+
}, hn = {
|
|
1420
|
+
selector: "cds-skeleton-placeholder"
|
|
1421
|
+
}, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1422
|
+
__proto__: null,
|
|
1423
|
+
cdsBadgeIndicatorWrap: mn,
|
|
1424
|
+
cdsFormGroupWrap: rn,
|
|
1425
|
+
cdsFormItemWrap: an,
|
|
1426
|
+
cdsFormWrap: cn,
|
|
1427
|
+
cdsHeadingWrap: dn,
|
|
1428
|
+
cdsIconIndicatorWrap: un,
|
|
1429
|
+
cdsIconWrap: pn,
|
|
1430
|
+
cdsLoadingWrap: gn,
|
|
1431
|
+
cdsSkeletonPlaceholderWrap: hn,
|
|
1432
|
+
cdsSkeletonTextWrap: fn,
|
|
1433
|
+
cdsStackWrap: ln
|
|
1434
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1435
|
+
function g(t) {
|
|
1436
|
+
return Object.values(t).filter(
|
|
1437
|
+
(e) => typeof e == "object" && e !== null && e.selector
|
|
1438
|
+
);
|
|
1439
|
+
}
|
|
1440
|
+
const bn = [
|
|
1441
|
+
...g(Rt),
|
|
1442
|
+
...g(Ht),
|
|
1443
|
+
...g($t),
|
|
1444
|
+
...g(ee),
|
|
1445
|
+
...g(ce),
|
|
1446
|
+
...g(re),
|
|
1447
|
+
...g(de),
|
|
1448
|
+
...g(ge),
|
|
1449
|
+
...g(be),
|
|
1450
|
+
...g(Ce),
|
|
1451
|
+
...g(Ne),
|
|
1452
|
+
...g(We),
|
|
1453
|
+
...g(je),
|
|
1454
|
+
...g(qe),
|
|
1455
|
+
...g(Ye),
|
|
1456
|
+
...g(Je),
|
|
1457
|
+
...g(en),
|
|
1458
|
+
...g(sn),
|
|
1459
|
+
...g(vn)
|
|
1460
|
+
];
|
|
1461
|
+
function En() {
|
|
1462
|
+
const t = /* @__PURE__ */ new Map();
|
|
1463
|
+
return bn.forEach((e) => {
|
|
1464
|
+
t.set(e.selector, e);
|
|
1465
|
+
}), t;
|
|
1466
|
+
}
|
|
1467
|
+
const Sn = () => import("./index-Dt-eWAJs.js"), j = () => import("./index-C8Epo2Nt.js"), _n = () => import("./index-CKplFFc-.js"), In = () => import("./index-pE6aTBiZ.js"), w = () => import("./index-Coav7Owj.js"), yn = () => import("./index-CQxC5gdy.js"), Cn = () => import("./index-BCd5o-O6.js").then((t) => t.i), Pn = () => import("./index-Eo0QL5BD.js"), An = () => import("./index-DjW0vKON.js"), X = () => import("./index-BTM514kF.js"), Tn = () => import("./index-qCBuo7Dj.js"), x = () => import("./index-DuePdA69.js"), Z = () => import("./index-Co8vob2d.js").then((t) => t.i), Dn = () => import("./index-B9WY40Mg.js"), kn = () => import("./index-u-6uWe_o.js"), Nn = () => import("./index-Cvvea2-F.js"), On = () => import("./index-jwYklbEt.js"), wn = () => import("./index-BM6jRp79.js"), L = () => import("./index-C-y2nrc1.js"), Mn = () => import("./index-DNQ1-jUj.js"), F = () => import("./index-DtqsUG21.js"), Wn = () => import("./index-90TKvaQz.js"), Rn = () => import("./index-CuqzTZu2.js"), Bn = () => import("./index-GgCbc4A-.js"), J = () => import("./index-D6_et4O5.js"), zn = () => import("./index-D0qgF0lD.js"), jn = () => import("./index-BdCneYBx.js"), xn = () => import("./index-_YrjxtQS.js"), Ln = () => import("./index-BRUV1CNi.js"), Fn = () => import("./index-CI4IDokw.js"), qn = () => import("./index-CIhGaNHB.js"), K = () => import("./index-poW5zIu0.js"), Gn = () => import("./index-BGWhDeBi.js"), Un = () => import("./index-BLJaTPjJ.js"), Q = () => import("./index-Q_jttfI5.js"), Hn = () => import("./index-D64233nd.js"), q = () => import("./index-C1BCLU9c.js"), Vn = () => import("./index-BVNauB67.js"), G = () => import("./index-TZUVB-W3.js"), Yn = () => import("./index-DMtD0b_3.js").then((t) => t.i), $n = () => import("./index-Bm7ePd1P.js"), Xn = () => import("./index-Bzp_dDt9.js"), Zn = () => import("./index-sP0n4M3S.js"), Jn = () => import("./index-BoxMbYX3.js"), Kn = () => import("./index--nPiAPdI.js").then((t) => t.i), C = () => import("./index-BUX_B_Go.js"), P = () => import("./index-hsgeVwtf.js"), Qn = () => import("./index-Ss_rpifk.js").then((t) => t.i), to = () => import("./index-Oa3v3_7X.js"), eo = () => import("./index-Dy_V6Qce.js"), no = () => import("./index-BGh5ukZB.js"), oo = () => import("./index-ze2WZhYO.js"), tt = {
|
|
1468
|
+
// Tables & Pagination
|
|
1469
|
+
"cds-table": [P, x, F, J, L, Q, Un],
|
|
1470
|
+
"cds-pagination": [L, F, Q],
|
|
1471
|
+
// Buttons
|
|
1472
|
+
"cds-button": [P, x],
|
|
1473
|
+
"cds-icon-button:not([data-toggle])": [P, Z],
|
|
1474
|
+
"cds-icon-button[data-toggle]": [P, Z],
|
|
1475
|
+
"cds-button[data-fab]": [P, x],
|
|
1476
|
+
"cds-copy-button": [P, kn],
|
|
1477
|
+
"cds-combo-button": [P, Dn],
|
|
1478
|
+
// Form Controls
|
|
1479
|
+
"cds-checkbox": [Nn],
|
|
1480
|
+
"cds-radio-button-group": [On],
|
|
1481
|
+
"cds-toggle": [wn],
|
|
1482
|
+
"cds-select": [L],
|
|
1483
|
+
"cds-slider": [Mn],
|
|
1484
|
+
// Form Inputs
|
|
1485
|
+
"cds-text-input": [F],
|
|
1486
|
+
"cds-textarea": [Wn],
|
|
1487
|
+
"cds-number-input": [Rn],
|
|
1488
|
+
"cds-password-input": [P, Bn],
|
|
1489
|
+
"cds-search": [J],
|
|
1490
|
+
// Dropdown Components
|
|
1491
|
+
"cds-dropdown": [jn],
|
|
1492
|
+
"cds-combo-box": [zn],
|
|
1493
|
+
"cds-multi-select": [xn],
|
|
1494
|
+
// Date & Time
|
|
1495
|
+
"cds-date-picker": [Ln],
|
|
1496
|
+
"cds-time-picker": [Fn],
|
|
1497
|
+
// File Upload
|
|
1498
|
+
"cds-file-uploader": [qn],
|
|
1499
|
+
// Navigation - Tabs
|
|
1500
|
+
"cds-tabs": [Pn],
|
|
1501
|
+
"cds-accordion": [Sn],
|
|
1502
|
+
"cds-content-switcher": [An],
|
|
1503
|
+
// Navigation - Breadcrumbs
|
|
1504
|
+
"cds-breadcrumb": [j],
|
|
1505
|
+
"cds-breadcrumb-item": [j],
|
|
1506
|
+
"cds-breadcrumb-link": [j],
|
|
1507
|
+
// Navigation - Menus
|
|
1508
|
+
"cds-menu": [X],
|
|
1509
|
+
"cds-menu-button": [X],
|
|
1510
|
+
// Lists
|
|
1511
|
+
"cds-overflow-menu": [Tn],
|
|
1512
|
+
"cds-structured-list": [In],
|
|
1513
|
+
"cds-tree-view": [yn],
|
|
1514
|
+
// Modals
|
|
1515
|
+
"cds-modal": [C],
|
|
1516
|
+
"cds-modal-header": [C],
|
|
1517
|
+
"cds-modal-heading": [C],
|
|
1518
|
+
"cds-modal-label": [C],
|
|
1519
|
+
"cds-modal-close-button": [C],
|
|
1520
|
+
"cds-modal-body": [C],
|
|
1521
|
+
"cds-modal-body-content": [C],
|
|
1522
|
+
"cds-modal-footer": [C],
|
|
1523
|
+
"cds-modal-footer-button": [C],
|
|
1524
|
+
// Notifications
|
|
1525
|
+
"cds-toast-notification": [G],
|
|
1526
|
+
"cds-inline-notification": [G],
|
|
1527
|
+
"cds-actionable-notification": [G],
|
|
1528
|
+
// Tiles
|
|
1529
|
+
"cds-clickable-tile": [w],
|
|
1530
|
+
"cds-expandable-tile": [w],
|
|
1531
|
+
"cds-selectable-tile": [w],
|
|
1532
|
+
"cds-radio-tile": [w],
|
|
1533
|
+
// Progress
|
|
1534
|
+
"cds-progress-bar": [Xn],
|
|
1535
|
+
"cds-progress-indicator": [Zn],
|
|
1536
|
+
"cds-inline-loading": [$n],
|
|
1537
|
+
// Tooltips & Popovers
|
|
1538
|
+
"cds-tooltip": [P],
|
|
1539
|
+
"cds-popover": [Qn],
|
|
1540
|
+
"cds-toggletip": [to],
|
|
1541
|
+
// Tags
|
|
1542
|
+
"cds-tag": [q],
|
|
1543
|
+
"cds-dismissible-tag": [q],
|
|
1544
|
+
"cds-filter-tag": [q],
|
|
1545
|
+
// Miscellaneous
|
|
1546
|
+
"cds-link": [Cn],
|
|
1547
|
+
"cds-code-snippet": [Hn],
|
|
1548
|
+
// Presentational - Form Structure
|
|
1549
|
+
"cds-form": [K],
|
|
1550
|
+
"cds-form-item": [K],
|
|
1551
|
+
"cds-form-group": [Gn],
|
|
1552
|
+
// Presentational - Layout
|
|
1553
|
+
"cds-stack": [_n],
|
|
1554
|
+
// Presentational - Typography & Icons
|
|
1555
|
+
"cds-heading": [eo],
|
|
1556
|
+
"cds-icon": [no],
|
|
1557
|
+
"cds-icon-indicator": [oo],
|
|
1558
|
+
"cds-badge-indicator": [Vn],
|
|
1559
|
+
// Presentational - Loading States
|
|
1560
|
+
"cds-loading": [Yn],
|
|
1561
|
+
"cds-skeleton-text": [Kn],
|
|
1562
|
+
"cds-skeleton-placeholder": [Jn]
|
|
1563
|
+
};
|
|
1564
|
+
function so(t) {
|
|
1565
|
+
const e = /* @__PURE__ */ new Map();
|
|
1566
|
+
if (!t || !(t instanceof Element))
|
|
1567
|
+
return e;
|
|
1568
|
+
for (const o of Object.keys(M))
|
|
1569
|
+
e.set(o, []);
|
|
1570
|
+
for (const [o, s] of Object.entries(M))
|
|
1571
|
+
t.matches(o) && e.get(o).push(t);
|
|
1572
|
+
const n = t.querySelectorAll("*");
|
|
1573
|
+
for (const o of n)
|
|
1574
|
+
for (const [s, c] of Object.entries(M))
|
|
1575
|
+
o.matches(s) && e.get(s).push(o);
|
|
1576
|
+
for (const [o, s] of e.entries())
|
|
1577
|
+
s.length === 0 && e.delete(o);
|
|
1578
|
+
return e;
|
|
1579
|
+
}
|
|
1580
|
+
function co(t) {
|
|
1581
|
+
const e = /* @__PURE__ */ new Set();
|
|
1582
|
+
for (const [n, o] of t.entries())
|
|
1583
|
+
o.length > 0 && tt[n] && tt[n].forEach((c) => e.add(c));
|
|
1584
|
+
return e;
|
|
1585
|
+
}
|
|
1586
|
+
async function io(t, e) {
|
|
1587
|
+
if (t.size === 0)
|
|
1588
|
+
return;
|
|
1589
|
+
const n = Array.from(t).map(async (o) => (e.has(o) || e.set(o, o()), e.get(o)));
|
|
1590
|
+
await Promise.all(n);
|
|
1591
|
+
}
|
|
1592
|
+
function ao(t, e) {
|
|
1593
|
+
let n = 0;
|
|
1594
|
+
for (const [o, s] of t.entries()) {
|
|
1595
|
+
const c = M[o];
|
|
1596
|
+
s.forEach((i) => {
|
|
1597
|
+
if (c.init) {
|
|
1598
|
+
c.init.call(e, i);
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
if (c.multiEvent) {
|
|
1602
|
+
const S = l(i);
|
|
1603
|
+
c.events.forEach((I) => {
|
|
1604
|
+
const D = E(i, I.attrName, "event");
|
|
1605
|
+
D && e.listen(i, I.type, (W) => {
|
|
1606
|
+
e.dispatchPanelEvent(D, I.getData(W, S, i));
|
|
1607
|
+
});
|
|
1608
|
+
});
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
const a = l(i), d = a.event;
|
|
1612
|
+
d && e.listen(i, c.event, (S) => {
|
|
1613
|
+
S.stopPropagation();
|
|
1614
|
+
const I = c.getData(S, a, i), D = I._eventOverride || d;
|
|
1615
|
+
delete I._eventOverride, e.dispatchPanelEvent(D, I);
|
|
1616
|
+
});
|
|
1617
|
+
}), n += s.length;
|
|
1618
|
+
}
|
|
1619
|
+
return n;
|
|
1620
|
+
}
|
|
1621
|
+
const M = {
|
|
1622
|
+
...Object.fromEntries(En())
|
|
1623
|
+
}, ro = async function(t, e) {
|
|
1624
|
+
const n = so(t);
|
|
1625
|
+
if (n.size === 0) {
|
|
1626
|
+
this.debugMe("[Carbon] No Carbon components found in panel");
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
this.carbonComponents || (this.carbonComponents = /* @__PURE__ */ new Map());
|
|
1630
|
+
for (const [c, i] of n.entries())
|
|
1631
|
+
this.carbonComponents.set(c, i);
|
|
1632
|
+
const o = co(n);
|
|
1633
|
+
if (o.size > 0)
|
|
1634
|
+
try {
|
|
1635
|
+
await io(o, e);
|
|
1636
|
+
} catch (c) {
|
|
1637
|
+
console.error("[Carbon] Failed to load some component modules:", c);
|
|
1638
|
+
}
|
|
1639
|
+
const s = ao(n, this);
|
|
1640
|
+
s > 0 && this.debugMe(`[Carbon] Total components initialized: ${s}`);
|
|
1641
|
+
}, po = () => {
|
|
1642
|
+
Ct.register("carbon", {
|
|
1643
|
+
/**
|
|
1644
|
+
* Main render function that orchestrates Carbon component initialization.
|
|
1645
|
+
* Called by Panel.parseContent() for each panel that enters the document.
|
|
1646
|
+
*
|
|
1647
|
+
* @param {Element} panel - The panel DOM element to scan and initialize
|
|
1648
|
+
* @param {Map} cache - Import cache to prevent duplicate module loads
|
|
1649
|
+
* @returns {Promise<void>}
|
|
1650
|
+
*/
|
|
1651
|
+
render: async function(t, e) {
|
|
1652
|
+
try {
|
|
1653
|
+
await ro.call(this, t, e);
|
|
1654
|
+
} catch (n) {
|
|
1655
|
+
console.error("[Carbon] Initialization error:", n);
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
/**
|
|
1659
|
+
* Cleans up Carbon components when a component is disposed.
|
|
1660
|
+
* Carbon Web Components (native web components) automatically cleanup when
|
|
1661
|
+
* removed from the DOM, so this is primarily here for completeness and
|
|
1662
|
+
* future extensibility.
|
|
1663
|
+
*
|
|
1664
|
+
* @param {Element} _element - The element being disposed
|
|
1665
|
+
*/
|
|
1666
|
+
dispose: function(t) {
|
|
1667
|
+
},
|
|
1668
|
+
config: {
|
|
1669
|
+
version: "2.0",
|
|
1670
|
+
description: "IBM Carbon Design System Web Components"
|
|
1671
|
+
}
|
|
1672
|
+
}), console.debug("[Zooy] Carbon Design System library registered");
|
|
1673
|
+
};
|
|
1674
|
+
export {
|
|
1675
|
+
po as registerCarbonLibrary
|
|
1676
|
+
};
|