@notmrabhi/flowforge 0.1.31 → 0.1.32
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-4ubE7KhK.js → SchemaBuilderDrawer-B1dLgTM1.js} +1 -1
- package/dist/{SchemaBuilderDrawer-CC0gkAU_.js → SchemaBuilderDrawer-CkUfYbGB.js} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +26 -0
- package/dist/canvas.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +13 -0
- package/dist/core.js +22 -23
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +22 -0
- package/dist/form.js +2 -2
- package/dist/{index-DyXSbNQ1.js → index-8bqYHvzi.js} +989 -972
- package/dist/{index-BsJvlQWO.js → index-BAg_DA8n.js} +4 -4
- package/dist/{index-LWDTj1BM.js → index-BAiSdZW3.js} +1 -1
- package/dist/{index-DwTs1qiP.js → index-DNDp8nLT.js} +1 -1
- package/dist/{index-CH_7c8r7.js → index-Dlw7CMau.js} +1 -1
- package/dist/{index-D1D2Okji.js → index-Dpl-Q8a4.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.js +50 -51
- package/dist/nodeRegistry.cjs +1 -1
- package/dist/nodeRegistry.d.ts +13 -0
- package/dist/nodeRegistry.js +543 -23
- package/dist/{templateSkeletons-x31LuHLb.js → templateSkeletons-B5x8nV9i.js} +1 -1
- package/dist/{templateSkeletons-DOVpyZef.js → templateSkeletons-BdFN__gr.js} +3 -3
- package/package.json +1 -1
- package/dist/index-BeZylHBB.js +0 -43
- package/dist/index-BrJBVztu.js +0 -1
- package/dist/index-CUQQVdoY.js +0 -1
- package/dist/index-Dcur-XJ9.js +0 -35
- package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -534
- package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as O, jsx as d, Fragment as Ve } from "react/jsx-runtime";
|
|
2
2
|
import * as K from "react";
|
|
3
3
|
import Qe, { createContext as Et, useContext as Ot, useState as L, useRef as H, useCallback as z, useEffect as q, useMemo as ae, useLayoutEffect as go, Component as Fr, Fragment as qt, forwardRef as Ft, Suspense as wr, useImperativeHandle as bo } from "react";
|
|
4
4
|
import { FormikProvider as Pn, Formik as ho, Form as mo, useField as vo, useFormikContext as wt } from "formik";
|
|
@@ -293,7 +293,7 @@ function yd(n) {
|
|
|
293
293
|
return n.replace(/_DE_\{_P\('[^']*'\)\}/g, "");
|
|
294
294
|
}
|
|
295
295
|
function le({ label: n, required: e, showOptional: t, info: i, htmlFor: r, dataTestId: a }) {
|
|
296
|
-
return n ? /* @__PURE__ */
|
|
296
|
+
return n ? /* @__PURE__ */ O(
|
|
297
297
|
"label",
|
|
298
298
|
{
|
|
299
299
|
htmlFor: r,
|
|
@@ -349,31 +349,31 @@ const _r = Et(null);
|
|
|
349
349
|
function jo({ groups: n, children: e }) {
|
|
350
350
|
const [t, i] = L(!1), [r, a] = L(null), [o, u] = L(null), s = H(null), l = H(0), c = z(() => i(!0), []), f = z(() => {
|
|
351
351
|
i(!1), u(null);
|
|
352
|
-
}, []), g = z((
|
|
353
|
-
|
|
354
|
-
}, []), p = z((
|
|
355
|
-
s.current =
|
|
356
|
-
}, []),
|
|
357
|
-
s.current && (s.current.savedRange =
|
|
358
|
-
}, []), b = z((
|
|
359
|
-
const
|
|
360
|
-
if (!
|
|
361
|
-
if (
|
|
362
|
-
|
|
352
|
+
}, []), g = z((v, I) => {
|
|
353
|
+
v ? (l.current += 1, I && u(I)) : (l.current = Math.max(0, l.current - 1), l.current === 0 && (i(!1), u(null)));
|
|
354
|
+
}, []), p = z((v) => {
|
|
355
|
+
s.current = v, a(v.fieldId);
|
|
356
|
+
}, []), m = z((v) => {
|
|
357
|
+
s.current && (s.current.savedRange = v);
|
|
358
|
+
}, []), b = z((v, I) => {
|
|
359
|
+
const C = s.current;
|
|
360
|
+
if (!C) return;
|
|
361
|
+
if (C.onInsert) {
|
|
362
|
+
C.onInsert(v, I);
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
if (!
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
let
|
|
370
|
-
if (!
|
|
365
|
+
const y = C.editorRef.current;
|
|
366
|
+
if (!y) return;
|
|
367
|
+
y.focus();
|
|
368
|
+
const h = $o(v, I);
|
|
369
|
+
let x = C.savedRange;
|
|
370
|
+
if (!x) {
|
|
371
371
|
const S = window.getSelection();
|
|
372
|
-
S && S.rangeCount > 0 && (
|
|
372
|
+
S && S.rangeCount > 0 && (x = S.getRangeAt(0), y.contains(x.commonAncestorContainer) || (x = null));
|
|
373
373
|
}
|
|
374
|
-
|
|
375
|
-
const
|
|
376
|
-
|
|
374
|
+
x || (x = document.createRange(), x.selectNodeContents(y), x.collapse(!1)), x.deleteContents(), x.insertNode(h), x.setStartAfter(h), x.collapse(!0);
|
|
375
|
+
const R = window.getSelection();
|
|
376
|
+
R == null || R.removeAllRanges(), R == null || R.addRange(x), s.current && (s.current.savedRange = x.cloneRange()), y.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
377
377
|
}, []);
|
|
378
378
|
return /* @__PURE__ */ d(_r.Provider, { value: {
|
|
379
379
|
groups: n,
|
|
@@ -382,11 +382,11 @@ function jo({ groups: n, children: e }) {
|
|
|
382
382
|
closePicker: f,
|
|
383
383
|
notifyFormulaToggle: g,
|
|
384
384
|
registerField: p,
|
|
385
|
-
saveRange:
|
|
385
|
+
saveRange: m,
|
|
386
386
|
insertVariable: b,
|
|
387
387
|
activeFieldId: r,
|
|
388
|
-
notifyFieldFocus: (
|
|
389
|
-
a(
|
|
388
|
+
notifyFieldFocus: (v, I) => {
|
|
389
|
+
a(v), I && u(I), i(!0);
|
|
390
390
|
},
|
|
391
391
|
anchorEl: o
|
|
392
392
|
}, children: e });
|
|
@@ -430,7 +430,7 @@ function Uo({ item: n }) {
|
|
|
430
430
|
boxShadow: "0 2px 8px rgba(99,102,241,0.25)"
|
|
431
431
|
}), document.body.appendChild(o), a.dataTransfer.setDragImage(o, o.offsetWidth / 2, o.offsetHeight / 2), requestAnimationFrame(() => document.body.removeChild(o)), i(!0);
|
|
432
432
|
};
|
|
433
|
-
return /* @__PURE__ */ d(Se, { title: n.path, placement: "left", enterDelay: 600, children: /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ d(Se, { title: n.path, placement: "left", enterDelay: 600, children: /* @__PURE__ */ O(
|
|
434
434
|
N,
|
|
435
435
|
{
|
|
436
436
|
draggable: !0,
|
|
@@ -458,7 +458,7 @@ function Uo({ item: n }) {
|
|
|
458
458
|
display: "flex",
|
|
459
459
|
alignItems: "center"
|
|
460
460
|
}, children: /* @__PURE__ */ d(Tt, { size: 14 }) }),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ O(N, { sx: { minWidth: 0 }, children: [
|
|
462
462
|
/* @__PURE__ */ d(de, { sx: {
|
|
463
463
|
fontSize: 13,
|
|
464
464
|
fontWeight: 500,
|
|
@@ -486,8 +486,8 @@ function Yr({
|
|
|
486
486
|
const a = Cn(n.items).filter((o) => !o.children);
|
|
487
487
|
return e ? a.filter((o) => Jr(o, e)) : n.items;
|
|
488
488
|
}, [n.items, e]);
|
|
489
|
-
return e && r.length === 0 ? null : /* @__PURE__ */
|
|
490
|
-
!e && /* @__PURE__ */
|
|
489
|
+
return e && r.length === 0 ? null : /* @__PURE__ */ O(N, { children: [
|
|
490
|
+
!e && /* @__PURE__ */ O(
|
|
491
491
|
N,
|
|
492
492
|
{
|
|
493
493
|
onClick: () => i((a) => !a),
|
|
@@ -543,9 +543,9 @@ function Cd({
|
|
|
543
543
|
if (q(() => {
|
|
544
544
|
if (t !== "popover" || !(i != null && i.isOpen)) return;
|
|
545
545
|
function f(g) {
|
|
546
|
-
var
|
|
547
|
-
const p = g.target,
|
|
548
|
-
!
|
|
546
|
+
var v, I;
|
|
547
|
+
const p = g.target, m = (v = s.current) == null ? void 0 : v.contains(p), b = (I = i == null ? void 0 : i.anchorEl) == null ? void 0 : I.contains(p);
|
|
548
|
+
!m && !b && (i == null || i.closePicker());
|
|
549
549
|
}
|
|
550
550
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
551
551
|
}, [t, i == null ? void 0 : i.isOpen, i == null ? void 0 : i.anchorEl, i]), q(() => {
|
|
@@ -553,10 +553,10 @@ function Cd({
|
|
|
553
553
|
u(null);
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
|
-
const f = i.anchorEl.getBoundingClientRect(), g = n, p = 440,
|
|
557
|
-
u({ top:
|
|
556
|
+
const f = i.anchorEl.getBoundingClientRect(), g = n, p = 440, m = i.anchorEl.closest(".MuiDrawer-paper") || i.anchorEl.closest(".MuiDialog-paper") || i.anchorEl.closest(".MuiPaper-root"), b = m ? m.getBoundingClientRect() : f, v = b.left - 8, I = window.innerWidth - b.right - 8, C = v >= g ? b.left - g - 8 : I >= g ? b.right + 8 : Math.max(8, b.left - g - 8), y = f.top, h = Math.min(y, window.innerHeight - p - 8);
|
|
557
|
+
u({ top: h, left: C });
|
|
558
558
|
}, [t, i == null ? void 0 : i.anchorEl, i == null ? void 0 : i.isOpen, n]), !i || t === "popover" && !i.isOpen) return null;
|
|
559
|
-
const l = i.groups.some((f) => r ? Cn(f.items).some((g) => !g.children && Jr(g, r)) : !0), c = /* @__PURE__ */
|
|
559
|
+
const l = i.groups.some((f) => r ? Cn(f.items).some((g) => !g.children && Jr(g, r)) : !0), c = /* @__PURE__ */ O(
|
|
560
560
|
N,
|
|
561
561
|
{
|
|
562
562
|
ref: s,
|
|
@@ -575,7 +575,7 @@ function Cd({
|
|
|
575
575
|
...t === "popover" && o ? { position: "fixed", top: o.top, left: o.left, zIndex: 1400 } : t === "popover" ? { display: "none" } : {}
|
|
576
576
|
},
|
|
577
577
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ O(N, { sx: {
|
|
579
579
|
display: "flex",
|
|
580
580
|
alignItems: "center",
|
|
581
581
|
gap: 1,
|
|
@@ -607,7 +607,7 @@ function Cd({
|
|
|
607
607
|
}
|
|
608
608
|
)
|
|
609
609
|
] }),
|
|
610
|
-
/* @__PURE__ */ d(N, { sx: { px: 1.5, py: 1, flexShrink: 0 }, children: /* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ d(N, { sx: { px: 1.5, py: 1, flexShrink: 0 }, children: /* @__PURE__ */ O(N, { sx: {
|
|
611
611
|
display: "flex",
|
|
612
612
|
alignItems: "center",
|
|
613
613
|
gap: 0.75,
|
|
@@ -663,7 +663,7 @@ function Cd({
|
|
|
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, g) => /* @__PURE__ */ d(Yr, { group: f, searchQuery: r }, g)) : /* @__PURE__ */ d(N, { sx: { px: 2, py: 3, textAlign: "center" }, children: /* @__PURE__ */
|
|
666
|
+
}, children: l ? i.groups.map((f, g) => /* @__PURE__ */ d(Yr, { group: f, searchQuery: r }, g)) : /* @__PURE__ */ d(N, { sx: { px: 2, py: 3, textAlign: "center" }, children: /* @__PURE__ */ O(de, { sx: { fontSize: 12, color: "#475569" }, children: [
|
|
667
667
|
'No variables match "',
|
|
668
668
|
r,
|
|
669
669
|
'"'
|
|
@@ -729,22 +729,22 @@ function $r({
|
|
|
729
729
|
onPickerOpen: l,
|
|
730
730
|
compact: c
|
|
731
731
|
}) {
|
|
732
|
-
const f = H(null), g = H(null), p = H(""),
|
|
732
|
+
const f = H(null), g = H(null), p = H(""), m = H(!1), b = n.length === 0 || n.length === 1 && n[0].type === "text" && !n[0].value, v = Ke(), [I, C] = L(null), [y, h] = L(!1);
|
|
733
733
|
q(() => {
|
|
734
|
-
const
|
|
735
|
-
if (!
|
|
734
|
+
const E = f.current;
|
|
735
|
+
if (!E) return;
|
|
736
736
|
const P = Ge(n), Z = `${u ? "1" : "0"}:${P}`;
|
|
737
737
|
if (Z === p.current) return;
|
|
738
738
|
const w = /* @__PURE__ */ new Map();
|
|
739
|
-
if (
|
|
739
|
+
if (v != null && v.groups) {
|
|
740
740
|
const _ = (oe) => {
|
|
741
741
|
for (const he of oe)
|
|
742
742
|
he.path && w.set(he.path, he.label), he.children && _(he.children);
|
|
743
743
|
};
|
|
744
|
-
for (const oe of
|
|
744
|
+
for (const oe of v.groups) _(oe.items);
|
|
745
745
|
}
|
|
746
746
|
const k = /* @__PURE__ */ new Map();
|
|
747
|
-
|
|
747
|
+
E.querySelectorAll("[data-path]").forEach((_) => {
|
|
748
748
|
_.dataset.path && _.dataset.label && k.set(_.dataset.path, _.dataset.label);
|
|
749
749
|
});
|
|
750
750
|
const $ = Hr(n, u).map((_) => {
|
|
@@ -752,67 +752,67 @@ function $r({
|
|
|
752
752
|
const oe = k.get(_.path) ?? w.get(_.path) ?? _.label;
|
|
753
753
|
return { ..._, label: oe };
|
|
754
754
|
});
|
|
755
|
-
qo(
|
|
756
|
-
}, [n, u,
|
|
757
|
-
const
|
|
758
|
-
const
|
|
759
|
-
if (!
|
|
760
|
-
const P = Qo(
|
|
755
|
+
qo(E, $), p.current = Z;
|
|
756
|
+
}, [n, u, v == null ? void 0 : v.groups]);
|
|
757
|
+
const x = z(() => {
|
|
758
|
+
const E = f.current;
|
|
759
|
+
if (!E) return;
|
|
760
|
+
const P = Qo(E), Z = Te(P, u), w = `${u ? "1" : "0"}:${Ge(Z)}`;
|
|
761
761
|
w !== p.current && (p.current = w, e(Z));
|
|
762
|
-
}, [e, u]),
|
|
763
|
-
|
|
764
|
-
}, [
|
|
765
|
-
|
|
766
|
-
const P =
|
|
762
|
+
}, [e, u]), R = z(() => {
|
|
763
|
+
m.current || x();
|
|
764
|
+
}, [x]), S = z((E) => {
|
|
765
|
+
E.preventDefault();
|
|
766
|
+
const P = E.clipboardData.getData("text/plain"), Z = window.getSelection();
|
|
767
767
|
if (!(Z != null && Z.rangeCount)) return;
|
|
768
768
|
const w = Z.getRangeAt(0);
|
|
769
|
-
w.deleteContents(), w.insertNode(Ko(_o(P, u))), w.collapse(!1), Z.removeAllRanges(), Z.addRange(w),
|
|
770
|
-
}, [
|
|
769
|
+
w.deleteContents(), w.insertNode(Ko(_o(P, u))), w.collapse(!1), Z.removeAllRanges(), Z.addRange(w), x();
|
|
770
|
+
}, [x, u]), T = z((E) => {
|
|
771
771
|
const P = window.getSelection();
|
|
772
772
|
if (!(P != null && P.rangeCount)) return;
|
|
773
773
|
const Z = Mn(P.getRangeAt(0).cloneContents());
|
|
774
|
-
Z && (
|
|
775
|
-
}, []), B = z((
|
|
774
|
+
Z && (E.clipboardData.setData("text/plain", Z), E.preventDefault());
|
|
775
|
+
}, []), B = z((E) => {
|
|
776
776
|
const P = window.getSelection();
|
|
777
777
|
if (!(P != null && P.rangeCount)) return;
|
|
778
778
|
const Z = P.getRangeAt(0), w = Mn(Z.cloneContents());
|
|
779
|
-
w && (
|
|
780
|
-
}, [
|
|
781
|
-
|
|
782
|
-
}, []), F = z((
|
|
779
|
+
w && (E.clipboardData.setData("text/plain", w), E.preventDefault(), Z.deleteContents(), x());
|
|
780
|
+
}, [x]), M = z((E) => {
|
|
781
|
+
E.key === "Enter" && E.preventDefault();
|
|
782
|
+
}, []), F = z((E, P) => {
|
|
783
783
|
const Z = f.current;
|
|
784
784
|
if (!Z) return;
|
|
785
785
|
Z.focus();
|
|
786
786
|
const w = window.getSelection();
|
|
787
787
|
let k = null;
|
|
788
788
|
w && w.rangeCount > 0 && Z.contains(w.getRangeAt(0).commonAncestorContainer) ? k = w.getRangeAt(0) : (k = document.createRange(), k.selectNodeContents(Z), k.collapse(!1));
|
|
789
|
-
const $ = Wn(
|
|
790
|
-
k.deleteContents(), k.insertNode($), k.setStartAfter($), k.collapse(!0), w == null || w.removeAllRanges(), w == null || w.addRange(k),
|
|
791
|
-
}, [
|
|
792
|
-
!
|
|
793
|
-
}, [
|
|
789
|
+
const $ = Wn(E, P);
|
|
790
|
+
k.deleteContents(), k.insertNode($), k.setStartAfter($), k.collapse(!0), w == null || w.removeAllRanges(), w == null || w.addRange(k), x();
|
|
791
|
+
}, [x]), D = z(() => {
|
|
792
|
+
!v || !o || (v.registerField({ editorRef: f, savedRange: null, fieldId: o, onInsert: F }), v.notifyFieldFocus(o, f.current));
|
|
793
|
+
}, [v, o, F]), G = z(() => {
|
|
794
794
|
var P;
|
|
795
|
-
if (!
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
}, [
|
|
795
|
+
if (!v) return;
|
|
796
|
+
const E = window.getSelection();
|
|
797
|
+
E && E.rangeCount > 0 && ((P = f.current) != null && P.contains(E.anchorNode)) && v.saveRange(E.getRangeAt(0).cloneRange());
|
|
798
|
+
}, [v]);
|
|
799
799
|
q(() => {
|
|
800
800
|
document.addEventListener("selectionchange", G);
|
|
801
|
-
const
|
|
802
|
-
return
|
|
803
|
-
document.removeEventListener("selectionchange", G),
|
|
801
|
+
const E = f.current;
|
|
802
|
+
return E && E.addEventListener("input", R), () => {
|
|
803
|
+
document.removeEventListener("selectionchange", G), E && E.removeEventListener("input", R);
|
|
804
804
|
};
|
|
805
|
-
}, [G,
|
|
806
|
-
const
|
|
807
|
-
r || !
|
|
805
|
+
}, [G, R]);
|
|
806
|
+
const W = z((E) => {
|
|
807
|
+
r || !E.dataTransfer.types.includes(Kt) || (E.preventDefault(), E.dataTransfer.dropEffect = "copy", C("valid"));
|
|
808
808
|
}, [r]), V = z(() => {
|
|
809
|
-
|
|
810
|
-
}, []), j = z((
|
|
811
|
-
if (
|
|
812
|
-
|
|
809
|
+
C(null);
|
|
810
|
+
}, []), j = z((E) => {
|
|
811
|
+
if (E.preventDefault(), C(null), r) {
|
|
812
|
+
h(!0);
|
|
813
813
|
return;
|
|
814
814
|
}
|
|
815
|
-
const P =
|
|
815
|
+
const P = E.dataTransfer.getData(Kt);
|
|
816
816
|
if (!P) return;
|
|
817
817
|
let Z;
|
|
818
818
|
try {
|
|
@@ -820,7 +820,7 @@ function $r({
|
|
|
820
820
|
} catch {
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
|
-
const w = ea(
|
|
823
|
+
const w = ea(E.clientX, E.clientY);
|
|
824
824
|
if (!w) return;
|
|
825
825
|
const k = f.current;
|
|
826
826
|
if (!k || !k.contains(w.commonAncestorContainer)) return;
|
|
@@ -828,9 +828,9 @@ function $r({
|
|
|
828
828
|
w.deleteContents(), w.insertNode($), w.setStartAfter($), w.collapse(!0);
|
|
829
829
|
const _ = window.getSelection();
|
|
830
830
|
_ == null || _.removeAllRanges(), _ == null || _.addRange(w), k.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
831
|
-
}, [r]),
|
|
832
|
-
return /* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
831
|
+
}, [r]), Q = (s ? 1 : 0) + (l ? 1 : 0), U = Q > 0 ? `${Q * 30 + 8}px` : "12px", re = I === "valid" ? "#16a34a" : I === "invalid" || a ? "#d32f2f" : "rgba(0,0,0,0.23)", ie = I === "valid" ? "0 0 0 2px rgba(22,163,74,0.2)" : I === "invalid" ? "0 0 0 2px rgba(211,47,47,0.2)" : void 0;
|
|
832
|
+
return /* @__PURE__ */ O(N, { sx: { position: "relative" }, children: [
|
|
833
|
+
/* @__PURE__ */ O(
|
|
834
834
|
N,
|
|
835
835
|
{
|
|
836
836
|
sx: {
|
|
@@ -841,20 +841,20 @@ function $r({
|
|
|
841
841
|
alignItems: "center",
|
|
842
842
|
pl: 1,
|
|
843
843
|
py: "6px",
|
|
844
|
-
pr:
|
|
844
|
+
pr: U,
|
|
845
845
|
overflow: "hidden"
|
|
846
846
|
} : {
|
|
847
847
|
display: "flex",
|
|
848
848
|
alignItems: "center",
|
|
849
849
|
pl: 1.5,
|
|
850
850
|
py: "6px",
|
|
851
|
-
pr:
|
|
851
|
+
pr: U,
|
|
852
852
|
overflow: "hidden"
|
|
853
853
|
},
|
|
854
854
|
fontSize: c ? 13 : 14,
|
|
855
855
|
lineHeight: 1.5,
|
|
856
856
|
cursor: r ? "not-allowed" : "text",
|
|
857
|
-
bgcolor:
|
|
857
|
+
bgcolor: I === "valid" ? "rgba(22,163,74,0.04)" : r ? "rgba(0,0,0,0.04)" : "#fff",
|
|
858
858
|
transition: "border-color 0.15s, box-shadow 0.15s, background 0.15s",
|
|
859
859
|
boxShadow: ie,
|
|
860
860
|
"&:focus-within": {
|
|
@@ -862,12 +862,12 @@ function $r({
|
|
|
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: W,
|
|
866
866
|
onDragLeave: V,
|
|
867
867
|
onDrop: j,
|
|
868
868
|
onClick: () => {
|
|
869
|
-
var
|
|
870
|
-
r || (
|
|
869
|
+
var E;
|
|
870
|
+
r || (E = f.current) == null || E.focus();
|
|
871
871
|
},
|
|
872
872
|
children: [
|
|
873
873
|
b && i && /* @__PURE__ */ d(
|
|
@@ -879,7 +879,7 @@ function $r({
|
|
|
879
879
|
top: "50%",
|
|
880
880
|
transform: "translateY(-50%)",
|
|
881
881
|
left: c ? 8 : 14,
|
|
882
|
-
right:
|
|
882
|
+
right: U,
|
|
883
883
|
// prevent overflow into action buttons
|
|
884
884
|
fontSize: c ? 13 : 14,
|
|
885
885
|
color: "rgba(0,0,0,0.38)",
|
|
@@ -903,14 +903,14 @@ function $r({
|
|
|
903
903
|
onPaste: S,
|
|
904
904
|
onCopy: T,
|
|
905
905
|
onCut: B,
|
|
906
|
-
onKeyDown:
|
|
906
|
+
onKeyDown: M,
|
|
907
907
|
onFocus: D,
|
|
908
908
|
onBlur: t,
|
|
909
909
|
onCompositionStart: () => {
|
|
910
|
-
|
|
910
|
+
m.current = !0;
|
|
911
911
|
},
|
|
912
912
|
onCompositionEnd: () => {
|
|
913
|
-
|
|
913
|
+
m.current = !1, x();
|
|
914
914
|
},
|
|
915
915
|
style: {
|
|
916
916
|
outline: "none",
|
|
@@ -926,7 +926,7 @@ function $r({
|
|
|
926
926
|
]
|
|
927
927
|
}
|
|
928
928
|
),
|
|
929
|
-
|
|
929
|
+
Q > 0 && !r && /* @__PURE__ */ O(N, { sx: {
|
|
930
930
|
position: "absolute",
|
|
931
931
|
right: 4,
|
|
932
932
|
top: "50%",
|
|
@@ -946,10 +946,10 @@ function $r({
|
|
|
946
946
|
component: "button",
|
|
947
947
|
type: "button",
|
|
948
948
|
ref: g,
|
|
949
|
-
onClick: (
|
|
950
|
-
|
|
949
|
+
onClick: (E) => {
|
|
950
|
+
E.stopPropagation();
|
|
951
951
|
const P = !u;
|
|
952
|
-
|
|
952
|
+
v == null || v.notifyFormulaToggle(P, P ? g.current : null), s();
|
|
953
953
|
},
|
|
954
954
|
sx: {
|
|
955
955
|
border: "none",
|
|
@@ -975,8 +975,8 @@ function $r({
|
|
|
975
975
|
{
|
|
976
976
|
component: "button",
|
|
977
977
|
type: "button",
|
|
978
|
-
onClick: (
|
|
979
|
-
|
|
978
|
+
onClick: (E) => {
|
|
979
|
+
E.stopPropagation(), l();
|
|
980
980
|
},
|
|
981
981
|
sx: {
|
|
982
982
|
background: "none",
|
|
@@ -999,11 +999,11 @@ function $r({
|
|
|
999
999
|
/* @__PURE__ */ d(
|
|
1000
1000
|
Eo,
|
|
1001
1001
|
{
|
|
1002
|
-
open:
|
|
1002
|
+
open: y,
|
|
1003
1003
|
autoHideDuration: 3e3,
|
|
1004
|
-
onClose: () =>
|
|
1004
|
+
onClose: () => h(!1),
|
|
1005
1005
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
1006
|
-
children: /* @__PURE__ */ d(Oo, { severity: "error", onClose: () =>
|
|
1006
|
+
children: /* @__PURE__ */ d(Oo, { severity: "error", onClose: () => h(!1), sx: { fontSize: 13 }, children: "This field is disabled — cannot insert variable" })
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
] });
|
|
@@ -1033,35 +1033,35 @@ function Ur({
|
|
|
1033
1033
|
onFormulaConfigChange: u,
|
|
1034
1034
|
inlineLabel: s
|
|
1035
1035
|
}) {
|
|
1036
|
-
const l = { ...n, multiline: n.multiline || n.type === "textarea" }, c = l.id ?? l.name ?? "", f = l.formula === !0, g = Ke(), [p,
|
|
1036
|
+
const l = { ...n, multiline: n.multiline || n.type === "textarea" }, c = l.id ?? l.name ?? "", f = l.formula === !0, g = Ke(), [p, m] = L(
|
|
1037
1037
|
() => f && c in (o ?? {})
|
|
1038
1038
|
), b = H(p);
|
|
1039
1039
|
b.current = p, q(() => () => {
|
|
1040
1040
|
b.current && (g == null || g.notifyFormulaToggle(!1));
|
|
1041
1041
|
}, []);
|
|
1042
|
-
const [
|
|
1042
|
+
const [v, I] = L(
|
|
1043
1043
|
() => f ? Te(String(e ?? ""), c in (o ?? {})) : []
|
|
1044
|
-
), [
|
|
1044
|
+
), [C, y] = L(() => String(e ?? "")), h = H(e);
|
|
1045
1045
|
q(() => {
|
|
1046
|
-
if (e ===
|
|
1047
|
-
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1046
|
+
if (e === h.current) return;
|
|
1047
|
+
h.current = e;
|
|
1048
|
+
const E = String(e ?? "");
|
|
1049
|
+
y(E), f && I(Te(E, p));
|
|
1050
1050
|
}, [e]);
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1053
|
-
const P = p ? bt(
|
|
1054
|
-
|
|
1055
|
-
},
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1058
|
-
const P = Ge(
|
|
1059
|
-
|
|
1051
|
+
const x = (E) => {
|
|
1052
|
+
I(E);
|
|
1053
|
+
const P = p ? bt(E) : Ge(E);
|
|
1054
|
+
h.current = P, t(P);
|
|
1055
|
+
}, R = () => {
|
|
1056
|
+
const E = !p;
|
|
1057
|
+
if (m(E), E) {
|
|
1058
|
+
const P = Ge(v), Z = Te(P, !0);
|
|
1059
|
+
I(Z);
|
|
1060
1060
|
const w = bt(Z);
|
|
1061
|
-
|
|
1061
|
+
h.current = w, t(w), u == null || u({ ...o, [c]: Mr() });
|
|
1062
1062
|
} else {
|
|
1063
|
-
const P = Ge(
|
|
1064
|
-
|
|
1063
|
+
const P = Ge(v);
|
|
1064
|
+
h.current = P, t(P);
|
|
1065
1065
|
const Z = { ...o };
|
|
1066
1066
|
delete Z[c], u == null || u(Z);
|
|
1067
1067
|
}
|
|
@@ -1077,34 +1077,34 @@ function Ur({
|
|
|
1077
1077
|
}
|
|
1078
1078
|
);
|
|
1079
1079
|
if (f) {
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1080
|
+
const E = l.helperText && !s ? /* @__PURE__ */ d("small", { style: ue, children: l.helperText }) : null, P = /* @__PURE__ */ O(Ve, { children: [
|
|
1081
|
+
E,
|
|
1082
1082
|
/* @__PURE__ */ d(
|
|
1083
1083
|
$r,
|
|
1084
1084
|
{
|
|
1085
1085
|
id: c,
|
|
1086
|
-
expression:
|
|
1087
|
-
onExpressionChange:
|
|
1086
|
+
expression: v,
|
|
1087
|
+
onExpressionChange: x,
|
|
1088
1088
|
onBlur: i,
|
|
1089
1089
|
placeholder: l.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
1090
1090
|
disabled: T,
|
|
1091
1091
|
error: S,
|
|
1092
1092
|
formulaConfigEnabled: p,
|
|
1093
|
-
onFormulaConfigToggle:
|
|
1093
|
+
onFormulaConfigToggle: R,
|
|
1094
1094
|
compact: l.compact
|
|
1095
1095
|
}
|
|
1096
1096
|
),
|
|
1097
1097
|
S && /* @__PURE__ */ d("small", { "data-testid": `${c}-error`, style: fe, children: r })
|
|
1098
1098
|
] });
|
|
1099
|
-
return s ? /* @__PURE__ */
|
|
1099
|
+
return s ? /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "3px 0" }, children: [
|
|
1100
1100
|
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children: B }),
|
|
1101
1101
|
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: P })
|
|
1102
|
-
] }) : /* @__PURE__ */
|
|
1102
|
+
] }) : /* @__PURE__ */ O("div", { children: [
|
|
1103
1103
|
B,
|
|
1104
1104
|
P
|
|
1105
1105
|
] });
|
|
1106
1106
|
}
|
|
1107
|
-
const
|
|
1107
|
+
const M = !!l.prefix, F = !!l.suffix, D = !!l.copyable, G = F || D, W = {
|
|
1108
1108
|
width: "100%",
|
|
1109
1109
|
fontSize: 14,
|
|
1110
1110
|
color: "#374151",
|
|
@@ -1114,7 +1114,7 @@ function Ur({
|
|
|
1114
1114
|
outline: "none",
|
|
1115
1115
|
paddingTop: l.multiline ? "8px" : "6px",
|
|
1116
1116
|
paddingBottom: l.multiline ? "8px" : "6px",
|
|
1117
|
-
paddingLeft:
|
|
1117
|
+
paddingLeft: M ? 0 : "12px",
|
|
1118
1118
|
paddingRight: G ? 0 : "12px",
|
|
1119
1119
|
boxSizing: "border-box",
|
|
1120
1120
|
lineHeight: 1.5,
|
|
@@ -1137,7 +1137,7 @@ function Ur({
|
|
|
1137
1137
|
fontSize: 13,
|
|
1138
1138
|
whiteSpace: "nowrap",
|
|
1139
1139
|
flexShrink: 0
|
|
1140
|
-
},
|
|
1140
|
+
}, Q = {
|
|
1141
1141
|
flex: 1,
|
|
1142
1142
|
minHeight: 0,
|
|
1143
1143
|
border: "none",
|
|
@@ -1150,26 +1150,26 @@ function Ur({
|
|
|
1150
1150
|
resize: l.multiline ? "vertical" : "none",
|
|
1151
1151
|
boxSizing: "border-box",
|
|
1152
1152
|
lineHeight: 1.5
|
|
1153
|
-
}, re =
|
|
1153
|
+
}, re = M || G ? /* @__PURE__ */ O(
|
|
1154
1154
|
"div",
|
|
1155
1155
|
{
|
|
1156
1156
|
style: V,
|
|
1157
|
-
onFocus: (
|
|
1158
|
-
|
|
1157
|
+
onFocus: (E) => {
|
|
1158
|
+
E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? A.FOCUS_SHADOW_ERROR : A.FOCUS_SHADOW;
|
|
1159
1159
|
},
|
|
1160
|
-
onBlur: (
|
|
1161
|
-
|
|
1160
|
+
onBlur: (E) => {
|
|
1161
|
+
E.currentTarget.contains(E.relatedTarget) || (E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR, E.currentTarget.style.boxShadow = "none");
|
|
1162
1162
|
},
|
|
1163
1163
|
children: [
|
|
1164
|
-
|
|
1164
|
+
M && /* @__PURE__ */ d("span", { style: j, children: l.prefix }),
|
|
1165
1165
|
l.multiline ? /* @__PURE__ */ d(
|
|
1166
1166
|
"textarea",
|
|
1167
1167
|
{
|
|
1168
1168
|
id: c,
|
|
1169
1169
|
name: c,
|
|
1170
|
-
style: { ...
|
|
1170
|
+
style: { ...Q, minHeight: 72 },
|
|
1171
1171
|
placeholder: l.placeholder ?? "",
|
|
1172
|
-
value:
|
|
1172
|
+
value: C,
|
|
1173
1173
|
disabled: T,
|
|
1174
1174
|
readOnly: l.readOnly,
|
|
1175
1175
|
rows: l.rows ?? 3,
|
|
@@ -1180,8 +1180,8 @@ function Ur({
|
|
|
1180
1180
|
"aria-describedby": l.ariaDescribedBy,
|
|
1181
1181
|
"aria-required": l.required || void 0,
|
|
1182
1182
|
"aria-invalid": S || void 0,
|
|
1183
|
-
onChange: (
|
|
1184
|
-
|
|
1183
|
+
onChange: (E) => {
|
|
1184
|
+
y(E.target.value), h.current = E.target.value, t(E.target.value);
|
|
1185
1185
|
},
|
|
1186
1186
|
onBlur: i
|
|
1187
1187
|
}
|
|
@@ -1191,9 +1191,9 @@ function Ur({
|
|
|
1191
1191
|
id: c,
|
|
1192
1192
|
name: c,
|
|
1193
1193
|
type: l.inputType ?? "text",
|
|
1194
|
-
style:
|
|
1194
|
+
style: Q,
|
|
1195
1195
|
placeholder: l.placeholder ?? "",
|
|
1196
|
-
value:
|
|
1196
|
+
value: C,
|
|
1197
1197
|
disabled: T,
|
|
1198
1198
|
readOnly: l.readOnly,
|
|
1199
1199
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1203,8 +1203,8 @@ function Ur({
|
|
|
1203
1203
|
"aria-describedby": l.ariaDescribedBy,
|
|
1204
1204
|
"aria-required": l.required || void 0,
|
|
1205
1205
|
"aria-invalid": S || void 0,
|
|
1206
|
-
onChange: (
|
|
1207
|
-
|
|
1206
|
+
onChange: (E) => {
|
|
1207
|
+
y(E.target.value), h.current = E.target.value, t(E.target.value);
|
|
1208
1208
|
},
|
|
1209
1209
|
onBlur: i
|
|
1210
1210
|
}
|
|
@@ -1214,7 +1214,7 @@ function Ur({
|
|
|
1214
1214
|
"button",
|
|
1215
1215
|
{
|
|
1216
1216
|
type: "button",
|
|
1217
|
-
onClick: () => navigator.clipboard.writeText(
|
|
1217
|
+
onClick: () => navigator.clipboard.writeText(C),
|
|
1218
1218
|
"aria-label": "copy",
|
|
1219
1219
|
tabIndex: -1,
|
|
1220
1220
|
style: { ...j, background: "none", border: "none", cursor: "pointer", padding: "0 8px" },
|
|
@@ -1228,9 +1228,9 @@ function Ur({
|
|
|
1228
1228
|
{
|
|
1229
1229
|
id: c,
|
|
1230
1230
|
name: c,
|
|
1231
|
-
style: { ...
|
|
1231
|
+
style: { ...W, minHeight: 72, height: void 0, padding: "8px 12px" },
|
|
1232
1232
|
placeholder: l.placeholder ?? "",
|
|
1233
|
-
value:
|
|
1233
|
+
value: C,
|
|
1234
1234
|
disabled: T,
|
|
1235
1235
|
readOnly: l.readOnly,
|
|
1236
1236
|
rows: l.rows ?? 3,
|
|
@@ -1241,15 +1241,15 @@ function Ur({
|
|
|
1241
1241
|
"aria-describedby": l.ariaDescribedBy,
|
|
1242
1242
|
"aria-required": l.required || void 0,
|
|
1243
1243
|
"aria-invalid": S || void 0,
|
|
1244
|
-
onChange: (
|
|
1245
|
-
|
|
1244
|
+
onChange: (E) => {
|
|
1245
|
+
y(E.target.value), h.current = E.target.value, t(E.target.value);
|
|
1246
1246
|
},
|
|
1247
1247
|
onBlur: i,
|
|
1248
|
-
onFocus: (
|
|
1249
|
-
|
|
1248
|
+
onFocus: (E) => {
|
|
1249
|
+
E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? A.FOCUS_SHADOW_ERROR : A.FOCUS_SHADOW;
|
|
1250
1250
|
},
|
|
1251
|
-
onBlurCapture: (
|
|
1252
|
-
|
|
1251
|
+
onBlurCapture: (E) => {
|
|
1252
|
+
E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR, E.currentTarget.style.boxShadow = "none";
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
) : /* @__PURE__ */ d(
|
|
@@ -1258,9 +1258,9 @@ function Ur({
|
|
|
1258
1258
|
id: c,
|
|
1259
1259
|
name: c,
|
|
1260
1260
|
type: l.inputType ?? "text",
|
|
1261
|
-
style:
|
|
1261
|
+
style: W,
|
|
1262
1262
|
placeholder: l.placeholder ?? "",
|
|
1263
|
-
value:
|
|
1263
|
+
value: C,
|
|
1264
1264
|
disabled: T,
|
|
1265
1265
|
readOnly: l.readOnly,
|
|
1266
1266
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1270,26 +1270,26 @@ function Ur({
|
|
|
1270
1270
|
"aria-describedby": l.ariaDescribedBy,
|
|
1271
1271
|
"aria-required": l.required || void 0,
|
|
1272
1272
|
"aria-invalid": S || void 0,
|
|
1273
|
-
onChange: (
|
|
1274
|
-
|
|
1273
|
+
onChange: (E) => {
|
|
1274
|
+
y(E.target.value), h.current = E.target.value, t(E.target.value);
|
|
1275
1275
|
},
|
|
1276
1276
|
onBlur: i,
|
|
1277
|
-
onFocus: (
|
|
1278
|
-
|
|
1277
|
+
onFocus: (E) => {
|
|
1278
|
+
E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? A.FOCUS_SHADOW_ERROR : A.FOCUS_SHADOW;
|
|
1279
1279
|
},
|
|
1280
|
-
onBlurCapture: (
|
|
1281
|
-
|
|
1280
|
+
onBlurCapture: (E) => {
|
|
1281
|
+
E.currentTarget.style.borderColor = S ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR, E.currentTarget.style.boxShadow = "none";
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
), ie = /* @__PURE__ */
|
|
1284
|
+
), ie = /* @__PURE__ */ O(Ve, { children: [
|
|
1285
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: fe, children: r })
|
|
1288
1288
|
] });
|
|
1289
|
-
return s ? /* @__PURE__ */
|
|
1289
|
+
return s ? /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "3px 0" }, children: [
|
|
1290
1290
|
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children: B }),
|
|
1291
1291
|
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: ie })
|
|
1292
|
-
] }) : /* @__PURE__ */
|
|
1292
|
+
] }) : /* @__PURE__ */ O("div", { children: [
|
|
1293
1293
|
B,
|
|
1294
1294
|
ie
|
|
1295
1295
|
] });
|
|
@@ -1645,10 +1645,10 @@ function Zn(n, e, t, i) {
|
|
|
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
1647
|
const g = Re(a), p = i;
|
|
1648
|
-
let
|
|
1649
|
-
for (; b && i && p !==
|
|
1650
|
-
const
|
|
1651
|
-
s *=
|
|
1648
|
+
let m = g, b = nn(m);
|
|
1649
|
+
for (; b && i && p !== m; ) {
|
|
1650
|
+
const v = Hn(b), I = b.getBoundingClientRect(), C = Rn(b), y = I.left + (b.clientLeft + parseFloat(C.paddingLeft)) * v.x, h = I.top + (b.clientTop + parseFloat(C.paddingTop)) * v.y;
|
|
1651
|
+
s *= v.x, l *= v.y, c *= v.x, f *= v.y, s += y, l += h, m = Re(b), b = nn(m);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
1654
|
return va({
|
|
@@ -1678,30 +1678,30 @@ function Oa(n, e) {
|
|
|
1678
1678
|
} = l;
|
|
1679
1679
|
if (u || e(), !g || !p)
|
|
1680
1680
|
return;
|
|
1681
|
-
const
|
|
1682
|
-
rootMargin: -
|
|
1681
|
+
const m = nt(f), b = nt(r.clientWidth - (c + g)), v = nt(r.clientHeight - (f + p)), I = nt(c), y = {
|
|
1682
|
+
rootMargin: -m + "px " + -b + "px " + -v + "px " + -I + "px",
|
|
1683
1683
|
threshold: ma(0, ha(1, s)) || 1
|
|
1684
1684
|
};
|
|
1685
|
-
let
|
|
1686
|
-
function
|
|
1687
|
-
const S =
|
|
1685
|
+
let h = !0;
|
|
1686
|
+
function x(R) {
|
|
1687
|
+
const S = R[0].intersectionRatio;
|
|
1688
1688
|
if (S !== s) {
|
|
1689
|
-
if (!
|
|
1689
|
+
if (!h)
|
|
1690
1690
|
return o();
|
|
1691
1691
|
S ? o(!1, S) : i = setTimeout(() => {
|
|
1692
1692
|
o(!1, 1e-7);
|
|
1693
1693
|
}, 1e3);
|
|
1694
1694
|
}
|
|
1695
|
-
S === 1 && !oi(l, n.getBoundingClientRect()) && o(),
|
|
1695
|
+
S === 1 && !oi(l, n.getBoundingClientRect()) && o(), h = !1;
|
|
1696
1696
|
}
|
|
1697
1697
|
try {
|
|
1698
|
-
t = new IntersectionObserver(
|
|
1699
|
-
...
|
|
1698
|
+
t = new IntersectionObserver(x, {
|
|
1699
|
+
...y,
|
|
1700
1700
|
// Handle <iframe>s
|
|
1701
1701
|
root: r.ownerDocument
|
|
1702
1702
|
});
|
|
1703
1703
|
} catch {
|
|
1704
|
-
t = new IntersectionObserver(
|
|
1704
|
+
t = new IntersectionObserver(x, y);
|
|
1705
1705
|
}
|
|
1706
1706
|
t.observe(n);
|
|
1707
1707
|
}
|
|
@@ -1716,31 +1716,31 @@ function Fa(n, e, t, i) {
|
|
|
1716
1716
|
layoutShift: u = typeof IntersectionObserver == "function",
|
|
1717
1717
|
animationFrame: s = !1
|
|
1718
1718
|
} = i, l = En(n), c = r || a ? [...l ? It(l) : [], ...e ? It(e) : []] : [];
|
|
1719
|
-
c.forEach((
|
|
1720
|
-
r &&
|
|
1719
|
+
c.forEach((I) => {
|
|
1720
|
+
r && I.addEventListener("scroll", t, {
|
|
1721
1721
|
passive: !0
|
|
1722
|
-
}), a &&
|
|
1722
|
+
}), a && I.addEventListener("resize", t);
|
|
1723
1723
|
});
|
|
1724
1724
|
const f = l && u ? Oa(l, t) : null;
|
|
1725
1725
|
let g = -1, p = null;
|
|
1726
|
-
o && (p = new ResizeObserver((
|
|
1727
|
-
let [
|
|
1728
|
-
|
|
1729
|
-
var
|
|
1730
|
-
(
|
|
1726
|
+
o && (p = new ResizeObserver((I) => {
|
|
1727
|
+
let [C] = I;
|
|
1728
|
+
C && C.target === l && p && e && (p.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1729
|
+
var y;
|
|
1730
|
+
(y = p) == null || y.observe(e);
|
|
1731
1731
|
})), t();
|
|
1732
1732
|
}), l && !s && p.observe(l), e && p.observe(e));
|
|
1733
|
-
let
|
|
1734
|
-
s &&
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1737
|
-
b && !oi(b,
|
|
1733
|
+
let m, b = s ? Zn(n) : null;
|
|
1734
|
+
s && v();
|
|
1735
|
+
function v() {
|
|
1736
|
+
const I = Zn(n);
|
|
1737
|
+
b && !oi(b, I) && t(), b = I, m = requestAnimationFrame(v);
|
|
1738
1738
|
}
|
|
1739
1739
|
return t(), () => {
|
|
1740
|
-
var
|
|
1741
|
-
c.forEach((
|
|
1742
|
-
r &&
|
|
1743
|
-
}), f == null || f(), (
|
|
1740
|
+
var I;
|
|
1741
|
+
c.forEach((C) => {
|
|
1742
|
+
r && C.removeEventListener("scroll", t), a && C.removeEventListener("resize", t);
|
|
1743
|
+
}), f == null || f(), (I = p) == null || I.disconnect(), p = null, s && cancelAnimationFrame(m);
|
|
1744
1744
|
};
|
|
1745
1745
|
}
|
|
1746
1746
|
var rn = go, wa = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"], xt = function() {
|
|
@@ -1880,55 +1880,55 @@ function _a(n) {
|
|
|
1880
1880
|
maxHeight: e
|
|
1881
1881
|
};
|
|
1882
1882
|
if (!t || !t.offsetParent) return l;
|
|
1883
|
-
var c = s.getBoundingClientRect(), f = c.height, g = t.getBoundingClientRect(), p = g.bottom,
|
|
1883
|
+
var c = s.getBoundingClientRect(), f = c.height, g = t.getBoundingClientRect(), p = g.bottom, m = g.height, b = g.top, v = t.offsetParent.getBoundingClientRect(), I = v.top, C = o ? window.innerHeight : Va(s), y = si(s), h = parseInt(getComputedStyle(t).marginBottom, 10), x = parseInt(getComputedStyle(t).marginTop, 10), R = I - x, S = C - b, T = R + y, B = f - y - b, M = p - C + y + h, F = y + b - x, D = 160;
|
|
1884
1884
|
switch (r) {
|
|
1885
1885
|
case "auto":
|
|
1886
1886
|
case "bottom":
|
|
1887
|
-
if (S >=
|
|
1887
|
+
if (S >= m)
|
|
1888
1888
|
return {
|
|
1889
1889
|
placement: "bottom",
|
|
1890
1890
|
maxHeight: e
|
|
1891
1891
|
};
|
|
1892
|
-
if (B >=
|
|
1893
|
-
return a && rt(s,
|
|
1892
|
+
if (B >= m && !o)
|
|
1893
|
+
return a && rt(s, M, D), {
|
|
1894
1894
|
placement: "bottom",
|
|
1895
1895
|
maxHeight: e
|
|
1896
1896
|
};
|
|
1897
1897
|
if (!o && B >= i || o && S >= i) {
|
|
1898
|
-
a && rt(s,
|
|
1899
|
-
var G = o ? S -
|
|
1898
|
+
a && rt(s, M, D);
|
|
1899
|
+
var G = o ? S - h : B - h;
|
|
1900
1900
|
return {
|
|
1901
1901
|
placement: "bottom",
|
|
1902
1902
|
maxHeight: G
|
|
1903
1903
|
};
|
|
1904
1904
|
}
|
|
1905
1905
|
if (r === "auto" || o) {
|
|
1906
|
-
var
|
|
1907
|
-
return V >= i && (
|
|
1906
|
+
var W = e, V = o ? R : T;
|
|
1907
|
+
return V >= i && (W = Math.min(V - h - u, e)), {
|
|
1908
1908
|
placement: "top",
|
|
1909
|
-
maxHeight:
|
|
1909
|
+
maxHeight: W
|
|
1910
1910
|
};
|
|
1911
1911
|
}
|
|
1912
1912
|
if (r === "bottom")
|
|
1913
|
-
return a && Ct(s,
|
|
1913
|
+
return a && Ct(s, M), {
|
|
1914
1914
|
placement: "bottom",
|
|
1915
1915
|
maxHeight: e
|
|
1916
1916
|
};
|
|
1917
1917
|
break;
|
|
1918
1918
|
case "top":
|
|
1919
|
-
if (
|
|
1919
|
+
if (R >= m)
|
|
1920
1920
|
return {
|
|
1921
1921
|
placement: "top",
|
|
1922
1922
|
maxHeight: e
|
|
1923
1923
|
};
|
|
1924
|
-
if (T >=
|
|
1924
|
+
if (T >= m && !o)
|
|
1925
1925
|
return a && rt(s, F, D), {
|
|
1926
1926
|
placement: "top",
|
|
1927
1927
|
maxHeight: e
|
|
1928
1928
|
};
|
|
1929
|
-
if (!o && T >= i || o &&
|
|
1929
|
+
if (!o && T >= i || o && R >= i) {
|
|
1930
1930
|
var j = e;
|
|
1931
|
-
return (!o && T >= i || o &&
|
|
1931
|
+
return (!o && T >= i || o && R >= i) && (j = o ? R - x : T - x), a && rt(s, F, D), {
|
|
1932
1932
|
placement: "top",
|
|
1933
1933
|
maxHeight: j
|
|
1934
1934
|
};
|
|
@@ -1963,26 +1963,26 @@ var ui = function(e) {
|
|
|
1963
1963
|
marginTop: u.menuGutter
|
|
1964
1964
|
});
|
|
1965
1965
|
}, ci = /* @__PURE__ */ Et(null), ja = function(e) {
|
|
1966
|
-
var t = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Ot(ci) || {}, c = l.setPortalPlacement, f = H(null), g = L(r), p = se(g, 2),
|
|
1966
|
+
var t = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Ot(ci) || {}, c = l.setPortalPlacement, f = H(null), g = L(r), p = se(g, 2), m = p[0], b = p[1], v = L(null), I = se(v, 2), C = I[0], y = I[1], h = s.spacing.controlHeight;
|
|
1967
1967
|
return rn(function() {
|
|
1968
|
-
var
|
|
1969
|
-
if (
|
|
1970
|
-
var
|
|
1968
|
+
var x = f.current;
|
|
1969
|
+
if (x) {
|
|
1970
|
+
var R = o === "fixed", S = u && !R, T = _a({
|
|
1971
1971
|
maxHeight: r,
|
|
1972
|
-
menuEl:
|
|
1972
|
+
menuEl: x,
|
|
1973
1973
|
minHeight: i,
|
|
1974
1974
|
placement: a,
|
|
1975
1975
|
shouldScroll: S,
|
|
1976
|
-
isFixedPosition:
|
|
1977
|
-
controlHeight:
|
|
1976
|
+
isFixedPosition: R,
|
|
1977
|
+
controlHeight: h
|
|
1978
1978
|
});
|
|
1979
|
-
b(T.maxHeight),
|
|
1979
|
+
b(T.maxHeight), y(T.placement), c == null || c(T.placement);
|
|
1980
1980
|
}
|
|
1981
|
-
}, [r, a, o, u, i, c,
|
|
1981
|
+
}, [r, a, o, u, i, c, h]), t({
|
|
1982
1982
|
ref: f,
|
|
1983
1983
|
placerProps: X(X({}, e), {}, {
|
|
1984
|
-
placement:
|
|
1985
|
-
maxHeight:
|
|
1984
|
+
placement: C || ui(a),
|
|
1985
|
+
maxHeight: m
|
|
1986
1986
|
})
|
|
1987
1987
|
});
|
|
1988
1988
|
}, $a = function(e) {
|
|
@@ -2048,46 +2048,46 @@ var ui = function(e) {
|
|
|
2048
2048
|
zIndex: 1
|
|
2049
2049
|
};
|
|
2050
2050
|
}, is = function(e) {
|
|
2051
|
-
var t = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s = H(null), l = H(null), c = L(ui(o)), f = se(c, 2), g = f[0], p = f[1],
|
|
2051
|
+
var t = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s = H(null), l = H(null), c = L(ui(o)), f = se(c, 2), g = f[0], p = f[1], m = ae(function() {
|
|
2052
2052
|
return {
|
|
2053
2053
|
setPortalPlacement: p
|
|
2054
2054
|
};
|
|
2055
|
-
}, []), b = L(null),
|
|
2055
|
+
}, []), b = L(null), v = se(b, 2), I = v[0], C = v[1], y = z(function() {
|
|
2056
2056
|
if (r) {
|
|
2057
2057
|
var S = Pa(r), T = u === "fixed" ? 0 : window.pageYOffset, B = S[g] + T;
|
|
2058
|
-
(B !== (
|
|
2058
|
+
(B !== (I == null ? void 0 : I.offset) || S.left !== (I == null ? void 0 : I.rect.left) || S.width !== (I == null ? void 0 : I.rect.width)) && C({
|
|
2059
2059
|
offset: B,
|
|
2060
2060
|
rect: S
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
|
-
}, [r, u, g,
|
|
2063
|
+
}, [r, u, g, I == null ? void 0 : I.offset, I == null ? void 0 : I.rect.left, I == null ? void 0 : I.rect.width]);
|
|
2064
2064
|
rn(function() {
|
|
2065
|
-
|
|
2066
|
-
}, [
|
|
2067
|
-
var
|
|
2068
|
-
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Fa(r, s.current,
|
|
2065
|
+
y();
|
|
2066
|
+
}, [y]);
|
|
2067
|
+
var h = z(function() {
|
|
2068
|
+
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Fa(r, s.current, y, {
|
|
2069
2069
|
elementResize: "ResizeObserver" in window
|
|
2070
2070
|
}));
|
|
2071
|
-
}, [r,
|
|
2071
|
+
}, [r, y]);
|
|
2072
2072
|
rn(function() {
|
|
2073
|
-
|
|
2074
|
-
}, [
|
|
2075
|
-
var
|
|
2076
|
-
s.current = S,
|
|
2077
|
-
}, [
|
|
2078
|
-
if (!t && u !== "fixed" || !
|
|
2079
|
-
var
|
|
2080
|
-
ref:
|
|
2073
|
+
h();
|
|
2074
|
+
}, [h]);
|
|
2075
|
+
var x = z(function(S) {
|
|
2076
|
+
s.current = S, h();
|
|
2077
|
+
}, [h]);
|
|
2078
|
+
if (!t && u !== "fixed" || !I) return null;
|
|
2079
|
+
var R = J("div", Y({
|
|
2080
|
+
ref: x
|
|
2081
2081
|
}, ne(X(X({}, e), {}, {
|
|
2082
|
-
offset:
|
|
2082
|
+
offset: I.offset,
|
|
2083
2083
|
position: u,
|
|
2084
|
-
rect:
|
|
2084
|
+
rect: I.rect
|
|
2085
2085
|
}), "menuPortal", {
|
|
2086
2086
|
"menu-portal": !0
|
|
2087
2087
|
}), a), i);
|
|
2088
2088
|
return J(ci.Provider, {
|
|
2089
|
-
value:
|
|
2090
|
-
}, t ? /* @__PURE__ */ Do(
|
|
2089
|
+
value: m
|
|
2090
|
+
}, t ? /* @__PURE__ */ Do(R, t) : R);
|
|
2091
2091
|
}, os = function(e) {
|
|
2092
2092
|
var t = e.isDisabled, i = e.isRtl;
|
|
2093
2093
|
return {
|
|
@@ -2638,8 +2638,8 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
},
|
|
2640
2640
|
onFocus: function(e) {
|
|
2641
|
-
var t = 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(b,
|
|
2642
|
-
return b && b.length ? "".concat(b.indexOf(
|
|
2641
|
+
var t = 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(b, v) {
|
|
2642
|
+
return b && b.length ? "".concat(b.indexOf(v) + 1, " of ").concat(b.length) : "";
|
|
2643
2643
|
};
|
|
2644
2644
|
if (t === "value" && u)
|
|
2645
2645
|
return "value ".concat(o, " focused, ").concat(f(u, i), ".");
|
|
@@ -2654,14 +2654,14 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2654
2654
|
return "".concat(i).concat(t ? " for search term " + t : "", ".");
|
|
2655
2655
|
}
|
|
2656
2656
|
}, dl = function(e) {
|
|
2657
|
-
var t = 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,
|
|
2657
|
+
var t = 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, b = s.isOptionDisabled, v = s.isSearchable, I = s.menuIsOpen, C = s.options, y = s.screenReaderStatus, h = s.tabSelectsValue, x = s.isLoading, R = s["aria-label"], S = s["aria-live"], T = ae(function() {
|
|
2658
2658
|
return X(X({}, cl), f || {});
|
|
2659
2659
|
}, [f]), B = ae(function() {
|
|
2660
2660
|
var V = "";
|
|
2661
2661
|
if (t && T.onChange) {
|
|
2662
|
-
var j = t.option,
|
|
2662
|
+
var j = t.option, Q = t.options, U = t.removedValue, re = t.removedValues, ie = t.value, E = function(oe) {
|
|
2663
2663
|
return Array.isArray(oe) ? null : oe;
|
|
2664
|
-
}, P =
|
|
2664
|
+
}, P = U || j || E(ie), Z = P ? g(P) : "", w = Q || re || void 0, k = 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 && b(P, u),
|
|
@@ -2671,26 +2671,26 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2671
2671
|
V = T.onChange($);
|
|
2672
2672
|
}
|
|
2673
2673
|
return V;
|
|
2674
|
-
}, [t, T, b, u, g]),
|
|
2675
|
-
var V = "", j = i || r,
|
|
2674
|
+
}, [t, T, b, u, g]), M = ae(function() {
|
|
2675
|
+
var V = "", j = i || r, Q = !!(i && u && u.includes(i));
|
|
2676
2676
|
if (j && T.onFocus) {
|
|
2677
|
-
var
|
|
2677
|
+
var U = {
|
|
2678
2678
|
focused: j,
|
|
2679
2679
|
label: g(j),
|
|
2680
2680
|
isDisabled: b(j, u),
|
|
2681
|
-
isSelected:
|
|
2681
|
+
isSelected: Q,
|
|
2682
2682
|
options: a,
|
|
2683
2683
|
context: j === i ? "menu" : "value",
|
|
2684
2684
|
selectValue: u,
|
|
2685
2685
|
isAppleDevice: c
|
|
2686
2686
|
};
|
|
2687
|
-
V = T.onFocus(
|
|
2687
|
+
V = T.onFocus(U);
|
|
2688
2688
|
}
|
|
2689
2689
|
return V;
|
|
2690
2690
|
}, [i, r, g, b, T, a, u, c]), F = ae(function() {
|
|
2691
2691
|
var V = "";
|
|
2692
|
-
if (
|
|
2693
|
-
var j =
|
|
2692
|
+
if (I && C.length && !x && T.onFilter) {
|
|
2693
|
+
var j = y({
|
|
2694
2694
|
count: a.length
|
|
2695
2695
|
});
|
|
2696
2696
|
V = T.onFilter({
|
|
@@ -2699,38 +2699,38 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2699
2699
|
});
|
|
2700
2700
|
}
|
|
2701
2701
|
return V;
|
|
2702
|
-
}, [a, p,
|
|
2702
|
+
}, [a, p, I, T, C, y, x]), D = (t == null ? void 0 : t.action) === "initial-input-focus", G = ae(function() {
|
|
2703
2703
|
var V = "";
|
|
2704
2704
|
if (T.guidance) {
|
|
2705
|
-
var j = r ? "value" :
|
|
2705
|
+
var j = r ? "value" : I ? "menu" : "input";
|
|
2706
2706
|
V = T.guidance({
|
|
2707
|
-
"aria-label":
|
|
2707
|
+
"aria-label": R,
|
|
2708
2708
|
context: j,
|
|
2709
2709
|
isDisabled: i && b(i, u),
|
|
2710
|
-
isMulti:
|
|
2711
|
-
isSearchable:
|
|
2712
|
-
tabSelectsValue:
|
|
2710
|
+
isMulti: m,
|
|
2711
|
+
isSearchable: v,
|
|
2712
|
+
tabSelectsValue: h,
|
|
2713
2713
|
isInitialFocus: D
|
|
2714
2714
|
});
|
|
2715
2715
|
}
|
|
2716
2716
|
return V;
|
|
2717
|
-
}, [
|
|
2717
|
+
}, [R, i, r, m, b, v, I, T, u, h, D]), W = J(qt, null, J("span", {
|
|
2718
2718
|
id: "aria-selection"
|
|
2719
2719
|
}, B), J("span", {
|
|
2720
2720
|
id: "aria-focused"
|
|
2721
|
-
},
|
|
2721
|
+
}, M), J("span", {
|
|
2722
2722
|
id: "aria-results"
|
|
2723
2723
|
}, F), J("span", {
|
|
2724
2724
|
id: "aria-guidance"
|
|
2725
2725
|
}, G));
|
|
2726
2726
|
return J(qt, null, J($n, {
|
|
2727
2727
|
id: l
|
|
2728
|
-
}, D &&
|
|
2728
|
+
}, D && W), J($n, {
|
|
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 && W));
|
|
2734
2734
|
}, fl = dl, on = [{
|
|
2735
2735
|
base: "A",
|
|
2736
2736
|
letters: "AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"
|
|
@@ -3042,37 +3042,37 @@ var Il = function(e) {
|
|
|
3042
3042
|
e.cancelable && e.preventDefault(), e.stopPropagation();
|
|
3043
3043
|
};
|
|
3044
3044
|
function xl(n) {
|
|
3045
|
-
var e = n.isEnabled, t = n.onBottomArrive, i = n.onBottomLeave, r = n.onTopArrive, a = n.onTopLeave, o = H(!1), u = H(!1), s = H(0), l = H(null), c = z(function(
|
|
3045
|
+
var e = n.isEnabled, t = n.onBottomArrive, i = n.onBottomLeave, r = n.onTopArrive, a = n.onTopLeave, o = H(!1), u = H(!1), s = H(0), l = H(null), c = z(function(v, I) {
|
|
3046
3046
|
if (l.current !== null) {
|
|
3047
|
-
var
|
|
3048
|
-
T >
|
|
3049
|
-
}
|
|
3050
|
-
}, [t, i, r, a]), f = z(function(
|
|
3051
|
-
c(
|
|
3052
|
-
}, [c]), g = z(function(
|
|
3053
|
-
s.current =
|
|
3054
|
-
}, []), p = z(function(
|
|
3055
|
-
var
|
|
3056
|
-
c(
|
|
3057
|
-
}, [c]),
|
|
3058
|
-
if (
|
|
3059
|
-
var
|
|
3047
|
+
var C = l.current, y = C.scrollTop, h = C.scrollHeight, x = C.clientHeight, R = l.current, S = I > 0, T = h - x - y, B = !1;
|
|
3048
|
+
T > I && o.current && (i && i(v), o.current = !1), S && u.current && (a && a(v), u.current = !1), S && I > T ? (t && !o.current && t(v), R.scrollTop = h, B = !0, o.current = !0) : !S && -I > y && (r && !u.current && r(v), R.scrollTop = 0, B = !0, u.current = !0), B && Il(v);
|
|
3049
|
+
}
|
|
3050
|
+
}, [t, i, r, a]), f = z(function(v) {
|
|
3051
|
+
c(v, v.deltaY);
|
|
3052
|
+
}, [c]), g = z(function(v) {
|
|
3053
|
+
s.current = v.changedTouches[0].clientY;
|
|
3054
|
+
}, []), p = z(function(v) {
|
|
3055
|
+
var I = s.current - v.changedTouches[0].clientY;
|
|
3056
|
+
c(v, I);
|
|
3057
|
+
}, [c]), m = z(function(v) {
|
|
3058
|
+
if (v) {
|
|
3059
|
+
var I = Wa ? {
|
|
3060
3060
|
passive: !1
|
|
3061
3061
|
} : !1;
|
|
3062
|
-
|
|
3062
|
+
v.addEventListener("wheel", f, I), v.addEventListener("touchstart", g, I), v.addEventListener("touchmove", p, I);
|
|
3063
3063
|
}
|
|
3064
|
-
}, [p, g, f]), b = z(function(
|
|
3065
|
-
|
|
3064
|
+
}, [p, g, f]), b = z(function(v) {
|
|
3065
|
+
v && (v.removeEventListener("wheel", f, !1), v.removeEventListener("touchstart", g, !1), v.removeEventListener("touchmove", p, !1));
|
|
3066
3066
|
}, [p, g, f]);
|
|
3067
3067
|
return q(function() {
|
|
3068
3068
|
if (e) {
|
|
3069
|
-
var
|
|
3070
|
-
return
|
|
3071
|
-
b(
|
|
3069
|
+
var v = l.current;
|
|
3070
|
+
return m(v), function() {
|
|
3071
|
+
b(v);
|
|
3072
3072
|
};
|
|
3073
3073
|
}
|
|
3074
|
-
}, [e,
|
|
3075
|
-
l.current =
|
|
3074
|
+
}, [e, m, b]), function(v) {
|
|
3075
|
+
l.current = v;
|
|
3076
3076
|
};
|
|
3077
3077
|
}
|
|
3078
3078
|
var Qn = ["boxSizing", "height", "overflow", "paddingRight", "position"], qn = {
|
|
@@ -3103,14 +3103,14 @@ function yl(n) {
|
|
|
3103
3103
|
var e = n.isEnabled, t = n.accountForScrollbars, i = t === void 0 ? !0 : t, r = H({}), a = H(null), o = z(function(s) {
|
|
3104
3104
|
if (rr) {
|
|
3105
3105
|
var l = document.body, c = l && l.style;
|
|
3106
|
-
if (i && Qn.forEach(function(
|
|
3107
|
-
var b = c && c[
|
|
3108
|
-
r.current[
|
|
3106
|
+
if (i && Qn.forEach(function(m) {
|
|
3107
|
+
var b = c && c[m];
|
|
3108
|
+
r.current[m] = b;
|
|
3109
3109
|
}), i && Ye < 1) {
|
|
3110
3110
|
var f = parseInt(r.current.paddingRight, 10) || 0, g = document.body ? document.body.clientWidth : 0, p = window.innerWidth - g + f || 0;
|
|
3111
|
-
Object.keys(qn).forEach(function(
|
|
3112
|
-
var b = qn[
|
|
3113
|
-
c && (c[
|
|
3111
|
+
Object.keys(qn).forEach(function(m) {
|
|
3112
|
+
var b = qn[m];
|
|
3113
|
+
c && (c[m] = b);
|
|
3114
3114
|
}), c && (c.paddingRight = "".concat(p, "px"));
|
|
3115
3115
|
}
|
|
3116
3116
|
l && nr() && (l.addEventListener("touchmove", Kn, Le), s && (s.addEventListener("touchstart", tr, Le), s.addEventListener("touchmove", er, Le))), Ye += 1;
|
|
@@ -3454,10 +3454,10 @@ var Fi = function(e) {
|
|
|
3454
3454
|
var c = r.props, f = c.onChange, g = c.name;
|
|
3455
3455
|
l.name = g, r.ariaOnChange(s, l), f(s, l);
|
|
3456
3456
|
}, r.setValue = function(s, l, c) {
|
|
3457
|
-
var f = r.props, g = f.closeMenuOnSelect, p = f.isMulti,
|
|
3457
|
+
var f = r.props, g = f.closeMenuOnSelect, p = f.isMulti, m = f.inputValue;
|
|
3458
3458
|
r.onInputChange("", {
|
|
3459
3459
|
action: "set-value",
|
|
3460
|
-
prevInputValue:
|
|
3460
|
+
prevInputValue: m
|
|
3461
3461
|
}), g && (r.setState({
|
|
3462
3462
|
inputIsHiddenAfterUpdate: !p
|
|
3463
3463
|
}), r.onMenuClose()), r.setState({
|
|
@@ -3467,11 +3467,11 @@ var Fi = 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, g = l.name, p = r.state.selectValue,
|
|
3471
|
-
if (
|
|
3472
|
-
var
|
|
3473
|
-
r.setValue(p.filter(function(
|
|
3474
|
-
return r.getOptionValue(
|
|
3470
|
+
var l = r.props, c = l.blurInputOnSelect, f = l.isMulti, g = l.name, p = r.state.selectValue, m = f && r.isOptionSelected(s, p), b = r.isOptionDisabled(s, p);
|
|
3471
|
+
if (m) {
|
|
3472
|
+
var v = r.getOptionValue(s);
|
|
3473
|
+
r.setValue(p.filter(function(I) {
|
|
3474
|
+
return r.getOptionValue(I) !== v;
|
|
3475
3475
|
}), "deselect-option", s);
|
|
3476
3476
|
} else if (!b)
|
|
3477
3477
|
f ? r.setValue([].concat(ze(p), [s]), "select-option", s) : r.setValue(s, "select-option");
|
|
@@ -3485,8 +3485,8 @@ var Fi = function(e) {
|
|
|
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), g = c.filter(function(
|
|
3489
|
-
return r.getOptionValue(
|
|
3488
|
+
var l = r.props.isMulti, c = r.state.selectValue, f = r.getOptionValue(s), g = c.filter(function(m) {
|
|
3489
|
+
return r.getOptionValue(m) !== f;
|
|
3490
3490
|
}), p = je(l, g, g[0] || null);
|
|
3491
3491
|
r.onChange(p, {
|
|
3492
3492
|
action: "remove-value",
|
|
@@ -3626,8 +3626,8 @@ var Fi = 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, g = l.escapeClearsValue, p = l.inputValue,
|
|
3630
|
-
if (!b && !(typeof
|
|
3629
|
+
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue, g = l.escapeClearsValue, p = l.inputValue, m = l.isClearable, b = l.isDisabled, v = l.menuIsOpen, I = l.onKeyDown, C = l.tabSelectsValue, y = l.openMenuOnFocus, h = r.state, x = h.focusedOption, R = h.focusedValue, S = h.selectValue;
|
|
3630
|
+
if (!b && !(typeof I == "function" && (I(s), s.defaultPrevented))) {
|
|
3631
3631
|
switch (r.blockOptionHover = !0, s.key) {
|
|
3632
3632
|
case "ArrowLeft":
|
|
3633
3633
|
if (!c || p) return;
|
|
@@ -3640,67 +3640,67 @@ var Fi = function(e) {
|
|
|
3640
3640
|
case "Delete":
|
|
3641
3641
|
case "Backspace":
|
|
3642
3642
|
if (p) return;
|
|
3643
|
-
if (
|
|
3644
|
-
r.removeValue(
|
|
3643
|
+
if (R)
|
|
3644
|
+
r.removeValue(R);
|
|
3645
3645
|
else {
|
|
3646
3646
|
if (!f) return;
|
|
3647
|
-
c ? r.popValue() :
|
|
3647
|
+
c ? r.popValue() : m && r.clearValue();
|
|
3648
3648
|
}
|
|
3649
3649
|
break;
|
|
3650
3650
|
case "Tab":
|
|
3651
|
-
if (r.isComposing || s.shiftKey || !
|
|
3651
|
+
if (r.isComposing || s.shiftKey || !v || !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;
|
|
3655
|
-
r.selectOption(
|
|
3655
|
+
r.selectOption(x);
|
|
3656
3656
|
break;
|
|
3657
3657
|
case "Enter":
|
|
3658
3658
|
if (s.keyCode === 229)
|
|
3659
3659
|
break;
|
|
3660
|
-
if (
|
|
3661
|
-
if (!
|
|
3662
|
-
r.selectOption(
|
|
3660
|
+
if (v) {
|
|
3661
|
+
if (!x || r.isComposing) return;
|
|
3662
|
+
r.selectOption(x);
|
|
3663
3663
|
break;
|
|
3664
3664
|
}
|
|
3665
3665
|
return;
|
|
3666
3666
|
case "Escape":
|
|
3667
|
-
|
|
3667
|
+
v ? (r.setState({
|
|
3668
3668
|
inputIsHiddenAfterUpdate: !1
|
|
3669
3669
|
}), r.onInputChange("", {
|
|
3670
3670
|
action: "menu-close",
|
|
3671
3671
|
prevInputValue: p
|
|
3672
|
-
}), r.onMenuClose()) :
|
|
3672
|
+
}), r.onMenuClose()) : m && g && r.clearValue();
|
|
3673
3673
|
break;
|
|
3674
3674
|
case " ":
|
|
3675
3675
|
if (p)
|
|
3676
3676
|
return;
|
|
3677
|
-
if (!
|
|
3677
|
+
if (!v) {
|
|
3678
3678
|
r.openMenu("first");
|
|
3679
3679
|
break;
|
|
3680
3680
|
}
|
|
3681
|
-
if (!
|
|
3682
|
-
r.selectOption(
|
|
3681
|
+
if (!x) return;
|
|
3682
|
+
r.selectOption(x);
|
|
3683
3683
|
break;
|
|
3684
3684
|
case "ArrowUp":
|
|
3685
|
-
|
|
3685
|
+
v ? r.focusOption("up") : r.openMenu("last");
|
|
3686
3686
|
break;
|
|
3687
3687
|
case "ArrowDown":
|
|
3688
|
-
|
|
3688
|
+
v ? r.focusOption("down") : r.openMenu("first");
|
|
3689
3689
|
break;
|
|
3690
3690
|
case "PageUp":
|
|
3691
|
-
if (!
|
|
3691
|
+
if (!v) return;
|
|
3692
3692
|
r.focusOption("pageup");
|
|
3693
3693
|
break;
|
|
3694
3694
|
case "PageDown":
|
|
3695
|
-
if (!
|
|
3695
|
+
if (!v) return;
|
|
3696
3696
|
r.focusOption("pagedown");
|
|
3697
3697
|
break;
|
|
3698
3698
|
case "Home":
|
|
3699
|
-
if (!
|
|
3699
|
+
if (!v) return;
|
|
3700
3700
|
r.focusOption("first");
|
|
3701
3701
|
break;
|
|
3702
3702
|
case "End":
|
|
3703
|
-
if (!
|
|
3703
|
+
if (!v) return;
|
|
3704
3704
|
r.focusOption("last");
|
|
3705
3705
|
break;
|
|
3706
3706
|
default:
|
|
@@ -3843,7 +3843,7 @@ var Fi = 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, g = f.isMulti, p = f.isRtl,
|
|
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, b = this.hasValue();
|
|
3847
3847
|
return {
|
|
3848
3848
|
clearValue: r,
|
|
3849
3849
|
cx: a,
|
|
@@ -3853,7 +3853,7 @@ var Fi = function(e) {
|
|
|
3853
3853
|
hasValue: b,
|
|
3854
3854
|
isMulti: g,
|
|
3855
3855
|
isRtl: p,
|
|
3856
|
-
options:
|
|
3856
|
+
options: m,
|
|
3857
3857
|
selectOption: l,
|
|
3858
3858
|
selectProps: f,
|
|
3859
3859
|
setValue: c,
|
|
@@ -3950,7 +3950,7 @@ var Fi = 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, g = r.required, p = this.getComponents(),
|
|
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, b = this.state, v = b.inputIsHidden, I = b.ariaSelection, C = this.commonProps, y = u || this.getElementId("input"), h = X(X(X({
|
|
3954
3954
|
"aria-autocomplete": "list",
|
|
3955
3955
|
"aria-expanded": f,
|
|
3956
3956
|
"aria-haspopup": !0,
|
|
@@ -3965,19 +3965,19 @@ var Fi = function(e) {
|
|
|
3965
3965
|
"aria-controls": this.getElementId("listbox")
|
|
3966
3966
|
}), !o && {
|
|
3967
3967
|
"aria-readonly": !0
|
|
3968
|
-
}), this.hasValue() ? (
|
|
3968
|
+
}), this.hasValue() ? (I == null ? void 0 : I.action) === "initial-input-focus" && {
|
|
3969
3969
|
"aria-describedby": this.getElementId("live-region")
|
|
3970
3970
|
} : {
|
|
3971
3971
|
"aria-describedby": this.getElementId("placeholder")
|
|
3972
3972
|
});
|
|
3973
|
-
return o ? /* @__PURE__ */ K.createElement(
|
|
3973
|
+
return o ? /* @__PURE__ */ K.createElement(m, Y({}, C, {
|
|
3974
3974
|
autoCapitalize: "none",
|
|
3975
3975
|
autoComplete: "off",
|
|
3976
3976
|
autoCorrect: "off",
|
|
3977
|
-
id:
|
|
3977
|
+
id: y,
|
|
3978
3978
|
innerRef: this.getInputRef,
|
|
3979
3979
|
isDisabled: a,
|
|
3980
|
-
isHidden:
|
|
3980
|
+
isHidden: v,
|
|
3981
3981
|
onBlur: this.onInputBlur,
|
|
3982
3982
|
onChange: this.handleInputChange,
|
|
3983
3983
|
onFocus: this.onInputFocus,
|
|
@@ -3986,8 +3986,8 @@ var Fi = function(e) {
|
|
|
3986
3986
|
form: c,
|
|
3987
3987
|
type: "text",
|
|
3988
3988
|
value: s
|
|
3989
|
-
},
|
|
3990
|
-
id:
|
|
3989
|
+
}, h)) : /* @__PURE__ */ K.createElement(vl, Y({
|
|
3990
|
+
id: y,
|
|
3991
3991
|
innerRef: this.getInputRef,
|
|
3992
3992
|
onBlur: this.onInputBlur,
|
|
3993
3993
|
onChange: xt,
|
|
@@ -3997,32 +3997,32 @@ var Fi = function(e) {
|
|
|
3997
3997
|
inputMode: "none",
|
|
3998
3998
|
form: c,
|
|
3999
3999
|
value: ""
|
|
4000
|
-
},
|
|
4000
|
+
}, h));
|
|
4001
4001
|
}
|
|
4002
4002
|
)
|
|
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, g = this.commonProps, p = this.props,
|
|
4007
|
-
if (!this.hasValue() || !
|
|
4008
|
-
return
|
|
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, b = p.isDisabled, v = p.isMulti, I = p.inputValue, C = p.placeholder, y = this.state, h = y.selectValue, x = y.focusedValue, R = y.isFocused;
|
|
4007
|
+
if (!this.hasValue() || !m)
|
|
4008
|
+
return I ? null : /* @__PURE__ */ K.createElement(f, Y({}, g, {
|
|
4009
4009
|
key: "placeholder",
|
|
4010
4010
|
isDisabled: b,
|
|
4011
|
-
isFocused:
|
|
4011
|
+
isFocused: R,
|
|
4012
4012
|
innerProps: {
|
|
4013
4013
|
id: this.getElementId("placeholder")
|
|
4014
4014
|
}
|
|
4015
|
-
}),
|
|
4016
|
-
if (
|
|
4017
|
-
return
|
|
4018
|
-
var
|
|
4015
|
+
}), C);
|
|
4016
|
+
if (v)
|
|
4017
|
+
return h.map(function(T, B) {
|
|
4018
|
+
var M = T === x, F = "".concat(r.getOptionLabel(T), "-").concat(r.getOptionValue(T));
|
|
4019
4019
|
return /* @__PURE__ */ K.createElement(o, Y({}, g, {
|
|
4020
4020
|
components: {
|
|
4021
4021
|
Container: u,
|
|
4022
4022
|
Label: s,
|
|
4023
4023
|
Remove: l
|
|
4024
4024
|
},
|
|
4025
|
-
isFocused:
|
|
4025
|
+
isFocused: M,
|
|
4026
4026
|
isDisabled: b,
|
|
4027
4027
|
key: F,
|
|
4028
4028
|
index: B,
|
|
@@ -4040,9 +4040,9 @@ var Fi = function(e) {
|
|
|
4040
4040
|
data: T
|
|
4041
4041
|
}), r.formatOptionLabel(T, "value"));
|
|
4042
4042
|
});
|
|
4043
|
-
if (
|
|
4043
|
+
if (I)
|
|
4044
4044
|
return null;
|
|
4045
|
-
var S =
|
|
4045
|
+
var S = h[0];
|
|
4046
4046
|
return /* @__PURE__ */ K.createElement(c, Y({}, g, {
|
|
4047
4047
|
data: S,
|
|
4048
4048
|
isDisabled: b
|
|
@@ -4108,7 +4108,7 @@ var Fi = 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, g = a.NoOptionsMessage, p = a.Option,
|
|
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, b = this.state.focusedOption, v = this.props, I = v.captureMenuScroll, C = v.inputValue, y = v.isLoading, h = v.loadingMessage, x = v.minMenuHeight, R = v.maxMenuHeight, S = v.menuIsOpen, T = v.menuPlacement, B = v.menuPosition, M = v.menuPortalTarget, F = v.menuShouldBlockScroll, D = v.menuShouldScrollIntoView, G = v.noOptionsMessage, W = v.onMenuScrollToTop, V = v.onMenuScrollToBottom;
|
|
4112
4112
|
if (!S) return null;
|
|
4113
4113
|
var j = function(Z, w) {
|
|
4114
4114
|
var k = Z.type, $ = Z.data, _ = Z.isDisabled, oe = Z.isSelected, he = Z.label, Pt = Z.value, et = b === $, Ze = _ ? void 0 : function() {
|
|
@@ -4125,7 +4125,7 @@ var Fi = function(e) {
|
|
|
4125
4125
|
"aria-selected": r.state.isAppleDevice ? void 0 : oe
|
|
4126
4126
|
// is not supported on Apple devices
|
|
4127
4127
|
};
|
|
4128
|
-
return /* @__PURE__ */ K.createElement(p, Y({},
|
|
4128
|
+
return /* @__PURE__ */ K.createElement(p, Y({}, m, {
|
|
4129
4129
|
innerProps: _e,
|
|
4130
4130
|
data: $,
|
|
4131
4131
|
isDisabled: _,
|
|
@@ -4137,12 +4137,12 @@ var Fi = function(e) {
|
|
|
4137
4137
|
isFocused: et,
|
|
4138
4138
|
innerRef: et ? r.getFocusedOptionRef : void 0
|
|
4139
4139
|
}), r.formatOptionLabel(Z.data, "menu"));
|
|
4140
|
-
},
|
|
4140
|
+
}, Q;
|
|
4141
4141
|
if (this.hasOptions())
|
|
4142
|
-
|
|
4142
|
+
Q = this.getCategorizedOptions().map(function(P) {
|
|
4143
4143
|
if (P.type === "group") {
|
|
4144
4144
|
var Z = P.data, w = P.options, k = P.index, $ = "".concat(r.getElementId("group"), "-").concat(k), _ = "".concat($, "-heading");
|
|
4145
|
-
return /* @__PURE__ */ K.createElement(o, Y({},
|
|
4145
|
+
return /* @__PURE__ */ K.createElement(o, Y({}, m, {
|
|
4146
4146
|
key: $,
|
|
4147
4147
|
data: Z,
|
|
4148
4148
|
options: w,
|
|
@@ -4158,62 +4158,62 @@ var Fi = function(e) {
|
|
|
4158
4158
|
} else if (P.type === "option")
|
|
4159
4159
|
return j(P, "".concat(P.index));
|
|
4160
4160
|
});
|
|
4161
|
-
else if (
|
|
4162
|
-
var
|
|
4163
|
-
inputValue:
|
|
4161
|
+
else if (y) {
|
|
4162
|
+
var U = h({
|
|
4163
|
+
inputValue: C
|
|
4164
4164
|
});
|
|
4165
|
-
if (
|
|
4166
|
-
|
|
4165
|
+
if (U === null) return null;
|
|
4166
|
+
Q = /* @__PURE__ */ K.createElement(f, m, U);
|
|
4167
4167
|
} else {
|
|
4168
4168
|
var re = G({
|
|
4169
|
-
inputValue:
|
|
4169
|
+
inputValue: C
|
|
4170
4170
|
});
|
|
4171
4171
|
if (re === null) return null;
|
|
4172
|
-
|
|
4172
|
+
Q = /* @__PURE__ */ K.createElement(g, m, re);
|
|
4173
4173
|
}
|
|
4174
4174
|
var ie = {
|
|
4175
|
-
minMenuHeight:
|
|
4176
|
-
maxMenuHeight:
|
|
4175
|
+
minMenuHeight: x,
|
|
4176
|
+
maxMenuHeight: R,
|
|
4177
4177
|
menuPlacement: T,
|
|
4178
4178
|
menuPosition: B,
|
|
4179
4179
|
menuShouldScrollIntoView: D
|
|
4180
|
-
},
|
|
4180
|
+
}, E = /* @__PURE__ */ K.createElement(ja, Y({}, m, ie), function(P) {
|
|
4181
4181
|
var Z = P.ref, w = P.placerProps, k = w.placement, $ = w.maxHeight;
|
|
4182
|
-
return /* @__PURE__ */ K.createElement(s, Y({},
|
|
4182
|
+
return /* @__PURE__ */ K.createElement(s, Y({}, m, ie, {
|
|
4183
4183
|
innerRef: Z,
|
|
4184
4184
|
innerProps: {
|
|
4185
4185
|
onMouseDown: r.onMenuMouseDown,
|
|
4186
4186
|
onMouseMove: r.onMenuMouseMove
|
|
4187
4187
|
},
|
|
4188
|
-
isLoading:
|
|
4188
|
+
isLoading: y,
|
|
4189
4189
|
placement: k
|
|
4190
4190
|
}), /* @__PURE__ */ K.createElement(Rl, {
|
|
4191
|
-
captureEnabled:
|
|
4192
|
-
onTopArrive:
|
|
4191
|
+
captureEnabled: I,
|
|
4192
|
+
onTopArrive: W,
|
|
4193
4193
|
onBottomArrive: V,
|
|
4194
4194
|
lockEnabled: F
|
|
4195
4195
|
}, function(_) {
|
|
4196
|
-
return /* @__PURE__ */ K.createElement(l, Y({},
|
|
4196
|
+
return /* @__PURE__ */ K.createElement(l, Y({}, m, {
|
|
4197
4197
|
innerRef: function(he) {
|
|
4198
4198
|
r.getMenuListRef(he), _(he);
|
|
4199
4199
|
},
|
|
4200
4200
|
innerProps: {
|
|
4201
4201
|
role: "listbox",
|
|
4202
|
-
"aria-multiselectable":
|
|
4202
|
+
"aria-multiselectable": m.isMulti,
|
|
4203
4203
|
id: r.getElementId("listbox")
|
|
4204
4204
|
},
|
|
4205
|
-
isLoading:
|
|
4205
|
+
isLoading: y,
|
|
4206
4206
|
maxHeight: $,
|
|
4207
4207
|
focusedOption: b
|
|
4208
|
-
}),
|
|
4208
|
+
}), Q);
|
|
4209
4209
|
}));
|
|
4210
4210
|
});
|
|
4211
|
-
return
|
|
4212
|
-
appendTo:
|
|
4211
|
+
return M || B === "fixed" ? /* @__PURE__ */ K.createElement(c, Y({}, m, {
|
|
4212
|
+
appendTo: M,
|
|
4213
4213
|
controlElement: this.controlRef,
|
|
4214
4214
|
menuPlacement: T,
|
|
4215
4215
|
menuPosition: B
|
|
4216
|
-
}),
|
|
4216
|
+
}), E) : E;
|
|
4217
4217
|
}
|
|
4218
4218
|
}, {
|
|
4219
4219
|
key: "renderFormField",
|
|
@@ -4236,9 +4236,9 @@ var Fi = function(e) {
|
|
|
4236
4236
|
value: g
|
|
4237
4237
|
});
|
|
4238
4238
|
} else {
|
|
4239
|
-
var p = f.length > 0 ? f.map(function(b,
|
|
4239
|
+
var p = f.length > 0 ? f.map(function(b, v) {
|
|
4240
4240
|
return /* @__PURE__ */ K.createElement("input", {
|
|
4241
|
-
key: "i-".concat(
|
|
4241
|
+
key: "i-".concat(v),
|
|
4242
4242
|
name: l,
|
|
4243
4243
|
type: "hidden",
|
|
4244
4244
|
value: r.getOptionValue(b)
|
|
@@ -4251,11 +4251,11 @@ var Fi = function(e) {
|
|
|
4251
4251
|
return /* @__PURE__ */ K.createElement("div", null, p);
|
|
4252
4252
|
}
|
|
4253
4253
|
else {
|
|
4254
|
-
var
|
|
4254
|
+
var m = f[0] ? this.getOptionValue(f[0]) : "";
|
|
4255
4255
|
return /* @__PURE__ */ K.createElement("input", {
|
|
4256
4256
|
name: l,
|
|
4257
4257
|
type: "hidden",
|
|
4258
|
-
value:
|
|
4258
|
+
value: m
|
|
4259
4259
|
});
|
|
4260
4260
|
}
|
|
4261
4261
|
}
|
|
@@ -4277,7 +4277,7 @@ var Fi = 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, g = l.isDisabled, p = l.menuIsOpen,
|
|
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, b = this.commonProps = this.getCommonProps();
|
|
4281
4281
|
return /* @__PURE__ */ K.createElement(u, Y({}, b, {
|
|
4282
4282
|
className: c,
|
|
4283
4283
|
innerProps: {
|
|
@@ -4285,7 +4285,7 @@ var Fi = function(e) {
|
|
|
4285
4285
|
onKeyDown: this.onKeyDown
|
|
4286
4286
|
},
|
|
4287
4287
|
isDisabled: g,
|
|
4288
|
-
isFocused:
|
|
4288
|
+
isFocused: m
|
|
4289
4289
|
}), this.renderLiveRegion(), /* @__PURE__ */ K.createElement(a, Y({}, b, {
|
|
4290
4290
|
innerRef: this.getControlRef,
|
|
4291
4291
|
innerProps: {
|
|
@@ -4293,7 +4293,7 @@ var Fi = function(e) {
|
|
|
4293
4293
|
onTouchEnd: this.onControlTouchEnd
|
|
4294
4294
|
},
|
|
4295
4295
|
isDisabled: g,
|
|
4296
|
-
isFocused:
|
|
4296
|
+
isFocused: m,
|
|
4297
4297
|
menuIsOpen: p
|
|
4298
4298
|
}), /* @__PURE__ */ K.createElement(s, Y({}, b, {
|
|
4299
4299
|
isDisabled: g
|
|
@@ -4304,29 +4304,29 @@ var Fi = function(e) {
|
|
|
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, g = a.instancePrefix, p = r.options,
|
|
4308
|
-
if (o && (
|
|
4309
|
-
var
|
|
4310
|
-
|
|
4311
|
-
selectValue:
|
|
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, b = r.menuIsOpen, v = r.inputValue, I = r.isMulti, C = yt(m), y = {};
|
|
4308
|
+
if (o && (m !== o.value || p !== o.options || b !== o.menuIsOpen || v !== o.inputValue)) {
|
|
4309
|
+
var h = b ? Hl(r, C) : [], x = b ? or(lt(r, C), "".concat(g, "-option")) : [], R = u ? Zl(a, C) : null, S = _l(a, h), T = Jt(x, S);
|
|
4310
|
+
y = {
|
|
4311
|
+
selectValue: C,
|
|
4312
4312
|
focusedOption: S,
|
|
4313
4313
|
focusedOptionId: T,
|
|
4314
|
-
focusableOptionsWithIds:
|
|
4315
|
-
focusedValue:
|
|
4314
|
+
focusableOptionsWithIds: x,
|
|
4315
|
+
focusedValue: R,
|
|
4316
4316
|
clearFocusValueOnUpdate: !1
|
|
4317
4317
|
};
|
|
4318
4318
|
}
|
|
4319
4319
|
var B = s != null && r !== o ? {
|
|
4320
4320
|
inputIsHidden: s,
|
|
4321
4321
|
inputIsHiddenAfterUpdate: void 0
|
|
4322
|
-
} : {},
|
|
4323
|
-
return c && !F && (
|
|
4324
|
-
value: je(
|
|
4325
|
-
options:
|
|
4322
|
+
} : {}, M = l, F = c && f;
|
|
4323
|
+
return c && !F && (M = {
|
|
4324
|
+
value: je(I, C, C[0] || null),
|
|
4325
|
+
options: C,
|
|
4326
4326
|
action: "initial-input-focus"
|
|
4327
|
-
}, F = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (
|
|
4327
|
+
}, F = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (M = null), X(X(X({}, y), B), {}, {
|
|
4328
4328
|
prevProps: r,
|
|
4329
|
-
ariaSelection:
|
|
4329
|
+
ariaSelection: M,
|
|
4330
4330
|
prevWasFocused: F
|
|
4331
4331
|
});
|
|
4332
4332
|
}
|
|
@@ -4335,34 +4335,34 @@ var Fi = function(e) {
|
|
|
4335
4335
|
Vt.defaultProps = zl;
|
|
4336
4336
|
var Yl = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
4337
4337
|
function wn(n) {
|
|
4338
|
-
var e = n.defaultInputValue, t = e === void 0 ? "" : e, i = n.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = n.defaultValue, o = a === void 0 ? null : a, u = n.inputValue, s = n.menuIsOpen, l = n.onChange, c = n.onInputChange, f = n.onMenuClose, g = n.onMenuOpen, p = n.value,
|
|
4339
|
-
typeof l == "function" && l(
|
|
4340
|
-
}, [l]), D = z(function(
|
|
4338
|
+
var e = n.defaultInputValue, t = e === void 0 ? "" : e, i = n.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = n.defaultValue, o = a === void 0 ? null : a, u = n.inputValue, s = n.menuIsOpen, l = n.onChange, c = n.onInputChange, f = n.onMenuClose, g = n.onMenuOpen, p = n.value, m = ve(n, Yl), b = L(u !== void 0 ? u : t), v = se(b, 2), I = v[0], C = v[1], y = L(s !== void 0 ? s : r), h = se(y, 2), x = h[0], R = h[1], S = L(p !== void 0 ? p : o), T = se(S, 2), B = T[0], M = T[1], F = z(function(U, re) {
|
|
4339
|
+
typeof l == "function" && l(U, re), M(U);
|
|
4340
|
+
}, [l]), D = z(function(U, re) {
|
|
4341
4341
|
var ie;
|
|
4342
|
-
typeof c == "function" && (ie = c(
|
|
4342
|
+
typeof c == "function" && (ie = c(U, re)), C(ie !== void 0 ? ie : U);
|
|
4343
4343
|
}, [c]), G = z(function() {
|
|
4344
|
-
typeof g == "function" && g(),
|
|
4345
|
-
}, [g]),
|
|
4346
|
-
typeof f == "function" && f(),
|
|
4347
|
-
}, [f]), V = u !== void 0 ? u :
|
|
4348
|
-
return X(X({},
|
|
4344
|
+
typeof g == "function" && g(), R(!0);
|
|
4345
|
+
}, [g]), W = z(function() {
|
|
4346
|
+
typeof f == "function" && f(), R(!1);
|
|
4347
|
+
}, [f]), V = u !== void 0 ? u : I, j = s !== void 0 ? s : x, Q = p !== void 0 ? p : B;
|
|
4348
|
+
return X(X({}, m), {}, {
|
|
4349
4349
|
inputValue: V,
|
|
4350
4350
|
menuIsOpen: j,
|
|
4351
4351
|
onChange: F,
|
|
4352
4352
|
onInputChange: D,
|
|
4353
|
-
onMenuClose:
|
|
4353
|
+
onMenuClose: W,
|
|
4354
4354
|
onMenuOpen: G,
|
|
4355
|
-
value:
|
|
4355
|
+
value: Q
|
|
4356
4356
|
});
|
|
4357
4357
|
}
|
|
4358
4358
|
var jl = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
4359
4359
|
function wi(n) {
|
|
4360
4360
|
var e = n.defaultOptions, t = e === void 0 ? !1 : e, i = n.cacheOptions, r = i === void 0 ? !1 : i, a = n.loadOptions;
|
|
4361
4361
|
n.options;
|
|
4362
|
-
var o = n.isLoading, u = o === void 0 ? !1 : o, s = n.onInputChange, l = n.filterOption, c = l === void 0 ? null : l, f = ve(n, jl), g = f.inputValue, p = H(void 0),
|
|
4363
|
-
r !== Lt && ($({}), tt(r)), t !== he && (
|
|
4364
|
-
return
|
|
4365
|
-
|
|
4362
|
+
var o = n.isLoading, u = o === void 0 ? !1 : o, s = n.onInputChange, l = n.filterOption, c = l === void 0 ? null : l, f = ve(n, jl), g = f.inputValue, p = H(void 0), m = H(!1), b = L(Array.isArray(t) ? t : void 0), v = se(b, 2), I = v[0], C = v[1], y = L(typeof g < "u" ? g : ""), h = se(y, 2), x = h[0], R = h[1], S = L(t === !0), T = se(S, 2), B = T[0], M = T[1], F = L(void 0), D = se(F, 2), G = D[0], W = D[1], V = L([]), j = se(V, 2), Q = j[0], U = j[1], re = L(!1), ie = se(re, 2), E = ie[0], P = ie[1], Z = L({}), w = se(Z, 2), k = w[0], $ = w[1], _ = L(void 0), oe = se(_, 2), he = oe[0], Pt = oe[1], et = L(void 0), Ze = se(et, 2), Lt = Ze[0], tt = Ze[1];
|
|
4363
|
+
r !== Lt && ($({}), tt(r)), t !== he && (C(Array.isArray(t) ? t : void 0), Pt(t)), q(function() {
|
|
4364
|
+
return m.current = !0, function() {
|
|
4365
|
+
m.current = !1;
|
|
4366
4366
|
};
|
|
4367
4367
|
}, []);
|
|
4368
4368
|
var _e = z(function(Je, Pe) {
|
|
@@ -4373,25 +4373,25 @@ function wi(n) {
|
|
|
4373
4373
|
});
|
|
4374
4374
|
}, [a]);
|
|
4375
4375
|
q(function() {
|
|
4376
|
-
t === !0 && _e(
|
|
4377
|
-
|
|
4376
|
+
t === !0 && _e(x, function(Je) {
|
|
4377
|
+
m.current && (C(Je || []), M(!!p.current));
|
|
4378
4378
|
});
|
|
4379
4379
|
}, []);
|
|
4380
4380
|
var co = z(function(Je, Pe) {
|
|
4381
4381
|
var ge = Ba(Je, Pe, s);
|
|
4382
4382
|
if (!ge) {
|
|
4383
|
-
p.current = void 0,
|
|
4383
|
+
p.current = void 0, R(""), W(""), U([]), M(!1), P(!1);
|
|
4384
4384
|
return;
|
|
4385
4385
|
}
|
|
4386
4386
|
if (r && k[ge])
|
|
4387
|
-
|
|
4387
|
+
R(ge), W(ge), U(k[ge]), M(!1), P(!1);
|
|
4388
4388
|
else {
|
|
4389
4389
|
var po = p.current = {};
|
|
4390
|
-
|
|
4391
|
-
|
|
4390
|
+
R(ge), M(!0), P(!G), _e(ge, function(Mt) {
|
|
4391
|
+
m && po === p.current && (p.current = void 0, M(!1), W(ge), U(Mt || []), P(!1), $(Mt ? X(X({}, k), {}, Xe({}, ge, Mt)) : k));
|
|
4392
4392
|
});
|
|
4393
4393
|
}
|
|
4394
|
-
}, [r, _e, G, k, s]), fo =
|
|
4394
|
+
}, [r, _e, G, k, s]), fo = E ? [] : x && G ? Q : I || [];
|
|
4395
4395
|
return X(X({}, f), {}, {
|
|
4396
4396
|
options: fo,
|
|
4397
4397
|
isLoading: B || u,
|
|
@@ -4427,33 +4427,33 @@ var $l = /* @__PURE__ */ Ft(function(n, e) {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
};
|
|
4429
4429
|
function Ti(n) {
|
|
4430
|
-
var e = n.allowCreateWhileLoading, t = e === void 0 ? !1 : e, i = n.createOptionPosition, r = i === void 0 ? "last" : i, a = n.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = n.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = n.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = n.onCreateOption, g = n.options, p = g === void 0 ? [] : g,
|
|
4431
|
-
return s(
|
|
4432
|
-
getOptionValue:
|
|
4433
|
-
getOptionLabel:
|
|
4434
|
-
}) ? c(
|
|
4435
|
-
}, [o, c,
|
|
4436
|
-
return (t || !
|
|
4437
|
-
}, [t, r,
|
|
4430
|
+
var e = n.allowCreateWhileLoading, t = e === void 0 ? !1 : e, i = n.createOptionPosition, r = i === void 0 ? "last" : i, a = n.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = n.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = n.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = n.onCreateOption, g = n.options, p = g === void 0 ? [] : g, m = n.onChange, b = ve(n, Ql), v = b.getOptionValue, I = v === void 0 ? yi : v, C = b.getOptionLabel, y = C === void 0 ? xi : C, h = b.inputValue, x = b.isLoading, R = b.isMulti, S = b.value, T = b.name, B = ae(function() {
|
|
4431
|
+
return s(h, yt(S), p, {
|
|
4432
|
+
getOptionValue: I,
|
|
4433
|
+
getOptionLabel: y
|
|
4434
|
+
}) ? c(h, o(h)) : void 0;
|
|
4435
|
+
}, [o, c, y, I, h, s, p, S]), M = ae(function() {
|
|
4436
|
+
return (t || !x) && B ? r === "first" ? [B].concat(ze(p)) : [].concat(ze(p), [B]) : p;
|
|
4437
|
+
}, [t, r, x, B, p]), F = z(function(D, G) {
|
|
4438
4438
|
if (G.action !== "select-option")
|
|
4439
|
-
return
|
|
4440
|
-
var
|
|
4441
|
-
if (
|
|
4442
|
-
if (f) f(
|
|
4439
|
+
return m(D, G);
|
|
4440
|
+
var W = Array.isArray(D) ? D : [D];
|
|
4441
|
+
if (W[W.length - 1] === B) {
|
|
4442
|
+
if (f) f(h);
|
|
4443
4443
|
else {
|
|
4444
|
-
var V = c(
|
|
4444
|
+
var V = c(h, h), j = {
|
|
4445
4445
|
action: "create-option",
|
|
4446
4446
|
name: T,
|
|
4447
4447
|
option: V
|
|
4448
4448
|
};
|
|
4449
|
-
|
|
4449
|
+
m(je(R, [].concat(ze(yt(S)), [V]), V), j);
|
|
4450
4450
|
}
|
|
4451
4451
|
return;
|
|
4452
4452
|
}
|
|
4453
|
-
|
|
4454
|
-
}, [c,
|
|
4453
|
+
m(D, G);
|
|
4454
|
+
}, [c, h, R, T, B, f, m, S]);
|
|
4455
4455
|
return X(X({}, b), {}, {
|
|
4456
|
-
options:
|
|
4456
|
+
options: M,
|
|
4457
4457
|
onChange: F
|
|
4458
4458
|
});
|
|
4459
4459
|
}
|
|
@@ -4480,7 +4480,7 @@ function Gi({
|
|
|
4480
4480
|
onFormulaConfigChange: s,
|
|
4481
4481
|
renderNative: l
|
|
4482
4482
|
}) {
|
|
4483
|
-
const c = n.formula === !0, f = Ke(), g = H(null), [p,
|
|
4483
|
+
const c = n.formula === !0, f = Ke(), g = H(null), [p, m] = L(
|
|
4484
4484
|
() => c && e in (u ?? {})
|
|
4485
4485
|
), b = H(p);
|
|
4486
4486
|
b.current = p, q(() => {
|
|
@@ -4489,28 +4489,28 @@ function Gi({
|
|
|
4489
4489
|
b.current && f.notifyFormulaToggle(!1);
|
|
4490
4490
|
};
|
|
4491
4491
|
}, []);
|
|
4492
|
-
const
|
|
4492
|
+
const v = p, [I, C] = L(
|
|
4493
4493
|
() => c && p ? Te(String(t ?? ""), !0) : []
|
|
4494
|
-
),
|
|
4495
|
-
|
|
4496
|
-
const S =
|
|
4497
|
-
|
|
4498
|
-
},
|
|
4499
|
-
const
|
|
4500
|
-
if (
|
|
4494
|
+
), y = H(t), h = (R) => {
|
|
4495
|
+
C(R);
|
|
4496
|
+
const S = v ? bt(R) : Ge(R);
|
|
4497
|
+
y.current = S, i(S);
|
|
4498
|
+
}, x = z(() => {
|
|
4499
|
+
const R = !p;
|
|
4500
|
+
if (m(R), f == null || f.notifyFormulaToggle(R, R ? g.current : null), R) {
|
|
4501
4501
|
const S = String(t ?? ""), T = Te(S, !0);
|
|
4502
|
-
|
|
4502
|
+
C(T);
|
|
4503
4503
|
const B = bt(T);
|
|
4504
|
-
|
|
4504
|
+
y.current = B, i(B), s == null || s({ ...u, [e]: Mr() });
|
|
4505
4505
|
} else {
|
|
4506
|
-
const S = Ge(
|
|
4507
|
-
|
|
4506
|
+
const S = Ge(I);
|
|
4507
|
+
y.current = S, i(S);
|
|
4508
4508
|
const T = { ...u };
|
|
4509
|
-
delete T[e], s == null || s(T),
|
|
4509
|
+
delete T[e], s == null || s(T), C([]);
|
|
4510
4510
|
}
|
|
4511
|
-
}, [p, f, t,
|
|
4512
|
-
return c ? /* @__PURE__ */
|
|
4513
|
-
/* @__PURE__ */
|
|
4511
|
+
}, [p, f, t, I, u, e, s, i]);
|
|
4512
|
+
return c ? /* @__PURE__ */ O("div", { children: [
|
|
4513
|
+
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0 }, children: [
|
|
4514
4514
|
/* @__PURE__ */ d(
|
|
4515
4515
|
le,
|
|
4516
4516
|
{
|
|
@@ -4527,13 +4527,13 @@ function Gi({
|
|
|
4527
4527
|
{
|
|
4528
4528
|
title: p ? "Use static value (dropdown)" : "Use dynamic formula expression",
|
|
4529
4529
|
placement: "top",
|
|
4530
|
-
children: /* @__PURE__ */
|
|
4530
|
+
children: /* @__PURE__ */ O(
|
|
4531
4531
|
N,
|
|
4532
4532
|
{
|
|
4533
4533
|
component: "button",
|
|
4534
4534
|
type: "button",
|
|
4535
4535
|
ref: g,
|
|
4536
|
-
onClick:
|
|
4536
|
+
onClick: x,
|
|
4537
4537
|
sx: {
|
|
4538
4538
|
border: "none",
|
|
4539
4539
|
cursor: "pointer",
|
|
@@ -4567,16 +4567,16 @@ function Gi({
|
|
|
4567
4567
|
$r,
|
|
4568
4568
|
{
|
|
4569
4569
|
id: e,
|
|
4570
|
-
expression:
|
|
4571
|
-
onExpressionChange:
|
|
4570
|
+
expression: I,
|
|
4571
|
+
onExpressionChange: h,
|
|
4572
4572
|
onBlur: r,
|
|
4573
4573
|
placeholder: n.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
4574
4574
|
disabled: n.disabled === !0,
|
|
4575
4575
|
error: a,
|
|
4576
|
-
formulaConfigEnabled:
|
|
4576
|
+
formulaConfigEnabled: v
|
|
4577
4577
|
}
|
|
4578
4578
|
) : l()
|
|
4579
|
-
] }) : /* @__PURE__ */
|
|
4579
|
+
] }) : /* @__PURE__ */ O("div", { children: [
|
|
4580
4580
|
/* @__PURE__ */ d(
|
|
4581
4581
|
le,
|
|
4582
4582
|
{
|
|
@@ -4593,7 +4593,7 @@ function Gi({
|
|
|
4593
4593
|
] });
|
|
4594
4594
|
}
|
|
4595
4595
|
function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, touched: o, formulaConfig: u, onFormulaConfigChange: s }) {
|
|
4596
|
-
var
|
|
4596
|
+
var M;
|
|
4597
4597
|
const l = n, c = !!(o && a), f = l.disabled === !0, g = (F) => l.getOptionValue ? l.getOptionValue(F) : F.value ?? F.id, p = ae(
|
|
4598
4598
|
() => (l.options ?? []).map((F) => ({
|
|
4599
4599
|
...F,
|
|
@@ -4601,30 +4601,30 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4601
4601
|
})),
|
|
4602
4602
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4603
4603
|
[l.options]
|
|
4604
|
-
), [
|
|
4604
|
+
), [m, b] = L(0), v = ((M = l.dependsOn) == null ? void 0 : M.map((F) => t[F])) ?? [];
|
|
4605
4605
|
q(() => {
|
|
4606
4606
|
var F;
|
|
4607
4607
|
(F = l.dependsOn) != null && F.length && b((D) => D + 1);
|
|
4608
|
-
},
|
|
4609
|
-
const
|
|
4608
|
+
}, v);
|
|
4609
|
+
const I = !!l.loadOptions, [C, y] = L(null), h = H(!1);
|
|
4610
4610
|
q(() => {
|
|
4611
|
-
if (!
|
|
4611
|
+
if (!I || h.current || e == null || e === "" || Array.isArray(e) && e.length === 0) return;
|
|
4612
4612
|
const F = Array.isArray(e) ? e : [e];
|
|
4613
|
-
|
|
4614
|
-
G.length !== 0 &&
|
|
4613
|
+
h.current = !0, (l.loadValue ? l.loadValue(F) : l.loadOptions("").then((G) => G.filter((W) => F.some((V) => String(g(W)) === String(V))))).then((G) => {
|
|
4614
|
+
G.length !== 0 && y(l.isMulti ? G : G[0]);
|
|
4615
4615
|
}).catch(() => {
|
|
4616
|
-
|
|
4616
|
+
h.current = !1;
|
|
4617
4617
|
});
|
|
4618
|
-
}, [
|
|
4619
|
-
const
|
|
4618
|
+
}, [I, e]);
|
|
4619
|
+
const x = ae(() => {
|
|
4620
4620
|
if (e == null || e === "") return l.isMulti ? [] : null;
|
|
4621
|
-
if (
|
|
4621
|
+
if (I) return C;
|
|
4622
4622
|
if (l.isMulti) {
|
|
4623
4623
|
const F = Array.isArray(e) ? e : [e];
|
|
4624
4624
|
return p.filter((D) => F.includes(g(D)));
|
|
4625
4625
|
}
|
|
4626
4626
|
return p.find((F) => String(g(F)) === String(e)) ?? null;
|
|
4627
|
-
}, [e, p, l.isMulti,
|
|
4627
|
+
}, [e, p, l.isMulti, I, C]), R = (F) => (I && 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...",
|
|
@@ -4632,8 +4632,8 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4632
4632
|
isMulti: l.isMulti ?? !1,
|
|
4633
4633
|
isSearchable: l.isSearchable ?? !0,
|
|
4634
4634
|
isClearable: l.isClearable ?? !1,
|
|
4635
|
-
value:
|
|
4636
|
-
onChange:
|
|
4635
|
+
value: x,
|
|
4636
|
+
onChange: R,
|
|
4637
4637
|
onBlur: r,
|
|
4638
4638
|
styles: Lr(c, l.isMulti),
|
|
4639
4639
|
menuPortalTarget: typeof document < "u" ? document.body : void 0,
|
|
@@ -4651,7 +4651,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4651
4651
|
cacheOptions: !0,
|
|
4652
4652
|
...S
|
|
4653
4653
|
},
|
|
4654
|
-
|
|
4654
|
+
m
|
|
4655
4655
|
) : F ? /* @__PURE__ */ d(
|
|
4656
4656
|
Ul,
|
|
4657
4657
|
{
|
|
@@ -4660,7 +4660,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4660
4660
|
cacheOptions: !0,
|
|
4661
4661
|
...S
|
|
4662
4662
|
},
|
|
4663
|
-
|
|
4663
|
+
m
|
|
4664
4664
|
) : D ? /* @__PURE__ */ d(Kl, { options: p, ...S }) : /* @__PURE__ */ d(mn, { options: p, ...S });
|
|
4665
4665
|
}, B = l.id ?? l.name ?? "";
|
|
4666
4666
|
return /* @__PURE__ */ d(
|
|
@@ -4675,7 +4675,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4675
4675
|
helperText: l.helperText,
|
|
4676
4676
|
formulaConfig: u,
|
|
4677
4677
|
onFormulaConfigChange: s,
|
|
4678
|
-
renderNative: () => /* @__PURE__ */
|
|
4678
|
+
renderNative: () => /* @__PURE__ */ O(Ve, { children: [
|
|
4679
4679
|
T(),
|
|
4680
4680
|
c && /* @__PURE__ */ d("small", { "data-testid": `${l.name}-error`, style: fe, children: a })
|
|
4681
4681
|
] })
|
|
@@ -4698,13 +4698,13 @@ const ru = {
|
|
|
4698
4698
|
overflowWrap: "anywhere"
|
|
4699
4699
|
}, ou = (n) => {
|
|
4700
4700
|
const { data: e, isSelected: t, isDisabled: i } = n;
|
|
4701
|
-
return /* @__PURE__ */ d(vn.Option, { ...n, children: /* @__PURE__ */
|
|
4701
|
+
return /* @__PURE__ */ d(vn.Option, { ...n, children: /* @__PURE__ */ O(
|
|
4702
4702
|
"div",
|
|
4703
4703
|
{
|
|
4704
4704
|
className: "ff-form-d-flex ff-form-align-start ff-form-justify-between ff-form-w-100",
|
|
4705
4705
|
title: i ? e.disabledReason ?? "Coming soon" : void 0,
|
|
4706
4706
|
children: [
|
|
4707
|
-
/* @__PURE__ */
|
|
4707
|
+
/* @__PURE__ */ O("div", { className: "ff-form-d-flex ff-form-align-start ff-form-gap-2 ff-form-flex-grow-1", style: { minWidth: 0 }, children: [
|
|
4708
4708
|
e.icon && /* @__PURE__ */ d(
|
|
4709
4709
|
"div",
|
|
4710
4710
|
{
|
|
@@ -4717,7 +4717,7 @@ const ru = {
|
|
|
4717
4717
|
children: e.icon
|
|
4718
4718
|
}
|
|
4719
4719
|
),
|
|
4720
|
-
/* @__PURE__ */
|
|
4720
|
+
/* @__PURE__ */ O("div", { className: "ff-form-flex-grow-1", style: { minWidth: 0 }, children: [
|
|
4721
4721
|
/* @__PURE__ */ d(
|
|
4722
4722
|
"div",
|
|
4723
4723
|
{
|
|
@@ -4750,7 +4750,7 @@ const ru = {
|
|
|
4750
4750
|
) });
|
|
4751
4751
|
}, au = (n) => {
|
|
4752
4752
|
const { data: e } = n;
|
|
4753
|
-
return /* @__PURE__ */ d(vn.SingleValue, { ...n, children: /* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ d(vn.SingleValue, { ...n, children: /* @__PURE__ */ O("div", { className: "ff-form-d-flex ff-form-align-center ff-form-gap-2 ff-form-text-dark ff-form-w-100", title: e.label, children: [
|
|
4754
4754
|
e.icon && /* @__PURE__ */ d("div", { className: "ff-form-d-flex ff-form-align-center ff-form-flex-shrink-0", style: { fontSize: 16 }, children: e.icon }),
|
|
4755
4755
|
/* @__PURE__ */ d(
|
|
4756
4756
|
"span",
|
|
@@ -4841,32 +4841,32 @@ function lu({
|
|
|
4841
4841
|
onFormulaConfigChange: u
|
|
4842
4842
|
}) {
|
|
4843
4843
|
const s = !!(a && r), l = n.isMulti ?? !1, c = n.id ?? n.name ?? "", f = ae(
|
|
4844
|
-
() => (n.options ?? []).map((
|
|
4845
|
-
...
|
|
4846
|
-
value:
|
|
4844
|
+
() => (n.options ?? []).map((I) => ({
|
|
4845
|
+
...I,
|
|
4846
|
+
value: I.id ?? I.value
|
|
4847
4847
|
})),
|
|
4848
4848
|
[n.options]
|
|
4849
|
-
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = ae(() => new Set(g.map((
|
|
4849
|
+
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = ae(() => new Set(g.map((I) => String(I))), [g]), m = ae(() => l ? f.filter((I) => p.has(String(I.value ?? ""))) : f.find((I) => String(I.value ?? "") === String(e ?? "")) ?? null, [l, f, e, p]), v = /* @__PURE__ */ O(Ve, { children: [
|
|
4850
4850
|
/* @__PURE__ */ d(
|
|
4851
4851
|
mn,
|
|
4852
4852
|
{
|
|
4853
4853
|
inputId: c,
|
|
4854
|
-
value:
|
|
4855
|
-
onChange: (
|
|
4854
|
+
value: m,
|
|
4855
|
+
onChange: (I) => {
|
|
4856
4856
|
if (l) {
|
|
4857
|
-
const
|
|
4858
|
-
t(
|
|
4857
|
+
const y = I;
|
|
4858
|
+
t(y == null ? [] : y.map((h) => h.value));
|
|
4859
4859
|
return;
|
|
4860
4860
|
}
|
|
4861
|
-
const
|
|
4862
|
-
t(
|
|
4861
|
+
const C = I;
|
|
4862
|
+
t(C == null ? null : C.value);
|
|
4863
4863
|
},
|
|
4864
4864
|
onBlur: i,
|
|
4865
4865
|
options: f,
|
|
4866
4866
|
placeholder: n.placeholder ?? "Select option...",
|
|
4867
4867
|
isMulti: l,
|
|
4868
4868
|
isDisabled: n.disabled ?? !1,
|
|
4869
|
-
isOptionDisabled: (
|
|
4869
|
+
isOptionDisabled: (I) => !!I.isDisabled,
|
|
4870
4870
|
isSearchable: !0,
|
|
4871
4871
|
styles: su(s),
|
|
4872
4872
|
components: { Option: ou, SingleValue: au },
|
|
@@ -4889,7 +4889,7 @@ function lu({
|
|
|
4889
4889
|
helperText: n.helperText,
|
|
4890
4890
|
formulaConfig: o,
|
|
4891
4891
|
onFormulaConfigChange: u,
|
|
4892
|
-
renderNative: () =>
|
|
4892
|
+
renderNative: () => v
|
|
4893
4893
|
}
|
|
4894
4894
|
) });
|
|
4895
4895
|
}
|
|
@@ -4968,7 +4968,7 @@ function pu({
|
|
|
4968
4968
|
options: t,
|
|
4969
4969
|
disabled: i
|
|
4970
4970
|
}) {
|
|
4971
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ O(
|
|
4972
4972
|
Vr,
|
|
4973
4973
|
{
|
|
4974
4974
|
size: "small",
|
|
@@ -4994,8 +4994,8 @@ function Vi({
|
|
|
4994
4994
|
}) {
|
|
4995
4995
|
return /* @__PURE__ */ d(N, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: n.map((a) => {
|
|
4996
4996
|
const o = a.id ?? a.name ?? "", u = a.colSpan ?? Math.max(2, Math.floor(12 / n.length)), s = `${Math.round(u / 12 * 100)}%`;
|
|
4997
|
-
return /* @__PURE__ */
|
|
4998
|
-
a.label && /* @__PURE__ */
|
|
4997
|
+
return /* @__PURE__ */ O(N, { sx: { flex: `0 0 calc(${s} - 8px)`, minWidth: 100 }, children: [
|
|
4998
|
+
a.label && /* @__PURE__ */ O(de, { 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
|
] }),
|
|
@@ -5026,7 +5026,7 @@ function Vi({
|
|
|
5026
5026
|
}
|
|
5027
5027
|
}
|
|
5028
5028
|
)
|
|
5029
|
-
) : a.type === "select" ? /* @__PURE__ */
|
|
5029
|
+
) : a.type === "select" ? /* @__PURE__ */ O(
|
|
5030
5030
|
Vr,
|
|
5031
5031
|
{
|
|
5032
5032
|
size: "small",
|
|
@@ -5064,7 +5064,7 @@ function Di({
|
|
|
5064
5064
|
onRemove: i,
|
|
5065
5065
|
children: r
|
|
5066
5066
|
}) {
|
|
5067
|
-
return /* @__PURE__ */
|
|
5067
|
+
return /* @__PURE__ */ O(N, { sx: {
|
|
5068
5068
|
position: "relative",
|
|
5069
5069
|
// Match the breathing room of the host's "Conditional / Fallback" blocks:
|
|
5070
5070
|
// generous interior padding, comfortable inter-block gap.
|
|
@@ -5082,7 +5082,7 @@ function Di({
|
|
|
5082
5082
|
}, children: [
|
|
5083
5083
|
e && // Pill chip — visually consistent with the host's "Conditional" /
|
|
5084
5084
|
// "Fallback" tags. Sits above the first field with a 12px gap.
|
|
5085
|
-
/* @__PURE__ */
|
|
5085
|
+
/* @__PURE__ */ O(
|
|
5086
5086
|
N,
|
|
5087
5087
|
{
|
|
5088
5088
|
component: "span",
|
|
@@ -5142,18 +5142,18 @@ function gu({
|
|
|
5142
5142
|
renderFieldRouter: f,
|
|
5143
5143
|
disabled: g,
|
|
5144
5144
|
minItems: p,
|
|
5145
|
-
maxItems:
|
|
5145
|
+
maxItems: m
|
|
5146
5146
|
}) {
|
|
5147
|
-
const [b,
|
|
5147
|
+
const [b, v] = L(() => i.map(() => Oe()));
|
|
5148
5148
|
q(() => {
|
|
5149
|
-
b.length !== i.length &&
|
|
5149
|
+
b.length !== i.length && v((h) => i.length > h.length ? [...h, ...Array.from({ length: i.length - h.length }, () => Oe())] : h.slice(0, i.length));
|
|
5150
5150
|
}, [i.length]);
|
|
5151
|
-
const
|
|
5152
|
-
i.length >=
|
|
5153
|
-
}, [i,
|
|
5154
|
-
i.length <= p || (u(e, i.filter((
|
|
5155
|
-
}, [i, p, u, e]),
|
|
5156
|
-
return /* @__PURE__ */
|
|
5151
|
+
const I = z(() => {
|
|
5152
|
+
i.length >= m || (u(e, [...i, Ni(t)]), v((h) => [...h, Oe()]));
|
|
5153
|
+
}, [i, m, u, e, t]), C = z((h) => {
|
|
5154
|
+
i.length <= p || (u(e, i.filter((x, R) => R !== h)), v((x) => x.filter((R, S) => S !== h)));
|
|
5155
|
+
}, [i, p, u, e]), y = n;
|
|
5156
|
+
return /* @__PURE__ */ O(N, { children: [
|
|
5157
5157
|
/* @__PURE__ */ d(
|
|
5158
5158
|
le,
|
|
5159
5159
|
{
|
|
@@ -5174,17 +5174,17 @@ function gu({
|
|
|
5174
5174
|
color: "#94a3b8",
|
|
5175
5175
|
fontSize: 13
|
|
5176
5176
|
}, children: "No items yet — click Add to start" }),
|
|
5177
|
-
i.map((
|
|
5177
|
+
i.map((h, x) => /* @__PURE__ */ d(
|
|
5178
5178
|
Di,
|
|
5179
5179
|
{
|
|
5180
|
-
index:
|
|
5181
|
-
itemLabel:
|
|
5180
|
+
index: x,
|
|
5181
|
+
itemLabel: y.itemLabel,
|
|
5182
5182
|
canRemove: i.length > p && !g,
|
|
5183
|
-
onRemove: () =>
|
|
5184
|
-
children: /* @__PURE__ */ d(N, { children: t.map((
|
|
5185
|
-
const S =
|
|
5183
|
+
onRemove: () => C(x),
|
|
5184
|
+
children: /* @__PURE__ */ d(N, { children: t.map((R) => {
|
|
5185
|
+
const S = R.id ?? R.name ?? "", T = `${e}.${x}.${S}`;
|
|
5186
5186
|
return f({
|
|
5187
|
-
field:
|
|
5187
|
+
field: R,
|
|
5188
5188
|
pathPrefix: T,
|
|
5189
5189
|
depth: l + 1,
|
|
5190
5190
|
values: r,
|
|
@@ -5192,6 +5192,10 @@ function gu({
|
|
|
5192
5192
|
touched: o,
|
|
5193
5193
|
setFieldValue: u,
|
|
5194
5194
|
setFieldTouched: s,
|
|
5195
|
+
// Item-scoped values for this row — lets the child's
|
|
5196
|
+
// shouldHide / shouldDisable / shouldRequire / compute see
|
|
5197
|
+
// its siblings via `ctx.item` without splicing the path.
|
|
5198
|
+
item: h && typeof h == "object" ? h : void 0,
|
|
5195
5199
|
// Keep normal sibling spacing inside the row (32px between
|
|
5196
5200
|
// fields). The RowShell's CSS kills the LAST child's
|
|
5197
5201
|
// trailing margin so the row hugs its content.
|
|
@@ -5200,15 +5204,15 @@ function gu({
|
|
|
5200
5204
|
});
|
|
5201
5205
|
}) })
|
|
5202
5206
|
},
|
|
5203
|
-
b[
|
|
5207
|
+
b[x] ?? x
|
|
5204
5208
|
)),
|
|
5205
5209
|
i.length > 0 && /* @__PURE__ */ d(hn, { sx: { mb: 1, borderColor: "transparent" } }),
|
|
5206
|
-
i.length <
|
|
5210
|
+
i.length < m && /* @__PURE__ */ O(
|
|
5207
5211
|
N,
|
|
5208
5212
|
{
|
|
5209
5213
|
component: "button",
|
|
5210
5214
|
type: "button",
|
|
5211
|
-
onClick:
|
|
5215
|
+
onClick: I,
|
|
5212
5216
|
disabled: g,
|
|
5213
5217
|
sx: {
|
|
5214
5218
|
display: "inline-flex",
|
|
@@ -5227,7 +5231,7 @@ function gu({
|
|
|
5227
5231
|
},
|
|
5228
5232
|
children: [
|
|
5229
5233
|
/* @__PURE__ */ d(qe, { size: 14 }),
|
|
5230
|
-
|
|
5234
|
+
y.addLabel ?? `Add ${y.itemLabel ?? "item"}`
|
|
5231
5235
|
]
|
|
5232
5236
|
}
|
|
5233
5237
|
)
|
|
@@ -5247,14 +5251,14 @@ function Dt(n) {
|
|
|
5247
5251
|
depth: c = 0,
|
|
5248
5252
|
compact: f,
|
|
5249
5253
|
renderFieldRouter: g
|
|
5250
|
-
} = n, p = e,
|
|
5251
|
-
if (!!g && typeof r == "string" && Array.isArray(
|
|
5254
|
+
} = n, p = e, m = e.disabled === !0, b = p.itemType ?? "text", v = p.minItems ?? 0, I = p.maxItems ?? 1 / 0, C = e.children ?? p.itemFields;
|
|
5255
|
+
if (!!g && typeof r == "string" && Array.isArray(C) && C.length > 0)
|
|
5252
5256
|
return /* @__PURE__ */ d(
|
|
5253
5257
|
gu,
|
|
5254
5258
|
{
|
|
5255
5259
|
field: e,
|
|
5256
5260
|
pathPrefix: r,
|
|
5257
|
-
childFields:
|
|
5261
|
+
childFields: C,
|
|
5258
5262
|
items: ot(t),
|
|
5259
5263
|
values: a ?? {},
|
|
5260
5264
|
errors: o ?? {},
|
|
@@ -5266,31 +5270,31 @@ function Dt(n) {
|
|
|
5266
5270
|
depth: c,
|
|
5267
5271
|
compact: f,
|
|
5268
5272
|
renderFieldRouter: g,
|
|
5269
|
-
disabled:
|
|
5270
|
-
minItems:
|
|
5271
|
-
maxItems:
|
|
5273
|
+
disabled: m,
|
|
5274
|
+
minItems: v,
|
|
5275
|
+
maxItems: I
|
|
5272
5276
|
}
|
|
5273
5277
|
);
|
|
5274
|
-
const [
|
|
5278
|
+
const [h, x] = L(() => jt(ot(t))), R = H(JSON.stringify($t(h)));
|
|
5275
5279
|
q(() => {
|
|
5276
|
-
if (JSON.stringify(ot(t)) !==
|
|
5280
|
+
if (JSON.stringify(ot(t)) !== R.current) {
|
|
5277
5281
|
const D = jt(ot(t));
|
|
5278
|
-
|
|
5282
|
+
x(D), R.current = JSON.stringify($t(D));
|
|
5279
5283
|
}
|
|
5280
5284
|
}, [t]);
|
|
5281
5285
|
const S = z((F) => {
|
|
5282
5286
|
const D = jt(F);
|
|
5283
|
-
|
|
5287
|
+
x(D);
|
|
5284
5288
|
const G = $t(D);
|
|
5285
|
-
|
|
5289
|
+
R.current = JSON.stringify(G), i(G);
|
|
5286
5290
|
}, [i]), T = z(() => {
|
|
5287
|
-
|
|
5288
|
-
}, [
|
|
5289
|
-
|
|
5290
|
-
}, [
|
|
5291
|
-
S(
|
|
5292
|
-
}, [
|
|
5293
|
-
return /* @__PURE__ */
|
|
5291
|
+
h.length >= I || S([...h, cu(b, p.itemFields)]);
|
|
5292
|
+
}, [h, b, p.itemFields, I, S]), B = z((F) => {
|
|
5293
|
+
h.length <= v || S(h.filter((D) => Ut(D) !== F));
|
|
5294
|
+
}, [h, v, S]), M = z((F, D) => {
|
|
5295
|
+
S(h.map((G) => Ut(G) !== F ? G : D !== null && typeof D == "object" && !Array.isArray(D) ? { ...D, [Ce]: F } : { [Ce]: F, __value: D }));
|
|
5296
|
+
}, [h, S]);
|
|
5297
|
+
return /* @__PURE__ */ O(N, { children: [
|
|
5294
5298
|
/* @__PURE__ */ d(
|
|
5295
5299
|
le,
|
|
5296
5300
|
{
|
|
@@ -5302,7 +5306,7 @@ function Dt(n) {
|
|
|
5302
5306
|
}
|
|
5303
5307
|
),
|
|
5304
5308
|
e.helperText && /* @__PURE__ */ d(de, { sx: { fontSize: 12, color: "#6c757d", mb: 0.75 }, children: e.helperText }),
|
|
5305
|
-
|
|
5309
|
+
h.length === 0 && /* @__PURE__ */ d(N, { sx: {
|
|
5306
5310
|
py: 2.5,
|
|
5307
5311
|
textAlign: "center",
|
|
5308
5312
|
border: "1.5px dashed #e2e8f0",
|
|
@@ -5311,30 +5315,30 @@ function Dt(n) {
|
|
|
5311
5315
|
color: "#94a3b8",
|
|
5312
5316
|
fontSize: 13
|
|
5313
5317
|
}, children: "No items yet — click Add to start" }),
|
|
5314
|
-
|
|
5315
|
-
const G = Ut(F),
|
|
5318
|
+
h.map((F, D) => {
|
|
5319
|
+
const G = Ut(F), W = du(F);
|
|
5316
5320
|
return /* @__PURE__ */ d(
|
|
5317
5321
|
Di,
|
|
5318
5322
|
{
|
|
5319
5323
|
index: D,
|
|
5320
5324
|
itemLabel: p.itemLabel,
|
|
5321
|
-
canRemove:
|
|
5325
|
+
canRemove: h.length > v && !m,
|
|
5322
5326
|
onRemove: () => B(G),
|
|
5323
5327
|
children: b === "object" && p.itemFields ? /* @__PURE__ */ d(
|
|
5324
5328
|
Vi,
|
|
5325
5329
|
{
|
|
5326
5330
|
fields: p.itemFields,
|
|
5327
|
-
value:
|
|
5328
|
-
onChange: (V) =>
|
|
5329
|
-
disabled:
|
|
5331
|
+
value: W ?? {},
|
|
5332
|
+
onChange: (V) => M(G, V),
|
|
5333
|
+
disabled: m
|
|
5330
5334
|
}
|
|
5331
5335
|
) : b === "select" ? /* @__PURE__ */ d(
|
|
5332
5336
|
pu,
|
|
5333
5337
|
{
|
|
5334
|
-
value:
|
|
5335
|
-
onChange: (V) =>
|
|
5338
|
+
value: W,
|
|
5339
|
+
onChange: (V) => M(G, V),
|
|
5336
5340
|
options: p.itemOptions ?? [],
|
|
5337
|
-
disabled:
|
|
5341
|
+
disabled: m
|
|
5338
5342
|
}
|
|
5339
5343
|
) : b === "array" ? /* @__PURE__ */ d(
|
|
5340
5344
|
Dt,
|
|
@@ -5345,34 +5349,34 @@ function Dt(n) {
|
|
|
5345
5349
|
type: "array",
|
|
5346
5350
|
label: void 0
|
|
5347
5351
|
},
|
|
5348
|
-
value:
|
|
5352
|
+
value: W,
|
|
5349
5353
|
values: {},
|
|
5350
|
-
onChange: (V) =>
|
|
5354
|
+
onChange: (V) => M(G, V),
|
|
5351
5355
|
onBlur: () => {
|
|
5352
5356
|
}
|
|
5353
5357
|
}
|
|
5354
5358
|
) : /* @__PURE__ */ d(
|
|
5355
5359
|
fu,
|
|
5356
5360
|
{
|
|
5357
|
-
value:
|
|
5358
|
-
onChange: (V) =>
|
|
5361
|
+
value: W,
|
|
5362
|
+
onChange: (V) => M(G, b === "number" ? V === "" ? "" : Number(V) : V),
|
|
5359
5363
|
inputType: b,
|
|
5360
5364
|
placeholder: p.itemPlaceholder,
|
|
5361
|
-
disabled:
|
|
5365
|
+
disabled: m
|
|
5362
5366
|
}
|
|
5363
5367
|
)
|
|
5364
5368
|
},
|
|
5365
5369
|
G
|
|
5366
5370
|
);
|
|
5367
5371
|
}),
|
|
5368
|
-
|
|
5369
|
-
|
|
5372
|
+
h.length > 0 && /* @__PURE__ */ d(hn, { sx: { mb: 1, borderColor: "transparent" } }),
|
|
5373
|
+
h.length < I && /* @__PURE__ */ O(
|
|
5370
5374
|
N,
|
|
5371
5375
|
{
|
|
5372
5376
|
component: "button",
|
|
5373
5377
|
type: "button",
|
|
5374
5378
|
onClick: T,
|
|
5375
|
-
disabled:
|
|
5379
|
+
disabled: m,
|
|
5376
5380
|
sx: {
|
|
5377
5381
|
display: "inline-flex",
|
|
5378
5382
|
alignItems: "center",
|
|
@@ -5380,12 +5384,12 @@ function Dt(n) {
|
|
|
5380
5384
|
border: "1px dashed #cbd5e1",
|
|
5381
5385
|
borderRadius: "6px",
|
|
5382
5386
|
background: "none",
|
|
5383
|
-
cursor:
|
|
5387
|
+
cursor: m ? "not-allowed" : "pointer",
|
|
5384
5388
|
px: 1.5,
|
|
5385
5389
|
py: 0.6,
|
|
5386
5390
|
fontSize: 12.5,
|
|
5387
5391
|
color: "#6366f1",
|
|
5388
|
-
opacity:
|
|
5392
|
+
opacity: m ? 0.5 : 1,
|
|
5389
5393
|
"&:hover:not(:disabled)": { borderColor: "#6366f1", bgcolor: "#f5f3ff" }
|
|
5390
5394
|
},
|
|
5391
5395
|
children: [
|
|
@@ -5401,7 +5405,7 @@ function bu(n) {
|
|
|
5401
5405
|
}
|
|
5402
5406
|
function $e({ field: n, children: e, compact: t }) {
|
|
5403
5407
|
const i = typeof n.colSpan == "number" ? n.colSpan : 12;
|
|
5404
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ O(Ve, { children: [
|
|
5405
5409
|
/* @__PURE__ */ d(
|
|
5406
5410
|
"div",
|
|
5407
5411
|
{
|
|
@@ -5450,7 +5454,7 @@ function mu({ field: n, value: e, onChange: t, onBlur: i }) {
|
|
|
5450
5454
|
const g = { ...lr(r, u.current), [l]: c };
|
|
5451
5455
|
u.current = g, t(g);
|
|
5452
5456
|
}
|
|
5453
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ O(N, { children: [
|
|
5454
5458
|
/* @__PURE__ */ d(
|
|
5455
5459
|
le,
|
|
5456
5460
|
{
|
|
@@ -5503,7 +5507,7 @@ function vu({
|
|
|
5503
5507
|
q(() => {
|
|
5504
5508
|
e !== g.current && (g.current = e, f(e == null || e === "" ? "" : String(e)));
|
|
5505
5509
|
}, [e]);
|
|
5506
|
-
const p = !!o.prefix,
|
|
5510
|
+
const p = !!o.prefix, m = !!o.suffix, b = p || m, v = {
|
|
5507
5511
|
flex: 1,
|
|
5508
5512
|
border: "none",
|
|
5509
5513
|
outline: "none",
|
|
@@ -5517,7 +5521,7 @@ function vu({
|
|
|
5517
5521
|
width: "100%",
|
|
5518
5522
|
appearance: "none",
|
|
5519
5523
|
MozAppearance: "textfield"
|
|
5520
|
-
},
|
|
5524
|
+
}, I = {
|
|
5521
5525
|
display: "flex",
|
|
5522
5526
|
alignItems: "stretch",
|
|
5523
5527
|
width: "100%",
|
|
@@ -5526,7 +5530,7 @@ function vu({
|
|
|
5526
5530
|
backgroundColor: l ? A.COLOR_DISABLED_BG : "#fff",
|
|
5527
5531
|
boxSizing: "border-box",
|
|
5528
5532
|
transition: "border-color .15s, box-shadow .15s"
|
|
5529
|
-
},
|
|
5533
|
+
}, C = {
|
|
5530
5534
|
display: "flex",
|
|
5531
5535
|
alignItems: "center",
|
|
5532
5536
|
padding: "0 10px",
|
|
@@ -5534,14 +5538,14 @@ function vu({
|
|
|
5534
5538
|
fontSize: 13,
|
|
5535
5539
|
whiteSpace: "nowrap",
|
|
5536
5540
|
flexShrink: 0,
|
|
5537
|
-
borderLeft:
|
|
5541
|
+
borderLeft: m ? "1px solid rgba(0,0,0,0.1)" : void 0,
|
|
5538
5542
|
borderRight: p ? "1px solid rgba(0,0,0,0.1)" : void 0
|
|
5539
|
-
},
|
|
5540
|
-
|
|
5541
|
-
},
|
|
5542
|
-
|
|
5543
|
+
}, y = (x) => {
|
|
5544
|
+
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;
|
|
5545
|
+
}, h = (x) => {
|
|
5546
|
+
x.currentTarget.contains(x.relatedTarget) || (x.currentTarget.style.borderColor = s ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR, x.currentTarget.style.boxShadow = "none", i());
|
|
5543
5547
|
};
|
|
5544
|
-
return /* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5545
5549
|
/* @__PURE__ */ d(
|
|
5546
5550
|
le,
|
|
5547
5551
|
{
|
|
@@ -5554,14 +5558,14 @@ function vu({
|
|
|
5554
5558
|
}
|
|
5555
5559
|
),
|
|
5556
5560
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5557
|
-
/* @__PURE__ */
|
|
5561
|
+
/* @__PURE__ */ O(
|
|
5558
5562
|
"div",
|
|
5559
5563
|
{
|
|
5560
|
-
style: b ?
|
|
5561
|
-
onFocus: b ?
|
|
5562
|
-
onBlur: b ?
|
|
5564
|
+
style: b ? I : void 0,
|
|
5565
|
+
onFocus: b ? y : void 0,
|
|
5566
|
+
onBlur: b ? h : void 0,
|
|
5563
5567
|
children: [
|
|
5564
|
-
p && /* @__PURE__ */ d("span", { style:
|
|
5568
|
+
p && /* @__PURE__ */ d("span", { style: C, children: o.prefix }),
|
|
5565
5569
|
/* @__PURE__ */ d(
|
|
5566
5570
|
"input",
|
|
5567
5571
|
{
|
|
@@ -5576,27 +5580,27 @@ function vu({
|
|
|
5576
5580
|
placeholder: o.placeholder ?? "",
|
|
5577
5581
|
value: c,
|
|
5578
5582
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
5579
|
-
style: b ?
|
|
5580
|
-
...
|
|
5583
|
+
style: b ? v : {
|
|
5584
|
+
...v,
|
|
5581
5585
|
border: s ? A.BORDER_ERROR : A.BORDER,
|
|
5582
5586
|
borderRadius: A.BORDER_RADIUS,
|
|
5583
5587
|
backgroundColor: l ? A.COLOR_DISABLED_BG : "#fff"
|
|
5584
5588
|
},
|
|
5585
|
-
onChange: (
|
|
5586
|
-
const
|
|
5587
|
-
f(
|
|
5588
|
-
const S =
|
|
5589
|
+
onChange: (x) => {
|
|
5590
|
+
const R = x.target.value;
|
|
5591
|
+
f(R);
|
|
5592
|
+
const S = R === "" ? null : Number(R);
|
|
5589
5593
|
g.current = S, t(S);
|
|
5590
5594
|
},
|
|
5591
|
-
onFocus: b ? void 0 : (
|
|
5592
|
-
|
|
5595
|
+
onFocus: b ? void 0 : (x) => {
|
|
5596
|
+
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;
|
|
5593
5597
|
},
|
|
5594
|
-
onBlurCapture: b ? void 0 : (
|
|
5595
|
-
|
|
5598
|
+
onBlurCapture: b ? void 0 : (x) => {
|
|
5599
|
+
x.currentTarget.style.borderColor = s ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR, x.currentTarget.style.boxShadow = "none", i();
|
|
5596
5600
|
}
|
|
5597
5601
|
}
|
|
5598
5602
|
),
|
|
5599
|
-
|
|
5603
|
+
m && /* @__PURE__ */ d("span", { style: { ...C, borderRight: void 0 }, children: o.suffix })
|
|
5600
5604
|
]
|
|
5601
5605
|
}
|
|
5602
5606
|
),
|
|
@@ -5637,7 +5641,7 @@ function Iu({
|
|
|
5637
5641
|
sx: { m: 0 }
|
|
5638
5642
|
}
|
|
5639
5643
|
);
|
|
5640
|
-
return /* @__PURE__ */
|
|
5644
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5641
5645
|
f,
|
|
5642
5646
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5643
5647
|
s && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: fe, children: r })
|
|
@@ -5652,7 +5656,7 @@ function xu({
|
|
|
5652
5656
|
touched: a
|
|
5653
5657
|
}) {
|
|
5654
5658
|
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = e != null ? String(e) : "";
|
|
5655
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5656
5660
|
/* @__PURE__ */ d(
|
|
5657
5661
|
le,
|
|
5658
5662
|
{
|
|
@@ -5712,7 +5716,7 @@ function Tn({
|
|
|
5712
5716
|
q(() => {
|
|
5713
5717
|
e !== p.current && (p.current = e, g(String(e ?? "")));
|
|
5714
5718
|
}, [e]);
|
|
5715
|
-
const
|
|
5719
|
+
const m = {
|
|
5716
5720
|
width: "100%",
|
|
5717
5721
|
fontSize: 14,
|
|
5718
5722
|
color: "#374151",
|
|
@@ -5725,7 +5729,7 @@ function Tn({
|
|
|
5725
5729
|
lineHeight: 1.5,
|
|
5726
5730
|
cursor: l ? "not-allowed" : void 0
|
|
5727
5731
|
};
|
|
5728
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5729
5733
|
/* @__PURE__ */ d(
|
|
5730
5734
|
le,
|
|
5731
5735
|
{
|
|
@@ -5744,7 +5748,7 @@ function Tn({
|
|
|
5744
5748
|
id: u,
|
|
5745
5749
|
name: u,
|
|
5746
5750
|
type: c,
|
|
5747
|
-
style:
|
|
5751
|
+
style: m,
|
|
5748
5752
|
value: f,
|
|
5749
5753
|
min: o.min,
|
|
5750
5754
|
max: o.max,
|
|
@@ -5774,13 +5778,13 @@ function yu({
|
|
|
5774
5778
|
error: r,
|
|
5775
5779
|
touched: a
|
|
5776
5780
|
}) {
|
|
5777
|
-
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = L(""), [p,
|
|
5778
|
-
const
|
|
5779
|
-
!
|
|
5780
|
-
},
|
|
5781
|
-
t(c.filter((
|
|
5782
|
-
},
|
|
5783
|
-
return /* @__PURE__ */
|
|
5781
|
+
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = L(""), [p, m] = L(!1), b = H(null), v = (h) => {
|
|
5782
|
+
const x = h.trim();
|
|
5783
|
+
!x || c.includes(x) || o.maxTags && c.length >= o.maxTags || (t([...c, x]), g(""));
|
|
5784
|
+
}, I = (h) => {
|
|
5785
|
+
t(c.filter((x, R) => R !== h));
|
|
5786
|
+
}, 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";
|
|
5787
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5784
5788
|
/* @__PURE__ */ d(
|
|
5785
5789
|
le,
|
|
5786
5790
|
{
|
|
@@ -5793,12 +5797,12 @@ function yu({
|
|
|
5793
5797
|
}
|
|
5794
5798
|
),
|
|
5795
5799
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5796
|
-
/* @__PURE__ */
|
|
5800
|
+
/* @__PURE__ */ O(
|
|
5797
5801
|
"div",
|
|
5798
5802
|
{
|
|
5799
5803
|
onClick: () => {
|
|
5800
|
-
var
|
|
5801
|
-
return (
|
|
5804
|
+
var h;
|
|
5805
|
+
return (h = b.current) == null ? void 0 : h.focus();
|
|
5802
5806
|
},
|
|
5803
5807
|
style: {
|
|
5804
5808
|
display: "flex",
|
|
@@ -5807,16 +5811,16 @@ function yu({
|
|
|
5807
5811
|
gap: 4,
|
|
5808
5812
|
minHeight: 38,
|
|
5809
5813
|
padding: "4px 8px",
|
|
5810
|
-
border: `1px solid ${
|
|
5814
|
+
border: `1px solid ${C}`,
|
|
5811
5815
|
borderRadius: A.BORDER_RADIUS,
|
|
5812
5816
|
backgroundColor: l ? A.COLOR_DISABLED_BG : "#fff",
|
|
5813
|
-
boxShadow:
|
|
5817
|
+
boxShadow: y,
|
|
5814
5818
|
boxSizing: "border-box",
|
|
5815
5819
|
cursor: l ? "not-allowed" : "text",
|
|
5816
5820
|
transition: "border-color .15s, box-shadow .15s"
|
|
5817
5821
|
},
|
|
5818
5822
|
children: [
|
|
5819
|
-
c.map((
|
|
5823
|
+
c.map((h, x) => /* @__PURE__ */ O(
|
|
5820
5824
|
"span",
|
|
5821
5825
|
{
|
|
5822
5826
|
style: {
|
|
@@ -5833,13 +5837,13 @@ function yu({
|
|
|
5833
5837
|
lineHeight: 1.6
|
|
5834
5838
|
},
|
|
5835
5839
|
children: [
|
|
5836
|
-
|
|
5840
|
+
h,
|
|
5837
5841
|
!l && /* @__PURE__ */ d(
|
|
5838
5842
|
"button",
|
|
5839
5843
|
{
|
|
5840
5844
|
type: "button",
|
|
5841
|
-
onClick: (
|
|
5842
|
-
|
|
5845
|
+
onClick: (R) => {
|
|
5846
|
+
R.stopPropagation(), I(x);
|
|
5843
5847
|
},
|
|
5844
5848
|
style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", color: "#7c3aed" },
|
|
5845
5849
|
children: /* @__PURE__ */ d(Fe, { size: 12 })
|
|
@@ -5847,7 +5851,7 @@ function yu({
|
|
|
5847
5851
|
)
|
|
5848
5852
|
]
|
|
5849
5853
|
},
|
|
5850
|
-
|
|
5854
|
+
h
|
|
5851
5855
|
)),
|
|
5852
5856
|
/* @__PURE__ */ d(
|
|
5853
5857
|
"input",
|
|
@@ -5869,13 +5873,13 @@ function yu({
|
|
|
5869
5873
|
padding: "2px 4px",
|
|
5870
5874
|
cursor: l ? "not-allowed" : void 0
|
|
5871
5875
|
},
|
|
5872
|
-
onChange: (
|
|
5873
|
-
onKeyDown: (
|
|
5874
|
-
(
|
|
5876
|
+
onChange: (h) => g(h.target.value),
|
|
5877
|
+
onKeyDown: (h) => {
|
|
5878
|
+
(h.key === "Enter" || h.key === ",") && (h.preventDefault(), v(f)), h.key === "Backspace" && !f && c.length > 0 && I(c.length - 1);
|
|
5875
5879
|
},
|
|
5876
|
-
onFocus: () =>
|
|
5880
|
+
onFocus: () => m(!0),
|
|
5877
5881
|
onBlur: () => {
|
|
5878
|
-
|
|
5882
|
+
m(!1), f.trim() && v(f), i();
|
|
5879
5883
|
}
|
|
5880
5884
|
}
|
|
5881
5885
|
)
|
|
@@ -5893,12 +5897,12 @@ function Cu({
|
|
|
5893
5897
|
error: r,
|
|
5894
5898
|
touched: a
|
|
5895
5899
|
}) {
|
|
5896
|
-
const o = n, 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,
|
|
5900
|
+
const o = n, 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(
|
|
5897
5901
|
() => typeof e == "number" ? e : c
|
|
5898
5902
|
), b = H(e);
|
|
5899
5903
|
return q(() => {
|
|
5900
|
-
e !== b.current && (b.current = e,
|
|
5901
|
-
}, [e, c]), /* @__PURE__ */
|
|
5904
|
+
e !== b.current && (b.current = e, m(typeof e == "number" ? e : c));
|
|
5905
|
+
}, [e, c]), /* @__PURE__ */ O("div", { children: [
|
|
5902
5906
|
/* @__PURE__ */ d(
|
|
5903
5907
|
le,
|
|
5904
5908
|
{
|
|
@@ -5911,7 +5915,7 @@ function Cu({
|
|
|
5911
5915
|
}
|
|
5912
5916
|
),
|
|
5913
5917
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5914
|
-
/* @__PURE__ */
|
|
5918
|
+
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 12, px: 1 }, children: [
|
|
5915
5919
|
/* @__PURE__ */ d(
|
|
5916
5920
|
Go,
|
|
5917
5921
|
{
|
|
@@ -5922,9 +5926,9 @@ function Cu({
|
|
|
5922
5926
|
step: g,
|
|
5923
5927
|
disabled: l,
|
|
5924
5928
|
marks: o.marks,
|
|
5925
|
-
onChange: (
|
|
5926
|
-
const
|
|
5927
|
-
|
|
5929
|
+
onChange: (v, I) => {
|
|
5930
|
+
const C = Array.isArray(I) ? I[0] : I;
|
|
5931
|
+
m(C), b.current = C, t(C);
|
|
5928
5932
|
},
|
|
5929
5933
|
onChangeCommitted: () => i(),
|
|
5930
5934
|
sx: {
|
|
@@ -5957,10 +5961,10 @@ function Au({
|
|
|
5957
5961
|
q(() => {
|
|
5958
5962
|
e !== g.current && (g.current = e, f(String(e ?? "#6366f1")));
|
|
5959
5963
|
}, [e]);
|
|
5960
|
-
const p = (
|
|
5961
|
-
f(
|
|
5964
|
+
const p = (m) => {
|
|
5965
|
+
f(m), g.current = m, t(m);
|
|
5962
5966
|
};
|
|
5963
|
-
return /* @__PURE__ */
|
|
5967
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
5964
5968
|
/* @__PURE__ */ d(
|
|
5965
5969
|
le,
|
|
5966
5970
|
{
|
|
@@ -5973,8 +5977,8 @@ function Au({
|
|
|
5973
5977
|
}
|
|
5974
5978
|
),
|
|
5975
5979
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
/* @__PURE__ */
|
|
5980
|
+
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
5981
|
+
/* @__PURE__ */ O(
|
|
5978
5982
|
"div",
|
|
5979
5983
|
{
|
|
5980
5984
|
style: {
|
|
@@ -5996,7 +6000,7 @@ function Au({
|
|
|
5996
6000
|
value: c,
|
|
5997
6001
|
disabled: l,
|
|
5998
6002
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
5999
|
-
onChange: (
|
|
6003
|
+
onChange: (m) => p(m.target.value),
|
|
6000
6004
|
onBlur: i,
|
|
6001
6005
|
style: {
|
|
6002
6006
|
position: "absolute",
|
|
@@ -6023,8 +6027,8 @@ function Au({
|
|
|
6023
6027
|
disabled: l,
|
|
6024
6028
|
maxLength: 7,
|
|
6025
6029
|
placeholder: "#000000",
|
|
6026
|
-
onChange: (
|
|
6027
|
-
const b =
|
|
6030
|
+
onChange: (m) => {
|
|
6031
|
+
const b = m.target.value;
|
|
6028
6032
|
f(b), /^#[0-9a-fA-F]{6}$/.test(b) && (g.current = b, t(b));
|
|
6029
6033
|
},
|
|
6030
6034
|
onBlur: i,
|
|
@@ -6059,21 +6063,21 @@ function Ru({
|
|
|
6059
6063
|
error: r,
|
|
6060
6064
|
touched: a
|
|
6061
6065
|
}) {
|
|
6062
|
-
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = H(null), [f, g] = L(!1), [p,
|
|
6063
|
-
if (!
|
|
6064
|
-
const
|
|
6066
|
+
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = H(null), [f, g] = L(!1), [p, m] = L(null), b = e instanceof File ? [e] : Array.isArray(e) ? e : [], v = (y) => {
|
|
6067
|
+
if (!y) return;
|
|
6068
|
+
const h = Array.from(y);
|
|
6065
6069
|
if (o.maxSizeMb) {
|
|
6066
|
-
const
|
|
6067
|
-
if (
|
|
6068
|
-
|
|
6070
|
+
const x = h.find((R) => R.size > o.maxSizeMb * 1024 * 1024);
|
|
6071
|
+
if (x) {
|
|
6072
|
+
m(`"${x.name}" exceeds ${o.maxSizeMb} MB`);
|
|
6069
6073
|
return;
|
|
6070
6074
|
}
|
|
6071
6075
|
}
|
|
6072
|
-
|
|
6073
|
-
},
|
|
6074
|
-
o.multiple ? t(b.filter((
|
|
6075
|
-
},
|
|
6076
|
-
return /* @__PURE__ */
|
|
6076
|
+
m(null), t(o.multiple ? h : h[0] ?? null);
|
|
6077
|
+
}, I = (y) => {
|
|
6078
|
+
o.multiple ? t(b.filter((h, x) => x !== y)) : t(null), c.current && (c.current.value = "");
|
|
6079
|
+
}, C = s || p ? A.BORDER_COLOR_ERROR : f ? A.BORDER_COLOR_FOCUS : A.BORDER_COLOR;
|
|
6080
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
6077
6081
|
/* @__PURE__ */ d(
|
|
6078
6082
|
le,
|
|
6079
6083
|
{
|
|
@@ -6086,22 +6090,22 @@ function Ru({
|
|
|
6086
6090
|
}
|
|
6087
6091
|
),
|
|
6088
6092
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6089
|
-
/* @__PURE__ */
|
|
6093
|
+
/* @__PURE__ */ O(
|
|
6090
6094
|
"div",
|
|
6091
6095
|
{
|
|
6092
6096
|
onClick: () => {
|
|
6093
|
-
var
|
|
6094
|
-
return !l && ((
|
|
6097
|
+
var y;
|
|
6098
|
+
return !l && ((y = c.current) == null ? void 0 : y.click());
|
|
6095
6099
|
},
|
|
6096
|
-
onDragOver: (
|
|
6097
|
-
|
|
6100
|
+
onDragOver: (y) => {
|
|
6101
|
+
y.preventDefault(), l || g(!0);
|
|
6098
6102
|
},
|
|
6099
6103
|
onDragLeave: () => g(!1),
|
|
6100
|
-
onDrop: (
|
|
6101
|
-
|
|
6104
|
+
onDrop: (y) => {
|
|
6105
|
+
y.preventDefault(), g(!1), l || v(y.dataTransfer.files);
|
|
6102
6106
|
},
|
|
6103
6107
|
style: {
|
|
6104
|
-
border: `1px dashed ${
|
|
6108
|
+
border: `1px dashed ${C}`,
|
|
6105
6109
|
borderRadius: A.BORDER_RADIUS,
|
|
6106
6110
|
padding: "14px 16px",
|
|
6107
6111
|
textAlign: "center",
|
|
@@ -6121,15 +6125,15 @@ function Ru({
|
|
|
6121
6125
|
disabled: l,
|
|
6122
6126
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6123
6127
|
style: { display: "none" },
|
|
6124
|
-
onChange: (
|
|
6125
|
-
|
|
6128
|
+
onChange: (y) => {
|
|
6129
|
+
v(y.target.files), i();
|
|
6126
6130
|
}
|
|
6127
6131
|
}
|
|
6128
6132
|
),
|
|
6129
6133
|
/* @__PURE__ */ d(Co, { size: 24, color: l ? "#9ca3af" : "#6366f1", style: { marginBottom: 4 } }),
|
|
6130
6134
|
/* @__PURE__ */ d("div", { style: { fontSize: 13, color: l ? "#9ca3af" : "#374151", fontWeight: 500 }, children: f ? "Drop file here" : "Click or drag file to upload" }),
|
|
6131
6135
|
o.accept && /* @__PURE__ */ d("div", { style: { fontSize: 11, color: "#6b7280", marginTop: 2 }, children: o.accept }),
|
|
6132
|
-
o.maxSizeMb && /* @__PURE__ */
|
|
6136
|
+
o.maxSizeMb && /* @__PURE__ */ O("div", { style: { fontSize: 11, color: "#6b7280" }, children: [
|
|
6133
6137
|
"Max ",
|
|
6134
6138
|
o.maxSizeMb,
|
|
6135
6139
|
" MB"
|
|
@@ -6137,18 +6141,18 @@ function Ru({
|
|
|
6137
6141
|
]
|
|
6138
6142
|
}
|
|
6139
6143
|
),
|
|
6140
|
-
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((
|
|
6144
|
+
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((y, h) => /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 10px", border: "1px solid #e5e7eb", borderRadius: 4, backgroundColor: "#f9fafb" }, children: [
|
|
6141
6145
|
/* @__PURE__ */ d(Ao, { size: 16, color: "#6366f1" }),
|
|
6142
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children:
|
|
6143
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Su(
|
|
6144
|
-
!l && /* @__PURE__ */ d("button", { type: "button", onClick: (
|
|
6145
|
-
|
|
6146
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: y.name }),
|
|
6147
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Su(y.size) }),
|
|
6148
|
+
!l && /* @__PURE__ */ d("button", { type: "button", onClick: (x) => {
|
|
6149
|
+
x.stopPropagation(), I(h);
|
|
6146
6150
|
}, style: { background: "none", border: "none", cursor: "pointer", color: "#9ca3af", display: "flex", padding: 0 }, children: /* @__PURE__ */ d(Fe, { size: 14 }) })
|
|
6147
|
-
] }, `${
|
|
6151
|
+
] }, `${y.name}-${y.size}-${y.lastModified}`)) }),
|
|
6148
6152
|
(s || p) && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: fe, children: p ?? r })
|
|
6149
6153
|
] });
|
|
6150
6154
|
}
|
|
6151
|
-
const Eu = Qe.lazy(async () => ({ default: (await import("./index-
|
|
6155
|
+
const Eu = Qe.lazy(async () => ({ default: (await import("./index-Dlw7CMau.js")).default }));
|
|
6152
6156
|
async function Ou(n) {
|
|
6153
6157
|
switch (n) {
|
|
6154
6158
|
case "python":
|
|
@@ -6176,8 +6180,8 @@ function Pi({
|
|
|
6176
6180
|
const [c, f] = Qe.useState(null);
|
|
6177
6181
|
Qe.useEffect(() => {
|
|
6178
6182
|
let p = !0;
|
|
6179
|
-
return Ou(n).then((
|
|
6180
|
-
p && f(
|
|
6183
|
+
return Ou(n).then((m) => {
|
|
6184
|
+
p && f(m);
|
|
6181
6185
|
}), () => {
|
|
6182
6186
|
p = !1;
|
|
6183
6187
|
};
|
|
@@ -6207,27 +6211,27 @@ function Fu({
|
|
|
6207
6211
|
error: r,
|
|
6208
6212
|
touched: a
|
|
6209
6213
|
}) {
|
|
6210
|
-
const o = n, 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) : ""),
|
|
6214
|
+
const o = n, 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 = H(e);
|
|
6211
6215
|
q(() => {
|
|
6212
|
-
e !==
|
|
6216
|
+
e !== m.current && (m.current = e, typeof e == "string" ? p(e) : e != null ? p(JSON.stringify(e, null, 2)) : p(""));
|
|
6213
6217
|
}, [e]);
|
|
6214
|
-
const b = (
|
|
6215
|
-
p(
|
|
6218
|
+
const b = (x) => {
|
|
6219
|
+
p(x);
|
|
6216
6220
|
try {
|
|
6217
|
-
|
|
6218
|
-
} catch (
|
|
6219
|
-
f(
|
|
6221
|
+
x.trim() && JSON.parse(x), f(null);
|
|
6222
|
+
} catch (R) {
|
|
6223
|
+
f(R.message);
|
|
6220
6224
|
}
|
|
6221
|
-
|
|
6222
|
-
},
|
|
6225
|
+
m.current = x, t(x);
|
|
6226
|
+
}, v = () => {
|
|
6223
6227
|
try {
|
|
6224
|
-
const
|
|
6225
|
-
p(
|
|
6228
|
+
const x = JSON.stringify(JSON.parse(g), null, 2);
|
|
6229
|
+
p(x), f(null), m.current = x, t(x);
|
|
6226
6230
|
} catch {
|
|
6227
6231
|
}
|
|
6228
|
-
},
|
|
6229
|
-
return /* @__PURE__ */
|
|
6230
|
-
/* @__PURE__ */
|
|
6232
|
+
}, I = o.rows ?? 8, C = `${I * 22}px`, y = `${I * 22}px`, h = s || c ? A.BORDER_COLOR_ERROR : A.BORDER_COLOR;
|
|
6233
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
6234
|
+
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6231
6235
|
/* @__PURE__ */ d(
|
|
6232
6236
|
le,
|
|
6233
6237
|
{
|
|
@@ -6243,7 +6247,7 @@ function Fu({
|
|
|
6243
6247
|
"button",
|
|
6244
6248
|
{
|
|
6245
6249
|
type: "button",
|
|
6246
|
-
onClick:
|
|
6250
|
+
onClick: v,
|
|
6247
6251
|
style: { fontSize: 11, fontWeight: 600, color: "#6366f1", background: "none", border: "none", cursor: "pointer", padding: "0 0 4px" },
|
|
6248
6252
|
children: "Format"
|
|
6249
6253
|
}
|
|
@@ -6256,7 +6260,7 @@ function Fu({
|
|
|
6256
6260
|
id: u,
|
|
6257
6261
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6258
6262
|
style: {
|
|
6259
|
-
border: `1px solid ${
|
|
6263
|
+
border: `1px solid ${h}`,
|
|
6260
6264
|
borderRadius: A.BORDER_RADIUS,
|
|
6261
6265
|
overflow: "hidden",
|
|
6262
6266
|
fontSize: 13
|
|
@@ -6267,8 +6271,8 @@ function Fu({
|
|
|
6267
6271
|
language: "json",
|
|
6268
6272
|
value: g,
|
|
6269
6273
|
readOnly: l || o.readOnly,
|
|
6270
|
-
minHeight:
|
|
6271
|
-
maxHeight:
|
|
6274
|
+
minHeight: C,
|
|
6275
|
+
maxHeight: y,
|
|
6272
6276
|
basicSetup: { lineNumbers: !0, foldGutter: !0 },
|
|
6273
6277
|
onChange: b,
|
|
6274
6278
|
onBlur: i,
|
|
@@ -6298,11 +6302,11 @@ function Tu({
|
|
|
6298
6302
|
q(() => {
|
|
6299
6303
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6300
6304
|
}, [e]);
|
|
6301
|
-
const p = (
|
|
6302
|
-
f(
|
|
6303
|
-
},
|
|
6304
|
-
return /* @__PURE__ */
|
|
6305
|
-
/* @__PURE__ */
|
|
6305
|
+
const p = (C) => {
|
|
6306
|
+
f(C), g.current = C, t(C);
|
|
6307
|
+
}, m = o.rows ?? 8, b = `${m * 22}px`, v = `${m * 22}px`, I = wu[o.language ?? "javascript"] ?? "CODE";
|
|
6308
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
6309
|
+
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6306
6310
|
/* @__PURE__ */ d(
|
|
6307
6311
|
le,
|
|
6308
6312
|
{
|
|
@@ -6324,7 +6328,7 @@ function Tu({
|
|
|
6324
6328
|
padding: "1px 6px",
|
|
6325
6329
|
letterSpacing: 0.5,
|
|
6326
6330
|
marginBottom: 4
|
|
6327
|
-
}, children:
|
|
6331
|
+
}, children: I })
|
|
6328
6332
|
] }),
|
|
6329
6333
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6330
6334
|
/* @__PURE__ */ d(
|
|
@@ -6344,7 +6348,7 @@ function Tu({
|
|
|
6344
6348
|
value: c,
|
|
6345
6349
|
readOnly: l || o.readOnly,
|
|
6346
6350
|
minHeight: b,
|
|
6347
|
-
maxHeight:
|
|
6351
|
+
maxHeight: v,
|
|
6348
6352
|
basicSetup: { lineNumbers: !0, foldGutter: !0, autocompletion: !0 },
|
|
6349
6353
|
onChange: p,
|
|
6350
6354
|
onBlur: i,
|
|
@@ -6357,7 +6361,7 @@ function Tu({
|
|
|
6357
6361
|
] });
|
|
6358
6362
|
}
|
|
6359
6363
|
const Gu = Qe.lazy(
|
|
6360
|
-
() => import("./index-
|
|
6364
|
+
() => import("./index-BAiSdZW3.js").then((n) => n.i).then((n) => (Promise.resolve({ }), { default: n.default }))
|
|
6361
6365
|
), Bu = [
|
|
6362
6366
|
[{ header: [1, 2, 3, !1] }],
|
|
6363
6367
|
["bold", "italic", "underline", "strike"],
|
|
@@ -6377,10 +6381,10 @@ function Vu({
|
|
|
6377
6381
|
q(() => {
|
|
6378
6382
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6379
6383
|
}, [e]);
|
|
6380
|
-
const p = (
|
|
6381
|
-
f(
|
|
6382
|
-
},
|
|
6383
|
-
return /* @__PURE__ */
|
|
6384
|
+
const p = (v) => {
|
|
6385
|
+
f(v), g.current = v, t(v);
|
|
6386
|
+
}, m = (o.rows ?? 6) * 24, b = o.toolbar !== !1;
|
|
6387
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
6384
6388
|
/* @__PURE__ */ d(
|
|
6385
6389
|
le,
|
|
6386
6390
|
{
|
|
@@ -6404,7 +6408,7 @@ function Vu({
|
|
|
6404
6408
|
overflow: "hidden",
|
|
6405
6409
|
fontSize: 14
|
|
6406
6410
|
},
|
|
6407
|
-
children: /* @__PURE__ */ d(wr, { fallback: /* @__PURE__ */ d("div", { style: { minHeight:
|
|
6411
|
+
children: /* @__PURE__ */ d(wr, { fallback: /* @__PURE__ */ d("div", { style: { minHeight: m, display: "flex", alignItems: "center", padding: "8px 12px", color: "rgba(0,0,0,0.38)", fontSize: 13 }, children: "Loading editor…" }), children: /* @__PURE__ */ d(
|
|
6408
6412
|
Gu,
|
|
6409
6413
|
{
|
|
6410
6414
|
value: c,
|
|
@@ -6412,7 +6416,7 @@ function Vu({
|
|
|
6412
6416
|
onBlur: i,
|
|
6413
6417
|
readOnly: l || o.readOnly,
|
|
6414
6418
|
modules: { toolbar: b ? Bu : !1 },
|
|
6415
|
-
style: { minHeight:
|
|
6419
|
+
style: { minHeight: m },
|
|
6416
6420
|
theme: "snow"
|
|
6417
6421
|
}
|
|
6418
6422
|
) })
|
|
@@ -6443,7 +6447,7 @@ function Nu(n) {
|
|
|
6443
6447
|
}, [t, i, e]), q(() => {
|
|
6444
6448
|
const c = s.current;
|
|
6445
6449
|
!c || t || !i || c.scrollHeight <= c.clientHeight + 4 && e();
|
|
6446
|
-
}, [a, t, i, e]), /* @__PURE__ */
|
|
6450
|
+
}, [a, t, i, e]), /* @__PURE__ */ O(vn.MenuList, { ...o, innerRef: l, children: [
|
|
6447
6451
|
a,
|
|
6448
6452
|
u && (t || i) && /* @__PURE__ */ d("div", { style: {
|
|
6449
6453
|
display: "flex",
|
|
@@ -6457,7 +6461,7 @@ function Nu(n) {
|
|
|
6457
6461
|
pointerEvents: "none",
|
|
6458
6462
|
// keep keyboard nav off this row
|
|
6459
6463
|
userSelect: "none"
|
|
6460
|
-
}, children: t ? /* @__PURE__ */
|
|
6464
|
+
}, children: t ? /* @__PURE__ */ O(Ve, { children: [
|
|
6461
6465
|
/* @__PURE__ */ d(Pu, {}),
|
|
6462
6466
|
"Loading…"
|
|
6463
6467
|
] }) : /* @__PURE__ */ d("span", { style: { color: "#adb5bd" }, children: "Scroll for more" }) })
|
|
@@ -6475,64 +6479,64 @@ function Pu() {
|
|
|
6475
6479
|
} });
|
|
6476
6480
|
}
|
|
6477
6481
|
function Lu({ loadPage: n, loadSelected: e, currentValues: t, isOpen: i }) {
|
|
6478
|
-
const [r, a] = L([]), [o, u] = L(0), [s, l] = L(!0), [c, f] = L(!1), g = H(/* @__PURE__ */ new Map()), [p,
|
|
6479
|
-
|
|
6482
|
+
const [r, a] = L([]), [o, u] = L(0), [s, l] = L(!0), [c, f] = L(!1), g = H(/* @__PURE__ */ new Map()), [p, m] = L(0), [b, v] = L(""), [I, C] = L(""), y = H(null), h = H(null), x = H(null), R = z((G) => {
|
|
6483
|
+
v(G), y.current && clearTimeout(y.current), y.current = setTimeout(() => C(G), 300);
|
|
6480
6484
|
}, []);
|
|
6481
6485
|
q(() => {
|
|
6482
|
-
var
|
|
6483
|
-
if (!i ||
|
|
6484
|
-
|
|
6486
|
+
var W;
|
|
6487
|
+
if (!i || x.current === I) return;
|
|
6488
|
+
x.current = I, (W = h.current) == null || W.abort();
|
|
6485
6489
|
const G = new AbortController();
|
|
6486
|
-
return
|
|
6490
|
+
return h.current = G, a([]), u(0), l(!0), f(!0), n({ page: 1, search: I, signal: G.signal }).then((V) => {
|
|
6487
6491
|
if (G.signal.aborted) return;
|
|
6488
6492
|
const j = ur(V.options);
|
|
6489
6493
|
a(j), u(1), l(V.hasMore), f(!1);
|
|
6490
6494
|
}).catch((V) => {
|
|
6491
6495
|
cr(V) || f(!1);
|
|
6492
6496
|
}), () => G.abort();
|
|
6493
|
-
}, [
|
|
6497
|
+
}, [I, i]);
|
|
6494
6498
|
const S = z(() => {
|
|
6495
6499
|
var V;
|
|
6496
6500
|
if (c || !s) return;
|
|
6497
|
-
(V =
|
|
6501
|
+
(V = h.current) == null || V.abort();
|
|
6498
6502
|
const G = new AbortController();
|
|
6499
|
-
|
|
6500
|
-
const
|
|
6501
|
-
n({ page:
|
|
6502
|
-
G.signal.aborted || (a((
|
|
6503
|
+
h.current = G, f(!0);
|
|
6504
|
+
const W = o + 1;
|
|
6505
|
+
n({ page: W, search: I, signal: G.signal }).then((j) => {
|
|
6506
|
+
G.signal.aborted || (a((Q) => ur([...Q, ...j.options])), u(W), l(j.hasMore), f(!1));
|
|
6503
6507
|
}).catch((j) => {
|
|
6504
6508
|
cr(j) || f(!1);
|
|
6505
6509
|
});
|
|
6506
|
-
}, [c, s, o,
|
|
6510
|
+
}, [c, s, o, I]), T = H(/* @__PURE__ */ new Set());
|
|
6507
6511
|
q(() => {
|
|
6508
6512
|
if (!e || t.length === 0) return;
|
|
6509
6513
|
const G = t.filter(
|
|
6510
|
-
(
|
|
6514
|
+
(W) => !g.current.has(W) && !T.current.has(W)
|
|
6511
6515
|
);
|
|
6512
|
-
G.length !== 0 && (G.forEach((
|
|
6513
|
-
|
|
6516
|
+
G.length !== 0 && (G.forEach((W) => T.current.add(W)), e(G).then((W) => {
|
|
6517
|
+
W.forEach((V) => g.current.set(V.value, V)), m((V) => V + 1);
|
|
6514
6518
|
}).catch(() => {
|
|
6515
6519
|
}).finally(() => {
|
|
6516
|
-
G.forEach((
|
|
6520
|
+
G.forEach((W) => T.current.delete(W));
|
|
6517
6521
|
}));
|
|
6518
6522
|
}, [t.join("|")]);
|
|
6519
6523
|
const B = z(() => {
|
|
6520
6524
|
var G;
|
|
6521
|
-
|
|
6522
|
-
}, []),
|
|
6523
|
-
const
|
|
6524
|
-
return
|
|
6525
|
+
x.current = null, v(""), C(""), y.current && clearTimeout(y.current), (G = h.current) == null || G.abort();
|
|
6526
|
+
}, []), M = ae(() => r, [r, p]), F = z((G) => {
|
|
6527
|
+
const W = r.find((V) => V.value === G);
|
|
6528
|
+
return W || g.current.get(G);
|
|
6525
6529
|
}, [r, p]), D = z((G) => {
|
|
6526
6530
|
if (!G) return;
|
|
6527
6531
|
(Array.isArray(G) ? G : [G]).forEach((V) => g.current.set(V.value, V));
|
|
6528
6532
|
}, []);
|
|
6529
6533
|
return {
|
|
6530
|
-
options:
|
|
6534
|
+
options: M,
|
|
6531
6535
|
lookupOption: F,
|
|
6532
6536
|
isLoading: c,
|
|
6533
6537
|
hasMore: s,
|
|
6534
6538
|
inputValue: b,
|
|
6535
|
-
handleInputChange:
|
|
6539
|
+
handleInputChange: R,
|
|
6536
6540
|
loadMore: S,
|
|
6537
6541
|
handleMenuClose: B,
|
|
6538
6542
|
updateSelectedCache: D
|
|
@@ -6558,21 +6562,21 @@ function Mu({
|
|
|
6558
6562
|
}) {
|
|
6559
6563
|
const o = n, u = o.isMulti ?? !1, s = o.id ?? o.name ?? "", l = !!(a && r), c = o.disabled === !0, f = H(`ff-inf-${Math.random().toString(36).slice(2)}`).current, [g, p] = L(!1);
|
|
6560
6564
|
q(() => {
|
|
6561
|
-
const
|
|
6562
|
-
|
|
6565
|
+
const Q = (U) => {
|
|
6566
|
+
U.detail !== f && p(!1);
|
|
6563
6567
|
};
|
|
6564
|
-
return window.addEventListener(an,
|
|
6568
|
+
return window.addEventListener(an, Q), () => window.removeEventListener(an, Q);
|
|
6565
6569
|
}, [f]), q(() => {
|
|
6566
6570
|
g && Du(f);
|
|
6567
6571
|
}, [g, f]);
|
|
6568
|
-
const
|
|
6569
|
-
options:
|
|
6570
|
-
lookupOption:
|
|
6571
|
-
isLoading:
|
|
6572
|
-
hasMore:
|
|
6573
|
-
inputValue:
|
|
6574
|
-
handleInputChange:
|
|
6575
|
-
loadMore:
|
|
6572
|
+
const m = z(() => p(!0), []), b = ae(() => dr(e), [e]), {
|
|
6573
|
+
options: v,
|
|
6574
|
+
lookupOption: I,
|
|
6575
|
+
isLoading: C,
|
|
6576
|
+
hasMore: y,
|
|
6577
|
+
inputValue: h,
|
|
6578
|
+
handleInputChange: x,
|
|
6579
|
+
loadMore: R,
|
|
6576
6580
|
handleMenuClose: S,
|
|
6577
6581
|
updateSelectedCache: T
|
|
6578
6582
|
} = Lu({
|
|
@@ -6582,37 +6586,37 @@ function Mu({
|
|
|
6582
6586
|
isOpen: g
|
|
6583
6587
|
}), B = H(S);
|
|
6584
6588
|
B.current = S;
|
|
6585
|
-
const
|
|
6589
|
+
const M = H(!1);
|
|
6586
6590
|
q(() => {
|
|
6587
|
-
|
|
6591
|
+
M.current && !g && B.current(), M.current = g;
|
|
6588
6592
|
}, [g]);
|
|
6589
|
-
const F = z(() => p(!1), []), D = ae(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? dr(e).map((
|
|
6593
|
+
const F = z(() => p(!1), []), D = ae(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? dr(e).map((Q) => I(Q)).filter((Q) => !!Q) : I(String(e)) ?? null, [e, I, u]), G = z((Q) => {
|
|
6590
6594
|
if (u) {
|
|
6591
|
-
const
|
|
6592
|
-
T(
|
|
6595
|
+
const U = Q ?? [];
|
|
6596
|
+
T(U), t(U.map((re) => re.value));
|
|
6593
6597
|
} else {
|
|
6594
|
-
const
|
|
6595
|
-
|
|
6598
|
+
const U = Q;
|
|
6599
|
+
U && T(U), t(U ? U.value : null);
|
|
6596
6600
|
}
|
|
6597
|
-
}, [u, t, T]),
|
|
6598
|
-
|
|
6601
|
+
}, [u, t, T]), W = H({ loadMore: R, isLoading: C, hasMore: y });
|
|
6602
|
+
W.current = { loadMore: R, isLoading: C, hasMore: y };
|
|
6599
6603
|
const V = H(
|
|
6600
|
-
function(
|
|
6604
|
+
function(U) {
|
|
6601
6605
|
return /* @__PURE__ */ d(
|
|
6602
6606
|
Nu,
|
|
6603
6607
|
{
|
|
6604
|
-
...
|
|
6605
|
-
onScrollBottom: () =>
|
|
6606
|
-
isLoading:
|
|
6607
|
-
hasMore:
|
|
6608
|
+
...U,
|
|
6609
|
+
onScrollBottom: () => W.current.loadMore(),
|
|
6610
|
+
isLoading: W.current.isLoading,
|
|
6611
|
+
hasMore: W.current.hasMore
|
|
6608
6612
|
}
|
|
6609
6613
|
);
|
|
6610
6614
|
}
|
|
6611
6615
|
).current, j = z(
|
|
6612
|
-
() =>
|
|
6613
|
-
[
|
|
6616
|
+
() => C ? "Loading…" : "No options found",
|
|
6617
|
+
[C]
|
|
6614
6618
|
);
|
|
6615
|
-
return /* @__PURE__ */
|
|
6619
|
+
return /* @__PURE__ */ O("div", { className: `${o.customClass ?? ""} ${o.hidden ? "ff-form-hidden" : ""}`, children: [
|
|
6616
6620
|
/* @__PURE__ */ d(
|
|
6617
6621
|
le,
|
|
6618
6622
|
{
|
|
@@ -6629,18 +6633,18 @@ function Mu({
|
|
|
6629
6633
|
{
|
|
6630
6634
|
inputId: s,
|
|
6631
6635
|
value: D,
|
|
6632
|
-
inputValue:
|
|
6633
|
-
onInputChange:
|
|
6636
|
+
inputValue: h,
|
|
6637
|
+
onInputChange: x,
|
|
6634
6638
|
onChange: G,
|
|
6635
6639
|
onBlur: i,
|
|
6636
|
-
options:
|
|
6640
|
+
options: v,
|
|
6637
6641
|
isMulti: u,
|
|
6638
6642
|
isDisabled: c,
|
|
6639
6643
|
isClearable: o.isClearable ?? !1,
|
|
6640
6644
|
isSearchable: !0,
|
|
6641
6645
|
filterOption: null,
|
|
6642
6646
|
menuIsOpen: g,
|
|
6643
|
-
onMenuOpen:
|
|
6647
|
+
onMenuOpen: m,
|
|
6644
6648
|
onMenuClose: F,
|
|
6645
6649
|
placeholder: o.placeholder ?? "Search…",
|
|
6646
6650
|
noOptionsMessage: j,
|
|
@@ -6781,8 +6785,8 @@ function Wi(n, e) {
|
|
|
6781
6785
|
if (p = Array.from(p), c = p.length) {
|
|
6782
6786
|
f.add(l);
|
|
6783
6787
|
do {
|
|
6784
|
-
var
|
|
6785
|
-
s(
|
|
6788
|
+
var m = p[--c];
|
|
6789
|
+
s(m, u.get(m), f);
|
|
6786
6790
|
} while (c);
|
|
6787
6791
|
f.delete(l);
|
|
6788
6792
|
}
|
|
@@ -7035,61 +7039,61 @@ function Me(n) {
|
|
|
7035
7039
|
skipAbsent: p
|
|
7036
7040
|
} = n;
|
|
7037
7041
|
let {
|
|
7038
|
-
parent:
|
|
7042
|
+
parent: m,
|
|
7039
7043
|
context: b,
|
|
7040
|
-
abortEarly:
|
|
7041
|
-
disableStackTrace:
|
|
7044
|
+
abortEarly: v = o.spec.abortEarly,
|
|
7045
|
+
disableStackTrace: I = o.spec.disableStackTrace
|
|
7042
7046
|
} = r;
|
|
7043
|
-
const
|
|
7047
|
+
const C = {
|
|
7044
7048
|
value: t,
|
|
7045
|
-
parent:
|
|
7049
|
+
parent: m,
|
|
7046
7050
|
context: b
|
|
7047
7051
|
};
|
|
7048
|
-
function
|
|
7052
|
+
function y(F = {}) {
|
|
7049
7053
|
const D = Zi(Object.assign({
|
|
7050
7054
|
value: t,
|
|
7051
7055
|
originalValue: a,
|
|
7052
7056
|
label: o.spec.label,
|
|
7053
7057
|
path: F.path || i,
|
|
7054
7058
|
spec: o.spec,
|
|
7055
|
-
disableStackTrace: F.disableStackTrace ||
|
|
7056
|
-
}, f, F.params),
|
|
7059
|
+
disableStackTrace: F.disableStackTrace || I
|
|
7060
|
+
}, f, F.params), C), G = new ce(ce.formatError(F.message || g, D), t, D.path, F.type || l, D.disableStackTrace);
|
|
7057
7061
|
return G.params = D, G;
|
|
7058
7062
|
}
|
|
7059
|
-
const
|
|
7060
|
-
let
|
|
7063
|
+
const h = v ? u : s;
|
|
7064
|
+
let x = {
|
|
7061
7065
|
path: i,
|
|
7062
|
-
parent:
|
|
7066
|
+
parent: m,
|
|
7063
7067
|
type: l,
|
|
7064
7068
|
from: r.from,
|
|
7065
|
-
createError:
|
|
7069
|
+
createError: y,
|
|
7066
7070
|
resolve(F) {
|
|
7067
|
-
return _i(F,
|
|
7071
|
+
return _i(F, C);
|
|
7068
7072
|
},
|
|
7069
7073
|
options: r,
|
|
7070
7074
|
originalValue: a,
|
|
7071
7075
|
schema: o
|
|
7072
7076
|
};
|
|
7073
|
-
const
|
|
7074
|
-
ce.isError(F) ?
|
|
7077
|
+
const R = (F) => {
|
|
7078
|
+
ce.isError(F) ? h(F) : F ? s(null) : h(y());
|
|
7075
7079
|
}, S = (F) => {
|
|
7076
|
-
ce.isError(F) ?
|
|
7080
|
+
ce.isError(F) ? h(F) : u(F);
|
|
7077
7081
|
};
|
|
7078
7082
|
if (p && me(t))
|
|
7079
|
-
return
|
|
7083
|
+
return R(!0);
|
|
7080
7084
|
let B;
|
|
7081
7085
|
try {
|
|
7082
|
-
var
|
|
7083
|
-
if (B = c.call(
|
|
7086
|
+
var M;
|
|
7087
|
+
if (B = c.call(x, t, x), typeof ((M = B) == null ? void 0 : M.then) == "function") {
|
|
7084
7088
|
if (r.sync)
|
|
7085
|
-
throw new Error(`Validation test of type: "${
|
|
7086
|
-
return Promise.resolve(B).then(
|
|
7089
|
+
throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
|
|
7090
|
+
return Promise.resolve(B).then(R, S);
|
|
7087
7091
|
}
|
|
7088
7092
|
} catch (F) {
|
|
7089
7093
|
S(F);
|
|
7090
7094
|
return;
|
|
7091
7095
|
}
|
|
7092
|
-
|
|
7096
|
+
R(B);
|
|
7093
7097
|
}
|
|
7094
7098
|
return e.OPTIONS = n, e;
|
|
7095
7099
|
}
|
|
@@ -7364,7 +7368,7 @@ attempted value: ${o}
|
|
|
7364
7368
|
r || (r = !0, i(b, o));
|
|
7365
7369
|
}, g = a.length, p = [];
|
|
7366
7370
|
if (!g) return f([]);
|
|
7367
|
-
let
|
|
7371
|
+
let m = {
|
|
7368
7372
|
value: o,
|
|
7369
7373
|
originalValue: u,
|
|
7370
7374
|
path: s,
|
|
@@ -7372,9 +7376,9 @@ attempted value: ${o}
|
|
|
7372
7376
|
schema: this
|
|
7373
7377
|
};
|
|
7374
7378
|
for (let b = 0; b < a.length; b++) {
|
|
7375
|
-
const
|
|
7376
|
-
m
|
|
7377
|
-
|
|
7379
|
+
const v = a[b];
|
|
7380
|
+
v(m, c, function(C) {
|
|
7381
|
+
C && (Array.isArray(C) ? p.push(...C) : p.push(C)), --g <= 0 && f(p);
|
|
7378
7382
|
});
|
|
7379
7383
|
}
|
|
7380
7384
|
}
|
|
@@ -8201,22 +8205,22 @@ class eo extends be {
|
|
|
8201
8205
|
__validating: t.__validating || !1
|
|
8202
8206
|
}), c = !1;
|
|
8203
8207
|
for (const f of u) {
|
|
8204
|
-
let g = a[f], p = f in r,
|
|
8208
|
+
let g = a[f], p = f in r, m = r[f];
|
|
8205
8209
|
if (g) {
|
|
8206
8210
|
let b;
|
|
8207
8211
|
l.path = (t.path ? `${t.path}.` : "") + f, g = g.resolve({
|
|
8208
|
-
value:
|
|
8212
|
+
value: m,
|
|
8209
8213
|
context: t.context,
|
|
8210
8214
|
parent: s
|
|
8211
8215
|
});
|
|
8212
|
-
let
|
|
8213
|
-
if (
|
|
8216
|
+
let v = g instanceof be ? g.spec : void 0, I = v == null ? void 0 : v.strict;
|
|
8217
|
+
if (v != null && v.strip) {
|
|
8214
8218
|
c = c || f in r;
|
|
8215
8219
|
continue;
|
|
8216
8220
|
}
|
|
8217
|
-
b = !t.__validating || !
|
|
8218
|
-
} else p && !o && (s[f] =
|
|
8219
|
-
(p !== f in s || s[f] !==
|
|
8221
|
+
b = !t.__validating || !I ? g.cast(m, l) : m, b !== void 0 && (s[f] = b);
|
|
8222
|
+
} else p && !o && (s[f] = m);
|
|
8223
|
+
(p !== f in s || s[f] !== m) && (c = !0);
|
|
8220
8224
|
}
|
|
8221
8225
|
return c ? s : r;
|
|
8222
8226
|
}
|
|
@@ -8810,12 +8814,12 @@ function Dc({ selected: n, onRemove: e, onClose: t }) {
|
|
|
8810
8814
|
const [i, r] = L(""), a = n.filter(
|
|
8811
8815
|
(o) => o.label.toLowerCase().includes(i.toLowerCase())
|
|
8812
8816
|
);
|
|
8813
|
-
return /* @__PURE__ */ d("div", { style: ee.overlay, onClick: t, children: /* @__PURE__ */
|
|
8814
|
-
/* @__PURE__ */
|
|
8817
|
+
return /* @__PURE__ */ d("div", { style: ee.overlay, onClick: t, children: /* @__PURE__ */ O("div", { style: ee.modal, onClick: (o) => o.stopPropagation(), children: [
|
|
8818
|
+
/* @__PURE__ */ O("div", { style: ee.modalHeader, children: [
|
|
8815
8819
|
/* @__PURE__ */ d("span", { children: "Selected Rows" }),
|
|
8816
8820
|
/* @__PURE__ */ d("button", { type: "button", style: ee.modalCloseBtn, onClick: t, children: /* @__PURE__ */ d(Fe, { size: 20 }) })
|
|
8817
8821
|
] }),
|
|
8818
|
-
/* @__PURE__ */
|
|
8822
|
+
/* @__PURE__ */ O("div", { style: ee.modalSearch, children: [
|
|
8819
8823
|
/* @__PURE__ */ d(gn, { size: 18, color: "rgba(0,0,0,0.38)" }),
|
|
8820
8824
|
/* @__PURE__ */ d(
|
|
8821
8825
|
"input",
|
|
@@ -8829,9 +8833,9 @@ function Dc({ selected: n, onRemove: e, onClose: t }) {
|
|
|
8829
8833
|
}
|
|
8830
8834
|
)
|
|
8831
8835
|
] }),
|
|
8832
|
-
/* @__PURE__ */
|
|
8836
|
+
/* @__PURE__ */ O("div", { style: ee.modalList, children: [
|
|
8833
8837
|
a.length === 0 && /* @__PURE__ */ d("div", { style: { textAlign: "center", padding: "24px 0", color: "rgba(0,0,0,0.38)", fontSize: 13 }, children: "No items found" }),
|
|
8834
|
-
a.map((o) => /* @__PURE__ */
|
|
8838
|
+
a.map((o) => /* @__PURE__ */ O("div", { style: ee.modalRow, children: [
|
|
8835
8839
|
/* @__PURE__ */ d("span", { children: o.label }),
|
|
8836
8840
|
/* @__PURE__ */ d(
|
|
8837
8841
|
"button",
|
|
@@ -8849,11 +8853,11 @@ function Dc({ selected: n, onRemove: e, onClose: t }) {
|
|
|
8849
8853
|
] }) });
|
|
8850
8854
|
}
|
|
8851
8855
|
function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }) {
|
|
8852
|
-
const o = n, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Vc, c = o.id ?? o.name ?? "", [f, g] = L(""), [p,
|
|
8856
|
+
const o = n, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Vc, c = o.id ?? o.name ?? "", [f, g] = L(""), [p, m] = L(1), [b, v] = L([]), [I, C] = L(!1), [y, h] = L(!1), [x, R] = L(null), [S, T] = L(!1), B = H(null), M = H(0), F = H(!0);
|
|
8853
8857
|
q(() => () => {
|
|
8854
8858
|
F.current = !1, B.current && clearTimeout(B.current);
|
|
8855
8859
|
}, []);
|
|
8856
|
-
const D = s ? Array.isArray(e) ? e : [] : e ? [e] : [], G = D.length,
|
|
8860
|
+
const D = s ? Array.isArray(e) ? e : [] : e ? [e] : [], G = D.length, W = z(
|
|
8857
8861
|
(w, k) => {
|
|
8858
8862
|
if (o.fetchOptions) return o.fetchOptions(w, k);
|
|
8859
8863
|
if (o.dataSource) {
|
|
@@ -8866,31 +8870,31 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8866
8870
|
[o.fetchOptions, o.dataSource, o.id]
|
|
8867
8871
|
), V = z(
|
|
8868
8872
|
(w, k) => {
|
|
8869
|
-
const $ = ++
|
|
8870
|
-
|
|
8871
|
-
!F.current || $ !==
|
|
8873
|
+
const $ = ++M.current;
|
|
8874
|
+
h(!0), W(w, k).then((_) => {
|
|
8875
|
+
!F.current || $ !== M.current || (v(_.options.slice(0, l)), C(_.hasNextPage));
|
|
8872
8876
|
}).catch(() => {
|
|
8873
|
-
!F.current || $ !==
|
|
8877
|
+
!F.current || $ !== M.current || (v([]), C(!1));
|
|
8874
8878
|
}).finally(() => {
|
|
8875
|
-
!F.current || $ !==
|
|
8879
|
+
!F.current || $ !== M.current || h(!1);
|
|
8876
8880
|
});
|
|
8877
8881
|
},
|
|
8878
|
-
[
|
|
8882
|
+
[W, l]
|
|
8879
8883
|
);
|
|
8880
8884
|
q(() => {
|
|
8881
8885
|
V("", 1);
|
|
8882
8886
|
}, []);
|
|
8883
8887
|
const j = (w) => {
|
|
8884
8888
|
const k = w.target.value;
|
|
8885
|
-
g(k),
|
|
8886
|
-
},
|
|
8889
|
+
g(k), m(1), B.current && clearTimeout(B.current), B.current = setTimeout(() => V(k, 1), 300);
|
|
8890
|
+
}, Q = (w) => {
|
|
8887
8891
|
if (s) {
|
|
8888
8892
|
const k = Array.isArray(e) ? e : [], $ = k.some((_) => _.value === w.value);
|
|
8889
8893
|
t($ ? k.filter((_) => _.value !== w.value) : [...k, w]);
|
|
8890
8894
|
} else
|
|
8891
8895
|
t((e == null ? void 0 : e.value) === w.value ? null : w);
|
|
8892
8896
|
i == null || i();
|
|
8893
|
-
},
|
|
8897
|
+
}, U = () => {
|
|
8894
8898
|
if (!s) return;
|
|
8895
8899
|
const w = Array.isArray(e) ? e : [];
|
|
8896
8900
|
if (b.every(($) => w.some((_) => _.value === $.value)))
|
|
@@ -8906,12 +8910,12 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8906
8910
|
} else
|
|
8907
8911
|
t(null), T(!1);
|
|
8908
8912
|
i == null || i();
|
|
8909
|
-
}, ie = o.columns.length + 1,
|
|
8913
|
+
}, ie = o.columns.length + 1, E = b.length > 0 && b.every(
|
|
8910
8914
|
(w) => D.some((k) => k.value === w.value)
|
|
8911
8915
|
), P = b.some(
|
|
8912
8916
|
(w) => D.some((k) => k.value === w.value)
|
|
8913
8917
|
), Z = (w) => D.some((k) => k.value === w.value);
|
|
8914
|
-
return /* @__PURE__ */
|
|
8918
|
+
return /* @__PURE__ */ O("div", { style: { marginBottom: 16 }, children: [
|
|
8915
8919
|
/* @__PURE__ */ d(
|
|
8916
8920
|
le,
|
|
8917
8921
|
{
|
|
@@ -8923,9 +8927,9 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8923
8927
|
dataTestId: o.dataTestId ?? c
|
|
8924
8928
|
}
|
|
8925
8929
|
),
|
|
8926
|
-
/* @__PURE__ */
|
|
8927
|
-
/* @__PURE__ */
|
|
8928
|
-
G > 0 ? /* @__PURE__ */
|
|
8930
|
+
/* @__PURE__ */ O("div", { style: ee.wrapper(u), onBlur: i, id: c, children: [
|
|
8931
|
+
/* @__PURE__ */ O("div", { style: ee.toolbar, children: [
|
|
8932
|
+
G > 0 ? /* @__PURE__ */ O(
|
|
8929
8933
|
"button",
|
|
8930
8934
|
{
|
|
8931
8935
|
type: "button",
|
|
@@ -8939,7 +8943,7 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8939
8943
|
]
|
|
8940
8944
|
}
|
|
8941
8945
|
) : /* @__PURE__ */ d("span", { style: { fontSize: 13, color: "rgba(0,0,0,0.38)" }, children: "No selection" }),
|
|
8942
|
-
/* @__PURE__ */
|
|
8946
|
+
/* @__PURE__ */ O("div", { style: ee.searchWrap, children: [
|
|
8943
8947
|
/* @__PURE__ */ d(gn, { size: 15, color: "rgba(0,0,0,0.38)" }),
|
|
8944
8948
|
/* @__PURE__ */ d(
|
|
8945
8949
|
"input",
|
|
@@ -8954,22 +8958,22 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8954
8958
|
)
|
|
8955
8959
|
] })
|
|
8956
8960
|
] }),
|
|
8957
|
-
/* @__PURE__ */ d("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */
|
|
8958
|
-
/* @__PURE__ */ d("thead", { style: ee.thead, children: /* @__PURE__ */
|
|
8961
|
+
/* @__PURE__ */ d("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ O("table", { style: ee.table, children: [
|
|
8962
|
+
/* @__PURE__ */ d("thead", { style: ee.thead, children: /* @__PURE__ */ O("tr", { children: [
|
|
8959
8963
|
/* @__PURE__ */ d("th", { style: ee.checkTh, children: s && /* @__PURE__ */ d(
|
|
8960
8964
|
xr,
|
|
8961
8965
|
{
|
|
8962
|
-
checked:
|
|
8963
|
-
indeterminate: !
|
|
8964
|
-
onChange:
|
|
8965
|
-
disabled:
|
|
8966
|
+
checked: E,
|
|
8967
|
+
indeterminate: !E && P,
|
|
8968
|
+
onChange: U,
|
|
8969
|
+
disabled: y || b.length === 0
|
|
8966
8970
|
}
|
|
8967
8971
|
) }),
|
|
8968
8972
|
o.columns.map((w) => /* @__PURE__ */ d("th", { style: ee.th(w.width), children: w.label }, w.key))
|
|
8969
8973
|
] }) }),
|
|
8970
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
8971
|
-
const k = Z(w), $ =
|
|
8972
|
-
return /* @__PURE__ */
|
|
8974
|
+
/* @__PURE__ */ d("tbody", { children: y ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: ie, style: ee.statusRow, children: "Loading…" }) }) : b.length === 0 ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: ie, style: ee.statusRow, children: "No results found" }) }) : b.map((w) => {
|
|
8975
|
+
const k = Z(w), $ = x === w.value;
|
|
8976
|
+
return /* @__PURE__ */ O(
|
|
8973
8977
|
"tr",
|
|
8974
8978
|
{
|
|
8975
8979
|
style: {
|
|
@@ -8977,23 +8981,23 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8977
8981
|
background: k ? "rgba(25,118,210,0.06)" : $ ? "rgba(0,0,0,0.03)" : "#fff",
|
|
8978
8982
|
transition: "background 0.1s"
|
|
8979
8983
|
},
|
|
8980
|
-
onClick: () =>
|
|
8981
|
-
onMouseEnter: () =>
|
|
8982
|
-
onMouseLeave: () =>
|
|
8984
|
+
onClick: () => Q(w),
|
|
8985
|
+
onMouseEnter: () => R(w.value),
|
|
8986
|
+
onMouseLeave: () => R(null),
|
|
8983
8987
|
"aria-selected": k,
|
|
8984
8988
|
children: [
|
|
8985
8989
|
/* @__PURE__ */ d("td", { style: ee.checkTd, children: s ? /* @__PURE__ */ d(
|
|
8986
8990
|
xr,
|
|
8987
8991
|
{
|
|
8988
8992
|
checked: k,
|
|
8989
|
-
onChange: () =>
|
|
8993
|
+
onChange: () => Q(w)
|
|
8990
8994
|
}
|
|
8991
8995
|
) : /* @__PURE__ */ d(
|
|
8992
8996
|
"input",
|
|
8993
8997
|
{
|
|
8994
8998
|
type: "radio",
|
|
8995
8999
|
checked: k,
|
|
8996
|
-
onChange: () =>
|
|
9000
|
+
onChange: () => Q(w),
|
|
8997
9001
|
onClick: (_) => _.stopPropagation(),
|
|
8998
9002
|
name: c,
|
|
8999
9003
|
style: { accentColor: "#1976d2", width: 16, height: 16, cursor: "pointer" }
|
|
@@ -9006,16 +9010,16 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
9006
9010
|
);
|
|
9007
9011
|
}) })
|
|
9008
9012
|
] }) }),
|
|
9009
|
-
/* @__PURE__ */
|
|
9013
|
+
/* @__PURE__ */ O("div", { style: ee.footer, children: [
|
|
9010
9014
|
/* @__PURE__ */ d("span", { children: `${(p - 1) * l + 1}–${(p - 1) * l + b.length} of many` }),
|
|
9011
|
-
/* @__PURE__ */
|
|
9015
|
+
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
9012
9016
|
/* @__PURE__ */ d(
|
|
9013
9017
|
"button",
|
|
9014
9018
|
{
|
|
9015
9019
|
type: "button",
|
|
9016
9020
|
onClick: () => {
|
|
9017
9021
|
const w = p - 1;
|
|
9018
|
-
|
|
9022
|
+
m(w), V(f, w);
|
|
9019
9023
|
},
|
|
9020
9024
|
disabled: p <= 1,
|
|
9021
9025
|
style: ee.pageBtn(p <= 1),
|
|
@@ -9029,10 +9033,10 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
9029
9033
|
type: "button",
|
|
9030
9034
|
onClick: () => {
|
|
9031
9035
|
const w = p + 1;
|
|
9032
|
-
|
|
9036
|
+
m(w), V(f, w);
|
|
9033
9037
|
},
|
|
9034
|
-
disabled: !
|
|
9035
|
-
style: ee.pageBtn(!
|
|
9038
|
+
disabled: !I,
|
|
9039
|
+
style: ee.pageBtn(!I),
|
|
9036
9040
|
"aria-label": "Next page",
|
|
9037
9041
|
children: "›"
|
|
9038
9042
|
}
|
|
@@ -9293,11 +9297,12 @@ function zc({
|
|
|
9293
9297
|
setFieldValue: o,
|
|
9294
9298
|
setFieldTouched: u,
|
|
9295
9299
|
compact: s,
|
|
9296
|
-
renderFieldRouter: l
|
|
9300
|
+
renderFieldRouter: l,
|
|
9301
|
+
item: c
|
|
9297
9302
|
}) {
|
|
9298
|
-
const [
|
|
9299
|
-
return /* @__PURE__ */
|
|
9300
|
-
/* @__PURE__ */
|
|
9303
|
+
const [f, g] = L(!0), p = n.children ?? [], m = ro(p), b = Wc(n, e), v = typeof n.helperText == "string" ? n.helperText : void 0, I = `${m} field${m === 1 ? "" : "s"}`;
|
|
9304
|
+
return /* @__PURE__ */ O(N, { sx: Xc(t, s), children: [
|
|
9305
|
+
/* @__PURE__ */ O(N, { onClick: () => g((C) => !C), sx: kc(t, f), children: [
|
|
9301
9306
|
/* @__PURE__ */ d(
|
|
9302
9307
|
N,
|
|
9303
9308
|
{
|
|
@@ -9308,15 +9313,15 @@ function zc({
|
|
|
9308
9313
|
width: 18,
|
|
9309
9314
|
height: 18,
|
|
9310
9315
|
color: "#64748B",
|
|
9311
|
-
transform:
|
|
9316
|
+
transform: f ? "rotate(90deg)" : "rotate(0deg)",
|
|
9312
9317
|
transition: "transform 0.18s ease",
|
|
9313
9318
|
flexShrink: 0
|
|
9314
9319
|
},
|
|
9315
9320
|
children: /* @__PURE__ */ d(bn, { size: 16 })
|
|
9316
9321
|
}
|
|
9317
9322
|
),
|
|
9318
|
-
/* @__PURE__ */
|
|
9319
|
-
/* @__PURE__ */
|
|
9323
|
+
/* @__PURE__ */ O(N, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
9324
|
+
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
9320
9325
|
/* @__PURE__ */ d(
|
|
9321
9326
|
de,
|
|
9322
9327
|
{
|
|
@@ -9327,13 +9332,13 @@ function zc({
|
|
|
9327
9332
|
color: "#0F172A",
|
|
9328
9333
|
overflowWrap: "anywhere"
|
|
9329
9334
|
},
|
|
9330
|
-
children:
|
|
9335
|
+
children: b
|
|
9331
9336
|
}
|
|
9332
9337
|
),
|
|
9333
9338
|
/* @__PURE__ */ d(
|
|
9334
9339
|
Bo,
|
|
9335
9340
|
{
|
|
9336
|
-
label:
|
|
9341
|
+
label: I,
|
|
9337
9342
|
size: "small",
|
|
9338
9343
|
sx: {
|
|
9339
9344
|
height: 20,
|
|
@@ -9346,7 +9351,7 @@ function zc({
|
|
|
9346
9351
|
}
|
|
9347
9352
|
)
|
|
9348
9353
|
] }),
|
|
9349
|
-
|
|
9354
|
+
v && /* @__PURE__ */ d(
|
|
9350
9355
|
de,
|
|
9351
9356
|
{
|
|
9352
9357
|
sx: {
|
|
@@ -9356,7 +9361,7 @@ function zc({
|
|
|
9356
9361
|
color: "#6c757d",
|
|
9357
9362
|
overflowWrap: "anywhere"
|
|
9358
9363
|
},
|
|
9359
|
-
children:
|
|
9364
|
+
children: v
|
|
9360
9365
|
}
|
|
9361
9366
|
)
|
|
9362
9367
|
] })
|
|
@@ -9365,7 +9370,7 @@ function zc({
|
|
|
9365
9370
|
N,
|
|
9366
9371
|
{
|
|
9367
9372
|
sx: {
|
|
9368
|
-
display:
|
|
9373
|
+
display: f ? "block" : "none",
|
|
9369
9374
|
px: t === 0 ? 1.75 : t === 1 ? 1.5 : 0.25,
|
|
9370
9375
|
py: t >= 2 ? 0.75 : 1.5
|
|
9371
9376
|
},
|
|
@@ -9375,11 +9380,11 @@ function zc({
|
|
|
9375
9380
|
sx: {
|
|
9376
9381
|
pl: t === 0 ? 0 : t === 1 ? 1 : 0
|
|
9377
9382
|
},
|
|
9378
|
-
children:
|
|
9379
|
-
const
|
|
9383
|
+
children: p.map((C) => {
|
|
9384
|
+
const y = C.id ?? C.name ?? "", h = e ? `${e}.${y}` : y;
|
|
9380
9385
|
return l({
|
|
9381
|
-
field:
|
|
9382
|
-
pathPrefix:
|
|
9386
|
+
field: C,
|
|
9387
|
+
pathPrefix: h,
|
|
9383
9388
|
depth: t + 1,
|
|
9384
9389
|
values: i,
|
|
9385
9390
|
errors: r,
|
|
@@ -9387,7 +9392,10 @@ function zc({
|
|
|
9387
9392
|
setFieldValue: o,
|
|
9388
9393
|
setFieldTouched: u,
|
|
9389
9394
|
compact: s,
|
|
9390
|
-
inlineLabel: !1
|
|
9395
|
+
inlineLabel: !1,
|
|
9396
|
+
// Pass parent's item scope through — plain object groups don't
|
|
9397
|
+
// create a new array-item scope themselves.
|
|
9398
|
+
item: c
|
|
9391
9399
|
});
|
|
9392
9400
|
})
|
|
9393
9401
|
}
|
|
@@ -9417,7 +9425,7 @@ function _c({
|
|
|
9417
9425
|
q(() => {
|
|
9418
9426
|
c.length !== 0 && (c.some((B) => B.id === f) || g(c[0].id));
|
|
9419
9427
|
}, [c, f]);
|
|
9420
|
-
const p = Zc(),
|
|
9428
|
+
const p = Zc(), m = n.id ?? n.name ?? "", b = n.variant ?? "line", v = n.alignment ?? "left", I = n.height ?? "auto", C = n.margin ?? "normal", y = n.activeColor ?? "#6366f1", h = n.activeTextColor ?? (b === "pill" ? "#ffffff" : y), x = n.inactiveTextColor ?? "#64748b", R = {
|
|
9421
9429
|
left: "flex-start",
|
|
9422
9430
|
"center-left": "flex-start",
|
|
9423
9431
|
center: "center",
|
|
@@ -9425,21 +9433,21 @@ function _c({
|
|
|
9425
9433
|
right: "flex-end"
|
|
9426
9434
|
};
|
|
9427
9435
|
if (c.length === 0)
|
|
9428
|
-
return /* @__PURE__ */
|
|
9436
|
+
return /* @__PURE__ */ O(N, { sx: { p: 2, border: "1px dashed #e2e8f0", borderRadius: 2, color: "#94a3b8", fontSize: 13 }, children: [
|
|
9429
9437
|
"No tabs defined. Add a ",
|
|
9430
9438
|
/* @__PURE__ */ d("code", { children: "tabs" }),
|
|
9431
9439
|
" array to this field descriptor."
|
|
9432
9440
|
] });
|
|
9433
9441
|
const S = c.find((B) => B.id === f) ?? c[0];
|
|
9434
|
-
return /* @__PURE__ */
|
|
9435
|
-
mb:
|
|
9436
|
-
height:
|
|
9437
|
-
display:
|
|
9438
|
-
flexDirection:
|
|
9442
|
+
return /* @__PURE__ */ O(N, { sx: {
|
|
9443
|
+
mb: C === "none" ? 0 : void 0,
|
|
9444
|
+
height: I === "fixed" ? 400 : void 0,
|
|
9445
|
+
display: I === "fixed" ? "flex" : void 0,
|
|
9446
|
+
flexDirection: I === "fixed" ? "column" : void 0
|
|
9439
9447
|
}, children: [
|
|
9440
9448
|
/* @__PURE__ */ d(N, { sx: {
|
|
9441
9449
|
display: "flex",
|
|
9442
|
-
justifyContent:
|
|
9450
|
+
justifyContent: R[v] ?? "flex-start",
|
|
9443
9451
|
alignItems: "center",
|
|
9444
9452
|
gap: 0,
|
|
9445
9453
|
px: 1.5,
|
|
@@ -9447,29 +9455,29 @@ function _c({
|
|
|
9447
9455
|
borderBottom: "1px solid #e2e8f0",
|
|
9448
9456
|
flexShrink: 0
|
|
9449
9457
|
}, children: c.map((B) => {
|
|
9450
|
-
const
|
|
9451
|
-
const re =
|
|
9458
|
+
const M = B.id === f, F = e ? `${e}.${B.id}` : B.id, D = B.fields.some((U) => {
|
|
9459
|
+
const re = U.id ?? U.name ?? "";
|
|
9452
9460
|
return !!`${F}.${re}`.split(".").reduce((P, Z) => P && typeof P == "object" ? P[Z] : void 0, r);
|
|
9453
|
-
}), G = { bgcolor:
|
|
9454
|
-
return /* @__PURE__ */
|
|
9461
|
+
}), G = { bgcolor: y, color: h, borderRadius: "20px", border: "none" }, W = { bgcolor: "transparent", color: x, borderRadius: "20px", border: "none" }, V = { borderBottom: `2px solid ${y}`, color: h, border: "none" };
|
|
9462
|
+
return /* @__PURE__ */ O(
|
|
9455
9463
|
N,
|
|
9456
9464
|
{
|
|
9457
9465
|
component: "button",
|
|
9458
9466
|
type: "button",
|
|
9459
9467
|
onClick: () => g(B.id),
|
|
9460
9468
|
sx: {
|
|
9461
|
-
...b === "pill" ?
|
|
9462
|
-
background: b === "pill" &&
|
|
9469
|
+
...b === "pill" ? M ? G : W : M ? V : { borderBottom: "2px solid transparent", color: x, border: "none" },
|
|
9470
|
+
background: b === "pill" && M ? y : "none",
|
|
9463
9471
|
cursor: "pointer",
|
|
9464
9472
|
px: 1.5,
|
|
9465
9473
|
py: b === "pill" ? 0.5 : 1,
|
|
9466
9474
|
fontSize: 13,
|
|
9467
|
-
fontWeight:
|
|
9475
|
+
fontWeight: M ? 700 : 500,
|
|
9468
9476
|
display: "flex",
|
|
9469
9477
|
alignItems: "center",
|
|
9470
9478
|
gap: 0.5,
|
|
9471
9479
|
transition: "color .12s, border-color .12s, background .12s",
|
|
9472
|
-
"&:hover": { color: b === "pill" &&
|
|
9480
|
+
"&:hover": { color: b === "pill" && M ? h : y },
|
|
9473
9481
|
mb: b === "line" ? "-1px" : 0.5,
|
|
9474
9482
|
mr: b === "pill" ? 0.5 : 0
|
|
9475
9483
|
},
|
|
@@ -9481,16 +9489,16 @@ function _c({
|
|
|
9481
9489
|
B.id
|
|
9482
9490
|
);
|
|
9483
9491
|
}) }),
|
|
9484
|
-
/* @__PURE__ */
|
|
9485
|
-
/* @__PURE__ */ d(N, { className: "ff-form-row", children: S.fields.map((B,
|
|
9492
|
+
/* @__PURE__ */ O(N, { sx: { p: 2, flex: I === "fixed" ? 1 : void 0, overflowY: I === "fixed" ? "auto" : void 0 }, children: [
|
|
9493
|
+
/* @__PURE__ */ d(N, { className: "ff-form-row", children: S.fields.map((B, M) => {
|
|
9486
9494
|
const F = B.id ?? B.name ?? "", G = `${e ? `${e}.${S.id}` : S.id}.${F}`;
|
|
9487
|
-
return /* @__PURE__ */
|
|
9495
|
+
return /* @__PURE__ */ O(N, { sx: { position: "relative", width: "100%" }, children: [
|
|
9488
9496
|
p && /* @__PURE__ */ d(
|
|
9489
9497
|
N,
|
|
9490
9498
|
{
|
|
9491
9499
|
component: "button",
|
|
9492
9500
|
type: "button",
|
|
9493
|
-
onClick: () => p.removeFieldFromTab(
|
|
9501
|
+
onClick: () => p.removeFieldFromTab(m, S.id, M),
|
|
9494
9502
|
title: "Remove field",
|
|
9495
9503
|
sx: {
|
|
9496
9504
|
position: "absolute",
|
|
@@ -9529,12 +9537,12 @@ function _c({
|
|
|
9529
9537
|
})
|
|
9530
9538
|
] }, G);
|
|
9531
9539
|
}) }),
|
|
9532
|
-
p && /* @__PURE__ */
|
|
9540
|
+
p && /* @__PURE__ */ O(
|
|
9533
9541
|
N,
|
|
9534
9542
|
{
|
|
9535
9543
|
component: "button",
|
|
9536
9544
|
type: "button",
|
|
9537
|
-
onClick: () => p.openAddFieldDialog(
|
|
9545
|
+
onClick: () => p.openAddFieldDialog(m, S.id),
|
|
9538
9546
|
sx: {
|
|
9539
9547
|
mt: S.fields.length > 0 ? 1.5 : 0,
|
|
9540
9548
|
width: "100%",
|
|
@@ -9699,14 +9707,14 @@ function $c({ colDef: n, entry: e, onChange: t, cellId: i }) {
|
|
|
9699
9707
|
}
|
|
9700
9708
|
function Uc({ node: n, conditionDef: e, depth: t, fieldPath: i, onUpdate: r, onRemove: a }) {
|
|
9701
9709
|
const [o, u] = L(!1), s = oo(n.entries);
|
|
9702
|
-
return /* @__PURE__ */
|
|
9710
|
+
return /* @__PURE__ */ O(N, { sx: {
|
|
9703
9711
|
border: "1px solid #e9e9e9",
|
|
9704
9712
|
borderLeft: "3px solid #d1d5db",
|
|
9705
9713
|
borderRadius: "6px",
|
|
9706
9714
|
bgcolor: "#f9fafb",
|
|
9707
9715
|
overflow: "hidden"
|
|
9708
9716
|
}, children: [
|
|
9709
|
-
/* @__PURE__ */
|
|
9717
|
+
/* @__PURE__ */ O(
|
|
9710
9718
|
N,
|
|
9711
9719
|
{
|
|
9712
9720
|
sx: {
|
|
@@ -9723,9 +9731,9 @@ function Uc({ node: n, conditionDef: e, depth: t, fieldPath: i, onUpdate: r, onR
|
|
|
9723
9731
|
children: [
|
|
9724
9732
|
/* @__PURE__ */ d(N, { sx: { color: "#94a3b8", display: "flex", alignItems: "center" }, children: o ? /* @__PURE__ */ d(bn, { size: 15 }) : /* @__PURE__ */ d(So, { size: 15 }) }),
|
|
9725
9733
|
/* @__PURE__ */ d(de, { sx: { fontSize: 11, fontWeight: 700, color: "#94a3b8", fontFamily: "monospace", letterSpacing: -1 }, children: "( )" }),
|
|
9726
|
-
/* @__PURE__ */
|
|
9734
|
+
/* @__PURE__ */ O(de, { sx: { fontSize: 11, color: "#64748b" }, children: [
|
|
9727
9735
|
"Group",
|
|
9728
|
-
o && /* @__PURE__ */
|
|
9736
|
+
o && /* @__PURE__ */ O(N, { component: "span", sx: { ml: 0.5, color: "#94a3b8" }, children: [
|
|
9729
9737
|
"· ",
|
|
9730
9738
|
s,
|
|
9731
9739
|
" condition",
|
|
@@ -9762,16 +9770,16 @@ function ao({ conditionDef: n, entries: e, onUpdate: t, depth: i = 0, fieldPath:
|
|
|
9762
9770
|
type: "group",
|
|
9763
9771
|
connector: "and",
|
|
9764
9772
|
entries: [Cr()]
|
|
9765
|
-
}]), s = (g) => t(e.filter((p,
|
|
9766
|
-
(
|
|
9773
|
+
}]), s = (g) => t(e.filter((p, m) => m !== g)), l = (g, p) => t(e.map((m, b) => b === g ? { ...m, connector: p } : m)), c = (g, p) => t(e.map((m, b) => b === g ? { ...m, ...p } : m)), f = (g, p) => t(e.map(
|
|
9774
|
+
(m, b) => b === g ? { ...m, entries: p } : m
|
|
9767
9775
|
));
|
|
9768
|
-
return /* @__PURE__ */
|
|
9769
|
-
e.map((g, p) => /* @__PURE__ */
|
|
9776
|
+
return /* @__PURE__ */ O(N, { sx: { mt: i === 0 ? 1.25 : 0.25 }, children: [
|
|
9777
|
+
e.map((g, p) => /* @__PURE__ */ O(N, { children: [
|
|
9770
9778
|
p > 0 && /* @__PURE__ */ d(N, { sx: { display: "flex", alignItems: "center", my: "10px" }, children: /* @__PURE__ */ d(
|
|
9771
9779
|
jc,
|
|
9772
9780
|
{
|
|
9773
9781
|
connector: g.connector ?? "and",
|
|
9774
|
-
onChange: (
|
|
9782
|
+
onChange: (m) => l(p, m)
|
|
9775
9783
|
}
|
|
9776
9784
|
) }),
|
|
9777
9785
|
io(g) ? /* @__PURE__ */ d(
|
|
@@ -9781,21 +9789,21 @@ function ao({ conditionDef: n, entries: e, onUpdate: t, depth: i = 0, fieldPath:
|
|
|
9781
9789
|
conditionDef: n,
|
|
9782
9790
|
depth: i,
|
|
9783
9791
|
fieldPath: `${r}__g${p}`,
|
|
9784
|
-
onUpdate: (
|
|
9792
|
+
onUpdate: (m) => f(p, m),
|
|
9785
9793
|
onRemove: () => s(p)
|
|
9786
9794
|
}
|
|
9787
|
-
) : /* @__PURE__ */
|
|
9795
|
+
) : /* @__PURE__ */ O(N, { children: [
|
|
9788
9796
|
p === 0 && /* @__PURE__ */ d(de, { sx: { fontSize: 12, fontWeight: 600, color: "#475569", mb: 0.75 }, children: "When" }),
|
|
9789
|
-
/* @__PURE__ */
|
|
9790
|
-
/* @__PURE__ */ d(N, { sx: { display: "grid", gridTemplateColumns: "repeat(12, 1fr)", gap: 0.75, flex: 1 }, children: n.fields.map((
|
|
9797
|
+
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
9798
|
+
/* @__PURE__ */ d(N, { sx: { display: "grid", gridTemplateColumns: "repeat(12, 1fr)", gap: 0.75, flex: 1 }, children: n.fields.map((m) => /* @__PURE__ */ d(N, { sx: { gridColumn: `span ${m.colSpan ?? 4}` }, children: /* @__PURE__ */ d(
|
|
9791
9799
|
$c,
|
|
9792
9800
|
{
|
|
9793
|
-
colDef:
|
|
9801
|
+
colDef: m,
|
|
9794
9802
|
entry: g,
|
|
9795
9803
|
onChange: (b) => c(p, b),
|
|
9796
|
-
cellId: `${r}__${p}__${
|
|
9804
|
+
cellId: `${r}__${p}__${m.id}`
|
|
9797
9805
|
}
|
|
9798
|
-
) },
|
|
9806
|
+
) }, m.id)) }),
|
|
9799
9807
|
/* @__PURE__ */ d(Se, { title: "Remove condition", children: /* @__PURE__ */ d(
|
|
9800
9808
|
N,
|
|
9801
9809
|
{
|
|
@@ -9810,7 +9818,7 @@ function ao({ conditionDef: n, entries: e, onUpdate: t, depth: i = 0, fieldPath:
|
|
|
9810
9818
|
] })
|
|
9811
9819
|
] })
|
|
9812
9820
|
] }, p)),
|
|
9813
|
-
/* @__PURE__ */
|
|
9821
|
+
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", gap: 1, mt: e.length > 0 ? 1.5 : 0 }, children: [
|
|
9814
9822
|
/* @__PURE__ */ d(
|
|
9815
9823
|
Ln,
|
|
9816
9824
|
{
|
|
@@ -9941,7 +9949,7 @@ const td = Ft(function(e, t) {
|
|
|
9941
9949
|
var c;
|
|
9942
9950
|
if ("form" in e && e.form) {
|
|
9943
9951
|
const { form: f } = e;
|
|
9944
|
-
return /* @__PURE__ */ d(Pn, { value: f._formik, children: /* @__PURE__ */
|
|
9952
|
+
return /* @__PURE__ */ d(Pn, { value: f._formik, children: /* @__PURE__ */ O(
|
|
9945
9953
|
lo,
|
|
9946
9954
|
{
|
|
9947
9955
|
formulaConfig: f._formulaConfig,
|
|
@@ -9961,7 +9969,7 @@ const td = Ft(function(e, t) {
|
|
|
9961
9969
|
}
|
|
9962
9970
|
) });
|
|
9963
9971
|
}
|
|
9964
|
-
const [i, r] = L({}), a = e.conditionConfigKey ?? Rr, o = e.formulaConfig ?? i, u = e.onFormulaConfigChange ?? r, s = (f) => /* @__PURE__ */
|
|
9972
|
+
const [i, r] = L({}), a = e.conditionConfigKey ?? Rr, o = e.formulaConfig ?? i, u = e.onFormulaConfigChange ?? r, s = (f) => /* @__PURE__ */ O(Ve, { children: [
|
|
9965
9973
|
/* @__PURE__ */ d(
|
|
9966
9974
|
Er,
|
|
9967
9975
|
{
|
|
@@ -9994,9 +10002,9 @@ const td = Ft(function(e, t) {
|
|
|
9994
10002
|
enableReinitialize: !0,
|
|
9995
10003
|
validateOnChange: !0,
|
|
9996
10004
|
validateOnBlur: !0,
|
|
9997
|
-
children: ({ values: f, errors: g, touched: p, isSubmitting:
|
|
9998
|
-
var
|
|
9999
|
-
return /* @__PURE__ */
|
|
10005
|
+
children: ({ values: f, errors: g, touched: p, isSubmitting: m, setFieldValue: b, setFieldTouched: v }) => {
|
|
10006
|
+
var I;
|
|
10007
|
+
return /* @__PURE__ */ O(mo, { id: e.formId, children: [
|
|
10000
10008
|
e.onValuesChange && /* @__PURE__ */ d(Kc, { onValuesChange: e.onValuesChange }),
|
|
10001
10009
|
e.onValidityChange && /* @__PURE__ */ d(ed, { onValidityChange: e.onValidityChange }),
|
|
10002
10010
|
s(
|
|
@@ -10008,11 +10016,11 @@ const td = Ft(function(e, t) {
|
|
|
10008
10016
|
errors: g,
|
|
10009
10017
|
touched: p,
|
|
10010
10018
|
setFieldValue: b,
|
|
10011
|
-
setFieldTouched:
|
|
10019
|
+
setFieldTouched: v
|
|
10012
10020
|
}
|
|
10013
10021
|
)
|
|
10014
10022
|
),
|
|
10015
|
-
(
|
|
10023
|
+
(I = e.children) == null ? void 0 : I.call(e, { isSubmitting: m })
|
|
10016
10024
|
] });
|
|
10017
10025
|
}
|
|
10018
10026
|
}
|
|
@@ -10083,21 +10091,24 @@ function pt({
|
|
|
10083
10091
|
setFieldValue: o,
|
|
10084
10092
|
setFieldTouched: u,
|
|
10085
10093
|
compact: s,
|
|
10086
|
-
inlineLabel: l
|
|
10094
|
+
inlineLabel: l,
|
|
10095
|
+
item: c
|
|
10087
10096
|
}) {
|
|
10088
|
-
var
|
|
10089
|
-
const { formulaConfig:
|
|
10090
|
-
|
|
10091
|
-
const
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10097
|
+
var y;
|
|
10098
|
+
const { formulaConfig: f, onFormulaConfigChange: g, conditionConfig: p, onConditionConfigChange: m } = Qc(), b = { values: i, item: c }, v = H(i);
|
|
10099
|
+
v.current = i;
|
|
10100
|
+
const I = H(c);
|
|
10101
|
+
I.current = c;
|
|
10102
|
+
const C = ae(() => {
|
|
10103
|
+
const h = Mc(n);
|
|
10104
|
+
return async (x) => {
|
|
10105
|
+
var S;
|
|
10106
|
+
const R = { values: v.current, item: I.current };
|
|
10107
|
+
if (!(((S = n.shouldHide) == null ? void 0 : S.call(n, R)) ?? n.hidden))
|
|
10108
|
+
return h(x);
|
|
10098
10109
|
};
|
|
10099
10110
|
}, [n]);
|
|
10100
|
-
return vo({ name: e, validate:
|
|
10111
|
+
return vo({ name: e, validate: C }), ((y = n.shouldHide) == null ? void 0 : y.call(n, b)) ?? n.hidden ? null : n.type === "object" ? /* @__PURE__ */ d($e, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
10101
10112
|
zc,
|
|
10102
10113
|
{
|
|
10103
10114
|
field: n,
|
|
@@ -10109,21 +10120,23 @@ function pt({
|
|
|
10109
10120
|
setFieldValue: o,
|
|
10110
10121
|
setFieldTouched: u,
|
|
10111
10122
|
compact: s,
|
|
10112
|
-
|
|
10123
|
+
item: c,
|
|
10124
|
+
renderFieldRouter: (h) => /* @__PURE__ */ d(
|
|
10113
10125
|
pt,
|
|
10114
10126
|
{
|
|
10115
|
-
field:
|
|
10116
|
-
pathPrefix:
|
|
10117
|
-
depth:
|
|
10118
|
-
values:
|
|
10119
|
-
errors:
|
|
10120
|
-
touched:
|
|
10121
|
-
setFieldValue:
|
|
10122
|
-
setFieldTouched:
|
|
10123
|
-
compact:
|
|
10124
|
-
inlineLabel:
|
|
10127
|
+
field: h.field,
|
|
10128
|
+
pathPrefix: h.pathPrefix,
|
|
10129
|
+
depth: h.depth,
|
|
10130
|
+
values: h.values,
|
|
10131
|
+
errors: h.errors,
|
|
10132
|
+
touched: h.touched,
|
|
10133
|
+
setFieldValue: h.setFieldValue,
|
|
10134
|
+
setFieldTouched: h.setFieldTouched,
|
|
10135
|
+
compact: h.compact,
|
|
10136
|
+
inlineLabel: h.inlineLabel,
|
|
10137
|
+
item: h.item
|
|
10125
10138
|
},
|
|
10126
|
-
|
|
10139
|
+
h.pathPrefix
|
|
10127
10140
|
)
|
|
10128
10141
|
}
|
|
10129
10142
|
) }) : n.type === "array" && Array.isArray(n.children ?? n.itemFields) ? /* @__PURE__ */ d($e, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
@@ -10132,7 +10145,7 @@ function pt({
|
|
|
10132
10145
|
field: n,
|
|
10133
10146
|
value: Ue(i, e),
|
|
10134
10147
|
values: i,
|
|
10135
|
-
onChange: (
|
|
10148
|
+
onChange: (h) => o(e, h),
|
|
10136
10149
|
onBlur: () => u(e, !0),
|
|
10137
10150
|
pathPrefix: e,
|
|
10138
10151
|
depth: t,
|
|
@@ -10141,21 +10154,22 @@ function pt({
|
|
|
10141
10154
|
parentTouched: a,
|
|
10142
10155
|
parentSetFieldValue: o,
|
|
10143
10156
|
parentSetFieldTouched: u,
|
|
10144
|
-
renderFieldRouter: (
|
|
10157
|
+
renderFieldRouter: (h) => /* @__PURE__ */ d(
|
|
10145
10158
|
pt,
|
|
10146
10159
|
{
|
|
10147
|
-
field:
|
|
10148
|
-
pathPrefix:
|
|
10149
|
-
depth:
|
|
10150
|
-
values:
|
|
10151
|
-
errors:
|
|
10152
|
-
touched:
|
|
10153
|
-
setFieldValue:
|
|
10154
|
-
setFieldTouched:
|
|
10155
|
-
compact:
|
|
10156
|
-
inlineLabel:
|
|
10160
|
+
field: h.field,
|
|
10161
|
+
pathPrefix: h.pathPrefix,
|
|
10162
|
+
depth: h.depth,
|
|
10163
|
+
values: h.values,
|
|
10164
|
+
errors: h.errors,
|
|
10165
|
+
touched: h.touched,
|
|
10166
|
+
setFieldValue: h.setFieldValue,
|
|
10167
|
+
setFieldTouched: h.setFieldTouched,
|
|
10168
|
+
compact: h.compact,
|
|
10169
|
+
inlineLabel: h.inlineLabel,
|
|
10170
|
+
item: h.item
|
|
10157
10171
|
},
|
|
10158
|
-
|
|
10172
|
+
h.pathPrefix
|
|
10159
10173
|
)
|
|
10160
10174
|
}
|
|
10161
10175
|
) }) : n.type === "tabs" ? /* @__PURE__ */ d($e, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
@@ -10170,21 +10184,22 @@ function pt({
|
|
|
10170
10184
|
setFieldValue: o,
|
|
10171
10185
|
setFieldTouched: u,
|
|
10172
10186
|
compact: s,
|
|
10173
|
-
renderFieldRouter: (
|
|
10187
|
+
renderFieldRouter: (h) => /* @__PURE__ */ d(
|
|
10174
10188
|
pt,
|
|
10175
10189
|
{
|
|
10176
|
-
field:
|
|
10177
|
-
pathPrefix:
|
|
10178
|
-
depth:
|
|
10179
|
-
values:
|
|
10180
|
-
errors:
|
|
10181
|
-
touched:
|
|
10182
|
-
setFieldValue:
|
|
10183
|
-
setFieldTouched:
|
|
10184
|
-
compact:
|
|
10185
|
-
inlineLabel:
|
|
10190
|
+
field: h.field,
|
|
10191
|
+
pathPrefix: h.pathPrefix,
|
|
10192
|
+
depth: h.depth,
|
|
10193
|
+
values: h.values,
|
|
10194
|
+
errors: h.errors,
|
|
10195
|
+
touched: h.touched,
|
|
10196
|
+
setFieldValue: h.setFieldValue,
|
|
10197
|
+
setFieldTouched: h.setFieldTouched,
|
|
10198
|
+
compact: h.compact,
|
|
10199
|
+
inlineLabel: h.inlineLabel,
|
|
10200
|
+
item: h.item
|
|
10186
10201
|
},
|
|
10187
|
-
|
|
10202
|
+
h.pathPrefix
|
|
10188
10203
|
)
|
|
10189
10204
|
}
|
|
10190
10205
|
) }) : /* @__PURE__ */ d(
|
|
@@ -10199,10 +10214,11 @@ function pt({
|
|
|
10199
10214
|
setFieldTouched: u,
|
|
10200
10215
|
compact: s,
|
|
10201
10216
|
inlineLabel: l,
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10217
|
+
item: c,
|
|
10218
|
+
formulaConfig: f,
|
|
10219
|
+
onFormulaConfigChange: g,
|
|
10220
|
+
conditionConfig: p,
|
|
10221
|
+
onConditionConfigChange: m
|
|
10206
10222
|
}
|
|
10207
10223
|
);
|
|
10208
10224
|
}
|
|
@@ -10216,53 +10232,54 @@ function rd({
|
|
|
10216
10232
|
setFieldTouched: o,
|
|
10217
10233
|
compact: u,
|
|
10218
10234
|
inlineLabel: s,
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10235
|
+
item: l,
|
|
10236
|
+
formulaConfig: c,
|
|
10237
|
+
onFormulaConfigChange: f,
|
|
10238
|
+
conditionConfig: g,
|
|
10239
|
+
onConditionConfigChange: p
|
|
10223
10240
|
}) {
|
|
10224
|
-
var
|
|
10225
|
-
const
|
|
10226
|
-
|
|
10227
|
-
const
|
|
10228
|
-
if (!
|
|
10229
|
-
const
|
|
10230
|
-
|
|
10231
|
-
}, [t,
|
|
10232
|
-
const
|
|
10233
|
-
if (!
|
|
10241
|
+
var D, G, W;
|
|
10242
|
+
const m = { values: t, item: l }, b = Ue(t, e), v = H(n.compute);
|
|
10243
|
+
v.current = n.compute, q(() => {
|
|
10244
|
+
const V = v.current;
|
|
10245
|
+
if (!V) return;
|
|
10246
|
+
const j = V({ values: t });
|
|
10247
|
+
j !== b && a(e, j);
|
|
10248
|
+
}, [t, b, e, a]);
|
|
10249
|
+
const I = te.get(n.type);
|
|
10250
|
+
if (!I)
|
|
10234
10251
|
return null;
|
|
10235
|
-
const
|
|
10236
|
-
var
|
|
10252
|
+
const C = typeof n.disabled == "function" ? n.disabled(m) : ((D = n.shouldDisable) == null ? void 0 : D.call(n, m)) ?? n.disabled ?? !1, y = Ue(i, e), h = !!Ue(r, e), x = (G = n.compute) == null ? void 0 : G.call(n, m), R = x !== void 0 ? x : b, S = (W = n.transform) != null && W.in ? n.transform.in(R) : R, T = (V) => {
|
|
10253
|
+
var Q, U;
|
|
10237
10254
|
if (n.compute) return;
|
|
10238
|
-
const
|
|
10239
|
-
a(e,
|
|
10240
|
-
},
|
|
10241
|
-
if (!(!
|
|
10242
|
-
if (
|
|
10243
|
-
const
|
|
10244
|
-
delete
|
|
10255
|
+
const j = (Q = n.transform) != null && Q.out ? n.transform.out(V) : V;
|
|
10256
|
+
a(e, j), o(e, !0), (U = n.onChange) == null || U.call(n, j, { values: t, setFieldValue: a });
|
|
10257
|
+
}, B = n.condition && g ? g[e] ?? [] : [], M = (V) => {
|
|
10258
|
+
if (!(!p || !g))
|
|
10259
|
+
if (V.length === 0) {
|
|
10260
|
+
const j = { ...g };
|
|
10261
|
+
delete j[e], p(j);
|
|
10245
10262
|
} else
|
|
10246
|
-
|
|
10247
|
-
},
|
|
10248
|
-
field: { ...n, disabled:
|
|
10249
|
-
value:
|
|
10263
|
+
p({ ...g, [e]: V });
|
|
10264
|
+
}, F = {
|
|
10265
|
+
field: { ...n, disabled: C, id: e, name: e },
|
|
10266
|
+
value: S,
|
|
10250
10267
|
values: t,
|
|
10251
|
-
onChange:
|
|
10268
|
+
onChange: T,
|
|
10252
10269
|
onBlur: () => o(e, !0),
|
|
10253
|
-
error:
|
|
10254
|
-
touched:
|
|
10255
|
-
formulaConfig:
|
|
10256
|
-
onFormulaConfigChange:
|
|
10270
|
+
error: y,
|
|
10271
|
+
touched: h,
|
|
10272
|
+
formulaConfig: c,
|
|
10273
|
+
onFormulaConfigChange: f
|
|
10257
10274
|
};
|
|
10258
|
-
return s ? /* @__PURE__ */ d(
|
|
10259
|
-
/* @__PURE__ */ d(
|
|
10275
|
+
return s ? /* @__PURE__ */ d(I, { ...F, inlineLabel: !0 }) : /* @__PURE__ */ O($e, { field: n, compact: u, children: [
|
|
10276
|
+
/* @__PURE__ */ d(I, { ...F, touched: h }),
|
|
10260
10277
|
n.condition && /* @__PURE__ */ d(
|
|
10261
10278
|
ao,
|
|
10262
10279
|
{
|
|
10263
10280
|
conditionDef: n.condition,
|
|
10264
|
-
entries:
|
|
10265
|
-
onUpdate:
|
|
10281
|
+
entries: B,
|
|
10282
|
+
onUpdate: M,
|
|
10266
10283
|
fieldPath: e
|
|
10267
10284
|
}
|
|
10268
10285
|
)
|