@notmrabhi/flowforge 0.1.23 → 0.1.25
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/{SchemaBuilderDrawer-157p-2Vj.js → SchemaBuilderDrawer-C_hMD3HD.js} +1 -1
- package/dist/{SchemaBuilderDrawer-Wje7pVrn.js → SchemaBuilderDrawer-DoF-ZmgC.js} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +23 -22
- package/dist/form.cjs +1 -1
- package/dist/form.js +2 -2
- package/dist/index-BeZylHBB.js +43 -0
- package/dist/index-BrJBVztu.js +1 -0
- package/dist/{index-BU09HbVh.js → index-CDhW7gZx.js} +492 -471
- package/dist/{index-Da5NHCS2.js → index-CSWLKuPF.js} +1 -1
- package/dist/index-CUQQVdoY.js +1 -0
- package/dist/{index-CQ0cVcHp.js → index-D55BhG6-.js} +1 -1
- package/dist/index-Dcur-XJ9.js +35 -0
- package/dist/{index-a1IOaYsW.js → index-DrJaGrMB.js} +4 -4
- package/dist/{index-a3QMaedZ.js → index-aY0_Mo-L.js} +1 -1
- package/dist/{index-Codx5QwP.js → index-sk96xlgl.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +51 -50
- package/dist/nodeRegistry.cjs +1 -1
- package/dist/nodeRegistry.js +23 -543
- package/dist/subWorkflowDescriptor-DYOYgBzX.js +534 -0
- package/dist/subWorkflowDescriptor-JDKi2INh.js +1 -0
- package/dist/{templateSkeletons-D5dYuslG.js → templateSkeletons-Lcuw4Kik.js} +1 -1
- package/dist/{templateSkeletons-D2ecxpVH.js → templateSkeletons-syX5PIwF.js} +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as O, jsx as d, Fragment as He } from "react/jsx-runtime";
|
|
2
2
|
import * as K from "react";
|
|
3
|
-
import Ue, { createContext as Rt, useContext as Et, useState as
|
|
3
|
+
import Ue, { createContext as Rt, useContext as Et, useState as L, useRef as Y, useCallback as H, useEffect as q, useMemo as se, useLayoutEffect as lo, Component as Ar, Fragment as Ut, forwardRef as dn, Suspense as Sr } from "react";
|
|
4
4
|
import { Formik as uo, Form as co, useFormikContext as Rr } from "formik";
|
|
5
5
|
import { MdInfoOutline as fo, MdDataObject as Ot, MdClose as Be, MdSearch as fn, MdKeyboardArrowRight as pn, MdContentCopy as po, MdCheckCircle as go, MdAdd as Qe, MdDeleteOutline as gn, MdUploadFile as bo, MdInsertDriveFile as ho, MdKeyboardArrowDown as mo } from "react-icons/md";
|
|
6
|
-
import { Tooltip as Se, IconButton as Er, Box as N, Typography as
|
|
6
|
+
import { Tooltip as Se, IconButton as Er, Box as N, Typography as ce, InputBase as vo, Divider as bn, Collapse as Or, Snackbar as Io, Alert as xo, Select as Fr, MenuItem as pt, TextField as wr, FormControlLabel as Tr, Switch as yo, RadioGroup as Co, Radio as Ao, Slider as So, Chip as Ro, Button as Dn } from "@mui/material";
|
|
7
7
|
import Eo, { createPortal as Oo } from "react-dom";
|
|
8
8
|
import hn, { components as mn } from "react-select";
|
|
9
9
|
import { jsx as _, css as Gr, keyframes as Fo } from "@emotion/react";
|
|
@@ -106,7 +106,7 @@ const de = {
|
|
|
106
106
|
fontSize: A.FONT_SIZE_HELPER,
|
|
107
107
|
marginTop: A.HELPER_MT,
|
|
108
108
|
lineHeight: 1.4
|
|
109
|
-
},
|
|
109
|
+
}, ue = {
|
|
110
110
|
color: A.COLOR_HELPER,
|
|
111
111
|
fontSize: A.FONT_SIZE_HELPER,
|
|
112
112
|
marginTop: A.HELPER_MT,
|
|
@@ -347,25 +347,25 @@ function Wr(t) {
|
|
|
347
347
|
}
|
|
348
348
|
const Xr = Rt(null);
|
|
349
349
|
function zo({ groups: t, children: e }) {
|
|
350
|
-
const [n, i] =
|
|
350
|
+
const [n, i] = L(!1), [r, a] = L(null), [o, u] = L(null), s = Y(null), l = Y(0), c = H(() => i(!0), []), f = H(() => {
|
|
351
351
|
i(!1), u(null);
|
|
352
|
-
}, []),
|
|
353
|
-
|
|
354
|
-
}, []), p = H((
|
|
355
|
-
s.current =
|
|
356
|
-
}, []), m = H((
|
|
357
|
-
s.current && (s.current.savedRange =
|
|
358
|
-
}, []), h = H((
|
|
352
|
+
}, []), g = H((b, v) => {
|
|
353
|
+
b ? (l.current += 1, v && u(v)) : (l.current = Math.max(0, l.current - 1), l.current === 0 && (i(!1), u(null)));
|
|
354
|
+
}, []), p = H((b) => {
|
|
355
|
+
s.current = b, a(b.fieldId);
|
|
356
|
+
}, []), m = H((b) => {
|
|
357
|
+
s.current && (s.current.savedRange = b);
|
|
358
|
+
}, []), h = H((b, v) => {
|
|
359
359
|
const C = s.current;
|
|
360
360
|
if (!C) return;
|
|
361
361
|
if (C.onInsert) {
|
|
362
|
-
C.onInsert(
|
|
362
|
+
C.onInsert(b, v);
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
365
|
const y = C.editorRef.current;
|
|
366
366
|
if (!y) return;
|
|
367
367
|
y.focus();
|
|
368
|
-
const I = Ho(
|
|
368
|
+
const I = Ho(b, v);
|
|
369
369
|
let x = C.savedRange;
|
|
370
370
|
if (!x) {
|
|
371
371
|
const S = window.getSelection();
|
|
@@ -380,13 +380,13 @@ function zo({ groups: t, children: e }) {
|
|
|
380
380
|
isOpen: n,
|
|
381
381
|
openPicker: c,
|
|
382
382
|
closePicker: f,
|
|
383
|
-
notifyFormulaToggle:
|
|
383
|
+
notifyFormulaToggle: g,
|
|
384
384
|
registerField: p,
|
|
385
385
|
saveRange: m,
|
|
386
386
|
insertVariable: h,
|
|
387
387
|
activeFieldId: r,
|
|
388
|
-
notifyFieldFocus: (
|
|
389
|
-
a(
|
|
388
|
+
notifyFieldFocus: (b, v) => {
|
|
389
|
+
a(b), v && u(v), i(!0);
|
|
390
390
|
},
|
|
391
391
|
anchorEl: o
|
|
392
392
|
}, children: e });
|
|
@@ -409,7 +409,7 @@ function zr(t, e) {
|
|
|
409
409
|
return t.label.toLowerCase().includes(n) || t.path.toLowerCase().includes(n) || (((i = t.description) == null ? void 0 : i.toLowerCase().includes(n)) ?? !1);
|
|
410
410
|
}
|
|
411
411
|
function ko({ item: t }) {
|
|
412
|
-
const e = qe(), [n, i] =
|
|
412
|
+
const e = qe(), [n, i] = L(!1), r = (a) => {
|
|
413
413
|
a.dataTransfer.effectAllowed = "copy", a.dataTransfer.setData(Qt, JSON.stringify({ path: t.path, label: t.label }));
|
|
414
414
|
const o = document.createElement("span");
|
|
415
415
|
o.textContent = `{ } ${t.label}`, Object.assign(o.style, {
|
|
@@ -459,14 +459,14 @@ function ko({ item: t }) {
|
|
|
459
459
|
alignItems: "center"
|
|
460
460
|
}, children: /* @__PURE__ */ d(Ot, { size: 14 }) }),
|
|
461
461
|
/* @__PURE__ */ O(N, { sx: { minWidth: 0 }, children: [
|
|
462
|
-
/* @__PURE__ */ d(
|
|
462
|
+
/* @__PURE__ */ d(ce, { sx: {
|
|
463
463
|
fontSize: 13,
|
|
464
464
|
fontWeight: 500,
|
|
465
465
|
color: "#0f172a",
|
|
466
466
|
lineHeight: 1.35,
|
|
467
467
|
overflowWrap: "anywhere"
|
|
468
468
|
}, children: t.label }),
|
|
469
|
-
t.description && /* @__PURE__ */ d(
|
|
469
|
+
t.description && /* @__PURE__ */ d(ce, { sx: {
|
|
470
470
|
fontSize: 11,
|
|
471
471
|
color: "#64748b",
|
|
472
472
|
lineHeight: 1.4,
|
|
@@ -482,7 +482,7 @@ function Hr({
|
|
|
482
482
|
group: t,
|
|
483
483
|
searchQuery: e
|
|
484
484
|
}) {
|
|
485
|
-
const [n, i] =
|
|
485
|
+
const [n, i] = L(!0), r = se(() => {
|
|
486
486
|
const a = yn(t.items).filter((o) => !o.children);
|
|
487
487
|
return e ? a.filter((o) => zr(o, e)) : t.items;
|
|
488
488
|
}, [t.items, e]);
|
|
@@ -508,7 +508,7 @@ function Hr({
|
|
|
508
508
|
display: "flex"
|
|
509
509
|
}, children: /* @__PURE__ */ d(pn, { size: 14 }) }),
|
|
510
510
|
t.icon && /* @__PURE__ */ d(N, { sx: { color: "#64748b", display: "flex", mr: 0.25 }, children: t.icon }),
|
|
511
|
-
/* @__PURE__ */ d(
|
|
511
|
+
/* @__PURE__ */ d(ce, { sx: {
|
|
512
512
|
fontSize: 11,
|
|
513
513
|
fontWeight: 700,
|
|
514
514
|
color: "#64748b",
|
|
@@ -539,12 +539,12 @@ function pd({
|
|
|
539
539
|
title: e = "Values",
|
|
540
540
|
mode: n = "drawer"
|
|
541
541
|
}) {
|
|
542
|
-
const i = qe(), [r, a] =
|
|
542
|
+
const i = qe(), [r, a] = L(""), [o, u] = L(null), s = Y(null);
|
|
543
543
|
if (q(() => {
|
|
544
544
|
if (n !== "popover" || !(i != null && i.isOpen)) return;
|
|
545
|
-
function f(
|
|
546
|
-
var
|
|
547
|
-
const p =
|
|
545
|
+
function f(g) {
|
|
546
|
+
var b, v;
|
|
547
|
+
const p = g.target, m = (b = s.current) == null ? void 0 : b.contains(p), h = (v = i == null ? void 0 : i.anchorEl) == null ? void 0 : v.contains(p);
|
|
548
548
|
!m && !h && (i == null || i.closePicker());
|
|
549
549
|
}
|
|
550
550
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
@@ -553,10 +553,10 @@ function pd({
|
|
|
553
553
|
u(null);
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
|
-
const f = i.anchorEl.getBoundingClientRect(),
|
|
556
|
+
const f = i.anchorEl.getBoundingClientRect(), g = t, p = 440, m = i.anchorEl.closest(".MuiDrawer-paper") || i.anchorEl.closest(".MuiDialog-paper") || i.anchorEl.closest(".MuiPaper-root"), h = m ? m.getBoundingClientRect() : f, b = h.left - 8, v = window.innerWidth - h.right - 8, C = b >= g ? h.left - g - 8 : v >= g ? h.right + 8 : Math.max(8, h.left - g - 8), y = f.top, I = Math.min(y, window.innerHeight - p - 8);
|
|
557
557
|
u({ top: I, left: C });
|
|
558
558
|
}, [n, i == null ? void 0 : i.anchorEl, i == null ? void 0 : i.isOpen, t]), !i || n === "popover" && !i.isOpen) return null;
|
|
559
|
-
const l = i.groups.some((f) => r ? yn(f.items).some((
|
|
559
|
+
const l = i.groups.some((f) => r ? yn(f.items).some((g) => !g.children && zr(g, r)) : !0), c = /* @__PURE__ */ O(
|
|
560
560
|
N,
|
|
561
561
|
{
|
|
562
562
|
ref: s,
|
|
@@ -586,7 +586,7 @@ function pd({
|
|
|
586
586
|
flexShrink: 0
|
|
587
587
|
}, children: [
|
|
588
588
|
/* @__PURE__ */ d(Ot, { size: 16, color: "#6366f1" }),
|
|
589
|
-
/* @__PURE__ */ d(
|
|
589
|
+
/* @__PURE__ */ d(ce, { sx: { fontSize: 13, fontWeight: 700, flex: 1, color: "#e2e8f0" }, children: e }),
|
|
590
590
|
n === "popover" && /* @__PURE__ */ d(
|
|
591
591
|
N,
|
|
592
592
|
{
|
|
@@ -663,7 +663,7 @@ function pd({
|
|
|
663
663
|
"&::-webkit-scrollbar-thumb": { background: "rgba(255,255,255,0.12)", borderRadius: 4 }
|
|
664
664
|
}, children: /* @__PURE__ */ d(N, { sx: {
|
|
665
665
|
"& .MuiTypography-root": { color: "#cbd5e1" }
|
|
666
|
-
}, children: l ? i.groups.map((f,
|
|
666
|
+
}, children: l ? i.groups.map((f, g) => /* @__PURE__ */ d(Hr, { group: f, searchQuery: r }, g)) : /* @__PURE__ */ d(N, { sx: { px: 2, py: 3, textAlign: "center" }, children: /* @__PURE__ */ O(ce, { sx: { fontSize: 12, color: "#475569" }, children: [
|
|
667
667
|
'No variables match "',
|
|
668
668
|
r,
|
|
669
669
|
'"'
|
|
@@ -673,7 +673,7 @@ function pd({
|
|
|
673
673
|
py: 1,
|
|
674
674
|
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
675
675
|
flexShrink: 0
|
|
676
|
-
}, children: /* @__PURE__ */ d(
|
|
676
|
+
}, children: /* @__PURE__ */ d(ce, { sx: { fontSize: 10, color: "#475569", lineHeight: 1.4 }, children: "Click to insert · Drag onto any field" }) })
|
|
677
677
|
]
|
|
678
678
|
}
|
|
679
679
|
);
|
|
@@ -729,19 +729,19 @@ function Zr({
|
|
|
729
729
|
onPickerOpen: l,
|
|
730
730
|
compact: c
|
|
731
731
|
}) {
|
|
732
|
-
const f = Y(null),
|
|
732
|
+
const f = Y(null), g = Y(null), p = Y(""), m = Y(!1), h = t.length === 0 || t.length === 1 && t[0].type === "text" && !t[0].value, b = qe(), [v, C] = L(null), [y, I] = L(!1);
|
|
733
733
|
q(() => {
|
|
734
734
|
const R = f.current;
|
|
735
735
|
if (!R) return;
|
|
736
736
|
const P = Te(t), k = `${u ? "1" : "0"}:${P}`;
|
|
737
737
|
if (k === p.current) return;
|
|
738
738
|
const w = /* @__PURE__ */ new Map();
|
|
739
|
-
if (
|
|
739
|
+
if (b != null && b.groups) {
|
|
740
740
|
const Z = (oe) => {
|
|
741
741
|
for (const he of oe)
|
|
742
742
|
he.path && w.set(he.path, he.label), he.children && Z(he.children);
|
|
743
743
|
};
|
|
744
|
-
for (const oe of
|
|
744
|
+
for (const oe of b.groups) Z(oe.items);
|
|
745
745
|
}
|
|
746
746
|
const z = /* @__PURE__ */ new Map();
|
|
747
747
|
R.querySelectorAll("[data-path]").forEach((Z) => {
|
|
@@ -753,7 +753,7 @@ function Zr({
|
|
|
753
753
|
return { ...Z, label: oe };
|
|
754
754
|
});
|
|
755
755
|
_o(R, $), p.current = k;
|
|
756
|
-
}, [t, u,
|
|
756
|
+
}, [t, u, b == null ? void 0 : b.groups]);
|
|
757
757
|
const x = H(() => {
|
|
758
758
|
const R = f.current;
|
|
759
759
|
if (!R) return;
|
|
@@ -789,13 +789,13 @@ function Zr({
|
|
|
789
789
|
const $ = Pn(R, P);
|
|
790
790
|
z.deleteContents(), z.insertNode($), z.setStartAfter($), z.collapse(!0), w == null || w.removeAllRanges(), w == null || w.addRange(z), x();
|
|
791
791
|
}, [x]), D = H(() => {
|
|
792
|
-
!
|
|
793
|
-
}, [
|
|
792
|
+
!b || !o || (b.registerField({ editorRef: f, savedRange: null, fieldId: o, onInsert: F }), b.notifyFieldFocus(o, f.current));
|
|
793
|
+
}, [b, o, F]), G = H(() => {
|
|
794
794
|
var P;
|
|
795
|
-
if (!
|
|
795
|
+
if (!b) return;
|
|
796
796
|
const R = window.getSelection();
|
|
797
|
-
R && R.rangeCount > 0 && ((P = f.current) != null && P.contains(R.anchorNode)) &&
|
|
798
|
-
}, [
|
|
797
|
+
R && R.rangeCount > 0 && ((P = f.current) != null && P.contains(R.anchorNode)) && b.saveRange(R.getRangeAt(0).cloneRange());
|
|
798
|
+
}, [b]);
|
|
799
799
|
q(() => {
|
|
800
800
|
document.addEventListener("selectionchange", G);
|
|
801
801
|
const R = f.current;
|
|
@@ -803,7 +803,7 @@ function Zr({
|
|
|
803
803
|
document.removeEventListener("selectionchange", G), R && R.removeEventListener("input", E);
|
|
804
804
|
};
|
|
805
805
|
}, [G, E]);
|
|
806
|
-
const
|
|
806
|
+
const M = H((R) => {
|
|
807
807
|
r || !R.dataTransfer.types.includes(Qt) || (R.preventDefault(), R.dataTransfer.dropEffect = "copy", C("valid"));
|
|
808
808
|
}, [r]), V = H(() => {
|
|
809
809
|
C(null);
|
|
@@ -862,7 +862,7 @@ function Zr({
|
|
|
862
862
|
boxShadow: a ? "0 0 0 2px rgba(211,47,47,0.2)" : "0 0 0 2px rgba(25,118,210,0.2)"
|
|
863
863
|
}
|
|
864
864
|
},
|
|
865
|
-
onDragOver:
|
|
865
|
+
onDragOver: M,
|
|
866
866
|
onDragLeave: V,
|
|
867
867
|
onDrop: j,
|
|
868
868
|
onClick: () => {
|
|
@@ -871,7 +871,7 @@ function Zr({
|
|
|
871
871
|
},
|
|
872
872
|
children: [
|
|
873
873
|
h && i && /* @__PURE__ */ d(
|
|
874
|
-
|
|
874
|
+
ce,
|
|
875
875
|
{
|
|
876
876
|
component: "span",
|
|
877
877
|
sx: {
|
|
@@ -945,11 +945,11 @@ function Zr({
|
|
|
945
945
|
{
|
|
946
946
|
component: "button",
|
|
947
947
|
type: "button",
|
|
948
|
-
ref:
|
|
948
|
+
ref: g,
|
|
949
949
|
onClick: (R) => {
|
|
950
950
|
R.stopPropagation();
|
|
951
951
|
const P = !u;
|
|
952
|
-
|
|
952
|
+
b == null || b.notifyFormulaToggle(P, P ? g.current : null), s();
|
|
953
953
|
},
|
|
954
954
|
sx: {
|
|
955
955
|
border: "none",
|
|
@@ -1033,15 +1033,15 @@ function _r({
|
|
|
1033
1033
|
onFormulaConfigChange: u,
|
|
1034
1034
|
inlineLabel: s
|
|
1035
1035
|
}) {
|
|
1036
|
-
const l = { ...t, multiline: t.multiline || t.type === "textarea" }, c = l.id ?? l.name ?? "", f = l.formula === !0,
|
|
1036
|
+
const l = { ...t, multiline: t.multiline || t.type === "textarea" }, c = l.id ?? l.name ?? "", f = l.formula === !0, g = qe(), [p, m] = L(
|
|
1037
1037
|
() => f && c in (o ?? {})
|
|
1038
1038
|
), h = Y(p);
|
|
1039
1039
|
h.current = p, q(() => () => {
|
|
1040
|
-
h.current && (
|
|
1040
|
+
h.current && (g == null || g.notifyFormulaToggle(!1));
|
|
1041
1041
|
}, []);
|
|
1042
|
-
const [
|
|
1042
|
+
const [b, v] = L(
|
|
1043
1043
|
() => f ? we(String(e ?? ""), c in (o ?? {})) : []
|
|
1044
|
-
), [C, y] =
|
|
1044
|
+
), [C, y] = L(() => String(e ?? "")), I = Y(e);
|
|
1045
1045
|
q(() => {
|
|
1046
1046
|
if (e === I.current) return;
|
|
1047
1047
|
I.current = e;
|
|
@@ -1055,12 +1055,12 @@ function _r({
|
|
|
1055
1055
|
}, E = () => {
|
|
1056
1056
|
const R = !p;
|
|
1057
1057
|
if (m(R), R) {
|
|
1058
|
-
const P = Te(
|
|
1058
|
+
const P = Te(b), k = we(P, !0);
|
|
1059
1059
|
v(k);
|
|
1060
1060
|
const w = gt(k);
|
|
1061
1061
|
I.current = w, n(w), u == null || u({ ...o, [c]: Vr() });
|
|
1062
1062
|
} else {
|
|
1063
|
-
const P = Te(
|
|
1063
|
+
const P = Te(b);
|
|
1064
1064
|
I.current = P, n(P);
|
|
1065
1065
|
const k = { ...o };
|
|
1066
1066
|
delete k[c], u == null || u(k);
|
|
@@ -1077,13 +1077,13 @@ function _r({
|
|
|
1077
1077
|
}
|
|
1078
1078
|
);
|
|
1079
1079
|
if (f) {
|
|
1080
|
-
const R = l.helperText && !s ? /* @__PURE__ */ d("small", { style:
|
|
1080
|
+
const R = l.helperText && !s ? /* @__PURE__ */ d("small", { style: ue, children: l.helperText }) : null, P = /* @__PURE__ */ O(He, { children: [
|
|
1081
1081
|
R,
|
|
1082
1082
|
/* @__PURE__ */ d(
|
|
1083
1083
|
Zr,
|
|
1084
1084
|
{
|
|
1085
1085
|
id: c,
|
|
1086
|
-
expression:
|
|
1086
|
+
expression: b,
|
|
1087
1087
|
onExpressionChange: x,
|
|
1088
1088
|
onBlur: i,
|
|
1089
1089
|
placeholder: l.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
@@ -1104,7 +1104,7 @@ function _r({
|
|
|
1104
1104
|
P
|
|
1105
1105
|
] });
|
|
1106
1106
|
}
|
|
1107
|
-
const W = !!l.prefix, F = !!l.suffix, D = !!l.copyable, G = F || D,
|
|
1107
|
+
const W = !!l.prefix, F = !!l.suffix, D = !!l.copyable, G = F || D, M = {
|
|
1108
1108
|
width: "100%",
|
|
1109
1109
|
fontSize: 14,
|
|
1110
1110
|
color: "#374151",
|
|
@@ -1228,7 +1228,7 @@ function _r({
|
|
|
1228
1228
|
{
|
|
1229
1229
|
id: c,
|
|
1230
1230
|
name: c,
|
|
1231
|
-
style: { ...
|
|
1231
|
+
style: { ...M, minHeight: 72, height: void 0, padding: "8px 12px" },
|
|
1232
1232
|
placeholder: l.placeholder ?? "",
|
|
1233
1233
|
value: C,
|
|
1234
1234
|
disabled: T,
|
|
@@ -1258,7 +1258,7 @@ function _r({
|
|
|
1258
1258
|
id: c,
|
|
1259
1259
|
name: c,
|
|
1260
1260
|
type: l.inputType ?? "text",
|
|
1261
|
-
style:
|
|
1261
|
+
style: M,
|
|
1262
1262
|
placeholder: l.placeholder ?? "",
|
|
1263
1263
|
value: C,
|
|
1264
1264
|
disabled: T,
|
|
@@ -1282,7 +1282,7 @@ function _r({
|
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
), ie = /* @__PURE__ */ O(He, { children: [
|
|
1285
|
-
l.helperText && !S && !s && /* @__PURE__ */ d("small", { style:
|
|
1285
|
+
l.helperText && !S && !s && /* @__PURE__ */ d("small", { style: ue, children: l.helperText }),
|
|
1286
1286
|
re,
|
|
1287
1287
|
S && /* @__PURE__ */ d("small", { "data-testid": `${c}-error`, style: de, children: r })
|
|
1288
1288
|
] });
|
|
@@ -1644,11 +1644,11 @@ function zn(t, e, n, i) {
|
|
|
1644
1644
|
const u = Ia() ? va(a) : mt(0);
|
|
1645
1645
|
let s = (r.left + u.x) / o.x, l = (r.top + u.y) / o.y, c = r.width / o.x, f = r.height / o.y;
|
|
1646
1646
|
if (a) {
|
|
1647
|
-
const
|
|
1648
|
-
let m =
|
|
1647
|
+
const g = Re(a), p = i;
|
|
1648
|
+
let m = g, h = en(m);
|
|
1649
1649
|
for (; h && i && p !== m; ) {
|
|
1650
|
-
const
|
|
1651
|
-
s *=
|
|
1650
|
+
const b = Xn(h), v = h.getBoundingClientRect(), C = Sn(h), y = v.left + (h.clientLeft + parseFloat(C.paddingLeft)) * b.x, I = v.top + (h.clientTop + parseFloat(C.paddingTop)) * b.y;
|
|
1651
|
+
s *= b.x, l *= b.y, c *= b.x, f *= b.y, s += y, l += I, m = Re(h), h = en(m);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
1654
|
return da({
|
|
@@ -1673,13 +1673,13 @@ function xa(t, e) {
|
|
|
1673
1673
|
const l = t.getBoundingClientRect(), {
|
|
1674
1674
|
left: c,
|
|
1675
1675
|
top: f,
|
|
1676
|
-
width:
|
|
1676
|
+
width: g,
|
|
1677
1677
|
height: p
|
|
1678
1678
|
} = l;
|
|
1679
|
-
if (u || e(), !
|
|
1679
|
+
if (u || e(), !g || !p)
|
|
1680
1680
|
return;
|
|
1681
|
-
const m = tt(f), h = tt(r.clientWidth - (c +
|
|
1682
|
-
rootMargin: -m + "px " + -h + "px " + -
|
|
1681
|
+
const m = tt(f), h = tt(r.clientWidth - (c + g)), b = tt(r.clientHeight - (f + p)), v = tt(c), y = {
|
|
1682
|
+
rootMargin: -m + "px " + -h + "px " + -b + "px " + -v + "px",
|
|
1683
1683
|
threshold: ca(0, ua(1, s)) || 1
|
|
1684
1684
|
};
|
|
1685
1685
|
let I = !0;
|
|
@@ -1722,19 +1722,19 @@ function ya(t, e, n, i) {
|
|
|
1722
1722
|
}), a && v.addEventListener("resize", n);
|
|
1723
1723
|
});
|
|
1724
1724
|
const f = l && u ? xa(l, n) : null;
|
|
1725
|
-
let
|
|
1725
|
+
let g = -1, p = null;
|
|
1726
1726
|
o && (p = new ResizeObserver((v) => {
|
|
1727
1727
|
let [C] = v;
|
|
1728
|
-
C && C.target === l && p && e && (p.unobserve(e), cancelAnimationFrame(
|
|
1728
|
+
C && C.target === l && p && e && (p.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1729
1729
|
var y;
|
|
1730
1730
|
(y = p) == null || y.observe(e);
|
|
1731
1731
|
})), n();
|
|
1732
1732
|
}), l && !s && p.observe(l), e && p.observe(e));
|
|
1733
1733
|
let m, h = s ? zn(t) : null;
|
|
1734
|
-
s &&
|
|
1735
|
-
function
|
|
1734
|
+
s && b();
|
|
1735
|
+
function b() {
|
|
1736
1736
|
const v = zn(t);
|
|
1737
|
-
h && !ei(h, v) && n(), h = v, m = requestAnimationFrame(
|
|
1737
|
+
h && !ei(h, v) && n(), h = v, m = requestAnimationFrame(b);
|
|
1738
1738
|
}
|
|
1739
1739
|
return n(), () => {
|
|
1740
1740
|
var v;
|
|
@@ -1880,7 +1880,7 @@ function Ma(t) {
|
|
|
1880
1880
|
maxHeight: e
|
|
1881
1881
|
};
|
|
1882
1882
|
if (!n || !n.offsetParent) return l;
|
|
1883
|
-
var c = s.getBoundingClientRect(), f = c.height,
|
|
1883
|
+
var c = s.getBoundingClientRect(), f = c.height, g = n.getBoundingClientRect(), p = g.bottom, m = g.height, h = g.top, b = n.offsetParent.getBoundingClientRect(), v = b.top, C = o ? window.innerHeight : Ea(s), y = ni(s), I = parseInt(getComputedStyle(n).marginBottom, 10), x = parseInt(getComputedStyle(n).marginTop, 10), E = v - x, S = C - h, T = E + y, B = f - y - h, W = p - C + y + I, F = y + h - x, D = 160;
|
|
1884
1884
|
switch (r) {
|
|
1885
1885
|
case "auto":
|
|
1886
1886
|
case "bottom":
|
|
@@ -1903,10 +1903,10 @@ function Ma(t) {
|
|
|
1903
1903
|
};
|
|
1904
1904
|
}
|
|
1905
1905
|
if (r === "auto" || o) {
|
|
1906
|
-
var
|
|
1907
|
-
return V >= i && (
|
|
1906
|
+
var M = e, V = o ? E : T;
|
|
1907
|
+
return V >= i && (M = Math.min(V - I - u, e)), {
|
|
1908
1908
|
placement: "top",
|
|
1909
|
-
maxHeight:
|
|
1909
|
+
maxHeight: M
|
|
1910
1910
|
};
|
|
1911
1911
|
}
|
|
1912
1912
|
if (r === "bottom")
|
|
@@ -1963,7 +1963,7 @@ var ii = function(e) {
|
|
|
1963
1963
|
marginTop: u.menuGutter
|
|
1964
1964
|
});
|
|
1965
1965
|
}, oi = /* @__PURE__ */ Rt(null), za = function(e) {
|
|
1966
|
-
var n = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Et(oi) || {}, c = l.setPortalPlacement, f = Y(null),
|
|
1966
|
+
var n = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Et(oi) || {}, c = l.setPortalPlacement, f = Y(null), g = L(r), p = ae(g, 2), m = p[0], h = p[1], b = L(null), v = ae(b, 2), C = v[0], y = v[1], I = s.spacing.controlHeight;
|
|
1967
1967
|
return tn(function() {
|
|
1968
1968
|
var x = f.current;
|
|
1969
1969
|
if (x) {
|
|
@@ -2048,19 +2048,19 @@ var ii = function(e) {
|
|
|
2048
2048
|
zIndex: 1
|
|
2049
2049
|
};
|
|
2050
2050
|
}, Qa = function(e) {
|
|
2051
|
-
var n = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s = Y(null), l = Y(null), c =
|
|
2051
|
+
var n = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s = Y(null), l = Y(null), c = L(ii(o)), f = ae(c, 2), g = f[0], p = f[1], m = se(function() {
|
|
2052
2052
|
return {
|
|
2053
2053
|
setPortalPlacement: p
|
|
2054
2054
|
};
|
|
2055
|
-
}, []), h =
|
|
2055
|
+
}, []), h = L(null), b = ae(h, 2), v = b[0], C = b[1], y = H(function() {
|
|
2056
2056
|
if (r) {
|
|
2057
|
-
var S = wa(r), T = u === "fixed" ? 0 : window.pageYOffset, B = S[
|
|
2057
|
+
var S = wa(r), T = u === "fixed" ? 0 : window.pageYOffset, B = S[g] + T;
|
|
2058
2058
|
(B !== (v == null ? void 0 : v.offset) || S.left !== (v == null ? void 0 : v.rect.left) || S.width !== (v == null ? void 0 : v.rect.width)) && C({
|
|
2059
2059
|
offset: B,
|
|
2060
2060
|
rect: S
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
|
-
}, [r, u,
|
|
2063
|
+
}, [r, u, g, v == null ? void 0 : v.offset, v == null ? void 0 : v.rect.left, v == null ? void 0 : v.rect.width]);
|
|
2064
2064
|
tn(function() {
|
|
2065
2065
|
y();
|
|
2066
2066
|
}, [y]);
|
|
@@ -2638,13 +2638,13 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
},
|
|
2640
2640
|
onFocus: function(e) {
|
|
2641
|
-
var n = e.context, i = e.focused, r = e.options, a = e.label, o = a === void 0 ? "" : a, u = e.selectValue, s = e.isDisabled, l = e.isSelected, c = e.isAppleDevice, f = function(h,
|
|
2642
|
-
return h && h.length ? "".concat(h.indexOf(
|
|
2641
|
+
var n = e.context, i = e.focused, r = e.options, a = e.label, o = a === void 0 ? "" : a, u = e.selectValue, s = e.isDisabled, l = e.isSelected, c = e.isAppleDevice, f = function(h, b) {
|
|
2642
|
+
return h && h.length ? "".concat(h.indexOf(b) + 1, " of ").concat(h.length) : "";
|
|
2643
2643
|
};
|
|
2644
2644
|
if (n === "value" && u)
|
|
2645
2645
|
return "value ".concat(o, " focused, ").concat(f(u, i), ".");
|
|
2646
2646
|
if (n === "menu" && c) {
|
|
2647
|
-
var
|
|
2647
|
+
var g = s ? " disabled" : "", p = "".concat(l ? " selected" : "").concat(g);
|
|
2648
2648
|
return "".concat(o).concat(p, ", ").concat(f(r, i), ".");
|
|
2649
2649
|
}
|
|
2650
2650
|
return "";
|
|
@@ -2654,14 +2654,14 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2654
2654
|
return "".concat(i).concat(n ? " for search term " + n : "", ".");
|
|
2655
2655
|
}
|
|
2656
2656
|
}, il = function(e) {
|
|
2657
|
-
var n = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages,
|
|
2657
|
+
var n = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages, g = s.getOptionLabel, p = s.inputValue, m = s.isMulti, h = s.isOptionDisabled, b = s.isSearchable, v = s.menuIsOpen, C = s.options, y = s.screenReaderStatus, I = s.tabSelectsValue, x = s.isLoading, E = s["aria-label"], S = s["aria-live"], T = se(function() {
|
|
2658
2658
|
return X(X({}, rl), f || {});
|
|
2659
2659
|
}, [f]), B = se(function() {
|
|
2660
2660
|
var V = "";
|
|
2661
2661
|
if (n && T.onChange) {
|
|
2662
2662
|
var j = n.option, U = n.options, Q = n.removedValue, re = n.removedValues, ie = n.value, R = function(oe) {
|
|
2663
2663
|
return Array.isArray(oe) ? null : oe;
|
|
2664
|
-
}, P = Q || j || R(ie), k = P ?
|
|
2664
|
+
}, P = Q || j || R(ie), k = P ? g(P) : "", w = U || re || void 0, z = w ? w.map(g) : [], $ = X({
|
|
2665
2665
|
// multiSelected items are usually items that have already been selected
|
|
2666
2666
|
// or set by the user as a default value so we assume they are not disabled
|
|
2667
2667
|
isDisabled: P && h(P, u),
|
|
@@ -2671,12 +2671,12 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2671
2671
|
V = T.onChange($);
|
|
2672
2672
|
}
|
|
2673
2673
|
return V;
|
|
2674
|
-
}, [n, T, h, u,
|
|
2674
|
+
}, [n, T, h, u, g]), W = se(function() {
|
|
2675
2675
|
var V = "", j = i || r, U = !!(i && u && u.includes(i));
|
|
2676
2676
|
if (j && T.onFocus) {
|
|
2677
2677
|
var Q = {
|
|
2678
2678
|
focused: j,
|
|
2679
|
-
label:
|
|
2679
|
+
label: g(j),
|
|
2680
2680
|
isDisabled: h(j, u),
|
|
2681
2681
|
isSelected: U,
|
|
2682
2682
|
options: a,
|
|
@@ -2687,7 +2687,7 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2687
2687
|
V = T.onFocus(Q);
|
|
2688
2688
|
}
|
|
2689
2689
|
return V;
|
|
2690
|
-
}, [i, r,
|
|
2690
|
+
}, [i, r, g, h, T, a, u, c]), F = se(function() {
|
|
2691
2691
|
var V = "";
|
|
2692
2692
|
if (v && C.length && !x && T.onFilter) {
|
|
2693
2693
|
var j = y({
|
|
@@ -2708,13 +2708,13 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2708
2708
|
context: j,
|
|
2709
2709
|
isDisabled: i && h(i, u),
|
|
2710
2710
|
isMulti: m,
|
|
2711
|
-
isSearchable:
|
|
2711
|
+
isSearchable: b,
|
|
2712
2712
|
tabSelectsValue: I,
|
|
2713
2713
|
isInitialFocus: D
|
|
2714
2714
|
});
|
|
2715
2715
|
}
|
|
2716
2716
|
return V;
|
|
2717
|
-
}, [E, i, r, m, h,
|
|
2717
|
+
}, [E, i, r, m, h, b, v, T, u, I, D]), M = _(Ut, null, _("span", {
|
|
2718
2718
|
id: "aria-selection"
|
|
2719
2719
|
}, B), _("span", {
|
|
2720
2720
|
id: "aria-focused"
|
|
@@ -2725,12 +2725,12 @@ var tl = process.env.NODE_ENV === "production" ? {
|
|
|
2725
2725
|
}, G));
|
|
2726
2726
|
return _(Ut, null, _(Jn, {
|
|
2727
2727
|
id: l
|
|
2728
|
-
}, D &&
|
|
2728
|
+
}, D && M), _(Jn, {
|
|
2729
2729
|
"aria-live": S,
|
|
2730
2730
|
"aria-atomic": "false",
|
|
2731
2731
|
"aria-relevant": "additions text",
|
|
2732
2732
|
role: "log"
|
|
2733
|
-
}, o && !D &&
|
|
2733
|
+
}, o && !D && M));
|
|
2734
2734
|
}, ol = il, nn = [{
|
|
2735
2735
|
base: "A",
|
|
2736
2736
|
letters: "AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"
|
|
@@ -3042,37 +3042,37 @@ var fl = function(e) {
|
|
|
3042
3042
|
e.cancelable && e.preventDefault(), e.stopPropagation();
|
|
3043
3043
|
};
|
|
3044
3044
|
function pl(t) {
|
|
3045
|
-
var e = t.isEnabled, n = t.onBottomArrive, i = t.onBottomLeave, r = t.onTopArrive, a = t.onTopLeave, o = Y(!1), u = Y(!1), s = Y(0), l = Y(null), c = H(function(
|
|
3045
|
+
var e = t.isEnabled, n = t.onBottomArrive, i = t.onBottomLeave, r = t.onTopArrive, a = t.onTopLeave, o = Y(!1), u = Y(!1), s = Y(0), l = Y(null), c = H(function(b, v) {
|
|
3046
3046
|
if (l.current !== null) {
|
|
3047
3047
|
var C = l.current, y = C.scrollTop, I = C.scrollHeight, x = C.clientHeight, E = l.current, S = v > 0, T = I - x - y, B = !1;
|
|
3048
|
-
T > v && o.current && (i && i(
|
|
3049
|
-
}
|
|
3050
|
-
}, [n, i, r, a]), f = H(function(
|
|
3051
|
-
c(
|
|
3052
|
-
}, [c]),
|
|
3053
|
-
s.current =
|
|
3054
|
-
}, []), p = H(function(
|
|
3055
|
-
var v = s.current -
|
|
3056
|
-
c(
|
|
3057
|
-
}, [c]), m = H(function(
|
|
3058
|
-
if (
|
|
3048
|
+
T > v && o.current && (i && i(b), o.current = !1), S && u.current && (a && a(b), u.current = !1), S && v > T ? (n && !o.current && n(b), E.scrollTop = I, B = !0, o.current = !0) : !S && -v > y && (r && !u.current && r(b), E.scrollTop = 0, B = !0, u.current = !0), B && fl(b);
|
|
3049
|
+
}
|
|
3050
|
+
}, [n, i, r, a]), f = H(function(b) {
|
|
3051
|
+
c(b, b.deltaY);
|
|
3052
|
+
}, [c]), g = H(function(b) {
|
|
3053
|
+
s.current = b.changedTouches[0].clientY;
|
|
3054
|
+
}, []), p = H(function(b) {
|
|
3055
|
+
var v = s.current - b.changedTouches[0].clientY;
|
|
3056
|
+
c(b, v);
|
|
3057
|
+
}, [c]), m = H(function(b) {
|
|
3058
|
+
if (b) {
|
|
3059
3059
|
var v = Ba ? {
|
|
3060
3060
|
passive: !1
|
|
3061
3061
|
} : !1;
|
|
3062
|
-
|
|
3062
|
+
b.addEventListener("wheel", f, v), b.addEventListener("touchstart", g, v), b.addEventListener("touchmove", p, v);
|
|
3063
3063
|
}
|
|
3064
|
-
}, [p,
|
|
3065
|
-
|
|
3066
|
-
}, [p,
|
|
3064
|
+
}, [p, g, f]), h = H(function(b) {
|
|
3065
|
+
b && (b.removeEventListener("wheel", f, !1), b.removeEventListener("touchstart", g, !1), b.removeEventListener("touchmove", p, !1));
|
|
3066
|
+
}, [p, g, f]);
|
|
3067
3067
|
return q(function() {
|
|
3068
3068
|
if (e) {
|
|
3069
|
-
var
|
|
3070
|
-
return m(
|
|
3071
|
-
h(
|
|
3069
|
+
var b = l.current;
|
|
3070
|
+
return m(b), function() {
|
|
3071
|
+
h(b);
|
|
3072
3072
|
};
|
|
3073
3073
|
}
|
|
3074
|
-
}, [e, m, h]), function(
|
|
3075
|
-
l.current =
|
|
3074
|
+
}, [e, m, h]), function(b) {
|
|
3075
|
+
l.current = b;
|
|
3076
3076
|
};
|
|
3077
3077
|
}
|
|
3078
3078
|
var jn = ["boxSizing", "height", "overflow", "paddingRight", "position"], $n = {
|
|
@@ -3107,7 +3107,7 @@ function gl(t) {
|
|
|
3107
3107
|
var h = c && c[m];
|
|
3108
3108
|
r.current[m] = h;
|
|
3109
3109
|
}), i && Ye < 1) {
|
|
3110
|
-
var f = parseInt(r.current.paddingRight, 10) || 0,
|
|
3110
|
+
var f = parseInt(r.current.paddingRight, 10) || 0, g = document.body ? document.body.clientWidth : 0, p = window.innerWidth - g + f || 0;
|
|
3111
3111
|
Object.keys($n).forEach(function(m) {
|
|
3112
3112
|
var h = $n[m];
|
|
3113
3113
|
c && (c[m] = h);
|
|
@@ -3119,8 +3119,8 @@ function gl(t) {
|
|
|
3119
3119
|
if (er) {
|
|
3120
3120
|
var l = document.body, c = l && l.style;
|
|
3121
3121
|
Ye = Math.max(Ye - 1, 0), i && Ye < 1 && jn.forEach(function(f) {
|
|
3122
|
-
var
|
|
3123
|
-
c && (c[f] =
|
|
3122
|
+
var g = r.current[f];
|
|
3123
|
+
c && (c[f] = g);
|
|
3124
3124
|
}), l && Kn() && (l.removeEventListener("touchmove", Un, Pe), s && (s.removeEventListener("touchstart", qn, Pe), s.removeEventListener("touchmove", Qn, Pe)));
|
|
3125
3125
|
}
|
|
3126
3126
|
}, [i]);
|
|
@@ -3451,14 +3451,14 @@ var Ai = function(e) {
|
|
|
3451
3451
|
}, r.inputRef = null, r.getInputRef = function(s) {
|
|
3452
3452
|
r.inputRef = s;
|
|
3453
3453
|
}, r.focus = r.focusInput, r.blur = r.blurInput, r.onChange = function(s, l) {
|
|
3454
|
-
var c = r.props, f = c.onChange,
|
|
3455
|
-
l.name =
|
|
3454
|
+
var c = r.props, f = c.onChange, g = c.name;
|
|
3455
|
+
l.name = g, r.ariaOnChange(s, l), f(s, l);
|
|
3456
3456
|
}, r.setValue = function(s, l, c) {
|
|
3457
|
-
var f = r.props,
|
|
3457
|
+
var f = r.props, g = f.closeMenuOnSelect, p = f.isMulti, m = f.inputValue;
|
|
3458
3458
|
r.onInputChange("", {
|
|
3459
3459
|
action: "set-value",
|
|
3460
3460
|
prevInputValue: m
|
|
3461
|
-
}),
|
|
3461
|
+
}), g && (r.setState({
|
|
3462
3462
|
inputIsHiddenAfterUpdate: !p
|
|
3463
3463
|
}), r.onMenuClose()), r.setState({
|
|
3464
3464
|
clearFocusValueOnUpdate: !0
|
|
@@ -3467,11 +3467,11 @@ var Ai = function(e) {
|
|
|
3467
3467
|
option: c
|
|
3468
3468
|
});
|
|
3469
3469
|
}, r.selectOption = function(s) {
|
|
3470
|
-
var l = r.props, c = l.blurInputOnSelect, f = l.isMulti,
|
|
3470
|
+
var l = r.props, c = l.blurInputOnSelect, f = l.isMulti, g = l.name, p = r.state.selectValue, m = f && r.isOptionSelected(s, p), h = r.isOptionDisabled(s, p);
|
|
3471
3471
|
if (m) {
|
|
3472
|
-
var
|
|
3472
|
+
var b = r.getOptionValue(s);
|
|
3473
3473
|
r.setValue(p.filter(function(v) {
|
|
3474
|
-
return r.getOptionValue(v) !==
|
|
3474
|
+
return r.getOptionValue(v) !== b;
|
|
3475
3475
|
}), "deselect-option", s);
|
|
3476
3476
|
} else if (!h)
|
|
3477
3477
|
f ? r.setValue([].concat(ze(p), [s]), "select-option", s) : r.setValue(s, "select-option");
|
|
@@ -3479,15 +3479,15 @@ var Ai = function(e) {
|
|
|
3479
3479
|
r.ariaOnChange(s, {
|
|
3480
3480
|
action: "select-option",
|
|
3481
3481
|
option: s,
|
|
3482
|
-
name:
|
|
3482
|
+
name: g
|
|
3483
3483
|
});
|
|
3484
3484
|
return;
|
|
3485
3485
|
}
|
|
3486
3486
|
c && r.blurInput();
|
|
3487
3487
|
}, r.removeValue = function(s) {
|
|
3488
|
-
var l = r.props.isMulti, c = r.state.selectValue, f = r.getOptionValue(s),
|
|
3488
|
+
var l = r.props.isMulti, c = r.state.selectValue, f = r.getOptionValue(s), g = c.filter(function(m) {
|
|
3489
3489
|
return r.getOptionValue(m) !== f;
|
|
3490
|
-
}), p = je(l,
|
|
3490
|
+
}), p = je(l, g, g[0] || null);
|
|
3491
3491
|
r.onChange(p, {
|
|
3492
3492
|
action: "remove-value",
|
|
3493
3493
|
removedValue: s
|
|
@@ -3499,8 +3499,8 @@ var Ai = function(e) {
|
|
|
3499
3499
|
removedValues: s
|
|
3500
3500
|
});
|
|
3501
3501
|
}, r.popValue = function() {
|
|
3502
|
-
var s = r.props.isMulti, l = r.state.selectValue, c = l[l.length - 1], f = l.slice(0, l.length - 1),
|
|
3503
|
-
c && r.onChange(
|
|
3502
|
+
var s = r.props.isMulti, l = r.state.selectValue, c = l[l.length - 1], f = l.slice(0, l.length - 1), g = je(s, f, f[0] || null);
|
|
3503
|
+
c && r.onChange(g, {
|
|
3504
3504
|
action: "pop-value",
|
|
3505
3505
|
removedValue: c
|
|
3506
3506
|
});
|
|
@@ -3521,8 +3521,8 @@ var Ai = function(e) {
|
|
|
3521
3521
|
}, r.getStyles = function(s, l) {
|
|
3522
3522
|
var c = r.props.unstyled, f = wl[s](l, c);
|
|
3523
3523
|
f.boxSizing = "border-box";
|
|
3524
|
-
var
|
|
3525
|
-
return
|
|
3524
|
+
var g = r.props.styles[s];
|
|
3525
|
+
return g ? g(f, l) : f;
|
|
3526
3526
|
}, r.getClassNames = function(s, l) {
|
|
3527
3527
|
var c, f;
|
|
3528
3528
|
return (c = (f = r.props.classNames)[s]) === null || c === void 0 ? void 0 : c.call(f, l);
|
|
@@ -3576,8 +3576,8 @@ var Ai = function(e) {
|
|
|
3576
3576
|
}, r.onTouchMove = function(s) {
|
|
3577
3577
|
var l = s.touches, c = l && l.item(0);
|
|
3578
3578
|
if (c) {
|
|
3579
|
-
var f = Math.abs(c.clientX - r.initialTouchX),
|
|
3580
|
-
r.userIsDragging = f > p ||
|
|
3579
|
+
var f = Math.abs(c.clientX - r.initialTouchX), g = Math.abs(c.clientY - r.initialTouchY), p = 5;
|
|
3580
|
+
r.userIsDragging = f > p || g > p;
|
|
3581
3581
|
}
|
|
3582
3582
|
}, r.onTouchEnd = function(s) {
|
|
3583
3583
|
r.userIsDragging || (r.controlRef && !r.controlRef.contains(s.target) && r.menuListRef && !r.menuListRef.contains(s.target) && r.blurInput(), r.initialTouchX = 0, r.initialTouchY = 0);
|
|
@@ -3626,7 +3626,7 @@ var Ai = function(e) {
|
|
|
3626
3626
|
}, r.onValueInputFocus = function(s) {
|
|
3627
3627
|
s.preventDefault(), s.stopPropagation(), r.focus();
|
|
3628
3628
|
}, r.onKeyDown = function(s) {
|
|
3629
|
-
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue,
|
|
3629
|
+
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue, g = l.escapeClearsValue, p = l.inputValue, m = l.isClearable, h = l.isDisabled, b = l.menuIsOpen, v = l.onKeyDown, C = l.tabSelectsValue, y = l.openMenuOnFocus, I = r.state, x = I.focusedOption, E = I.focusedValue, S = I.selectValue;
|
|
3630
3630
|
if (!h && !(typeof v == "function" && (v(s), s.defaultPrevented))) {
|
|
3631
3631
|
switch (r.blockOptionHover = !0, s.key) {
|
|
3632
3632
|
case "ArrowLeft":
|
|
@@ -3648,7 +3648,7 @@ var Ai = function(e) {
|
|
|
3648
3648
|
}
|
|
3649
3649
|
break;
|
|
3650
3650
|
case "Tab":
|
|
3651
|
-
if (r.isComposing || s.shiftKey || !
|
|
3651
|
+
if (r.isComposing || s.shiftKey || !b || !C || !x || // don't capture the event if the menu opens on focus and the focused
|
|
3652
3652
|
// option is already selected; it breaks the flow of navigation
|
|
3653
3653
|
y && r.isOptionSelected(x, S))
|
|
3654
3654
|
return;
|
|
@@ -3657,24 +3657,24 @@ var Ai = function(e) {
|
|
|
3657
3657
|
case "Enter":
|
|
3658
3658
|
if (s.keyCode === 229)
|
|
3659
3659
|
break;
|
|
3660
|
-
if (
|
|
3660
|
+
if (b) {
|
|
3661
3661
|
if (!x || r.isComposing) return;
|
|
3662
3662
|
r.selectOption(x);
|
|
3663
3663
|
break;
|
|
3664
3664
|
}
|
|
3665
3665
|
return;
|
|
3666
3666
|
case "Escape":
|
|
3667
|
-
|
|
3667
|
+
b ? (r.setState({
|
|
3668
3668
|
inputIsHiddenAfterUpdate: !1
|
|
3669
3669
|
}), r.onInputChange("", {
|
|
3670
3670
|
action: "menu-close",
|
|
3671
3671
|
prevInputValue: p
|
|
3672
|
-
}), r.onMenuClose()) : m &&
|
|
3672
|
+
}), r.onMenuClose()) : m && g && r.clearValue();
|
|
3673
3673
|
break;
|
|
3674
3674
|
case " ":
|
|
3675
3675
|
if (p)
|
|
3676
3676
|
return;
|
|
3677
|
-
if (!
|
|
3677
|
+
if (!b) {
|
|
3678
3678
|
r.openMenu("first");
|
|
3679
3679
|
break;
|
|
3680
3680
|
}
|
|
@@ -3682,25 +3682,25 @@ var Ai = function(e) {
|
|
|
3682
3682
|
r.selectOption(x);
|
|
3683
3683
|
break;
|
|
3684
3684
|
case "ArrowUp":
|
|
3685
|
-
|
|
3685
|
+
b ? r.focusOption("up") : r.openMenu("last");
|
|
3686
3686
|
break;
|
|
3687
3687
|
case "ArrowDown":
|
|
3688
|
-
|
|
3688
|
+
b ? r.focusOption("down") : r.openMenu("first");
|
|
3689
3689
|
break;
|
|
3690
3690
|
case "PageUp":
|
|
3691
|
-
if (!
|
|
3691
|
+
if (!b) return;
|
|
3692
3692
|
r.focusOption("pageup");
|
|
3693
3693
|
break;
|
|
3694
3694
|
case "PageDown":
|
|
3695
|
-
if (!
|
|
3695
|
+
if (!b) return;
|
|
3696
3696
|
r.focusOption("pagedown");
|
|
3697
3697
|
break;
|
|
3698
3698
|
case "Home":
|
|
3699
|
-
if (!
|
|
3699
|
+
if (!b) return;
|
|
3700
3700
|
r.focusOption("first");
|
|
3701
3701
|
break;
|
|
3702
3702
|
case "End":
|
|
3703
|
-
if (!
|
|
3703
|
+
if (!b) return;
|
|
3704
3704
|
r.focusOption("last");
|
|
3705
3705
|
break;
|
|
3706
3706
|
default:
|
|
@@ -3843,7 +3843,7 @@ var Ai = function(e) {
|
|
|
3843
3843
|
}, {
|
|
3844
3844
|
key: "getCommonProps",
|
|
3845
3845
|
value: function() {
|
|
3846
|
-
var r = this.clearValue, a = this.cx, o = this.getStyles, u = this.getClassNames, s = this.getValue, l = this.selectOption, c = this.setValue, f = this.props,
|
|
3846
|
+
var r = this.clearValue, a = this.cx, o = this.getStyles, u = this.getClassNames, s = this.getValue, l = this.selectOption, c = this.setValue, f = this.props, g = f.isMulti, p = f.isRtl, m = f.options, h = this.hasValue();
|
|
3847
3847
|
return {
|
|
3848
3848
|
clearValue: r,
|
|
3849
3849
|
cx: a,
|
|
@@ -3851,7 +3851,7 @@ var Ai = function(e) {
|
|
|
3851
3851
|
getClassNames: u,
|
|
3852
3852
|
getValue: s,
|
|
3853
3853
|
hasValue: h,
|
|
3854
|
-
isMulti:
|
|
3854
|
+
isMulti: g,
|
|
3855
3855
|
isRtl: p,
|
|
3856
3856
|
options: m,
|
|
3857
3857
|
selectOption: l,
|
|
@@ -3950,7 +3950,7 @@ var Ai = function(e) {
|
|
|
3950
3950
|
// Renderers
|
|
3951
3951
|
// ==============================
|
|
3952
3952
|
function() {
|
|
3953
|
-
var r = this.props, a = r.isDisabled, o = r.isSearchable, u = r.inputId, s = r.inputValue, l = r.tabIndex, c = r.form, f = r.menuIsOpen,
|
|
3953
|
+
var r = this.props, a = r.isDisabled, o = r.isSearchable, u = r.inputId, s = r.inputValue, l = r.tabIndex, c = r.form, f = r.menuIsOpen, g = r.required, p = this.getComponents(), m = p.Input, h = this.state, b = h.inputIsHidden, v = h.ariaSelection, C = this.commonProps, y = u || this.getElementId("input"), I = X(X(X({
|
|
3954
3954
|
"aria-autocomplete": "list",
|
|
3955
3955
|
"aria-expanded": f,
|
|
3956
3956
|
"aria-haspopup": !0,
|
|
@@ -3958,7 +3958,7 @@ var Ai = function(e) {
|
|
|
3958
3958
|
"aria-invalid": this.props["aria-invalid"],
|
|
3959
3959
|
"aria-label": this.props["aria-label"],
|
|
3960
3960
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
3961
|
-
"aria-required":
|
|
3961
|
+
"aria-required": g,
|
|
3962
3962
|
role: "combobox",
|
|
3963
3963
|
"aria-activedescendant": this.state.isAppleDevice ? void 0 : this.state.focusedOptionId || ""
|
|
3964
3964
|
}, f && {
|
|
@@ -3977,7 +3977,7 @@ var Ai = function(e) {
|
|
|
3977
3977
|
id: y,
|
|
3978
3978
|
innerRef: this.getInputRef,
|
|
3979
3979
|
isDisabled: a,
|
|
3980
|
-
isHidden:
|
|
3980
|
+
isHidden: b,
|
|
3981
3981
|
onBlur: this.onInputBlur,
|
|
3982
3982
|
onChange: this.handleInputChange,
|
|
3983
3983
|
onFocus: this.onInputFocus,
|
|
@@ -4003,9 +4003,9 @@ var Ai = function(e) {
|
|
|
4003
4003
|
}, {
|
|
4004
4004
|
key: "renderPlaceholderOrValue",
|
|
4005
4005
|
value: function() {
|
|
4006
|
-
var r = this, a = this.getComponents(), o = a.MultiValue, u = a.MultiValueContainer, s = a.MultiValueLabel, l = a.MultiValueRemove, c = a.SingleValue, f = a.Placeholder,
|
|
4006
|
+
var r = this, a = this.getComponents(), o = a.MultiValue, u = a.MultiValueContainer, s = a.MultiValueLabel, l = a.MultiValueRemove, c = a.SingleValue, f = a.Placeholder, g = this.commonProps, p = this.props, m = p.controlShouldRenderValue, h = p.isDisabled, b = p.isMulti, v = p.inputValue, C = p.placeholder, y = this.state, I = y.selectValue, x = y.focusedValue, E = y.isFocused;
|
|
4007
4007
|
if (!this.hasValue() || !m)
|
|
4008
|
-
return v ? null : /* @__PURE__ */ K.createElement(f, J({},
|
|
4008
|
+
return v ? null : /* @__PURE__ */ K.createElement(f, J({}, g, {
|
|
4009
4009
|
key: "placeholder",
|
|
4010
4010
|
isDisabled: h,
|
|
4011
4011
|
isFocused: E,
|
|
@@ -4013,10 +4013,10 @@ var Ai = function(e) {
|
|
|
4013
4013
|
id: this.getElementId("placeholder")
|
|
4014
4014
|
}
|
|
4015
4015
|
}), C);
|
|
4016
|
-
if (
|
|
4016
|
+
if (b)
|
|
4017
4017
|
return I.map(function(T, B) {
|
|
4018
4018
|
var W = T === x, F = "".concat(r.getOptionLabel(T), "-").concat(r.getOptionValue(T));
|
|
4019
|
-
return /* @__PURE__ */ K.createElement(o, J({},
|
|
4019
|
+
return /* @__PURE__ */ K.createElement(o, J({}, g, {
|
|
4020
4020
|
components: {
|
|
4021
4021
|
Container: u,
|
|
4022
4022
|
Label: s,
|
|
@@ -4043,7 +4043,7 @@ var Ai = function(e) {
|
|
|
4043
4043
|
if (v)
|
|
4044
4044
|
return null;
|
|
4045
4045
|
var S = I[0];
|
|
4046
|
-
return /* @__PURE__ */ K.createElement(c, J({},
|
|
4046
|
+
return /* @__PURE__ */ K.createElement(c, J({}, g, {
|
|
4047
4047
|
data: S,
|
|
4048
4048
|
isDisabled: h
|
|
4049
4049
|
}), this.formatOptionLabel(S, "value"));
|
|
@@ -4108,7 +4108,7 @@ var Ai = function(e) {
|
|
|
4108
4108
|
}, {
|
|
4109
4109
|
key: "renderMenu",
|
|
4110
4110
|
value: function() {
|
|
4111
|
-
var r = this, a = this.getComponents(), o = a.Group, u = a.GroupHeading, s = a.Menu, l = a.MenuList, c = a.MenuPortal, f = a.LoadingMessage,
|
|
4111
|
+
var r = this, a = this.getComponents(), o = a.Group, u = a.GroupHeading, s = a.Menu, l = a.MenuList, c = a.MenuPortal, f = a.LoadingMessage, g = a.NoOptionsMessage, p = a.Option, m = this.commonProps, h = this.state.focusedOption, b = this.props, v = b.captureMenuScroll, C = b.inputValue, y = b.isLoading, I = b.loadingMessage, x = b.minMenuHeight, E = b.maxMenuHeight, S = b.menuIsOpen, T = b.menuPlacement, B = b.menuPosition, W = b.menuPortalTarget, F = b.menuShouldBlockScroll, D = b.menuShouldScrollIntoView, G = b.noOptionsMessage, M = b.onMenuScrollToTop, V = b.onMenuScrollToBottom;
|
|
4112
4112
|
if (!S) return null;
|
|
4113
4113
|
var j = function(k, w) {
|
|
4114
4114
|
var z = k.type, $ = k.data, Z = k.isDisabled, oe = k.isSelected, he = k.label, Vt = k.value, Ke = h === $, Ze = Z ? void 0 : function() {
|
|
@@ -4169,7 +4169,7 @@ var Ai = function(e) {
|
|
|
4169
4169
|
inputValue: C
|
|
4170
4170
|
});
|
|
4171
4171
|
if (re === null) return null;
|
|
4172
|
-
U = /* @__PURE__ */ K.createElement(
|
|
4172
|
+
U = /* @__PURE__ */ K.createElement(g, m, re);
|
|
4173
4173
|
}
|
|
4174
4174
|
var ie = {
|
|
4175
4175
|
minMenuHeight: x,
|
|
@@ -4189,7 +4189,7 @@ var Ai = function(e) {
|
|
|
4189
4189
|
placement: z
|
|
4190
4190
|
}), /* @__PURE__ */ K.createElement(vl, {
|
|
4191
4191
|
captureEnabled: v,
|
|
4192
|
-
onTopArrive:
|
|
4192
|
+
onTopArrive: M,
|
|
4193
4193
|
onBottomArrive: V,
|
|
4194
4194
|
lockEnabled: F
|
|
4195
4195
|
}, function(Z) {
|
|
@@ -4227,18 +4227,18 @@ var Ai = function(e) {
|
|
|
4227
4227
|
if (!(!l || u))
|
|
4228
4228
|
if (s)
|
|
4229
4229
|
if (o) {
|
|
4230
|
-
var
|
|
4230
|
+
var g = f.map(function(h) {
|
|
4231
4231
|
return r.getOptionValue(h);
|
|
4232
4232
|
}).join(o);
|
|
4233
4233
|
return /* @__PURE__ */ K.createElement("input", {
|
|
4234
4234
|
name: l,
|
|
4235
4235
|
type: "hidden",
|
|
4236
|
-
value:
|
|
4236
|
+
value: g
|
|
4237
4237
|
});
|
|
4238
4238
|
} else {
|
|
4239
|
-
var p = f.length > 0 ? f.map(function(h,
|
|
4239
|
+
var p = f.length > 0 ? f.map(function(h, b) {
|
|
4240
4240
|
return /* @__PURE__ */ K.createElement("input", {
|
|
4241
|
-
key: "i-".concat(
|
|
4241
|
+
key: "i-".concat(b),
|
|
4242
4242
|
name: l,
|
|
4243
4243
|
type: "hidden",
|
|
4244
4244
|
value: r.getOptionValue(h)
|
|
@@ -4277,14 +4277,14 @@ var Ai = function(e) {
|
|
|
4277
4277
|
}, {
|
|
4278
4278
|
key: "render",
|
|
4279
4279
|
value: function() {
|
|
4280
|
-
var r = this.getComponents(), a = r.Control, o = r.IndicatorsContainer, u = r.SelectContainer, s = r.ValueContainer, l = this.props, c = l.className, f = l.id,
|
|
4280
|
+
var r = this.getComponents(), a = r.Control, o = r.IndicatorsContainer, u = r.SelectContainer, s = r.ValueContainer, l = this.props, c = l.className, f = l.id, g = l.isDisabled, p = l.menuIsOpen, m = this.state.isFocused, h = this.commonProps = this.getCommonProps();
|
|
4281
4281
|
return /* @__PURE__ */ K.createElement(u, J({}, h, {
|
|
4282
4282
|
className: c,
|
|
4283
4283
|
innerProps: {
|
|
4284
4284
|
id: f,
|
|
4285
4285
|
onKeyDown: this.onKeyDown
|
|
4286
4286
|
},
|
|
4287
|
-
isDisabled:
|
|
4287
|
+
isDisabled: g,
|
|
4288
4288
|
isFocused: m
|
|
4289
4289
|
}), this.renderLiveRegion(), /* @__PURE__ */ K.createElement(a, J({}, h, {
|
|
4290
4290
|
innerRef: this.getControlRef,
|
|
@@ -4292,21 +4292,21 @@ var Ai = function(e) {
|
|
|
4292
4292
|
onMouseDown: this.onControlMouseDown,
|
|
4293
4293
|
onTouchEnd: this.onControlTouchEnd
|
|
4294
4294
|
},
|
|
4295
|
-
isDisabled:
|
|
4295
|
+
isDisabled: g,
|
|
4296
4296
|
isFocused: m,
|
|
4297
4297
|
menuIsOpen: p
|
|
4298
4298
|
}), /* @__PURE__ */ K.createElement(s, J({}, h, {
|
|
4299
|
-
isDisabled:
|
|
4299
|
+
isDisabled: g
|
|
4300
4300
|
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ K.createElement(o, J({}, h, {
|
|
4301
|
-
isDisabled:
|
|
4301
|
+
isDisabled: g
|
|
4302
4302
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
4303
4303
|
}
|
|
4304
4304
|
}], [{
|
|
4305
4305
|
key: "getDerivedStateFromProps",
|
|
4306
4306
|
value: function(r, a) {
|
|
4307
|
-
var o = a.prevProps, u = a.clearFocusValueOnUpdate, s = a.inputIsHiddenAfterUpdate, l = a.ariaSelection, c = a.isFocused, f = a.prevWasFocused,
|
|
4308
|
-
if (o && (m !== o.value || p !== o.options || h !== o.menuIsOpen ||
|
|
4309
|
-
var I = h ? Pl(r, C) : [], x = h ? nr(at(r, C), "".concat(
|
|
4307
|
+
var o = a.prevProps, u = a.clearFocusValueOnUpdate, s = a.inputIsHiddenAfterUpdate, l = a.ariaSelection, c = a.isFocused, f = a.prevWasFocused, g = a.instancePrefix, p = r.options, m = r.value, h = r.menuIsOpen, b = r.inputValue, v = r.isMulti, C = xt(m), y = {};
|
|
4308
|
+
if (o && (m !== o.value || p !== o.options || h !== o.menuIsOpen || b !== o.inputValue)) {
|
|
4309
|
+
var I = h ? Pl(r, C) : [], x = h ? nr(at(r, C), "".concat(g, "-option")) : [], E = u ? Ll(a, C) : null, S = Ml(a, I), T = kt(x, S);
|
|
4310
4310
|
y = {
|
|
4311
4311
|
selectValue: C,
|
|
4312
4312
|
focusedOption: S,
|
|
@@ -4335,14 +4335,14 @@ var Ai = function(e) {
|
|
|
4335
4335
|
Tt.defaultProps = Nl;
|
|
4336
4336
|
var Xl = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
4337
4337
|
function Fn(t) {
|
|
4338
|
-
var e = t.defaultInputValue, n = e === void 0 ? "" : e, i = t.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = t.defaultValue, o = a === void 0 ? null : a, u = t.inputValue, s = t.menuIsOpen, l = t.onChange, c = t.onInputChange, f = t.onMenuClose,
|
|
4338
|
+
var e = t.defaultInputValue, n = e === void 0 ? "" : e, i = t.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = t.defaultValue, o = a === void 0 ? null : a, u = t.inputValue, s = t.menuIsOpen, l = t.onChange, c = t.onInputChange, f = t.onMenuClose, g = t.onMenuOpen, p = t.value, m = ve(t, Xl), h = L(u !== void 0 ? u : n), b = ae(h, 2), v = b[0], C = b[1], y = L(s !== void 0 ? s : r), I = ae(y, 2), x = I[0], E = I[1], S = L(p !== void 0 ? p : o), T = ae(S, 2), B = T[0], W = T[1], F = H(function(Q, re) {
|
|
4339
4339
|
typeof l == "function" && l(Q, re), W(Q);
|
|
4340
4340
|
}, [l]), D = H(function(Q, re) {
|
|
4341
4341
|
var ie;
|
|
4342
4342
|
typeof c == "function" && (ie = c(Q, re)), C(ie !== void 0 ? ie : Q);
|
|
4343
4343
|
}, [c]), G = H(function() {
|
|
4344
|
-
typeof
|
|
4345
|
-
}, [
|
|
4344
|
+
typeof g == "function" && g(), E(!0);
|
|
4345
|
+
}, [g]), M = H(function() {
|
|
4346
4346
|
typeof f == "function" && f(), E(!1);
|
|
4347
4347
|
}, [f]), V = u !== void 0 ? u : v, j = s !== void 0 ? s : x, U = p !== void 0 ? p : B;
|
|
4348
4348
|
return X(X({}, m), {}, {
|
|
@@ -4350,7 +4350,7 @@ function Fn(t) {
|
|
|
4350
4350
|
menuIsOpen: j,
|
|
4351
4351
|
onChange: F,
|
|
4352
4352
|
onInputChange: D,
|
|
4353
|
-
onMenuClose:
|
|
4353
|
+
onMenuClose: M,
|
|
4354
4354
|
onMenuOpen: G,
|
|
4355
4355
|
value: U
|
|
4356
4356
|
});
|
|
@@ -4359,7 +4359,7 @@ var zl = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading
|
|
|
4359
4359
|
function Si(t) {
|
|
4360
4360
|
var e = t.defaultOptions, n = e === void 0 ? !1 : e, i = t.cacheOptions, r = i === void 0 ? !1 : i, a = t.loadOptions;
|
|
4361
4361
|
t.options;
|
|
4362
|
-
var o = t.isLoading, u = o === void 0 ? !1 : o, s = t.onInputChange, l = t.filterOption, c = l === void 0 ? null : l, f = ve(t, zl),
|
|
4362
|
+
var o = t.isLoading, u = o === void 0 ? !1 : o, s = t.onInputChange, l = t.filterOption, c = l === void 0 ? null : l, f = ve(t, zl), g = f.inputValue, p = Y(void 0), m = Y(!1), h = L(Array.isArray(n) ? n : void 0), b = ae(h, 2), v = b[0], C = b[1], y = L(typeof g < "u" ? g : ""), I = ae(y, 2), x = I[0], E = I[1], S = L(n === !0), T = ae(S, 2), B = T[0], W = T[1], F = L(void 0), D = ae(F, 2), G = D[0], M = D[1], V = L([]), j = ae(V, 2), U = j[0], Q = j[1], re = L(!1), ie = ae(re, 2), R = ie[0], P = ie[1], k = L({}), w = ae(k, 2), z = w[0], $ = w[1], Z = L(void 0), oe = ae(Z, 2), he = oe[0], Vt = oe[1], Ke = L(void 0), Ze = ae(Ke, 2), Dt = Ze[0], et = Ze[1];
|
|
4363
4363
|
r !== Dt && ($({}), et(r)), n !== he && (C(Array.isArray(n) ? n : void 0), Vt(n)), q(function() {
|
|
4364
4364
|
return m.current = !0, function() {
|
|
4365
4365
|
m.current = !1;
|
|
@@ -4380,15 +4380,15 @@ function Si(t) {
|
|
|
4380
4380
|
var oo = H(function(Je, Ne) {
|
|
4381
4381
|
var ge = Ra(Je, Ne, s);
|
|
4382
4382
|
if (!ge) {
|
|
4383
|
-
p.current = void 0, E(""),
|
|
4383
|
+
p.current = void 0, E(""), M(""), Q([]), W(!1), P(!1);
|
|
4384
4384
|
return;
|
|
4385
4385
|
}
|
|
4386
4386
|
if (r && z[ge])
|
|
4387
|
-
E(ge),
|
|
4387
|
+
E(ge), M(ge), Q(z[ge]), W(!1), P(!1);
|
|
4388
4388
|
else {
|
|
4389
4389
|
var so = p.current = {};
|
|
4390
4390
|
E(ge), W(!0), P(!G), _e(ge, function(Nt) {
|
|
4391
|
-
m && so === p.current && (p.current = void 0, W(!1),
|
|
4391
|
+
m && so === p.current && (p.current = void 0, W(!1), M(ge), Q(Nt || []), P(!1), $(Nt ? X(X({}, z), {}, We({}, ge, Nt)) : z));
|
|
4392
4392
|
});
|
|
4393
4393
|
}
|
|
4394
4394
|
}, [r, _e, G, z, s]), ao = R ? [] : x && G ? U : v || [];
|
|
@@ -4427,7 +4427,7 @@ var Hl = /* @__PURE__ */ dn(function(t, e) {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
};
|
|
4429
4429
|
function Ri(t) {
|
|
4430
|
-
var e = t.allowCreateWhileLoading, n = e === void 0 ? !1 : e, i = t.createOptionPosition, r = i === void 0 ? "last" : i, a = t.formatCreateLabel, o = a === void 0 ? Zt.formatCreateLabel : a, u = t.isValidNewOption, s = u === void 0 ? Zt.isValidNewOption : u, l = t.getNewOptionData, c = l === void 0 ? Zt.getNewOptionData : l, f = t.onCreateOption,
|
|
4430
|
+
var e = t.allowCreateWhileLoading, n = e === void 0 ? !1 : e, i = t.createOptionPosition, r = i === void 0 ? "last" : i, a = t.formatCreateLabel, o = a === void 0 ? Zt.formatCreateLabel : a, u = t.isValidNewOption, s = u === void 0 ? Zt.isValidNewOption : u, l = t.getNewOptionData, c = l === void 0 ? Zt.getNewOptionData : l, f = t.onCreateOption, g = t.options, p = g === void 0 ? [] : g, m = t.onChange, h = ve(t, Zl), b = h.getOptionValue, v = b === void 0 ? hi : b, C = h.getOptionLabel, y = C === void 0 ? bi : C, I = h.inputValue, x = h.isLoading, E = h.isMulti, S = h.value, T = h.name, B = se(function() {
|
|
4431
4431
|
return s(I, xt(S), p, {
|
|
4432
4432
|
getOptionValue: v,
|
|
4433
4433
|
getOptionLabel: y
|
|
@@ -4437,8 +4437,8 @@ function Ri(t) {
|
|
|
4437
4437
|
}, [n, r, x, B, p]), F = H(function(D, G) {
|
|
4438
4438
|
if (G.action !== "select-option")
|
|
4439
4439
|
return m(D, G);
|
|
4440
|
-
var
|
|
4441
|
-
if (
|
|
4440
|
+
var M = Array.isArray(D) ? D : [D];
|
|
4441
|
+
if (M[M.length - 1] === B) {
|
|
4442
4442
|
if (f) f(I);
|
|
4443
4443
|
else {
|
|
4444
4444
|
var V = c(I, I), j = {
|
|
@@ -4480,7 +4480,7 @@ function Ei({
|
|
|
4480
4480
|
onFormulaConfigChange: s,
|
|
4481
4481
|
renderNative: l
|
|
4482
4482
|
}) {
|
|
4483
|
-
const c = t.formula === !0, f = qe(),
|
|
4483
|
+
const c = t.formula === !0, f = qe(), g = Y(null), [p, m] = L(
|
|
4484
4484
|
() => c && e in (u ?? {})
|
|
4485
4485
|
), h = Y(p);
|
|
4486
4486
|
h.current = p, q(() => {
|
|
@@ -4489,15 +4489,15 @@ function Ei({
|
|
|
4489
4489
|
h.current && f.notifyFormulaToggle(!1);
|
|
4490
4490
|
};
|
|
4491
4491
|
}, []);
|
|
4492
|
-
const
|
|
4492
|
+
const b = p, [v, C] = L(
|
|
4493
4493
|
() => c && p ? we(String(n ?? ""), !0) : []
|
|
4494
4494
|
), y = Y(n), I = (E) => {
|
|
4495
4495
|
C(E);
|
|
4496
|
-
const S =
|
|
4496
|
+
const S = b ? gt(E) : Te(E);
|
|
4497
4497
|
y.current = S, i(S);
|
|
4498
4498
|
}, x = H(() => {
|
|
4499
4499
|
const E = !p;
|
|
4500
|
-
if (m(E), f == null || f.notifyFormulaToggle(E, E ?
|
|
4500
|
+
if (m(E), f == null || f.notifyFormulaToggle(E, E ? g.current : null), E) {
|
|
4501
4501
|
const S = String(n ?? ""), T = we(S, !0);
|
|
4502
4502
|
C(T);
|
|
4503
4503
|
const B = gt(T);
|
|
@@ -4532,7 +4532,7 @@ function Ei({
|
|
|
4532
4532
|
{
|
|
4533
4533
|
component: "button",
|
|
4534
4534
|
type: "button",
|
|
4535
|
-
ref:
|
|
4535
|
+
ref: g,
|
|
4536
4536
|
onClick: x,
|
|
4537
4537
|
sx: {
|
|
4538
4538
|
border: "none",
|
|
@@ -4562,7 +4562,7 @@ function Ei({
|
|
|
4562
4562
|
}
|
|
4563
4563
|
)
|
|
4564
4564
|
] }),
|
|
4565
|
-
o && /* @__PURE__ */ d("small", { style:
|
|
4565
|
+
o && /* @__PURE__ */ d("small", { style: ue, children: o }),
|
|
4566
4566
|
p ? /* @__PURE__ */ d(
|
|
4567
4567
|
Zr,
|
|
4568
4568
|
{
|
|
@@ -4573,7 +4573,7 @@ function Ei({
|
|
|
4573
4573
|
placeholder: t.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
4574
4574
|
disabled: t.disabled === !0,
|
|
4575
4575
|
error: a,
|
|
4576
|
-
formulaConfigEnabled:
|
|
4576
|
+
formulaConfigEnabled: b
|
|
4577
4577
|
}
|
|
4578
4578
|
) : l()
|
|
4579
4579
|
] }) : /* @__PURE__ */ O("div", { children: [
|
|
@@ -4588,29 +4588,29 @@ function Ei({
|
|
|
4588
4588
|
dataTestId: t.dataTestId
|
|
4589
4589
|
}
|
|
4590
4590
|
),
|
|
4591
|
-
o && /* @__PURE__ */ d("small", { style:
|
|
4591
|
+
o && /* @__PURE__ */ d("small", { style: ue, children: o }),
|
|
4592
4592
|
l()
|
|
4593
4593
|
] });
|
|
4594
4594
|
}
|
|
4595
4595
|
function $l({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, touched: o, formulaConfig: u, onFormulaConfigChange: s }) {
|
|
4596
4596
|
var W;
|
|
4597
|
-
const l = t, c = !!(o && a), f = l.disabled === !0,
|
|
4597
|
+
const l = t, c = !!(o && a), f = l.disabled === !0, g = (F) => l.getOptionValue ? l.getOptionValue(F) : F.value ?? F.id, p = se(
|
|
4598
4598
|
() => (l.options ?? []).map((F) => ({
|
|
4599
4599
|
...F,
|
|
4600
|
-
value:
|
|
4600
|
+
value: g(F)
|
|
4601
4601
|
})),
|
|
4602
4602
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4603
4603
|
[l.options]
|
|
4604
|
-
), [m, h] =
|
|
4604
|
+
), [m, h] = L(0), b = ((W = l.dependsOn) == null ? void 0 : W.map((F) => n[F])) ?? [];
|
|
4605
4605
|
q(() => {
|
|
4606
4606
|
var F;
|
|
4607
4607
|
(F = l.dependsOn) != null && F.length && h((D) => D + 1);
|
|
4608
|
-
},
|
|
4609
|
-
const v = !!l.loadOptions, [C, y] =
|
|
4608
|
+
}, b);
|
|
4609
|
+
const v = !!l.loadOptions, [C, y] = L(null), I = Y(!1);
|
|
4610
4610
|
q(() => {
|
|
4611
4611
|
if (!v || I.current || e == null || e === "" || Array.isArray(e) && e.length === 0) return;
|
|
4612
4612
|
const F = Array.isArray(e) ? e : [e];
|
|
4613
|
-
I.current = !0, (l.loadValue ? l.loadValue(F) : l.loadOptions("").then((G) => G.filter((
|
|
4613
|
+
I.current = !0, (l.loadValue ? l.loadValue(F) : l.loadOptions("").then((G) => G.filter((M) => F.some((V) => String(g(M)) === String(V))))).then((G) => {
|
|
4614
4614
|
G.length !== 0 && y(l.isMulti ? G : G[0]);
|
|
4615
4615
|
}).catch(() => {
|
|
4616
4616
|
I.current = !1;
|
|
@@ -4621,10 +4621,10 @@ function $l({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, t
|
|
|
4621
4621
|
if (v) return C;
|
|
4622
4622
|
if (l.isMulti) {
|
|
4623
4623
|
const F = Array.isArray(e) ? e : [e];
|
|
4624
|
-
return p.filter((D) => F.includes(
|
|
4624
|
+
return p.filter((D) => F.includes(g(D)));
|
|
4625
4625
|
}
|
|
4626
|
-
return p.find((F) => String(
|
|
4627
|
-
}, [e, p, l.isMulti, v, C]), E = (F) => (v && y(F), F ? l.isMulti ? i(F.map(
|
|
4626
|
+
return p.find((F) => String(g(F)) === String(e)) ?? null;
|
|
4627
|
+
}, [e, p, l.isMulti, v, C]), E = (F) => (v && y(F), F ? l.isMulti ? i(F.map(g)) : i(g(F)) : i(l.isMulti ? [] : null)), S = {
|
|
4628
4628
|
inputId: l.id ?? l.name,
|
|
4629
4629
|
name: l.id ?? l.name,
|
|
4630
4630
|
placeholder: l.placeholder ?? "Select...",
|
|
@@ -4846,7 +4846,7 @@ function tu({
|
|
|
4846
4846
|
value: v.id ?? v.value
|
|
4847
4847
|
})),
|
|
4848
4848
|
[t.options]
|
|
4849
|
-
),
|
|
4849
|
+
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = se(() => new Set(g.map((v) => String(v))), [g]), m = se(() => l ? f.filter((v) => p.has(String(v.value ?? ""))) : f.find((v) => String(v.value ?? "") === String(e ?? "")) ?? null, [l, f, e, p]), b = /* @__PURE__ */ O(He, { children: [
|
|
4850
4850
|
/* @__PURE__ */ d(
|
|
4851
4851
|
hn,
|
|
4852
4852
|
{
|
|
@@ -4889,7 +4889,7 @@ function tu({
|
|
|
4889
4889
|
helperText: t.helperText,
|
|
4890
4890
|
formulaConfig: o,
|
|
4891
4891
|
onFormulaConfigChange: u,
|
|
4892
|
-
renderNative: () =>
|
|
4892
|
+
renderNative: () => b
|
|
4893
4893
|
}
|
|
4894
4894
|
) });
|
|
4895
4895
|
}
|
|
@@ -4995,7 +4995,7 @@ function Fi({
|
|
|
4995
4995
|
return /* @__PURE__ */ d(N, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: t.map((a) => {
|
|
4996
4996
|
const o = a.id ?? a.name ?? "", u = a.colSpan ?? Math.max(2, Math.floor(12 / t.length)), s = `${Math.round(u / 12 * 100)}%`;
|
|
4997
4997
|
return /* @__PURE__ */ O(N, { sx: { flex: `0 0 calc(${s} - 8px)`, minWidth: 100 }, children: [
|
|
4998
|
-
a.label && /* @__PURE__ */ O(
|
|
4998
|
+
a.label && /* @__PURE__ */ O(ce, { sx: { fontSize: 11, color: "#64748b", mb: 0.25, fontWeight: 500 }, children: [
|
|
4999
4999
|
a.label,
|
|
5000
5000
|
a.required && /* @__PURE__ */ d("span", { style: { color: "#ef4444" }, children: " *" })
|
|
5001
5001
|
] }),
|
|
@@ -5066,25 +5066,48 @@ function wi({
|
|
|
5066
5066
|
}) {
|
|
5067
5067
|
return /* @__PURE__ */ O(N, { sx: {
|
|
5068
5068
|
position: "relative",
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5069
|
+
// Match the breathing room of the host's "Conditional / Fallback" blocks:
|
|
5070
|
+
// generous interior padding, comfortable inter-block gap.
|
|
5071
|
+
px: 2,
|
|
5072
|
+
pt: 1.75,
|
|
5073
|
+
pb: 1.5,
|
|
5072
5074
|
bgcolor: "#fff",
|
|
5073
5075
|
border: "1px solid #e2e8f0",
|
|
5074
|
-
borderRadius: "
|
|
5075
|
-
mb:
|
|
5076
|
+
borderRadius: "8px",
|
|
5077
|
+
mb: 1.5,
|
|
5076
5078
|
// Children render with normal 32px bottom margin (ff-form-mb-4) so siblings
|
|
5077
5079
|
// are well-separated. Kill the LAST child's trailing margin so the row hugs
|
|
5078
5080
|
// its content with no extra gap below.
|
|
5079
5081
|
"& .ff-form-mb-4:last-of-type": { marginBottom: "0 !important" }
|
|
5080
5082
|
}, children: [
|
|
5081
|
-
e &&
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5083
|
+
e && // Pill chip — visually consistent with the host's "Conditional" /
|
|
5084
|
+
// "Fallback" tags. Sits above the first field with a 12px gap.
|
|
5085
|
+
/* @__PURE__ */ O(
|
|
5086
|
+
N,
|
|
5087
|
+
{
|
|
5088
|
+
component: "span",
|
|
5089
|
+
sx: {
|
|
5090
|
+
display: "inline-block",
|
|
5091
|
+
fontSize: 11,
|
|
5092
|
+
fontWeight: 600,
|
|
5093
|
+
color: "#475569",
|
|
5094
|
+
bgcolor: "#e2e8f0",
|
|
5095
|
+
px: 1,
|
|
5096
|
+
py: "2px",
|
|
5097
|
+
borderRadius: "6px",
|
|
5098
|
+
mb: 1.5,
|
|
5099
|
+
textTransform: "uppercase",
|
|
5100
|
+
letterSpacing: 0.5
|
|
5101
|
+
},
|
|
5102
|
+
children: [
|
|
5103
|
+
e,
|
|
5104
|
+
" ",
|
|
5105
|
+
t + 1
|
|
5106
|
+
]
|
|
5107
|
+
}
|
|
5108
|
+
),
|
|
5086
5109
|
r,
|
|
5087
|
-
/* @__PURE__ */ d(Se, { title: "Remove", children: /* @__PURE__ */ d("span", { style: { position: "absolute", top:
|
|
5110
|
+
/* @__PURE__ */ d(Se, { title: "Remove", children: /* @__PURE__ */ d("span", { style: { position: "absolute", top: 10, right: 10 }, children: /* @__PURE__ */ d(
|
|
5088
5111
|
Er,
|
|
5089
5112
|
{
|
|
5090
5113
|
size: "small",
|
|
@@ -5117,18 +5140,18 @@ function su({
|
|
|
5117
5140
|
depth: l,
|
|
5118
5141
|
compact: c,
|
|
5119
5142
|
renderFieldRouter: f,
|
|
5120
|
-
disabled:
|
|
5143
|
+
disabled: g,
|
|
5121
5144
|
minItems: p,
|
|
5122
5145
|
maxItems: m
|
|
5123
5146
|
}) {
|
|
5124
|
-
const [h,
|
|
5147
|
+
const [h, b] = L(() => i.map(() => Oe()));
|
|
5125
5148
|
q(() => {
|
|
5126
|
-
h.length !== i.length &&
|
|
5149
|
+
h.length !== i.length && b((I) => i.length > I.length ? [...I, ...Array.from({ length: i.length - I.length }, () => Oe())] : I.slice(0, i.length));
|
|
5127
5150
|
}, [i.length]);
|
|
5128
5151
|
const v = H(() => {
|
|
5129
|
-
i.length >= m || (u(e, [...i, Ti(n)]),
|
|
5152
|
+
i.length >= m || (u(e, [...i, Ti(n)]), b((I) => [...I, Oe()]));
|
|
5130
5153
|
}, [i, m, u, e, n]), C = H((I) => {
|
|
5131
|
-
i.length <= p || (u(e, i.filter((x, E) => E !== I)),
|
|
5154
|
+
i.length <= p || (u(e, i.filter((x, E) => E !== I)), b((x) => x.filter((E, S) => S !== I)));
|
|
5132
5155
|
}, [i, p, u, e]), y = t;
|
|
5133
5156
|
return /* @__PURE__ */ O(N, { children: [
|
|
5134
5157
|
/* @__PURE__ */ d(
|
|
@@ -5141,7 +5164,7 @@ function su({
|
|
|
5141
5164
|
htmlFor: t.id
|
|
5142
5165
|
}
|
|
5143
5166
|
),
|
|
5144
|
-
t.helperText && /* @__PURE__ */ d(
|
|
5167
|
+
t.helperText && /* @__PURE__ */ d(ce, { sx: { fontSize: 12, color: "#6c757d", mb: 0.75 }, children: t.helperText }),
|
|
5145
5168
|
i.length === 0 && /* @__PURE__ */ d(N, { sx: {
|
|
5146
5169
|
py: 2.5,
|
|
5147
5170
|
textAlign: "center",
|
|
@@ -5156,7 +5179,7 @@ function su({
|
|
|
5156
5179
|
{
|
|
5157
5180
|
index: x,
|
|
5158
5181
|
itemLabel: y.itemLabel,
|
|
5159
|
-
canRemove: i.length > p && !
|
|
5182
|
+
canRemove: i.length > p && !g,
|
|
5160
5183
|
onRemove: () => C(x),
|
|
5161
5184
|
children: /* @__PURE__ */ d(N, { children: n.map((E) => {
|
|
5162
5185
|
const S = E.id ?? E.name ?? "", T = `${e}.${x}.${S}`;
|
|
@@ -5186,7 +5209,7 @@ function su({
|
|
|
5186
5209
|
component: "button",
|
|
5187
5210
|
type: "button",
|
|
5188
5211
|
onClick: v,
|
|
5189
|
-
disabled:
|
|
5212
|
+
disabled: g,
|
|
5190
5213
|
sx: {
|
|
5191
5214
|
display: "inline-flex",
|
|
5192
5215
|
alignItems: "center",
|
|
@@ -5194,12 +5217,12 @@ function su({
|
|
|
5194
5217
|
border: "1px dashed #cbd5e1",
|
|
5195
5218
|
borderRadius: "6px",
|
|
5196
5219
|
background: "none",
|
|
5197
|
-
cursor:
|
|
5220
|
+
cursor: g ? "not-allowed" : "pointer",
|
|
5198
5221
|
px: 1.5,
|
|
5199
5222
|
py: 0.6,
|
|
5200
5223
|
fontSize: 12.5,
|
|
5201
5224
|
color: "#6366f1",
|
|
5202
|
-
opacity:
|
|
5225
|
+
opacity: g ? 0.5 : 1,
|
|
5203
5226
|
"&:hover:not(:disabled)": { borderColor: "#6366f1", bgcolor: "#f5f3ff" }
|
|
5204
5227
|
},
|
|
5205
5228
|
children: [
|
|
@@ -5223,9 +5246,9 @@ function Gt(t) {
|
|
|
5223
5246
|
parentSetFieldTouched: l,
|
|
5224
5247
|
depth: c = 0,
|
|
5225
5248
|
compact: f,
|
|
5226
|
-
renderFieldRouter:
|
|
5227
|
-
} = t, p = e, m = e.disabled === !0, h = p.itemType ?? "text",
|
|
5228
|
-
if (!!
|
|
5249
|
+
renderFieldRouter: g
|
|
5250
|
+
} = t, p = e, m = e.disabled === !0, h = p.itemType ?? "text", b = p.minItems ?? 0, v = p.maxItems ?? 1 / 0, C = e.children ?? p.itemFields;
|
|
5251
|
+
if (!!g && typeof r == "string" && Array.isArray(C) && C.length > 0)
|
|
5229
5252
|
return /* @__PURE__ */ d(
|
|
5230
5253
|
su,
|
|
5231
5254
|
{
|
|
@@ -5242,13 +5265,13 @@ function Gt(t) {
|
|
|
5242
5265
|
}),
|
|
5243
5266
|
depth: c,
|
|
5244
5267
|
compact: f,
|
|
5245
|
-
renderFieldRouter:
|
|
5268
|
+
renderFieldRouter: g,
|
|
5246
5269
|
disabled: m,
|
|
5247
|
-
minItems:
|
|
5270
|
+
minItems: b,
|
|
5248
5271
|
maxItems: v
|
|
5249
5272
|
}
|
|
5250
5273
|
);
|
|
5251
|
-
const [I, x] =
|
|
5274
|
+
const [I, x] = L(() => _t(it(n))), E = Y(JSON.stringify(Jt(I)));
|
|
5252
5275
|
q(() => {
|
|
5253
5276
|
if (JSON.stringify(it(n)) !== E.current) {
|
|
5254
5277
|
const D = _t(it(n));
|
|
@@ -5263,8 +5286,8 @@ function Gt(t) {
|
|
|
5263
5286
|
}, [i]), T = H(() => {
|
|
5264
5287
|
I.length >= v || S([...I, ru(h, p.itemFields)]);
|
|
5265
5288
|
}, [I, h, p.itemFields, v, S]), B = H((F) => {
|
|
5266
|
-
I.length <=
|
|
5267
|
-
}, [I,
|
|
5289
|
+
I.length <= b || S(I.filter((D) => Yt(D) !== F));
|
|
5290
|
+
}, [I, b, S]), W = H((F, D) => {
|
|
5268
5291
|
S(I.map((G) => Yt(G) !== F ? G : D !== null && typeof D == "object" && !Array.isArray(D) ? { ...D, [Ce]: F } : { [Ce]: F, __value: D }));
|
|
5269
5292
|
}, [I, S]);
|
|
5270
5293
|
return /* @__PURE__ */ O(N, { children: [
|
|
@@ -5278,7 +5301,7 @@ function Gt(t) {
|
|
|
5278
5301
|
htmlFor: e.id
|
|
5279
5302
|
}
|
|
5280
5303
|
),
|
|
5281
|
-
e.helperText && /* @__PURE__ */ d(
|
|
5304
|
+
e.helperText && /* @__PURE__ */ d(ce, { sx: { fontSize: 12, color: "#6c757d", mb: 0.75 }, children: e.helperText }),
|
|
5282
5305
|
I.length === 0 && /* @__PURE__ */ d(N, { sx: {
|
|
5283
5306
|
py: 2.5,
|
|
5284
5307
|
textAlign: "center",
|
|
@@ -5289,26 +5312,26 @@ function Gt(t) {
|
|
|
5289
5312
|
fontSize: 13
|
|
5290
5313
|
}, children: "No items yet — click Add to start" }),
|
|
5291
5314
|
I.map((F, D) => {
|
|
5292
|
-
const G = Yt(F),
|
|
5315
|
+
const G = Yt(F), M = iu(F);
|
|
5293
5316
|
return /* @__PURE__ */ d(
|
|
5294
5317
|
wi,
|
|
5295
5318
|
{
|
|
5296
5319
|
index: D,
|
|
5297
5320
|
itemLabel: p.itemLabel,
|
|
5298
|
-
canRemove: I.length >
|
|
5321
|
+
canRemove: I.length > b && !m,
|
|
5299
5322
|
onRemove: () => B(G),
|
|
5300
5323
|
children: h === "object" && p.itemFields ? /* @__PURE__ */ d(
|
|
5301
5324
|
Fi,
|
|
5302
5325
|
{
|
|
5303
5326
|
fields: p.itemFields,
|
|
5304
|
-
value:
|
|
5327
|
+
value: M ?? {},
|
|
5305
5328
|
onChange: (V) => W(G, V),
|
|
5306
5329
|
disabled: m
|
|
5307
5330
|
}
|
|
5308
5331
|
) : h === "select" ? /* @__PURE__ */ d(
|
|
5309
5332
|
au,
|
|
5310
5333
|
{
|
|
5311
|
-
value:
|
|
5334
|
+
value: M,
|
|
5312
5335
|
onChange: (V) => W(G, V),
|
|
5313
5336
|
options: p.itemOptions ?? [],
|
|
5314
5337
|
disabled: m
|
|
@@ -5322,7 +5345,7 @@ function Gt(t) {
|
|
|
5322
5345
|
type: "array",
|
|
5323
5346
|
label: void 0
|
|
5324
5347
|
},
|
|
5325
|
-
value:
|
|
5348
|
+
value: M,
|
|
5326
5349
|
values: {},
|
|
5327
5350
|
onChange: (V) => W(G, V),
|
|
5328
5351
|
onBlur: () => {
|
|
@@ -5331,7 +5354,7 @@ function Gt(t) {
|
|
|
5331
5354
|
) : /* @__PURE__ */ d(
|
|
5332
5355
|
ou,
|
|
5333
5356
|
{
|
|
5334
|
-
value:
|
|
5357
|
+
value: M,
|
|
5335
5358
|
onChange: (V) => W(G, h === "number" ? V === "" ? "" : Number(V) : V),
|
|
5336
5359
|
inputType: h,
|
|
5337
5360
|
placeholder: p.itemPlaceholder,
|
|
@@ -5424,8 +5447,8 @@ function cu({ field: t, value: e, onChange: n, onBlur: i }) {
|
|
|
5424
5447
|
const r = t.children ?? [], a = e ?? {}, o = or(r, a), u = Y(a);
|
|
5425
5448
|
u.current = a;
|
|
5426
5449
|
function s(l, c) {
|
|
5427
|
-
const
|
|
5428
|
-
u.current =
|
|
5450
|
+
const g = { ...or(r, u.current), [l]: c };
|
|
5451
|
+
u.current = g, n(g);
|
|
5429
5452
|
}
|
|
5430
5453
|
return /* @__PURE__ */ O(N, { children: [
|
|
5431
5454
|
/* @__PURE__ */ d(
|
|
@@ -5437,7 +5460,7 @@ function cu({ field: t, value: e, onChange: n, onBlur: i }) {
|
|
|
5437
5460
|
info: t.info
|
|
5438
5461
|
}
|
|
5439
5462
|
),
|
|
5440
|
-
t.helperText && /* @__PURE__ */ d(
|
|
5463
|
+
t.helperText && /* @__PURE__ */ d(ce, { sx: { fontSize: 12, color: "#6c757d", mb: 0.75 }, children: t.helperText }),
|
|
5441
5464
|
r.length === 0 ? /* @__PURE__ */ d(N, { sx: {
|
|
5442
5465
|
py: 2.5,
|
|
5443
5466
|
textAlign: "center",
|
|
@@ -5474,13 +5497,13 @@ function du({
|
|
|
5474
5497
|
error: r,
|
|
5475
5498
|
touched: a
|
|
5476
5499
|
}) {
|
|
5477
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] =
|
|
5500
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = L(
|
|
5478
5501
|
() => e == null || e === "" ? "" : String(e)
|
|
5479
|
-
),
|
|
5502
|
+
), g = Y(e);
|
|
5480
5503
|
q(() => {
|
|
5481
|
-
e !==
|
|
5504
|
+
e !== g.current && (g.current = e, f(e == null || e === "" ? "" : String(e)));
|
|
5482
5505
|
}, [e]);
|
|
5483
|
-
const p = !!o.prefix, m = !!o.suffix, h = p || m,
|
|
5506
|
+
const p = !!o.prefix, m = !!o.suffix, h = p || m, b = {
|
|
5484
5507
|
flex: 1,
|
|
5485
5508
|
border: "none",
|
|
5486
5509
|
outline: "none",
|
|
@@ -5530,7 +5553,7 @@ function du({
|
|
|
5530
5553
|
dataTestId: o.dataTestId
|
|
5531
5554
|
}
|
|
5532
5555
|
),
|
|
5533
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5556
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5534
5557
|
/* @__PURE__ */ O(
|
|
5535
5558
|
"div",
|
|
5536
5559
|
{
|
|
@@ -5553,8 +5576,8 @@ function du({
|
|
|
5553
5576
|
placeholder: o.placeholder ?? "",
|
|
5554
5577
|
value: c,
|
|
5555
5578
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
5556
|
-
style: h ?
|
|
5557
|
-
...
|
|
5579
|
+
style: h ? b : {
|
|
5580
|
+
...b,
|
|
5558
5581
|
border: s ? A.BORDER_ERROR : A.BORDER,
|
|
5559
5582
|
borderRadius: A.BORDER_RADIUS,
|
|
5560
5583
|
backgroundColor: l ? A.COLOR_DISABLED_BG : "#fff"
|
|
@@ -5563,7 +5586,7 @@ function du({
|
|
|
5563
5586
|
const E = x.target.value;
|
|
5564
5587
|
f(E);
|
|
5565
5588
|
const S = E === "" ? null : Number(E);
|
|
5566
|
-
|
|
5589
|
+
g.current = S, n(S);
|
|
5567
5590
|
},
|
|
5568
5591
|
onFocus: h ? void 0 : (x) => {
|
|
5569
5592
|
x.currentTarget.style.borderColor = s ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR_FOCUS, x.currentTarget.style.boxShadow = s ? A.FOCUS_SHADOW_ERROR : A.FOCUS_SHADOW;
|
|
@@ -5597,8 +5620,8 @@ function fu({
|
|
|
5597
5620
|
id: u,
|
|
5598
5621
|
name: u,
|
|
5599
5622
|
checked: !!e,
|
|
5600
|
-
onChange: (
|
|
5601
|
-
n(
|
|
5623
|
+
onChange: (g) => {
|
|
5624
|
+
n(g.target.checked);
|
|
5602
5625
|
},
|
|
5603
5626
|
onBlur: i,
|
|
5604
5627
|
disabled: l,
|
|
@@ -5616,7 +5639,7 @@ function fu({
|
|
|
5616
5639
|
);
|
|
5617
5640
|
return /* @__PURE__ */ O("div", { children: [
|
|
5618
5641
|
f,
|
|
5619
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5642
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5620
5643
|
s && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: de, children: r })
|
|
5621
5644
|
] });
|
|
5622
5645
|
}
|
|
@@ -5641,7 +5664,7 @@ function pu({
|
|
|
5641
5664
|
dataTestId: o.dataTestId
|
|
5642
5665
|
}
|
|
5643
5666
|
),
|
|
5644
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5667
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5645
5668
|
/* @__PURE__ */ d(
|
|
5646
5669
|
Co,
|
|
5647
5670
|
{
|
|
@@ -5685,9 +5708,9 @@ function wn({
|
|
|
5685
5708
|
error: r,
|
|
5686
5709
|
touched: a
|
|
5687
5710
|
}) {
|
|
5688
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.inputType === "datetime" ? "datetime-local" : o.inputType === "time" ? "time" : "date", [f,
|
|
5711
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.inputType === "datetime" ? "datetime-local" : o.inputType === "time" ? "time" : "date", [f, g] = L(() => String(e ?? "")), p = Y(e);
|
|
5689
5712
|
q(() => {
|
|
5690
|
-
e !== p.current && (p.current = e,
|
|
5713
|
+
e !== p.current && (p.current = e, g(String(e ?? "")));
|
|
5691
5714
|
}, [e]);
|
|
5692
5715
|
const m = {
|
|
5693
5716
|
width: "100%",
|
|
@@ -5714,7 +5737,7 @@ function wn({
|
|
|
5714
5737
|
dataTestId: o.dataTestId
|
|
5715
5738
|
}
|
|
5716
5739
|
),
|
|
5717
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5740
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5718
5741
|
/* @__PURE__ */ d(
|
|
5719
5742
|
"input",
|
|
5720
5743
|
{
|
|
@@ -5729,7 +5752,7 @@ function wn({
|
|
|
5729
5752
|
readOnly: o.readOnly,
|
|
5730
5753
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
5731
5754
|
onChange: (h) => {
|
|
5732
|
-
|
|
5755
|
+
g(h.target.value), p.current = h.target.value, n(h.target.value);
|
|
5733
5756
|
},
|
|
5734
5757
|
onBlur: i,
|
|
5735
5758
|
onFocus: (h) => {
|
|
@@ -5751,9 +5774,9 @@ function gu({
|
|
|
5751
5774
|
error: r,
|
|
5752
5775
|
touched: a
|
|
5753
5776
|
}) {
|
|
5754
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f,
|
|
5777
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = L(""), [p, m] = L(!1), h = Y(null), b = (I) => {
|
|
5755
5778
|
const x = I.trim();
|
|
5756
|
-
!x || c.includes(x) || o.maxTags && c.length >= o.maxTags || (n([...c, x]),
|
|
5779
|
+
!x || c.includes(x) || o.maxTags && c.length >= o.maxTags || (n([...c, x]), g(""));
|
|
5757
5780
|
}, v = (I) => {
|
|
5758
5781
|
n(c.filter((x, E) => E !== I));
|
|
5759
5782
|
}, C = s ? A.BORDER_COLOR_ERROR : p ? A.BORDER_COLOR_FOCUS : A.BORDER_COLOR, y = p ? s ? A.FOCUS_SHADOW_ERROR : A.FOCUS_SHADOW : "none";
|
|
@@ -5769,7 +5792,7 @@ function gu({
|
|
|
5769
5792
|
dataTestId: o.dataTestId
|
|
5770
5793
|
}
|
|
5771
5794
|
),
|
|
5772
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5795
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5773
5796
|
/* @__PURE__ */ O(
|
|
5774
5797
|
"div",
|
|
5775
5798
|
{
|
|
@@ -5846,13 +5869,13 @@ function gu({
|
|
|
5846
5869
|
padding: "2px 4px",
|
|
5847
5870
|
cursor: l ? "not-allowed" : void 0
|
|
5848
5871
|
},
|
|
5849
|
-
onChange: (I) =>
|
|
5872
|
+
onChange: (I) => g(I.target.value),
|
|
5850
5873
|
onKeyDown: (I) => {
|
|
5851
|
-
(I.key === "Enter" || I.key === ",") && (I.preventDefault(),
|
|
5874
|
+
(I.key === "Enter" || I.key === ",") && (I.preventDefault(), b(f)), I.key === "Backspace" && !f && c.length > 0 && v(c.length - 1);
|
|
5852
5875
|
},
|
|
5853
5876
|
onFocus: () => m(!0),
|
|
5854
5877
|
onBlur: () => {
|
|
5855
|
-
m(!1), f.trim() &&
|
|
5878
|
+
m(!1), f.trim() && b(f), i();
|
|
5856
5879
|
}
|
|
5857
5880
|
}
|
|
5858
5881
|
)
|
|
@@ -5870,7 +5893,7 @@ function bu({
|
|
|
5870
5893
|
error: r,
|
|
5871
5894
|
touched: a
|
|
5872
5895
|
}) {
|
|
5873
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.min ?? 0, f = o.max ?? 100,
|
|
5896
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.min ?? 0, f = o.max ?? 100, g = o.step ?? 1, [p, m] = L(
|
|
5874
5897
|
() => typeof e == "number" ? e : c
|
|
5875
5898
|
), h = Y(e);
|
|
5876
5899
|
return q(() => {
|
|
@@ -5887,7 +5910,7 @@ function bu({
|
|
|
5887
5910
|
dataTestId: o.dataTestId
|
|
5888
5911
|
}
|
|
5889
5912
|
),
|
|
5890
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5913
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5891
5914
|
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 12, px: 1 }, children: [
|
|
5892
5915
|
/* @__PURE__ */ d(
|
|
5893
5916
|
So,
|
|
@@ -5896,10 +5919,10 @@ function bu({
|
|
|
5896
5919
|
value: p,
|
|
5897
5920
|
min: c,
|
|
5898
5921
|
max: f,
|
|
5899
|
-
step:
|
|
5922
|
+
step: g,
|
|
5900
5923
|
disabled: l,
|
|
5901
5924
|
marks: o.marks,
|
|
5902
|
-
onChange: (
|
|
5925
|
+
onChange: (b, v) => {
|
|
5903
5926
|
const C = Array.isArray(v) ? v[0] : v;
|
|
5904
5927
|
m(C), h.current = C, n(C);
|
|
5905
5928
|
},
|
|
@@ -5930,12 +5953,12 @@ function hu({
|
|
|
5930
5953
|
error: r,
|
|
5931
5954
|
touched: a
|
|
5932
5955
|
}) {
|
|
5933
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] =
|
|
5956
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = L(() => String(e ?? "#6366f1")), g = Y(e);
|
|
5934
5957
|
q(() => {
|
|
5935
|
-
e !==
|
|
5958
|
+
e !== g.current && (g.current = e, f(String(e ?? "#6366f1")));
|
|
5936
5959
|
}, [e]);
|
|
5937
5960
|
const p = (m) => {
|
|
5938
|
-
f(m),
|
|
5961
|
+
f(m), g.current = m, n(m);
|
|
5939
5962
|
};
|
|
5940
5963
|
return /* @__PURE__ */ O("div", { children: [
|
|
5941
5964
|
/* @__PURE__ */ d(
|
|
@@ -5949,7 +5972,7 @@ function hu({
|
|
|
5949
5972
|
dataTestId: o.dataTestId
|
|
5950
5973
|
}
|
|
5951
5974
|
),
|
|
5952
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
5975
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5953
5976
|
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
5954
5977
|
/* @__PURE__ */ O(
|
|
5955
5978
|
"div",
|
|
@@ -6002,7 +6025,7 @@ function hu({
|
|
|
6002
6025
|
placeholder: "#000000",
|
|
6003
6026
|
onChange: (m) => {
|
|
6004
6027
|
const h = m.target.value;
|
|
6005
|
-
f(h), /^#[0-9a-fA-F]{6}$/.test(h) && (
|
|
6028
|
+
f(h), /^#[0-9a-fA-F]{6}$/.test(h) && (g.current = h, n(h));
|
|
6006
6029
|
},
|
|
6007
6030
|
onBlur: i,
|
|
6008
6031
|
style: {
|
|
@@ -6036,7 +6059,7 @@ function vu({
|
|
|
6036
6059
|
error: r,
|
|
6037
6060
|
touched: a
|
|
6038
6061
|
}) {
|
|
6039
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Y(null), [f,
|
|
6062
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Y(null), [f, g] = L(!1), [p, m] = L(null), h = e instanceof File ? [e] : Array.isArray(e) ? e : [], b = (y) => {
|
|
6040
6063
|
if (!y) return;
|
|
6041
6064
|
const I = Array.from(y);
|
|
6042
6065
|
if (o.maxSizeMb) {
|
|
@@ -6062,7 +6085,7 @@ function vu({
|
|
|
6062
6085
|
dataTestId: o.dataTestId
|
|
6063
6086
|
}
|
|
6064
6087
|
),
|
|
6065
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
6088
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6066
6089
|
/* @__PURE__ */ O(
|
|
6067
6090
|
"div",
|
|
6068
6091
|
{
|
|
@@ -6071,11 +6094,11 @@ function vu({
|
|
|
6071
6094
|
return !l && ((y = c.current) == null ? void 0 : y.click());
|
|
6072
6095
|
},
|
|
6073
6096
|
onDragOver: (y) => {
|
|
6074
|
-
y.preventDefault(), l ||
|
|
6097
|
+
y.preventDefault(), l || g(!0);
|
|
6075
6098
|
},
|
|
6076
|
-
onDragLeave: () =>
|
|
6099
|
+
onDragLeave: () => g(!1),
|
|
6077
6100
|
onDrop: (y) => {
|
|
6078
|
-
y.preventDefault(),
|
|
6101
|
+
y.preventDefault(), g(!1), l || b(y.dataTransfer.files);
|
|
6079
6102
|
},
|
|
6080
6103
|
style: {
|
|
6081
6104
|
border: `1px dashed ${C}`,
|
|
@@ -6099,7 +6122,7 @@ function vu({
|
|
|
6099
6122
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6100
6123
|
style: { display: "none" },
|
|
6101
6124
|
onChange: (y) => {
|
|
6102
|
-
|
|
6125
|
+
b(y.target.files), i();
|
|
6103
6126
|
}
|
|
6104
6127
|
}
|
|
6105
6128
|
),
|
|
@@ -6125,7 +6148,7 @@ function vu({
|
|
|
6125
6148
|
(s || p) && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: de, children: p ?? r })
|
|
6126
6149
|
] });
|
|
6127
6150
|
}
|
|
6128
|
-
const Iu = Ue.lazy(async () => ({ default: (await import("./index-
|
|
6151
|
+
const Iu = Ue.lazy(async () => ({ default: (await import("./index-aY0_Mo-L.js")).default }));
|
|
6129
6152
|
async function xu(t) {
|
|
6130
6153
|
switch (t) {
|
|
6131
6154
|
case "python":
|
|
@@ -6159,8 +6182,8 @@ function Gi({
|
|
|
6159
6182
|
p = !1;
|
|
6160
6183
|
};
|
|
6161
6184
|
}, [t]);
|
|
6162
|
-
const
|
|
6163
|
-
return c ? /* @__PURE__ */ d(Sr, { fallback:
|
|
6185
|
+
const g = se(() => /* @__PURE__ */ d("div", { style: { minHeight: l ?? i, padding: 8, color: "#9ca3af", fontSize: 12 }, children: "Loading editor…" }), [l, i]);
|
|
6186
|
+
return c ? /* @__PURE__ */ d(Sr, { fallback: g, children: /* @__PURE__ */ d(
|
|
6164
6187
|
Iu,
|
|
6165
6188
|
{
|
|
6166
6189
|
value: e,
|
|
@@ -6174,7 +6197,7 @@ function Gi({
|
|
|
6174
6197
|
onBlur: u,
|
|
6175
6198
|
style: s
|
|
6176
6199
|
}
|
|
6177
|
-
) }) :
|
|
6200
|
+
) }) : g;
|
|
6178
6201
|
}
|
|
6179
6202
|
function yu({
|
|
6180
6203
|
field: t,
|
|
@@ -6184,7 +6207,7 @@ function yu({
|
|
|
6184
6207
|
error: r,
|
|
6185
6208
|
touched: a
|
|
6186
6209
|
}) {
|
|
6187
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] =
|
|
6210
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = L(null), [g, p] = L(() => typeof e == "string" ? e : e != null ? JSON.stringify(e, null, 2) : ""), m = Y(e);
|
|
6188
6211
|
q(() => {
|
|
6189
6212
|
e !== m.current && (m.current = e, typeof e == "string" ? p(e) : e != null ? p(JSON.stringify(e, null, 2)) : p(""));
|
|
6190
6213
|
}, [e]);
|
|
@@ -6196,9 +6219,9 @@ function yu({
|
|
|
6196
6219
|
f(E.message);
|
|
6197
6220
|
}
|
|
6198
6221
|
m.current = x, n(x);
|
|
6199
|
-
},
|
|
6222
|
+
}, b = () => {
|
|
6200
6223
|
try {
|
|
6201
|
-
const x = JSON.stringify(JSON.parse(
|
|
6224
|
+
const x = JSON.stringify(JSON.parse(g), null, 2);
|
|
6202
6225
|
p(x), f(null), m.current = x, n(x);
|
|
6203
6226
|
} catch {
|
|
6204
6227
|
}
|
|
@@ -6220,13 +6243,13 @@ function yu({
|
|
|
6220
6243
|
"button",
|
|
6221
6244
|
{
|
|
6222
6245
|
type: "button",
|
|
6223
|
-
onClick:
|
|
6246
|
+
onClick: b,
|
|
6224
6247
|
style: { fontSize: 11, fontWeight: 600, color: "#6366f1", background: "none", border: "none", cursor: "pointer", padding: "0 0 4px" },
|
|
6225
6248
|
children: "Format"
|
|
6226
6249
|
}
|
|
6227
6250
|
)
|
|
6228
6251
|
] }),
|
|
6229
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
6252
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6230
6253
|
/* @__PURE__ */ d(
|
|
6231
6254
|
"div",
|
|
6232
6255
|
{
|
|
@@ -6242,7 +6265,7 @@ function yu({
|
|
|
6242
6265
|
Gi,
|
|
6243
6266
|
{
|
|
6244
6267
|
language: "json",
|
|
6245
|
-
value:
|
|
6268
|
+
value: g,
|
|
6246
6269
|
readOnly: l || o.readOnly,
|
|
6247
6270
|
minHeight: C,
|
|
6248
6271
|
maxHeight: y,
|
|
@@ -6271,13 +6294,13 @@ function Au({
|
|
|
6271
6294
|
error: r,
|
|
6272
6295
|
touched: a
|
|
6273
6296
|
}) {
|
|
6274
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] =
|
|
6297
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = L(() => String(e ?? "")), g = Y(e);
|
|
6275
6298
|
q(() => {
|
|
6276
|
-
e !==
|
|
6299
|
+
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6277
6300
|
}, [e]);
|
|
6278
6301
|
const p = (C) => {
|
|
6279
|
-
f(C),
|
|
6280
|
-
}, m = o.rows ?? 8, h = `${m * 22}px`,
|
|
6302
|
+
f(C), g.current = C, n(C);
|
|
6303
|
+
}, m = o.rows ?? 8, h = `${m * 22}px`, b = `${m * 22}px`, v = Cu[o.language ?? "javascript"] ?? "CODE";
|
|
6281
6304
|
return /* @__PURE__ */ O("div", { children: [
|
|
6282
6305
|
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6283
6306
|
/* @__PURE__ */ d(
|
|
@@ -6303,7 +6326,7 @@ function Au({
|
|
|
6303
6326
|
marginBottom: 4
|
|
6304
6327
|
}, children: v })
|
|
6305
6328
|
] }),
|
|
6306
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
6329
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6307
6330
|
/* @__PURE__ */ d(
|
|
6308
6331
|
"div",
|
|
6309
6332
|
{
|
|
@@ -6321,7 +6344,7 @@ function Au({
|
|
|
6321
6344
|
value: c,
|
|
6322
6345
|
readOnly: l || o.readOnly,
|
|
6323
6346
|
minHeight: h,
|
|
6324
|
-
maxHeight:
|
|
6347
|
+
maxHeight: b,
|
|
6325
6348
|
basicSetup: { lineNumbers: !0, foldGutter: !0, autocompletion: !0 },
|
|
6326
6349
|
onChange: p,
|
|
6327
6350
|
onBlur: i,
|
|
@@ -6334,7 +6357,7 @@ function Au({
|
|
|
6334
6357
|
] });
|
|
6335
6358
|
}
|
|
6336
6359
|
const Su = Ue.lazy(
|
|
6337
|
-
() => import("./index-
|
|
6360
|
+
() => import("./index-CSWLKuPF.js").then((t) => t.i).then((t) => (Promise.resolve({ }), { default: t.default }))
|
|
6338
6361
|
), Ru = [
|
|
6339
6362
|
[{ header: [1, 2, 3, !1] }],
|
|
6340
6363
|
["bold", "italic", "underline", "strike"],
|
|
@@ -6350,12 +6373,12 @@ function Eu({
|
|
|
6350
6373
|
error: r,
|
|
6351
6374
|
touched: a
|
|
6352
6375
|
}) {
|
|
6353
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] =
|
|
6376
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = L(() => String(e ?? "")), g = Y(e);
|
|
6354
6377
|
q(() => {
|
|
6355
|
-
e !==
|
|
6378
|
+
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6356
6379
|
}, [e]);
|
|
6357
|
-
const p = (
|
|
6358
|
-
f(
|
|
6380
|
+
const p = (b) => {
|
|
6381
|
+
f(b), g.current = b, n(b);
|
|
6359
6382
|
}, m = (o.rows ?? 6) * 24, h = o.toolbar !== !1;
|
|
6360
6383
|
return /* @__PURE__ */ O("div", { children: [
|
|
6361
6384
|
/* @__PURE__ */ d(
|
|
@@ -6369,7 +6392,7 @@ function Eu({
|
|
|
6369
6392
|
dataTestId: o.dataTestId
|
|
6370
6393
|
}
|
|
6371
6394
|
),
|
|
6372
|
-
o.helperText && !s && /* @__PURE__ */ d("small", { style:
|
|
6395
|
+
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6373
6396
|
/* @__PURE__ */ d(
|
|
6374
6397
|
"div",
|
|
6375
6398
|
{
|
|
@@ -6452,13 +6475,13 @@ function wu() {
|
|
|
6452
6475
|
} });
|
|
6453
6476
|
}
|
|
6454
6477
|
function Tu({ loadPage: t, loadSelected: e, currentValues: n, isOpen: i }) {
|
|
6455
|
-
const [r, a] =
|
|
6456
|
-
|
|
6478
|
+
const [r, a] = L([]), [o, u] = L(0), [s, l] = L(!0), [c, f] = L(!1), g = Y(/* @__PURE__ */ new Map()), [p, m] = L(0), [h, b] = L(""), [v, C] = L(""), y = Y(null), I = Y(null), x = Y(null), E = H((G) => {
|
|
6479
|
+
b(G), y.current && clearTimeout(y.current), y.current = setTimeout(() => C(G), 300);
|
|
6457
6480
|
}, []);
|
|
6458
6481
|
q(() => {
|
|
6459
|
-
var
|
|
6482
|
+
var M;
|
|
6460
6483
|
if (!i || x.current === v) return;
|
|
6461
|
-
x.current = v, (
|
|
6484
|
+
x.current = v, (M = I.current) == null || M.abort();
|
|
6462
6485
|
const G = new AbortController();
|
|
6463
6486
|
return I.current = G, a([]), u(0), l(!0), f(!0), t({ page: 1, search: v, signal: G.signal }).then((V) => {
|
|
6464
6487
|
if (G.signal.aborted) return;
|
|
@@ -6474,9 +6497,9 @@ function Tu({ loadPage: t, loadSelected: e, currentValues: n, isOpen: i }) {
|
|
|
6474
6497
|
(V = I.current) == null || V.abort();
|
|
6475
6498
|
const G = new AbortController();
|
|
6476
6499
|
I.current = G, f(!0);
|
|
6477
|
-
const
|
|
6478
|
-
t({ page:
|
|
6479
|
-
G.signal.aborted || (a((U) => ar([...U, ...j.options])), u(
|
|
6500
|
+
const M = o + 1;
|
|
6501
|
+
t({ page: M, search: v, signal: G.signal }).then((j) => {
|
|
6502
|
+
G.signal.aborted || (a((U) => ar([...U, ...j.options])), u(M), l(j.hasMore), f(!1));
|
|
6480
6503
|
}).catch((j) => {
|
|
6481
6504
|
sr(j) || f(!1);
|
|
6482
6505
|
});
|
|
@@ -6484,24 +6507,24 @@ function Tu({ loadPage: t, loadSelected: e, currentValues: n, isOpen: i }) {
|
|
|
6484
6507
|
q(() => {
|
|
6485
6508
|
if (!e || n.length === 0) return;
|
|
6486
6509
|
const G = n.filter(
|
|
6487
|
-
(
|
|
6510
|
+
(M) => !g.current.has(M) && !T.current.has(M)
|
|
6488
6511
|
);
|
|
6489
|
-
G.length !== 0 && (G.forEach((
|
|
6490
|
-
|
|
6512
|
+
G.length !== 0 && (G.forEach((M) => T.current.add(M)), e(G).then((M) => {
|
|
6513
|
+
M.forEach((V) => g.current.set(V.value, V)), m((V) => V + 1);
|
|
6491
6514
|
}).catch(() => {
|
|
6492
6515
|
}).finally(() => {
|
|
6493
|
-
G.forEach((
|
|
6516
|
+
G.forEach((M) => T.current.delete(M));
|
|
6494
6517
|
}));
|
|
6495
6518
|
}, [n.join("|")]);
|
|
6496
6519
|
const B = H(() => {
|
|
6497
6520
|
var G;
|
|
6498
|
-
x.current = null,
|
|
6521
|
+
x.current = null, b(""), C(""), y.current && clearTimeout(y.current), (G = I.current) == null || G.abort();
|
|
6499
6522
|
}, []), W = se(() => r, [r, p]), F = H((G) => {
|
|
6500
|
-
const
|
|
6501
|
-
return
|
|
6523
|
+
const M = r.find((V) => V.value === G);
|
|
6524
|
+
return M || g.current.get(G);
|
|
6502
6525
|
}, [r, p]), D = H((G) => {
|
|
6503
6526
|
if (!G) return;
|
|
6504
|
-
(Array.isArray(G) ? G : [G]).forEach((V) =>
|
|
6527
|
+
(Array.isArray(G) ? G : [G]).forEach((V) => g.current.set(V.value, V));
|
|
6505
6528
|
}, []);
|
|
6506
6529
|
return {
|
|
6507
6530
|
options: W,
|
|
@@ -6533,17 +6556,17 @@ function Gu({
|
|
|
6533
6556
|
error: r,
|
|
6534
6557
|
touched: a
|
|
6535
6558
|
}) {
|
|
6536
|
-
const o = t, u = o.isMulti ?? !1, s = o.id ?? o.name ?? "", l = !!(a && r), c = o.disabled === !0, f = Y(`ff-inf-${Math.random().toString(36).slice(2)}`).current, [
|
|
6559
|
+
const o = t, u = o.isMulti ?? !1, s = o.id ?? o.name ?? "", l = !!(a && r), c = o.disabled === !0, f = Y(`ff-inf-${Math.random().toString(36).slice(2)}`).current, [g, p] = L(!1);
|
|
6537
6560
|
q(() => {
|
|
6538
6561
|
const U = (Q) => {
|
|
6539
6562
|
Q.detail !== f && p(!1);
|
|
6540
6563
|
};
|
|
6541
6564
|
return window.addEventListener(rn, U), () => window.removeEventListener(rn, U);
|
|
6542
6565
|
}, [f]), q(() => {
|
|
6543
|
-
|
|
6544
|
-
}, [
|
|
6566
|
+
g && Ou(f);
|
|
6567
|
+
}, [g, f]);
|
|
6545
6568
|
const m = H(() => p(!0), []), h = se(() => lr(e), [e]), {
|
|
6546
|
-
options:
|
|
6569
|
+
options: b,
|
|
6547
6570
|
lookupOption: v,
|
|
6548
6571
|
isLoading: C,
|
|
6549
6572
|
hasMore: y,
|
|
@@ -6556,13 +6579,13 @@ function Gu({
|
|
|
6556
6579
|
loadPage: o.loadPage,
|
|
6557
6580
|
loadSelected: o.loadSelected,
|
|
6558
6581
|
currentValues: h,
|
|
6559
|
-
isOpen:
|
|
6582
|
+
isOpen: g
|
|
6560
6583
|
}), B = Y(S);
|
|
6561
6584
|
B.current = S;
|
|
6562
6585
|
const W = Y(!1);
|
|
6563
6586
|
q(() => {
|
|
6564
|
-
W.current && !
|
|
6565
|
-
}, [
|
|
6587
|
+
W.current && !g && B.current(), W.current = g;
|
|
6588
|
+
}, [g]);
|
|
6566
6589
|
const F = H(() => p(!1), []), D = se(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? lr(e).map((U) => v(U)).filter((U) => !!U) : v(String(e)) ?? null, [e, v, u]), G = H((U) => {
|
|
6567
6590
|
if (u) {
|
|
6568
6591
|
const Q = U ?? [];
|
|
@@ -6571,17 +6594,17 @@ function Gu({
|
|
|
6571
6594
|
const Q = U;
|
|
6572
6595
|
Q && T(Q), n(Q ? Q.value : null);
|
|
6573
6596
|
}
|
|
6574
|
-
}, [u, n, T]),
|
|
6575
|
-
|
|
6597
|
+
}, [u, n, T]), M = Y({ loadMore: E, isLoading: C, hasMore: y });
|
|
6598
|
+
M.current = { loadMore: E, isLoading: C, hasMore: y };
|
|
6576
6599
|
const V = Y(
|
|
6577
6600
|
function(Q) {
|
|
6578
6601
|
return /* @__PURE__ */ d(
|
|
6579
6602
|
Fu,
|
|
6580
6603
|
{
|
|
6581
6604
|
...Q,
|
|
6582
|
-
onScrollBottom: () =>
|
|
6583
|
-
isLoading:
|
|
6584
|
-
hasMore:
|
|
6605
|
+
onScrollBottom: () => M.current.loadMore(),
|
|
6606
|
+
isLoading: M.current.isLoading,
|
|
6607
|
+
hasMore: M.current.hasMore
|
|
6585
6608
|
}
|
|
6586
6609
|
);
|
|
6587
6610
|
}
|
|
@@ -6600,7 +6623,7 @@ function Gu({
|
|
|
6600
6623
|
htmlFor: s
|
|
6601
6624
|
}
|
|
6602
6625
|
),
|
|
6603
|
-
o.helperText && !l && /* @__PURE__ */ d("small", { style:
|
|
6626
|
+
o.helperText && !l && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6604
6627
|
/* @__PURE__ */ d(
|
|
6605
6628
|
hn,
|
|
6606
6629
|
{
|
|
@@ -6610,13 +6633,13 @@ function Gu({
|
|
|
6610
6633
|
onInputChange: x,
|
|
6611
6634
|
onChange: G,
|
|
6612
6635
|
onBlur: i,
|
|
6613
|
-
options:
|
|
6636
|
+
options: b,
|
|
6614
6637
|
isMulti: u,
|
|
6615
6638
|
isDisabled: c,
|
|
6616
6639
|
isClearable: o.isClearable ?? !1,
|
|
6617
6640
|
isSearchable: !0,
|
|
6618
6641
|
filterOption: null,
|
|
6619
|
-
menuIsOpen:
|
|
6642
|
+
menuIsOpen: g,
|
|
6620
6643
|
onMenuOpen: m,
|
|
6621
6644
|
onMenuClose: F,
|
|
6622
6645
|
placeholder: o.placeholder ?? "Search…",
|
|
@@ -6742,13 +6765,13 @@ function Di(t, e) {
|
|
|
6742
6765
|
return i;
|
|
6743
6766
|
function s(l, c, f) {
|
|
6744
6767
|
if (f.has(l)) {
|
|
6745
|
-
var
|
|
6768
|
+
var g;
|
|
6746
6769
|
try {
|
|
6747
|
-
|
|
6770
|
+
g = ", node was:" + JSON.stringify(l);
|
|
6748
6771
|
} catch {
|
|
6749
|
-
|
|
6772
|
+
g = "";
|
|
6750
6773
|
}
|
|
6751
|
-
throw new Error("Cyclic dependency" +
|
|
6774
|
+
throw new Error("Cyclic dependency" + g);
|
|
6752
6775
|
}
|
|
6753
6776
|
if (!u.has(l))
|
|
6754
6777
|
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(l));
|
|
@@ -7008,13 +7031,13 @@ function Le(t) {
|
|
|
7008
7031
|
name: l,
|
|
7009
7032
|
test: c,
|
|
7010
7033
|
params: f,
|
|
7011
|
-
message:
|
|
7034
|
+
message: g,
|
|
7012
7035
|
skipAbsent: p
|
|
7013
7036
|
} = t;
|
|
7014
7037
|
let {
|
|
7015
7038
|
parent: m,
|
|
7016
7039
|
context: h,
|
|
7017
|
-
abortEarly:
|
|
7040
|
+
abortEarly: b = o.spec.abortEarly,
|
|
7018
7041
|
disableStackTrace: v = o.spec.disableStackTrace
|
|
7019
7042
|
} = r;
|
|
7020
7043
|
const C = {
|
|
@@ -7030,10 +7053,10 @@ function Le(t) {
|
|
|
7030
7053
|
path: F.path || i,
|
|
7031
7054
|
spec: o.spec,
|
|
7032
7055
|
disableStackTrace: F.disableStackTrace || v
|
|
7033
|
-
}, f, F.params), C), G = new fe(fe.formatError(F.message ||
|
|
7056
|
+
}, f, F.params), C), G = new fe(fe.formatError(F.message || g, D), n, D.path, F.type || l, D.disableStackTrace);
|
|
7034
7057
|
return G.params = D, G;
|
|
7035
7058
|
}
|
|
7036
|
-
const I =
|
|
7059
|
+
const I = b ? u : s;
|
|
7037
7060
|
let x = {
|
|
7038
7061
|
path: i,
|
|
7039
7062
|
parent: m,
|
|
@@ -7088,12 +7111,12 @@ function ic(t, e, n, i = n) {
|
|
|
7088
7111
|
parent: r,
|
|
7089
7112
|
value: n
|
|
7090
7113
|
});
|
|
7091
|
-
let f = t.type === "tuple",
|
|
7114
|
+
let f = t.type === "tuple", g = l ? parseInt(c, 10) : 0;
|
|
7092
7115
|
if (t.innerType || f) {
|
|
7093
7116
|
if (f && !l) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);
|
|
7094
|
-
if (n &&
|
|
7117
|
+
if (n && g >= n.length)
|
|
7095
7118
|
throw new Error(`Yup.reach cannot resolve an array item at index: ${u}, in the path: ${e}. because there is no value at that index. `);
|
|
7096
|
-
r = n, n = n && n[
|
|
7119
|
+
r = n, n = n && n[g], t = f ? t.spec.types[g] : t.innerType;
|
|
7097
7120
|
}
|
|
7098
7121
|
if (!l) {
|
|
7099
7122
|
if (!t.fields || !t.fields[c]) throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${t.type}")`);
|
|
@@ -7339,8 +7362,8 @@ attempted value: ${o}
|
|
|
7339
7362
|
r || (r = !0, n(h, o));
|
|
7340
7363
|
}, f = (h) => {
|
|
7341
7364
|
r || (r = !0, i(h, o));
|
|
7342
|
-
},
|
|
7343
|
-
if (!
|
|
7365
|
+
}, g = a.length, p = [];
|
|
7366
|
+
if (!g) return f([]);
|
|
7344
7367
|
let m = {
|
|
7345
7368
|
value: o,
|
|
7346
7369
|
originalValue: u,
|
|
@@ -7349,9 +7372,9 @@ attempted value: ${o}
|
|
|
7349
7372
|
schema: this
|
|
7350
7373
|
};
|
|
7351
7374
|
for (let h = 0; h < a.length; h++) {
|
|
7352
|
-
const
|
|
7353
|
-
|
|
7354
|
-
C && (Array.isArray(C) ? p.push(...C) : p.push(C)), --
|
|
7375
|
+
const b = a[h];
|
|
7376
|
+
b(m, c, function(C) {
|
|
7377
|
+
C && (Array.isArray(C) ? p.push(...C) : p.push(C)), --g <= 0 && f(p);
|
|
7355
7378
|
});
|
|
7356
7379
|
}
|
|
7357
7380
|
}
|
|
@@ -7383,7 +7406,7 @@ attempted value: ${o}
|
|
|
7383
7406
|
[s ? "index" : "key"]: u,
|
|
7384
7407
|
path: s || u.includes(".") ? `${r || ""}[${s ? u : `"${u}"`}]` : (r ? `${r}.` : "") + e
|
|
7385
7408
|
});
|
|
7386
|
-
return (f,
|
|
7409
|
+
return (f, g, p) => this.resolve(c)._validate(l, c, g, p);
|
|
7387
7410
|
}
|
|
7388
7411
|
validate(e, n) {
|
|
7389
7412
|
var i;
|
|
@@ -8178,20 +8201,20 @@ class $i extends be {
|
|
|
8178
8201
|
__validating: n.__validating || !1
|
|
8179
8202
|
}), c = !1;
|
|
8180
8203
|
for (const f of u) {
|
|
8181
|
-
let
|
|
8182
|
-
if (
|
|
8204
|
+
let g = a[f], p = f in r, m = r[f];
|
|
8205
|
+
if (g) {
|
|
8183
8206
|
let h;
|
|
8184
|
-
l.path = (n.path ? `${n.path}.` : "") + f,
|
|
8207
|
+
l.path = (n.path ? `${n.path}.` : "") + f, g = g.resolve({
|
|
8185
8208
|
value: m,
|
|
8186
8209
|
context: n.context,
|
|
8187
8210
|
parent: s
|
|
8188
8211
|
});
|
|
8189
|
-
let
|
|
8190
|
-
if (
|
|
8212
|
+
let b = g instanceof be ? g.spec : void 0, v = b == null ? void 0 : b.strict;
|
|
8213
|
+
if (b != null && b.strip) {
|
|
8191
8214
|
c = c || f in r;
|
|
8192
8215
|
continue;
|
|
8193
8216
|
}
|
|
8194
|
-
h = !n.__validating || !v ?
|
|
8217
|
+
h = !n.__validating || !v ? g.cast(m, l) : m, h !== void 0 && (s[f] = h);
|
|
8195
8218
|
} else p && !o && (s[f] = m);
|
|
8196
8219
|
(p !== f in s || s[f] !== m) && (c = !0);
|
|
8197
8220
|
}
|
|
@@ -8214,8 +8237,8 @@ class $i extends be {
|
|
|
8214
8237
|
o = o || l;
|
|
8215
8238
|
let c = [];
|
|
8216
8239
|
for (let f of this._nodes) {
|
|
8217
|
-
let
|
|
8218
|
-
!
|
|
8240
|
+
let g = this.fields[f];
|
|
8241
|
+
!g || De.isRef(g) || c.push(g.asNestedTest({
|
|
8219
8242
|
options: n,
|
|
8220
8243
|
key: f,
|
|
8221
8244
|
parent: l,
|
|
@@ -8427,13 +8450,13 @@ class Ui extends be {
|
|
|
8427
8450
|
}
|
|
8428
8451
|
let f = new Array(l.length);
|
|
8429
8452
|
for (let p = 0; p < l.length; p++) {
|
|
8430
|
-
var
|
|
8453
|
+
var g;
|
|
8431
8454
|
f[p] = o.asNestedTest({
|
|
8432
8455
|
options: n,
|
|
8433
8456
|
index: p,
|
|
8434
8457
|
parent: l,
|
|
8435
8458
|
parentPath: n.path,
|
|
8436
|
-
originalParent: (
|
|
8459
|
+
originalParent: (g = n.originalValue) != null ? g : e
|
|
8437
8460
|
});
|
|
8438
8461
|
}
|
|
8439
8462
|
this.runTests({
|
|
@@ -8784,7 +8807,7 @@ function mr({ checked: t, onChange: e, indeterminate: n, disabled: i }) {
|
|
|
8784
8807
|
);
|
|
8785
8808
|
}
|
|
8786
8809
|
function Oc({ selected: t, onRemove: e, onClose: n }) {
|
|
8787
|
-
const [i, r] =
|
|
8810
|
+
const [i, r] = L(""), a = t.filter(
|
|
8788
8811
|
(o) => o.label.toLowerCase().includes(i.toLowerCase())
|
|
8789
8812
|
);
|
|
8790
8813
|
return /* @__PURE__ */ d("div", { style: ee.overlay, onClick: n, children: /* @__PURE__ */ O("div", { style: ee.modal, onClick: (o) => o.stopPropagation(), children: [
|
|
@@ -8826,11 +8849,11 @@ function Oc({ selected: t, onRemove: e, onClose: n }) {
|
|
|
8826
8849
|
] }) });
|
|
8827
8850
|
}
|
|
8828
8851
|
function Fc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }) {
|
|
8829
|
-
const o = t, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Ec, c = o.id ?? o.name ?? "", [f,
|
|
8852
|
+
const o = t, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Ec, c = o.id ?? o.name ?? "", [f, g] = L(""), [p, m] = L(1), [h, b] = L([]), [v, C] = L(!1), [y, I] = L(!1), [x, E] = L(null), [S, T] = L(!1), B = Y(null), W = Y(0), F = Y(!0);
|
|
8830
8853
|
q(() => () => {
|
|
8831
8854
|
F.current = !1, B.current && clearTimeout(B.current);
|
|
8832
8855
|
}, []);
|
|
8833
|
-
const D = s ? Array.isArray(e) ? e : [] : e ? [e] : [], G = D.length,
|
|
8856
|
+
const D = s ? Array.isArray(e) ? e : [] : e ? [e] : [], G = D.length, M = H(
|
|
8834
8857
|
(w, z) => {
|
|
8835
8858
|
if (o.fetchOptions) return o.fetchOptions(w, z);
|
|
8836
8859
|
if (o.dataSource) {
|
|
@@ -8844,22 +8867,22 @@ function Fc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
8844
8867
|
), V = H(
|
|
8845
8868
|
(w, z) => {
|
|
8846
8869
|
const $ = ++W.current;
|
|
8847
|
-
I(!0),
|
|
8848
|
-
!F.current || $ !== W.current || (
|
|
8870
|
+
I(!0), M(w, z).then((Z) => {
|
|
8871
|
+
!F.current || $ !== W.current || (b(Z.options.slice(0, l)), C(Z.hasNextPage));
|
|
8849
8872
|
}).catch(() => {
|
|
8850
|
-
!F.current || $ !== W.current || (
|
|
8873
|
+
!F.current || $ !== W.current || (b([]), C(!1));
|
|
8851
8874
|
}).finally(() => {
|
|
8852
8875
|
!F.current || $ !== W.current || I(!1);
|
|
8853
8876
|
});
|
|
8854
8877
|
},
|
|
8855
|
-
[
|
|
8878
|
+
[M, l]
|
|
8856
8879
|
);
|
|
8857
8880
|
q(() => {
|
|
8858
8881
|
V("", 1);
|
|
8859
8882
|
}, []);
|
|
8860
8883
|
const j = (w) => {
|
|
8861
8884
|
const z = w.target.value;
|
|
8862
|
-
|
|
8885
|
+
g(z), m(1), B.current && clearTimeout(B.current), B.current = setTimeout(() => V(z, 1), 300);
|
|
8863
8886
|
}, U = (w) => {
|
|
8864
8887
|
if (s) {
|
|
8865
8888
|
const z = Array.isArray(e) ? e : [], $ = z.some((Z) => Z.value === w.value);
|
|
@@ -9017,7 +9040,7 @@ function Fc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
9017
9040
|
] })
|
|
9018
9041
|
] })
|
|
9019
9042
|
] }),
|
|
9020
|
-
o.helperText && !u && /* @__PURE__ */ d("small", { style:
|
|
9043
|
+
o.helperText && !u && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
9021
9044
|
u && /* @__PURE__ */ d("small", { "data-testid": `${c}-error`, style: de, children: r }),
|
|
9022
9045
|
S && /* @__PURE__ */ d(
|
|
9023
9046
|
Oc,
|
|
@@ -9260,7 +9283,7 @@ function Dc({
|
|
|
9260
9283
|
compact: s,
|
|
9261
9284
|
renderFieldRouter: l
|
|
9262
9285
|
}) {
|
|
9263
|
-
const [c, f] =
|
|
9286
|
+
const [c, f] = L(!0), g = t.children ?? [], p = Ki(g), m = Gc(t, e), h = typeof t.helperText == "string" ? t.helperText : void 0, b = `${p} field${p === 1 ? "" : "s"}`;
|
|
9264
9287
|
return /* @__PURE__ */ O(N, { sx: Bc(n, s), children: [
|
|
9265
9288
|
/* @__PURE__ */ O(N, { onClick: () => f((v) => !v), sx: Vc(n, c), children: [
|
|
9266
9289
|
/* @__PURE__ */ d(
|
|
@@ -9283,7 +9306,7 @@ function Dc({
|
|
|
9283
9306
|
/* @__PURE__ */ O(N, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
9284
9307
|
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
9285
9308
|
/* @__PURE__ */ d(
|
|
9286
|
-
|
|
9309
|
+
ce,
|
|
9287
9310
|
{
|
|
9288
9311
|
sx: {
|
|
9289
9312
|
fontSize: n >= 2 ? 13 : 14,
|
|
@@ -9298,7 +9321,7 @@ function Dc({
|
|
|
9298
9321
|
/* @__PURE__ */ d(
|
|
9299
9322
|
Ro,
|
|
9300
9323
|
{
|
|
9301
|
-
label:
|
|
9324
|
+
label: b,
|
|
9302
9325
|
size: "small",
|
|
9303
9326
|
sx: {
|
|
9304
9327
|
height: 20,
|
|
@@ -9312,7 +9335,7 @@ function Dc({
|
|
|
9312
9335
|
)
|
|
9313
9336
|
] }),
|
|
9314
9337
|
h && /* @__PURE__ */ d(
|
|
9315
|
-
|
|
9338
|
+
ce,
|
|
9316
9339
|
{
|
|
9317
9340
|
sx: {
|
|
9318
9341
|
mt: 0.35,
|
|
@@ -9340,7 +9363,7 @@ function Dc({
|
|
|
9340
9363
|
sx: {
|
|
9341
9364
|
pl: n === 0 ? 0 : n === 1 ? 1 : 0
|
|
9342
9365
|
},
|
|
9343
|
-
children:
|
|
9366
|
+
children: g.map((v) => {
|
|
9344
9367
|
const C = v.id ?? v.name ?? "", y = e ? `${e}.${C}` : C;
|
|
9345
9368
|
return l({
|
|
9346
9369
|
field: v,
|
|
@@ -9378,11 +9401,11 @@ function Lc({
|
|
|
9378
9401
|
renderFieldRouter: l
|
|
9379
9402
|
}) {
|
|
9380
9403
|
var T;
|
|
9381
|
-
const c = t.tabs ?? [], [f,
|
|
9404
|
+
const c = t.tabs ?? [], [f, g] = L(((T = c[0]) == null ? void 0 : T.id) ?? "");
|
|
9382
9405
|
q(() => {
|
|
9383
|
-
c.length !== 0 && (c.some((B) => B.id === f) ||
|
|
9406
|
+
c.length !== 0 && (c.some((B) => B.id === f) || g(c[0].id));
|
|
9384
9407
|
}, [c, f]);
|
|
9385
|
-
const p = Pc(), m = t.id ?? t.name ?? "", h = t.variant ?? "line",
|
|
9408
|
+
const p = Pc(), m = t.id ?? t.name ?? "", h = t.variant ?? "line", b = t.alignment ?? "left", v = t.height ?? "auto", C = t.margin ?? "normal", y = t.activeColor ?? "#6366f1", I = t.activeTextColor ?? (h === "pill" ? "#ffffff" : y), x = t.inactiveTextColor ?? "#64748b", E = {
|
|
9386
9409
|
left: "flex-start",
|
|
9387
9410
|
"center-left": "flex-start",
|
|
9388
9411
|
center: "center",
|
|
@@ -9404,7 +9427,7 @@ function Lc({
|
|
|
9404
9427
|
}, children: [
|
|
9405
9428
|
/* @__PURE__ */ d(N, { sx: {
|
|
9406
9429
|
display: "flex",
|
|
9407
|
-
justifyContent: E[
|
|
9430
|
+
justifyContent: E[b] ?? "flex-start",
|
|
9408
9431
|
alignItems: "center",
|
|
9409
9432
|
gap: 0,
|
|
9410
9433
|
px: 1.5,
|
|
@@ -9415,15 +9438,15 @@ function Lc({
|
|
|
9415
9438
|
const W = B.id === f, F = e ? `${e}.${B.id}` : B.id, D = B.fields.some((Q) => {
|
|
9416
9439
|
const re = Q.id ?? Q.name ?? "";
|
|
9417
9440
|
return !!`${F}.${re}`.split(".").reduce((P, k) => P && typeof P == "object" ? P[k] : void 0, r);
|
|
9418
|
-
}), G = { bgcolor: y, color: I, borderRadius: "20px", border: "none" },
|
|
9441
|
+
}), G = { bgcolor: y, color: I, borderRadius: "20px", border: "none" }, M = { bgcolor: "transparent", color: x, borderRadius: "20px", border: "none" }, V = { borderBottom: `2px solid ${y}`, color: I, border: "none" };
|
|
9419
9442
|
return /* @__PURE__ */ O(
|
|
9420
9443
|
N,
|
|
9421
9444
|
{
|
|
9422
9445
|
component: "button",
|
|
9423
9446
|
type: "button",
|
|
9424
|
-
onClick: () =>
|
|
9447
|
+
onClick: () => g(B.id),
|
|
9425
9448
|
sx: {
|
|
9426
|
-
...h === "pill" ? W ? G :
|
|
9449
|
+
...h === "pill" ? W ? G : M : W ? V : { borderBottom: "2px solid transparent", color: x, border: "none" },
|
|
9427
9450
|
background: h === "pill" && W ? y : "none",
|
|
9428
9451
|
cursor: "pointer",
|
|
9429
9452
|
px: 1.5,
|
|
@@ -9603,7 +9626,7 @@ function Xc({ connector: t, onChange: e }) {
|
|
|
9603
9626
|
)) });
|
|
9604
9627
|
}
|
|
9605
9628
|
function zc({ colDef: t, entry: e, onChange: n, cellId: i }) {
|
|
9606
|
-
const [r, a] =
|
|
9629
|
+
const [r, a] = L({}), o = t.id === "value" && !xr(e.operator);
|
|
9607
9630
|
if (t.type === "operator") {
|
|
9608
9631
|
const s = te.get("select");
|
|
9609
9632
|
return s ? /* @__PURE__ */ d(
|
|
@@ -9663,7 +9686,7 @@ function zc({ colDef: t, entry: e, onChange: n, cellId: i }) {
|
|
|
9663
9686
|
) : null;
|
|
9664
9687
|
}
|
|
9665
9688
|
function Hc({ node: t, conditionDef: e, depth: n, fieldPath: i, onUpdate: r, onRemove: a }) {
|
|
9666
|
-
const [o, u] =
|
|
9689
|
+
const [o, u] = L(!1), s = to(t.entries);
|
|
9667
9690
|
return /* @__PURE__ */ O(N, { sx: {
|
|
9668
9691
|
border: "1px solid #e9e9e9",
|
|
9669
9692
|
borderLeft: "3px solid #d1d5db",
|
|
@@ -9687,8 +9710,8 @@ function Hc({ node: t, conditionDef: e, depth: n, fieldPath: i, onUpdate: r, onR
|
|
|
9687
9710
|
onClick: () => u((l) => !l),
|
|
9688
9711
|
children: [
|
|
9689
9712
|
/* @__PURE__ */ d(N, { sx: { color: "#94a3b8", display: "flex", alignItems: "center" }, children: o ? /* @__PURE__ */ d(pn, { size: 15 }) : /* @__PURE__ */ d(mo, { size: 15 }) }),
|
|
9690
|
-
/* @__PURE__ */ d(
|
|
9691
|
-
/* @__PURE__ */ O(
|
|
9713
|
+
/* @__PURE__ */ d(ce, { sx: { fontSize: 11, fontWeight: 700, color: "#94a3b8", fontFamily: "monospace", letterSpacing: -1 }, children: "( )" }),
|
|
9714
|
+
/* @__PURE__ */ O(ce, { sx: { fontSize: 11, color: "#64748b" }, children: [
|
|
9692
9715
|
"Group",
|
|
9693
9716
|
o && /* @__PURE__ */ O(N, { component: "span", sx: { ml: 0.5, color: "#94a3b8" }, children: [
|
|
9694
9717
|
"· ",
|
|
@@ -9727,22 +9750,22 @@ function no({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9727
9750
|
type: "group",
|
|
9728
9751
|
connector: "and",
|
|
9729
9752
|
entries: [Ir()]
|
|
9730
|
-
}]), s = (
|
|
9731
|
-
(m, h) => h ===
|
|
9753
|
+
}]), s = (g) => n(e.filter((p, m) => m !== g)), l = (g, p) => n(e.map((m, h) => h === g ? { ...m, connector: p } : m)), c = (g, p) => n(e.map((m, h) => h === g ? { ...m, ...p } : m)), f = (g, p) => n(e.map(
|
|
9754
|
+
(m, h) => h === g ? { ...m, entries: p } : m
|
|
9732
9755
|
));
|
|
9733
|
-
return /* @__PURE__ */ O(N, { sx: { mt: i === 0 ?
|
|
9734
|
-
e.map((
|
|
9735
|
-
p > 0 && /* @__PURE__ */ d(N, { sx: { display: "flex", alignItems: "center", my: "
|
|
9756
|
+
return /* @__PURE__ */ O(N, { sx: { mt: i === 0 ? 1.25 : 0.25 }, children: [
|
|
9757
|
+
e.map((g, p) => /* @__PURE__ */ O(N, { children: [
|
|
9758
|
+
p > 0 && /* @__PURE__ */ d(N, { sx: { display: "flex", alignItems: "center", my: "10px" }, children: /* @__PURE__ */ d(
|
|
9736
9759
|
Xc,
|
|
9737
9760
|
{
|
|
9738
|
-
connector:
|
|
9761
|
+
connector: g.connector ?? "and",
|
|
9739
9762
|
onChange: (m) => l(p, m)
|
|
9740
9763
|
}
|
|
9741
9764
|
) }),
|
|
9742
|
-
eo(
|
|
9765
|
+
eo(g) ? /* @__PURE__ */ d(
|
|
9743
9766
|
Hc,
|
|
9744
9767
|
{
|
|
9745
|
-
node:
|
|
9768
|
+
node: g,
|
|
9746
9769
|
conditionDef: t,
|
|
9747
9770
|
depth: i,
|
|
9748
9771
|
fieldPath: `${r}__g${p}`,
|
|
@@ -9750,13 +9773,13 @@ function no({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9750
9773
|
onRemove: () => s(p)
|
|
9751
9774
|
}
|
|
9752
9775
|
) : /* @__PURE__ */ O(N, { children: [
|
|
9753
|
-
p === 0 && /* @__PURE__ */ d(
|
|
9776
|
+
p === 0 && /* @__PURE__ */ d(ce, { sx: { fontSize: 12, fontWeight: 600, color: "#475569", mb: 0.75 }, children: "When" }),
|
|
9754
9777
|
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
9755
9778
|
/* @__PURE__ */ d(N, { sx: { display: "grid", gridTemplateColumns: "repeat(12, 1fr)", gap: 0.75, flex: 1 }, children: t.fields.map((m) => /* @__PURE__ */ d(N, { sx: { gridColumn: `span ${m.colSpan ?? 4}` }, children: /* @__PURE__ */ d(
|
|
9756
9779
|
zc,
|
|
9757
9780
|
{
|
|
9758
9781
|
colDef: m,
|
|
9759
|
-
entry:
|
|
9782
|
+
entry: g,
|
|
9760
9783
|
onChange: (h) => c(p, h),
|
|
9761
9784
|
cellId: `${r}__${p}__${m.id}`
|
|
9762
9785
|
}
|
|
@@ -9775,7 +9798,7 @@ function no({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9775
9798
|
] })
|
|
9776
9799
|
] })
|
|
9777
9800
|
] }, p)),
|
|
9778
|
-
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 1, mt: e.length > 0 ? 1 : 0 }, children: [
|
|
9801
|
+
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 1, mt: e.length > 0 ? 1.5 : 0 }, children: [
|
|
9779
9802
|
/* @__PURE__ */ d(
|
|
9780
9803
|
Dn,
|
|
9781
9804
|
{
|
|
@@ -9842,56 +9865,54 @@ function _c({ onValidityChange: t }) {
|
|
|
9842
9865
|
}, [e, t]), null;
|
|
9843
9866
|
}
|
|
9844
9867
|
function Jc(t) {
|
|
9845
|
-
var
|
|
9868
|
+
var u;
|
|
9846
9869
|
if ("form" in t && t.form) {
|
|
9847
|
-
const { form:
|
|
9848
|
-
formulaConfig:
|
|
9849
|
-
onFormulaConfigChange:
|
|
9850
|
-
conditionConfig:
|
|
9851
|
-
onConditionConfigChange:
|
|
9870
|
+
const { form: s } = t, l = {
|
|
9871
|
+
formulaConfig: s._formulaConfig,
|
|
9872
|
+
onFormulaConfigChange: s._onFormulaConfigChange,
|
|
9873
|
+
conditionConfig: s._conditionConfig,
|
|
9874
|
+
onConditionConfigChange: s._onConditionConfigChange
|
|
9852
9875
|
};
|
|
9853
|
-
return /* @__PURE__ */ d($t, { ...
|
|
9854
|
-
}
|
|
9855
|
-
const e = {
|
|
9856
|
-
formulaConfig: t.formulaConfig ??
|
|
9857
|
-
onFormulaConfigChange: t.onFormulaConfigChange ??
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
})
|
|
9862
|
-
}, n = t.formik ? /* @__PURE__ */ d($t, { ...e, children: /* @__PURE__ */ d(Cr, { schema: t.schema, formik: t.formik }) }) : /* @__PURE__ */ d(
|
|
9876
|
+
return /* @__PURE__ */ d($t, { ...l, children: /* @__PURE__ */ d(Cr, { schema: s._schema, formik: s._formik }) });
|
|
9877
|
+
}
|
|
9878
|
+
const [e, n] = L({}), [i, r] = L({}), a = {
|
|
9879
|
+
formulaConfig: t.formulaConfig ?? e,
|
|
9880
|
+
onFormulaConfigChange: t.onFormulaConfigChange ?? n,
|
|
9881
|
+
conditionConfig: t.conditionConfig ?? i,
|
|
9882
|
+
onConditionConfigChange: t.onConditionConfigChange ?? r
|
|
9883
|
+
}, o = t.formik ? /* @__PURE__ */ d($t, { ...a, children: /* @__PURE__ */ d(Cr, { schema: t.schema, formik: t.formik }) }) : /* @__PURE__ */ d(
|
|
9863
9884
|
uo,
|
|
9864
9885
|
{
|
|
9865
9886
|
initialValues: t.initialValues,
|
|
9866
9887
|
onSubmit: t.onSubmit,
|
|
9867
|
-
validationSchema: t.validationSchema ?? ((
|
|
9888
|
+
validationSchema: t.validationSchema ?? ((u = t.schema) != null && u.fields ? qi(t.schema.fields) : void 0),
|
|
9868
9889
|
initialTouched: t.initialTouched,
|
|
9869
9890
|
validateOnMount: !!t.initialTouched,
|
|
9870
9891
|
enableReinitialize: !0,
|
|
9871
9892
|
validateOnChange: !0,
|
|
9872
9893
|
validateOnBlur: !0,
|
|
9873
|
-
children: ({ values:
|
|
9874
|
-
var
|
|
9894
|
+
children: ({ values: s, errors: l, touched: c, isSubmitting: f, setFieldValue: g, setFieldTouched: p }) => {
|
|
9895
|
+
var m;
|
|
9875
9896
|
return /* @__PURE__ */ O(co, { id: t.formId, children: [
|
|
9876
9897
|
t.onValuesChange && /* @__PURE__ */ d(Zc, { onValuesChange: t.onValuesChange }),
|
|
9877
9898
|
t.onValidityChange && /* @__PURE__ */ d(_c, { onValidityChange: t.onValidityChange }),
|
|
9878
|
-
/* @__PURE__ */ d($t, { ...
|
|
9899
|
+
/* @__PURE__ */ d($t, { ...a, children: /* @__PURE__ */ d(
|
|
9879
9900
|
io,
|
|
9880
9901
|
{
|
|
9881
9902
|
schema: t.schema,
|
|
9882
|
-
values:
|
|
9883
|
-
errors:
|
|
9884
|
-
touched:
|
|
9885
|
-
setFieldValue:
|
|
9886
|
-
setFieldTouched:
|
|
9903
|
+
values: s,
|
|
9904
|
+
errors: l,
|
|
9905
|
+
touched: c,
|
|
9906
|
+
setFieldValue: g,
|
|
9907
|
+
setFieldTouched: p
|
|
9887
9908
|
}
|
|
9888
9909
|
) }),
|
|
9889
|
-
(
|
|
9910
|
+
(m = t.children) == null ? void 0 : m.call(t, { isSubmitting: f })
|
|
9890
9911
|
] });
|
|
9891
9912
|
}
|
|
9892
9913
|
}
|
|
9893
9914
|
);
|
|
9894
|
-
return t.variableGroups ? /* @__PURE__ */ d(zo, { groups: t.variableGroups, children:
|
|
9915
|
+
return t.variableGroups ? /* @__PURE__ */ d(zo, { groups: t.variableGroups, children: o }) : o;
|
|
9895
9916
|
}
|
|
9896
9917
|
function Cr({
|
|
9897
9918
|
schema: t,
|
|
@@ -9960,7 +9981,7 @@ function ft({
|
|
|
9960
9981
|
inlineLabel: l
|
|
9961
9982
|
}) {
|
|
9962
9983
|
var h;
|
|
9963
|
-
const { formulaConfig: c, onFormulaConfigChange: f, conditionConfig:
|
|
9984
|
+
const { formulaConfig: c, onFormulaConfigChange: f, conditionConfig: g, onConditionConfigChange: p } = kc(), m = { values: i };
|
|
9964
9985
|
return ((h = t.shouldHide) == null ? void 0 : h.call(t, m)) ?? t.hidden ? null : t.type === "object" ? /* @__PURE__ */ d($e, { field: t, compact: s, children: /* @__PURE__ */ d(
|
|
9965
9986
|
Dc,
|
|
9966
9987
|
{
|
|
@@ -9973,21 +9994,21 @@ function ft({
|
|
|
9973
9994
|
setFieldValue: o,
|
|
9974
9995
|
setFieldTouched: u,
|
|
9975
9996
|
compact: s,
|
|
9976
|
-
renderFieldRouter: (
|
|
9997
|
+
renderFieldRouter: (b) => /* @__PURE__ */ d(
|
|
9977
9998
|
ft,
|
|
9978
9999
|
{
|
|
9979
|
-
field:
|
|
9980
|
-
pathPrefix:
|
|
9981
|
-
depth:
|
|
9982
|
-
values:
|
|
9983
|
-
errors:
|
|
9984
|
-
touched:
|
|
9985
|
-
setFieldValue:
|
|
9986
|
-
setFieldTouched:
|
|
9987
|
-
compact:
|
|
9988
|
-
inlineLabel:
|
|
10000
|
+
field: b.field,
|
|
10001
|
+
pathPrefix: b.pathPrefix,
|
|
10002
|
+
depth: b.depth,
|
|
10003
|
+
values: b.values,
|
|
10004
|
+
errors: b.errors,
|
|
10005
|
+
touched: b.touched,
|
|
10006
|
+
setFieldValue: b.setFieldValue,
|
|
10007
|
+
setFieldTouched: b.setFieldTouched,
|
|
10008
|
+
compact: b.compact,
|
|
10009
|
+
inlineLabel: b.inlineLabel
|
|
9989
10010
|
},
|
|
9990
|
-
|
|
10011
|
+
b.pathPrefix
|
|
9991
10012
|
)
|
|
9992
10013
|
}
|
|
9993
10014
|
) }) : t.type === "array" && Array.isArray(t.children ?? t.itemFields) ? /* @__PURE__ */ d($e, { field: t, compact: s, children: /* @__PURE__ */ d(
|
|
@@ -9996,7 +10017,7 @@ function ft({
|
|
|
9996
10017
|
field: t,
|
|
9997
10018
|
value: dt(i, e),
|
|
9998
10019
|
values: i,
|
|
9999
|
-
onChange: (
|
|
10020
|
+
onChange: (b) => o(e, b),
|
|
10000
10021
|
onBlur: () => u(e, !0),
|
|
10001
10022
|
pathPrefix: e,
|
|
10002
10023
|
depth: n,
|
|
@@ -10005,21 +10026,21 @@ function ft({
|
|
|
10005
10026
|
parentTouched: a,
|
|
10006
10027
|
parentSetFieldValue: o,
|
|
10007
10028
|
parentSetFieldTouched: u,
|
|
10008
|
-
renderFieldRouter: (
|
|
10029
|
+
renderFieldRouter: (b) => /* @__PURE__ */ d(
|
|
10009
10030
|
ft,
|
|
10010
10031
|
{
|
|
10011
|
-
field:
|
|
10012
|
-
pathPrefix:
|
|
10013
|
-
depth:
|
|
10014
|
-
values:
|
|
10015
|
-
errors:
|
|
10016
|
-
touched:
|
|
10017
|
-
setFieldValue:
|
|
10018
|
-
setFieldTouched:
|
|
10019
|
-
compact:
|
|
10020
|
-
inlineLabel:
|
|
10032
|
+
field: b.field,
|
|
10033
|
+
pathPrefix: b.pathPrefix,
|
|
10034
|
+
depth: b.depth,
|
|
10035
|
+
values: b.values,
|
|
10036
|
+
errors: b.errors,
|
|
10037
|
+
touched: b.touched,
|
|
10038
|
+
setFieldValue: b.setFieldValue,
|
|
10039
|
+
setFieldTouched: b.setFieldTouched,
|
|
10040
|
+
compact: b.compact,
|
|
10041
|
+
inlineLabel: b.inlineLabel
|
|
10021
10042
|
},
|
|
10022
|
-
|
|
10043
|
+
b.pathPrefix
|
|
10023
10044
|
)
|
|
10024
10045
|
}
|
|
10025
10046
|
) }) : t.type === "tabs" ? /* @__PURE__ */ d($e, { field: t, compact: s, children: /* @__PURE__ */ d(
|
|
@@ -10034,21 +10055,21 @@ function ft({
|
|
|
10034
10055
|
setFieldValue: o,
|
|
10035
10056
|
setFieldTouched: u,
|
|
10036
10057
|
compact: s,
|
|
10037
|
-
renderFieldRouter: (
|
|
10058
|
+
renderFieldRouter: (b) => /* @__PURE__ */ d(
|
|
10038
10059
|
ft,
|
|
10039
10060
|
{
|
|
10040
|
-
field:
|
|
10041
|
-
pathPrefix:
|
|
10042
|
-
depth:
|
|
10043
|
-
values:
|
|
10044
|
-
errors:
|
|
10045
|
-
touched:
|
|
10046
|
-
setFieldValue:
|
|
10047
|
-
setFieldTouched:
|
|
10048
|
-
compact:
|
|
10049
|
-
inlineLabel:
|
|
10061
|
+
field: b.field,
|
|
10062
|
+
pathPrefix: b.pathPrefix,
|
|
10063
|
+
depth: b.depth,
|
|
10064
|
+
values: b.values,
|
|
10065
|
+
errors: b.errors,
|
|
10066
|
+
touched: b.touched,
|
|
10067
|
+
setFieldValue: b.setFieldValue,
|
|
10068
|
+
setFieldTouched: b.setFieldTouched,
|
|
10069
|
+
compact: b.compact,
|
|
10070
|
+
inlineLabel: b.inlineLabel
|
|
10050
10071
|
},
|
|
10051
|
-
|
|
10072
|
+
b.pathPrefix
|
|
10052
10073
|
)
|
|
10053
10074
|
}
|
|
10054
10075
|
) }) : /* @__PURE__ */ d(
|
|
@@ -10065,7 +10086,7 @@ function ft({
|
|
|
10065
10086
|
inlineLabel: l,
|
|
10066
10087
|
formulaConfig: c,
|
|
10067
10088
|
onFormulaConfigChange: f,
|
|
10068
|
-
conditionConfig:
|
|
10089
|
+
conditionConfig: g,
|
|
10069
10090
|
onConditionConfigChange: p
|
|
10070
10091
|
}
|
|
10071
10092
|
);
|
|
@@ -10083,31 +10104,31 @@ function jc({
|
|
|
10083
10104
|
formulaConfig: l,
|
|
10084
10105
|
onFormulaConfigChange: c,
|
|
10085
10106
|
conditionConfig: f,
|
|
10086
|
-
onConditionConfigChange:
|
|
10107
|
+
onConditionConfigChange: g
|
|
10087
10108
|
}) {
|
|
10088
10109
|
var F, D, G;
|
|
10089
10110
|
const p = { values: n }, m = dt(n, e), h = Y(t.compute);
|
|
10090
10111
|
h.current = t.compute, q(() => {
|
|
10091
|
-
const
|
|
10092
|
-
if (!
|
|
10093
|
-
const V =
|
|
10112
|
+
const M = h.current;
|
|
10113
|
+
if (!M) return;
|
|
10114
|
+
const V = M({ values: n });
|
|
10094
10115
|
V !== m && a(e, V);
|
|
10095
10116
|
}, [n, m, e, a]);
|
|
10096
|
-
const
|
|
10097
|
-
if (!
|
|
10117
|
+
const b = te.get(t.type);
|
|
10118
|
+
if (!b)
|
|
10098
10119
|
return null;
|
|
10099
|
-
const v = typeof t.disabled == "function" ? t.disabled(p) : ((F = t.shouldDisable) == null ? void 0 : F.call(t, p)) ?? t.disabled ?? !1, C = dt(i, e), y = !!dt(r, e), I = (D = t.compute) == null ? void 0 : D.call(t, p), x = I !== void 0 ? I : m, E = (G = t.transform) != null && G.in ? t.transform.in(x) : x, S = (
|
|
10120
|
+
const v = typeof t.disabled == "function" ? t.disabled(p) : ((F = t.shouldDisable) == null ? void 0 : F.call(t, p)) ?? t.disabled ?? !1, C = dt(i, e), y = !!dt(r, e), I = (D = t.compute) == null ? void 0 : D.call(t, p), x = I !== void 0 ? I : m, E = (G = t.transform) != null && G.in ? t.transform.in(x) : x, S = (M) => {
|
|
10100
10121
|
var j, U;
|
|
10101
10122
|
if (t.compute) return;
|
|
10102
|
-
const V = (j = t.transform) != null && j.out ? t.transform.out(
|
|
10123
|
+
const V = (j = t.transform) != null && j.out ? t.transform.out(M) : M;
|
|
10103
10124
|
a(e, V), o(e, !0), (U = t.onChange) == null || U.call(t, V, { values: n, setFieldValue: a });
|
|
10104
|
-
}, T = t.condition && f ? f[e] ?? [] : [], B = (
|
|
10105
|
-
if (!(!
|
|
10106
|
-
if (
|
|
10125
|
+
}, T = t.condition && f ? f[e] ?? [] : [], B = (M) => {
|
|
10126
|
+
if (!(!g || !f))
|
|
10127
|
+
if (M.length === 0) {
|
|
10107
10128
|
const V = { ...f };
|
|
10108
|
-
delete V[e],
|
|
10129
|
+
delete V[e], g(V);
|
|
10109
10130
|
} else
|
|
10110
|
-
|
|
10131
|
+
g({ ...f, [e]: M });
|
|
10111
10132
|
}, W = {
|
|
10112
10133
|
field: { ...t, disabled: v, id: e, name: e },
|
|
10113
10134
|
value: E,
|
|
@@ -10119,8 +10140,8 @@ function jc({
|
|
|
10119
10140
|
formulaConfig: l,
|
|
10120
10141
|
onFormulaConfigChange: c
|
|
10121
10142
|
};
|
|
10122
|
-
return s ? /* @__PURE__ */ d(
|
|
10123
|
-
/* @__PURE__ */ d(
|
|
10143
|
+
return s ? /* @__PURE__ */ d(b, { ...W, inlineLabel: !0 }) : /* @__PURE__ */ O($e, { field: t, compact: u, children: [
|
|
10144
|
+
/* @__PURE__ */ d(b, { ...W, touched: y }),
|
|
10124
10145
|
t.condition && /* @__PURE__ */ d(
|
|
10125
10146
|
no,
|
|
10126
10147
|
{
|
|
@@ -10162,7 +10183,7 @@ export {
|
|
|
10162
10183
|
Go as m,
|
|
10163
10184
|
te as n,
|
|
10164
10185
|
sd as o,
|
|
10165
|
-
|
|
10186
|
+
ue as p,
|
|
10166
10187
|
rd as q,
|
|
10167
10188
|
ud as r,
|
|
10168
10189
|
we as s,
|