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