@emporix/component-library 1.12.9 → 1.12.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/datatable/DataTable.d.ts.map +1 -1
- package/dist/components/datatable/index.d.ts +1 -1
- package/dist/components/datatable/index.d.ts.map +1 -1
- package/dist/components/datatable/types.d.ts +1 -0
- package/dist/components/datatable/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +88 -84
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAOlE,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAA;AA6BjC,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,mBAAmB,EACrD,OAAO,cAAc,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAOlE,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAA;AA6BjC,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,mBAAmB,EACrD,OAAO,cAAc,CAAC,CAAC,CAAC,4CAqNzB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DataTable } from './DataTable';
|
|
2
|
-
export type { DataTableProps, DataTablePaginationState } from './types';
|
|
2
|
+
export type { DataTableProps, DataTablePaginationState, DataTableColumnProps, } from './types';
|
|
3
3
|
export { useDataTablePagination, DEFAULT_DATA_TABLE_PAGINATION, } from './useDataTablePagination';
|
|
4
4
|
export type { DataTableFilters } from './useDataTablePagination';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EACV,cAAc,EACd,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
2
|
import { ColumnProps } from 'primereact/column';
|
|
3
|
+
export type { ColumnProps as DataTableColumnProps } from 'primereact/column';
|
|
3
4
|
export type DataTableSortOrder = 1 | 0 | -1 | null | undefined;
|
|
4
5
|
export type DataTableSelectionMode = 'single' | 'multiple' | null;
|
|
5
6
|
export type DataTableValueArray = unknown[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAA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E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,6 @@ export type { MenuProps, MenuItem, MenuRef } from './components/menu';
|
|
|
41
41
|
export { Message } from './components/message/Message';
|
|
42
42
|
export type { MessageProps, MessageSeverity, } from './components/message/Message';
|
|
43
43
|
export { DataTable, useDataTablePagination } from './components/datatable';
|
|
44
|
-
export type { DataTableProps, DataTablePaginationState, DataTableFilters, } from './components/datatable';
|
|
44
|
+
export type { DataTableProps, DataTablePaginationState, DataTableColumnProps, DataTableFilters, } from './components/datatable';
|
|
45
45
|
export { DEFAULT_DATA_TABLE_PAGINATION } from './components/datatable';
|
|
46
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAEhF,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,YAAY,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAElE,OAAO,EAAE,QAAQ,EAAE,M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EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,YAAY,EACV,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAA;AAGtE,OAAO,qBAAqB,CAAA"}
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as I, jsx as s, Fragment as Ge } from "react/jsx-runtime";
|
|
2
|
-
import de, { useMemo as
|
|
2
|
+
import de, { useMemo as ie, useState as ne, useRef as G, useEffect as re, useId as Be, useCallback as X, useLayoutEffect as yt, isValidElement as bt, cloneElement as gt, createContext as wt, useContext as kt, forwardRef as Ct, useImperativeHandle as xt } from "react";
|
|
3
3
|
import { createPortal as Nt } from "react-dom";
|
|
4
4
|
import { Dialog as Bt } from "primereact/dialog";
|
|
5
5
|
import { Toast as Pt } from "primereact/toast";
|
|
@@ -297,31 +297,31 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
297
297
|
panelClassName: j = "",
|
|
298
298
|
valueTemplate: M,
|
|
299
299
|
itemTemplate: U,
|
|
300
|
-
"data-testid":
|
|
300
|
+
"data-testid": $
|
|
301
301
|
}) => {
|
|
302
|
-
const C = f && !n, V =
|
|
302
|
+
const C = f && !n, V = ie(
|
|
303
303
|
() => n && Array.isArray(e) ? e : [],
|
|
304
304
|
[n, e]
|
|
305
|
-
), H =
|
|
305
|
+
), H = ie(
|
|
306
306
|
() => new Set(V.map((p) => String(p))),
|
|
307
307
|
[V]
|
|
308
308
|
), F = r.find(
|
|
309
309
|
(p) => !n && we(p, h) === e
|
|
310
|
-
), k =
|
|
310
|
+
), k = ie(
|
|
311
311
|
() => n ? r.filter(
|
|
312
312
|
(p) => H.has(String(we(p, h)))
|
|
313
313
|
) : [],
|
|
314
314
|
[n, r, h, H]
|
|
315
|
-
), w = F ? _e(F, v) : "", z = k.map((p) => _e(p, v)).filter(Boolean).join(", "), [E, _] = ne(!1), [y, q] = ne(!1), [K,
|
|
315
|
+
), w = F ? _e(F, v) : "", z = k.map((p) => _e(p, v)).filter(Boolean).join(", "), [E, _] = ne(!1), [y, q] = ne(!1), [K, se] = ne(""), [le, Z] = ne(w), J = G(null), Y = G(null), ye = G(null), Pe = G(null), b = G(!1), D = ie(
|
|
316
316
|
() => l && !C ? r.filter(
|
|
317
317
|
(p) => _e(p, v).toLowerCase().includes(K.toLowerCase())
|
|
318
318
|
) : r,
|
|
319
319
|
[l, C, r, v, K]
|
|
320
320
|
);
|
|
321
|
-
|
|
321
|
+
re(() => {
|
|
322
322
|
C && Z(w);
|
|
323
|
-
}, [C, e, w]),
|
|
324
|
-
E && l && !C && (
|
|
323
|
+
}, [C, e, w]), re(() => {
|
|
324
|
+
E && l && !C && (se(""), setTimeout(() => {
|
|
325
325
|
var p;
|
|
326
326
|
return (p = ye.current) == null ? void 0 : p.focus();
|
|
327
327
|
}, 0));
|
|
@@ -332,7 +332,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
332
332
|
var O;
|
|
333
333
|
(b.current || (O = p.animationName) != null && O.includes("menuOut")) && (b.current = !1, _(!1), q(!1), C && Z(w));
|
|
334
334
|
};
|
|
335
|
-
|
|
335
|
+
re(() => {
|
|
336
336
|
if (!E && !y) return;
|
|
337
337
|
const p = (O) => {
|
|
338
338
|
J.current && !J.current.contains(O.target) && (C && Z(w), ee());
|
|
@@ -398,8 +398,8 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
398
398
|
});
|
|
399
399
|
} else
|
|
400
400
|
c == null || c({ value: "", selectedValue: null, originalEvent: p });
|
|
401
|
-
} else if (
|
|
402
|
-
const O =
|
|
401
|
+
} else if (D.length > 0) {
|
|
402
|
+
const O = D.find(
|
|
403
403
|
(T) => !ke(T, B)
|
|
404
404
|
);
|
|
405
405
|
O && !ke(O, B) && ge(O, p);
|
|
@@ -413,7 +413,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
413
413
|
(oe) => String(oe) !== String(T)
|
|
414
414
|
);
|
|
415
415
|
t == null || t({ value: R, originalEvent: O });
|
|
416
|
-
}, xe =
|
|
416
|
+
}, xe = ie(() => u == null ? null : Math.max(0, u), [u]), A = ie(() => !te || xe == null ? k : k.slice(0, xe), [te, xe, k]), We = te && xe != null ? Math.max(0, k.length - xe) : 0, Me = [
|
|
417
417
|
P.dropdown,
|
|
418
418
|
a ? P.disabled : "",
|
|
419
419
|
E ? P.open : "",
|
|
@@ -428,7 +428,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
428
428
|
y ? P.panelClosing : "",
|
|
429
429
|
j
|
|
430
430
|
].filter(Boolean).join(" "), mt = Be(), Ee = W ?? `dropdown-${mt.replace(/[^a-zA-Z0-9_-]/g, "")}`, qe = `${Ee}-panel`, ze = x == null ? void 0 : `${Ee}-error`, Qe = x == null ? {} : { "aria-invalid": "true" }, Je = ze == null ? {} : { "aria-describedby": ze };
|
|
431
|
-
return /* @__PURE__ */ I("div", { className: Me, ref: J, "data-testid":
|
|
431
|
+
return /* @__PURE__ */ I("div", { className: Me, ref: J, "data-testid": $, children: [
|
|
432
432
|
g != null && /* @__PURE__ */ I("label", { htmlFor: Ee, className: P.label, children: [
|
|
433
433
|
g,
|
|
434
434
|
m && /* @__PURE__ */ s("span", { className: P.required, children: "*" })
|
|
@@ -449,7 +449,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
449
449
|
className: Se,
|
|
450
450
|
onClick: C ? void 0 : pe,
|
|
451
451
|
onKeyDown: C ? void 0 : S,
|
|
452
|
-
"data-testid":
|
|
452
|
+
"data-testid": $ && !C ? `${$}-control` : void 0,
|
|
453
453
|
children: [
|
|
454
454
|
C ? /* @__PURE__ */ s(
|
|
455
455
|
"input",
|
|
@@ -473,7 +473,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
473
473
|
"aria-expanded": E || y,
|
|
474
474
|
...Qe,
|
|
475
475
|
...Je,
|
|
476
|
-
"data-testid":
|
|
476
|
+
"data-testid": $ ? `${$}-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__ */ I(Ge, { children: [
|
|
479
479
|
A.map((p, O) => {
|
|
@@ -490,7 +490,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
490
490
|
(Q.key === "Enter" || Q.key === " ") && Q.stopPropagation();
|
|
491
491
|
},
|
|
492
492
|
"aria-label": `Remove ${T}`,
|
|
493
|
-
"data-testid":
|
|
493
|
+
"data-testid": $ ? `${$}-chip-remove-${O}` : void 0,
|
|
494
494
|
children: i ?? /* @__PURE__ */ s(Jt, { "aria-hidden": !0 })
|
|
495
495
|
}
|
|
496
496
|
)
|
|
@@ -520,7 +520,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
520
520
|
className: Oe,
|
|
521
521
|
role: "presentation",
|
|
522
522
|
onAnimationEnd: be,
|
|
523
|
-
"data-testid":
|
|
523
|
+
"data-testid": $ ? `${$}-panel` : void 0,
|
|
524
524
|
children: [
|
|
525
525
|
l && !C && /* @__PURE__ */ I("div", { className: P.filterWrapper, children: [
|
|
526
526
|
/* @__PURE__ */ s(
|
|
@@ -531,7 +531,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
531
531
|
className: P.filterInput,
|
|
532
532
|
value: K,
|
|
533
533
|
onChange: (p) => {
|
|
534
|
-
|
|
534
|
+
se(p.target.value);
|
|
535
535
|
},
|
|
536
536
|
onKeyDown: (p) => {
|
|
537
537
|
p.key === "Escape" && _(!1), p.stopPropagation();
|
|
@@ -539,12 +539,12 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
539
539
|
placeholder: "Search...",
|
|
540
540
|
"aria-label": "Filter options",
|
|
541
541
|
title: "Filter options",
|
|
542
|
-
"data-testid":
|
|
542
|
+
"data-testid": $ ? `${$}-filter` : void 0
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
545
|
/* @__PURE__ */ s(en, { className: P.filterIcon, "aria-hidden": !0 })
|
|
546
546
|
] }),
|
|
547
|
-
/* @__PURE__ */ s("ul", { className: P.list, role: "listbox", "aria-label": "Options", children:
|
|
547
|
+
/* @__PURE__ */ s("ul", { className: P.list, role: "listbox", "aria-label": "Options", children: D.length === 0 ? /* @__PURE__ */ s("li", { className: P.empty, children: "No results" }) : D.map((p, O) => {
|
|
548
548
|
const T = we(p, h), R = _e(p, v), oe = ke(p, B), Q = n ? H.has(String(T)) : e === T, fe = T != null ? String(T) : `option-${O}`;
|
|
549
549
|
return /* @__PURE__ */ I(
|
|
550
550
|
"li",
|
|
@@ -558,7 +558,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
558
558
|
oe ? P.optionDisabled : ""
|
|
559
559
|
].filter(Boolean).join(" "),
|
|
560
560
|
onClick: (vt) => ge(p, vt),
|
|
561
|
-
"data-testid":
|
|
561
|
+
"data-testid": $ ? `${$}-option-${O}` : void 0,
|
|
562
562
|
children: [
|
|
563
563
|
n && /* @__PURE__ */ s("span", { className: P.checkboxContainer, "aria-hidden": !0, children: /* @__PURE__ */ s(
|
|
564
564
|
"input",
|
|
@@ -712,7 +712,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
712
712
|
),
|
|
713
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", 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",
|
|
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", ae = {
|
|
716
716
|
root: Un,
|
|
717
717
|
label: Yn,
|
|
718
718
|
inputWrap: Qn,
|
|
@@ -747,11 +747,11 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
747
747
|
inputId: L,
|
|
748
748
|
"data-testid": l
|
|
749
749
|
}) => {
|
|
750
|
-
const [f, a] = ne(!1), [m, g] = ne(-1), x = G(null), W = G(null), N = G(), j = Be(), M = L ?? `autocomplete-${j.replace(/[^a-zA-Z0-9_-]/g, "")}`, U = `${M}-list`,
|
|
751
|
-
|
|
750
|
+
const [f, a] = ne(!1), [m, g] = ne(-1), x = G(null), W = G(null), N = G(), j = Be(), M = L ?? `autocomplete-${j.replace(/[^a-zA-Z0-9_-]/g, "")}`, U = `${M}-list`, $ = h == null ? void 0 : `${M}-error`, C = f && t.length > 0;
|
|
751
|
+
re(() => {
|
|
752
752
|
g((_) => t.length === 0 ? -1 : _ < 0 ? _ : _ >= t.length ? t.length - 1 : _);
|
|
753
753
|
}, [t]);
|
|
754
|
-
const V =
|
|
754
|
+
const V = ie(
|
|
755
755
|
() => t.map((_) => rt(_, o)),
|
|
756
756
|
[t, o]
|
|
757
757
|
), H = X(
|
|
@@ -762,9 +762,9 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
762
762
|
},
|
|
763
763
|
[n]
|
|
764
764
|
);
|
|
765
|
-
|
|
765
|
+
re(() => () => {
|
|
766
766
|
N.current && clearTimeout(N.current);
|
|
767
|
-
}, []),
|
|
767
|
+
}, []), re(() => {
|
|
768
768
|
if (!f) return;
|
|
769
769
|
const _ = (y) => {
|
|
770
770
|
x.current && !x.current.contains(y.target) && (a(!1), g(-1));
|
|
@@ -798,13 +798,13 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
798
798
|
return;
|
|
799
799
|
}
|
|
800
800
|
_.key === "Escape" && (a(!1), g(-1));
|
|
801
|
-
}, z = [
|
|
802
|
-
|
|
803
|
-
c ?
|
|
804
|
-
h ?
|
|
801
|
+
}, z = [ae.root, B].filter(Boolean).join(" "), E = [
|
|
802
|
+
ae.inputWrap,
|
|
803
|
+
c ? ae.inputWrapDisabled : "",
|
|
804
|
+
h ? ae.inputWrapInvalid : ""
|
|
805
805
|
].filter(Boolean).join(" ");
|
|
806
806
|
return /* @__PURE__ */ I("div", { className: z, ref: x, "data-testid": l, children: [
|
|
807
|
-
v != null && /* @__PURE__ */ s("label", { htmlFor: M, className:
|
|
807
|
+
v != null && /* @__PURE__ */ s("label", { htmlFor: M, className: ae.label, children: v }),
|
|
808
808
|
/* @__PURE__ */ I("div", { className: E, children: [
|
|
809
809
|
/* @__PURE__ */ s(
|
|
810
810
|
"input",
|
|
@@ -812,7 +812,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
812
812
|
ref: W,
|
|
813
813
|
id: M,
|
|
814
814
|
type: "text",
|
|
815
|
-
className:
|
|
815
|
+
className: ae.input,
|
|
816
816
|
value: e,
|
|
817
817
|
onChange: F,
|
|
818
818
|
onKeyDown: w,
|
|
@@ -832,7 +832,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
832
832
|
"aria-activedescendant": C && m >= 0 ? `${M}-option-${m}` : void 0,
|
|
833
833
|
"aria-autocomplete": "list",
|
|
834
834
|
"aria-invalid": h ? !0 : void 0,
|
|
835
|
-
"aria-describedby":
|
|
835
|
+
"aria-describedby": $,
|
|
836
836
|
"data-testid": l ? `${l}-input` : void 0
|
|
837
837
|
}
|
|
838
838
|
),
|
|
@@ -840,7 +840,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
840
840
|
"button",
|
|
841
841
|
{
|
|
842
842
|
type: "button",
|
|
843
|
-
className:
|
|
843
|
+
className: ae.dropdownButton,
|
|
844
844
|
disabled: c,
|
|
845
845
|
onClick: () => {
|
|
846
846
|
var _;
|
|
@@ -859,7 +859,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
859
859
|
"ul",
|
|
860
860
|
{
|
|
861
861
|
id: U,
|
|
862
|
-
className:
|
|
862
|
+
className: ae.panel,
|
|
863
863
|
role: "listbox",
|
|
864
864
|
"data-testid": l ? `${l}-panel` : void 0,
|
|
865
865
|
children: t.map((_, y) => {
|
|
@@ -871,11 +871,11 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
871
871
|
role: "option",
|
|
872
872
|
"aria-selected": y === m,
|
|
873
873
|
className: [
|
|
874
|
-
|
|
875
|
-
y === m ?
|
|
874
|
+
ae.option,
|
|
875
|
+
y === m ? ae.optionHighlighted : ""
|
|
876
876
|
].filter(Boolean).join(" "),
|
|
877
|
-
onMouseDown: (
|
|
878
|
-
|
|
877
|
+
onMouseDown: (se) => {
|
|
878
|
+
se.preventDefault(), k(_, se);
|
|
879
879
|
},
|
|
880
880
|
"data-testid": l ? `${l}-option-${y}` : void 0,
|
|
881
881
|
children: q
|
|
@@ -885,7 +885,7 @@ const on = "_dropdown_p6ohn_1", rn = "_label_p6ohn_9", sn = "_required_p6ohn_18"
|
|
|
885
885
|
})
|
|
886
886
|
}
|
|
887
887
|
),
|
|
888
|
-
h != null && /* @__PURE__ */ s("div", { id:
|
|
888
|
+
h != null && /* @__PURE__ */ s("div", { id: $, className: ae.error, role: "alert", children: h })
|
|
889
889
|
] });
|
|
890
890
|
};
|
|
891
891
|
lo.displayName = "AutoComplete";
|
|
@@ -918,9 +918,9 @@ const go = (e, t) => e == null ? [] : Array.isArray(e) ? t ? e : e.slice(0, 1) :
|
|
|
918
918
|
children: L,
|
|
919
919
|
...l
|
|
920
920
|
}) => {
|
|
921
|
-
const f = Be(), a = wo(f), m =
|
|
921
|
+
const f = Be(), a = wo(f), m = ie(() => de.Children.toArray(L).filter(
|
|
922
922
|
(k) => de.isValidElement(k) && k.type === dt
|
|
923
|
-
), [L]), g = e !== void 0, x =
|
|
923
|
+
), [L]), g = e !== void 0, x = ie(() => go(e, t), [e, t]), [W, N] = ne([]), j = g ? x : W, M = typeof r == "object" && r != null && typeof r.timeout == "number" ? r.timeout : void 0, U = /* @__PURE__ */ s(nn, { "aria-hidden": !0 }), $ = /* @__PURE__ */ s(Ye, { "aria-hidden": !0 }), C = n ?? U, V = o ?? $, H = (F, k) => {
|
|
924
924
|
const w = j.includes(F);
|
|
925
925
|
if (t) {
|
|
926
926
|
const _ = w ? j.filter((y) => y !== F) : [...j, F];
|
|
@@ -948,7 +948,7 @@ const go = (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 : C,
|
|
951
|
+
}) : w.headerTemplate : w.header, K = z ? V : C, se = [
|
|
952
952
|
ce.headerButton,
|
|
953
953
|
w.headerClassName ?? ""
|
|
954
954
|
].filter(Boolean).join(" "), le = [
|
|
@@ -968,7 +968,7 @@ const go = (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: se,
|
|
972
972
|
style: w.headerStyle,
|
|
973
973
|
"aria-controls": y,
|
|
974
974
|
"aria-expanded": z,
|
|
@@ -1276,21 +1276,21 @@ const Mo = ({
|
|
|
1276
1276
|
children: f,
|
|
1277
1277
|
"data-testid": a
|
|
1278
1278
|
}) => {
|
|
1279
|
-
const m = Be().replace(/:/g, ""), g = l ?? `emporix-tooltip-${m}`, [x, W] = ne(!1), [N, j] = ne({ top: 0, left: 0 }), [M, U] = ne(null),
|
|
1279
|
+
const m = Be().replace(/:/g, ""), g = l ?? `emporix-tooltip-${m}`, [x, W] = ne(!1), [N, j] = ne({ top: 0, left: 0 }), [M, U] = ne(null), $ = G(null), C = G(null), V = G({ x: 0, y: 0 }), H = G(), F = G(), k = X(() => {
|
|
1280
1280
|
H.current != null && (clearTimeout(H.current), H.current = void 0);
|
|
1281
1281
|
}, []), w = X(() => {
|
|
1282
1282
|
F.current != null && (clearTimeout(F.current), F.current = void 0);
|
|
1283
1283
|
}, []), z = X(() => {
|
|
1284
|
-
const b =
|
|
1284
|
+
const b = $.current;
|
|
1285
1285
|
if (b) {
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1286
|
+
const D = Io(b.getAttribute("data-pr-position"));
|
|
1287
|
+
if (D) return D;
|
|
1288
1288
|
}
|
|
1289
1289
|
return n;
|
|
1290
1290
|
}, [n]), E = X(() => {
|
|
1291
|
-
const b =
|
|
1292
|
-
if (!b ||
|
|
1293
|
-
const ee = b.getBoundingClientRect(), be =
|
|
1291
|
+
const b = $.current, D = C.current;
|
|
1292
|
+
if (!b || !D) return;
|
|
1293
|
+
const ee = b.getBoundingClientRect(), be = D.getBoundingClientRect(), pe = z();
|
|
1294
1294
|
j(
|
|
1295
1295
|
To({
|
|
1296
1296
|
anchorRect: ee,
|
|
@@ -1304,11 +1304,11 @@ const Mo = ({
|
|
|
1304
1304
|
);
|
|
1305
1305
|
}, [z, c, r, v]), _ = X(() => {
|
|
1306
1306
|
k(), w();
|
|
1307
|
-
const b =
|
|
1308
|
-
b instanceof HTMLElement && b.removeAttribute("aria-describedby"), W(!1),
|
|
1307
|
+
const b = $.current;
|
|
1308
|
+
b instanceof HTMLElement && b.removeAttribute("aria-describedby"), W(!1), $.current = null;
|
|
1309
1309
|
}, [w, k]), y = X(
|
|
1310
|
-
(b,
|
|
1311
|
-
h || Wo(
|
|
1310
|
+
(b, D) => {
|
|
1311
|
+
h || Wo(D) || (w(), k(), $.current = b, U(D), H.current = setTimeout(() => {
|
|
1312
1312
|
W(!0), b instanceof HTMLElement && b.setAttribute("aria-describedby", g);
|
|
1313
1313
|
}, u));
|
|
1314
1314
|
},
|
|
@@ -1325,30 +1325,30 @@ const Mo = ({
|
|
|
1325
1325
|
);
|
|
1326
1326
|
yt(() => {
|
|
1327
1327
|
x && E();
|
|
1328
|
-
}, [x, M, E]),
|
|
1328
|
+
}, [x, M, E]), re(() => {
|
|
1329
1329
|
if (!x) return;
|
|
1330
1330
|
const b = () => E();
|
|
1331
1331
|
window.addEventListener("scroll", b, !0), window.addEventListener("resize", b);
|
|
1332
|
-
const
|
|
1332
|
+
const D = (ee) => {
|
|
1333
1333
|
V.current = { x: ee.clientX, y: ee.clientY }, (c || z() === "mouse") && E();
|
|
1334
1334
|
};
|
|
1335
|
-
return (c || z() === "mouse") && window.addEventListener("mousemove",
|
|
1336
|
-
window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b), window.removeEventListener("mousemove",
|
|
1335
|
+
return (c || z() === "mouse") && window.addEventListener("mousemove", D), () => {
|
|
1336
|
+
window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b), window.removeEventListener("mousemove", D);
|
|
1337
1337
|
};
|
|
1338
|
-
}, [x, c, z, E]),
|
|
1338
|
+
}, [x, c, z, E]), re(() => {
|
|
1339
1339
|
if (!x) return;
|
|
1340
|
-
const b = (
|
|
1341
|
-
|
|
1340
|
+
const b = (D) => {
|
|
1341
|
+
D.key === "Escape" && _();
|
|
1342
1342
|
};
|
|
1343
1343
|
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
1344
|
-
}, [x, _]),
|
|
1344
|
+
}, [x, _]), re(() => {
|
|
1345
1345
|
if (x)
|
|
1346
1346
|
if (e) {
|
|
1347
|
-
const b =
|
|
1347
|
+
const b = $.current;
|
|
1348
1348
|
b && U(Ke(b, t));
|
|
1349
1349
|
} else
|
|
1350
1350
|
U(t ?? null);
|
|
1351
|
-
}, [t, x, e]),
|
|
1351
|
+
}, [t, x, e]), re(() => {
|
|
1352
1352
|
if (!e) return;
|
|
1353
1353
|
let b = [];
|
|
1354
1354
|
try {
|
|
@@ -1356,7 +1356,7 @@ const Mo = ({
|
|
|
1356
1356
|
} catch {
|
|
1357
1357
|
return;
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1359
|
+
const D = (S) => {
|
|
1360
1360
|
const te = S.currentTarget;
|
|
1361
1361
|
V.current = {
|
|
1362
1362
|
x: S.clientX,
|
|
@@ -1376,17 +1376,17 @@ const Mo = ({
|
|
|
1376
1376
|
K(S.relatedTarget);
|
|
1377
1377
|
};
|
|
1378
1378
|
return b.forEach((S) => {
|
|
1379
|
-
(o === "hover" || o === "both") && (S.addEventListener("mouseenter",
|
|
1379
|
+
(o === "hover" || o === "both") && (S.addEventListener("mouseenter", D), S.addEventListener("mousemove", ee), S.addEventListener("mouseleave", be)), (o === "focus" || o === "both") && (S.addEventListener("focusin", pe), S.addEventListener("focusout", ge));
|
|
1380
1380
|
}), () => {
|
|
1381
1381
|
b.forEach((S) => {
|
|
1382
|
-
(o === "hover" || o === "both") && (S.removeEventListener("mouseenter",
|
|
1382
|
+
(o === "hover" || o === "both") && (S.removeEventListener("mouseenter", D), S.removeEventListener("mousemove", ee), S.removeEventListener("mouseleave", be)), (o === "focus" || o === "both") && (S.removeEventListener("focusin", pe), S.removeEventListener("focusout", ge));
|
|
1383
1383
|
});
|
|
1384
1384
|
};
|
|
1385
1385
|
}, [e, t, o, y, K]);
|
|
1386
|
-
const
|
|
1386
|
+
const se = X(
|
|
1387
1387
|
(b) => {
|
|
1388
|
-
const
|
|
1389
|
-
V.current = { x: b.clientX, y: b.clientY },
|
|
1388
|
+
const D = b.currentTarget;
|
|
1389
|
+
V.current = { x: b.clientX, y: b.clientY }, $.current = D, y(D, t);
|
|
1390
1390
|
},
|
|
1391
1391
|
[t, y]
|
|
1392
1392
|
), le = X((b) => {
|
|
@@ -1398,8 +1398,8 @@ const Mo = ({
|
|
|
1398
1398
|
[K]
|
|
1399
1399
|
), J = X(
|
|
1400
1400
|
(b) => {
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1401
|
+
const D = b.currentTarget;
|
|
1402
|
+
$.current = D, y(D, t);
|
|
1403
1403
|
},
|
|
1404
1404
|
[t, y]
|
|
1405
1405
|
), Y = X(
|
|
@@ -1438,7 +1438,7 @@ const Mo = ({
|
|
|
1438
1438
|
{
|
|
1439
1439
|
className: B,
|
|
1440
1440
|
eventMode: o,
|
|
1441
|
-
onAnchorMouseEnter:
|
|
1441
|
+
onAnchorMouseEnter: se,
|
|
1442
1442
|
onAnchorMouseMove: le,
|
|
1443
1443
|
onAnchorMouseLeave: Z,
|
|
1444
1444
|
onAnchorFocusIn: J,
|
|
@@ -1782,7 +1782,7 @@ const ir = "_root_lv2tm_1", lr = "_iconWrap_lv2tm_13", cr = "_icon_lv2tm_13", ur
|
|
|
1782
1782
|
onSort: j,
|
|
1783
1783
|
onFilter: M,
|
|
1784
1784
|
currentPageReportTemplate: U = Pr,
|
|
1785
|
-
selection:
|
|
1785
|
+
selection: $,
|
|
1786
1786
|
selectionMode: C,
|
|
1787
1787
|
onSelectionChange: V,
|
|
1788
1788
|
isRowSelectable: H,
|
|
@@ -1795,20 +1795,24 @@ const ir = "_root_lv2tm_1", lr = "_iconWrap_lv2tm_13", cr = "_icon_lv2tm_13", ur
|
|
|
1795
1795
|
expandedRows: y,
|
|
1796
1796
|
onRowToggle: q,
|
|
1797
1797
|
rowExpansionTemplate: K,
|
|
1798
|
-
header:
|
|
1798
|
+
header: se,
|
|
1799
1799
|
footer: le
|
|
1800
1800
|
} = e, Z = Cr(), J = !l, Y = l ?? Z.paginationParams, ye = m ?? Y.totalRecords ?? Z.totalCount;
|
|
1801
|
-
|
|
1801
|
+
re(() => {
|
|
1802
1802
|
J && Z.setTotalCount(t.length);
|
|
1803
1803
|
}, [J, t.length]);
|
|
1804
|
-
const Pe =
|
|
1804
|
+
const Pe = ie(() => {
|
|
1805
1805
|
const A = o ? [...o] : [];
|
|
1806
1806
|
return w && A.push({
|
|
1807
1807
|
columnKey: "rowActions",
|
|
1808
1808
|
headerStyle: { width: "180px" },
|
|
1809
1809
|
body: w
|
|
1810
1810
|
}), A;
|
|
1811
|
-
}, [o, w]), [b,
|
|
1811
|
+
}, [o, w]), [b, D] = ne(!1);
|
|
1812
|
+
re(() => {
|
|
1813
|
+
!a && t.length > 0 && D(!1);
|
|
1814
|
+
}, [a, t.length]);
|
|
1815
|
+
const ee = ie(() => a ? (ye ?? 0) === 0 : b, [b, a, ye]), be = (A) => {
|
|
1812
1816
|
F && (C && xr(A.originalEvent.target) || (F(A.data, A.index), A.originalEvent.stopPropagation()));
|
|
1813
1817
|
}, pe = (A) => {
|
|
1814
1818
|
var Se, Oe;
|
|
@@ -1823,7 +1827,7 @@ const ir = "_root_lv2tm_1", lr = "_iconWrap_lv2tm_13", cr = "_icon_lv2tm_13", ur
|
|
|
1823
1827
|
Xe.dataTable,
|
|
1824
1828
|
v ? "" : Xe.noHeader,
|
|
1825
1829
|
F || C ? Xe.clickableRows : ""
|
|
1826
|
-
].filter(Boolean).join(" "), te = !ee && !(H && t.length > 0 && t.every((A) => !H({ data: A }))) ?
|
|
1830
|
+
].filter(Boolean).join(" "), te = !ee && !(H && t.length > 0 && t.every((A) => !H({ data: A }))) ? $ : void 0, Te = typeof L == "function" ? L() : L, xe = {
|
|
1827
1831
|
style: i,
|
|
1828
1832
|
"data-testid": c,
|
|
1829
1833
|
className: S,
|
|
@@ -1832,7 +1836,7 @@ const ir = "_root_lv2tm_1", lr = "_iconWrap_lv2tm_13", cr = "_icon_lv2tm_13", ur
|
|
|
1832
1836
|
value: t.length > 0 ? t : void 0,
|
|
1833
1837
|
size: "small",
|
|
1834
1838
|
onValueChange: (A) => {
|
|
1835
|
-
|
|
1839
|
+
D(A.length === 0);
|
|
1836
1840
|
},
|
|
1837
1841
|
responsiveLayout: "scroll",
|
|
1838
1842
|
onRowEditComplete: _,
|
|
@@ -1867,7 +1871,7 @@ const ir = "_root_lv2tm_1", lr = "_iconWrap_lv2tm_13", cr = "_icon_lv2tm_13", ur
|
|
|
1867
1871
|
rowExpansionTemplate: K,
|
|
1868
1872
|
onRowToggle: ge,
|
|
1869
1873
|
footer: le,
|
|
1870
|
-
header:
|
|
1874
|
+
header: se,
|
|
1871
1875
|
...C != null ? { selectionMode: C } : {}
|
|
1872
1876
|
};
|
|
1873
1877
|
return /* @__PURE__ */ s("div", { className: [lt.root, d].filter(Boolean).join(" "), children: /* @__PURE__ */ I(Et, { ...xe, children: [
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(P,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("primereact/dialog"),require("primereact/toast"),require("primereact/menu"),require("primereact/datatable"),require("primereact/column"),require("primereact/api")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","primereact/dialog","primereact/toast","primereact/menu","primereact/datatable","primereact/column","primereact/api"],o):(P=typeof globalThis<"u"?globalThis:P||self,o(P.EmporixComponentLibrary={},P.React,P.React,P.ReactDOM,P.dialog$1,P.toast$1,P.menu$1,P.datatable,P.column,P.api))})(this,(function(P,o,s,_t,bt,vt,yt,mt,Ze,gt){"use strict";const Oe={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var Ge={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ue=s.createContext&&s.createContext(Ge),wt=["attr","size","title"];function kt(e,t){if(e==null)return{};var n,r,d=Ct(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(r=0;r<p.length;r++)n=p[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(d[n]=e[n])}return d}function Ct(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xe(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bt(e,t,n){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nt(e){var t=xt(e,"string");return typeof t=="symbol"?t:t+""}function xt(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ye(e){return e&&e.map((t,n)=>s.createElement(t.tag,Pe({key:n},t.attr),Ye(t.child)))}function le(e){return t=>s.createElement(Pt,xe({attr:Pe({},e.attr)},t),Ye(e.child))}function Pt(e){var t=n=>{var{attr:r,size:d,title:p}=e,i=kt(e,wt),u=d||n.size||"1em",a;return n.className&&(a=n.className),e.className&&(a=(a?a+" ":"")+e.className),s.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:a,style:Pe(Pe({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),p&&s.createElement("title",null,p),e.children)};return Ue!==void 0?s.createElement(Ue.Consumer,null,n=>t(n)):t(Ge)}function Et(e){return le({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const $t=({children:e,disabled:t=!1,loading:n=!1,onClick:r,className:d="","data-testid":p,...i})=>{const u=[Oe.primaryButton,t?Oe.primaryButtonDisabled:"",d].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:u,disabled:t||n,onClick:r,"data-testid":p,...i,children:[n&&o.jsx(Et,{className:Oe.spinner,size:12}),e]})},Qe={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},Lt=({children:e,disabled:t=!1,onClick:n,className:r="","data-testid":d,...p})=>{const i=[Qe.secondaryButton,t?Qe.secondaryButtonDisabled:"",r].filter(Boolean).join(" ");return o.jsx("button",{type:"button",className:i,disabled:t,onClick:n,"data-testid":d,...p,children:e})},ie={tabsContainer:"_tabsContainer_m3c4e_1",tabsHeader:"_tabsHeader_m3c4e_7",tabItem:"_tabItem_m3c4e_13",tabContent:"_tabContent_m3c4e_29",tabLabel:"_tabLabel_m3c4e_51",tabLine:"_tabLine_m3c4e_61",active:"_active_m3c4e_68",inactive:"_inactive_m3c4e_76",tabPanels:"_tabPanels_m3c4e_84"},Dt=({tabs:e,activeTabId:t,onTabChange:n,className:r="","data-testid":d,...p})=>{var u;const i=[ie.tabsContainer,r].filter(Boolean).join(" ");return o.jsxs("div",{className:i,"data-testid":d,...p,children:[o.jsx("div",{className:ie.tabsHeader,children:e.map(a=>{const y=a.id===t,_=[ie.tabItem,y?ie.active:ie.inactive].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:_,onClick:()=>n(a.id),"data-testid":`${d}-tab-${a.id}`,children:[o.jsx("div",{className:ie.tabContent,children:o.jsx("span",{className:ie.tabLabel,children:a.label})}),o.jsx("div",{className:ie.tabLine})]},a.id)})}),o.jsx("div",{className:ie.tabPanels,children:(u=e.find(a=>a.id===t))==null?void 0:u.content})]})};function St(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function At(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function Ot(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function It(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Ie(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}const $={dropdown:"_dropdown_p6ohn_1",label:"_label_p6ohn_9",required:"_required_p6ohn_18",control:"_control_p6ohn_23",controlDisabled:"_controlDisabled_p6ohn_48",controlInput:"_controlInput_p6ohn_57",value:"_value_p6ohn_75",placeholder:"_placeholder_p6ohn_84",chipDisplay:"_chipDisplay_p6ohn_90",chipEmpty:"_chipEmpty_p6ohn_98",chipValue:"_chipValue_p6ohn_103",chipItem:"_chipItem_p6ohn_112",chipLabel:"_chipLabel_p6ohn_126",chipRemove:"_chipRemove_p6ohn_132",chipOverflow:"_chipOverflow_p6ohn_147",chevron:"_chevron_p6ohn_152",open:"_open_p6ohn_159",panel:"_panel_p6ohn_183",panelClosing:"_panelClosing_p6ohn_200",filterWrapper:"_filterWrapper_p6ohn_204",filterInput:"_filterInput_p6ohn_211",filterIcon:"_filterIcon_p6ohn_230",list:"_list_p6ohn_241",option:"_option_p6ohn_250",checkboxContainer:"_checkboxContainer_p6ohn_265",checkbox:"_checkbox_p6ohn_265",optionLabel:"_optionLabel_p6ohn_282",optionSelected:"_optionSelected_p6ohn_287",optionDisabled:"_optionDisabled_p6ohn_291",empty:"_empty_p6ohn_300",disabled:"_disabled_p6ohn_307",error:"_error_p6ohn_311"},ce=(e,t)=>{const r=e[t];return r!=null?String(r):""},fe=(e,t)=>e[t],he=(e,t)=>t==null?!1:!!e[t],Ft=({value:e,onChange:t,multiple:n=!1,display:r="comma",maxSelectedLabels:d,selectedItemsLabel:p="{0} items selected",removeIcon:i,onEditEnd:u,options:a,optionLabel:y="label",optionValue:_="value",optionDisabled:E,placeholder:L="Select",filter:c=!1,editable:h=!1,disabled:l=!1,required:b=!1,label:w,error:N,inputId:q,className:x="",panelClassName:F="",valueTemplate:z,itemTemplate:X,"data-testid":S})=>{const B=h&&!n,K=s.useMemo(()=>n&&Array.isArray(e)?e:[],[n,e]),Z=s.useMemo(()=>new Set(K.map(f=>String(f))),[K]),j=a.find(f=>!n&&fe(f,_)===e),C=s.useMemo(()=>n?a.filter(f=>Z.has(String(fe(f,_)))):[],[n,a,_,Z]),k=j?ce(j,y):"",H=C.map(f=>ce(f,y)).filter(Boolean).join(", "),[D,v]=s.useState(!1),[m,V]=s.useState(!1),[G,oe]=s.useState(""),[ae,U]=s.useState(k),J=s.useRef(null),Y=s.useRef(null),be=s.useRef(null),ke=s.useRef(null),g=s.useRef(!1),A=s.useMemo(()=>c&&!B?a.filter(f=>ce(f,y).toLowerCase().includes(G.toLowerCase())):a,[c,B,a,y,G]);s.useEffect(()=>{B&&U(k)},[B,e,k]),s.useEffect(()=>{D&&c&&!B&&(oe(""),setTimeout(()=>{var f;return(f=be.current)==null?void 0:f.focus()},0))},[D,c,B]);const R=()=>{g.current=!0,V(!0)},ve=f=>{var I;(g.current||(I=f.animationName)!=null&&I.includes("menuOut"))&&(g.current=!1,v(!1),V(!1),B&&U(k))};s.useEffect(()=>{if(!D&&!m)return;const f=I=>{J.current&&!J.current.contains(I.target)&&(B&&U(k),R())};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[D,m,B,k]);const de=()=>{l||v(f=>!f)},ye=(f,I)=>{if(he(f,E))return;const W=fe(f,_);if(B&&U(ce(f,y)),n){const M=W??null;if(M==null)return;const Q=Z.has(String(M))?K.filter(pe=>pe!==M):[...K,M];t==null||t({value:Q,originalEvent:I});return}t==null||t({value:W??null,originalEvent:I}),R()},O=f=>{if(!D){if(f.key==="Enter"&&B&&ae.trim()){f.preventDefault();const I=ae.trim(),W=I.toLowerCase(),M=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===W||pe.startsWith(W)}),te=M&&!he(M,E)?fe(M,_):null;M&&!he(M,E)&&(U(ce(M,y)),t==null||t({value:te,originalEvent:f})),u==null||u({value:I,selectedValue:te,originalEvent:f});return}(f.key==="Enter"||f.key===" "||f.key==="ArrowDown")&&(f.preventDefault(),v(!0));return}if(f.key==="Escape"){f.preventDefault(),R();return}if(f.key==="Enter"){if(f.preventDefault(),B){const I=ae.trim();if(I){const W=I.toLowerCase(),M=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===W||pe.startsWith(W)}),te=M&&!he(M,E)?fe(M,_):null;M&&!he(M,E)&&ye(M,f),u==null||u({value:I,selectedValue:te,originalEvent:f})}else u==null||u({value:"",selectedValue:null,originalEvent:f})}else if(A.length>0){const I=A.find(W=>!he(W,E));I&&!he(I,E)&&ye(I,f)}}},ee=n&&r==="chip",qe=(f,I)=>{if(I.stopPropagation(),l)return;const W=fe(f,_);if(W==null)return;const M=K.filter(te=>String(te)!==String(W));t==null||t({value:M,originalEvent:I})},ge=s.useMemo(()=>d==null?null:Math.max(0,d),[d]),T=s.useMemo(()=>!ee||ge==null?C:C.slice(0,ge),[ee,ge,C]),ze=ee&&ge!=null?Math.max(0,C.length-ge):0,Ve=[$.dropdown,l?$.disabled:"",D?$.open:"",x].filter(Boolean).join(" "),Se=[$.control,l?$.controlDisabled:"",ee?$.chipDisplay:"",ee&&C.length===0?$.chipEmpty:""].filter(Boolean).join(" "),Ae=[$.panel,m?$.panelClosing:"",F].filter(Boolean).join(" "),un=s.useId(),Ne=q??`dropdown-${un.replace(/[^a-zA-Z0-9_-]/g,"")}`,He=`${Ne}-panel`,Ke=N==null?void 0:`${Ne}-error`,ft=N==null?{}:{"aria-invalid":"true"},ht=Ke==null?{}:{"aria-describedby":Ke};return o.jsxs("div",{className:Ve,ref:J,"data-testid":S,children:[w!=null&&o.jsxs("label",{htmlFor:Ne,className:$.label,children:[w,b&&o.jsx("span",{className:$.required,children:"*"})]}),o.jsxs("div",{id:B?void 0:Ne,role:"combobox","aria-expanded":D||m,"aria-haspopup":"listbox","aria-controls":D||m?He:void 0,"aria-disabled":l,"aria-label":typeof w=="string"?w:void 0,...B?{}:ft,...B?{}:ht,tabIndex:B||l?-1:0,className:Se,onClick:B?void 0:de,onKeyDown:B?void 0:O,"data-testid":S&&!B?`${S}-control`:void 0,children:[B?o.jsx("input",{ref:ke,id:Ne,type:"text",className:$.controlInput,value:ae,onChange:f=>{U(f.target.value),!D&&!m&&v(!0)},onFocus:()=>{!l&&!D&&!m&&v(!0)},onKeyDown:O,placeholder:L,disabled:l,"aria-autocomplete":"list","aria-controls":D||m?He:void 0,"aria-expanded":D||m,...ft,...ht,"data-testid":S?`${S}-control`:void 0}):ee?o.jsx("span",{className:$.chipValue,children:C.length===0?o.jsx("span",{className:$.placeholder,children:L}):o.jsxs(o.Fragment,{children:[T.map((f,I)=>{const W=ce(f,y),M=fe(f,_),te=M!=null?String(M):`chip-${I}`;return o.jsxs("span",{className:$.chipItem,children:[o.jsx("span",{className:$.chipLabel,children:X?X(f):W}),!l&&o.jsx("button",{type:"button",className:$.chipRemove,onClick:Q=>qe(f,Q),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&Q.stopPropagation()},"aria-label":`Remove ${W}`,"data-testid":S?`${S}-chip-remove-${I}`:void 0,children:i??o.jsx(St,{"aria-hidden":!0})})]},te)}),ze>0&&o.jsx("span",{className:$.chipOverflow,children:p.replace("{0}",String(C.length))})]})}):o.jsx("span",{className:$.value,children:z&&!n?z(j??null):(n?H:k)||o.jsx("span",{className:$.placeholder,children:L})}),o.jsx(Ie,{className:$.chevron,"aria-hidden":!0,onClick:B?de:void 0})]}),(D||m)&&o.jsxs("div",{ref:Y,id:He,className:Ae,role:"presentation",onAnimationEnd:ve,"data-testid":S?`${S}-panel`:void 0,children:[c&&!B&&o.jsxs("div",{className:$.filterWrapper,children:[o.jsx("input",{ref:be,type:"text",className:$.filterInput,value:G,onChange:f=>{oe(f.target.value)},onKeyDown:f=>{f.key==="Escape"&&v(!1),f.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":S?`${S}-filter`:void 0}),o.jsx(At,{className:$.filterIcon,"aria-hidden":!0})]}),o.jsx("ul",{className:$.list,role:"listbox","aria-label":"Options",children:A.length===0?o.jsx("li",{className:$.empty,children:"No results"}):A.map((f,I)=>{const W=fe(f,_),M=ce(f,y),te=he(f,E),Q=n?Z.has(String(W)):e===W,pe=W!=null?String(W):`option-${I}`;return o.jsxs("li",{role:"option","aria-selected":Q,"aria-disabled":te,className:[$.option,Q?$.optionSelected:"",te?$.optionDisabled:""].filter(Boolean).join(" "),onClick:dn=>ye(f,dn),"data-testid":S?`${S}-option-${I}`:void 0,children:[n&&o.jsx("span",{className:$.checkboxContainer,"aria-hidden":!0,children:o.jsx("input",{type:"checkbox",checked:Q,readOnly:!0,tabIndex:-1,className:$.checkbox})}),o.jsx("span",{className:$.optionLabel,children:X?X(f):M})]},pe)})})]}),N==null?null:o.jsx("div",{id:Ke,className:$.error,role:"alert",children:N})]})},_e={inputText:"_inputText_2dnll_1",label:"_label_2dnll_9",required:"_required_2dnll_20",tooltipIcon:"_tooltipIcon_2dnll_25",input:"_input_2dnll_1",inputTextarea:"_inputTextarea_2dnll_72",error:"_error_2dnll_79",inputTextDisabled:"_inputTextDisabled_2dnll_88"},jt=({label:e,tooltip:t,required:n=!1,inputId:r,textarea:d=!1,rows:p,error:i,className:u="","data-testid":a,disabled:y=!1,..._})=>{const{type:E="text",...L}=_,c=s.useId(),h=r??`input-text-${c.replace(/[^a-zA-Z0-9_-]/g,"")}`,l=[_e.inputText,y?_e.inputTextDisabled:"",u].filter(Boolean).join(" "),b=L["aria-invalid"];let w;b===void 0?w=void 0:b===!0?w="true":b===!1?w="false":w=b;const N=n?{"aria-required":"true"}:{"aria-required":"false"},q=w===void 0&&i==null?{}:{"aria-invalid":w??"true"},x=i==null?void 0:`${h}-error`,F=[_e.input,d?_e.inputTextarea:""].filter(Boolean).join(" "),z={id:h,className:F,disabled:y,...N,...q,"aria-describedby":x,"data-testid":a?`${a}-input`:void 0};return o.jsxs("div",{className:l,"data-testid":a,children:[e!=null&&o.jsxs("label",{htmlFor:h,className:_e.label,children:[e,n&&o.jsx("span",{className:_e.required,children:"*"}),t!=null&&o.jsx("span",{className:_e.tooltipIcon,title:t,"aria-label":t,children:o.jsx(Ot,{"aria-hidden":!0})})]}),d?o.jsx("textarea",{...L,...z,rows:p??3}):o.jsx("input",{...L,...z,type:E}),i==null?null:o.jsx("div",{id:x,className:_e.error,role:"alert",children:i})]})},we={checkbox:"_checkbox_l6y66_1",input:"_input_l6y66_12",box:"_box_l6y66_26",checkboxDisabled:"_checkboxDisabled_l6y66_39",checkboxInvalid:"_checkboxInvalid_l6y66_63",checkboxReadOnly:"_checkboxReadOnly_l6y66_83"},Tt=({checked:e,value:t,onChange:n,inputId:r,disabled:d=!1,invalid:p=!1,className:i="",name:u,readOnly:a,required:y,tabIndex:_,"aria-label":E,"aria-labelledby":L,"data-testid":c,...h})=>{const l=s.useId(),b=r??`checkbox-${l.replace(/[^a-zA-Z0-9_-]/g,"")}`,w=x=>{d||a||n==null||n({originalEvent:x,checked:x.currentTarget.checked,...t!=null?{value:t}:{},stopPropagation:()=>x.stopPropagation(),preventDefault:()=>x.preventDefault()})},N=[we.checkbox,p?we.checkboxInvalid:"",d?we.checkboxDisabled:"",a?we.checkboxReadOnly:"",i].filter(Boolean).join(" "),q=d;return o.jsxs("div",{className:N,"data-testid":c,children:[o.jsx("input",{...h,type:"checkbox",id:b,...e!==void 0?{checked:e}:{},...t!=null?{value:String(t)}:{},onChange:w,disabled:q,readOnly:a,onClick:x=>{a&&x.preventDefault()},onKeyDown:x=>{a&&x.key===" "&&x.preventDefault()},required:y,name:u,tabIndex:_,"aria-label":E,"aria-labelledby":L,"aria-invalid":p?!0:void 0,className:we.input,"data-testid":c?`${c}-input`:void 0}),o.jsx("span",{className:we.box,"aria-hidden":"true"})]})},ne={root:"_root_1uwna_1",label:"_label_1uwna_7",inputWrap:"_inputWrap_1uwna_15",inputWrapDisabled:"_inputWrapDisabled_1uwna_28",inputWrapInvalid:"_inputWrapInvalid_1uwna_34",input:"_input_1uwna_15",dropdownButton:"_dropdownButton_1uwna_55",panel:"_panel_1uwna_71",option:"_option_1uwna_88",optionHighlighted:"_optionHighlighted_1uwna_94",error:"_error_1uwna_98"},Mt=300,Je=(e,t)=>{if(t){const r=e[t];return r!=null?String(r):""}const n=Object.values(e).find(r=>typeof r=="string");return n!=null?String(n):""},Re=({value:e,suggestions:t,completeMethod:n,field:r,onChange:d,onSelect:p,dropdown:i=!1,disabled:u=!1,placeholder:a,label:y,error:_,className:E="",inputId:L,"data-testid":c})=>{const[h,l]=s.useState(!1),[b,w]=s.useState(-1),N=s.useRef(null),q=s.useRef(null),x=s.useRef(),F=s.useId(),z=L??`autocomplete-${F.replace(/[^a-zA-Z0-9_-]/g,"")}`,X=`${z}-list`,S=_==null?void 0:`${z}-error`,B=h&&t.length>0;s.useEffect(()=>{w(v=>t.length===0?-1:v<0?v:v>=t.length?t.length-1:v)},[t]);const K=s.useMemo(()=>t.map(v=>Je(v,r)),[t,r]),Z=s.useCallback(v=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{n({query:v})},Mt)},[n]);s.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),s.useEffect(()=>{if(!h)return;const v=m=>{N.current&&!N.current.contains(m.target)&&(l(!1),w(-1))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[h]);const j=v=>{const m=v.target.value;d({value:m,originalEvent:v}),Z(m),l(!0),w(-1)},C=(v,m)=>{x.current&&(clearTimeout(x.current),x.current=void 0);const V=Je(v,r);d({value:V,originalEvent:m}),p==null||p({value:v,originalEvent:m}),l(!1),w(-1)},k=v=>{if(v.key==="ArrowDown"){v.preventDefault(),l(!0),w(m=>m<t.length-1?m+1:m);return}if(v.key==="ArrowUp"){if(v.preventDefault(),!h)return;w(m=>m>0?m-1:0);return}if(v.key==="Enter"&&h&&b>=0&&t[b]){v.preventDefault(),C(t[b],v);return}v.key==="Escape"&&(l(!1),w(-1))},H=[ne.root,E].filter(Boolean).join(" "),D=[ne.inputWrap,u?ne.inputWrapDisabled:"",_?ne.inputWrapInvalid:""].filter(Boolean).join(" ");return o.jsxs("div",{className:H,ref:N,"data-testid":c,children:[y!=null&&o.jsx("label",{htmlFor:z,className:ne.label,children:y}),o.jsxs("div",{className:D,children:[o.jsx("input",{ref:q,id:z,type:"text",className:ne.input,value:e,onChange:j,onKeyDown:k,onFocus:()=>{u||l(!0)},onBlur:v=>{var m;(m=N.current)!=null&&m.contains(v.relatedTarget)||(l(!1),w(-1))},disabled:u,placeholder:a,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-controls":B?X:void 0,"aria-activedescendant":B&&b>=0?`${z}-option-${b}`:void 0,"aria-autocomplete":"list","aria-invalid":_?!0:void 0,"aria-describedby":S,"data-testid":c?`${c}-input`:void 0}),i&&o.jsx("button",{type:"button",className:ne.dropdownButton,disabled:u,onClick:()=>{var v;u||(l(m=>{const V=!m;return V&&Z(e),V}),(v=q.current)==null||v.focus())},"aria-label":"Show suggestions","data-testid":c?`${c}-dropdown`:void 0,children:o.jsx(Ie,{"aria-hidden":!0})})]}),B&&o.jsx("ul",{id:X,className:ne.panel,role:"listbox","data-testid":c?`${c}-panel`:void 0,children:t.map((v,m)=>{const V=K[m],G=`${z}-option-${m}`;return o.jsx("li",{id:G,role:"option","aria-selected":m===b,className:[ne.option,m===b?ne.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:oe=>{oe.preventDefault(),C(v,oe)},"data-testid":c?`${c}-option-${m}`:void 0,children:V},G)})}),_!=null&&o.jsx("div",{id:S,className:ne.error,role:"alert",children:_})]})};Re.displayName="AutoComplete";const re={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},Fe=e=>null;Fe.displayName="AccordionTab";const Wt=(e,t)=>e==null?[]:Array.isArray(e)?t?e:e.slice(0,1):[e],qt=e=>e.replace(/[^a-zA-Z0-9_-]/g,""),et=({activeIndex:e,multiple:t=!1,expandIcon:n,collapseIcon:r,onTabChange:d,onTabOpen:p,onTabClose:i,className:u="",transitionOptions:a,pt:y,ptOptions:_,unstyled:E,children:L,...c})=>{const h=s.useId(),l=qt(h),b=s.useMemo(()=>s.Children.toArray(L).filter(C=>s.isValidElement(C)&&C.type===Fe),[L]),w=e!==void 0,N=s.useMemo(()=>Wt(e,t),[e,t]),[q,x]=s.useState([]),F=w?N:q,z=typeof a=="object"&&a!=null&&typeof a.timeout=="number"?a.timeout:void 0,X=o.jsx(It,{"aria-hidden":!0}),S=o.jsx(Ie,{"aria-hidden":!0}),B=n??X,K=r??S,Z=(j,C)=>{const k=F.includes(j);if(t){const v=k?F.filter(m=>m!==j):[...F,j];w||x(v),d==null||d({index:v,originalEvent:C}),k?i==null||i({index:j,originalEvent:C}):p==null||p({index:j,originalEvent:C});return}const H=F.length?F[0]:null,D=k?[]:[j];if(w||x(D),d==null||d({index:D,originalEvent:C}),k){i==null||i({index:j,originalEvent:C});return}H!=null&&(i==null||i({index:H,originalEvent:C})),p==null||p({index:j,originalEvent:C})};return o.jsx("div",{className:[re.accordion,u].filter(Boolean).join(" "),...c,children:b.map((j,C)=>{var J;const k=j.props,H=F.includes(C),D=!!k.disabled,v=`${l}-header-${C}`,m=`${l}-content-${C}`,V=k.headerTemplate!=null?typeof k.headerTemplate=="function"?k.headerTemplate({index:C,selected:H,disabled:D,count:b.length,first:C===0,last:C===b.length-1}):k.headerTemplate:k.header,G=H?K:B,oe=[re.headerButton,k.headerClassName??""].filter(Boolean).join(" "),ae=[re.tab,k.className??"",C===b.length-1?re.noBorderLast:""].filter(Boolean).join(" "),U=typeof V=="string"?V:void 0;return o.jsxs("div",{className:ae,style:k.style,children:[o.jsxs("button",{id:v,type:"button",disabled:D,className:oe,style:k.headerStyle,"aria-controls":m,"aria-expanded":H,"aria-disabled":D,tabIndex:k.tabIndex,onClick:Y=>Z(C,Y),...k.headerProps,"aria-label":((J=k.headerProps)==null?void 0:J["aria-label"])??U,children:[o.jsx("span",{className:re.headerContent,children:V}),o.jsx("span",{className:re.icon,"aria-hidden":!0,children:G})]}),o.jsx("div",{id:m,role:"region","aria-labelledby":v,"aria-hidden":!H,className:[re.panel,H?re.panelOpen:re.panelCollapsed].join(" "),style:{transitionDuration:z?`${z}ms`:void 0},children:o.jsx("div",{className:[re.panelContent,k.contentClassName??""].filter(Boolean).join(" "),style:k.contentStyle,children:k.children})})]},C)})})};et.displayName="Accordion";const me={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},tt=(e,t)=>{const r=e[t];return r!=null?String(r):""},je=(e,t)=>e[t],nt=(e,t)=>t==null?!1:!!e[t],zt=({value:e,onChange:t,options:n,optionLabel:r="label",optionValue:d="value",optionDisabled:p,multiple:i=!1,itemTemplate:u,disabled:a=!1,invalid:y=!1,className:_="","data-testid":E})=>{const L=l=>{const b=je(l,d);return i&&Array.isArray(e)?e.includes(b):e===b},c=(l,b)=>{if(a||nt(l,p))return;const w=je(l,d);if(w===void 0)return;let N;if(i){const q=Array.isArray(e)?e:[];N=q.includes(w)?q.filter(F=>F!==w):[...q,w]}else N=e===w?null:w;t==null||t({value:N,originalEvent:b})},h=[me.selectButton,a?me.selectButtonDisabled:"",y?me.selectButtonInvalid:"",_].filter(Boolean).join(" ");return o.jsx("div",{className:h,role:"group","aria-disabled":a,"data-testid":E,children:n.map((l,b)=>{const w=je(l,d),N=w!=null?String(w):`option-${b}`,q=nt(l,p),x=L(l);return o.jsx("button",{type:"button","aria-pressed":x,"aria-disabled":q||a,"aria-label":tt(l,r),disabled:a||q,className:[me.button,x?me.buttonSelected:"",b===0?me.buttonFirst:"",b===n.length-1?me.buttonLast:""].filter(Boolean).join(" "),onClick:F=>c(l,F),onKeyDown:F=>{(F.key===" "||F.key==="Enter")&&(F.preventDefault(),c(l,F))},"data-testid":E?`${E}-option-${b}`:void 0,children:u?u(l):tt(l,r)},N)})})},Ee={radioButton:"_radioButton_l80ql_1",radioButtonDisabled:"_radioButtonDisabled_l80ql_10",label:"_label_l80ql_14",input:"_input_l80ql_18"},Vt=({inputId:e,name:t,value:n,checked:r,onChange:d,disabled:p=!1,label:i,className:u="","data-testid":a,...y})=>{const _=s.useId(),E=e??`radiobutton-${_.replace(/[^a-zA-Z0-9_-]/g,"")}`,L=h=>{d==null||d({value:n,originalEvent:h})},c=[Ee.radioButton,p?Ee.radioButtonDisabled:"",u].filter(Boolean).join(" ");return o.jsxs("div",{className:c,"data-testid":a,children:[o.jsx("input",{...y,type:"radio",id:E,name:t,value:String(n),...r!==void 0?{checked:r}:{},disabled:p,onChange:L,className:Ee.input,"data-testid":a?`${a}-input`:void 0}),i!=null&&o.jsx("label",{htmlFor:E,className:Ee.label,children:i})]})},$e={anchorWrap:"_anchorWrap_h9mnj_1",panel:"_panel_h9mnj_7",panelInteractive:"_panelInteractive_h9mnj_23",panelPassThrough:"_panelPassThrough_h9mnj_27"},Ce=8,Le=8;function Be(...e){return t=>{e.forEach(n=>n==null?void 0:n(t))}}function Ht(e){if(e==="top"||e==="bottom"||e==="left"||e==="right"||e==="mouse")return e}function Kt(e){const{anchorRect:t,tooltipRect:n,placement:r,pointer:d,mouseTrack:p,mouseTrackTop:i,mouseTrackLeft:u}=e;if(r==="mouse"||p)return{top:d.y+i,left:d.x+u};let a=0,y=0;switch(r){case"top":a=t.top-n.height-Ce,y=t.left+t.width/2-n.width/2;break;case"bottom":a=t.bottom+Ce,y=t.left+t.width/2-n.width/2;break;case"left":a=t.top+t.height/2-n.height/2,y=t.left-n.width-Ce;break;case"right":a=t.top+t.height/2-n.height/2,y=t.right+Ce;break;default:a=t.top-n.height-Ce,y=t.left+t.width/2-n.width/2}const _=window.innerWidth,E=window.innerHeight;return y=Math.min(Math.max(y,Le),_-n.width-Le),a=Math.min(Math.max(a,Le),E-n.height-Le),{top:a,left:y}}function Te(e,t){const n=e.getAttribute("data-pr-tooltip");return n!=null&&n!==""?n:t??""}function Zt(e){return e==null?!0:typeof e=="string"||typeof e=="number"?String(e)==="":!1}const Gt=({children:e,className:t,eventMode:n,onAnchorMouseEnter:r,onAnchorMouseMove:d,onAnchorMouseLeave:p,onAnchorFocusIn:i,onAnchorFocusOut:u})=>{const a=s.Children.toArray(e);if(a.length!==1||!s.isValidElement(a[0])){const h=[$e.anchorWrap,t].filter(Boolean).join(" "),l=n==="hover"||n==="both"?{onMouseEnter:r,onMouseMove:d,onMouseLeave:p}:{},b=n==="focus"||n==="both"?{onFocusCapture:i,onBlurCapture:u}:{};return o.jsx("span",{className:h,...l,...b,children:e})}const _=a[0],E=n==="hover"||n==="both"?{onMouseEnter:Be(r,_.props.onMouseEnter),onMouseMove:Be(d,_.props.onMouseMove),onMouseLeave:Be(p,_.props.onMouseLeave)}:{},L=n==="focus"||n==="both"?{onFocusCapture:Be(i,_.props.onFocusCapture),onBlurCapture:Be(u,_.props.onBlurCapture)}:{},c=[t,_.props.className].filter(Boolean).join(" ");return s.cloneElement(_,{...E,...L,...c?{className:c}:{},ref:_.props.ref})},Ut=({target:e,content:t,position:n="top",event:r="hover",showDelay:d=0,hideDelay:p=0,autoHide:i=!0,mouseTrack:u=!1,mouseTrackTop:a=0,mouseTrackLeft:y=0,disabled:_=!1,className:E="",panelClassName:L="",id:c,children:h,"data-testid":l})=>{const b=s.useId().replace(/:/g,""),w=c??`emporix-tooltip-${b}`,[N,q]=s.useState(!1),[x,F]=s.useState({top:0,left:0}),[z,X]=s.useState(null),S=s.useRef(null),B=s.useRef(null),K=s.useRef({x:0,y:0}),Z=s.useRef(),j=s.useRef(),C=s.useCallback(()=>{Z.current!=null&&(clearTimeout(Z.current),Z.current=void 0)},[]),k=s.useCallback(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),H=s.useCallback(()=>{const g=S.current;if(g){const A=Ht(g.getAttribute("data-pr-position"));if(A)return A}return n},[n]),D=s.useCallback(()=>{const g=S.current,A=B.current;if(!g||!A)return;const R=g.getBoundingClientRect(),ve=A.getBoundingClientRect(),de=H();F(Kt({anchorRect:R,tooltipRect:ve,placement:de,pointer:K.current,mouseTrack:u,mouseTrackTop:a,mouseTrackLeft:y}))},[H,u,a,y]),v=s.useCallback(()=>{C(),k();const g=S.current;g instanceof HTMLElement&&g.removeAttribute("aria-describedby"),q(!1),S.current=null},[k,C]),m=s.useCallback((g,A)=>{_||Zt(A)||(k(),C(),S.current=g,X(A),Z.current=setTimeout(()=>{q(!0),g instanceof HTMLElement&&g.setAttribute("aria-describedby",w)},d))},[k,C,_,d,w]),V=s.useCallback(()=>{C(),k(),j.current=setTimeout(()=>{v()},p)},[k,C,v,p]),G=s.useCallback(g=>{!i&&B.current&&g instanceof Node&&B.current.contains(g)||V()},[i,V]);s.useLayoutEffect(()=>{N&&D()},[N,z,D]),s.useEffect(()=>{if(!N)return;const g=()=>D();window.addEventListener("scroll",g,!0),window.addEventListener("resize",g);const A=R=>{K.current={x:R.clientX,y:R.clientY},(u||H()==="mouse")&&D()};return(u||H()==="mouse")&&window.addEventListener("mousemove",A),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),window.removeEventListener("mousemove",A)}},[N,u,H,D]),s.useEffect(()=>{if(!N)return;const g=A=>{A.key==="Escape"&&v()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[N,v]),s.useEffect(()=>{if(N)if(e){const g=S.current;g&&X(Te(g,t))}else X(t??null)},[t,N,e]),s.useEffect(()=>{if(!e)return;let g=[];try{g=Array.from(document.querySelectorAll(e))}catch{return}const A=O=>{const ee=O.currentTarget;K.current={x:O.clientX,y:O.clientY},m(ee,Te(ee,t))},R=O=>{K.current={x:O.clientX,y:O.clientY}},ve=O=>{G(O.relatedTarget)},de=O=>{const ee=O.currentTarget;m(ee,Te(ee,t))},ye=O=>{G(O.relatedTarget)};return g.forEach(O=>{(r==="hover"||r==="both")&&(O.addEventListener("mouseenter",A),O.addEventListener("mousemove",R),O.addEventListener("mouseleave",ve)),(r==="focus"||r==="both")&&(O.addEventListener("focusin",de),O.addEventListener("focusout",ye))}),()=>{g.forEach(O=>{(r==="hover"||r==="both")&&(O.removeEventListener("mouseenter",A),O.removeEventListener("mousemove",R),O.removeEventListener("mouseleave",ve)),(r==="focus"||r==="both")&&(O.removeEventListener("focusin",de),O.removeEventListener("focusout",ye))})}},[e,t,r,m,G]);const oe=s.useCallback(g=>{const A=g.currentTarget;K.current={x:g.clientX,y:g.clientY},S.current=A,m(A,t)},[t,m]),ae=s.useCallback(g=>{K.current={x:g.clientX,y:g.clientY}},[]),U=s.useCallback(g=>{G(g.relatedTarget)},[G]),J=s.useCallback(g=>{const A=g.currentTarget;S.current=A,m(A,t)},[t,m]),Y=s.useCallback(g=>{G(g.relatedTarget)},[G]),be=[$e.panel,i?$e.panelPassThrough:$e.panelInteractive,L].filter(Boolean).join(" "),ke=typeof document<"u"&&N&&z!=null?_t.createPortal(o.jsx("div",{ref:B,id:w,role:"tooltip",className:be,style:{top:x.top,left:x.left},onMouseEnter:i?void 0:()=>{k()},onMouseLeave:i?void 0:()=>{V()},"data-testid":l?`${l}-panel`:void 0,children:z}),document.body):null;return e?o.jsx(o.Fragment,{children:ke}):o.jsxs(o.Fragment,{children:[h!=null?o.jsx(Gt,{className:E,eventMode:r,onAnchorMouseEnter:oe,onAnchorMouseMove:ae,onAnchorMouseLeave:U,onAnchorFocusIn:J,onAnchorFocusOut:Y,children:h}):null,ke]})},Xt={dialog:"_dialog_8bk4d_1"},ot=({visible:e,onHide:t,header:n,footer:r,children:d,className:p="",style:i,modal:u=!0,dismissableMask:a,closable:y=!0,draggable:_=!1,"data-testid":E})=>{const L=[Xt.dialog,p].filter(Boolean).join(" ");return o.jsx(bt.Dialog,{visible:e,onHide:t,header:n,footer:r,modal:u,dismissableMask:a??u,closable:y,draggable:_,style:i,className:L,"data-testid":E,children:d})};ot.displayName="Dialog";function rt(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(e)}function Me(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(e)}function st(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(e)}const ue={root:"_root_6kjk2_1",header:"_header_6kjk2_5",iconWrap:"_iconWrap_6kjk2_12",title:"_title_6kjk2_18",message:"_message_6kjk2_22",iconSuccess:"_iconSuccess_6kjk2_27",iconError:"_iconError_6kjk2_32",iconWarn:"_iconWarn_6kjk2_37",iconInfo:"_iconInfo_6kjk2_42"},De=e=>{const{title:t,message:n,type:r}=e,d=p=>{switch(p){case"success":return o.jsx(st,{className:ue.iconSuccess,size:16});case"error":return o.jsx(Me,{className:ue.iconError,size:16});case"warn":return o.jsx(Me,{className:ue.iconWarn,size:16});default:return o.jsx(rt,{className:ue.iconInfo,size:16})}};return o.jsxs("div",{className:ue.root,children:[o.jsxs("div",{className:ue.header,children:[o.jsx("div",{className:ue.iconWrap,children:d(r)}),o.jsx("span",{className:ue.title,children:t})]}),n&&o.jsx("div",{className:ue.message,children:n})]})},Yt={toast:"_toast_538wi_1"},at={list:"_list_1nsqq_1"},lt=s.createContext({showSuccess:()=>{},showError:()=>{},showToast:()=>{}}),Qt=()=>s.useContext(lt),Jt=e=>{const t=s.useRef(null),n=s.useCallback((p,i,u)=>{var a;(a=t.current)==null||a.show({severity:"success",content:o.jsx(De,{title:p,message:i,type:"success"}),life:u||(typeof i=="string"&&i.length>50?i.length*80:4e3)})},[t]),r=s.useCallback((p,i,u)=>{var L;const a=c=>{if(!c)return{detail:"",textForLife:""};if(typeof c=="string")return{detail:c,textForLife:c};if(typeof c=="object"&&!Array.isArray(c))return{detail:c,textForLife:""};if(Array.isArray(c))if(c.some(l=>typeof l!="string")){const l=c;return c.length<=1?{detail:l[0].message,textForLife:l[0].message}:{detail:o.jsx("ul",{className:at.list,children:l.map((w,N)=>o.jsx("li",{children:w.message},N))}),textForLife:c.join(" • ")}}else{const l=c;return c.length<=1?{detail:l[0],textForLife:l[0]}:{detail:o.jsx("ul",{className:at.list,children:l.map((w,N)=>o.jsx("li",{children:w},N))}),textForLife:c.join(" • ")}}const h=String(c);return{detail:h,textForLife:h}},{detail:y,textForLife:_}=a(i),E=3e3+_.length*50;(L=t.current)==null||L.show({severity:"error",content:o.jsx(De,{title:p,message:y,type:"error"}),life:u||E})},[t]),d=s.useCallback((p,i,u)=>{var a;(a=t.current)==null||a.show({severity:u,content:o.jsx(De,{title:p,message:i,type:u})})},[t]);return o.jsxs(lt.Provider,{value:{showSuccess:n,showError:r,showToast:d},children:[o.jsx(vt.Toast,{ref:t,position:"top-center",className:Yt.toast}),e.children]})},Rt={menu:"_menu_4pmis_1"},en={},it=e=>e.filter(t=>t.visible!==!1).map(t=>({label:t.label,icon:t.icon,disabled:t.disabled,separator:t.separator,command:t.command?n=>{var r;return(r=t.command)==null?void 0:r.call(t,{originalEvent:n.originalEvent,item:t})}:void 0,items:t.items?it(t.items):void 0})),ct=s.forwardRef(({model:e,popup:t=!1,id:n,className:r="","data-testid":d},p)=>{const i=s.useRef(null),u=s.useRef(null);s.useImperativeHandle(p,()=>({toggle:y=>{var _;u.current=y,(_=i.current)==null||_.toggle(y)},show:y=>{var _;u.current=y,(_=i.current)==null||_.show(y)},hide:()=>{!i.current||!u.current||i.current.hide(u.current)}}));const a=[en.menu,Rt.menu,r].filter(Boolean).join(" ");return o.jsx(yt.Menu,{ref:i,id:n,model:it(e),popup:t,className:a,"data-testid":d})});ct.displayName="Menu";const se={root:"_root_lv2tm_1",iconWrap:"_iconWrap_lv2tm_13",icon:"_icon_lv2tm_13",content:"_content_lv2tm_25",info:"_info_lv2tm_30",success:"_success_lv2tm_38",warn:"_warn_lv2tm_46",error:"_error_lv2tm_54"},tn={info:se.info,success:se.success,warn:se.warn,error:se.error},nn=({severity:e})=>{switch(e){case"success":return o.jsx(st,{className:se.icon,"aria-hidden":!0});case"warn":case"error":return o.jsx(Me,{className:se.icon,"aria-hidden":!0});default:return o.jsx(rt,{className:se.icon,"aria-hidden":!0})}},on=({severity:e="info",text:t,children:n,icon:r,className:d="","data-testid":p})=>{const i=n??t,u=e==="warn"||e==="error"?"alert":"status",a=[se.root,tn[e],d].filter(Boolean).join(" ");return o.jsxs("div",{className:a,role:u,"data-testid":p,"data-severity":e,children:[o.jsx("span",{className:se.iconWrap,children:r??o.jsx(nn,{severity:e})}),i!=null&&i!==""&&o.jsx("span",{className:se.content,children:i})]})},We={dataTable:"_dataTable_pppoi_1",noHeader:"_noHeader_pppoi_226",clickableRows:"_clickableRows_pppoi_230"},ut={root:"_root_g4y44_1",table:"_table_g4y44_5"},dt={currentPage:1,rows:10,first:0,sortOrder:null,sortField:void 0,rowsPerPageOptions:[10,25,50,100]},pt=(e=dt)=>{const[t,n]=s.useState(e),[r,d]=s.useState(0),p=c=>{const{first:h,page:l,rows:b}=c;n(w=>({...w,currentPage:(l??0)+1,first:h,rows:b}))},i=c=>Object.fromEntries(Object.entries(c).map(([h,l])=>{const b=l;return b.value!==null&&typeof b.value=="string"&&b.value===""?[h,{...l,value:null}]:[h,l]})),u=c=>{var l;const h=c;return(l=h.constraints)!=null&&l.length?h.constraints.some(b=>b.value!==void 0&&b.value!==null&&b.value!==""):h.value!==void 0&&h.value!==null&&h.value!==""},a=c=>Object.keys(c).some(h=>u(c[h]));return{onSortCallback:c=>{if(!c.sortField){n(h=>({...h,sortOrder:null,sortField:void 0}));return}n(h=>c.sortField===h.sortField?h.sortOrder===null||h.sortOrder===0?{...h,sortOrder:1}:h.sortOrder===1?{...h,sortOrder:-1}:{...h,sortOrder:null,sortField:void 0}:{...h,sortField:c.sortField,sortOrder:1})},resetPagination:()=>{n(e)},paginationParams:t,setPaginationParams:n,totalCount:r,setTotalCount:d,onPageCallback:p,onFilterCallback:c=>{const h=i(c.filters??{});n(l=>({...l,first:0,currentPage:1,filters:a(h)?h:void 0}))},setFilters:c=>{const h={};c.filter(l=>l.filter).forEach(l=>{const b=l.filterField||l.field||l.columnKey;b&&typeof b=="string"&&(h[b]={value:null,matchMode:l.filterMatchMode||gt.FilterMatchMode.CONTAINS})}),n(l=>({...l,filters:h}))}}},rn=e=>e instanceof Element?e.closest(".p-selection-column")!==null||e.closest(".p-checkbox")!==null||e.closest(".p-radiobutton")!==null:!1,sn=(e,t)=>e==="checkbox"||e==="radio"||!t,an="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",ln="{first} - {last} of {totalRecords}",cn=e=>{const{value:t,dataKey:n,columns:r,children:d,className:p="",style:i,"data-testid":u,tableRef:a,showHeaders:y=!0,showFilter:_=!0,loading:E=!1,emptyTemplate:L,pagination:c,paginator:h=!0,lazy:l=!1,totalRecords:b,sortField:w,sortOrder:N,globalFilterFields:q,onPage:x,onSort:F,onFilter:z,currentPageReportTemplate:X=ln,selection:S,selectionMode:B,onSelectionChange:K,isRowSelectable:Z,onRowClick:j,rowClassName:C,rowActions:k,editMode:H,editingRows:D,onRowEditComplete:v,expandedRows:m,onRowToggle:V,rowExpansionTemplate:G,header:oe,footer:ae}=e,U=pt(),J=!c,Y=c??U.paginationParams,be=b??Y.totalRecords??U.totalCount;s.useEffect(()=>{J&&U.setTotalCount(t.length)},[J,t.length]);const ke=s.useMemo(()=>{const T=r?[...r]:[];return k&&T.push({columnKey:"rowActions",headerStyle:{width:"180px"},body:k}),T},[r,k]),[g,A]=s.useState(!1),R=s.useMemo(()=>l?(be??0)===0:t.length===0||g,[g,l,be,t.length]),ve=T=>{j&&(B&&rn(T.originalEvent.target)||(j(T.data,T.index),T.originalEvent.stopPropagation()))},de=T=>{var Se,Ae;if(!K)return;const ze=T.type==="checkbox"||T.type==="radio",Ve=((Ae=(Se=T.originalEvent).isPropagationStopped)==null?void 0:Ae.call(Se))??!1;sn(T.type,Ve)&&(K(T.value),ze||T.originalEvent.stopPropagation())},ye=T=>{V==null||V(T.data)},O=[ut.table,We.dataTable,y?"":We.noHeader,j||B?We.clickableRows:""].filter(Boolean).join(" "),ee=!R&&!(Z&&t.length>0&&t.every(T=>!Z({data:T})))?S:void 0,qe=typeof L=="function"?L():L,ge={style:i,"data-testid":u,className:O,ref:a,dataKey:n,value:t.length>0?t:void 0,size:"small",onValueChange:T=>{A(T.length===0)},responsiveLayout:"scroll",onRowEditComplete:v,rowClassName:C,editMode:H,editingRows:D,rows:Y.rows,filterDisplay:_?"row":void 0,filters:Y.filters,globalFilterFields:q??Y.globalFilterFields,paginator:h&&!R,paginatorTemplate:Y.paginatorTemplate??an,first:Y.first,totalRecords:be,rowsPerPageOptions:Y.rowsPerPageOptions,sortField:w??Y.sortField,sortOrder:N??Y.sortOrder??void 0,onPage:J?x??U.onPageCallback:x,onSort:J?F??U.onSortCallback:F,onFilter:J?z??U.onFilterCallback:z,currentPageReportTemplate:X,stripedRows:!0,isDataSelectable:Z,emptyMessage:qe,loading:E,removableSort:!0,onSelectionChange:de,selection:ee,onRowClick:ve,lazy:l,expandedRows:m??void 0,rowExpansionTemplate:G,onRowToggle:ye,footer:ae,header:oe,...B!=null?{selectionMode:B}:{}};return o.jsx("div",{className:[ut.root,p].filter(Boolean).join(" "),children:o.jsxs(mt.DataTable,{...ge,children:[B&&o.jsx(Ze.Column,{selectionMode:B,headerStyle:{width:"78px"}}),ke.map(T=>o.jsx(Ze.Column,{...T},String(T.columnKey??T.field))),d]})})};P.Accordion=et,P.AccordionTab=Fe,P.AutoComplete=Re,P.Checkbox=Tt,P.DEFAULT_DATA_TABLE_PAGINATION=dt,P.DataTable=cn,P.Dialog=ot,P.Dropdown=Ft,P.InputText=jt,P.Menu=ct,P.Message=on,P.PrimaryButton=$t,P.RadioButton=Vt,P.SecondaryButton=Lt,P.SelectButton=zt,P.Tabs=Dt,P.ToastProvider=Jt,P.ToastTemplate=De,P.Tooltip=Ut,P.useDataTablePagination=pt,P.useToast=Qt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(E,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("primereact/dialog"),require("primereact/toast"),require("primereact/menu"),require("primereact/datatable"),require("primereact/column"),require("primereact/api")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","primereact/dialog","primereact/toast","primereact/menu","primereact/datatable","primereact/column","primereact/api"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E.EmporixComponentLibrary={},E.React,E.React,E.ReactDOM,E.dialog$1,E.toast$1,E.menu$1,E.datatable,E.column,E.api))})(this,(function(E,o,s,_t,bt,vt,yt,mt,Ze,gt){"use strict";const Oe={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var Ge={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ue=s.createContext&&s.createContext(Ge),wt=["attr","size","title"];function kt(e,t){if(e==null)return{};var n,r,d=Ct(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(r=0;r<p.length;r++)n=p[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(d[n]=e[n])}return d}function Ct(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xe(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bt(e,t,n){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nt(e){var t=xt(e,"string");return typeof t=="symbol"?t:t+""}function xt(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ye(e){return e&&e.map((t,n)=>s.createElement(t.tag,Ee({key:n},t.attr),Ye(t.child)))}function le(e){return t=>s.createElement(Et,xe({attr:Ee({},e.attr)},t),Ye(e.child))}function Et(e){var t=n=>{var{attr:r,size:d,title:p}=e,i=kt(e,wt),u=d||n.size||"1em",a;return n.className&&(a=n.className),e.className&&(a=(a?a+" ":"")+e.className),s.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:a,style:Ee(Ee({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),p&&s.createElement("title",null,p),e.children)};return Ue!==void 0?s.createElement(Ue.Consumer,null,n=>t(n)):t(Ge)}function Pt(e){return le({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const $t=({children:e,disabled:t=!1,loading:n=!1,onClick:r,className:d="","data-testid":p,...i})=>{const u=[Oe.primaryButton,t?Oe.primaryButtonDisabled:"",d].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:u,disabled:t||n,onClick:r,"data-testid":p,...i,children:[n&&o.jsx(Pt,{className:Oe.spinner,size:12}),e]})},Qe={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},Lt=({children:e,disabled:t=!1,onClick:n,className:r="","data-testid":d,...p})=>{const i=[Qe.secondaryButton,t?Qe.secondaryButtonDisabled:"",r].filter(Boolean).join(" ");return o.jsx("button",{type:"button",className:i,disabled:t,onClick:n,"data-testid":d,...p,children:e})},ie={tabsContainer:"_tabsContainer_m3c4e_1",tabsHeader:"_tabsHeader_m3c4e_7",tabItem:"_tabItem_m3c4e_13",tabContent:"_tabContent_m3c4e_29",tabLabel:"_tabLabel_m3c4e_51",tabLine:"_tabLine_m3c4e_61",active:"_active_m3c4e_68",inactive:"_inactive_m3c4e_76",tabPanels:"_tabPanels_m3c4e_84"},Dt=({tabs:e,activeTabId:t,onTabChange:n,className:r="","data-testid":d,...p})=>{var u;const i=[ie.tabsContainer,r].filter(Boolean).join(" ");return o.jsxs("div",{className:i,"data-testid":d,...p,children:[o.jsx("div",{className:ie.tabsHeader,children:e.map(a=>{const y=a.id===t,_=[ie.tabItem,y?ie.active:ie.inactive].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:_,onClick:()=>n(a.id),"data-testid":`${d}-tab-${a.id}`,children:[o.jsx("div",{className:ie.tabContent,children:o.jsx("span",{className:ie.tabLabel,children:a.label})}),o.jsx("div",{className:ie.tabLine})]},a.id)})}),o.jsx("div",{className:ie.tabPanels,children:(u=e.find(a=>a.id===t))==null?void 0:u.content})]})};function St(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function At(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function Ot(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function It(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Ie(e){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}const $={dropdown:"_dropdown_p6ohn_1",label:"_label_p6ohn_9",required:"_required_p6ohn_18",control:"_control_p6ohn_23",controlDisabled:"_controlDisabled_p6ohn_48",controlInput:"_controlInput_p6ohn_57",value:"_value_p6ohn_75",placeholder:"_placeholder_p6ohn_84",chipDisplay:"_chipDisplay_p6ohn_90",chipEmpty:"_chipEmpty_p6ohn_98",chipValue:"_chipValue_p6ohn_103",chipItem:"_chipItem_p6ohn_112",chipLabel:"_chipLabel_p6ohn_126",chipRemove:"_chipRemove_p6ohn_132",chipOverflow:"_chipOverflow_p6ohn_147",chevron:"_chevron_p6ohn_152",open:"_open_p6ohn_159",panel:"_panel_p6ohn_183",panelClosing:"_panelClosing_p6ohn_200",filterWrapper:"_filterWrapper_p6ohn_204",filterInput:"_filterInput_p6ohn_211",filterIcon:"_filterIcon_p6ohn_230",list:"_list_p6ohn_241",option:"_option_p6ohn_250",checkboxContainer:"_checkboxContainer_p6ohn_265",checkbox:"_checkbox_p6ohn_265",optionLabel:"_optionLabel_p6ohn_282",optionSelected:"_optionSelected_p6ohn_287",optionDisabled:"_optionDisabled_p6ohn_291",empty:"_empty_p6ohn_300",disabled:"_disabled_p6ohn_307",error:"_error_p6ohn_311"},ce=(e,t)=>{const r=e[t];return r!=null?String(r):""},fe=(e,t)=>e[t],he=(e,t)=>t==null?!1:!!e[t],Ft=({value:e,onChange:t,multiple:n=!1,display:r="comma",maxSelectedLabels:d,selectedItemsLabel:p="{0} items selected",removeIcon:i,onEditEnd:u,options:a,optionLabel:y="label",optionValue:_="value",optionDisabled:P,placeholder:L="Select",filter:c=!1,editable:h=!1,disabled:l=!1,required:b=!1,label:w,error:N,inputId:q,className:x="",panelClassName:F="",valueTemplate:z,itemTemplate:X,"data-testid":A})=>{const B=h&&!n,K=s.useMemo(()=>n&&Array.isArray(e)?e:[],[n,e]),Z=s.useMemo(()=>new Set(K.map(f=>String(f))),[K]),j=a.find(f=>!n&&fe(f,_)===e),C=s.useMemo(()=>n?a.filter(f=>Z.has(String(fe(f,_)))):[],[n,a,_,Z]),k=j?ce(j,y):"",H=C.map(f=>ce(f,y)).filter(Boolean).join(", "),[D,v]=s.useState(!1),[m,V]=s.useState(!1),[G,oe]=s.useState(""),[ae,U]=s.useState(k),J=s.useRef(null),Y=s.useRef(null),be=s.useRef(null),ke=s.useRef(null),g=s.useRef(!1),S=s.useMemo(()=>c&&!B?a.filter(f=>ce(f,y).toLowerCase().includes(G.toLowerCase())):a,[c,B,a,y,G]);s.useEffect(()=>{B&&U(k)},[B,e,k]),s.useEffect(()=>{D&&c&&!B&&(oe(""),setTimeout(()=>{var f;return(f=be.current)==null?void 0:f.focus()},0))},[D,c,B]);const R=()=>{g.current=!0,V(!0)},ve=f=>{var I;(g.current||(I=f.animationName)!=null&&I.includes("menuOut"))&&(g.current=!1,v(!1),V(!1),B&&U(k))};s.useEffect(()=>{if(!D&&!m)return;const f=I=>{J.current&&!J.current.contains(I.target)&&(B&&U(k),R())};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[D,m,B,k]);const de=()=>{l||v(f=>!f)},ye=(f,I)=>{if(he(f,P))return;const W=fe(f,_);if(B&&U(ce(f,y)),n){const M=W??null;if(M==null)return;const Q=Z.has(String(M))?K.filter(pe=>pe!==M):[...K,M];t==null||t({value:Q,originalEvent:I});return}t==null||t({value:W??null,originalEvent:I}),R()},O=f=>{if(!D){if(f.key==="Enter"&&B&&ae.trim()){f.preventDefault();const I=ae.trim(),W=I.toLowerCase(),M=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===W||pe.startsWith(W)}),te=M&&!he(M,P)?fe(M,_):null;M&&!he(M,P)&&(U(ce(M,y)),t==null||t({value:te,originalEvent:f})),u==null||u({value:I,selectedValue:te,originalEvent:f});return}(f.key==="Enter"||f.key===" "||f.key==="ArrowDown")&&(f.preventDefault(),v(!0));return}if(f.key==="Escape"){f.preventDefault(),R();return}if(f.key==="Enter"){if(f.preventDefault(),B){const I=ae.trim();if(I){const W=I.toLowerCase(),M=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===W||pe.startsWith(W)}),te=M&&!he(M,P)?fe(M,_):null;M&&!he(M,P)&&ye(M,f),u==null||u({value:I,selectedValue:te,originalEvent:f})}else u==null||u({value:"",selectedValue:null,originalEvent:f})}else if(S.length>0){const I=S.find(W=>!he(W,P));I&&!he(I,P)&&ye(I,f)}}},ee=n&&r==="chip",qe=(f,I)=>{if(I.stopPropagation(),l)return;const W=fe(f,_);if(W==null)return;const M=K.filter(te=>String(te)!==String(W));t==null||t({value:M,originalEvent:I})},ge=s.useMemo(()=>d==null?null:Math.max(0,d),[d]),T=s.useMemo(()=>!ee||ge==null?C:C.slice(0,ge),[ee,ge,C]),ze=ee&&ge!=null?Math.max(0,C.length-ge):0,Ve=[$.dropdown,l?$.disabled:"",D?$.open:"",x].filter(Boolean).join(" "),Se=[$.control,l?$.controlDisabled:"",ee?$.chipDisplay:"",ee&&C.length===0?$.chipEmpty:""].filter(Boolean).join(" "),Ae=[$.panel,m?$.panelClosing:"",F].filter(Boolean).join(" "),un=s.useId(),Ne=q??`dropdown-${un.replace(/[^a-zA-Z0-9_-]/g,"")}`,He=`${Ne}-panel`,Ke=N==null?void 0:`${Ne}-error`,ft=N==null?{}:{"aria-invalid":"true"},ht=Ke==null?{}:{"aria-describedby":Ke};return o.jsxs("div",{className:Ve,ref:J,"data-testid":A,children:[w!=null&&o.jsxs("label",{htmlFor:Ne,className:$.label,children:[w,b&&o.jsx("span",{className:$.required,children:"*"})]}),o.jsxs("div",{id:B?void 0:Ne,role:"combobox","aria-expanded":D||m,"aria-haspopup":"listbox","aria-controls":D||m?He:void 0,"aria-disabled":l,"aria-label":typeof w=="string"?w:void 0,...B?{}:ft,...B?{}:ht,tabIndex:B||l?-1:0,className:Se,onClick:B?void 0:de,onKeyDown:B?void 0:O,"data-testid":A&&!B?`${A}-control`:void 0,children:[B?o.jsx("input",{ref:ke,id:Ne,type:"text",className:$.controlInput,value:ae,onChange:f=>{U(f.target.value),!D&&!m&&v(!0)},onFocus:()=>{!l&&!D&&!m&&v(!0)},onKeyDown:O,placeholder:L,disabled:l,"aria-autocomplete":"list","aria-controls":D||m?He:void 0,"aria-expanded":D||m,...ft,...ht,"data-testid":A?`${A}-control`:void 0}):ee?o.jsx("span",{className:$.chipValue,children:C.length===0?o.jsx("span",{className:$.placeholder,children:L}):o.jsxs(o.Fragment,{children:[T.map((f,I)=>{const W=ce(f,y),M=fe(f,_),te=M!=null?String(M):`chip-${I}`;return o.jsxs("span",{className:$.chipItem,children:[o.jsx("span",{className:$.chipLabel,children:X?X(f):W}),!l&&o.jsx("button",{type:"button",className:$.chipRemove,onClick:Q=>qe(f,Q),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&Q.stopPropagation()},"aria-label":`Remove ${W}`,"data-testid":A?`${A}-chip-remove-${I}`:void 0,children:i??o.jsx(St,{"aria-hidden":!0})})]},te)}),ze>0&&o.jsx("span",{className:$.chipOverflow,children:p.replace("{0}",String(C.length))})]})}):o.jsx("span",{className:$.value,children:z&&!n?z(j??null):(n?H:k)||o.jsx("span",{className:$.placeholder,children:L})}),o.jsx(Ie,{className:$.chevron,"aria-hidden":!0,onClick:B?de:void 0})]}),(D||m)&&o.jsxs("div",{ref:Y,id:He,className:Ae,role:"presentation",onAnimationEnd:ve,"data-testid":A?`${A}-panel`:void 0,children:[c&&!B&&o.jsxs("div",{className:$.filterWrapper,children:[o.jsx("input",{ref:be,type:"text",className:$.filterInput,value:G,onChange:f=>{oe(f.target.value)},onKeyDown:f=>{f.key==="Escape"&&v(!1),f.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":A?`${A}-filter`:void 0}),o.jsx(At,{className:$.filterIcon,"aria-hidden":!0})]}),o.jsx("ul",{className:$.list,role:"listbox","aria-label":"Options",children:S.length===0?o.jsx("li",{className:$.empty,children:"No results"}):S.map((f,I)=>{const W=fe(f,_),M=ce(f,y),te=he(f,P),Q=n?Z.has(String(W)):e===W,pe=W!=null?String(W):`option-${I}`;return o.jsxs("li",{role:"option","aria-selected":Q,"aria-disabled":te,className:[$.option,Q?$.optionSelected:"",te?$.optionDisabled:""].filter(Boolean).join(" "),onClick:dn=>ye(f,dn),"data-testid":A?`${A}-option-${I}`:void 0,children:[n&&o.jsx("span",{className:$.checkboxContainer,"aria-hidden":!0,children:o.jsx("input",{type:"checkbox",checked:Q,readOnly:!0,tabIndex:-1,className:$.checkbox})}),o.jsx("span",{className:$.optionLabel,children:X?X(f):M})]},pe)})})]}),N==null?null:o.jsx("div",{id:Ke,className:$.error,role:"alert",children:N})]})},_e={inputText:"_inputText_2dnll_1",label:"_label_2dnll_9",required:"_required_2dnll_20",tooltipIcon:"_tooltipIcon_2dnll_25",input:"_input_2dnll_1",inputTextarea:"_inputTextarea_2dnll_72",error:"_error_2dnll_79",inputTextDisabled:"_inputTextDisabled_2dnll_88"},jt=({label:e,tooltip:t,required:n=!1,inputId:r,textarea:d=!1,rows:p,error:i,className:u="","data-testid":a,disabled:y=!1,..._})=>{const{type:P="text",...L}=_,c=s.useId(),h=r??`input-text-${c.replace(/[^a-zA-Z0-9_-]/g,"")}`,l=[_e.inputText,y?_e.inputTextDisabled:"",u].filter(Boolean).join(" "),b=L["aria-invalid"];let w;b===void 0?w=void 0:b===!0?w="true":b===!1?w="false":w=b;const N=n?{"aria-required":"true"}:{"aria-required":"false"},q=w===void 0&&i==null?{}:{"aria-invalid":w??"true"},x=i==null?void 0:`${h}-error`,F=[_e.input,d?_e.inputTextarea:""].filter(Boolean).join(" "),z={id:h,className:F,disabled:y,...N,...q,"aria-describedby":x,"data-testid":a?`${a}-input`:void 0};return o.jsxs("div",{className:l,"data-testid":a,children:[e!=null&&o.jsxs("label",{htmlFor:h,className:_e.label,children:[e,n&&o.jsx("span",{className:_e.required,children:"*"}),t!=null&&o.jsx("span",{className:_e.tooltipIcon,title:t,"aria-label":t,children:o.jsx(Ot,{"aria-hidden":!0})})]}),d?o.jsx("textarea",{...L,...z,rows:p??3}):o.jsx("input",{...L,...z,type:P}),i==null?null:o.jsx("div",{id:x,className:_e.error,role:"alert",children:i})]})},we={checkbox:"_checkbox_l6y66_1",input:"_input_l6y66_12",box:"_box_l6y66_26",checkboxDisabled:"_checkboxDisabled_l6y66_39",checkboxInvalid:"_checkboxInvalid_l6y66_63",checkboxReadOnly:"_checkboxReadOnly_l6y66_83"},Tt=({checked:e,value:t,onChange:n,inputId:r,disabled:d=!1,invalid:p=!1,className:i="",name:u,readOnly:a,required:y,tabIndex:_,"aria-label":P,"aria-labelledby":L,"data-testid":c,...h})=>{const l=s.useId(),b=r??`checkbox-${l.replace(/[^a-zA-Z0-9_-]/g,"")}`,w=x=>{d||a||n==null||n({originalEvent:x,checked:x.currentTarget.checked,...t!=null?{value:t}:{},stopPropagation:()=>x.stopPropagation(),preventDefault:()=>x.preventDefault()})},N=[we.checkbox,p?we.checkboxInvalid:"",d?we.checkboxDisabled:"",a?we.checkboxReadOnly:"",i].filter(Boolean).join(" "),q=d;return o.jsxs("div",{className:N,"data-testid":c,children:[o.jsx("input",{...h,type:"checkbox",id:b,...e!==void 0?{checked:e}:{},...t!=null?{value:String(t)}:{},onChange:w,disabled:q,readOnly:a,onClick:x=>{a&&x.preventDefault()},onKeyDown:x=>{a&&x.key===" "&&x.preventDefault()},required:y,name:u,tabIndex:_,"aria-label":P,"aria-labelledby":L,"aria-invalid":p?!0:void 0,className:we.input,"data-testid":c?`${c}-input`:void 0}),o.jsx("span",{className:we.box,"aria-hidden":"true"})]})},ne={root:"_root_1uwna_1",label:"_label_1uwna_7",inputWrap:"_inputWrap_1uwna_15",inputWrapDisabled:"_inputWrapDisabled_1uwna_28",inputWrapInvalid:"_inputWrapInvalid_1uwna_34",input:"_input_1uwna_15",dropdownButton:"_dropdownButton_1uwna_55",panel:"_panel_1uwna_71",option:"_option_1uwna_88",optionHighlighted:"_optionHighlighted_1uwna_94",error:"_error_1uwna_98"},Mt=300,Je=(e,t)=>{if(t){const r=e[t];return r!=null?String(r):""}const n=Object.values(e).find(r=>typeof r=="string");return n!=null?String(n):""},Re=({value:e,suggestions:t,completeMethod:n,field:r,onChange:d,onSelect:p,dropdown:i=!1,disabled:u=!1,placeholder:a,label:y,error:_,className:P="",inputId:L,"data-testid":c})=>{const[h,l]=s.useState(!1),[b,w]=s.useState(-1),N=s.useRef(null),q=s.useRef(null),x=s.useRef(),F=s.useId(),z=L??`autocomplete-${F.replace(/[^a-zA-Z0-9_-]/g,"")}`,X=`${z}-list`,A=_==null?void 0:`${z}-error`,B=h&&t.length>0;s.useEffect(()=>{w(v=>t.length===0?-1:v<0?v:v>=t.length?t.length-1:v)},[t]);const K=s.useMemo(()=>t.map(v=>Je(v,r)),[t,r]),Z=s.useCallback(v=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{n({query:v})},Mt)},[n]);s.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),s.useEffect(()=>{if(!h)return;const v=m=>{N.current&&!N.current.contains(m.target)&&(l(!1),w(-1))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[h]);const j=v=>{const m=v.target.value;d({value:m,originalEvent:v}),Z(m),l(!0),w(-1)},C=(v,m)=>{x.current&&(clearTimeout(x.current),x.current=void 0);const V=Je(v,r);d({value:V,originalEvent:m}),p==null||p({value:v,originalEvent:m}),l(!1),w(-1)},k=v=>{if(v.key==="ArrowDown"){v.preventDefault(),l(!0),w(m=>m<t.length-1?m+1:m);return}if(v.key==="ArrowUp"){if(v.preventDefault(),!h)return;w(m=>m>0?m-1:0);return}if(v.key==="Enter"&&h&&b>=0&&t[b]){v.preventDefault(),C(t[b],v);return}v.key==="Escape"&&(l(!1),w(-1))},H=[ne.root,P].filter(Boolean).join(" "),D=[ne.inputWrap,u?ne.inputWrapDisabled:"",_?ne.inputWrapInvalid:""].filter(Boolean).join(" ");return o.jsxs("div",{className:H,ref:N,"data-testid":c,children:[y!=null&&o.jsx("label",{htmlFor:z,className:ne.label,children:y}),o.jsxs("div",{className:D,children:[o.jsx("input",{ref:q,id:z,type:"text",className:ne.input,value:e,onChange:j,onKeyDown:k,onFocus:()=>{u||l(!0)},onBlur:v=>{var m;(m=N.current)!=null&&m.contains(v.relatedTarget)||(l(!1),w(-1))},disabled:u,placeholder:a,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-controls":B?X:void 0,"aria-activedescendant":B&&b>=0?`${z}-option-${b}`:void 0,"aria-autocomplete":"list","aria-invalid":_?!0:void 0,"aria-describedby":A,"data-testid":c?`${c}-input`:void 0}),i&&o.jsx("button",{type:"button",className:ne.dropdownButton,disabled:u,onClick:()=>{var v;u||(l(m=>{const V=!m;return V&&Z(e),V}),(v=q.current)==null||v.focus())},"aria-label":"Show suggestions","data-testid":c?`${c}-dropdown`:void 0,children:o.jsx(Ie,{"aria-hidden":!0})})]}),B&&o.jsx("ul",{id:X,className:ne.panel,role:"listbox","data-testid":c?`${c}-panel`:void 0,children:t.map((v,m)=>{const V=K[m],G=`${z}-option-${m}`;return o.jsx("li",{id:G,role:"option","aria-selected":m===b,className:[ne.option,m===b?ne.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:oe=>{oe.preventDefault(),C(v,oe)},"data-testid":c?`${c}-option-${m}`:void 0,children:V},G)})}),_!=null&&o.jsx("div",{id:A,className:ne.error,role:"alert",children:_})]})};Re.displayName="AutoComplete";const re={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},Fe=e=>null;Fe.displayName="AccordionTab";const Wt=(e,t)=>e==null?[]:Array.isArray(e)?t?e:e.slice(0,1):[e],qt=e=>e.replace(/[^a-zA-Z0-9_-]/g,""),et=({activeIndex:e,multiple:t=!1,expandIcon:n,collapseIcon:r,onTabChange:d,onTabOpen:p,onTabClose:i,className:u="",transitionOptions:a,pt:y,ptOptions:_,unstyled:P,children:L,...c})=>{const h=s.useId(),l=qt(h),b=s.useMemo(()=>s.Children.toArray(L).filter(C=>s.isValidElement(C)&&C.type===Fe),[L]),w=e!==void 0,N=s.useMemo(()=>Wt(e,t),[e,t]),[q,x]=s.useState([]),F=w?N:q,z=typeof a=="object"&&a!=null&&typeof a.timeout=="number"?a.timeout:void 0,X=o.jsx(It,{"aria-hidden":!0}),A=o.jsx(Ie,{"aria-hidden":!0}),B=n??X,K=r??A,Z=(j,C)=>{const k=F.includes(j);if(t){const v=k?F.filter(m=>m!==j):[...F,j];w||x(v),d==null||d({index:v,originalEvent:C}),k?i==null||i({index:j,originalEvent:C}):p==null||p({index:j,originalEvent:C});return}const H=F.length?F[0]:null,D=k?[]:[j];if(w||x(D),d==null||d({index:D,originalEvent:C}),k){i==null||i({index:j,originalEvent:C});return}H!=null&&(i==null||i({index:H,originalEvent:C})),p==null||p({index:j,originalEvent:C})};return o.jsx("div",{className:[re.accordion,u].filter(Boolean).join(" "),...c,children:b.map((j,C)=>{var J;const k=j.props,H=F.includes(C),D=!!k.disabled,v=`${l}-header-${C}`,m=`${l}-content-${C}`,V=k.headerTemplate!=null?typeof k.headerTemplate=="function"?k.headerTemplate({index:C,selected:H,disabled:D,count:b.length,first:C===0,last:C===b.length-1}):k.headerTemplate:k.header,G=H?K:B,oe=[re.headerButton,k.headerClassName??""].filter(Boolean).join(" "),ae=[re.tab,k.className??"",C===b.length-1?re.noBorderLast:""].filter(Boolean).join(" "),U=typeof V=="string"?V:void 0;return o.jsxs("div",{className:ae,style:k.style,children:[o.jsxs("button",{id:v,type:"button",disabled:D,className:oe,style:k.headerStyle,"aria-controls":m,"aria-expanded":H,"aria-disabled":D,tabIndex:k.tabIndex,onClick:Y=>Z(C,Y),...k.headerProps,"aria-label":((J=k.headerProps)==null?void 0:J["aria-label"])??U,children:[o.jsx("span",{className:re.headerContent,children:V}),o.jsx("span",{className:re.icon,"aria-hidden":!0,children:G})]}),o.jsx("div",{id:m,role:"region","aria-labelledby":v,"aria-hidden":!H,className:[re.panel,H?re.panelOpen:re.panelCollapsed].join(" "),style:{transitionDuration:z?`${z}ms`:void 0},children:o.jsx("div",{className:[re.panelContent,k.contentClassName??""].filter(Boolean).join(" "),style:k.contentStyle,children:k.children})})]},C)})})};et.displayName="Accordion";const me={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},tt=(e,t)=>{const r=e[t];return r!=null?String(r):""},je=(e,t)=>e[t],nt=(e,t)=>t==null?!1:!!e[t],zt=({value:e,onChange:t,options:n,optionLabel:r="label",optionValue:d="value",optionDisabled:p,multiple:i=!1,itemTemplate:u,disabled:a=!1,invalid:y=!1,className:_="","data-testid":P})=>{const L=l=>{const b=je(l,d);return i&&Array.isArray(e)?e.includes(b):e===b},c=(l,b)=>{if(a||nt(l,p))return;const w=je(l,d);if(w===void 0)return;let N;if(i){const q=Array.isArray(e)?e:[];N=q.includes(w)?q.filter(F=>F!==w):[...q,w]}else N=e===w?null:w;t==null||t({value:N,originalEvent:b})},h=[me.selectButton,a?me.selectButtonDisabled:"",y?me.selectButtonInvalid:"",_].filter(Boolean).join(" ");return o.jsx("div",{className:h,role:"group","aria-disabled":a,"data-testid":P,children:n.map((l,b)=>{const w=je(l,d),N=w!=null?String(w):`option-${b}`,q=nt(l,p),x=L(l);return o.jsx("button",{type:"button","aria-pressed":x,"aria-disabled":q||a,"aria-label":tt(l,r),disabled:a||q,className:[me.button,x?me.buttonSelected:"",b===0?me.buttonFirst:"",b===n.length-1?me.buttonLast:""].filter(Boolean).join(" "),onClick:F=>c(l,F),onKeyDown:F=>{(F.key===" "||F.key==="Enter")&&(F.preventDefault(),c(l,F))},"data-testid":P?`${P}-option-${b}`:void 0,children:u?u(l):tt(l,r)},N)})})},Pe={radioButton:"_radioButton_l80ql_1",radioButtonDisabled:"_radioButtonDisabled_l80ql_10",label:"_label_l80ql_14",input:"_input_l80ql_18"},Vt=({inputId:e,name:t,value:n,checked:r,onChange:d,disabled:p=!1,label:i,className:u="","data-testid":a,...y})=>{const _=s.useId(),P=e??`radiobutton-${_.replace(/[^a-zA-Z0-9_-]/g,"")}`,L=h=>{d==null||d({value:n,originalEvent:h})},c=[Pe.radioButton,p?Pe.radioButtonDisabled:"",u].filter(Boolean).join(" ");return o.jsxs("div",{className:c,"data-testid":a,children:[o.jsx("input",{...y,type:"radio",id:P,name:t,value:String(n),...r!==void 0?{checked:r}:{},disabled:p,onChange:L,className:Pe.input,"data-testid":a?`${a}-input`:void 0}),i!=null&&o.jsx("label",{htmlFor:P,className:Pe.label,children:i})]})},$e={anchorWrap:"_anchorWrap_h9mnj_1",panel:"_panel_h9mnj_7",panelInteractive:"_panelInteractive_h9mnj_23",panelPassThrough:"_panelPassThrough_h9mnj_27"},Ce=8,Le=8;function Be(...e){return t=>{e.forEach(n=>n==null?void 0:n(t))}}function Ht(e){if(e==="top"||e==="bottom"||e==="left"||e==="right"||e==="mouse")return e}function Kt(e){const{anchorRect:t,tooltipRect:n,placement:r,pointer:d,mouseTrack:p,mouseTrackTop:i,mouseTrackLeft:u}=e;if(r==="mouse"||p)return{top:d.y+i,left:d.x+u};let a=0,y=0;switch(r){case"top":a=t.top-n.height-Ce,y=t.left+t.width/2-n.width/2;break;case"bottom":a=t.bottom+Ce,y=t.left+t.width/2-n.width/2;break;case"left":a=t.top+t.height/2-n.height/2,y=t.left-n.width-Ce;break;case"right":a=t.top+t.height/2-n.height/2,y=t.right+Ce;break;default:a=t.top-n.height-Ce,y=t.left+t.width/2-n.width/2}const _=window.innerWidth,P=window.innerHeight;return y=Math.min(Math.max(y,Le),_-n.width-Le),a=Math.min(Math.max(a,Le),P-n.height-Le),{top:a,left:y}}function Te(e,t){const n=e.getAttribute("data-pr-tooltip");return n!=null&&n!==""?n:t??""}function Zt(e){return e==null?!0:typeof e=="string"||typeof e=="number"?String(e)==="":!1}const Gt=({children:e,className:t,eventMode:n,onAnchorMouseEnter:r,onAnchorMouseMove:d,onAnchorMouseLeave:p,onAnchorFocusIn:i,onAnchorFocusOut:u})=>{const a=s.Children.toArray(e);if(a.length!==1||!s.isValidElement(a[0])){const h=[$e.anchorWrap,t].filter(Boolean).join(" "),l=n==="hover"||n==="both"?{onMouseEnter:r,onMouseMove:d,onMouseLeave:p}:{},b=n==="focus"||n==="both"?{onFocusCapture:i,onBlurCapture:u}:{};return o.jsx("span",{className:h,...l,...b,children:e})}const _=a[0],P=n==="hover"||n==="both"?{onMouseEnter:Be(r,_.props.onMouseEnter),onMouseMove:Be(d,_.props.onMouseMove),onMouseLeave:Be(p,_.props.onMouseLeave)}:{},L=n==="focus"||n==="both"?{onFocusCapture:Be(i,_.props.onFocusCapture),onBlurCapture:Be(u,_.props.onBlurCapture)}:{},c=[t,_.props.className].filter(Boolean).join(" ");return s.cloneElement(_,{...P,...L,...c?{className:c}:{},ref:_.props.ref})},Ut=({target:e,content:t,position:n="top",event:r="hover",showDelay:d=0,hideDelay:p=0,autoHide:i=!0,mouseTrack:u=!1,mouseTrackTop:a=0,mouseTrackLeft:y=0,disabled:_=!1,className:P="",panelClassName:L="",id:c,children:h,"data-testid":l})=>{const b=s.useId().replace(/:/g,""),w=c??`emporix-tooltip-${b}`,[N,q]=s.useState(!1),[x,F]=s.useState({top:0,left:0}),[z,X]=s.useState(null),A=s.useRef(null),B=s.useRef(null),K=s.useRef({x:0,y:0}),Z=s.useRef(),j=s.useRef(),C=s.useCallback(()=>{Z.current!=null&&(clearTimeout(Z.current),Z.current=void 0)},[]),k=s.useCallback(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),H=s.useCallback(()=>{const g=A.current;if(g){const S=Ht(g.getAttribute("data-pr-position"));if(S)return S}return n},[n]),D=s.useCallback(()=>{const g=A.current,S=B.current;if(!g||!S)return;const R=g.getBoundingClientRect(),ve=S.getBoundingClientRect(),de=H();F(Kt({anchorRect:R,tooltipRect:ve,placement:de,pointer:K.current,mouseTrack:u,mouseTrackTop:a,mouseTrackLeft:y}))},[H,u,a,y]),v=s.useCallback(()=>{C(),k();const g=A.current;g instanceof HTMLElement&&g.removeAttribute("aria-describedby"),q(!1),A.current=null},[k,C]),m=s.useCallback((g,S)=>{_||Zt(S)||(k(),C(),A.current=g,X(S),Z.current=setTimeout(()=>{q(!0),g instanceof HTMLElement&&g.setAttribute("aria-describedby",w)},d))},[k,C,_,d,w]),V=s.useCallback(()=>{C(),k(),j.current=setTimeout(()=>{v()},p)},[k,C,v,p]),G=s.useCallback(g=>{!i&&B.current&&g instanceof Node&&B.current.contains(g)||V()},[i,V]);s.useLayoutEffect(()=>{N&&D()},[N,z,D]),s.useEffect(()=>{if(!N)return;const g=()=>D();window.addEventListener("scroll",g,!0),window.addEventListener("resize",g);const S=R=>{K.current={x:R.clientX,y:R.clientY},(u||H()==="mouse")&&D()};return(u||H()==="mouse")&&window.addEventListener("mousemove",S),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),window.removeEventListener("mousemove",S)}},[N,u,H,D]),s.useEffect(()=>{if(!N)return;const g=S=>{S.key==="Escape"&&v()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[N,v]),s.useEffect(()=>{if(N)if(e){const g=A.current;g&&X(Te(g,t))}else X(t??null)},[t,N,e]),s.useEffect(()=>{if(!e)return;let g=[];try{g=Array.from(document.querySelectorAll(e))}catch{return}const S=O=>{const ee=O.currentTarget;K.current={x:O.clientX,y:O.clientY},m(ee,Te(ee,t))},R=O=>{K.current={x:O.clientX,y:O.clientY}},ve=O=>{G(O.relatedTarget)},de=O=>{const ee=O.currentTarget;m(ee,Te(ee,t))},ye=O=>{G(O.relatedTarget)};return g.forEach(O=>{(r==="hover"||r==="both")&&(O.addEventListener("mouseenter",S),O.addEventListener("mousemove",R),O.addEventListener("mouseleave",ve)),(r==="focus"||r==="both")&&(O.addEventListener("focusin",de),O.addEventListener("focusout",ye))}),()=>{g.forEach(O=>{(r==="hover"||r==="both")&&(O.removeEventListener("mouseenter",S),O.removeEventListener("mousemove",R),O.removeEventListener("mouseleave",ve)),(r==="focus"||r==="both")&&(O.removeEventListener("focusin",de),O.removeEventListener("focusout",ye))})}},[e,t,r,m,G]);const oe=s.useCallback(g=>{const S=g.currentTarget;K.current={x:g.clientX,y:g.clientY},A.current=S,m(S,t)},[t,m]),ae=s.useCallback(g=>{K.current={x:g.clientX,y:g.clientY}},[]),U=s.useCallback(g=>{G(g.relatedTarget)},[G]),J=s.useCallback(g=>{const S=g.currentTarget;A.current=S,m(S,t)},[t,m]),Y=s.useCallback(g=>{G(g.relatedTarget)},[G]),be=[$e.panel,i?$e.panelPassThrough:$e.panelInteractive,L].filter(Boolean).join(" "),ke=typeof document<"u"&&N&&z!=null?_t.createPortal(o.jsx("div",{ref:B,id:w,role:"tooltip",className:be,style:{top:x.top,left:x.left},onMouseEnter:i?void 0:()=>{k()},onMouseLeave:i?void 0:()=>{V()},"data-testid":l?`${l}-panel`:void 0,children:z}),document.body):null;return e?o.jsx(o.Fragment,{children:ke}):o.jsxs(o.Fragment,{children:[h!=null?o.jsx(Gt,{className:P,eventMode:r,onAnchorMouseEnter:oe,onAnchorMouseMove:ae,onAnchorMouseLeave:U,onAnchorFocusIn:J,onAnchorFocusOut:Y,children:h}):null,ke]})},Xt={dialog:"_dialog_8bk4d_1"},ot=({visible:e,onHide:t,header:n,footer:r,children:d,className:p="",style:i,modal:u=!0,dismissableMask:a,closable:y=!0,draggable:_=!1,"data-testid":P})=>{const L=[Xt.dialog,p].filter(Boolean).join(" ");return o.jsx(bt.Dialog,{visible:e,onHide:t,header:n,footer:r,modal:u,dismissableMask:a??u,closable:y,draggable:_,style:i,className:L,"data-testid":P,children:d})};ot.displayName="Dialog";function rt(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(e)}function Me(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(e)}function st(e){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(e)}const ue={root:"_root_6kjk2_1",header:"_header_6kjk2_5",iconWrap:"_iconWrap_6kjk2_12",title:"_title_6kjk2_18",message:"_message_6kjk2_22",iconSuccess:"_iconSuccess_6kjk2_27",iconError:"_iconError_6kjk2_32",iconWarn:"_iconWarn_6kjk2_37",iconInfo:"_iconInfo_6kjk2_42"},De=e=>{const{title:t,message:n,type:r}=e,d=p=>{switch(p){case"success":return o.jsx(st,{className:ue.iconSuccess,size:16});case"error":return o.jsx(Me,{className:ue.iconError,size:16});case"warn":return o.jsx(Me,{className:ue.iconWarn,size:16});default:return o.jsx(rt,{className:ue.iconInfo,size:16})}};return o.jsxs("div",{className:ue.root,children:[o.jsxs("div",{className:ue.header,children:[o.jsx("div",{className:ue.iconWrap,children:d(r)}),o.jsx("span",{className:ue.title,children:t})]}),n&&o.jsx("div",{className:ue.message,children:n})]})},Yt={toast:"_toast_538wi_1"},at={list:"_list_1nsqq_1"},lt=s.createContext({showSuccess:()=>{},showError:()=>{},showToast:()=>{}}),Qt=()=>s.useContext(lt),Jt=e=>{const t=s.useRef(null),n=s.useCallback((p,i,u)=>{var a;(a=t.current)==null||a.show({severity:"success",content:o.jsx(De,{title:p,message:i,type:"success"}),life:u||(typeof i=="string"&&i.length>50?i.length*80:4e3)})},[t]),r=s.useCallback((p,i,u)=>{var L;const a=c=>{if(!c)return{detail:"",textForLife:""};if(typeof c=="string")return{detail:c,textForLife:c};if(typeof c=="object"&&!Array.isArray(c))return{detail:c,textForLife:""};if(Array.isArray(c))if(c.some(l=>typeof l!="string")){const l=c;return c.length<=1?{detail:l[0].message,textForLife:l[0].message}:{detail:o.jsx("ul",{className:at.list,children:l.map((w,N)=>o.jsx("li",{children:w.message},N))}),textForLife:c.join(" • ")}}else{const l=c;return c.length<=1?{detail:l[0],textForLife:l[0]}:{detail:o.jsx("ul",{className:at.list,children:l.map((w,N)=>o.jsx("li",{children:w},N))}),textForLife:c.join(" • ")}}const h=String(c);return{detail:h,textForLife:h}},{detail:y,textForLife:_}=a(i),P=3e3+_.length*50;(L=t.current)==null||L.show({severity:"error",content:o.jsx(De,{title:p,message:y,type:"error"}),life:u||P})},[t]),d=s.useCallback((p,i,u)=>{var a;(a=t.current)==null||a.show({severity:u,content:o.jsx(De,{title:p,message:i,type:u})})},[t]);return o.jsxs(lt.Provider,{value:{showSuccess:n,showError:r,showToast:d},children:[o.jsx(vt.Toast,{ref:t,position:"top-center",className:Yt.toast}),e.children]})},Rt={menu:"_menu_4pmis_1"},en={},it=e=>e.filter(t=>t.visible!==!1).map(t=>({label:t.label,icon:t.icon,disabled:t.disabled,separator:t.separator,command:t.command?n=>{var r;return(r=t.command)==null?void 0:r.call(t,{originalEvent:n.originalEvent,item:t})}:void 0,items:t.items?it(t.items):void 0})),ct=s.forwardRef(({model:e,popup:t=!1,id:n,className:r="","data-testid":d},p)=>{const i=s.useRef(null),u=s.useRef(null);s.useImperativeHandle(p,()=>({toggle:y=>{var _;u.current=y,(_=i.current)==null||_.toggle(y)},show:y=>{var _;u.current=y,(_=i.current)==null||_.show(y)},hide:()=>{!i.current||!u.current||i.current.hide(u.current)}}));const a=[en.menu,Rt.menu,r].filter(Boolean).join(" ");return o.jsx(yt.Menu,{ref:i,id:n,model:it(e),popup:t,className:a,"data-testid":d})});ct.displayName="Menu";const se={root:"_root_lv2tm_1",iconWrap:"_iconWrap_lv2tm_13",icon:"_icon_lv2tm_13",content:"_content_lv2tm_25",info:"_info_lv2tm_30",success:"_success_lv2tm_38",warn:"_warn_lv2tm_46",error:"_error_lv2tm_54"},tn={info:se.info,success:se.success,warn:se.warn,error:se.error},nn=({severity:e})=>{switch(e){case"success":return o.jsx(st,{className:se.icon,"aria-hidden":!0});case"warn":case"error":return o.jsx(Me,{className:se.icon,"aria-hidden":!0});default:return o.jsx(rt,{className:se.icon,"aria-hidden":!0})}},on=({severity:e="info",text:t,children:n,icon:r,className:d="","data-testid":p})=>{const i=n??t,u=e==="warn"||e==="error"?"alert":"status",a=[se.root,tn[e],d].filter(Boolean).join(" ");return o.jsxs("div",{className:a,role:u,"data-testid":p,"data-severity":e,children:[o.jsx("span",{className:se.iconWrap,children:r??o.jsx(nn,{severity:e})}),i!=null&&i!==""&&o.jsx("span",{className:se.content,children:i})]})},We={dataTable:"_dataTable_pppoi_1",noHeader:"_noHeader_pppoi_226",clickableRows:"_clickableRows_pppoi_230"},ut={root:"_root_g4y44_1",table:"_table_g4y44_5"},dt={currentPage:1,rows:10,first:0,sortOrder:null,sortField:void 0,rowsPerPageOptions:[10,25,50,100]},pt=(e=dt)=>{const[t,n]=s.useState(e),[r,d]=s.useState(0),p=c=>{const{first:h,page:l,rows:b}=c;n(w=>({...w,currentPage:(l??0)+1,first:h,rows:b}))},i=c=>Object.fromEntries(Object.entries(c).map(([h,l])=>{const b=l;return b.value!==null&&typeof b.value=="string"&&b.value===""?[h,{...l,value:null}]:[h,l]})),u=c=>{var l;const h=c;return(l=h.constraints)!=null&&l.length?h.constraints.some(b=>b.value!==void 0&&b.value!==null&&b.value!==""):h.value!==void 0&&h.value!==null&&h.value!==""},a=c=>Object.keys(c).some(h=>u(c[h]));return{onSortCallback:c=>{if(!c.sortField){n(h=>({...h,sortOrder:null,sortField:void 0}));return}n(h=>c.sortField===h.sortField?h.sortOrder===null||h.sortOrder===0?{...h,sortOrder:1}:h.sortOrder===1?{...h,sortOrder:-1}:{...h,sortOrder:null,sortField:void 0}:{...h,sortField:c.sortField,sortOrder:1})},resetPagination:()=>{n(e)},paginationParams:t,setPaginationParams:n,totalCount:r,setTotalCount:d,onPageCallback:p,onFilterCallback:c=>{const h=i(c.filters??{});n(l=>({...l,first:0,currentPage:1,filters:a(h)?h:void 0}))},setFilters:c=>{const h={};c.filter(l=>l.filter).forEach(l=>{const b=l.filterField||l.field||l.columnKey;b&&typeof b=="string"&&(h[b]={value:null,matchMode:l.filterMatchMode||gt.FilterMatchMode.CONTAINS})}),n(l=>({...l,filters:h}))}}},rn=e=>e instanceof Element?e.closest(".p-selection-column")!==null||e.closest(".p-checkbox")!==null||e.closest(".p-radiobutton")!==null:!1,sn=(e,t)=>e==="checkbox"||e==="radio"||!t,an="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",ln="{first} - {last} of {totalRecords}",cn=e=>{const{value:t,dataKey:n,columns:r,children:d,className:p="",style:i,"data-testid":u,tableRef:a,showHeaders:y=!0,showFilter:_=!0,loading:P=!1,emptyTemplate:L,pagination:c,paginator:h=!0,lazy:l=!1,totalRecords:b,sortField:w,sortOrder:N,globalFilterFields:q,onPage:x,onSort:F,onFilter:z,currentPageReportTemplate:X=ln,selection:A,selectionMode:B,onSelectionChange:K,isRowSelectable:Z,onRowClick:j,rowClassName:C,rowActions:k,editMode:H,editingRows:D,onRowEditComplete:v,expandedRows:m,onRowToggle:V,rowExpansionTemplate:G,header:oe,footer:ae}=e,U=pt(),J=!c,Y=c??U.paginationParams,be=b??Y.totalRecords??U.totalCount;s.useEffect(()=>{J&&U.setTotalCount(t.length)},[J,t.length]);const ke=s.useMemo(()=>{const T=r?[...r]:[];return k&&T.push({columnKey:"rowActions",headerStyle:{width:"180px"},body:k}),T},[r,k]),[g,S]=s.useState(!1);s.useEffect(()=>{!l&&t.length>0&&S(!1)},[l,t.length]);const R=s.useMemo(()=>l?(be??0)===0:g,[g,l,be]),ve=T=>{j&&(B&&rn(T.originalEvent.target)||(j(T.data,T.index),T.originalEvent.stopPropagation()))},de=T=>{var Se,Ae;if(!K)return;const ze=T.type==="checkbox"||T.type==="radio",Ve=((Ae=(Se=T.originalEvent).isPropagationStopped)==null?void 0:Ae.call(Se))??!1;sn(T.type,Ve)&&(K(T.value),ze||T.originalEvent.stopPropagation())},ye=T=>{V==null||V(T.data)},O=[ut.table,We.dataTable,y?"":We.noHeader,j||B?We.clickableRows:""].filter(Boolean).join(" "),ee=!R&&!(Z&&t.length>0&&t.every(T=>!Z({data:T})))?A:void 0,qe=typeof L=="function"?L():L,ge={style:i,"data-testid":u,className:O,ref:a,dataKey:n,value:t.length>0?t:void 0,size:"small",onValueChange:T=>{S(T.length===0)},responsiveLayout:"scroll",onRowEditComplete:v,rowClassName:C,editMode:H,editingRows:D,rows:Y.rows,filterDisplay:_?"row":void 0,filters:Y.filters,globalFilterFields:q??Y.globalFilterFields,paginator:h&&!R,paginatorTemplate:Y.paginatorTemplate??an,first:Y.first,totalRecords:be,rowsPerPageOptions:Y.rowsPerPageOptions,sortField:w??Y.sortField,sortOrder:N??Y.sortOrder??void 0,onPage:J?x??U.onPageCallback:x,onSort:J?F??U.onSortCallback:F,onFilter:J?z??U.onFilterCallback:z,currentPageReportTemplate:X,stripedRows:!0,isDataSelectable:Z,emptyMessage:qe,loading:P,removableSort:!0,onSelectionChange:de,selection:ee,onRowClick:ve,lazy:l,expandedRows:m??void 0,rowExpansionTemplate:G,onRowToggle:ye,footer:ae,header:oe,...B!=null?{selectionMode:B}:{}};return o.jsx("div",{className:[ut.root,p].filter(Boolean).join(" "),children:o.jsxs(mt.DataTable,{...ge,children:[B&&o.jsx(Ze.Column,{selectionMode:B,headerStyle:{width:"78px"}}),ke.map(T=>o.jsx(Ze.Column,{...T},String(T.columnKey??T.field))),d]})})};E.Accordion=et,E.AccordionTab=Fe,E.AutoComplete=Re,E.Checkbox=Tt,E.DEFAULT_DATA_TABLE_PAGINATION=dt,E.DataTable=cn,E.Dialog=ot,E.Dropdown=Ft,E.InputText=jt,E.Menu=ct,E.Message=on,E.PrimaryButton=$t,E.RadioButton=Vt,E.SecondaryButton=Lt,E.SelectButton=zt,E.Tabs=Dt,E.ToastProvider=Jt,E.ToastTemplate=De,E.Tooltip=Ut,E.useDataTablePagination=pt,E.useToast=Qt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|