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