@emporix/component-library 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +753 -753
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import { jsxs as R, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Dialog as
|
|
5
|
-
import { Toast as
|
|
6
|
-
import { Menu as
|
|
7
|
-
import { DataTable as $
|
|
8
|
-
import { Column as
|
|
9
|
-
import { FilterMatchMode as
|
|
10
|
-
const
|
|
11
|
-
primaryButton:
|
|
12
|
-
primaryButtonDisabled:
|
|
13
|
-
spinner:
|
|
1
|
+
import { jsxs as R, jsx as i, Fragment as Ht } from "react/jsx-runtime";
|
|
2
|
+
import dt, { useMemo as st, useState as nt, useRef as G, useEffect as at, useId as Bt, useCallback as X, useLayoutEffect as ye, isValidElement as be, cloneElement as ge, createContext as we, useContext as ke, forwardRef as xe, useImperativeHandle as Ce } from "react";
|
|
3
|
+
import { createPortal as Ne } from "react-dom";
|
|
4
|
+
import { Dialog as Be } from "primereact/dialog";
|
|
5
|
+
import { Toast as Pe } from "primereact/toast";
|
|
6
|
+
import { Menu as Le } from "primereact/menu";
|
|
7
|
+
import { DataTable as $e } from "primereact/datatable";
|
|
8
|
+
import { Column as Ut } from "primereact/column";
|
|
9
|
+
import { FilterMatchMode as Ee } from "primereact/api";
|
|
10
|
+
const De = "_primaryButton_gvcke_1", je = "_primaryButtonDisabled_gvcke_33", Fe = "_spinner_gvcke_41", Wt = {
|
|
11
|
+
primaryButton: De,
|
|
12
|
+
primaryButtonDisabled: je,
|
|
13
|
+
spinner: Fe
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var ie = {
|
|
16
16
|
color: void 0,
|
|
17
17
|
size: void 0,
|
|
18
18
|
className: void 0,
|
|
19
19
|
style: void 0,
|
|
20
20
|
attr: void 0
|
|
21
|
-
},
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
var n, r, u =
|
|
21
|
+
}, Yt = dt.createContext && /* @__PURE__ */ dt.createContext(ie), Oe = ["attr", "size", "title"];
|
|
22
|
+
function Se(e, t) {
|
|
23
|
+
if (e == null) return {};
|
|
24
|
+
var n, r, u = Ae(e, t);
|
|
25
25
|
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
var d = Object.getOwnPropertySymbols(
|
|
27
|
-
for (r = 0; r < d.length; r++) n = d[r],
|
|
26
|
+
var d = Object.getOwnPropertySymbols(e);
|
|
27
|
+
for (r = 0; r < d.length; r++) n = d[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (u[n] = e[n]);
|
|
28
28
|
}
|
|
29
29
|
return u;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
31
|
+
function Ae(e, t) {
|
|
32
|
+
if (e == null) return {};
|
|
33
33
|
var n = {};
|
|
34
|
-
for (var r in
|
|
35
|
-
if (
|
|
36
|
-
n[r] =
|
|
34
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
35
|
+
if (t.indexOf(r) !== -1) continue;
|
|
36
|
+
n[r] = e[r];
|
|
37
37
|
}
|
|
38
38
|
return n;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
for (var
|
|
43
|
-
var n = arguments[
|
|
44
|
-
for (var r in n) ({}).hasOwnProperty.call(n, r) && (
|
|
40
|
+
function St() {
|
|
41
|
+
return St = Object.assign ? Object.assign.bind() : function(e) {
|
|
42
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
43
|
+
var n = arguments[t];
|
|
44
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
45
45
|
}
|
|
46
|
-
return
|
|
47
|
-
},
|
|
46
|
+
return e;
|
|
47
|
+
}, St.apply(null, arguments);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
var n = Object.keys(
|
|
49
|
+
function Qt(e, t) {
|
|
50
|
+
var n = Object.keys(e);
|
|
51
51
|
if (Object.getOwnPropertySymbols) {
|
|
52
|
-
var r = Object.getOwnPropertySymbols(
|
|
53
|
-
|
|
54
|
-
return Object.getOwnPropertyDescriptor(
|
|
52
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
53
|
+
t && (r = r.filter(function(u) {
|
|
54
|
+
return Object.getOwnPropertyDescriptor(e, u).enumerable;
|
|
55
55
|
})), n.push.apply(n, r);
|
|
56
56
|
}
|
|
57
57
|
return n;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
for (var
|
|
61
|
-
var n = arguments[
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
65
|
-
Object.defineProperty(
|
|
59
|
+
function At(e) {
|
|
60
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
61
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
62
|
+
t % 2 ? Qt(Object(n), !0).forEach(function(r) {
|
|
63
|
+
Re(e, r, n[r]);
|
|
64
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function(r) {
|
|
65
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
return
|
|
68
|
+
return e;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return (
|
|
70
|
+
function Re(e, t, n) {
|
|
71
|
+
return (t = Ie(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
return typeof
|
|
73
|
+
function Ie(e) {
|
|
74
|
+
var t = Te(e, "string");
|
|
75
|
+
return typeof t == "symbol" ? t : t + "";
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
if (typeof
|
|
79
|
-
var n =
|
|
77
|
+
function Te(e, t) {
|
|
78
|
+
if (typeof e != "object" || !e) return e;
|
|
79
|
+
var n = e[Symbol.toPrimitive];
|
|
80
80
|
if (n !== void 0) {
|
|
81
|
-
var r = n.call(
|
|
81
|
+
var r = n.call(e, t);
|
|
82
82
|
if (typeof r != "object") return r;
|
|
83
83
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
84
84
|
}
|
|
85
|
-
return (
|
|
85
|
+
return (t === "string" ? String : Number)(e);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function se(e) {
|
|
88
|
+
return e && e.map((t, n) => /* @__PURE__ */ dt.createElement(t.tag, At({
|
|
89
89
|
key: n
|
|
90
|
-
},
|
|
90
|
+
}, t.attr), se(t.child)));
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return (
|
|
94
|
-
attr:
|
|
95
|
-
},
|
|
92
|
+
function vt(e) {
|
|
93
|
+
return (t) => /* @__PURE__ */ dt.createElement(We, St({
|
|
94
|
+
attr: At({}, e.attr)
|
|
95
|
+
}, t), se(e.child));
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
var
|
|
97
|
+
function We(e) {
|
|
98
|
+
var t = (n) => {
|
|
99
99
|
var {
|
|
100
100
|
attr: r,
|
|
101
101
|
size: u,
|
|
102
102
|
title: d
|
|
103
|
-
} =
|
|
104
|
-
return n.className && (o = n.className),
|
|
103
|
+
} = e, a = Se(e, Oe), c = u || n.size || "1em", o;
|
|
104
|
+
return n.className && (o = n.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ dt.createElement("svg", St({
|
|
105
105
|
stroke: "currentColor",
|
|
106
106
|
fill: "currentColor",
|
|
107
107
|
strokeWidth: "0"
|
|
108
|
-
}, n.attr, r,
|
|
108
|
+
}, n.attr, r, a, {
|
|
109
109
|
className: o,
|
|
110
|
-
style:
|
|
111
|
-
color:
|
|
112
|
-
}, n.style),
|
|
110
|
+
style: At(At({
|
|
111
|
+
color: e.color || n.color
|
|
112
|
+
}, n.style), e.style),
|
|
113
113
|
height: c,
|
|
114
114
|
width: c,
|
|
115
115
|
xmlns: "http://www.w3.org/2000/svg"
|
|
116
|
-
}), d && /* @__PURE__ */
|
|
116
|
+
}), d && /* @__PURE__ */ dt.createElement("title", null, d), e.children);
|
|
117
117
|
};
|
|
118
|
-
return
|
|
118
|
+
return Yt !== void 0 ? /* @__PURE__ */ dt.createElement(Yt.Consumer, null, (n) => t(n)) : t(ie);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
120
|
+
function Me(e) {
|
|
121
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { opacity: "0.2", fillRule: "evenodd", clipRule: "evenodd", d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z", fill: "currentColor" }, child: [] }] })(e);
|
|
122
122
|
}
|
|
123
123
|
const Oo = ({
|
|
124
|
-
children:
|
|
125
|
-
disabled:
|
|
124
|
+
children: e,
|
|
125
|
+
disabled: t = !1,
|
|
126
126
|
loading: n = !1,
|
|
127
127
|
onClick: r,
|
|
128
128
|
className: u = "",
|
|
129
129
|
"data-testid": d,
|
|
130
|
-
...
|
|
130
|
+
...a
|
|
131
131
|
}) => {
|
|
132
132
|
const c = [
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
Wt.primaryButton,
|
|
134
|
+
t ? Wt.primaryButtonDisabled : "",
|
|
135
135
|
u
|
|
136
136
|
].filter(Boolean).join(" ");
|
|
137
137
|
return /* @__PURE__ */ R(
|
|
@@ -139,69 +139,69 @@ const Oo = ({
|
|
|
139
139
|
{
|
|
140
140
|
type: "button",
|
|
141
141
|
className: c,
|
|
142
|
-
disabled:
|
|
142
|
+
disabled: t || n,
|
|
143
143
|
onClick: r,
|
|
144
144
|
"data-testid": d,
|
|
145
|
-
...
|
|
145
|
+
...a,
|
|
146
146
|
children: [
|
|
147
|
-
n && /* @__PURE__ */
|
|
148
|
-
|
|
147
|
+
n && /* @__PURE__ */ i(Me, { className: Wt.spinner, size: 12 }),
|
|
148
|
+
e
|
|
149
149
|
]
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
|
-
},
|
|
153
|
-
secondaryButton:
|
|
154
|
-
secondaryButtonDisabled:
|
|
152
|
+
}, qe = "_secondaryButton_15dkw_1", ze = "_secondaryButtonDisabled_15dkw_32", Jt = {
|
|
153
|
+
secondaryButton: qe,
|
|
154
|
+
secondaryButtonDisabled: ze
|
|
155
155
|
}, So = ({
|
|
156
|
-
children:
|
|
157
|
-
disabled:
|
|
156
|
+
children: e,
|
|
157
|
+
disabled: t = !1,
|
|
158
158
|
onClick: n,
|
|
159
159
|
className: r = "",
|
|
160
160
|
"data-testid": u,
|
|
161
161
|
...d
|
|
162
162
|
}) => {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
const a = [
|
|
164
|
+
Jt.secondaryButton,
|
|
165
|
+
t ? Jt.secondaryButtonDisabled : "",
|
|
166
166
|
r
|
|
167
167
|
].filter(Boolean).join(" ");
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ i(
|
|
169
169
|
"button",
|
|
170
170
|
{
|
|
171
171
|
type: "button",
|
|
172
|
-
className:
|
|
173
|
-
disabled:
|
|
172
|
+
className: a,
|
|
173
|
+
disabled: t,
|
|
174
174
|
onClick: n,
|
|
175
175
|
"data-testid": u,
|
|
176
176
|
...d,
|
|
177
|
-
children:
|
|
177
|
+
children: e
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
|
-
},
|
|
181
|
-
tabsContainer:
|
|
182
|
-
tabsHeader:
|
|
183
|
-
tabItem:
|
|
184
|
-
tabContent:
|
|
185
|
-
tabLabel:
|
|
186
|
-
tabLine:
|
|
187
|
-
active:
|
|
188
|
-
inactive:
|
|
189
|
-
tabPanels:
|
|
180
|
+
}, Ve = "_tabsContainer_m3c4e_1", He = "_tabsHeader_m3c4e_7", Ke = "_tabItem_m3c4e_13", Ze = "_tabContent_m3c4e_29", Xe = "_tabLabel_m3c4e_51", Ge = "_tabLine_m3c4e_61", Ue = "_active_m3c4e_68", Ye = "_inactive_m3c4e_76", Qe = "_tabPanels_m3c4e_84", ht = {
|
|
181
|
+
tabsContainer: Ve,
|
|
182
|
+
tabsHeader: He,
|
|
183
|
+
tabItem: Ke,
|
|
184
|
+
tabContent: Ze,
|
|
185
|
+
tabLabel: Xe,
|
|
186
|
+
tabLine: Ge,
|
|
187
|
+
active: Ue,
|
|
188
|
+
inactive: Ye,
|
|
189
|
+
tabPanels: Qe
|
|
190
190
|
}, Ao = ({
|
|
191
|
-
tabs:
|
|
192
|
-
activeTabId:
|
|
191
|
+
tabs: e,
|
|
192
|
+
activeTabId: t,
|
|
193
193
|
onTabChange: n,
|
|
194
194
|
className: r = "",
|
|
195
195
|
"data-testid": u,
|
|
196
196
|
...d
|
|
197
197
|
}) => {
|
|
198
198
|
var c;
|
|
199
|
-
const
|
|
200
|
-
return /* @__PURE__ */ R("div", { className:
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
const v = o.id ===
|
|
203
|
-
|
|
204
|
-
v ?
|
|
199
|
+
const a = [ht.tabsContainer, r].filter(Boolean).join(" ");
|
|
200
|
+
return /* @__PURE__ */ R("div", { className: a, "data-testid": u, ...d, children: [
|
|
201
|
+
/* @__PURE__ */ i("div", { className: ht.tabsHeader, children: e.map((o) => {
|
|
202
|
+
const v = o.id === t, h = [
|
|
203
|
+
ht.tabItem,
|
|
204
|
+
v ? ht.active : ht.inactive
|
|
205
205
|
].filter(Boolean).join(" ");
|
|
206
206
|
return /* @__PURE__ */ R(
|
|
207
207
|
"button",
|
|
@@ -211,32 +211,32 @@ const Oo = ({
|
|
|
211
211
|
onClick: () => n(o.id),
|
|
212
212
|
"data-testid": `${u}-tab-${o.id}`,
|
|
213
213
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ i("div", { className: ht.tabContent, children: /* @__PURE__ */ i("span", { className: ht.tabLabel, children: o.label }) }),
|
|
215
|
+
/* @__PURE__ */ i("div", { className: ht.tabLine })
|
|
216
216
|
]
|
|
217
217
|
},
|
|
218
218
|
o.id
|
|
219
219
|
);
|
|
220
220
|
}) }),
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ i("div", { className: ht.tabPanels, children: (c = e.find((o) => o.id === t)) == null ? void 0 : c.content })
|
|
222
222
|
] });
|
|
223
223
|
};
|
|
224
|
-
function
|
|
225
|
-
return
|
|
224
|
+
function Je(e) {
|
|
225
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "18", y1: "6", x2: "6", y2: "18" }, child: [] }, { tag: "line", attr: { x1: "6", y1: "6", x2: "18", y2: "18" }, child: [] }] })(e);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return
|
|
227
|
+
function tn(e) {
|
|
228
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(e);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
return
|
|
230
|
+
function en(e) {
|
|
231
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "16", x2: "12", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "8", x2: "12.01", y2: "8" }, child: [] }] })(e);
|
|
232
232
|
}
|
|
233
|
-
function nn(
|
|
234
|
-
return
|
|
233
|
+
function nn(e) {
|
|
234
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "9 18 15 12 9 6" }, child: [] }] })(e);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
return
|
|
236
|
+
function Zt(e) {
|
|
237
|
+
return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "6 9 12 15 18 9" }, child: [] }] })(e);
|
|
238
238
|
}
|
|
239
|
-
const rn = "
|
|
239
|
+
const rn = "_dropdown_ityt6_1", on = "_label_ityt6_8", sn = "_required_ityt6_17", an = "_trigger_ityt6_22", ln = "_triggerDisabled_ityt6_46", cn = "_triggerInput_ityt6_55", un = "_value_ityt6_73", dn = "_placeholder_ityt6_82", pn = "_chip_ityt6_86", fn = "_chipValue_ityt6_94", hn = "_chipItem_ityt6_103", _n = "_chipLabel_ityt6_117", mn = "_chipRemove_ityt6_123", vn = "_chipOverflow_ityt6_138", yn = "_chevron_ityt6_143", bn = "_open_ityt6_150", gn = "_panel_ityt6_174", wn = "_panelClosing_ityt6_191", kn = "_filterWrapper_ityt6_195", xn = "_filterInput_ityt6_202", Cn = "_filterIcon_ityt6_221", Nn = "_list_ityt6_232", Bn = "_option_ityt6_241", Pn = "_checkboxContainer_ityt6_256", Ln = "_checkbox_ityt6_256", $n = "_optionLabel_ityt6_273", En = "_optionSelected_ityt6_278", Dn = "_optionDisabled_ityt6_282", jn = "_empty_ityt6_291", Fn = "_disabled_ityt6_298", On = "_error_ityt6_302", L = {
|
|
240
240
|
dropdown: rn,
|
|
241
241
|
label: on,
|
|
242
242
|
required: sn,
|
|
@@ -245,19 +245,19 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
245
245
|
triggerInput: cn,
|
|
246
246
|
value: un,
|
|
247
247
|
placeholder: dn,
|
|
248
|
-
|
|
248
|
+
chip: pn,
|
|
249
249
|
chipValue: fn,
|
|
250
|
-
|
|
250
|
+
chipItem: hn,
|
|
251
251
|
chipLabel: _n,
|
|
252
252
|
chipRemove: mn,
|
|
253
253
|
chipOverflow: vn,
|
|
254
|
-
chevron:
|
|
255
|
-
open:
|
|
254
|
+
chevron: yn,
|
|
255
|
+
open: bn,
|
|
256
256
|
panel: gn,
|
|
257
257
|
panelClosing: wn,
|
|
258
258
|
filterWrapper: kn,
|
|
259
|
-
filterInput:
|
|
260
|
-
filterIcon:
|
|
259
|
+
filterInput: xn,
|
|
260
|
+
filterIcon: Cn,
|
|
261
261
|
list: Nn,
|
|
262
262
|
option: Bn,
|
|
263
263
|
checkboxContainer: Pn,
|
|
@@ -268,17 +268,17 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
268
268
|
empty: jn,
|
|
269
269
|
disabled: Fn,
|
|
270
270
|
error: On
|
|
271
|
-
},
|
|
272
|
-
const r = t
|
|
271
|
+
}, _t = (e, t) => {
|
|
272
|
+
const r = e[t];
|
|
273
273
|
return r != null ? String(r) : "";
|
|
274
|
-
},
|
|
275
|
-
value:
|
|
276
|
-
onChange:
|
|
274
|
+
}, wt = (e, t) => e[t], kt = (e, t) => t == null ? !1 : !!e[t], Ro = ({
|
|
275
|
+
value: e,
|
|
276
|
+
onChange: t,
|
|
277
277
|
multiple: n = !1,
|
|
278
278
|
display: r = "comma",
|
|
279
279
|
maxSelectedLabels: u,
|
|
280
280
|
selectedItemsLabel: d = "{0} items selected",
|
|
281
|
-
removeIcon:
|
|
281
|
+
removeIcon: a,
|
|
282
282
|
onEditEnd: c,
|
|
283
283
|
options: o,
|
|
284
284
|
optionLabel: v = "label",
|
|
@@ -287,10 +287,10 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
287
287
|
placeholder: P = "Select",
|
|
288
288
|
filter: l = !1,
|
|
289
289
|
editable: f = !1,
|
|
290
|
-
disabled:
|
|
290
|
+
disabled: s = !1,
|
|
291
291
|
required: m = !1,
|
|
292
292
|
label: g,
|
|
293
|
-
error:
|
|
293
|
+
error: C,
|
|
294
294
|
inputId: T,
|
|
295
295
|
className: N = "",
|
|
296
296
|
panelClassName: O = "",
|
|
@@ -298,79 +298,79 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
298
298
|
itemTemplate: U,
|
|
299
299
|
"data-testid": E
|
|
300
300
|
}) => {
|
|
301
|
-
const
|
|
302
|
-
() => n && Array.isArray(
|
|
303
|
-
[n,
|
|
304
|
-
), H =
|
|
301
|
+
const x = f && !n, V = st(
|
|
302
|
+
() => n && Array.isArray(e) ? e : [],
|
|
303
|
+
[n, e]
|
|
304
|
+
), H = st(
|
|
305
305
|
() => new Set(V.map((p) => String(p))),
|
|
306
306
|
[V]
|
|
307
307
|
), S = o.find(
|
|
308
|
-
(p) => !n &&
|
|
309
|
-
), k =
|
|
308
|
+
(p) => !n && wt(p, h) === e
|
|
309
|
+
), k = st(
|
|
310
310
|
() => n ? o.filter(
|
|
311
|
-
(p) => H.has(String(
|
|
311
|
+
(p) => H.has(String(wt(p, h)))
|
|
312
312
|
) : [],
|
|
313
313
|
[n, o, h, H]
|
|
314
|
-
), w = S ?
|
|
315
|
-
() => l && !
|
|
316
|
-
(p) =>
|
|
314
|
+
), w = S ? _t(S, v) : "", z = k.map((p) => _t(p, v)).filter(Boolean).join(", "), [$, _] = nt(!1), [y, q] = nt(!1), [K, ot] = nt(""), [lt, Z] = nt(w), J = G(null), Y = G(null), yt = G(null), Pt = G(null), b = G(!1), D = st(
|
|
315
|
+
() => l && !x ? o.filter(
|
|
316
|
+
(p) => _t(p, v).toLowerCase().includes(K.toLowerCase())
|
|
317
317
|
) : o,
|
|
318
|
-
[l,
|
|
318
|
+
[l, x, o, v, K]
|
|
319
319
|
);
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}, [
|
|
323
|
-
$ && l && !
|
|
320
|
+
at(() => {
|
|
321
|
+
x && Z(w);
|
|
322
|
+
}, [x, e, w]), at(() => {
|
|
323
|
+
$ && l && !x && (ot(""), setTimeout(() => {
|
|
324
324
|
var p;
|
|
325
|
-
return (p =
|
|
325
|
+
return (p = yt.current) == null ? void 0 : p.focus();
|
|
326
326
|
}, 0));
|
|
327
|
-
}, [$, l,
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
},
|
|
327
|
+
}, [$, l, x]);
|
|
328
|
+
const tt = () => {
|
|
329
|
+
b.current = !0, q(!0);
|
|
330
|
+
}, bt = (p) => {
|
|
331
331
|
var F;
|
|
332
|
-
(
|
|
332
|
+
(b.current || (F = p.animationName) != null && F.includes("menuOut")) && (b.current = !1, _(!1), q(!1), x && Z(w));
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
if (!$ && !
|
|
334
|
+
at(() => {
|
|
335
|
+
if (!$ && !y) return;
|
|
336
336
|
const p = (F) => {
|
|
337
|
-
J.current && !J.current.contains(F.target) && (
|
|
337
|
+
J.current && !J.current.contains(F.target) && (x && Z(w), tt());
|
|
338
338
|
};
|
|
339
339
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
340
|
-
}, [$,
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
if (
|
|
345
|
-
const I =
|
|
346
|
-
if (
|
|
340
|
+
}, [$, y, x, w]);
|
|
341
|
+
const pt = () => {
|
|
342
|
+
s || _((p) => !p);
|
|
343
|
+
}, gt = (p, F) => {
|
|
344
|
+
if (kt(p, B)) return;
|
|
345
|
+
const I = wt(p, h);
|
|
346
|
+
if (x && Z(_t(p, v)), n) {
|
|
347
347
|
const A = I ?? null;
|
|
348
348
|
if (A == null) return;
|
|
349
|
-
const Q = H.has(String(A)) ? V.filter((
|
|
350
|
-
|
|
349
|
+
const Q = H.has(String(A)) ? V.filter((ft) => ft !== A) : [...V, A];
|
|
350
|
+
t == null || t({
|
|
351
351
|
value: Q,
|
|
352
352
|
originalEvent: F
|
|
353
353
|
});
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
t == null || t({
|
|
357
357
|
value: I ?? null,
|
|
358
358
|
originalEvent: F
|
|
359
|
-
}),
|
|
359
|
+
}), tt();
|
|
360
360
|
}, j = (p) => {
|
|
361
361
|
if (!$) {
|
|
362
|
-
if (p.key === "Enter" &&
|
|
362
|
+
if (p.key === "Enter" && x && lt.trim()) {
|
|
363
363
|
p.preventDefault();
|
|
364
|
-
const F =
|
|
365
|
-
const
|
|
366
|
-
return
|
|
367
|
-
}),
|
|
368
|
-
A && !
|
|
369
|
-
value:
|
|
364
|
+
const F = lt.trim(), I = F.toLowerCase(), A = o.find((Q) => {
|
|
365
|
+
const ft = _t(Q, v).toLowerCase();
|
|
366
|
+
return ft === I || ft.startsWith(I);
|
|
367
|
+
}), rt = A && !kt(A, B) ? wt(A, h) : null;
|
|
368
|
+
A && !kt(A, B) && (Z(_t(A, v)), t == null || t({
|
|
369
|
+
value: rt,
|
|
370
370
|
originalEvent: p
|
|
371
371
|
})), c == null || c({
|
|
372
372
|
value: F,
|
|
373
|
-
selectedValue:
|
|
373
|
+
selectedValue: rt,
|
|
374
374
|
originalEvent: p
|
|
375
375
|
});
|
|
376
376
|
return;
|
|
@@ -379,157 +379,157 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
381
|
if (p.key === "Escape") {
|
|
382
|
-
p.preventDefault(),
|
|
382
|
+
p.preventDefault(), tt();
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
385
385
|
if (p.key === "Enter") {
|
|
386
|
-
if (p.preventDefault(),
|
|
387
|
-
const F =
|
|
386
|
+
if (p.preventDefault(), x) {
|
|
387
|
+
const F = lt.trim();
|
|
388
388
|
if (F) {
|
|
389
389
|
const I = F.toLowerCase(), A = o.find((Q) => {
|
|
390
|
-
const
|
|
391
|
-
return
|
|
392
|
-
}),
|
|
393
|
-
A && !
|
|
390
|
+
const ft = _t(Q, v).toLowerCase();
|
|
391
|
+
return ft === I || ft.startsWith(I);
|
|
392
|
+
}), rt = A && !kt(A, B) ? wt(A, h) : null;
|
|
393
|
+
A && !kt(A, B) && gt(A, p), c == null || c({
|
|
394
394
|
value: F,
|
|
395
|
-
selectedValue:
|
|
395
|
+
selectedValue: rt,
|
|
396
396
|
originalEvent: p
|
|
397
397
|
});
|
|
398
398
|
} else
|
|
399
399
|
c == null || c({ value: "", selectedValue: null, originalEvent: p });
|
|
400
400
|
} else if (D.length > 0) {
|
|
401
401
|
const F = D.find(
|
|
402
|
-
(I) => !
|
|
402
|
+
(I) => !kt(I, B)
|
|
403
403
|
);
|
|
404
|
-
F && !
|
|
404
|
+
F && !kt(F, B) && gt(F, p);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
},
|
|
408
|
-
if (F.stopPropagation(),
|
|
409
|
-
const I =
|
|
407
|
+
}, et = n && r === "chip", Rt = (p, F) => {
|
|
408
|
+
if (F.stopPropagation(), s) return;
|
|
409
|
+
const I = wt(p, h);
|
|
410
410
|
if (I == null) return;
|
|
411
411
|
const A = V.filter(
|
|
412
|
-
(
|
|
412
|
+
(rt) => String(rt) !== String(I)
|
|
413
413
|
);
|
|
414
|
-
|
|
415
|
-
},
|
|
414
|
+
t == null || t({ value: A, originalEvent: F });
|
|
415
|
+
}, Ct = st(() => u == null ? null : Math.max(0, u), [u]), M = st(() => !et || Ct == null ? k : k.slice(0, Ct), [et, Ct, k]), pe = et && Ct != null ? Math.max(0, k.length - Ct) : 0, fe = [
|
|
416
416
|
L.dropdown,
|
|
417
|
-
|
|
417
|
+
s ? L.disabled : "",
|
|
418
418
|
$ ? L.open : "",
|
|
419
419
|
N
|
|
420
|
-
].filter(Boolean).join(" "),
|
|
420
|
+
].filter(Boolean).join(" "), he = [
|
|
421
421
|
L.trigger,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
].filter(Boolean).join(" "),
|
|
422
|
+
s ? L.triggerDisabled : "",
|
|
423
|
+
et ? L.chip : ""
|
|
424
|
+
].filter(Boolean).join(" "), _e = [
|
|
425
425
|
L.panel,
|
|
426
|
-
|
|
426
|
+
y ? L.panelClosing : "",
|
|
427
427
|
O
|
|
428
|
-
].filter(Boolean).join(" "),
|
|
429
|
-
return /* @__PURE__ */ R("div", { className:
|
|
430
|
-
g != null && /* @__PURE__ */ R("label", { htmlFor: $
|
|
428
|
+
].filter(Boolean).join(" "), me = Bt(), $t = T ?? `dropdown-${me.replace(/[^a-zA-Z0-9_-]/g, "")}`, It = `${$t}-panel`, Tt = C == null ? void 0 : `${$t}-error`, Xt = C == null ? {} : { "aria-invalid": "true" }, Gt = Tt == null ? {} : { "aria-describedby": Tt };
|
|
429
|
+
return /* @__PURE__ */ R("div", { className: fe, ref: J, "data-testid": E, children: [
|
|
430
|
+
g != null && /* @__PURE__ */ R("label", { htmlFor: $t, className: L.label, children: [
|
|
431
431
|
g,
|
|
432
|
-
m && /* @__PURE__ */
|
|
432
|
+
m && /* @__PURE__ */ i("span", { className: L.required, children: "*" })
|
|
433
433
|
] }),
|
|
434
434
|
/* @__PURE__ */ R(
|
|
435
435
|
"div",
|
|
436
436
|
{
|
|
437
|
-
id:
|
|
437
|
+
id: x ? void 0 : $t,
|
|
438
438
|
role: "combobox",
|
|
439
|
-
"aria-expanded": $ ||
|
|
439
|
+
"aria-expanded": $ || y,
|
|
440
440
|
"aria-haspopup": "listbox",
|
|
441
|
-
"aria-controls": $ ||
|
|
442
|
-
"aria-disabled":
|
|
441
|
+
"aria-controls": $ || y ? It : void 0,
|
|
442
|
+
"aria-disabled": s,
|
|
443
443
|
"aria-label": typeof g == "string" ? g : void 0,
|
|
444
|
-
...
|
|
445
|
-
...
|
|
446
|
-
tabIndex:
|
|
447
|
-
className:
|
|
448
|
-
onClick:
|
|
449
|
-
onKeyDown:
|
|
450
|
-
"data-testid": E && !
|
|
444
|
+
...x ? {} : Xt,
|
|
445
|
+
...x ? {} : Gt,
|
|
446
|
+
tabIndex: x || s ? -1 : 0,
|
|
447
|
+
className: he,
|
|
448
|
+
onClick: x ? void 0 : pt,
|
|
449
|
+
onKeyDown: x ? void 0 : j,
|
|
450
|
+
"data-testid": E && !x ? `${E}-trigger` : void 0,
|
|
451
451
|
children: [
|
|
452
|
-
|
|
452
|
+
x ? /* @__PURE__ */ i(
|
|
453
453
|
"input",
|
|
454
454
|
{
|
|
455
|
-
ref:
|
|
456
|
-
id: $
|
|
455
|
+
ref: Pt,
|
|
456
|
+
id: $t,
|
|
457
457
|
type: "text",
|
|
458
458
|
className: L.triggerInput,
|
|
459
|
-
value:
|
|
459
|
+
value: lt,
|
|
460
460
|
onChange: (p) => {
|
|
461
|
-
Z(p.target.value), !$ && !
|
|
461
|
+
Z(p.target.value), !$ && !y && _(!0);
|
|
462
462
|
},
|
|
463
463
|
onFocus: () => {
|
|
464
|
-
!
|
|
464
|
+
!s && !$ && !y && _(!0);
|
|
465
465
|
},
|
|
466
466
|
onKeyDown: j,
|
|
467
467
|
placeholder: P,
|
|
468
|
-
disabled:
|
|
468
|
+
disabled: s,
|
|
469
469
|
"aria-autocomplete": "list",
|
|
470
|
-
"aria-controls": $ ||
|
|
471
|
-
"aria-expanded": $ ||
|
|
472
|
-
...
|
|
473
|
-
...
|
|
470
|
+
"aria-controls": $ || y ? It : void 0,
|
|
471
|
+
"aria-expanded": $ || y,
|
|
472
|
+
...Xt,
|
|
473
|
+
...Gt,
|
|
474
474
|
"data-testid": E ? `${E}-trigger` : void 0
|
|
475
475
|
}
|
|
476
|
-
) :
|
|
476
|
+
) : et ? /* @__PURE__ */ i("span", { className: L.chipValue, children: k.length === 0 ? /* @__PURE__ */ i("span", { className: L.placeholder, children: P }) : /* @__PURE__ */ R(Ht, { children: [
|
|
477
477
|
M.map((p, F) => {
|
|
478
|
-
const I =
|
|
479
|
-
return /* @__PURE__ */ R("span", { className: L.
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
!
|
|
478
|
+
const I = _t(p, v), A = wt(p, h), rt = A != null ? String(A) : `chip-${F}`;
|
|
479
|
+
return /* @__PURE__ */ R("span", { className: L.chipItem, children: [
|
|
480
|
+
/* @__PURE__ */ i("span", { className: L.chipLabel, children: U ? U(p) : I }),
|
|
481
|
+
!s && /* @__PURE__ */ i(
|
|
482
482
|
"button",
|
|
483
483
|
{
|
|
484
484
|
type: "button",
|
|
485
485
|
className: L.chipRemove,
|
|
486
|
-
onClick: (Q) =>
|
|
486
|
+
onClick: (Q) => Rt(p, Q),
|
|
487
487
|
onKeyDown: (Q) => {
|
|
488
488
|
(Q.key === "Enter" || Q.key === " ") && Q.stopPropagation();
|
|
489
489
|
},
|
|
490
490
|
"aria-label": `Remove ${I}`,
|
|
491
491
|
"data-testid": E ? `${E}-chip-remove-${F}` : void 0,
|
|
492
|
-
children:
|
|
492
|
+
children: a ?? /* @__PURE__ */ i(Je, { "aria-hidden": !0 })
|
|
493
493
|
}
|
|
494
494
|
)
|
|
495
|
-
] },
|
|
495
|
+
] }, rt);
|
|
496
496
|
}),
|
|
497
|
-
|
|
497
|
+
pe > 0 && /* @__PURE__ */ i("span", { className: L.chipOverflow, children: d.replace(
|
|
498
498
|
"{0}",
|
|
499
499
|
String(k.length)
|
|
500
500
|
) })
|
|
501
|
-
] }) }) : /* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
501
|
+
] }) }) : /* @__PURE__ */ i("span", { className: L.value, children: W && !n ? W(S ?? null) : (n ? z : w) || /* @__PURE__ */ i("span", { className: L.placeholder, children: P }) }),
|
|
502
|
+
/* @__PURE__ */ i(
|
|
503
|
+
Zt,
|
|
504
504
|
{
|
|
505
505
|
className: L.chevron,
|
|
506
506
|
"aria-hidden": !0,
|
|
507
|
-
onClick:
|
|
507
|
+
onClick: x ? pt : void 0
|
|
508
508
|
}
|
|
509
509
|
)
|
|
510
510
|
]
|
|
511
511
|
}
|
|
512
512
|
),
|
|
513
|
-
($ ||
|
|
513
|
+
($ || y) && /* @__PURE__ */ R(
|
|
514
514
|
"div",
|
|
515
515
|
{
|
|
516
516
|
ref: Y,
|
|
517
|
-
id:
|
|
518
|
-
className:
|
|
517
|
+
id: It,
|
|
518
|
+
className: _e,
|
|
519
519
|
role: "presentation",
|
|
520
|
-
onAnimationEnd:
|
|
520
|
+
onAnimationEnd: bt,
|
|
521
521
|
"data-testid": E ? `${E}-panel` : void 0,
|
|
522
522
|
children: [
|
|
523
|
-
l && !
|
|
524
|
-
/* @__PURE__ */
|
|
523
|
+
l && !x && /* @__PURE__ */ R("div", { className: L.filterWrapper, children: [
|
|
524
|
+
/* @__PURE__ */ i(
|
|
525
525
|
"input",
|
|
526
526
|
{
|
|
527
|
-
ref:
|
|
527
|
+
ref: yt,
|
|
528
528
|
type: "text",
|
|
529
529
|
className: L.filterInput,
|
|
530
530
|
value: K,
|
|
531
531
|
onChange: (p) => {
|
|
532
|
-
|
|
532
|
+
ot(p.target.value);
|
|
533
533
|
},
|
|
534
534
|
onKeyDown: (p) => {
|
|
535
535
|
p.key === "Escape" && _(!1), p.stopPropagation();
|
|
@@ -540,25 +540,25 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
540
540
|
"data-testid": E ? `${E}-filter` : void 0
|
|
541
541
|
}
|
|
542
542
|
),
|
|
543
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ i(tn, { className: L.filterIcon, "aria-hidden": !0 })
|
|
544
544
|
] }),
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
const I =
|
|
545
|
+
/* @__PURE__ */ i("ul", { className: L.list, role: "listbox", "aria-label": "Options", children: D.length === 0 ? /* @__PURE__ */ i("li", { className: L.empty, children: "No results" }) : D.map((p, F) => {
|
|
546
|
+
const I = wt(p, h), A = _t(p, v), rt = kt(p, B), Q = n ? H.has(String(I)) : e === I, ft = I != null ? String(I) : `option-${F}`;
|
|
547
547
|
return /* @__PURE__ */ R(
|
|
548
548
|
"li",
|
|
549
549
|
{
|
|
550
550
|
role: "option",
|
|
551
551
|
"aria-selected": Q,
|
|
552
|
-
"aria-disabled":
|
|
552
|
+
"aria-disabled": rt,
|
|
553
553
|
className: [
|
|
554
554
|
L.option,
|
|
555
555
|
Q ? L.optionSelected : "",
|
|
556
|
-
|
|
556
|
+
rt ? L.optionDisabled : ""
|
|
557
557
|
].filter(Boolean).join(" "),
|
|
558
|
-
onClick: (
|
|
558
|
+
onClick: (ve) => gt(p, ve),
|
|
559
559
|
"data-testid": E ? `${E}-option-${F}` : void 0,
|
|
560
560
|
children: [
|
|
561
|
-
n && /* @__PURE__ */
|
|
561
|
+
n && /* @__PURE__ */ i("span", { className: L.checkboxContainer, "aria-hidden": !0, children: /* @__PURE__ */ i(
|
|
562
562
|
"input",
|
|
563
563
|
{
|
|
564
564
|
type: "checkbox",
|
|
@@ -568,18 +568,18 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
568
568
|
className: L.checkbox
|
|
569
569
|
}
|
|
570
570
|
) }),
|
|
571
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ i("span", { className: L.optionLabel, children: U ? U(p) : A })
|
|
572
572
|
]
|
|
573
573
|
},
|
|
574
|
-
|
|
574
|
+
ft
|
|
575
575
|
);
|
|
576
576
|
}) })
|
|
577
577
|
]
|
|
578
578
|
}
|
|
579
579
|
),
|
|
580
|
-
|
|
580
|
+
C == null ? null : /* @__PURE__ */ i("div", { id: Tt, className: L.error, role: "alert", children: C })
|
|
581
581
|
] });
|
|
582
|
-
}, Sn = "_inputText_2dnll_1", An = "_label_2dnll_9", Rn = "_required_2dnll_20", In = "_tooltipIcon_2dnll_25", Tn = "_input_2dnll_1", Wn = "_inputTextarea_2dnll_72", Mn = "_error_2dnll_79", qn = "_inputTextDisabled_2dnll_88",
|
|
582
|
+
}, Sn = "_inputText_2dnll_1", An = "_label_2dnll_9", Rn = "_required_2dnll_20", In = "_tooltipIcon_2dnll_25", Tn = "_input_2dnll_1", Wn = "_inputTextarea_2dnll_72", Mn = "_error_2dnll_79", qn = "_inputTextDisabled_2dnll_88", xt = {
|
|
583
583
|
inputText: Sn,
|
|
584
584
|
label: An,
|
|
585
585
|
required: Rn,
|
|
@@ -589,59 +589,59 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
589
589
|
error: Mn,
|
|
590
590
|
inputTextDisabled: qn
|
|
591
591
|
}, Io = ({
|
|
592
|
-
label:
|
|
593
|
-
tooltip:
|
|
592
|
+
label: e,
|
|
593
|
+
tooltip: t,
|
|
594
594
|
required: n = !1,
|
|
595
595
|
inputId: r,
|
|
596
596
|
textarea: u = !1,
|
|
597
597
|
rows: d,
|
|
598
|
-
error:
|
|
598
|
+
error: a,
|
|
599
599
|
className: c = "",
|
|
600
600
|
"data-testid": o,
|
|
601
601
|
disabled: v = !1,
|
|
602
602
|
...h
|
|
603
603
|
}) => {
|
|
604
|
-
const { type: B = "text", ...P } = h, l =
|
|
605
|
-
|
|
606
|
-
v ?
|
|
604
|
+
const { type: B = "text", ...P } = h, l = Bt(), f = r ?? `input-text-${l.replace(/[^a-zA-Z0-9_-]/g, "")}`, s = [
|
|
605
|
+
xt.inputText,
|
|
606
|
+
v ? xt.inputTextDisabled : "",
|
|
607
607
|
c
|
|
608
608
|
].filter(Boolean).join(" "), m = P["aria-invalid"];
|
|
609
609
|
let g;
|
|
610
610
|
m === void 0 ? g = void 0 : m === !0 ? g = "true" : m === !1 ? g = "false" : g = m;
|
|
611
|
-
const
|
|
611
|
+
const C = n ? { "aria-required": "true" } : { "aria-required": "false" }, T = g === void 0 && a == null ? {} : { "aria-invalid": g ?? "true" }, N = a == null ? void 0 : `${f}-error`, O = [xt.input, u ? xt.inputTextarea : ""].filter(Boolean).join(" "), W = {
|
|
612
612
|
id: f,
|
|
613
613
|
className: O,
|
|
614
614
|
disabled: v,
|
|
615
|
-
...
|
|
615
|
+
...C,
|
|
616
616
|
...T,
|
|
617
617
|
"aria-describedby": N,
|
|
618
618
|
"data-testid": o ? `${o}-input` : void 0
|
|
619
619
|
};
|
|
620
|
-
return /* @__PURE__ */ R("div", { className:
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
n && /* @__PURE__ */
|
|
624
|
-
|
|
620
|
+
return /* @__PURE__ */ R("div", { className: s, "data-testid": o, children: [
|
|
621
|
+
e != null && /* @__PURE__ */ R("label", { htmlFor: f, className: xt.label, children: [
|
|
622
|
+
e,
|
|
623
|
+
n && /* @__PURE__ */ i("span", { className: xt.required, children: "*" }),
|
|
624
|
+
t != null && /* @__PURE__ */ i(
|
|
625
625
|
"span",
|
|
626
626
|
{
|
|
627
|
-
className:
|
|
628
|
-
title:
|
|
629
|
-
"aria-label":
|
|
630
|
-
children: /* @__PURE__ */
|
|
627
|
+
className: xt.tooltipIcon,
|
|
628
|
+
title: t,
|
|
629
|
+
"aria-label": t,
|
|
630
|
+
children: /* @__PURE__ */ i(en, { "aria-hidden": !0 })
|
|
631
631
|
}
|
|
632
632
|
)
|
|
633
633
|
] }),
|
|
634
|
-
u ? /* @__PURE__ */
|
|
634
|
+
u ? /* @__PURE__ */ i(
|
|
635
635
|
"textarea",
|
|
636
636
|
{
|
|
637
637
|
...P,
|
|
638
638
|
...W,
|
|
639
639
|
rows: d ?? 3
|
|
640
640
|
}
|
|
641
|
-
) : /* @__PURE__ */
|
|
642
|
-
|
|
641
|
+
) : /* @__PURE__ */ i("input", { ...P, ...W, type: B }),
|
|
642
|
+
a == null ? null : /* @__PURE__ */ i("div", { id: N, className: xt.error, role: "alert", children: a })
|
|
643
643
|
] });
|
|
644
|
-
}, zn = "_checkbox_l6y66_1", Vn = "_input_l6y66_12", Hn = "_box_l6y66_26", Kn = "_checkboxDisabled_l6y66_39", Zn = "_checkboxInvalid_l6y66_63", Xn = "_checkboxReadOnly_l6y66_83",
|
|
644
|
+
}, zn = "_checkbox_l6y66_1", Vn = "_input_l6y66_12", Hn = "_box_l6y66_26", Kn = "_checkboxDisabled_l6y66_39", Zn = "_checkboxInvalid_l6y66_63", Xn = "_checkboxReadOnly_l6y66_83", Lt = {
|
|
645
645
|
checkbox: zn,
|
|
646
646
|
input: Vn,
|
|
647
647
|
box: Hn,
|
|
@@ -649,13 +649,13 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
649
649
|
checkboxInvalid: Zn,
|
|
650
650
|
checkboxReadOnly: Xn
|
|
651
651
|
}, To = ({
|
|
652
|
-
checked:
|
|
653
|
-
value:
|
|
652
|
+
checked: e,
|
|
653
|
+
value: t,
|
|
654
654
|
onChange: n,
|
|
655
655
|
inputId: r,
|
|
656
656
|
disabled: u = !1,
|
|
657
657
|
invalid: d = !1,
|
|
658
|
-
className:
|
|
658
|
+
className: a = "",
|
|
659
659
|
name: c,
|
|
660
660
|
readOnly: o,
|
|
661
661
|
required: v,
|
|
@@ -665,30 +665,30 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
665
665
|
"data-testid": l,
|
|
666
666
|
...f
|
|
667
667
|
}) => {
|
|
668
|
-
const
|
|
668
|
+
const s = Bt(), m = r ?? `checkbox-${s.replace(/[^a-zA-Z0-9_-]/g, "")}`, g = (N) => {
|
|
669
669
|
u || o || n == null || n({
|
|
670
670
|
originalEvent: N,
|
|
671
671
|
checked: N.currentTarget.checked,
|
|
672
|
-
...
|
|
672
|
+
...t != null ? { value: t } : {},
|
|
673
673
|
stopPropagation: () => N.stopPropagation(),
|
|
674
674
|
preventDefault: () => N.preventDefault()
|
|
675
675
|
});
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
d ?
|
|
679
|
-
u ?
|
|
680
|
-
o ?
|
|
681
|
-
|
|
676
|
+
}, C = [
|
|
677
|
+
Lt.checkbox,
|
|
678
|
+
d ? Lt.checkboxInvalid : "",
|
|
679
|
+
u ? Lt.checkboxDisabled : "",
|
|
680
|
+
o ? Lt.checkboxReadOnly : "",
|
|
681
|
+
a
|
|
682
682
|
].filter(Boolean).join(" "), T = u;
|
|
683
|
-
return /* @__PURE__ */ R("div", { className:
|
|
684
|
-
/* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ R("div", { className: C, "data-testid": l, children: [
|
|
684
|
+
/* @__PURE__ */ i(
|
|
685
685
|
"input",
|
|
686
686
|
{
|
|
687
687
|
...f,
|
|
688
688
|
type: "checkbox",
|
|
689
689
|
id: m,
|
|
690
|
-
...
|
|
691
|
-
...
|
|
690
|
+
...e !== void 0 ? { checked: e } : {},
|
|
691
|
+
...t != null ? { value: String(t) } : {},
|
|
692
692
|
onChange: g,
|
|
693
693
|
disabled: T,
|
|
694
694
|
readOnly: o,
|
|
@@ -704,39 +704,39 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
704
704
|
"aria-label": B,
|
|
705
705
|
"aria-labelledby": P,
|
|
706
706
|
"aria-invalid": d ? !0 : void 0,
|
|
707
|
-
className:
|
|
707
|
+
className: Lt.input,
|
|
708
708
|
"data-testid": l ? `${l}-input` : void 0
|
|
709
709
|
}
|
|
710
710
|
),
|
|
711
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ i("span", { className: Lt.box, "aria-hidden": "true" })
|
|
712
712
|
] });
|
|
713
|
-
}, Gn = "_root_1uwna_1", Un = "_label_1uwna_7", Yn = "_inputWrap_1uwna_15", Qn = "_inputWrapDisabled_1uwna_28", Jn = "_inputWrapInvalid_1uwna_34",
|
|
713
|
+
}, Gn = "_root_1uwna_1", Un = "_label_1uwna_7", Yn = "_inputWrap_1uwna_15", Qn = "_inputWrapDisabled_1uwna_28", Jn = "_inputWrapInvalid_1uwna_34", tr = "_input_1uwna_15", er = "_dropdownButton_1uwna_55", nr = "_panel_1uwna_71", rr = "_option_1uwna_88", or = "_optionHighlighted_1uwna_94", ir = "_error_1uwna_98", it = {
|
|
714
714
|
root: Gn,
|
|
715
715
|
label: Un,
|
|
716
716
|
inputWrap: Yn,
|
|
717
717
|
inputWrapDisabled: Qn,
|
|
718
718
|
inputWrapInvalid: Jn,
|
|
719
|
-
input:
|
|
720
|
-
dropdownButton:
|
|
719
|
+
input: tr,
|
|
720
|
+
dropdownButton: er,
|
|
721
721
|
panel: nr,
|
|
722
722
|
option: rr,
|
|
723
723
|
optionHighlighted: or,
|
|
724
|
-
error:
|
|
725
|
-
},
|
|
726
|
-
if (
|
|
727
|
-
const r = t
|
|
724
|
+
error: ir
|
|
725
|
+
}, sr = 300, te = (e, t) => {
|
|
726
|
+
if (t) {
|
|
727
|
+
const r = e[t];
|
|
728
728
|
return r != null ? String(r) : "";
|
|
729
729
|
}
|
|
730
|
-
const n = Object.values(
|
|
730
|
+
const n = Object.values(e).find((r) => typeof r == "string");
|
|
731
731
|
return n != null ? String(n) : "";
|
|
732
|
-
},
|
|
733
|
-
value:
|
|
734
|
-
suggestions:
|
|
732
|
+
}, ar = ({
|
|
733
|
+
value: e,
|
|
734
|
+
suggestions: t,
|
|
735
735
|
completeMethod: n,
|
|
736
736
|
field: r,
|
|
737
737
|
onChange: u,
|
|
738
738
|
onSelect: d,
|
|
739
|
-
dropdown:
|
|
739
|
+
dropdown: a = !1,
|
|
740
740
|
disabled: c = !1,
|
|
741
741
|
placeholder: o,
|
|
742
742
|
label: v,
|
|
@@ -745,137 +745,137 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
745
745
|
inputId: P,
|
|
746
746
|
"data-testid": l
|
|
747
747
|
}) => {
|
|
748
|
-
const [f,
|
|
749
|
-
|
|
750
|
-
g((_) =>
|
|
751
|
-
}, [
|
|
752
|
-
const V =
|
|
753
|
-
() =>
|
|
754
|
-
[
|
|
748
|
+
const [f, s] = nt(!1), [m, g] = nt(-1), C = G(null), T = G(null), N = G(), O = Bt(), W = P ?? `autocomplete-${O.replace(/[^a-zA-Z0-9_-]/g, "")}`, U = `${W}-list`, E = h == null ? void 0 : `${W}-error`, x = f && t.length > 0;
|
|
749
|
+
at(() => {
|
|
750
|
+
g((_) => t.length === 0 ? -1 : _ < 0 ? _ : _ >= t.length ? t.length - 1 : _);
|
|
751
|
+
}, [t]);
|
|
752
|
+
const V = st(
|
|
753
|
+
() => t.map((_) => te(_, r)),
|
|
754
|
+
[t, r]
|
|
755
755
|
), H = X(
|
|
756
756
|
(_) => {
|
|
757
757
|
N.current && clearTimeout(N.current), N.current = setTimeout(() => {
|
|
758
758
|
n({ query: _ });
|
|
759
|
-
},
|
|
759
|
+
}, sr);
|
|
760
760
|
},
|
|
761
761
|
[n]
|
|
762
762
|
);
|
|
763
|
-
|
|
763
|
+
at(() => () => {
|
|
764
764
|
N.current && clearTimeout(N.current);
|
|
765
|
-
}, []),
|
|
765
|
+
}, []), at(() => {
|
|
766
766
|
if (!f) return;
|
|
767
|
-
const _ = (
|
|
768
|
-
|
|
767
|
+
const _ = (y) => {
|
|
768
|
+
C.current && !C.current.contains(y.target) && (s(!1), g(-1));
|
|
769
769
|
};
|
|
770
770
|
return document.addEventListener("mousedown", _), () => document.removeEventListener("mousedown", _);
|
|
771
771
|
}, [f]);
|
|
772
772
|
const S = (_) => {
|
|
773
|
-
const
|
|
774
|
-
u({ value:
|
|
775
|
-
}, k = (_,
|
|
773
|
+
const y = _.target.value;
|
|
774
|
+
u({ value: y, originalEvent: _ }), H(y), s(!0), g(-1);
|
|
775
|
+
}, k = (_, y) => {
|
|
776
776
|
N.current && (clearTimeout(N.current), N.current = void 0);
|
|
777
|
-
const q =
|
|
777
|
+
const q = te(_, r);
|
|
778
778
|
u({
|
|
779
779
|
value: q,
|
|
780
|
-
originalEvent:
|
|
781
|
-
}), d == null || d({ value: _, originalEvent:
|
|
780
|
+
originalEvent: y
|
|
781
|
+
}), d == null || d({ value: _, originalEvent: y }), s(!1), g(-1);
|
|
782
782
|
}, w = (_) => {
|
|
783
783
|
if (_.key === "ArrowDown") {
|
|
784
|
-
_.preventDefault(),
|
|
785
|
-
(
|
|
784
|
+
_.preventDefault(), s(!0), g(
|
|
785
|
+
(y) => y < t.length - 1 ? y + 1 : y
|
|
786
786
|
);
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
789
|
if (_.key === "ArrowUp") {
|
|
790
790
|
if (_.preventDefault(), !f) return;
|
|
791
|
-
g((
|
|
791
|
+
g((y) => y > 0 ? y - 1 : 0);
|
|
792
792
|
return;
|
|
793
793
|
}
|
|
794
|
-
if (_.key === "Enter" && f && m >= 0 &&
|
|
795
|
-
_.preventDefault(), k(
|
|
794
|
+
if (_.key === "Enter" && f && m >= 0 && t[m]) {
|
|
795
|
+
_.preventDefault(), k(t[m], _);
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
|
-
_.key === "Escape" && (
|
|
799
|
-
}, z = [
|
|
800
|
-
|
|
801
|
-
c ?
|
|
802
|
-
h ?
|
|
798
|
+
_.key === "Escape" && (s(!1), g(-1));
|
|
799
|
+
}, z = [it.root, B].filter(Boolean).join(" "), $ = [
|
|
800
|
+
it.inputWrap,
|
|
801
|
+
c ? it.inputWrapDisabled : "",
|
|
802
|
+
h ? it.inputWrapInvalid : ""
|
|
803
803
|
].filter(Boolean).join(" ");
|
|
804
|
-
return /* @__PURE__ */ R("div", { className: z, ref:
|
|
805
|
-
v != null && /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ R("div", { className: z, ref: C, "data-testid": l, children: [
|
|
805
|
+
v != null && /* @__PURE__ */ i("label", { htmlFor: W, className: it.label, children: v }),
|
|
806
806
|
/* @__PURE__ */ R("div", { className: $, children: [
|
|
807
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ i(
|
|
808
808
|
"input",
|
|
809
809
|
{
|
|
810
810
|
ref: T,
|
|
811
811
|
id: W,
|
|
812
812
|
type: "text",
|
|
813
|
-
className:
|
|
814
|
-
value:
|
|
813
|
+
className: it.input,
|
|
814
|
+
value: e,
|
|
815
815
|
onChange: S,
|
|
816
816
|
onKeyDown: w,
|
|
817
817
|
onFocus: () => {
|
|
818
|
-
c ||
|
|
818
|
+
c || s(!0);
|
|
819
819
|
},
|
|
820
820
|
onBlur: (_) => {
|
|
821
|
-
var
|
|
822
|
-
(
|
|
821
|
+
var y;
|
|
822
|
+
(y = C.current) != null && y.contains(_.relatedTarget) || (s(!1), g(-1));
|
|
823
823
|
},
|
|
824
824
|
disabled: c,
|
|
825
825
|
placeholder: o,
|
|
826
826
|
role: "combobox",
|
|
827
|
-
"aria-expanded":
|
|
827
|
+
"aria-expanded": x,
|
|
828
828
|
"aria-haspopup": "listbox",
|
|
829
|
-
"aria-controls":
|
|
830
|
-
"aria-activedescendant":
|
|
829
|
+
"aria-controls": x ? U : void 0,
|
|
830
|
+
"aria-activedescendant": x && m >= 0 ? `${W}-option-${m}` : void 0,
|
|
831
831
|
"aria-autocomplete": "list",
|
|
832
832
|
"aria-invalid": h ? !0 : void 0,
|
|
833
833
|
"aria-describedby": E,
|
|
834
834
|
"data-testid": l ? `${l}-input` : void 0
|
|
835
835
|
}
|
|
836
836
|
),
|
|
837
|
-
|
|
837
|
+
a && /* @__PURE__ */ i(
|
|
838
838
|
"button",
|
|
839
839
|
{
|
|
840
840
|
type: "button",
|
|
841
|
-
className:
|
|
841
|
+
className: it.dropdownButton,
|
|
842
842
|
disabled: c,
|
|
843
843
|
onClick: () => {
|
|
844
844
|
var _;
|
|
845
|
-
c || (
|
|
846
|
-
const q = !
|
|
847
|
-
return q && H(
|
|
845
|
+
c || (s((y) => {
|
|
846
|
+
const q = !y;
|
|
847
|
+
return q && H(e), q;
|
|
848
848
|
}), (_ = T.current) == null || _.focus());
|
|
849
849
|
},
|
|
850
850
|
"aria-label": "Show suggestions",
|
|
851
851
|
"data-testid": l ? `${l}-dropdown` : void 0,
|
|
852
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ i(Zt, { "aria-hidden": !0 })
|
|
853
853
|
}
|
|
854
854
|
)
|
|
855
855
|
] }),
|
|
856
|
-
|
|
856
|
+
x && /* @__PURE__ */ i(
|
|
857
857
|
"ul",
|
|
858
858
|
{
|
|
859
859
|
id: U,
|
|
860
|
-
className:
|
|
860
|
+
className: it.panel,
|
|
861
861
|
role: "listbox",
|
|
862
862
|
"data-testid": l ? `${l}-panel` : void 0,
|
|
863
|
-
children:
|
|
864
|
-
const q = V[
|
|
865
|
-
return /* @__PURE__ */
|
|
863
|
+
children: t.map((_, y) => {
|
|
864
|
+
const q = V[y], K = `${W}-option-${y}`;
|
|
865
|
+
return /* @__PURE__ */ i(
|
|
866
866
|
"li",
|
|
867
867
|
{
|
|
868
868
|
id: K,
|
|
869
869
|
role: "option",
|
|
870
|
-
"aria-selected":
|
|
870
|
+
"aria-selected": y === m,
|
|
871
871
|
className: [
|
|
872
|
-
|
|
873
|
-
|
|
872
|
+
it.option,
|
|
873
|
+
y === m ? it.optionHighlighted : ""
|
|
874
874
|
].filter(Boolean).join(" "),
|
|
875
|
-
onMouseDown: (
|
|
876
|
-
|
|
875
|
+
onMouseDown: (ot) => {
|
|
876
|
+
ot.preventDefault(), k(_, ot);
|
|
877
877
|
},
|
|
878
|
-
"data-testid": l ? `${l}-option-${
|
|
878
|
+
"data-testid": l ? `${l}-option-${y}` : void 0,
|
|
879
879
|
children: q
|
|
880
880
|
},
|
|
881
881
|
K
|
|
@@ -883,11 +883,11 @@ const rn = "_dropdown_t970l_1", on = "_label_t970l_8", sn = "_required_t970l_17"
|
|
|
883
883
|
})
|
|
884
884
|
}
|
|
885
885
|
),
|
|
886
|
-
h != null && /* @__PURE__ */
|
|
886
|
+
h != null && /* @__PURE__ */ i("div", { id: E, className: it.error, role: "alert", children: h })
|
|
887
887
|
] });
|
|
888
888
|
};
|
|
889
|
-
|
|
890
|
-
const lr = "_accordion_l1hoq_1", cr = "_tab_l1hoq_6", ur = "_headerButton_l1hoq_11", dr = "_headerContent_l1hoq_39", pr = "_icon_l1hoq_45", fr = "_panel_l1hoq_53", hr = "_panelCollapsed_l1hoq_58", _r = "_panelOpen_l1hoq_64", mr = "_panelContent_l1hoq_70", vr = "_noBorderLast_l1hoq_74",
|
|
889
|
+
ar.displayName = "AutoComplete";
|
|
890
|
+
const lr = "_accordion_l1hoq_1", cr = "_tab_l1hoq_6", ur = "_headerButton_l1hoq_11", dr = "_headerContent_l1hoq_39", pr = "_icon_l1hoq_45", fr = "_panel_l1hoq_53", hr = "_panelCollapsed_l1hoq_58", _r = "_panelOpen_l1hoq_64", mr = "_panelContent_l1hoq_70", vr = "_noBorderLast_l1hoq_74", ct = {
|
|
891
891
|
accordion: lr,
|
|
892
892
|
tab: cr,
|
|
893
893
|
headerButton: ur,
|
|
@@ -898,16 +898,16 @@ const lr = "_accordion_l1hoq_1", cr = "_tab_l1hoq_6", ur = "_headerButton_l1hoq_
|
|
|
898
898
|
panelOpen: _r,
|
|
899
899
|
panelContent: mr,
|
|
900
900
|
noBorderLast: vr
|
|
901
|
-
},
|
|
902
|
-
|
|
903
|
-
const
|
|
904
|
-
activeIndex:
|
|
905
|
-
multiple:
|
|
901
|
+
}, ae = (e) => null;
|
|
902
|
+
ae.displayName = "AccordionTab";
|
|
903
|
+
const yr = (e, t) => e == null ? [] : Array.isArray(e) ? t ? e : e.slice(0, 1) : [e], br = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), gr = ({
|
|
904
|
+
activeIndex: e,
|
|
905
|
+
multiple: t = !1,
|
|
906
906
|
expandIcon: n,
|
|
907
907
|
collapseIcon: r,
|
|
908
908
|
onTabChange: u,
|
|
909
909
|
onTabOpen: d,
|
|
910
|
-
onTabClose:
|
|
910
|
+
onTabClose: a,
|
|
911
911
|
className: c = "",
|
|
912
912
|
transitionOptions: o,
|
|
913
913
|
pt: v,
|
|
@@ -916,48 +916,48 @@ const br = (t, e) => t == null ? [] : Array.isArray(t) ? e ? t : t.slice(0, 1) :
|
|
|
916
916
|
children: P,
|
|
917
917
|
...l
|
|
918
918
|
}) => {
|
|
919
|
-
const f =
|
|
920
|
-
(k) =>
|
|
921
|
-
), [P]), g =
|
|
919
|
+
const f = Bt(), s = br(f), m = st(() => dt.Children.toArray(P).filter(
|
|
920
|
+
(k) => dt.isValidElement(k) && k.type === ae
|
|
921
|
+
), [P]), g = e !== void 0, C = st(() => yr(e, t), [e, t]), [T, N] = nt([]), O = g ? C : T, W = typeof o == "object" && o != null && typeof o.timeout == "number" ? o.timeout : void 0, U = /* @__PURE__ */ i(nn, { "aria-hidden": !0 }), E = /* @__PURE__ */ i(Zt, { "aria-hidden": !0 }), x = n ?? U, V = r ?? E, H = (S, k) => {
|
|
922
922
|
const w = O.includes(S);
|
|
923
|
-
if (
|
|
924
|
-
const _ = w ? O.filter((
|
|
925
|
-
g || N(_), u == null || u({ index: _, originalEvent: k }), w ?
|
|
923
|
+
if (t) {
|
|
924
|
+
const _ = w ? O.filter((y) => y !== S) : [...O, S];
|
|
925
|
+
g || N(_), u == null || u({ index: _, originalEvent: k }), w ? a == null || a({ index: S, originalEvent: k }) : d == null || d({ index: S, originalEvent: k });
|
|
926
926
|
return;
|
|
927
927
|
}
|
|
928
928
|
const z = O.length ? O[0] : null, $ = w ? [] : [S];
|
|
929
929
|
if (g || N($), u == null || u({ index: $, originalEvent: k }), w) {
|
|
930
|
-
|
|
930
|
+
a == null || a({ index: S, originalEvent: k });
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
z != null && (
|
|
933
|
+
z != null && (a == null || a({ index: z, originalEvent: k })), d == null || d({ index: S, originalEvent: k });
|
|
934
934
|
};
|
|
935
|
-
return /* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ i(
|
|
936
936
|
"div",
|
|
937
937
|
{
|
|
938
|
-
className: [
|
|
938
|
+
className: [ct.accordion, c].filter(Boolean).join(" "),
|
|
939
939
|
...l,
|
|
940
940
|
children: m.map((S, k) => {
|
|
941
941
|
var J;
|
|
942
|
-
const w = S.props, z = O.includes(k), $ = !!w.disabled, _ = `${
|
|
942
|
+
const w = S.props, z = O.includes(k), $ = !!w.disabled, _ = `${s}-header-${k}`, y = `${s}-content-${k}`, q = w.headerTemplate != null ? typeof w.headerTemplate == "function" ? w.headerTemplate({
|
|
943
943
|
index: k,
|
|
944
944
|
selected: z,
|
|
945
945
|
disabled: $,
|
|
946
946
|
count: m.length,
|
|
947
947
|
first: k === 0,
|
|
948
948
|
last: k === m.length - 1
|
|
949
|
-
}) : w.headerTemplate : w.header, K = z ? V :
|
|
950
|
-
|
|
949
|
+
}) : w.headerTemplate : w.header, K = z ? V : x, ot = [
|
|
950
|
+
ct.headerButton,
|
|
951
951
|
w.headerClassName ?? ""
|
|
952
|
-
].filter(Boolean).join(" "),
|
|
953
|
-
|
|
952
|
+
].filter(Boolean).join(" "), lt = [
|
|
953
|
+
ct.tab,
|
|
954
954
|
w.className ?? "",
|
|
955
|
-
k === m.length - 1 ?
|
|
955
|
+
k === m.length - 1 ? ct.noBorderLast : ""
|
|
956
956
|
].filter(Boolean).join(" "), Z = typeof q == "string" ? q : void 0;
|
|
957
957
|
return /* @__PURE__ */ R(
|
|
958
958
|
"div",
|
|
959
959
|
{
|
|
960
|
-
className:
|
|
960
|
+
className: lt,
|
|
961
961
|
style: w.style,
|
|
962
962
|
children: [
|
|
963
963
|
/* @__PURE__ */ R(
|
|
@@ -966,9 +966,9 @@ const br = (t, e) => t == null ? [] : Array.isArray(t) ? e ? t : t.slice(0, 1) :
|
|
|
966
966
|
id: _,
|
|
967
967
|
type: "button",
|
|
968
968
|
disabled: $,
|
|
969
|
-
className:
|
|
969
|
+
className: ot,
|
|
970
970
|
style: w.headerStyle,
|
|
971
|
-
"aria-controls":
|
|
971
|
+
"aria-controls": y,
|
|
972
972
|
"aria-expanded": z,
|
|
973
973
|
"aria-disabled": $,
|
|
974
974
|
tabIndex: w.tabIndex,
|
|
@@ -976,30 +976,30 @@ const br = (t, e) => t == null ? [] : Array.isArray(t) ? e ? t : t.slice(0, 1) :
|
|
|
976
976
|
...w.headerProps,
|
|
977
977
|
"aria-label": ((J = w.headerProps) == null ? void 0 : J["aria-label"]) ?? Z,
|
|
978
978
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ i("span", { className: ct.headerContent, children: q }),
|
|
980
|
+
/* @__PURE__ */ i("span", { className: ct.icon, "aria-hidden": !0, children: K })
|
|
981
981
|
]
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ i(
|
|
985
985
|
"div",
|
|
986
986
|
{
|
|
987
|
-
id:
|
|
987
|
+
id: y,
|
|
988
988
|
role: "region",
|
|
989
989
|
"aria-labelledby": _,
|
|
990
990
|
"aria-hidden": !z,
|
|
991
991
|
className: [
|
|
992
|
-
|
|
993
|
-
z ?
|
|
992
|
+
ct.panel,
|
|
993
|
+
z ? ct.panelOpen : ct.panelCollapsed
|
|
994
994
|
].join(" "),
|
|
995
995
|
style: {
|
|
996
996
|
transitionDuration: W ? `${W}ms` : void 0
|
|
997
997
|
},
|
|
998
|
-
children: /* @__PURE__ */
|
|
998
|
+
children: /* @__PURE__ */ i(
|
|
999
999
|
"div",
|
|
1000
1000
|
{
|
|
1001
1001
|
className: [
|
|
1002
|
-
|
|
1002
|
+
ct.panelContent,
|
|
1003
1003
|
w.contentClassName ?? ""
|
|
1004
1004
|
].filter(Boolean).join(" "),
|
|
1005
1005
|
style: w.contentStyle,
|
|
@@ -1017,253 +1017,253 @@ const br = (t, e) => t == null ? [] : Array.isArray(t) ? e ? t : t.slice(0, 1) :
|
|
|
1017
1017
|
);
|
|
1018
1018
|
};
|
|
1019
1019
|
gr.displayName = "Accordion";
|
|
1020
|
-
const wr = "_selectButton_1u3fo_1", kr = "_selectButtonDisabled_1u3fo_9",
|
|
1020
|
+
const wr = "_selectButton_1u3fo_1", kr = "_selectButtonDisabled_1u3fo_9", xr = "_selectButtonInvalid_1u3fo_14", Cr = "_button_1u3fo_14", Nr = "_buttonFirst_1u3fo_47", Br = "_buttonLast_1u3fo_51", Pr = "_buttonSelected_1u3fo_59", Nt = {
|
|
1021
1021
|
selectButton: wr,
|
|
1022
1022
|
selectButtonDisabled: kr,
|
|
1023
|
-
selectButtonInvalid:
|
|
1024
|
-
button:
|
|
1023
|
+
selectButtonInvalid: xr,
|
|
1024
|
+
button: Cr,
|
|
1025
1025
|
buttonFirst: Nr,
|
|
1026
1026
|
buttonLast: Br,
|
|
1027
1027
|
buttonSelected: Pr
|
|
1028
|
-
},
|
|
1029
|
-
const r = t
|
|
1028
|
+
}, ee = (e, t) => {
|
|
1029
|
+
const r = e[t];
|
|
1030
1030
|
return r != null ? String(r) : "";
|
|
1031
|
-
},
|
|
1032
|
-
value:
|
|
1033
|
-
onChange:
|
|
1031
|
+
}, Mt = (e, t) => e[t], ne = (e, t) => t == null ? !1 : !!e[t], Wo = ({
|
|
1032
|
+
value: e,
|
|
1033
|
+
onChange: t,
|
|
1034
1034
|
options: n,
|
|
1035
1035
|
optionLabel: r = "label",
|
|
1036
1036
|
optionValue: u = "value",
|
|
1037
1037
|
optionDisabled: d,
|
|
1038
|
-
multiple:
|
|
1038
|
+
multiple: a = !1,
|
|
1039
1039
|
itemTemplate: c,
|
|
1040
1040
|
disabled: o = !1,
|
|
1041
1041
|
invalid: v = !1,
|
|
1042
1042
|
className: h = "",
|
|
1043
1043
|
"data-testid": B
|
|
1044
1044
|
}) => {
|
|
1045
|
-
const P = (
|
|
1046
|
-
const m =
|
|
1047
|
-
return
|
|
1048
|
-
}, l = (
|
|
1049
|
-
if (o ||
|
|
1050
|
-
const g =
|
|
1045
|
+
const P = (s) => {
|
|
1046
|
+
const m = Mt(s, u);
|
|
1047
|
+
return a && Array.isArray(e) ? e.includes(m) : e === m;
|
|
1048
|
+
}, l = (s, m) => {
|
|
1049
|
+
if (o || ne(s, d)) return;
|
|
1050
|
+
const g = Mt(s, u);
|
|
1051
1051
|
if (g === void 0) return;
|
|
1052
|
-
let
|
|
1053
|
-
if (
|
|
1054
|
-
const T = Array.isArray(
|
|
1055
|
-
|
|
1052
|
+
let C;
|
|
1053
|
+
if (a) {
|
|
1054
|
+
const T = Array.isArray(e) ? e : [];
|
|
1055
|
+
C = T.includes(g) ? T.filter((O) => O !== g) : [...T, g];
|
|
1056
1056
|
} else
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
value:
|
|
1057
|
+
C = e === g ? null : g;
|
|
1058
|
+
t == null || t({
|
|
1059
|
+
value: C,
|
|
1060
1060
|
originalEvent: m
|
|
1061
1061
|
});
|
|
1062
1062
|
}, f = [
|
|
1063
|
-
|
|
1064
|
-
o ?
|
|
1065
|
-
v ?
|
|
1063
|
+
Nt.selectButton,
|
|
1064
|
+
o ? Nt.selectButtonDisabled : "",
|
|
1065
|
+
v ? Nt.selectButtonInvalid : "",
|
|
1066
1066
|
h
|
|
1067
1067
|
].filter(Boolean).join(" ");
|
|
1068
|
-
return /* @__PURE__ */
|
|
1068
|
+
return /* @__PURE__ */ i(
|
|
1069
1069
|
"div",
|
|
1070
1070
|
{
|
|
1071
1071
|
className: f,
|
|
1072
1072
|
role: "group",
|
|
1073
1073
|
"aria-disabled": o,
|
|
1074
1074
|
"data-testid": B,
|
|
1075
|
-
children: n.map((
|
|
1076
|
-
const g =
|
|
1077
|
-
return /* @__PURE__ */
|
|
1075
|
+
children: n.map((s, m) => {
|
|
1076
|
+
const g = Mt(s, u), C = g != null ? String(g) : `option-${m}`, T = ne(s, d), N = P(s);
|
|
1077
|
+
return /* @__PURE__ */ i(
|
|
1078
1078
|
"button",
|
|
1079
1079
|
{
|
|
1080
1080
|
type: "button",
|
|
1081
1081
|
"aria-pressed": N,
|
|
1082
1082
|
"aria-disabled": T || o,
|
|
1083
|
-
"aria-label":
|
|
1083
|
+
"aria-label": ee(s, r),
|
|
1084
1084
|
disabled: o || T,
|
|
1085
1085
|
className: [
|
|
1086
|
-
|
|
1087
|
-
N ?
|
|
1088
|
-
m === 0 ?
|
|
1089
|
-
m === n.length - 1 ?
|
|
1086
|
+
Nt.button,
|
|
1087
|
+
N ? Nt.buttonSelected : "",
|
|
1088
|
+
m === 0 ? Nt.buttonFirst : "",
|
|
1089
|
+
m === n.length - 1 ? Nt.buttonLast : ""
|
|
1090
1090
|
].filter(Boolean).join(" "),
|
|
1091
|
-
onClick: (O) => l(
|
|
1091
|
+
onClick: (O) => l(s, O),
|
|
1092
1092
|
onKeyDown: (O) => {
|
|
1093
|
-
(O.key === " " || O.key === "Enter") && (O.preventDefault(), l(
|
|
1093
|
+
(O.key === " " || O.key === "Enter") && (O.preventDefault(), l(s, O));
|
|
1094
1094
|
},
|
|
1095
1095
|
"data-testid": B ? `${B}-option-${m}` : void 0,
|
|
1096
|
-
children: c ? c(
|
|
1096
|
+
children: c ? c(s) : ee(s, r)
|
|
1097
1097
|
},
|
|
1098
|
-
|
|
1098
|
+
C
|
|
1099
1099
|
);
|
|
1100
1100
|
})
|
|
1101
1101
|
}
|
|
1102
1102
|
);
|
|
1103
|
-
}, Lr = "_radioButton_l80ql_1", $r = "_radioButtonDisabled_l80ql_10", Er = "_label_l80ql_14", Dr = "_input_l80ql_18",
|
|
1103
|
+
}, Lr = "_radioButton_l80ql_1", $r = "_radioButtonDisabled_l80ql_10", Er = "_label_l80ql_14", Dr = "_input_l80ql_18", jt = {
|
|
1104
1104
|
radioButton: Lr,
|
|
1105
1105
|
radioButtonDisabled: $r,
|
|
1106
1106
|
label: Er,
|
|
1107
1107
|
input: Dr
|
|
1108
1108
|
}, Mo = ({
|
|
1109
|
-
inputId:
|
|
1110
|
-
name:
|
|
1109
|
+
inputId: e,
|
|
1110
|
+
name: t,
|
|
1111
1111
|
value: n,
|
|
1112
1112
|
checked: r,
|
|
1113
1113
|
onChange: u,
|
|
1114
1114
|
disabled: d = !1,
|
|
1115
|
-
label:
|
|
1115
|
+
label: a,
|
|
1116
1116
|
className: c = "",
|
|
1117
1117
|
"data-testid": o,
|
|
1118
1118
|
...v
|
|
1119
1119
|
}) => {
|
|
1120
|
-
const h =
|
|
1120
|
+
const h = Bt(), B = e ?? `radiobutton-${h.replace(/[^a-zA-Z0-9_-]/g, "")}`, P = (f) => {
|
|
1121
1121
|
u == null || u({ value: n, originalEvent: f });
|
|
1122
1122
|
}, l = [
|
|
1123
|
-
|
|
1124
|
-
d ?
|
|
1123
|
+
jt.radioButton,
|
|
1124
|
+
d ? jt.radioButtonDisabled : "",
|
|
1125
1125
|
c
|
|
1126
1126
|
].filter(Boolean).join(" ");
|
|
1127
1127
|
return /* @__PURE__ */ R("div", { className: l, "data-testid": o, children: [
|
|
1128
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ i(
|
|
1129
1129
|
"input",
|
|
1130
1130
|
{
|
|
1131
1131
|
...v,
|
|
1132
1132
|
type: "radio",
|
|
1133
1133
|
id: B,
|
|
1134
|
-
name:
|
|
1134
|
+
name: t,
|
|
1135
1135
|
value: String(n),
|
|
1136
1136
|
...r !== void 0 ? { checked: r } : {},
|
|
1137
1137
|
disabled: d,
|
|
1138
1138
|
onChange: P,
|
|
1139
|
-
className:
|
|
1139
|
+
className: jt.input,
|
|
1140
1140
|
"data-testid": o ? `${o}-input` : void 0
|
|
1141
1141
|
}
|
|
1142
1142
|
),
|
|
1143
|
-
|
|
1143
|
+
a != null && /* @__PURE__ */ i("label", { htmlFor: B, className: jt.label, children: a })
|
|
1144
1144
|
] });
|
|
1145
|
-
}, jr = "_anchorWrap_h9mnj_1", Fr = "_panel_h9mnj_7", Or = "_panelInteractive_h9mnj_23", Sr = "_panelPassThrough_h9mnj_27",
|
|
1145
|
+
}, jr = "_anchorWrap_h9mnj_1", Fr = "_panel_h9mnj_7", Or = "_panelInteractive_h9mnj_23", Sr = "_panelPassThrough_h9mnj_27", Ot = {
|
|
1146
1146
|
anchorWrap: jr,
|
|
1147
1147
|
panel: Fr,
|
|
1148
1148
|
panelInteractive: Or,
|
|
1149
1149
|
panelPassThrough: Sr
|
|
1150
|
-
},
|
|
1151
|
-
function
|
|
1152
|
-
return (
|
|
1153
|
-
|
|
1150
|
+
}, Et = 8, Ft = 8;
|
|
1151
|
+
function Dt(...e) {
|
|
1152
|
+
return (t) => {
|
|
1153
|
+
e.forEach((n) => n == null ? void 0 : n(t));
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
|
-
function Ar(
|
|
1157
|
-
if (
|
|
1158
|
-
return
|
|
1156
|
+
function Ar(e) {
|
|
1157
|
+
if (e === "top" || e === "bottom" || e === "left" || e === "right" || e === "mouse")
|
|
1158
|
+
return e;
|
|
1159
1159
|
}
|
|
1160
|
-
function Rr(
|
|
1160
|
+
function Rr(e) {
|
|
1161
1161
|
const {
|
|
1162
|
-
anchorRect:
|
|
1162
|
+
anchorRect: t,
|
|
1163
1163
|
tooltipRect: n,
|
|
1164
1164
|
placement: r,
|
|
1165
1165
|
pointer: u,
|
|
1166
1166
|
mouseTrack: d,
|
|
1167
|
-
mouseTrackTop:
|
|
1167
|
+
mouseTrackTop: a,
|
|
1168
1168
|
mouseTrackLeft: c
|
|
1169
|
-
} =
|
|
1169
|
+
} = e;
|
|
1170
1170
|
if (r === "mouse" || d)
|
|
1171
1171
|
return {
|
|
1172
|
-
top: u.y +
|
|
1172
|
+
top: u.y + a,
|
|
1173
1173
|
left: u.x + c
|
|
1174
1174
|
};
|
|
1175
1175
|
let o = 0, v = 0;
|
|
1176
1176
|
switch (r) {
|
|
1177
1177
|
case "top":
|
|
1178
|
-
o =
|
|
1178
|
+
o = t.top - n.height - Et, v = t.left + t.width / 2 - n.width / 2;
|
|
1179
1179
|
break;
|
|
1180
1180
|
case "bottom":
|
|
1181
|
-
o =
|
|
1181
|
+
o = t.bottom + Et, v = t.left + t.width / 2 - n.width / 2;
|
|
1182
1182
|
break;
|
|
1183
1183
|
case "left":
|
|
1184
|
-
o =
|
|
1184
|
+
o = t.top + t.height / 2 - n.height / 2, v = t.left - n.width - Et;
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "right":
|
|
1187
|
-
o =
|
|
1187
|
+
o = t.top + t.height / 2 - n.height / 2, v = t.right + Et;
|
|
1188
1188
|
break;
|
|
1189
1189
|
default:
|
|
1190
|
-
o =
|
|
1190
|
+
o = t.top - n.height - Et, v = t.left + t.width / 2 - n.width / 2;
|
|
1191
1191
|
}
|
|
1192
1192
|
const h = window.innerWidth, B = window.innerHeight;
|
|
1193
1193
|
return v = Math.min(
|
|
1194
|
-
Math.max(v,
|
|
1195
|
-
h - n.width -
|
|
1194
|
+
Math.max(v, Ft),
|
|
1195
|
+
h - n.width - Ft
|
|
1196
1196
|
), o = Math.min(
|
|
1197
|
-
Math.max(o,
|
|
1198
|
-
B - n.height -
|
|
1197
|
+
Math.max(o, Ft),
|
|
1198
|
+
B - n.height - Ft
|
|
1199
1199
|
), { top: o, left: v };
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1202
|
-
const n =
|
|
1203
|
-
return n != null && n !== "" ? n :
|
|
1201
|
+
function qt(e, t) {
|
|
1202
|
+
const n = e.getAttribute("data-pr-tooltip");
|
|
1203
|
+
return n != null && n !== "" ? n : t ?? "";
|
|
1204
1204
|
}
|
|
1205
|
-
function Ir(
|
|
1206
|
-
return
|
|
1205
|
+
function Ir(e) {
|
|
1206
|
+
return e == null ? !0 : typeof e == "string" || typeof e == "number" ? String(e) === "" : !1;
|
|
1207
1207
|
}
|
|
1208
1208
|
const Tr = ({
|
|
1209
|
-
children:
|
|
1210
|
-
className:
|
|
1209
|
+
children: e,
|
|
1210
|
+
className: t,
|
|
1211
1211
|
eventMode: n,
|
|
1212
1212
|
onAnchorMouseEnter: r,
|
|
1213
1213
|
onAnchorMouseMove: u,
|
|
1214
1214
|
onAnchorMouseLeave: d,
|
|
1215
|
-
onAnchorFocusIn:
|
|
1215
|
+
onAnchorFocusIn: a,
|
|
1216
1216
|
onAnchorFocusOut: c
|
|
1217
1217
|
}) => {
|
|
1218
|
-
const o =
|
|
1219
|
-
if (o.length !== 1 || !
|
|
1220
|
-
const f = [
|
|
1221
|
-
return /* @__PURE__ */
|
|
1218
|
+
const o = dt.Children.toArray(e);
|
|
1219
|
+
if (o.length !== 1 || !be(o[0])) {
|
|
1220
|
+
const f = [Ot.anchorWrap, t].filter(Boolean).join(" ");
|
|
1221
|
+
return /* @__PURE__ */ i("span", { className: f, ...n === "hover" || n === "both" ? {
|
|
1222
1222
|
onMouseEnter: r,
|
|
1223
1223
|
onMouseMove: u,
|
|
1224
1224
|
onMouseLeave: d
|
|
1225
1225
|
} : {}, ...n === "focus" || n === "both" ? {
|
|
1226
|
-
onFocusCapture:
|
|
1226
|
+
onFocusCapture: a,
|
|
1227
1227
|
onBlurCapture: c
|
|
1228
|
-
} : {}, children:
|
|
1228
|
+
} : {}, children: e });
|
|
1229
1229
|
}
|
|
1230
1230
|
const h = o[0], B = n === "hover" || n === "both" ? {
|
|
1231
|
-
onMouseEnter:
|
|
1231
|
+
onMouseEnter: Dt(
|
|
1232
1232
|
r,
|
|
1233
1233
|
h.props.onMouseEnter
|
|
1234
1234
|
),
|
|
1235
|
-
onMouseMove:
|
|
1235
|
+
onMouseMove: Dt(
|
|
1236
1236
|
u,
|
|
1237
1237
|
h.props.onMouseMove
|
|
1238
1238
|
),
|
|
1239
|
-
onMouseLeave:
|
|
1239
|
+
onMouseLeave: Dt(
|
|
1240
1240
|
d,
|
|
1241
1241
|
h.props.onMouseLeave
|
|
1242
1242
|
)
|
|
1243
1243
|
} : {}, P = n === "focus" || n === "both" ? {
|
|
1244
|
-
onFocusCapture:
|
|
1245
|
-
|
|
1244
|
+
onFocusCapture: Dt(
|
|
1245
|
+
a,
|
|
1246
1246
|
h.props.onFocusCapture
|
|
1247
1247
|
),
|
|
1248
|
-
onBlurCapture:
|
|
1248
|
+
onBlurCapture: Dt(
|
|
1249
1249
|
c,
|
|
1250
1250
|
h.props.onBlurCapture
|
|
1251
1251
|
)
|
|
1252
|
-
} : {}, l = [
|
|
1253
|
-
return
|
|
1252
|
+
} : {}, l = [t, h.props.className].filter(Boolean).join(" ");
|
|
1253
|
+
return ge(h, {
|
|
1254
1254
|
...B,
|
|
1255
1255
|
...P,
|
|
1256
1256
|
...l ? { className: l } : {},
|
|
1257
1257
|
ref: h.props.ref
|
|
1258
1258
|
});
|
|
1259
1259
|
}, qo = ({
|
|
1260
|
-
target:
|
|
1261
|
-
content:
|
|
1260
|
+
target: e,
|
|
1261
|
+
content: t,
|
|
1262
1262
|
position: n = "top",
|
|
1263
1263
|
event: r = "hover",
|
|
1264
1264
|
showDelay: u = 0,
|
|
1265
1265
|
hideDelay: d = 0,
|
|
1266
|
-
autoHide:
|
|
1266
|
+
autoHide: a = !0,
|
|
1267
1267
|
mouseTrack: c = !1,
|
|
1268
1268
|
mouseTrackTop: o = 0,
|
|
1269
1269
|
mouseTrackLeft: v = 0,
|
|
@@ -1272,28 +1272,28 @@ const Tr = ({
|
|
|
1272
1272
|
panelClassName: P = "",
|
|
1273
1273
|
id: l,
|
|
1274
1274
|
children: f,
|
|
1275
|
-
"data-testid":
|
|
1275
|
+
"data-testid": s
|
|
1276
1276
|
}) => {
|
|
1277
|
-
const m =
|
|
1277
|
+
const m = Bt().replace(/:/g, ""), g = l ?? `emporix-tooltip-${m}`, [C, T] = nt(!1), [N, O] = nt({ top: 0, left: 0 }), [W, U] = nt(null), E = G(null), x = G(null), V = G({ x: 0, y: 0 }), H = G(), S = G(), k = X(() => {
|
|
1278
1278
|
H.current != null && (clearTimeout(H.current), H.current = void 0);
|
|
1279
1279
|
}, []), w = X(() => {
|
|
1280
1280
|
S.current != null && (clearTimeout(S.current), S.current = void 0);
|
|
1281
1281
|
}, []), z = X(() => {
|
|
1282
|
-
const
|
|
1283
|
-
if (
|
|
1284
|
-
const D = Ar(
|
|
1282
|
+
const b = E.current;
|
|
1283
|
+
if (b) {
|
|
1284
|
+
const D = Ar(b.getAttribute("data-pr-position"));
|
|
1285
1285
|
if (D) return D;
|
|
1286
1286
|
}
|
|
1287
1287
|
return n;
|
|
1288
1288
|
}, [n]), $ = X(() => {
|
|
1289
|
-
const
|
|
1290
|
-
if (!
|
|
1291
|
-
const
|
|
1289
|
+
const b = E.current, D = x.current;
|
|
1290
|
+
if (!b || !D) return;
|
|
1291
|
+
const tt = b.getBoundingClientRect(), bt = D.getBoundingClientRect(), pt = z();
|
|
1292
1292
|
O(
|
|
1293
1293
|
Rr({
|
|
1294
|
-
anchorRect:
|
|
1295
|
-
tooltipRect:
|
|
1296
|
-
placement:
|
|
1294
|
+
anchorRect: tt,
|
|
1295
|
+
tooltipRect: bt,
|
|
1296
|
+
placement: pt,
|
|
1297
1297
|
pointer: V.current,
|
|
1298
1298
|
mouseTrack: c,
|
|
1299
1299
|
mouseTrackTop: o,
|
|
@@ -1302,12 +1302,12 @@ const Tr = ({
|
|
|
1302
1302
|
);
|
|
1303
1303
|
}, [z, c, o, v]), _ = X(() => {
|
|
1304
1304
|
k(), w();
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
}, [w, k]),
|
|
1308
|
-
(
|
|
1309
|
-
h || Ir(D) || (w(), k(), E.current =
|
|
1310
|
-
T(!0),
|
|
1305
|
+
const b = E.current;
|
|
1306
|
+
b instanceof HTMLElement && b.removeAttribute("aria-describedby"), T(!1), E.current = null;
|
|
1307
|
+
}, [w, k]), y = X(
|
|
1308
|
+
(b, D) => {
|
|
1309
|
+
h || Ir(D) || (w(), k(), E.current = b, U(D), H.current = setTimeout(() => {
|
|
1310
|
+
T(!0), b instanceof HTMLElement && b.setAttribute("aria-describedby", g);
|
|
1311
1311
|
}, u));
|
|
1312
1312
|
},
|
|
1313
1313
|
[w, k, h, u, g]
|
|
@@ -1316,146 +1316,146 @@ const Tr = ({
|
|
|
1316
1316
|
_();
|
|
1317
1317
|
}, d);
|
|
1318
1318
|
}, [w, k, _, d]), K = X(
|
|
1319
|
-
(
|
|
1320
|
-
!
|
|
1319
|
+
(b) => {
|
|
1320
|
+
!a && x.current && b instanceof Node && x.current.contains(b) || q();
|
|
1321
1321
|
},
|
|
1322
|
-
[
|
|
1322
|
+
[a, q]
|
|
1323
1323
|
);
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
}, [
|
|
1327
|
-
if (!
|
|
1328
|
-
const
|
|
1329
|
-
window.addEventListener("scroll",
|
|
1330
|
-
const D = (
|
|
1331
|
-
V.current = { x:
|
|
1324
|
+
ye(() => {
|
|
1325
|
+
C && $();
|
|
1326
|
+
}, [C, W, $]), at(() => {
|
|
1327
|
+
if (!C) return;
|
|
1328
|
+
const b = () => $();
|
|
1329
|
+
window.addEventListener("scroll", b, !0), window.addEventListener("resize", b);
|
|
1330
|
+
const D = (tt) => {
|
|
1331
|
+
V.current = { x: tt.clientX, y: tt.clientY }, (c || z() === "mouse") && $();
|
|
1332
1332
|
};
|
|
1333
1333
|
return (c || z() === "mouse") && window.addEventListener("mousemove", D), () => {
|
|
1334
|
-
window.removeEventListener("scroll",
|
|
1334
|
+
window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b), window.removeEventListener("mousemove", D);
|
|
1335
1335
|
};
|
|
1336
|
-
}, [
|
|
1337
|
-
if (!
|
|
1338
|
-
const
|
|
1336
|
+
}, [C, c, z, $]), at(() => {
|
|
1337
|
+
if (!C) return;
|
|
1338
|
+
const b = (D) => {
|
|
1339
1339
|
D.key === "Escape" && _();
|
|
1340
1340
|
};
|
|
1341
|
-
return document.addEventListener("keydown",
|
|
1342
|
-
}, [
|
|
1343
|
-
if (
|
|
1344
|
-
if (
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1341
|
+
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
1342
|
+
}, [C, _]), at(() => {
|
|
1343
|
+
if (C)
|
|
1344
|
+
if (e) {
|
|
1345
|
+
const b = E.current;
|
|
1346
|
+
b && U(qt(b, t));
|
|
1347
1347
|
} else
|
|
1348
|
-
U(
|
|
1349
|
-
}, [
|
|
1350
|
-
if (!
|
|
1351
|
-
let
|
|
1348
|
+
U(t ?? null);
|
|
1349
|
+
}, [t, C, e]), at(() => {
|
|
1350
|
+
if (!e) return;
|
|
1351
|
+
let b = [];
|
|
1352
1352
|
try {
|
|
1353
|
-
|
|
1353
|
+
b = Array.from(document.querySelectorAll(e));
|
|
1354
1354
|
} catch {
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
1357
|
const D = (j) => {
|
|
1358
|
-
const
|
|
1358
|
+
const et = j.currentTarget;
|
|
1359
1359
|
V.current = {
|
|
1360
1360
|
x: j.clientX,
|
|
1361
1361
|
y: j.clientY
|
|
1362
|
-
},
|
|
1363
|
-
},
|
|
1362
|
+
}, y(et, qt(et, t));
|
|
1363
|
+
}, tt = (j) => {
|
|
1364
1364
|
V.current = {
|
|
1365
1365
|
x: j.clientX,
|
|
1366
1366
|
y: j.clientY
|
|
1367
1367
|
};
|
|
1368
|
-
},
|
|
1368
|
+
}, bt = (j) => {
|
|
1369
1369
|
K(j.relatedTarget);
|
|
1370
|
-
},
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1373
|
-
},
|
|
1370
|
+
}, pt = (j) => {
|
|
1371
|
+
const et = j.currentTarget;
|
|
1372
|
+
y(et, qt(et, t));
|
|
1373
|
+
}, gt = (j) => {
|
|
1374
1374
|
K(j.relatedTarget);
|
|
1375
1375
|
};
|
|
1376
|
-
return
|
|
1377
|
-
(r === "hover" || r === "both") && (j.addEventListener("mouseenter", D), j.addEventListener("mousemove",
|
|
1376
|
+
return b.forEach((j) => {
|
|
1377
|
+
(r === "hover" || r === "both") && (j.addEventListener("mouseenter", D), j.addEventListener("mousemove", tt), j.addEventListener("mouseleave", bt)), (r === "focus" || r === "both") && (j.addEventListener("focusin", pt), j.addEventListener("focusout", gt));
|
|
1378
1378
|
}), () => {
|
|
1379
|
-
|
|
1380
|
-
(r === "hover" || r === "both") && (j.removeEventListener("mouseenter", D), j.removeEventListener("mousemove",
|
|
1379
|
+
b.forEach((j) => {
|
|
1380
|
+
(r === "hover" || r === "both") && (j.removeEventListener("mouseenter", D), j.removeEventListener("mousemove", tt), j.removeEventListener("mouseleave", bt)), (r === "focus" || r === "both") && (j.removeEventListener("focusin", pt), j.removeEventListener("focusout", gt));
|
|
1381
1381
|
});
|
|
1382
1382
|
};
|
|
1383
|
-
}, [
|
|
1384
|
-
const
|
|
1385
|
-
(
|
|
1386
|
-
const D =
|
|
1387
|
-
V.current = { x:
|
|
1383
|
+
}, [e, t, r, y, K]);
|
|
1384
|
+
const ot = X(
|
|
1385
|
+
(b) => {
|
|
1386
|
+
const D = b.currentTarget;
|
|
1387
|
+
V.current = { x: b.clientX, y: b.clientY }, E.current = D, y(D, t);
|
|
1388
1388
|
},
|
|
1389
|
-
[
|
|
1390
|
-
),
|
|
1391
|
-
V.current = { x:
|
|
1389
|
+
[t, y]
|
|
1390
|
+
), lt = X((b) => {
|
|
1391
|
+
V.current = { x: b.clientX, y: b.clientY };
|
|
1392
1392
|
}, []), Z = X(
|
|
1393
|
-
(
|
|
1394
|
-
K(
|
|
1393
|
+
(b) => {
|
|
1394
|
+
K(b.relatedTarget);
|
|
1395
1395
|
},
|
|
1396
1396
|
[K]
|
|
1397
1397
|
), J = X(
|
|
1398
|
-
(
|
|
1399
|
-
const D =
|
|
1400
|
-
E.current = D,
|
|
1398
|
+
(b) => {
|
|
1399
|
+
const D = b.currentTarget;
|
|
1400
|
+
E.current = D, y(D, t);
|
|
1401
1401
|
},
|
|
1402
|
-
[
|
|
1402
|
+
[t, y]
|
|
1403
1403
|
), Y = X(
|
|
1404
|
-
(
|
|
1405
|
-
K(
|
|
1404
|
+
(b) => {
|
|
1405
|
+
K(b.relatedTarget);
|
|
1406
1406
|
},
|
|
1407
1407
|
[K]
|
|
1408
|
-
),
|
|
1409
|
-
|
|
1410
|
-
|
|
1408
|
+
), yt = [
|
|
1409
|
+
Ot.panel,
|
|
1410
|
+
a ? Ot.panelPassThrough : Ot.panelInteractive,
|
|
1411
1411
|
P
|
|
1412
|
-
].filter(Boolean).join(" "),
|
|
1413
|
-
/* @__PURE__ */
|
|
1412
|
+
].filter(Boolean).join(" "), Pt = typeof document < "u" && C && W != null ? Ne(
|
|
1413
|
+
/* @__PURE__ */ i(
|
|
1414
1414
|
"div",
|
|
1415
1415
|
{
|
|
1416
|
-
ref:
|
|
1416
|
+
ref: x,
|
|
1417
1417
|
id: g,
|
|
1418
1418
|
role: "tooltip",
|
|
1419
|
-
className:
|
|
1419
|
+
className: yt,
|
|
1420
1420
|
style: { top: N.top, left: N.left },
|
|
1421
|
-
onMouseEnter:
|
|
1421
|
+
onMouseEnter: a ? void 0 : () => {
|
|
1422
1422
|
w();
|
|
1423
1423
|
},
|
|
1424
|
-
onMouseLeave:
|
|
1424
|
+
onMouseLeave: a ? void 0 : () => {
|
|
1425
1425
|
q();
|
|
1426
1426
|
},
|
|
1427
|
-
"data-testid":
|
|
1427
|
+
"data-testid": s ? `${s}-panel` : void 0,
|
|
1428
1428
|
children: W
|
|
1429
1429
|
}
|
|
1430
1430
|
),
|
|
1431
1431
|
document.body
|
|
1432
1432
|
) : null;
|
|
1433
|
-
return
|
|
1434
|
-
f != null ? /* @__PURE__ */
|
|
1433
|
+
return e ? /* @__PURE__ */ i(Ht, { children: Pt }) : /* @__PURE__ */ R(Ht, { children: [
|
|
1434
|
+
f != null ? /* @__PURE__ */ i(
|
|
1435
1435
|
Tr,
|
|
1436
1436
|
{
|
|
1437
1437
|
className: B,
|
|
1438
1438
|
eventMode: r,
|
|
1439
|
-
onAnchorMouseEnter:
|
|
1440
|
-
onAnchorMouseMove:
|
|
1439
|
+
onAnchorMouseEnter: ot,
|
|
1440
|
+
onAnchorMouseMove: lt,
|
|
1441
1441
|
onAnchorMouseLeave: Z,
|
|
1442
1442
|
onAnchorFocusIn: J,
|
|
1443
1443
|
onAnchorFocusOut: Y,
|
|
1444
1444
|
children: f
|
|
1445
1445
|
}
|
|
1446
1446
|
) : null,
|
|
1447
|
-
|
|
1447
|
+
Pt
|
|
1448
1448
|
] });
|
|
1449
1449
|
}, Wr = "_dialog_8bk4d_1", Mr = {
|
|
1450
1450
|
dialog: Wr
|
|
1451
1451
|
}, qr = ({
|
|
1452
|
-
visible:
|
|
1453
|
-
onHide:
|
|
1452
|
+
visible: e,
|
|
1453
|
+
onHide: t,
|
|
1454
1454
|
header: n,
|
|
1455
1455
|
footer: r,
|
|
1456
1456
|
children: u,
|
|
1457
1457
|
className: d = "",
|
|
1458
|
-
style:
|
|
1458
|
+
style: a,
|
|
1459
1459
|
modal: c = !0,
|
|
1460
1460
|
dismissableMask: o,
|
|
1461
1461
|
closable: v = !0,
|
|
@@ -1463,18 +1463,18 @@ const Tr = ({
|
|
|
1463
1463
|
"data-testid": B
|
|
1464
1464
|
}) => {
|
|
1465
1465
|
const P = [Mr.dialog, d].filter(Boolean).join(" ");
|
|
1466
|
-
return /* @__PURE__ */
|
|
1467
|
-
|
|
1466
|
+
return /* @__PURE__ */ i(
|
|
1467
|
+
Be,
|
|
1468
1468
|
{
|
|
1469
|
-
visible:
|
|
1470
|
-
onHide:
|
|
1469
|
+
visible: e,
|
|
1470
|
+
onHide: t,
|
|
1471
1471
|
header: n,
|
|
1472
1472
|
footer: r,
|
|
1473
1473
|
modal: c,
|
|
1474
1474
|
dismissableMask: o ?? c,
|
|
1475
1475
|
closable: v,
|
|
1476
1476
|
draggable: h,
|
|
1477
|
-
style:
|
|
1477
|
+
style: a,
|
|
1478
1478
|
className: P,
|
|
1479
1479
|
"data-testid": B,
|
|
1480
1480
|
children: u
|
|
@@ -1482,16 +1482,16 @@ const Tr = ({
|
|
|
1482
1482
|
);
|
|
1483
1483
|
};
|
|
1484
1484
|
qr.displayName = "Dialog";
|
|
1485
|
-
function
|
|
1486
|
-
return
|
|
1485
|
+
function le(e) {
|
|
1486
|
+
return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2" }, child: [] }] })(e);
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1488
|
+
function Kt(e) {
|
|
1489
|
+
return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2" }, child: [] }] })(e);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1491
|
+
function ce(e) {
|
|
1492
|
+
return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }, child: [] }] })(e);
|
|
1493
1493
|
}
|
|
1494
|
-
const zr = "_root_6kjk2_1", Vr = "_header_6kjk2_5", Hr = "_iconWrap_6kjk2_12", Kr = "_title_6kjk2_18", Zr = "_message_6kjk2_22", Xr = "_iconSuccess_6kjk2_27", Gr = "_iconError_6kjk2_32", Ur = "_iconWarn_6kjk2_37", Yr = "_iconInfo_6kjk2_42",
|
|
1494
|
+
const zr = "_root_6kjk2_1", Vr = "_header_6kjk2_5", Hr = "_iconWrap_6kjk2_12", Kr = "_title_6kjk2_18", Zr = "_message_6kjk2_22", Xr = "_iconSuccess_6kjk2_27", Gr = "_iconError_6kjk2_32", Ur = "_iconWarn_6kjk2_37", Yr = "_iconInfo_6kjk2_42", mt = {
|
|
1495
1495
|
root: zr,
|
|
1496
1496
|
header: Vr,
|
|
1497
1497
|
iconWrap: Hr,
|
|
@@ -1501,50 +1501,50 @@ const zr = "_root_6kjk2_1", Vr = "_header_6kjk2_5", Hr = "_iconWrap_6kjk2_12", K
|
|
|
1501
1501
|
iconError: Gr,
|
|
1502
1502
|
iconWarn: Ur,
|
|
1503
1503
|
iconInfo: Yr
|
|
1504
|
-
},
|
|
1505
|
-
const { title:
|
|
1504
|
+
}, zt = (e) => {
|
|
1505
|
+
const { title: t, message: n, type: r } = e, u = (d) => {
|
|
1506
1506
|
switch (d) {
|
|
1507
1507
|
case "success":
|
|
1508
|
-
return /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ i(ce, { className: mt.iconSuccess, size: 16 });
|
|
1509
1509
|
case "error":
|
|
1510
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ i(Kt, { className: mt.iconError, size: 16 });
|
|
1511
1511
|
case "warn":
|
|
1512
|
-
return /* @__PURE__ */
|
|
1512
|
+
return /* @__PURE__ */ i(Kt, { className: mt.iconWarn, size: 16 });
|
|
1513
1513
|
default:
|
|
1514
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ i(le, { className: mt.iconInfo, size: 16 });
|
|
1515
1515
|
}
|
|
1516
1516
|
};
|
|
1517
|
-
return /* @__PURE__ */ R("div", { className:
|
|
1518
|
-
/* @__PURE__ */ R("div", { className:
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
/* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ R("div", { className: mt.root, children: [
|
|
1518
|
+
/* @__PURE__ */ R("div", { className: mt.header, children: [
|
|
1519
|
+
/* @__PURE__ */ i("div", { className: mt.iconWrap, children: u(r) }),
|
|
1520
|
+
/* @__PURE__ */ i("span", { className: mt.title, children: t })
|
|
1521
1521
|
] }),
|
|
1522
|
-
n && /* @__PURE__ */
|
|
1522
|
+
n && /* @__PURE__ */ i("div", { className: mt.message, children: n })
|
|
1523
1523
|
] });
|
|
1524
1524
|
}, Qr = "_toast_538wi_1", Jr = {
|
|
1525
1525
|
toast: Qr
|
|
1526
|
-
},
|
|
1527
|
-
list:
|
|
1528
|
-
},
|
|
1526
|
+
}, to = "_list_1nsqq_1", re = {
|
|
1527
|
+
list: to
|
|
1528
|
+
}, ue = we({
|
|
1529
1529
|
showSuccess: () => {
|
|
1530
1530
|
},
|
|
1531
1531
|
showError: () => {
|
|
1532
1532
|
},
|
|
1533
1533
|
showToast: () => {
|
|
1534
1534
|
}
|
|
1535
|
-
}), zo = () =>
|
|
1536
|
-
const
|
|
1537
|
-
(d,
|
|
1535
|
+
}), zo = () => ke(ue), Vo = (e) => {
|
|
1536
|
+
const t = G(null), n = X(
|
|
1537
|
+
(d, a, c) => {
|
|
1538
1538
|
var o;
|
|
1539
|
-
(o =
|
|
1539
|
+
(o = t.current) == null || o.show({
|
|
1540
1540
|
severity: "success",
|
|
1541
|
-
content: /* @__PURE__ */
|
|
1542
|
-
life: c || (typeof
|
|
1541
|
+
content: /* @__PURE__ */ i(zt, { title: d, message: a, type: "success" }),
|
|
1542
|
+
life: c || (typeof a == "string" && a.length > 50 ? a.length * 80 : 4e3)
|
|
1543
1543
|
});
|
|
1544
1544
|
},
|
|
1545
|
-
[
|
|
1545
|
+
[t]
|
|
1546
1546
|
), r = X(
|
|
1547
|
-
(d,
|
|
1547
|
+
(d, a, c) => {
|
|
1548
1548
|
var P;
|
|
1549
1549
|
const o = (l) => {
|
|
1550
1550
|
if (!l) return { detail: "", textForLife: "" };
|
|
@@ -1553,76 +1553,76 @@ const zr = "_root_6kjk2_1", Vr = "_header_6kjk2_5", Hr = "_iconWrap_6kjk2_12", K
|
|
|
1553
1553
|
if (typeof l == "object" && !Array.isArray(l))
|
|
1554
1554
|
return { detail: l, textForLife: "" };
|
|
1555
1555
|
if (Array.isArray(l))
|
|
1556
|
-
if (l.some((
|
|
1557
|
-
const
|
|
1558
|
-
return l.length <= 1 ? { detail:
|
|
1556
|
+
if (l.some((s) => typeof s != "string")) {
|
|
1557
|
+
const s = l;
|
|
1558
|
+
return l.length <= 1 ? { detail: s[0].message, textForLife: s[0].message } : { detail: /* @__PURE__ */ i("ul", { className: re.list, children: s.map((g, C) => /* @__PURE__ */ i("li", { children: g.message }, C)) }), textForLife: l.join(" • ") };
|
|
1559
1559
|
} else {
|
|
1560
|
-
const
|
|
1561
|
-
return l.length <= 1 ? { detail:
|
|
1560
|
+
const s = l;
|
|
1561
|
+
return l.length <= 1 ? { detail: s[0], textForLife: s[0] } : { detail: /* @__PURE__ */ i("ul", { className: re.list, children: s.map((g, C) => /* @__PURE__ */ i("li", { children: g }, C)) }), textForLife: l.join(" • ") };
|
|
1562
1562
|
}
|
|
1563
1563
|
const f = String(l);
|
|
1564
1564
|
return { detail: f, textForLife: f };
|
|
1565
|
-
}, { detail: v, textForLife: h } = o(
|
|
1566
|
-
(P =
|
|
1565
|
+
}, { detail: v, textForLife: h } = o(a), B = 3e3 + h.length * 50;
|
|
1566
|
+
(P = t.current) == null || P.show({
|
|
1567
1567
|
severity: "error",
|
|
1568
|
-
content: /* @__PURE__ */
|
|
1568
|
+
content: /* @__PURE__ */ i(zt, { title: d, message: v, type: "error" }),
|
|
1569
1569
|
life: c || B
|
|
1570
1570
|
});
|
|
1571
1571
|
},
|
|
1572
|
-
[
|
|
1572
|
+
[t]
|
|
1573
1573
|
), u = X(
|
|
1574
|
-
(d,
|
|
1574
|
+
(d, a, c) => {
|
|
1575
1575
|
var o;
|
|
1576
|
-
(o =
|
|
1576
|
+
(o = t.current) == null || o.show({
|
|
1577
1577
|
severity: c,
|
|
1578
|
-
content: /* @__PURE__ */
|
|
1578
|
+
content: /* @__PURE__ */ i(zt, { title: d, message: a, type: c })
|
|
1579
1579
|
});
|
|
1580
1580
|
},
|
|
1581
|
-
[
|
|
1581
|
+
[t]
|
|
1582
1582
|
);
|
|
1583
|
-
return /* @__PURE__ */ R(
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
|
|
1583
|
+
return /* @__PURE__ */ R(ue.Provider, { value: { showSuccess: n, showError: r, showToast: u }, children: [
|
|
1584
|
+
/* @__PURE__ */ i(Pe, { ref: t, position: "top-center", className: Jr.toast }),
|
|
1585
|
+
e.children
|
|
1586
1586
|
] });
|
|
1587
|
-
},
|
|
1588
|
-
menu:
|
|
1589
|
-
}, ro = {},
|
|
1590
|
-
label:
|
|
1591
|
-
icon:
|
|
1592
|
-
disabled:
|
|
1593
|
-
separator:
|
|
1594
|
-
command:
|
|
1587
|
+
}, eo = "_menu_4pmis_1", no = {
|
|
1588
|
+
menu: eo
|
|
1589
|
+
}, ro = {}, de = (e) => e.filter((t) => t.visible !== !1).map((t) => ({
|
|
1590
|
+
label: t.label,
|
|
1591
|
+
icon: t.icon,
|
|
1592
|
+
disabled: t.disabled,
|
|
1593
|
+
separator: t.separator,
|
|
1594
|
+
command: t.command ? (n) => {
|
|
1595
1595
|
var r;
|
|
1596
|
-
return (r =
|
|
1596
|
+
return (r = t.command) == null ? void 0 : r.call(t, {
|
|
1597
1597
|
originalEvent: n.originalEvent,
|
|
1598
|
-
item:
|
|
1598
|
+
item: t
|
|
1599
1599
|
});
|
|
1600
1600
|
} : void 0,
|
|
1601
|
-
items:
|
|
1602
|
-
})), oo =
|
|
1603
|
-
({ model:
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1601
|
+
items: t.items ? de(t.items) : void 0
|
|
1602
|
+
})), oo = xe(
|
|
1603
|
+
({ model: e, popup: t = !1, id: n, className: r = "", "data-testid": u }, d) => {
|
|
1604
|
+
const a = G(null), c = G(null);
|
|
1605
|
+
Ce(d, () => ({
|
|
1606
1606
|
toggle: (v) => {
|
|
1607
1607
|
var h;
|
|
1608
|
-
c.current = v, (h =
|
|
1608
|
+
c.current = v, (h = a.current) == null || h.toggle(v);
|
|
1609
1609
|
},
|
|
1610
1610
|
show: (v) => {
|
|
1611
1611
|
var h;
|
|
1612
|
-
c.current = v, (h =
|
|
1612
|
+
c.current = v, (h = a.current) == null || h.show(v);
|
|
1613
1613
|
},
|
|
1614
1614
|
hide: () => {
|
|
1615
|
-
!
|
|
1615
|
+
!a.current || !c.current || a.current.hide(c.current);
|
|
1616
1616
|
}
|
|
1617
1617
|
}));
|
|
1618
1618
|
const o = [ro.menu, no.menu, r].filter(Boolean).join(" ");
|
|
1619
|
-
return /* @__PURE__ */
|
|
1620
|
-
|
|
1619
|
+
return /* @__PURE__ */ i(
|
|
1620
|
+
Le,
|
|
1621
1621
|
{
|
|
1622
|
-
ref:
|
|
1622
|
+
ref: a,
|
|
1623
1623
|
id: n,
|
|
1624
|
-
model:
|
|
1625
|
-
popup:
|
|
1624
|
+
model: de(e),
|
|
1625
|
+
popup: t,
|
|
1626
1626
|
className: o,
|
|
1627
1627
|
"data-testid": u
|
|
1628
1628
|
}
|
|
@@ -1630,58 +1630,58 @@ const zr = "_root_6kjk2_1", Vr = "_header_6kjk2_5", Hr = "_iconWrap_6kjk2_12", K
|
|
|
1630
1630
|
}
|
|
1631
1631
|
);
|
|
1632
1632
|
oo.displayName = "Menu";
|
|
1633
|
-
const
|
|
1634
|
-
root:
|
|
1635
|
-
iconWrap:
|
|
1636
|
-
icon:
|
|
1633
|
+
const io = "_root_lv2tm_1", so = "_iconWrap_lv2tm_13", ao = "_icon_lv2tm_13", lo = "_content_lv2tm_25", co = "_info_lv2tm_30", uo = "_success_lv2tm_38", po = "_warn_lv2tm_46", fo = "_error_lv2tm_54", ut = {
|
|
1634
|
+
root: io,
|
|
1635
|
+
iconWrap: so,
|
|
1636
|
+
icon: ao,
|
|
1637
1637
|
content: lo,
|
|
1638
1638
|
info: co,
|
|
1639
1639
|
success: uo,
|
|
1640
1640
|
warn: po,
|
|
1641
1641
|
error: fo
|
|
1642
1642
|
}, ho = {
|
|
1643
|
-
info:
|
|
1644
|
-
success:
|
|
1645
|
-
warn:
|
|
1646
|
-
error:
|
|
1647
|
-
}, _o = ({ severity:
|
|
1648
|
-
switch (
|
|
1643
|
+
info: ut.info,
|
|
1644
|
+
success: ut.success,
|
|
1645
|
+
warn: ut.warn,
|
|
1646
|
+
error: ut.error
|
|
1647
|
+
}, _o = ({ severity: e }) => {
|
|
1648
|
+
switch (e) {
|
|
1649
1649
|
case "success":
|
|
1650
|
-
return /* @__PURE__ */
|
|
1650
|
+
return /* @__PURE__ */ i(ce, { className: ut.icon, "aria-hidden": !0 });
|
|
1651
1651
|
case "warn":
|
|
1652
1652
|
case "error":
|
|
1653
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ i(Kt, { className: ut.icon, "aria-hidden": !0 });
|
|
1654
1654
|
default:
|
|
1655
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ i(le, { className: ut.icon, "aria-hidden": !0 });
|
|
1656
1656
|
}
|
|
1657
1657
|
}, Ho = ({
|
|
1658
|
-
severity:
|
|
1659
|
-
text:
|
|
1658
|
+
severity: e = "info",
|
|
1659
|
+
text: t,
|
|
1660
1660
|
children: n,
|
|
1661
1661
|
icon: r,
|
|
1662
1662
|
className: u = "",
|
|
1663
1663
|
"data-testid": d
|
|
1664
1664
|
}) => {
|
|
1665
|
-
const
|
|
1665
|
+
const a = n ?? t, c = e === "warn" || e === "error" ? "alert" : "status", o = [ut.root, ho[e], u].filter(Boolean).join(" ");
|
|
1666
1666
|
return /* @__PURE__ */ R(
|
|
1667
1667
|
"div",
|
|
1668
1668
|
{
|
|
1669
1669
|
className: o,
|
|
1670
1670
|
role: c,
|
|
1671
1671
|
"data-testid": d,
|
|
1672
|
-
"data-severity":
|
|
1672
|
+
"data-severity": e,
|
|
1673
1673
|
children: [
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
|
|
1674
|
+
/* @__PURE__ */ i("span", { className: ut.iconWrap, children: r ?? /* @__PURE__ */ i(_o, { severity: e }) }),
|
|
1675
|
+
a != null && a !== "" && /* @__PURE__ */ i("span", { className: ut.content, children: a })
|
|
1676
1676
|
]
|
|
1677
1677
|
}
|
|
1678
1678
|
);
|
|
1679
|
-
}, mo = "_dataTable_i1x6x_1", vo = "_noHeader_i1x6x_136",
|
|
1679
|
+
}, mo = "_dataTable_i1x6x_1", vo = "_noHeader_i1x6x_136", yo = "_clickableRows_i1x6x_140", Vt = {
|
|
1680
1680
|
dataTable: mo,
|
|
1681
1681
|
noHeader: vo,
|
|
1682
|
-
clickableRows:
|
|
1683
|
-
},
|
|
1684
|
-
root:
|
|
1682
|
+
clickableRows: yo
|
|
1683
|
+
}, bo = "_root_g4y44_1", go = "_table_g4y44_5", oe = {
|
|
1684
|
+
root: bo,
|
|
1685
1685
|
table: go
|
|
1686
1686
|
}, wo = {
|
|
1687
1687
|
currentPage: 1,
|
|
@@ -1690,24 +1690,24 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1690
1690
|
sortOrder: null,
|
|
1691
1691
|
sortField: void 0,
|
|
1692
1692
|
rowsPerPageOptions: [10, 25, 50, 100]
|
|
1693
|
-
}, ko = (
|
|
1694
|
-
const [
|
|
1695
|
-
const { first: f, page:
|
|
1693
|
+
}, ko = (e = wo) => {
|
|
1694
|
+
const [t, n] = nt(e), [r, u] = nt(0), d = (l) => {
|
|
1695
|
+
const { first: f, page: s, rows: m } = l;
|
|
1696
1696
|
n((g) => ({
|
|
1697
1697
|
...g,
|
|
1698
|
-
currentPage: (
|
|
1698
|
+
currentPage: (s ?? 0) + 1,
|
|
1699
1699
|
first: f,
|
|
1700
1700
|
rows: m
|
|
1701
1701
|
}));
|
|
1702
|
-
},
|
|
1703
|
-
Object.entries(l).map(([f,
|
|
1704
|
-
const m =
|
|
1705
|
-
return m.value !== null && typeof m.value == "string" && m.value === "" ? [f, { ...
|
|
1702
|
+
}, a = (l) => Object.fromEntries(
|
|
1703
|
+
Object.entries(l).map(([f, s]) => {
|
|
1704
|
+
const m = s;
|
|
1705
|
+
return m.value !== null && typeof m.value == "string" && m.value === "" ? [f, { ...s, value: null }] : [f, s];
|
|
1706
1706
|
})
|
|
1707
1707
|
), c = (l) => {
|
|
1708
|
-
var
|
|
1708
|
+
var s;
|
|
1709
1709
|
const f = l;
|
|
1710
|
-
return (
|
|
1710
|
+
return (s = f.constraints) != null && s.length ? f.constraints.some(
|
|
1711
1711
|
(m) => m.value !== void 0 && m.value !== null && m.value !== ""
|
|
1712
1712
|
) : f.value !== void 0 && f.value !== null && f.value !== "";
|
|
1713
1713
|
}, o = (l) => Object.keys(l).some((f) => c(l[f]));
|
|
@@ -1728,17 +1728,17 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1728
1728
|
});
|
|
1729
1729
|
},
|
|
1730
1730
|
resetPagination: () => {
|
|
1731
|
-
n(
|
|
1731
|
+
n(e);
|
|
1732
1732
|
},
|
|
1733
|
-
paginationParams:
|
|
1733
|
+
paginationParams: t,
|
|
1734
1734
|
setPaginationParams: n,
|
|
1735
1735
|
totalCount: r,
|
|
1736
1736
|
setTotalCount: u,
|
|
1737
1737
|
onPageCallback: d,
|
|
1738
1738
|
onFilterCallback: (l) => {
|
|
1739
|
-
const f =
|
|
1740
|
-
n((
|
|
1741
|
-
...
|
|
1739
|
+
const f = a(l.filters ?? {});
|
|
1740
|
+
n((s) => ({
|
|
1741
|
+
...s,
|
|
1742
1742
|
first: 0,
|
|
1743
1743
|
currentPage: 1,
|
|
1744
1744
|
filters: o(f) ? f : void 0
|
|
@@ -1746,23 +1746,23 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1746
1746
|
},
|
|
1747
1747
|
setFilters: (l) => {
|
|
1748
1748
|
const f = {};
|
|
1749
|
-
l.filter((
|
|
1750
|
-
const m =
|
|
1749
|
+
l.filter((s) => s.filter).forEach((s) => {
|
|
1750
|
+
const m = s.filterField || s.field || s.columnKey;
|
|
1751
1751
|
m && typeof m == "string" && (f[m] = {
|
|
1752
1752
|
value: null,
|
|
1753
|
-
matchMode:
|
|
1753
|
+
matchMode: s.filterMatchMode || Ee.CONTAINS
|
|
1754
1754
|
});
|
|
1755
|
-
}), n((
|
|
1755
|
+
}), n((s) => ({ ...s, filters: f }));
|
|
1756
1756
|
}
|
|
1757
1757
|
};
|
|
1758
|
-
},
|
|
1758
|
+
}, xo = "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown", Co = "{first} - {last} of {totalRecords}", Ko = (e) => {
|
|
1759
1759
|
const {
|
|
1760
|
-
value:
|
|
1760
|
+
value: t,
|
|
1761
1761
|
dataKey: n,
|
|
1762
1762
|
columns: r,
|
|
1763
1763
|
children: u,
|
|
1764
1764
|
className: d = "",
|
|
1765
|
-
style:
|
|
1765
|
+
style: a,
|
|
1766
1766
|
"data-testid": c,
|
|
1767
1767
|
tableRef: o,
|
|
1768
1768
|
showHeaders: v = !0,
|
|
@@ -1771,17 +1771,17 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1771
1771
|
emptyTemplate: P,
|
|
1772
1772
|
pagination: l,
|
|
1773
1773
|
paginator: f = !0,
|
|
1774
|
-
lazy:
|
|
1774
|
+
lazy: s = !1,
|
|
1775
1775
|
totalRecords: m,
|
|
1776
1776
|
sortField: g,
|
|
1777
|
-
sortOrder:
|
|
1777
|
+
sortOrder: C,
|
|
1778
1778
|
globalFilterFields: T,
|
|
1779
1779
|
onPage: N,
|
|
1780
1780
|
onSort: O,
|
|
1781
1781
|
onFilter: W,
|
|
1782
|
-
currentPageReportTemplate: U =
|
|
1782
|
+
currentPageReportTemplate: U = Co,
|
|
1783
1783
|
selection: E,
|
|
1784
|
-
selectionMode:
|
|
1784
|
+
selectionMode: x,
|
|
1785
1785
|
onSelectionChange: V,
|
|
1786
1786
|
isRowSelectable: H,
|
|
1787
1787
|
onRowClick: S,
|
|
@@ -1790,40 +1790,40 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1790
1790
|
editMode: z,
|
|
1791
1791
|
editingRows: $,
|
|
1792
1792
|
onRowEditComplete: _,
|
|
1793
|
-
expandedRows:
|
|
1793
|
+
expandedRows: y,
|
|
1794
1794
|
onRowToggle: q,
|
|
1795
1795
|
rowExpansionTemplate: K,
|
|
1796
|
-
header:
|
|
1797
|
-
footer:
|
|
1798
|
-
} =
|
|
1799
|
-
|
|
1800
|
-
J && Z.setTotalCount(
|
|
1801
|
-
}, [J,
|
|
1802
|
-
const
|
|
1796
|
+
header: ot,
|
|
1797
|
+
footer: lt
|
|
1798
|
+
} = e, Z = ko(), J = !l, Y = l ?? Z.paginationParams, yt = m ?? Y.totalRecords ?? Z.totalCount;
|
|
1799
|
+
at(() => {
|
|
1800
|
+
J && Z.setTotalCount(t.length);
|
|
1801
|
+
}, [J, t.length]);
|
|
1802
|
+
const Pt = st(() => {
|
|
1803
1803
|
const M = r ? [...r] : [];
|
|
1804
1804
|
return w && M.push({
|
|
1805
1805
|
columnKey: "rowActions",
|
|
1806
1806
|
headerStyle: { width: "180px" },
|
|
1807
1807
|
body: w
|
|
1808
1808
|
}), M;
|
|
1809
|
-
}, [r, w]), [
|
|
1809
|
+
}, [r, w]), [b, D] = nt(!1), tt = st(() => s ? (yt ?? 0) === 0 : t.length === 0 || b, [b, s, yt, t.length]), bt = (M) => {
|
|
1810
1810
|
S && (S(M.data, M.index), M.originalEvent.stopPropagation());
|
|
1811
|
-
},
|
|
1811
|
+
}, pt = (M) => {
|
|
1812
1812
|
V && !M.originalEvent.isPropagationStopped() && (V(M.value), M.originalEvent.stopPropagation());
|
|
1813
|
-
},
|
|
1813
|
+
}, gt = (M) => {
|
|
1814
1814
|
q == null || q(M.data);
|
|
1815
1815
|
}, j = [
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
v ? "" :
|
|
1819
|
-
S ||
|
|
1820
|
-
].filter(Boolean).join(" "),
|
|
1821
|
-
style:
|
|
1816
|
+
oe.table,
|
|
1817
|
+
Vt.dataTable,
|
|
1818
|
+
v ? "" : Vt.noHeader,
|
|
1819
|
+
S || x ? Vt.clickableRows : ""
|
|
1820
|
+
].filter(Boolean).join(" "), et = !tt && !(H && t.length > 0 && t.every((M) => !H({ data: M }))) ? E : void 0, Rt = typeof P == "function" ? P() : P, Ct = {
|
|
1821
|
+
style: a,
|
|
1822
1822
|
"data-testid": c,
|
|
1823
1823
|
className: j,
|
|
1824
1824
|
ref: o,
|
|
1825
1825
|
dataKey: n,
|
|
1826
|
-
value:
|
|
1826
|
+
value: t.length > 0 ? t : void 0,
|
|
1827
1827
|
size: "small",
|
|
1828
1828
|
onValueChange: (M) => {
|
|
1829
1829
|
D(M.length === 0);
|
|
@@ -1837,49 +1837,49 @@ const so = "_root_lv2tm_1", ao = "_iconWrap_lv2tm_13", io = "_icon_lv2tm_13", lo
|
|
|
1837
1837
|
filterDisplay: h ? "row" : void 0,
|
|
1838
1838
|
filters: Y.filters,
|
|
1839
1839
|
globalFilterFields: T ?? Y.globalFilterFields,
|
|
1840
|
-
paginator: f && !
|
|
1841
|
-
paginatorTemplate: Y.paginatorTemplate ??
|
|
1840
|
+
paginator: f && !tt,
|
|
1841
|
+
paginatorTemplate: Y.paginatorTemplate ?? xo,
|
|
1842
1842
|
first: Y.first,
|
|
1843
|
-
totalRecords:
|
|
1843
|
+
totalRecords: yt,
|
|
1844
1844
|
rowsPerPageOptions: Y.rowsPerPageOptions,
|
|
1845
1845
|
sortField: g ?? Y.sortField,
|
|
1846
|
-
sortOrder:
|
|
1846
|
+
sortOrder: C ?? Y.sortOrder ?? void 0,
|
|
1847
1847
|
onPage: J ? N ?? Z.onPageCallback : N,
|
|
1848
1848
|
onSort: J ? O ?? Z.onSortCallback : O,
|
|
1849
1849
|
onFilter: J ? W ?? Z.onFilterCallback : W,
|
|
1850
1850
|
currentPageReportTemplate: U,
|
|
1851
1851
|
stripedRows: !0,
|
|
1852
1852
|
isDataSelectable: H,
|
|
1853
|
-
emptyMessage:
|
|
1853
|
+
emptyMessage: Rt,
|
|
1854
1854
|
loading: B,
|
|
1855
1855
|
removableSort: !0,
|
|
1856
|
-
onSelectionChange:
|
|
1857
|
-
selection:
|
|
1858
|
-
onRowClick:
|
|
1859
|
-
lazy:
|
|
1860
|
-
expandedRows:
|
|
1856
|
+
onSelectionChange: pt,
|
|
1857
|
+
selection: et,
|
|
1858
|
+
onRowClick: bt,
|
|
1859
|
+
lazy: s,
|
|
1860
|
+
expandedRows: y ?? void 0,
|
|
1861
1861
|
rowExpansionTemplate: K,
|
|
1862
|
-
onRowToggle:
|
|
1863
|
-
footer:
|
|
1864
|
-
header:
|
|
1865
|
-
...
|
|
1862
|
+
onRowToggle: gt,
|
|
1863
|
+
footer: lt,
|
|
1864
|
+
header: ot,
|
|
1865
|
+
...x != null ? { selectionMode: x } : {}
|
|
1866
1866
|
};
|
|
1867
|
-
return /* @__PURE__ */
|
|
1868
|
-
|
|
1869
|
-
|
|
1867
|
+
return /* @__PURE__ */ i("div", { className: [oe.root, d].filter(Boolean).join(" "), children: /* @__PURE__ */ R($e, { ...Ct, children: [
|
|
1868
|
+
x && /* @__PURE__ */ i(
|
|
1869
|
+
Ut,
|
|
1870
1870
|
{
|
|
1871
|
-
selectionMode:
|
|
1871
|
+
selectionMode: x,
|
|
1872
1872
|
headerStyle: { width: "78px" }
|
|
1873
1873
|
}
|
|
1874
1874
|
),
|
|
1875
|
-
|
|
1875
|
+
Pt.map((M) => /* @__PURE__ */ i(Ut, { ...M }, String(M.columnKey ?? M.field))),
|
|
1876
1876
|
u
|
|
1877
1877
|
] }) });
|
|
1878
1878
|
};
|
|
1879
1879
|
export {
|
|
1880
1880
|
gr as Accordion,
|
|
1881
|
-
|
|
1882
|
-
|
|
1881
|
+
ae as AccordionTab,
|
|
1882
|
+
ar as AutoComplete,
|
|
1883
1883
|
To as Checkbox,
|
|
1884
1884
|
wo as DEFAULT_DATA_TABLE_PAGINATION,
|
|
1885
1885
|
Ko as DataTable,
|
|
@@ -1894,7 +1894,7 @@ export {
|
|
|
1894
1894
|
Wo as SelectButton,
|
|
1895
1895
|
Ao as Tabs,
|
|
1896
1896
|
Vo as ToastProvider,
|
|
1897
|
-
|
|
1897
|
+
zt as ToastTemplate,
|
|
1898
1898
|
qo as Tooltip,
|
|
1899
1899
|
ko as useDataTablePagination,
|
|
1900
1900
|
zo as useToast
|