@notmrabhi/flowforge 0.1.49 → 0.1.51
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-BlL83YY1.js → SchemaBuilderDrawer-BP7aZgFe.js} +2 -2
- package/dist/{SchemaBuilderDrawer-BlL83YY1.js.map → SchemaBuilderDrawer-BP7aZgFe.js.map} +1 -1
- package/dist/{SchemaBuilderDrawer-CcsuQXAA.js → SchemaBuilderDrawer-CIxQGffa.js} +2 -2
- package/dist/{SchemaBuilderDrawer-CcsuQXAA.js.map → SchemaBuilderDrawer-CIxQGffa.js.map} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.js +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +7 -0
- package/dist/form.js +2 -2
- package/dist/{index-CvMXmKr6.js → index-B-D9UuLO.js} +1078 -1071
- package/dist/index-B-D9UuLO.js.map +1 -0
- package/dist/{index-rIRhggmY.js → index-B-vpguq_.js} +2 -2
- package/dist/{index-rIRhggmY.js.map → index-B-vpguq_.js.map} +1 -1
- package/dist/{index-le3_BkKg.js → index-BbYsmgpo.js} +2 -2
- package/dist/{index-le3_BkKg.js.map → index-BbYsmgpo.js.map} +1 -1
- package/dist/{index-Bf1-wgQA.js → index-BsgdZXaY.js} +2 -2
- package/dist/{index-Bf1-wgQA.js.map → index-BsgdZXaY.js.map} +1 -1
- package/dist/index-DUbQPmIx.js +10 -0
- package/dist/index-DUbQPmIx.js.map +1 -0
- package/dist/{index-Cp4CA6tn.js → index-hv7IJZ9j.js} +2 -2
- package/dist/{index-Cp4CA6tn.js.map → index-hv7IJZ9j.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -3
- package/dist/{templateSkeletons-BSE8YZ80.js → templateSkeletons-f-XQQvyE.js} +2 -2
- package/dist/{templateSkeletons-BSE8YZ80.js.map → templateSkeletons-f-XQQvyE.js.map} +1 -1
- package/dist/{templateSkeletons-Ct26LDFe.js → templateSkeletons-gOva2Xus.js} +2 -2
- package/dist/{templateSkeletons-Ct26LDFe.js.map → templateSkeletons-gOva2Xus.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CvMXmKr6.js.map +0 -1
- package/dist/index-yOtdNWwA.js +0 -10
- package/dist/index-yOtdNWwA.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as E, jsx as d, Fragment as Te } from "react/jsx-runtime";
|
|
2
2
|
import * as K from "react";
|
|
3
|
-
import et, { createContext as nt, useContext as Je, useState as W, useRef as
|
|
3
|
+
import et, { createContext as nt, useContext as Je, useState as W, useRef as z, useCallback as k, useEffect as q, useMemo as oe, useLayoutEffect as mo, Component as Tr, Fragment as qt, forwardRef as Tt, Suspense as Gr, useImperativeHandle as vo } from "react";
|
|
4
4
|
import { FormikProvider as Ln, Formik as Io, Form as yo, useField as xo, useFormikContext as Gt } from "formik";
|
|
5
5
|
import { MdInfoOutline as Co, MdDataObject as Bt, MdClose as Ge, MdSearch as gn, MdKeyboardArrowRight as bn, MdContentCopy as Ao, MdCheckCircle as Ro, MdAdd as tt, MdUploadFile as So, MdInsertDriveFile as Eo, MdDeleteOutline as Br, MdKeyboardArrowDown as Oo } from "react-icons/md";
|
|
6
6
|
import { Tooltip as Ee, IconButton as Vr, Box as D, Typography as fe, InputBase as Fo, Divider as hn, Collapse as Dr, Snackbar as wo, Alert as To, Select as Nr, MenuItem as vt, TextField as Pr, FormControlLabel as Lr, Switch as Go, RadioGroup as Bo, Radio as Vo, Slider as Do, Chip as No, Button as Mn } from "@mui/material";
|
|
7
7
|
import Po, { createPortal as Lo } from "react-dom";
|
|
8
8
|
import mn, { components as vn } from "react-select";
|
|
9
|
-
import { jsx as
|
|
9
|
+
import { jsx as J, css as Mr, keyframes as Mo } from "@emotion/react";
|
|
10
10
|
const ot = /* @__PURE__ */ new Map(), te = {
|
|
11
11
|
register(t, e) {
|
|
12
12
|
ot.set(t, e);
|
|
@@ -55,7 +55,7 @@ const ot = /* @__PURE__ */ new Map(), te = {
|
|
|
55
55
|
HELPER_MT: 4,
|
|
56
56
|
FIELD_MB: 20
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function Id(t) {
|
|
59
59
|
return {
|
|
60
60
|
height: S.INPUT_HEIGHT,
|
|
61
61
|
width: "100%",
|
|
@@ -126,7 +126,7 @@ function ko(t) {
|
|
|
126
126
|
function zo(t) {
|
|
127
127
|
return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function yd(t, ...e) {
|
|
130
130
|
return e.length === 0 ? t : `${t}.${e.map((n) => `["${zo(n)}"]`).join(".")}`;
|
|
131
131
|
}
|
|
132
132
|
function Ve(t, e = !1) {
|
|
@@ -160,20 +160,20 @@ function Be(t) {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
function It(t) {
|
|
163
|
-
return t.map(
|
|
163
|
+
return t.map(ze).join("");
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ze(t) {
|
|
166
166
|
switch (t.type) {
|
|
167
167
|
case "text":
|
|
168
168
|
return t.value;
|
|
169
169
|
case "path-ref":
|
|
170
170
|
return `_P('${t.path}')`;
|
|
171
171
|
case "concat":
|
|
172
|
-
return t.values.map(
|
|
172
|
+
return t.values.map(ze).join("");
|
|
173
173
|
case "function":
|
|
174
|
-
return `_DE_{_FN_('${t.name}', ${t.args.map(
|
|
174
|
+
return `_DE_{_FN_('${t.name}', ${t.args.map(ze).join(", ")})}`;
|
|
175
175
|
case "condition":
|
|
176
|
-
return `_DE_{_IF_(${
|
|
176
|
+
return `_DE_{_IF_(${ze(t.if)}, ${ze(t.then)}, ${ze(t.else)})}`;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
function Xr() {
|
|
@@ -210,7 +210,7 @@ function Hr(t) {
|
|
|
210
210
|
...t.connector && { connector: t.connector }
|
|
211
211
|
} : _o(t);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function xd({
|
|
214
214
|
values: t,
|
|
215
215
|
conditionConfig: e
|
|
216
216
|
}) {
|
|
@@ -251,15 +251,15 @@ function Zr(t) {
|
|
|
251
251
|
return n === 0 ? i : (e.connector === "or" ? " || " : " && ") + i;
|
|
252
252
|
}).join("");
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Cd(t) {
|
|
255
255
|
return Object.fromEntries(
|
|
256
256
|
Object.entries(t).filter(([, e]) => e.length > 0).map(([e, n]) => [e, Zr(n)])
|
|
257
257
|
);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Ad(t) {
|
|
260
260
|
return typeof t == "string" && /_DE_\{_P\('[^']*'\)\}|_P\('[^']*'\)/.test(t);
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Rd(t) {
|
|
263
263
|
return t.some((e) => e.type !== "text");
|
|
264
264
|
}
|
|
265
265
|
function _r(t, e = !1) {
|
|
@@ -285,20 +285,20 @@ function jo(t, e = !1) {
|
|
|
285
285
|
return _r(Ve(t, e), e);
|
|
286
286
|
}
|
|
287
287
|
const In = "_DE_{_P(", yn = ")}";
|
|
288
|
-
function
|
|
288
|
+
function Sd(t) {
|
|
289
289
|
return typeof t == "string" && t.startsWith(In) && t.endsWith(yn);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Ed(t) {
|
|
292
292
|
return `${In}'${t}'${yn}`;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Od(t) {
|
|
295
295
|
return t.slice(In.length, -yn.length).replace(/^['"]|['"]$/g, "");
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Fd(t) {
|
|
298
298
|
return t.replace(/_DE_\{_P\('[^']*'\)\}/g, "");
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return t ? /* @__PURE__ */
|
|
300
|
+
function ue({ label: t, required: e, showOptional: n, info: i, htmlFor: r, dataTestId: a }) {
|
|
301
|
+
return t ? /* @__PURE__ */ E(
|
|
302
302
|
"label",
|
|
303
303
|
{
|
|
304
304
|
htmlFor: r,
|
|
@@ -352,33 +352,33 @@ function Jr(t) {
|
|
|
352
352
|
}
|
|
353
353
|
const Yr = nt(null);
|
|
354
354
|
function Qo({ groups: t, children: e }) {
|
|
355
|
-
const [n, i] = W(!1), [r, a] = W(null), [o, u] = W(null), s =
|
|
355
|
+
const [n, i] = W(!1), [r, a] = W(null), [o, u] = W(null), s = z(null), l = z(0), c = k(() => i(!0), []), f = k(() => {
|
|
356
356
|
i(!1), u(null);
|
|
357
|
-
}, []), g =
|
|
357
|
+
}, []), g = k((h, v) => {
|
|
358
358
|
h ? (l.current += 1, v && u(v)) : (l.current = Math.max(0, l.current - 1), l.current === 0 && (i(!1), u(null)));
|
|
359
|
-
}, []), p =
|
|
359
|
+
}, []), p = k((h) => {
|
|
360
360
|
s.current = h, a(h.fieldId);
|
|
361
|
-
}, []), m =
|
|
361
|
+
}, []), m = k((h) => {
|
|
362
362
|
s.current && (s.current.savedRange = h);
|
|
363
|
-
}, []), b =
|
|
363
|
+
}, []), b = k((h, v) => {
|
|
364
364
|
const A = s.current;
|
|
365
365
|
if (!A) return;
|
|
366
366
|
if (A.onInsert) {
|
|
367
367
|
A.onInsert(h, v);
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
if (!
|
|
372
|
-
|
|
370
|
+
const x = A.editorRef.current;
|
|
371
|
+
if (!x) return;
|
|
372
|
+
x.focus();
|
|
373
373
|
const I = qo(h, v);
|
|
374
|
-
let
|
|
375
|
-
if (!
|
|
374
|
+
let C = A.savedRange;
|
|
375
|
+
if (!C) {
|
|
376
376
|
const R = window.getSelection();
|
|
377
|
-
R && R.rangeCount > 0 && (
|
|
377
|
+
R && R.rangeCount > 0 && (C = R.getRangeAt(0), x.contains(C.commonAncestorContainer) || (C = null));
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
C || (C = document.createRange(), C.selectNodeContents(x), C.collapse(!1)), C.deleteContents(), C.insertNode(I), C.setStartAfter(I), C.collapse(!0);
|
|
380
380
|
const y = window.getSelection();
|
|
381
|
-
y == null || y.removeAllRanges(), y == null || y.addRange(
|
|
381
|
+
y == null || y.removeAllRanges(), y == null || y.addRange(C), s.current && (s.current.savedRange = C.cloneRange()), x.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
382
382
|
}, []);
|
|
383
383
|
return /* @__PURE__ */ d(Yr.Provider, { value: {
|
|
384
384
|
groups: t,
|
|
@@ -435,7 +435,7 @@ function Ko({ item: t }) {
|
|
|
435
435
|
boxShadow: "0 2px 8px rgba(99,102,241,0.25)"
|
|
436
436
|
}), document.body.appendChild(o), a.dataTransfer.setDragImage(o, o.offsetWidth / 2, o.offsetHeight / 2), requestAnimationFrame(() => document.body.removeChild(o)), i(!0);
|
|
437
437
|
};
|
|
438
|
-
return /* @__PURE__ */ d(Ee, { title: t.path, placement: "left", enterDelay: 600, children: /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ d(Ee, { title: t.path, placement: "left", enterDelay: 600, children: /* @__PURE__ */ E(
|
|
439
439
|
D,
|
|
440
440
|
{
|
|
441
441
|
draggable: !0,
|
|
@@ -463,7 +463,7 @@ function Ko({ item: t }) {
|
|
|
463
463
|
display: "flex",
|
|
464
464
|
alignItems: "center"
|
|
465
465
|
}, children: /* @__PURE__ */ d(Bt, { size: 14 }) }),
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ E(D, { sx: { minWidth: 0 }, children: [
|
|
467
467
|
/* @__PURE__ */ d(fe, { sx: {
|
|
468
468
|
fontSize: 13,
|
|
469
469
|
fontWeight: 500,
|
|
@@ -487,12 +487,12 @@ function $r({
|
|
|
487
487
|
group: t,
|
|
488
488
|
searchQuery: e
|
|
489
489
|
}) {
|
|
490
|
-
const [n, i] = W(!0), r =
|
|
490
|
+
const [n, i] = W(!0), r = oe(() => {
|
|
491
491
|
const a = Cn(t.items).filter((o) => !o.children);
|
|
492
492
|
return e ? a.filter((o) => jr(o, e)) : t.items;
|
|
493
493
|
}, [t.items, e]);
|
|
494
|
-
return e && r.length === 0 ? null : /* @__PURE__ */
|
|
495
|
-
!e && /* @__PURE__ */
|
|
494
|
+
return e && r.length === 0 ? null : /* @__PURE__ */ E(D, { children: [
|
|
495
|
+
!e && /* @__PURE__ */ E(
|
|
496
496
|
D,
|
|
497
497
|
{
|
|
498
498
|
onClick: () => i((a) => !a),
|
|
@@ -539,18 +539,18 @@ function $r({
|
|
|
539
539
|
) }) })
|
|
540
540
|
] });
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function wd({
|
|
543
543
|
width: t = 300,
|
|
544
544
|
title: e = "Values",
|
|
545
545
|
mode: n = "drawer",
|
|
546
546
|
floating: i = !1
|
|
547
547
|
}) {
|
|
548
|
-
const r = rt(), [a, o] = W(""), [u, s] = W(null), l =
|
|
548
|
+
const r = rt(), [a, o] = W(""), [u, s] = W(null), l = z(null);
|
|
549
549
|
if (q(() => {
|
|
550
550
|
if (!(n === "popover" || n === "drawer" && i) || !(r != null && r.isOpen)) return;
|
|
551
551
|
function p(m) {
|
|
552
|
-
var A,
|
|
553
|
-
const b = m.target, h = (A = l.current) == null ? void 0 : A.contains(b), v = (
|
|
552
|
+
var A, x;
|
|
553
|
+
const b = m.target, h = (A = l.current) == null ? void 0 : A.contains(b), v = (x = r == null ? void 0 : r.anchorEl) == null ? void 0 : x.contains(b);
|
|
554
554
|
!h && !v && (r == null || r.closePicker());
|
|
555
555
|
}
|
|
556
556
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
@@ -559,10 +559,10 @@ function Fd({
|
|
|
559
559
|
s(null);
|
|
560
560
|
return;
|
|
561
561
|
}
|
|
562
|
-
const p = r.anchorEl.getBoundingClientRect(), m = t, b = 440, h = r.anchorEl.closest(".MuiDrawer-paper") || r.anchorEl.closest(".MuiDialog-paper") || r.anchorEl.closest(".MuiPaper-root"), v = h ? h.getBoundingClientRect() : p, A = v.left - 8,
|
|
562
|
+
const p = r.anchorEl.getBoundingClientRect(), m = t, b = 440, h = r.anchorEl.closest(".MuiDrawer-paper") || r.anchorEl.closest(".MuiDialog-paper") || r.anchorEl.closest(".MuiPaper-root"), v = h ? h.getBoundingClientRect() : p, A = v.left - 8, x = window.innerWidth - v.right - 8, I = A >= m ? v.left - m - 8 : x >= m ? v.right + 8 : Math.max(8, v.left - m - 8), C = p.top, y = Math.min(C, window.innerHeight - b - 8);
|
|
563
563
|
s({ top: y, left: I });
|
|
564
564
|
}, [n, r == null ? void 0 : r.anchorEl, r == null ? void 0 : r.isOpen, t]), !r || n === "popover" && !r.isOpen || n === "drawer" && i && !r.isOpen) return null;
|
|
565
|
-
const c = r.groups.some((g) => a ? Cn(g.items).some((p) => !p.children && jr(p, a)) : !0), f = /* @__PURE__ */
|
|
565
|
+
const c = r.groups.some((g) => a ? Cn(g.items).some((p) => !p.children && jr(p, a)) : !0), f = /* @__PURE__ */ E(
|
|
566
566
|
D,
|
|
567
567
|
{
|
|
568
568
|
ref: l,
|
|
@@ -581,7 +581,7 @@ function Fd({
|
|
|
581
581
|
...n === "popover" && u ? { position: "fixed", top: u.top, left: u.left, zIndex: 1400 } : n === "popover" ? { display: "none" } : n === "drawer" && i && u ? { position: "fixed", top: u.top, left: u.left, zIndex: 1400 } : n === "drawer" && i ? { display: "none" } : {}
|
|
582
582
|
},
|
|
583
583
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ E(D, { sx: {
|
|
585
585
|
display: "flex",
|
|
586
586
|
alignItems: "center",
|
|
587
587
|
gap: 1,
|
|
@@ -613,7 +613,7 @@ function Fd({
|
|
|
613
613
|
}
|
|
614
614
|
)
|
|
615
615
|
] }),
|
|
616
|
-
/* @__PURE__ */ d(D, { sx: { px: 1.5, py: 1, flexShrink: 0 }, children: /* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ d(D, { sx: { px: 1.5, py: 1, flexShrink: 0 }, children: /* @__PURE__ */ E(D, { sx: {
|
|
617
617
|
display: "flex",
|
|
618
618
|
alignItems: "center",
|
|
619
619
|
gap: 0.75,
|
|
@@ -669,7 +669,7 @@ function Fd({
|
|
|
669
669
|
"&::-webkit-scrollbar-thumb": { background: "rgba(255,255,255,0.12)", borderRadius: 4 }
|
|
670
670
|
}, children: /* @__PURE__ */ d(D, { sx: {
|
|
671
671
|
"& .MuiTypography-root": { color: "#cbd5e1" }
|
|
672
|
-
}, children: c ? r.groups.map((g, p) => /* @__PURE__ */ d($r, { group: g, searchQuery: a }, p)) : /* @__PURE__ */ d(D, { sx: { px: 2, py: 3, textAlign: "center" }, children: /* @__PURE__ */
|
|
672
|
+
}, children: c ? r.groups.map((g, p) => /* @__PURE__ */ d($r, { group: g, searchQuery: a }, p)) : /* @__PURE__ */ d(D, { sx: { px: 2, py: 3, textAlign: "center" }, children: /* @__PURE__ */ E(fe, { sx: { fontSize: 12, color: "#475569" }, children: [
|
|
673
673
|
'No variables match "',
|
|
674
674
|
a,
|
|
675
675
|
'"'
|
|
@@ -735,127 +735,126 @@ function Qr({
|
|
|
735
735
|
onPickerOpen: l,
|
|
736
736
|
compact: c
|
|
737
737
|
}) {
|
|
738
|
-
const f =
|
|
738
|
+
const f = z(null), g = z(null), p = z(""), m = z(!1), b = t.length === 0 || t.length === 1 && t[0].type === "text" && !t[0].value, h = rt(), [v, A] = W(null), [x, I] = W(!1), C = z(void 0);
|
|
739
739
|
q(() => {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
740
|
+
const w = f.current;
|
|
741
|
+
if (!w) return;
|
|
742
|
+
const _ = De(t), T = `${u ? "1" : "0"}:${_}`, P = C.current !== (h == null ? void 0 : h.groups);
|
|
743
|
+
if (T === p.current && !P) return;
|
|
744
|
+
const j = /* @__PURE__ */ new Map();
|
|
744
745
|
if (h != null && h.groups) {
|
|
745
|
-
const
|
|
746
|
+
const ie = (Ce) => {
|
|
746
747
|
for (const Ie of Ce)
|
|
747
|
-
Ie.path &&
|
|
748
|
+
Ie.path && j.set(Ie.path, Ie.label), Ie.children && ie(Ie.children);
|
|
748
749
|
};
|
|
749
|
-
for (const Ce of h.groups)
|
|
750
|
+
for (const Ce of h.groups) ie(Ce.items);
|
|
750
751
|
}
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
E.querySelectorAll("[data-path]").forEach((ne) => {
|
|
755
|
-
ne.dataset.path && ne.dataset.label && $.set(ne.dataset.path, ne.dataset.label);
|
|
752
|
+
const Q = /* @__PURE__ */ new Map();
|
|
753
|
+
w.querySelectorAll("[data-path]").forEach((ie) => {
|
|
754
|
+
ie.dataset.path && ie.dataset.label && Q.set(ie.dataset.path, ie.dataset.label);
|
|
756
755
|
});
|
|
757
|
-
const
|
|
758
|
-
if (
|
|
759
|
-
const Ce =
|
|
760
|
-
return { ...
|
|
756
|
+
const ne = _r(t, u).map((ie) => {
|
|
757
|
+
if (ie.type !== "chip" || !ie.path) return ie;
|
|
758
|
+
const Ce = j.get(ie.path) ?? Q.get(ie.path) ?? ie.label;
|
|
759
|
+
return { ...ie, label: Ce };
|
|
761
760
|
});
|
|
762
|
-
ta(
|
|
761
|
+
ta(w, ne), p.current = T, C.current = h == null ? void 0 : h.groups;
|
|
763
762
|
}, [t, u, h == null ? void 0 : h.groups]);
|
|
764
|
-
const
|
|
765
|
-
const
|
|
766
|
-
if (!
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
}, [e, u]),
|
|
770
|
-
m.current ||
|
|
771
|
-
}, [
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
if (!(
|
|
775
|
-
const
|
|
776
|
-
|
|
777
|
-
}, [
|
|
778
|
-
const
|
|
779
|
-
if (!(
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
}, []),
|
|
763
|
+
const y = k(() => {
|
|
764
|
+
const w = f.current;
|
|
765
|
+
if (!w) return;
|
|
766
|
+
const _ = ea(w), T = Ve(_, u), P = `${u ? "1" : "0"}:${De(T)}`;
|
|
767
|
+
P !== p.current && (p.current = P, e(T));
|
|
768
|
+
}, [e, u]), R = k(() => {
|
|
769
|
+
m.current || y();
|
|
770
|
+
}, [y]), O = k((w) => {
|
|
771
|
+
w.preventDefault();
|
|
772
|
+
const _ = w.clipboardData.getData("text/plain"), T = window.getSelection();
|
|
773
|
+
if (!(T != null && T.rangeCount)) return;
|
|
774
|
+
const P = T.getRangeAt(0);
|
|
775
|
+
P.deleteContents(), P.insertNode(na(jo(_, u))), P.collapse(!1), T.removeAllRanges(), T.addRange(P), y();
|
|
776
|
+
}, [y, u]), G = k((w) => {
|
|
777
|
+
const _ = window.getSelection();
|
|
778
|
+
if (!(_ != null && _.rangeCount)) return;
|
|
779
|
+
const T = Wn(_.getRangeAt(0).cloneContents());
|
|
780
|
+
T && (w.clipboardData.setData("text/plain", T), w.preventDefault());
|
|
781
|
+
}, []), M = k((w) => {
|
|
782
|
+
const _ = window.getSelection();
|
|
783
|
+
if (!(_ != null && _.rangeCount)) return;
|
|
784
|
+
const T = _.getRangeAt(0), P = Wn(T.cloneContents());
|
|
785
|
+
P && (w.clipboardData.setData("text/plain", P), w.preventDefault(), T.deleteContents(), y());
|
|
786
|
+
}, [y]), N = k((w) => {
|
|
787
|
+
w.key === "Enter" && w.preventDefault();
|
|
788
|
+
}, []), L = k((w, _) => {
|
|
789
|
+
const T = f.current;
|
|
790
|
+
if (!T) return;
|
|
791
|
+
T.focus();
|
|
783
792
|
const P = window.getSelection();
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
J.focus();
|
|
793
|
-
const w = window.getSelection();
|
|
794
|
-
let Z = null;
|
|
795
|
-
w && w.rangeCount > 0 && J.contains(w.getRangeAt(0).commonAncestorContainer) ? Z = w.getRangeAt(0) : (Z = document.createRange(), Z.selectNodeContents(J), Z.collapse(!1));
|
|
796
|
-
const $ = Xn(E, P);
|
|
797
|
-
Z.deleteContents(), Z.insertNode($), Z.setStartAfter($), Z.collapse(!0), w == null || w.removeAllRanges(), w == null || w.addRange(Z), x();
|
|
798
|
-
}, [x]), L = X(() => {
|
|
799
|
-
!h || !o || (h.registerField({ editorRef: f, savedRange: null, fieldId: o, onInsert: N }), h.notifyFieldFocus(o, f.current), h.openPicker());
|
|
800
|
-
}, [h, o, N]), G = X(() => {
|
|
801
|
-
var P;
|
|
793
|
+
let j = null;
|
|
794
|
+
P && P.rangeCount > 0 && T.contains(P.getRangeAt(0).commonAncestorContainer) ? j = P.getRangeAt(0) : (j = document.createRange(), j.selectNodeContents(T), j.collapse(!1));
|
|
795
|
+
const Q = Xn(w, _);
|
|
796
|
+
j.deleteContents(), j.insertNode(Q), j.setStartAfter(Q), j.collapse(!0), P == null || P.removeAllRanges(), P == null || P.addRange(j), y();
|
|
797
|
+
}, [y]), B = k(() => {
|
|
798
|
+
!h || !o || (h.registerField({ editorRef: f, savedRange: null, fieldId: o, onInsert: L }), h.notifyFieldFocus(o, f.current), h.openPicker());
|
|
799
|
+
}, [h, o, L]), F = k(() => {
|
|
800
|
+
var _;
|
|
802
801
|
if (!h) return;
|
|
803
|
-
const
|
|
804
|
-
|
|
802
|
+
const w = window.getSelection();
|
|
803
|
+
w && w.rangeCount > 0 && ((_ = f.current) != null && _.contains(w.anchorNode)) && h.saveRange(w.getRangeAt(0).cloneRange());
|
|
805
804
|
}, [h]);
|
|
806
805
|
q(() => {
|
|
807
|
-
document.addEventListener("selectionchange",
|
|
808
|
-
const
|
|
809
|
-
return
|
|
810
|
-
document.removeEventListener("selectionchange",
|
|
806
|
+
document.addEventListener("selectionchange", F);
|
|
807
|
+
const w = f.current;
|
|
808
|
+
return w && w.addEventListener("input", R), () => {
|
|
809
|
+
document.removeEventListener("selectionchange", F), w && w.removeEventListener("input", R);
|
|
811
810
|
};
|
|
812
|
-
}, [
|
|
813
|
-
const
|
|
814
|
-
r || !
|
|
815
|
-
}, [r]),
|
|
811
|
+
}, [F, R]);
|
|
812
|
+
const V = k((w) => {
|
|
813
|
+
r || !w.dataTransfer.types.includes(Kt) || (w.preventDefault(), w.dataTransfer.dropEffect = "copy", A("valid"));
|
|
814
|
+
}, [r]), Z = k(() => {
|
|
816
815
|
A(null);
|
|
817
|
-
}, []),
|
|
818
|
-
if (
|
|
816
|
+
}, []), U = k((w) => {
|
|
817
|
+
if (w.preventDefault(), A(null), r) {
|
|
819
818
|
I(!0);
|
|
820
819
|
return;
|
|
821
820
|
}
|
|
822
|
-
const
|
|
823
|
-
if (!
|
|
824
|
-
let
|
|
821
|
+
const _ = w.dataTransfer.getData(Kt);
|
|
822
|
+
if (!_) return;
|
|
823
|
+
let T;
|
|
825
824
|
try {
|
|
826
|
-
|
|
825
|
+
T = JSON.parse(_);
|
|
827
826
|
} catch {
|
|
828
827
|
return;
|
|
829
828
|
}
|
|
830
|
-
const
|
|
831
|
-
if (!
|
|
832
|
-
const
|
|
833
|
-
if (!
|
|
834
|
-
const
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
}, [r]),
|
|
839
|
-
return /* @__PURE__ */
|
|
840
|
-
/* @__PURE__ */
|
|
829
|
+
const P = ra(w.clientX, w.clientY);
|
|
830
|
+
if (!P) return;
|
|
831
|
+
const j = f.current;
|
|
832
|
+
if (!j || !j.contains(P.commonAncestorContainer)) return;
|
|
833
|
+
const Q = Xn(T.path, T.label);
|
|
834
|
+
P.deleteContents(), P.insertNode(Q), P.setStartAfter(Q), P.collapse(!0);
|
|
835
|
+
const ne = window.getSelection();
|
|
836
|
+
ne == null || ne.removeAllRanges(), ne == null || ne.addRange(P), j.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
837
|
+
}, [r]), $ = (s ? 1 : 0) + (l ? 1 : 0), re = $ > 0 ? `${$ * 30 + 8}px` : "12px", se = v === "valid" ? "#16a34a" : v === "invalid" || a ? "#d32f2f" : "rgba(0,0,0,0.23)", X = v === "valid" ? "0 0 0 2px rgba(22,163,74,0.2)" : v === "invalid" ? "0 0 0 2px rgba(211,47,47,0.2)" : void 0;
|
|
838
|
+
return /* @__PURE__ */ E(D, { sx: { position: "relative" }, children: [
|
|
839
|
+
/* @__PURE__ */ E(
|
|
841
840
|
D,
|
|
842
841
|
{
|
|
843
842
|
sx: {
|
|
844
|
-
border: `1px solid ${
|
|
843
|
+
border: `1px solid ${se}`,
|
|
845
844
|
borderRadius: "4px",
|
|
846
845
|
...c ? {
|
|
847
846
|
display: "flex",
|
|
848
847
|
alignItems: "center",
|
|
849
848
|
pl: 1,
|
|
850
849
|
py: "6px",
|
|
851
|
-
pr:
|
|
850
|
+
pr: re,
|
|
852
851
|
overflow: "hidden"
|
|
853
852
|
} : {
|
|
854
853
|
display: "flex",
|
|
855
854
|
alignItems: "center",
|
|
856
855
|
pl: 1.5,
|
|
857
856
|
py: "6px",
|
|
858
|
-
pr:
|
|
857
|
+
pr: re,
|
|
859
858
|
overflow: "hidden"
|
|
860
859
|
},
|
|
861
860
|
fontSize: c ? 13 : 14,
|
|
@@ -863,18 +862,18 @@ function Qr({
|
|
|
863
862
|
cursor: r ? "not-allowed" : "text",
|
|
864
863
|
bgcolor: v === "valid" ? "rgba(22,163,74,0.04)" : r ? "rgba(0,0,0,0.04)" : "#fff",
|
|
865
864
|
transition: "border-color 0.15s, box-shadow 0.15s, background 0.15s",
|
|
866
|
-
boxShadow:
|
|
865
|
+
boxShadow: X,
|
|
867
866
|
"&:focus-within": {
|
|
868
867
|
borderColor: a ? "#d32f2f" : "#1976d2",
|
|
869
868
|
boxShadow: a ? "0 0 0 2px rgba(211,47,47,0.2)" : "0 0 0 2px rgba(25,118,210,0.2)"
|
|
870
869
|
}
|
|
871
870
|
},
|
|
872
|
-
onDragOver:
|
|
873
|
-
onDragLeave:
|
|
874
|
-
onDrop:
|
|
871
|
+
onDragOver: V,
|
|
872
|
+
onDragLeave: Z,
|
|
873
|
+
onDrop: U,
|
|
875
874
|
onClick: () => {
|
|
876
|
-
var
|
|
877
|
-
r || (
|
|
875
|
+
var w;
|
|
876
|
+
r || (w = f.current) == null || w.focus();
|
|
878
877
|
},
|
|
879
878
|
children: [
|
|
880
879
|
b && i && /* @__PURE__ */ d(
|
|
@@ -886,7 +885,7 @@ function Qr({
|
|
|
886
885
|
top: "50%",
|
|
887
886
|
transform: "translateY(-50%)",
|
|
888
887
|
left: c ? 8 : 14,
|
|
889
|
-
right:
|
|
888
|
+
right: re,
|
|
890
889
|
// prevent overflow into action buttons
|
|
891
890
|
fontSize: c ? 13 : 14,
|
|
892
891
|
color: "rgba(0,0,0,0.38)",
|
|
@@ -907,17 +906,17 @@ function Qr({
|
|
|
907
906
|
id: o,
|
|
908
907
|
contentEditable: r ? "false" : "true",
|
|
909
908
|
suppressContentEditableWarning: !0,
|
|
910
|
-
onPaste:
|
|
911
|
-
onCopy:
|
|
912
|
-
onCut:
|
|
913
|
-
onKeyDown:
|
|
914
|
-
onFocus:
|
|
909
|
+
onPaste: O,
|
|
910
|
+
onCopy: G,
|
|
911
|
+
onCut: M,
|
|
912
|
+
onKeyDown: N,
|
|
913
|
+
onFocus: B,
|
|
915
914
|
onBlur: n,
|
|
916
915
|
onCompositionStart: () => {
|
|
917
916
|
m.current = !0;
|
|
918
917
|
},
|
|
919
918
|
onCompositionEnd: () => {
|
|
920
|
-
m.current = !1,
|
|
919
|
+
m.current = !1, y();
|
|
921
920
|
},
|
|
922
921
|
style: {
|
|
923
922
|
outline: "none",
|
|
@@ -933,7 +932,7 @@ function Qr({
|
|
|
933
932
|
]
|
|
934
933
|
}
|
|
935
934
|
),
|
|
936
|
-
|
|
935
|
+
$ > 0 && !r && /* @__PURE__ */ E(D, { sx: {
|
|
937
936
|
position: "absolute",
|
|
938
937
|
right: 4,
|
|
939
938
|
top: "50%",
|
|
@@ -953,10 +952,10 @@ function Qr({
|
|
|
953
952
|
component: "button",
|
|
954
953
|
type: "button",
|
|
955
954
|
ref: g,
|
|
956
|
-
onClick: (
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
h == null || h.notifyFormulaToggle(
|
|
955
|
+
onClick: (w) => {
|
|
956
|
+
w.stopPropagation();
|
|
957
|
+
const _ = !u;
|
|
958
|
+
h == null || h.notifyFormulaToggle(_, _ ? g.current : null), s();
|
|
960
959
|
},
|
|
961
960
|
sx: {
|
|
962
961
|
border: "none",
|
|
@@ -982,8 +981,8 @@ function Qr({
|
|
|
982
981
|
{
|
|
983
982
|
component: "button",
|
|
984
983
|
type: "button",
|
|
985
|
-
onClick: (
|
|
986
|
-
|
|
984
|
+
onClick: (w) => {
|
|
985
|
+
w.stopPropagation(), l();
|
|
987
986
|
},
|
|
988
987
|
sx: {
|
|
989
988
|
background: "none",
|
|
@@ -1006,7 +1005,7 @@ function Qr({
|
|
|
1006
1005
|
/* @__PURE__ */ d(
|
|
1007
1006
|
wo,
|
|
1008
1007
|
{
|
|
1009
|
-
open:
|
|
1008
|
+
open: x,
|
|
1010
1009
|
autoHideDuration: 3e3,
|
|
1011
1010
|
onClose: () => I(!1),
|
|
1012
1011
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
@@ -1042,38 +1041,38 @@ function qr({
|
|
|
1042
1041
|
}) {
|
|
1043
1042
|
const l = { ...t, multiline: t.multiline || t.type === "textarea" }, c = l.id ?? l.name ?? "", f = l.formula === !0, g = rt(), [p, m] = W(
|
|
1044
1043
|
() => f && c in (o ?? {})
|
|
1045
|
-
), b =
|
|
1044
|
+
), b = z(p);
|
|
1046
1045
|
b.current = p, q(() => () => {
|
|
1047
1046
|
b.current && (g == null || g.notifyFormulaToggle(!1));
|
|
1048
1047
|
}, []);
|
|
1049
1048
|
const [h, v] = W(
|
|
1050
1049
|
() => f ? Ve(String(e ?? ""), c in (o ?? {})) : []
|
|
1051
|
-
), [A,
|
|
1050
|
+
), [A, x] = W(() => String(e ?? "")), I = z(e);
|
|
1052
1051
|
q(() => {
|
|
1053
1052
|
if (e === I.current) return;
|
|
1054
1053
|
I.current = e;
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1054
|
+
const X = String(e ?? "");
|
|
1055
|
+
x(X), f && v(Ve(X, p));
|
|
1057
1056
|
}, [e]);
|
|
1058
|
-
const
|
|
1059
|
-
v(
|
|
1060
|
-
const
|
|
1061
|
-
I.current =
|
|
1057
|
+
const C = (X) => {
|
|
1058
|
+
v(X);
|
|
1059
|
+
const w = p ? It(X) : De(X);
|
|
1060
|
+
I.current = w, n(w);
|
|
1062
1061
|
}, y = () => {
|
|
1063
|
-
const
|
|
1064
|
-
if (m(
|
|
1065
|
-
const
|
|
1066
|
-
v(
|
|
1067
|
-
const
|
|
1068
|
-
I.current =
|
|
1062
|
+
const X = !p;
|
|
1063
|
+
if (m(X), X) {
|
|
1064
|
+
const w = De(h), _ = Ve(w, !0);
|
|
1065
|
+
v(_);
|
|
1066
|
+
const T = It(_);
|
|
1067
|
+
I.current = T, n(T), u == null || u({ ...o, [c]: Xr() });
|
|
1069
1068
|
} else {
|
|
1070
|
-
const
|
|
1071
|
-
I.current =
|
|
1072
|
-
const
|
|
1073
|
-
delete
|
|
1069
|
+
const w = De(h);
|
|
1070
|
+
I.current = w, n(w);
|
|
1071
|
+
const _ = { ...o };
|
|
1072
|
+
delete _[c], u == null || u(_);
|
|
1074
1073
|
}
|
|
1075
|
-
}, R = a && !!r,
|
|
1076
|
-
|
|
1074
|
+
}, R = a && !!r, O = l.disabled === !0, G = /* @__PURE__ */ d(
|
|
1075
|
+
ue,
|
|
1077
1076
|
{
|
|
1078
1077
|
label: l.label,
|
|
1079
1078
|
required: l.required,
|
|
@@ -1084,17 +1083,17 @@ function qr({
|
|
|
1084
1083
|
}
|
|
1085
1084
|
);
|
|
1086
1085
|
if (f) {
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1086
|
+
const X = l.helperText && !s ? /* @__PURE__ */ d("small", { style: ce, children: l.helperText }) : null, w = /* @__PURE__ */ E(Te, { children: [
|
|
1087
|
+
X,
|
|
1089
1088
|
/* @__PURE__ */ d(
|
|
1090
1089
|
Qr,
|
|
1091
1090
|
{
|
|
1092
1091
|
id: c,
|
|
1093
1092
|
expression: h,
|
|
1094
|
-
onExpressionChange:
|
|
1093
|
+
onExpressionChange: C,
|
|
1095
1094
|
onBlur: i,
|
|
1096
1095
|
placeholder: l.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
1097
|
-
disabled:
|
|
1096
|
+
disabled: O,
|
|
1098
1097
|
error: R,
|
|
1099
1098
|
formulaConfigEnabled: p,
|
|
1100
1099
|
onFormulaConfigToggle: y,
|
|
@@ -1103,29 +1102,29 @@ function qr({
|
|
|
1103
1102
|
),
|
|
1104
1103
|
R && /* @__PURE__ */ d("small", { "data-testid": `${c}-error`, style: pe, children: r })
|
|
1105
1104
|
] });
|
|
1106
|
-
return s ? /* @__PURE__ */
|
|
1107
|
-
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children:
|
|
1108
|
-
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children:
|
|
1109
|
-
] }) : /* @__PURE__ */
|
|
1110
|
-
|
|
1111
|
-
|
|
1105
|
+
return s ? /* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "3px 0" }, children: [
|
|
1106
|
+
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children: G }),
|
|
1107
|
+
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: w })
|
|
1108
|
+
] }) : /* @__PURE__ */ E("div", { children: [
|
|
1109
|
+
G,
|
|
1110
|
+
w
|
|
1112
1111
|
] });
|
|
1113
1112
|
}
|
|
1114
|
-
const M = !!l.prefix, N = !!l.suffix, L = !!l.copyable,
|
|
1113
|
+
const M = !!l.prefix, N = !!l.suffix, L = !!l.copyable, B = N || L, F = {
|
|
1115
1114
|
width: "100%",
|
|
1116
1115
|
fontSize: 14,
|
|
1117
1116
|
color: "#374151",
|
|
1118
|
-
backgroundColor:
|
|
1117
|
+
backgroundColor: O ? "#f9fafb" : "#fff",
|
|
1119
1118
|
border: `1px solid ${R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR}`,
|
|
1120
1119
|
borderRadius: S.BORDER_RADIUS,
|
|
1121
1120
|
outline: "none",
|
|
1122
1121
|
paddingTop: l.multiline ? "8px" : "6px",
|
|
1123
1122
|
paddingBottom: l.multiline ? "8px" : "6px",
|
|
1124
1123
|
paddingLeft: M ? 0 : "12px",
|
|
1125
|
-
paddingRight:
|
|
1124
|
+
paddingRight: B ? 0 : "12px",
|
|
1126
1125
|
boxSizing: "border-box",
|
|
1127
1126
|
lineHeight: 1.5,
|
|
1128
|
-
cursor:
|
|
1127
|
+
cursor: O ? "not-allowed" : void 0,
|
|
1129
1128
|
resize: l.multiline ? "vertical" : "none"
|
|
1130
1129
|
}, V = {
|
|
1131
1130
|
position: "relative",
|
|
@@ -1134,9 +1133,9 @@ function qr({
|
|
|
1134
1133
|
width: "100%",
|
|
1135
1134
|
border: `1px solid ${R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR}`,
|
|
1136
1135
|
borderRadius: S.BORDER_RADIUS,
|
|
1137
|
-
backgroundColor:
|
|
1136
|
+
backgroundColor: O ? "#f9fafb" : "#fff",
|
|
1138
1137
|
boxSizing: "border-box"
|
|
1139
|
-
},
|
|
1138
|
+
}, Z = {
|
|
1140
1139
|
display: "flex",
|
|
1141
1140
|
alignItems: "center",
|
|
1142
1141
|
padding: "0 10px",
|
|
@@ -1153,22 +1152,22 @@ function qr({
|
|
|
1153
1152
|
fontSize: 14,
|
|
1154
1153
|
color: "#374151",
|
|
1155
1154
|
padding: l.multiline ? "8px 12px" : "6px 12px",
|
|
1156
|
-
cursor:
|
|
1155
|
+
cursor: O ? "not-allowed" : void 0,
|
|
1157
1156
|
resize: l.multiline ? "vertical" : "none",
|
|
1158
1157
|
boxSizing: "border-box",
|
|
1159
1158
|
lineHeight: 1.5
|
|
1160
|
-
},
|
|
1159
|
+
}, re = M || B ? /* @__PURE__ */ E(
|
|
1161
1160
|
"div",
|
|
1162
1161
|
{
|
|
1163
1162
|
style: V,
|
|
1164
|
-
onFocus: (
|
|
1165
|
-
|
|
1163
|
+
onFocus: (X) => {
|
|
1164
|
+
X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR_FOCUS, X.currentTarget.style.boxShadow = R ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW;
|
|
1166
1165
|
},
|
|
1167
|
-
onBlur: (
|
|
1168
|
-
|
|
1166
|
+
onBlur: (X) => {
|
|
1167
|
+
X.currentTarget.contains(X.relatedTarget) || (X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR, X.currentTarget.style.boxShadow = "none");
|
|
1169
1168
|
},
|
|
1170
1169
|
children: [
|
|
1171
|
-
M && /* @__PURE__ */ d("span", { style:
|
|
1170
|
+
M && /* @__PURE__ */ d("span", { style: Z, children: l.prefix }),
|
|
1172
1171
|
l.multiline ? /* @__PURE__ */ d(
|
|
1173
1172
|
"textarea",
|
|
1174
1173
|
{
|
|
@@ -1177,7 +1176,7 @@ function qr({
|
|
|
1177
1176
|
style: { ...U, minHeight: 72 },
|
|
1178
1177
|
placeholder: l.placeholder ?? "",
|
|
1179
1178
|
value: A,
|
|
1180
|
-
disabled:
|
|
1179
|
+
disabled: O,
|
|
1181
1180
|
readOnly: l.readOnly,
|
|
1182
1181
|
rows: l.rows ?? 3,
|
|
1183
1182
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1187,8 +1186,8 @@ function qr({
|
|
|
1187
1186
|
"aria-describedby": l.ariaDescribedBy,
|
|
1188
1187
|
"aria-required": l.required || void 0,
|
|
1189
1188
|
"aria-invalid": R || void 0,
|
|
1190
|
-
onChange: (
|
|
1191
|
-
|
|
1189
|
+
onChange: (X) => {
|
|
1190
|
+
x(X.target.value), I.current = X.target.value, n(X.target.value);
|
|
1192
1191
|
},
|
|
1193
1192
|
onBlur: i
|
|
1194
1193
|
}
|
|
@@ -1201,7 +1200,7 @@ function qr({
|
|
|
1201
1200
|
style: U,
|
|
1202
1201
|
placeholder: l.placeholder ?? "",
|
|
1203
1202
|
value: A,
|
|
1204
|
-
disabled:
|
|
1203
|
+
disabled: O,
|
|
1205
1204
|
readOnly: l.readOnly,
|
|
1206
1205
|
autoComplete: l.autocomplete ?? "off",
|
|
1207
1206
|
autoFocus: l.autoFocus,
|
|
@@ -1210,13 +1209,13 @@ function qr({
|
|
|
1210
1209
|
"aria-describedby": l.ariaDescribedBy,
|
|
1211
1210
|
"aria-required": l.required || void 0,
|
|
1212
1211
|
"aria-invalid": R || void 0,
|
|
1213
|
-
onChange: (
|
|
1214
|
-
|
|
1212
|
+
onChange: (X) => {
|
|
1213
|
+
x(X.target.value), I.current = X.target.value, n(X.target.value);
|
|
1215
1214
|
},
|
|
1216
1215
|
onBlur: i
|
|
1217
1216
|
}
|
|
1218
1217
|
),
|
|
1219
|
-
N && /* @__PURE__ */ d("span", { style:
|
|
1218
|
+
N && /* @__PURE__ */ d("span", { style: Z, children: l.suffix }),
|
|
1220
1219
|
L && /* @__PURE__ */ d(Ee, { title: "Copy", placement: "top", children: /* @__PURE__ */ d(
|
|
1221
1220
|
"button",
|
|
1222
1221
|
{
|
|
@@ -1224,7 +1223,7 @@ function qr({
|
|
|
1224
1223
|
onClick: () => navigator.clipboard.writeText(A),
|
|
1225
1224
|
"aria-label": "copy",
|
|
1226
1225
|
tabIndex: -1,
|
|
1227
|
-
style: { ...
|
|
1226
|
+
style: { ...Z, background: "none", border: "none", cursor: "pointer", padding: "0 8px" },
|
|
1228
1227
|
children: /* @__PURE__ */ d(Ao, { size: 16 })
|
|
1229
1228
|
}
|
|
1230
1229
|
) })
|
|
@@ -1235,10 +1234,10 @@ function qr({
|
|
|
1235
1234
|
{
|
|
1236
1235
|
id: c,
|
|
1237
1236
|
name: c,
|
|
1238
|
-
style: { ...
|
|
1237
|
+
style: { ...F, minHeight: 72, height: void 0, padding: "8px 12px" },
|
|
1239
1238
|
placeholder: l.placeholder ?? "",
|
|
1240
1239
|
value: A,
|
|
1241
|
-
disabled:
|
|
1240
|
+
disabled: O,
|
|
1242
1241
|
readOnly: l.readOnly,
|
|
1243
1242
|
rows: l.rows ?? 3,
|
|
1244
1243
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1248,15 +1247,15 @@ function qr({
|
|
|
1248
1247
|
"aria-describedby": l.ariaDescribedBy,
|
|
1249
1248
|
"aria-required": l.required || void 0,
|
|
1250
1249
|
"aria-invalid": R || void 0,
|
|
1251
|
-
onChange: (
|
|
1252
|
-
|
|
1250
|
+
onChange: (X) => {
|
|
1251
|
+
x(X.target.value), I.current = X.target.value, n(X.target.value);
|
|
1253
1252
|
},
|
|
1254
1253
|
onBlur: i,
|
|
1255
|
-
onFocus: (
|
|
1256
|
-
|
|
1254
|
+
onFocus: (X) => {
|
|
1255
|
+
X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR_FOCUS, X.currentTarget.style.boxShadow = R ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW;
|
|
1257
1256
|
},
|
|
1258
|
-
onBlurCapture: (
|
|
1259
|
-
|
|
1257
|
+
onBlurCapture: (X) => {
|
|
1258
|
+
X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR, X.currentTarget.style.boxShadow = "none";
|
|
1260
1259
|
}
|
|
1261
1260
|
}
|
|
1262
1261
|
) : /* @__PURE__ */ d(
|
|
@@ -1265,10 +1264,10 @@ function qr({
|
|
|
1265
1264
|
id: c,
|
|
1266
1265
|
name: c,
|
|
1267
1266
|
type: l.inputType ?? "text",
|
|
1268
|
-
style:
|
|
1267
|
+
style: F,
|
|
1269
1268
|
placeholder: l.placeholder ?? "",
|
|
1270
1269
|
value: A,
|
|
1271
|
-
disabled:
|
|
1270
|
+
disabled: O,
|
|
1272
1271
|
readOnly: l.readOnly,
|
|
1273
1272
|
autoComplete: l.autocomplete ?? "off",
|
|
1274
1273
|
autoFocus: l.autoFocus,
|
|
@@ -1277,28 +1276,28 @@ function qr({
|
|
|
1277
1276
|
"aria-describedby": l.ariaDescribedBy,
|
|
1278
1277
|
"aria-required": l.required || void 0,
|
|
1279
1278
|
"aria-invalid": R || void 0,
|
|
1280
|
-
onChange: (
|
|
1281
|
-
|
|
1279
|
+
onChange: (X) => {
|
|
1280
|
+
x(X.target.value), I.current = X.target.value, n(X.target.value);
|
|
1282
1281
|
},
|
|
1283
1282
|
onBlur: i,
|
|
1284
|
-
onFocus: (
|
|
1285
|
-
|
|
1283
|
+
onFocus: (X) => {
|
|
1284
|
+
X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR_FOCUS, X.currentTarget.style.boxShadow = R ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW;
|
|
1286
1285
|
},
|
|
1287
|
-
onBlurCapture: (
|
|
1288
|
-
|
|
1286
|
+
onBlurCapture: (X) => {
|
|
1287
|
+
X.currentTarget.style.borderColor = R ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR, X.currentTarget.style.boxShadow = "none";
|
|
1289
1288
|
}
|
|
1290
1289
|
}
|
|
1291
|
-
),
|
|
1290
|
+
), se = /* @__PURE__ */ E(Te, { children: [
|
|
1292
1291
|
l.helperText && !R && !s && /* @__PURE__ */ d("small", { style: ce, children: l.helperText }),
|
|
1293
|
-
|
|
1292
|
+
re,
|
|
1294
1293
|
R && /* @__PURE__ */ d("small", { "data-testid": `${c}-error`, style: pe, children: r })
|
|
1295
1294
|
] });
|
|
1296
|
-
return s ? /* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children:
|
|
1298
|
-
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children:
|
|
1299
|
-
] }) : /* @__PURE__ */
|
|
1300
|
-
|
|
1301
|
-
|
|
1295
|
+
return s ? /* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "3px 0" }, children: [
|
|
1296
|
+
/* @__PURE__ */ d("div", { style: { flex: "0 0 160px", minWidth: 0 }, children: G }),
|
|
1297
|
+
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: se })
|
|
1298
|
+
] }) : /* @__PURE__ */ E("div", { children: [
|
|
1299
|
+
G,
|
|
1300
|
+
se
|
|
1302
1301
|
] });
|
|
1303
1302
|
}
|
|
1304
1303
|
function Y() {
|
|
@@ -1310,29 +1309,29 @@ function Y() {
|
|
|
1310
1309
|
return t;
|
|
1311
1310
|
}, Y.apply(null, arguments);
|
|
1312
1311
|
}
|
|
1313
|
-
function
|
|
1312
|
+
function Le(t) {
|
|
1314
1313
|
"@babel/helpers - typeof";
|
|
1315
|
-
return
|
|
1314
|
+
return Le = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1316
1315
|
return typeof e;
|
|
1317
1316
|
} : function(e) {
|
|
1318
1317
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1319
|
-
},
|
|
1318
|
+
}, Le(t);
|
|
1320
1319
|
}
|
|
1321
1320
|
function ia(t, e) {
|
|
1322
|
-
if (
|
|
1321
|
+
if (Le(t) != "object" || !t) return t;
|
|
1323
1322
|
var n = t[Symbol.toPrimitive];
|
|
1324
1323
|
if (n !== void 0) {
|
|
1325
1324
|
var i = n.call(t, e);
|
|
1326
|
-
if (
|
|
1325
|
+
if (Le(i) != "object") return i;
|
|
1327
1326
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1328
1327
|
}
|
|
1329
1328
|
return (e === "string" ? String : Number)(t);
|
|
1330
1329
|
}
|
|
1331
1330
|
function Kr(t) {
|
|
1332
1331
|
var e = ia(t, "string");
|
|
1333
|
-
return
|
|
1332
|
+
return Le(e) == "symbol" ? e : e + "";
|
|
1334
1333
|
}
|
|
1335
|
-
function
|
|
1334
|
+
function He(t, e, n) {
|
|
1336
1335
|
return (e = Kr(e)) in t ? Object.defineProperty(t, e, {
|
|
1337
1336
|
value: n,
|
|
1338
1337
|
enumerable: !0,
|
|
@@ -1350,11 +1349,11 @@ function kn(t, e) {
|
|
|
1350
1349
|
}
|
|
1351
1350
|
return n;
|
|
1352
1351
|
}
|
|
1353
|
-
function
|
|
1352
|
+
function H(t) {
|
|
1354
1353
|
for (var e = 1; e < arguments.length; e++) {
|
|
1355
1354
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
1356
1355
|
e % 2 ? kn(Object(n), !0).forEach(function(i) {
|
|
1357
|
-
|
|
1356
|
+
He(t, i, n[i]);
|
|
1358
1357
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : kn(Object(n)).forEach(function(i) {
|
|
1359
1358
|
Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(n, i));
|
|
1360
1359
|
});
|
|
@@ -1412,7 +1411,7 @@ function la(t) {
|
|
|
1412
1411
|
return t;
|
|
1413
1412
|
}
|
|
1414
1413
|
function ua(t, e) {
|
|
1415
|
-
if (e && (
|
|
1414
|
+
if (e && (Le(e) == "object" || typeof e == "function")) return e;
|
|
1416
1415
|
if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1417
1416
|
return la(t);
|
|
1418
1417
|
}
|
|
@@ -1449,7 +1448,7 @@ function pa() {
|
|
|
1449
1448
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1450
1449
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1451
1450
|
}
|
|
1452
|
-
function
|
|
1451
|
+
function _e(t) {
|
|
1453
1452
|
return da(t) || fa(t) || ti(t) || pa();
|
|
1454
1453
|
}
|
|
1455
1454
|
function ga(t) {
|
|
@@ -1480,7 +1479,7 @@ function ha() {
|
|
|
1480
1479
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1481
1480
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1482
1481
|
}
|
|
1483
|
-
function
|
|
1482
|
+
function le(t, e) {
|
|
1484
1483
|
return ga(t) || ba(t, e) || ti(t, e) || ha();
|
|
1485
1484
|
}
|
|
1486
1485
|
function ma(t, e) {
|
|
@@ -1654,8 +1653,8 @@ function _n(t, e, n, i) {
|
|
|
1654
1653
|
const g = Oe(a), p = i;
|
|
1655
1654
|
let m = g, b = nn(m);
|
|
1656
1655
|
for (; b && i && p !== m; ) {
|
|
1657
|
-
const h = Zn(b), v = b.getBoundingClientRect(), A = Sn(b),
|
|
1658
|
-
s *= h.x, l *= h.y, c *= h.x, f *= h.y, s +=
|
|
1656
|
+
const h = Zn(b), v = b.getBoundingClientRect(), A = Sn(b), x = v.left + (b.clientLeft + parseFloat(A.paddingLeft)) * h.x, I = v.top + (b.clientTop + parseFloat(A.paddingTop)) * h.y;
|
|
1657
|
+
s *= h.x, l *= h.y, c *= h.x, f *= h.y, s += x, l += I, m = Oe(b), b = nn(m);
|
|
1659
1658
|
}
|
|
1660
1659
|
}
|
|
1661
1660
|
return xa({
|
|
@@ -1685,12 +1684,12 @@ function Ta(t, e) {
|
|
|
1685
1684
|
} = l;
|
|
1686
1685
|
if (u || e(), !g || !p)
|
|
1687
1686
|
return;
|
|
1688
|
-
const m = at(f), b = at(r.clientWidth - (c + g)), h = at(r.clientHeight - (f + p)), v = at(c),
|
|
1687
|
+
const m = at(f), b = at(r.clientWidth - (c + g)), h = at(r.clientHeight - (f + p)), v = at(c), x = {
|
|
1689
1688
|
rootMargin: -m + "px " + -b + "px " + -h + "px " + -v + "px",
|
|
1690
1689
|
threshold: ya(0, Ia(1, s)) || 1
|
|
1691
1690
|
};
|
|
1692
1691
|
let I = !0;
|
|
1693
|
-
function
|
|
1692
|
+
function C(y) {
|
|
1694
1693
|
const R = y[0].intersectionRatio;
|
|
1695
1694
|
if (R !== s) {
|
|
1696
1695
|
if (!I)
|
|
@@ -1702,13 +1701,13 @@ function Ta(t, e) {
|
|
|
1702
1701
|
R === 1 && !si(l, t.getBoundingClientRect()) && o(), I = !1;
|
|
1703
1702
|
}
|
|
1704
1703
|
try {
|
|
1705
|
-
n = new IntersectionObserver(
|
|
1706
|
-
...
|
|
1704
|
+
n = new IntersectionObserver(C, {
|
|
1705
|
+
...x,
|
|
1707
1706
|
// Handle <iframe>s
|
|
1708
1707
|
root: r.ownerDocument
|
|
1709
1708
|
});
|
|
1710
1709
|
} catch {
|
|
1711
|
-
n = new IntersectionObserver(
|
|
1710
|
+
n = new IntersectionObserver(C, x);
|
|
1712
1711
|
}
|
|
1713
1712
|
n.observe(t);
|
|
1714
1713
|
}
|
|
@@ -1733,8 +1732,8 @@ function Ga(t, e, n, i) {
|
|
|
1733
1732
|
o && (p = new ResizeObserver((v) => {
|
|
1734
1733
|
let [A] = v;
|
|
1735
1734
|
A && A.target === l && p && e && (p.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1736
|
-
var
|
|
1737
|
-
(
|
|
1735
|
+
var x;
|
|
1736
|
+
(x = p) == null || x.observe(e);
|
|
1738
1737
|
})), n();
|
|
1739
1738
|
}), l && !s && p.observe(l), e && p.observe(e));
|
|
1740
1739
|
let m, b = s ? _n(t) : null;
|
|
@@ -1769,12 +1768,12 @@ function Da(t, e) {
|
|
|
1769
1768
|
}).join(" ");
|
|
1770
1769
|
}
|
|
1771
1770
|
var St = function(e) {
|
|
1772
|
-
return Za(e) ? e.filter(Boolean) :
|
|
1771
|
+
return Za(e) ? e.filter(Boolean) : Le(e) === "object" && e !== null ? [e] : [];
|
|
1773
1772
|
}, li = function(e) {
|
|
1774
1773
|
e.className, e.clearValue, e.cx, e.getStyles, e.getClassNames, e.getValue, e.hasValue, e.isMulti, e.isRtl, e.options, e.selectOption, e.selectProps, e.setValue, e.theme;
|
|
1775
1774
|
var n = ve(e, Ba);
|
|
1776
|
-
return
|
|
1777
|
-
},
|
|
1775
|
+
return H({}, n);
|
|
1776
|
+
}, ae = function(e, n, i) {
|
|
1778
1777
|
var r = e.cx, a = e.getStyles, o = e.getClassNames, u = e.className;
|
|
1779
1778
|
return {
|
|
1780
1779
|
css: a(n, e),
|
|
@@ -1873,11 +1872,11 @@ var _a = function(e) {
|
|
|
1873
1872
|
for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
|
|
1874
1873
|
i[r - 1] = arguments[r];
|
|
1875
1874
|
var a = Object.entries(e).filter(function(o) {
|
|
1876
|
-
var u =
|
|
1875
|
+
var u = le(o, 1), s = u[0];
|
|
1877
1876
|
return !i.includes(s);
|
|
1878
1877
|
});
|
|
1879
1878
|
return a.reduce(function(o, u) {
|
|
1880
|
-
var s =
|
|
1879
|
+
var s = le(u, 2), l = s[0], c = s[1];
|
|
1881
1880
|
return o[l] = c, o;
|
|
1882
1881
|
}, {});
|
|
1883
1882
|
}, Ja = ["children", "innerProps"], Ya = ["children", "innerProps"];
|
|
@@ -1887,7 +1886,7 @@ function ja(t) {
|
|
|
1887
1886
|
maxHeight: e
|
|
1888
1887
|
};
|
|
1889
1888
|
if (!n || !n.offsetParent) return l;
|
|
1890
|
-
var c = s.getBoundingClientRect(), f = c.height, g = n.getBoundingClientRect(), p = g.bottom, m = g.height, b = g.top, h = n.offsetParent.getBoundingClientRect(), v = h.top, A = o ? window.innerHeight : Pa(s),
|
|
1889
|
+
var c = s.getBoundingClientRect(), f = c.height, g = n.getBoundingClientRect(), p = g.bottom, m = g.height, b = g.top, h = n.offsetParent.getBoundingClientRect(), v = h.top, A = o ? window.innerHeight : Pa(s), x = ui(s), I = parseInt(getComputedStyle(n).marginBottom, 10), C = parseInt(getComputedStyle(n).marginTop, 10), y = v - C, R = A - b, O = y + x, G = f - x - b, M = p - A + x + I, N = x + b - C, L = 160;
|
|
1891
1890
|
switch (r) {
|
|
1892
1891
|
case "auto":
|
|
1893
1892
|
case "bottom":
|
|
@@ -1896,24 +1895,24 @@ function ja(t) {
|
|
|
1896
1895
|
placement: "bottom",
|
|
1897
1896
|
maxHeight: e
|
|
1898
1897
|
};
|
|
1899
|
-
if (
|
|
1898
|
+
if (G >= m && !o)
|
|
1900
1899
|
return a && st(s, M, L), {
|
|
1901
1900
|
placement: "bottom",
|
|
1902
1901
|
maxHeight: e
|
|
1903
1902
|
};
|
|
1904
|
-
if (!o &&
|
|
1903
|
+
if (!o && G >= i || o && R >= i) {
|
|
1905
1904
|
a && st(s, M, L);
|
|
1906
|
-
var
|
|
1905
|
+
var B = o ? R - I : G - I;
|
|
1907
1906
|
return {
|
|
1908
1907
|
placement: "bottom",
|
|
1909
|
-
maxHeight:
|
|
1908
|
+
maxHeight: B
|
|
1910
1909
|
};
|
|
1911
1910
|
}
|
|
1912
1911
|
if (r === "auto" || o) {
|
|
1913
|
-
var
|
|
1914
|
-
return V >= i && (
|
|
1912
|
+
var F = e, V = o ? y : O;
|
|
1913
|
+
return V >= i && (F = Math.min(V - I - u, e)), {
|
|
1915
1914
|
placement: "top",
|
|
1916
|
-
maxHeight:
|
|
1915
|
+
maxHeight: F
|
|
1917
1916
|
};
|
|
1918
1917
|
}
|
|
1919
1918
|
if (r === "bottom")
|
|
@@ -1928,16 +1927,16 @@ function ja(t) {
|
|
|
1928
1927
|
placement: "top",
|
|
1929
1928
|
maxHeight: e
|
|
1930
1929
|
};
|
|
1931
|
-
if (
|
|
1930
|
+
if (O >= m && !o)
|
|
1932
1931
|
return a && st(s, N, L), {
|
|
1933
1932
|
placement: "top",
|
|
1934
1933
|
maxHeight: e
|
|
1935
1934
|
};
|
|
1936
|
-
if (!o &&
|
|
1937
|
-
var
|
|
1938
|
-
return (!o &&
|
|
1935
|
+
if (!o && O >= i || o && y >= i) {
|
|
1936
|
+
var Z = e;
|
|
1937
|
+
return (!o && O >= i || o && y >= i) && (Z = o ? y - C : O - C), a && st(s, N, L), {
|
|
1939
1938
|
placement: "top",
|
|
1940
|
-
maxHeight:
|
|
1939
|
+
maxHeight: Z
|
|
1941
1940
|
};
|
|
1942
1941
|
}
|
|
1943
1942
|
return {
|
|
@@ -1960,9 +1959,9 @@ var di = function(e) {
|
|
|
1960
1959
|
return e === "auto" ? "bottom" : e;
|
|
1961
1960
|
}, Ua = function(e, n) {
|
|
1962
1961
|
var i, r = e.placement, a = e.theme, o = a.borderRadius, u = a.spacing, s = a.colors;
|
|
1963
|
-
return
|
|
1962
|
+
return H((i = {
|
|
1964
1963
|
label: "menu"
|
|
1965
|
-
},
|
|
1964
|
+
}, He(i, $a(r), "100%"), He(i, "position", "absolute"), He(i, "width", "100%"), He(i, "zIndex", 1), i), n ? {} : {
|
|
1966
1965
|
backgroundColor: s.neutral0,
|
|
1967
1966
|
borderRadius: o,
|
|
1968
1967
|
boxShadow: "0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",
|
|
@@ -1970,38 +1969,38 @@ var di = function(e) {
|
|
|
1970
1969
|
marginTop: u.menuGutter
|
|
1971
1970
|
});
|
|
1972
1971
|
}, fi = /* @__PURE__ */ nt(null), Qa = function(e) {
|
|
1973
|
-
var n = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Je(fi) || {}, c = l.setPortalPlacement, f =
|
|
1972
|
+
var n = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Je(fi) || {}, c = l.setPortalPlacement, f = z(null), g = W(r), p = le(g, 2), m = p[0], b = p[1], h = W(null), v = le(h, 2), A = v[0], x = v[1], I = s.spacing.controlHeight;
|
|
1974
1973
|
return rn(function() {
|
|
1975
|
-
var
|
|
1976
|
-
if (
|
|
1977
|
-
var y = o === "fixed", R = u && !y,
|
|
1974
|
+
var C = f.current;
|
|
1975
|
+
if (C) {
|
|
1976
|
+
var y = o === "fixed", R = u && !y, O = ja({
|
|
1978
1977
|
maxHeight: r,
|
|
1979
|
-
menuEl:
|
|
1978
|
+
menuEl: C,
|
|
1980
1979
|
minHeight: i,
|
|
1981
1980
|
placement: a,
|
|
1982
1981
|
shouldScroll: R,
|
|
1983
1982
|
isFixedPosition: y,
|
|
1984
1983
|
controlHeight: I
|
|
1985
1984
|
});
|
|
1986
|
-
b(
|
|
1985
|
+
b(O.maxHeight), x(O.placement), c == null || c(O.placement);
|
|
1987
1986
|
}
|
|
1988
1987
|
}, [r, a, o, u, i, c, I]), n({
|
|
1989
1988
|
ref: f,
|
|
1990
|
-
placerProps:
|
|
1989
|
+
placerProps: H(H({}, e), {}, {
|
|
1991
1990
|
placement: A || di(a),
|
|
1992
1991
|
maxHeight: m
|
|
1993
1992
|
})
|
|
1994
1993
|
});
|
|
1995
1994
|
}, qa = function(e) {
|
|
1996
1995
|
var n = e.children, i = e.innerRef, r = e.innerProps;
|
|
1997
|
-
return
|
|
1996
|
+
return J("div", Y({}, ae(e, "menu", {
|
|
1998
1997
|
menu: !0
|
|
1999
1998
|
}), {
|
|
2000
1999
|
ref: i
|
|
2001
2000
|
}, r), n);
|
|
2002
2001
|
}, Ka = qa, es = function(e, n) {
|
|
2003
2002
|
var i = e.maxHeight, r = e.theme.spacing.baseUnit;
|
|
2004
|
-
return
|
|
2003
|
+
return H({
|
|
2005
2004
|
maxHeight: i,
|
|
2006
2005
|
overflowY: "auto",
|
|
2007
2006
|
position: "relative",
|
|
@@ -2013,7 +2012,7 @@ var di = function(e) {
|
|
|
2013
2012
|
});
|
|
2014
2013
|
}, ts = function(e) {
|
|
2015
2014
|
var n = e.children, i = e.innerProps, r = e.innerRef, a = e.isMulti;
|
|
2016
|
-
return
|
|
2015
|
+
return J("div", Y({}, ae(e, "menuList", {
|
|
2017
2016
|
"menu-list": !0,
|
|
2018
2017
|
"menu-list--is-multi": a
|
|
2019
2018
|
}), {
|
|
@@ -2021,7 +2020,7 @@ var di = function(e) {
|
|
|
2021
2020
|
}, i), n);
|
|
2022
2021
|
}, pi = function(e, n) {
|
|
2023
2022
|
var i = e.theme, r = i.spacing.baseUnit, a = i.colors;
|
|
2024
|
-
return
|
|
2023
|
+
return H({
|
|
2025
2024
|
textAlign: "center"
|
|
2026
2025
|
}, n ? {} : {
|
|
2027
2026
|
color: a.neutral40,
|
|
@@ -2029,7 +2028,7 @@ var di = function(e) {
|
|
|
2029
2028
|
});
|
|
2030
2029
|
}, ns = pi, rs = pi, is = function(e) {
|
|
2031
2030
|
var n = e.children, i = n === void 0 ? "No options" : n, r = e.innerProps, a = ve(e, Ja);
|
|
2032
|
-
return
|
|
2031
|
+
return J("div", Y({}, ae(H(H({}, a), {}, {
|
|
2033
2032
|
children: i,
|
|
2034
2033
|
innerProps: r
|
|
2035
2034
|
}), "noOptionsMessage", {
|
|
@@ -2038,7 +2037,7 @@ var di = function(e) {
|
|
|
2038
2037
|
}), r), i);
|
|
2039
2038
|
}, os = function(e) {
|
|
2040
2039
|
var n = e.children, i = n === void 0 ? "Loading..." : n, r = e.innerProps, a = ve(e, Ya);
|
|
2041
|
-
return
|
|
2040
|
+
return J("div", Y({}, ae(H(H({}, a), {}, {
|
|
2042
2041
|
children: i,
|
|
2043
2042
|
innerProps: r
|
|
2044
2043
|
}), "loadingMessage", {
|
|
@@ -2055,44 +2054,44 @@ var di = function(e) {
|
|
|
2055
2054
|
zIndex: 1
|
|
2056
2055
|
};
|
|
2057
2056
|
}, ss = function(e) {
|
|
2058
|
-
var n = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s =
|
|
2057
|
+
var n = e.appendTo, i = e.children, r = e.controlElement, a = e.innerProps, o = e.menuPlacement, u = e.menuPosition, s = z(null), l = z(null), c = W(di(o)), f = le(c, 2), g = f[0], p = f[1], m = oe(function() {
|
|
2059
2058
|
return {
|
|
2060
2059
|
setPortalPlacement: p
|
|
2061
2060
|
};
|
|
2062
|
-
}, []), b = W(null), h =
|
|
2061
|
+
}, []), b = W(null), h = le(b, 2), v = h[0], A = h[1], x = k(function() {
|
|
2063
2062
|
if (r) {
|
|
2064
|
-
var R = Wa(r),
|
|
2065
|
-
(
|
|
2066
|
-
offset:
|
|
2063
|
+
var R = Wa(r), O = u === "fixed" ? 0 : window.pageYOffset, G = R[g] + O;
|
|
2064
|
+
(G !== (v == null ? void 0 : v.offset) || R.left !== (v == null ? void 0 : v.rect.left) || R.width !== (v == null ? void 0 : v.rect.width)) && A({
|
|
2065
|
+
offset: G,
|
|
2067
2066
|
rect: R
|
|
2068
2067
|
});
|
|
2069
2068
|
}
|
|
2070
2069
|
}, [r, u, g, v == null ? void 0 : v.offset, v == null ? void 0 : v.rect.left, v == null ? void 0 : v.rect.width]);
|
|
2071
2070
|
rn(function() {
|
|
2072
|
-
|
|
2073
|
-
}, [
|
|
2074
|
-
var I =
|
|
2075
|
-
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Ga(r, s.current,
|
|
2071
|
+
x();
|
|
2072
|
+
}, [x]);
|
|
2073
|
+
var I = k(function() {
|
|
2074
|
+
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Ga(r, s.current, x, {
|
|
2076
2075
|
elementResize: "ResizeObserver" in window
|
|
2077
2076
|
}));
|
|
2078
|
-
}, [r,
|
|
2077
|
+
}, [r, x]);
|
|
2079
2078
|
rn(function() {
|
|
2080
2079
|
I();
|
|
2081
2080
|
}, [I]);
|
|
2082
|
-
var
|
|
2081
|
+
var C = k(function(R) {
|
|
2083
2082
|
s.current = R, I();
|
|
2084
2083
|
}, [I]);
|
|
2085
2084
|
if (!n && u !== "fixed" || !v) return null;
|
|
2086
|
-
var y =
|
|
2087
|
-
ref:
|
|
2088
|
-
},
|
|
2085
|
+
var y = J("div", Y({
|
|
2086
|
+
ref: C
|
|
2087
|
+
}, ae(H(H({}, e), {}, {
|
|
2089
2088
|
offset: v.offset,
|
|
2090
2089
|
position: u,
|
|
2091
2090
|
rect: v.rect
|
|
2092
2091
|
}), "menuPortal", {
|
|
2093
2092
|
"menu-portal": !0
|
|
2094
2093
|
}), a), i);
|
|
2095
|
-
return
|
|
2094
|
+
return J(fi.Provider, {
|
|
2096
2095
|
value: m
|
|
2097
2096
|
}, n ? /* @__PURE__ */ Lo(y, n) : y);
|
|
2098
2097
|
}, ls = function(e) {
|
|
@@ -2106,13 +2105,13 @@ var di = function(e) {
|
|
|
2106
2105
|
};
|
|
2107
2106
|
}, us = function(e) {
|
|
2108
2107
|
var n = e.children, i = e.innerProps, r = e.isDisabled, a = e.isRtl;
|
|
2109
|
-
return
|
|
2108
|
+
return J("div", Y({}, ae(e, "container", {
|
|
2110
2109
|
"--is-disabled": r,
|
|
2111
2110
|
"--is-rtl": a
|
|
2112
2111
|
}), i), n);
|
|
2113
2112
|
}, cs = function(e, n) {
|
|
2114
2113
|
var i = e.theme.spacing, r = e.isMulti, a = e.hasValue, o = e.selectProps.controlShouldRenderValue;
|
|
2115
|
-
return
|
|
2114
|
+
return H({
|
|
2116
2115
|
alignItems: "center",
|
|
2117
2116
|
display: r && a && o ? "flex" : "grid",
|
|
2118
2117
|
flex: 1,
|
|
@@ -2125,7 +2124,7 @@ var di = function(e) {
|
|
|
2125
2124
|
});
|
|
2126
2125
|
}, ds = function(e) {
|
|
2127
2126
|
var n = e.children, i = e.innerProps, r = e.isMulti, a = e.hasValue;
|
|
2128
|
-
return
|
|
2127
|
+
return J("div", Y({}, ae(e, "valueContainer", {
|
|
2129
2128
|
"value-container": !0,
|
|
2130
2129
|
"value-container--is-multi": r,
|
|
2131
2130
|
"value-container--has-value": a
|
|
@@ -2139,7 +2138,7 @@ var di = function(e) {
|
|
|
2139
2138
|
};
|
|
2140
2139
|
}, ps = function(e) {
|
|
2141
2140
|
var n = e.children, i = e.innerProps;
|
|
2142
|
-
return
|
|
2141
|
+
return J("div", Y({}, ae(e, "indicatorsContainer", {
|
|
2143
2142
|
indicators: !0
|
|
2144
2143
|
}), i), n);
|
|
2145
2144
|
}, jn, gs = ["size"], bs = ["innerProps", "isRtl", "size"];
|
|
@@ -2156,7 +2155,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2156
2155
|
toString: hs
|
|
2157
2156
|
}, gi = function(e) {
|
|
2158
2157
|
var n = e.size, i = ve(e, gs);
|
|
2159
|
-
return
|
|
2158
|
+
return J("svg", Y({
|
|
2160
2159
|
height: n,
|
|
2161
2160
|
width: n,
|
|
2162
2161
|
viewBox: "0 0 20 20",
|
|
@@ -2165,20 +2164,20 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2165
2164
|
css: ms
|
|
2166
2165
|
}, i));
|
|
2167
2166
|
}, On = function(e) {
|
|
2168
|
-
return
|
|
2167
|
+
return J(gi, Y({
|
|
2169
2168
|
size: 20
|
|
2170
|
-
}, e),
|
|
2169
|
+
}, e), J("path", {
|
|
2171
2170
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
2172
2171
|
}));
|
|
2173
2172
|
}, bi = function(e) {
|
|
2174
|
-
return
|
|
2173
|
+
return J(gi, Y({
|
|
2175
2174
|
size: 20
|
|
2176
|
-
}, e),
|
|
2175
|
+
}, e), J("path", {
|
|
2177
2176
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
2178
2177
|
}));
|
|
2179
2178
|
}, hi = function(e, n) {
|
|
2180
2179
|
var i = e.isFocused, r = e.theme, a = r.spacing.baseUnit, o = r.colors;
|
|
2181
|
-
return
|
|
2180
|
+
return H({
|
|
2182
2181
|
label: "indicatorContainer",
|
|
2183
2182
|
display: "flex",
|
|
2184
2183
|
transition: "color 150ms"
|
|
@@ -2191,19 +2190,19 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2191
2190
|
});
|
|
2192
2191
|
}, vs = hi, Is = function(e) {
|
|
2193
2192
|
var n = e.children, i = e.innerProps;
|
|
2194
|
-
return
|
|
2193
|
+
return J("div", Y({}, ae(e, "dropdownIndicator", {
|
|
2195
2194
|
indicator: !0,
|
|
2196
2195
|
"dropdown-indicator": !0
|
|
2197
|
-
}), i), n ||
|
|
2196
|
+
}), i), n || J(bi, null));
|
|
2198
2197
|
}, ys = hi, xs = function(e) {
|
|
2199
2198
|
var n = e.children, i = e.innerProps;
|
|
2200
|
-
return
|
|
2199
|
+
return J("div", Y({}, ae(e, "clearIndicator", {
|
|
2201
2200
|
indicator: !0,
|
|
2202
2201
|
"clear-indicator": !0
|
|
2203
|
-
}), i), n ||
|
|
2202
|
+
}), i), n || J(On, null));
|
|
2204
2203
|
}, Cs = function(e, n) {
|
|
2205
2204
|
var i = e.isDisabled, r = e.theme, a = r.spacing.baseUnit, o = r.colors;
|
|
2206
|
-
return
|
|
2205
|
+
return H({
|
|
2207
2206
|
label: "indicatorSeparator",
|
|
2208
2207
|
alignSelf: "stretch",
|
|
2209
2208
|
width: 1
|
|
@@ -2214,7 +2213,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2214
2213
|
});
|
|
2215
2214
|
}, As = function(e) {
|
|
2216
2215
|
var n = e.innerProps;
|
|
2217
|
-
return
|
|
2216
|
+
return J("span", Y({}, n, ae(e, "indicatorSeparator", {
|
|
2218
2217
|
"indicator-separator": !0
|
|
2219
2218
|
})));
|
|
2220
2219
|
}, Rs = Mo(jn || (jn = va([`
|
|
@@ -2222,7 +2221,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2222
2221
|
40% { opacity: 1; }
|
|
2223
2222
|
`]))), Ss = function(e, n) {
|
|
2224
2223
|
var i = e.isFocused, r = e.size, a = e.theme, o = a.colors, u = a.spacing.baseUnit;
|
|
2225
|
-
return
|
|
2224
|
+
return H({
|
|
2226
2225
|
label: "loadingIndicator",
|
|
2227
2226
|
display: "flex",
|
|
2228
2227
|
transition: "color 150ms",
|
|
@@ -2238,7 +2237,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2238
2237
|
});
|
|
2239
2238
|
}, kt = function(e) {
|
|
2240
2239
|
var n = e.delay, i = e.offset;
|
|
2241
|
-
return
|
|
2240
|
+
return J("span", {
|
|
2242
2241
|
css: /* @__PURE__ */ Mr({
|
|
2243
2242
|
animation: "".concat(Rs, " 1s ease-in-out ").concat(n, "ms infinite;"),
|
|
2244
2243
|
backgroundColor: "currentColor",
|
|
@@ -2252,26 +2251,26 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2252
2251
|
});
|
|
2253
2252
|
}, Es = function(e) {
|
|
2254
2253
|
var n = e.innerProps, i = e.isRtl, r = e.size, a = r === void 0 ? 4 : r, o = ve(e, bs);
|
|
2255
|
-
return
|
|
2254
|
+
return J("div", Y({}, ae(H(H({}, o), {}, {
|
|
2256
2255
|
innerProps: n,
|
|
2257
2256
|
isRtl: i,
|
|
2258
2257
|
size: a
|
|
2259
2258
|
}), "loadingIndicator", {
|
|
2260
2259
|
indicator: !0,
|
|
2261
2260
|
"loading-indicator": !0
|
|
2262
|
-
}), n),
|
|
2261
|
+
}), n), J(kt, {
|
|
2263
2262
|
delay: 0,
|
|
2264
2263
|
offset: i
|
|
2265
|
-
}),
|
|
2264
|
+
}), J(kt, {
|
|
2266
2265
|
delay: 160,
|
|
2267
2266
|
offset: !0
|
|
2268
|
-
}),
|
|
2267
|
+
}), J(kt, {
|
|
2269
2268
|
delay: 320,
|
|
2270
2269
|
offset: !i
|
|
2271
2270
|
}));
|
|
2272
2271
|
}, Os = function(e, n) {
|
|
2273
2272
|
var i = e.isDisabled, r = e.isFocused, a = e.theme, o = a.colors, u = a.borderRadius, s = a.spacing;
|
|
2274
|
-
return
|
|
2273
|
+
return H({
|
|
2275
2274
|
label: "control",
|
|
2276
2275
|
alignItems: "center",
|
|
2277
2276
|
cursor: "default",
|
|
@@ -2295,9 +2294,9 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2295
2294
|
});
|
|
2296
2295
|
}, Fs = function(e) {
|
|
2297
2296
|
var n = e.children, i = e.isDisabled, r = e.isFocused, a = e.innerRef, o = e.innerProps, u = e.menuIsOpen;
|
|
2298
|
-
return
|
|
2297
|
+
return J("div", Y({
|
|
2299
2298
|
ref: a
|
|
2300
|
-
},
|
|
2299
|
+
}, ae(e, "control", {
|
|
2301
2300
|
control: !0,
|
|
2302
2301
|
"control--is-disabled": i,
|
|
2303
2302
|
"control--is-focused": r,
|
|
@@ -2313,18 +2312,18 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2313
2312
|
};
|
|
2314
2313
|
}, Bs = function(e) {
|
|
2315
2314
|
var n = e.children, i = e.cx, r = e.getStyles, a = e.getClassNames, o = e.Heading, u = e.headingProps, s = e.innerProps, l = e.label, c = e.theme, f = e.selectProps;
|
|
2316
|
-
return
|
|
2315
|
+
return J("div", Y({}, ae(e, "group", {
|
|
2317
2316
|
group: !0
|
|
2318
|
-
}), s),
|
|
2317
|
+
}), s), J(o, Y({}, u, {
|
|
2319
2318
|
selectProps: f,
|
|
2320
2319
|
theme: c,
|
|
2321
2320
|
getStyles: r,
|
|
2322
2321
|
getClassNames: a,
|
|
2323
2322
|
cx: i
|
|
2324
|
-
}), l),
|
|
2323
|
+
}), l), J("div", null, n));
|
|
2325
2324
|
}, Vs = function(e, n) {
|
|
2326
2325
|
var i = e.theme, r = i.colors, a = i.spacing;
|
|
2327
|
-
return
|
|
2326
|
+
return H({
|
|
2328
2327
|
label: "group",
|
|
2329
2328
|
cursor: "default",
|
|
2330
2329
|
display: "block"
|
|
@@ -2341,12 +2340,12 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2341
2340
|
var n = li(e);
|
|
2342
2341
|
n.data;
|
|
2343
2342
|
var i = ve(n, Ts);
|
|
2344
|
-
return
|
|
2343
|
+
return J("div", Y({}, ae(e, "groupHeading", {
|
|
2345
2344
|
"group-heading": !0
|
|
2346
2345
|
}), i));
|
|
2347
2346
|
}, Ns = Bs, Ps = ["innerRef", "isDisabled", "isHidden", "inputClassName"], Ls = function(e, n) {
|
|
2348
2347
|
var i = e.isDisabled, r = e.value, a = e.theme, o = a.spacing, u = a.colors;
|
|
2349
|
-
return
|
|
2348
|
+
return H(H({
|
|
2350
2349
|
visibility: i ? "hidden" : "visible",
|
|
2351
2350
|
// force css to recompute when value change due to @emotion bug.
|
|
2352
2351
|
// We can remove it whenever the bug is fixed.
|
|
@@ -2370,13 +2369,13 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2370
2369
|
display: "inline-grid",
|
|
2371
2370
|
gridArea: "1 / 1 / 2 / 3",
|
|
2372
2371
|
gridTemplateColumns: "0 min-content",
|
|
2373
|
-
"&:after":
|
|
2372
|
+
"&:after": H({
|
|
2374
2373
|
content: 'attr(data-value) " "',
|
|
2375
2374
|
visibility: "hidden",
|
|
2376
2375
|
whiteSpace: "pre"
|
|
2377
2376
|
}, mi)
|
|
2378
2377
|
}, Ws = function(e) {
|
|
2379
|
-
return
|
|
2378
|
+
return H({
|
|
2380
2379
|
label: "input",
|
|
2381
2380
|
color: "inherit",
|
|
2382
2381
|
background: 0,
|
|
@@ -2385,11 +2384,11 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2385
2384
|
}, mi);
|
|
2386
2385
|
}, Xs = function(e) {
|
|
2387
2386
|
var n = e.cx, i = e.value, r = li(e), a = r.innerRef, o = r.isDisabled, u = r.isHidden, s = r.inputClassName, l = ve(r, Ps);
|
|
2388
|
-
return
|
|
2387
|
+
return J("div", Y({}, ae(e, "input", {
|
|
2389
2388
|
"input-container": !0
|
|
2390
2389
|
}), {
|
|
2391
2390
|
"data-value": i || ""
|
|
2392
|
-
}),
|
|
2391
|
+
}), J("input", Y({
|
|
2393
2392
|
className: n({
|
|
2394
2393
|
input: !0
|
|
2395
2394
|
}, s),
|
|
@@ -2399,7 +2398,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2399
2398
|
}, l)));
|
|
2400
2399
|
}, ks = Xs, zs = function(e, n) {
|
|
2401
2400
|
var i = e.theme, r = i.spacing, a = i.borderRadius, o = i.colors;
|
|
2402
|
-
return
|
|
2401
|
+
return H({
|
|
2403
2402
|
label: "multiValue",
|
|
2404
2403
|
display: "flex",
|
|
2405
2404
|
minWidth: 0
|
|
@@ -2410,7 +2409,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2410
2409
|
});
|
|
2411
2410
|
}, Hs = function(e, n) {
|
|
2412
2411
|
var i = e.theme, r = i.borderRadius, a = i.colors, o = e.cropWithEllipsis;
|
|
2413
|
-
return
|
|
2412
|
+
return H({
|
|
2414
2413
|
overflow: "hidden",
|
|
2415
2414
|
textOverflow: o || o === void 0 ? "ellipsis" : void 0,
|
|
2416
2415
|
whiteSpace: "nowrap"
|
|
@@ -2423,7 +2422,7 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2423
2422
|
});
|
|
2424
2423
|
}, Zs = function(e, n) {
|
|
2425
2424
|
var i = e.theme, r = i.spacing, a = i.borderRadius, o = i.colors, u = e.isFocused;
|
|
2426
|
-
return
|
|
2425
|
+
return H({
|
|
2427
2426
|
alignItems: "center",
|
|
2428
2427
|
display: "flex"
|
|
2429
2428
|
}, n ? {} : {
|
|
@@ -2438,34 +2437,34 @@ var ms = process.env.NODE_ENV === "production" ? {
|
|
|
2438
2437
|
});
|
|
2439
2438
|
}, vi = function(e) {
|
|
2440
2439
|
var n = e.children, i = e.innerProps;
|
|
2441
|
-
return
|
|
2440
|
+
return J("div", i, n);
|
|
2442
2441
|
}, _s = vi, Js = vi;
|
|
2443
2442
|
function Ys(t) {
|
|
2444
2443
|
var e = t.children, n = t.innerProps;
|
|
2445
|
-
return
|
|
2444
|
+
return J("div", Y({
|
|
2446
2445
|
role: "button"
|
|
2447
|
-
}, n), e ||
|
|
2446
|
+
}, n), e || J(On, {
|
|
2448
2447
|
size: 14
|
|
2449
2448
|
}));
|
|
2450
2449
|
}
|
|
2451
2450
|
var js = function(e) {
|
|
2452
2451
|
var n = e.children, i = e.components, r = e.data, a = e.innerProps, o = e.isDisabled, u = e.removeProps, s = e.selectProps, l = i.Container, c = i.Label, f = i.Remove;
|
|
2453
|
-
return
|
|
2452
|
+
return J(l, {
|
|
2454
2453
|
data: r,
|
|
2455
|
-
innerProps:
|
|
2454
|
+
innerProps: H(H({}, ae(e, "multiValue", {
|
|
2456
2455
|
"multi-value": !0,
|
|
2457
2456
|
"multi-value--is-disabled": o
|
|
2458
2457
|
})), a),
|
|
2459
2458
|
selectProps: s
|
|
2460
|
-
},
|
|
2459
|
+
}, J(c, {
|
|
2461
2460
|
data: r,
|
|
2462
|
-
innerProps:
|
|
2461
|
+
innerProps: H({}, ae(e, "multiValueLabel", {
|
|
2463
2462
|
"multi-value__label": !0
|
|
2464
2463
|
})),
|
|
2465
2464
|
selectProps: s
|
|
2466
|
-
}, n),
|
|
2465
|
+
}, n), J(f, {
|
|
2467
2466
|
data: r,
|
|
2468
|
-
innerProps:
|
|
2467
|
+
innerProps: H(H({}, ae(e, "multiValueRemove", {
|
|
2469
2468
|
"multi-value__remove": !0
|
|
2470
2469
|
})), {}, {
|
|
2471
2470
|
"aria-label": "Remove ".concat(n || "option")
|
|
@@ -2474,7 +2473,7 @@ var js = function(e) {
|
|
|
2474
2473
|
}));
|
|
2475
2474
|
}, $s = js, Us = function(e, n) {
|
|
2476
2475
|
var i = e.isDisabled, r = e.isFocused, a = e.isSelected, o = e.theme, u = o.spacing, s = o.colors;
|
|
2477
|
-
return
|
|
2476
|
+
return H({
|
|
2478
2477
|
label: "option",
|
|
2479
2478
|
cursor: "default",
|
|
2480
2479
|
display: "block",
|
|
@@ -2493,7 +2492,7 @@ var js = function(e) {
|
|
|
2493
2492
|
});
|
|
2494
2493
|
}, Qs = function(e) {
|
|
2495
2494
|
var n = e.children, i = e.isDisabled, r = e.isFocused, a = e.isSelected, o = e.innerRef, u = e.innerProps;
|
|
2496
|
-
return
|
|
2495
|
+
return J("div", Y({}, ae(e, "option", {
|
|
2497
2496
|
option: !0,
|
|
2498
2497
|
"option--is-disabled": i,
|
|
2499
2498
|
"option--is-focused": r,
|
|
@@ -2504,7 +2503,7 @@ var js = function(e) {
|
|
|
2504
2503
|
}, u), n);
|
|
2505
2504
|
}, qs = Qs, Ks = function(e, n) {
|
|
2506
2505
|
var i = e.theme, r = i.spacing, a = i.colors;
|
|
2507
|
-
return
|
|
2506
|
+
return H({
|
|
2508
2507
|
label: "placeholder",
|
|
2509
2508
|
gridArea: "1 / 1 / 2 / 3"
|
|
2510
2509
|
}, n ? {} : {
|
|
@@ -2514,12 +2513,12 @@ var js = function(e) {
|
|
|
2514
2513
|
});
|
|
2515
2514
|
}, el = function(e) {
|
|
2516
2515
|
var n = e.children, i = e.innerProps;
|
|
2517
|
-
return
|
|
2516
|
+
return J("div", Y({}, ae(e, "placeholder", {
|
|
2518
2517
|
placeholder: !0
|
|
2519
2518
|
}), i), n);
|
|
2520
2519
|
}, tl = el, nl = function(e, n) {
|
|
2521
2520
|
var i = e.isDisabled, r = e.theme, a = r.spacing, o = r.colors;
|
|
2522
|
-
return
|
|
2521
|
+
return H({
|
|
2523
2522
|
label: "singleValue",
|
|
2524
2523
|
gridArea: "1 / 1 / 2 / 3",
|
|
2525
2524
|
maxWidth: "100%",
|
|
@@ -2533,7 +2532,7 @@ var js = function(e) {
|
|
|
2533
2532
|
});
|
|
2534
2533
|
}, rl = function(e) {
|
|
2535
2534
|
var n = e.children, i = e.isDisabled, r = e.innerProps;
|
|
2536
|
-
return
|
|
2535
|
+
return J("div", Y({}, ae(e, "singleValue", {
|
|
2537
2536
|
"single-value": !0,
|
|
2538
2537
|
"single-value--is-disabled": i
|
|
2539
2538
|
}), r), n);
|
|
@@ -2564,7 +2563,7 @@ var js = function(e) {
|
|
|
2564
2563
|
SingleValue: il,
|
|
2565
2564
|
ValueContainer: ds
|
|
2566
2565
|
}, al = function(e) {
|
|
2567
|
-
return
|
|
2566
|
+
return H(H({}, ol), e.components);
|
|
2568
2567
|
}, $n = Number.isNaN || function(e) {
|
|
2569
2568
|
return typeof e == "number" && e !== e;
|
|
2570
2569
|
};
|
|
@@ -2610,7 +2609,7 @@ var dl = process.env.NODE_ENV === "production" ? {
|
|
|
2610
2609
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",
|
|
2611
2610
|
toString: cl
|
|
2612
2611
|
}, fl = function(e) {
|
|
2613
|
-
return
|
|
2612
|
+
return J("span", Y({
|
|
2614
2613
|
css: dl
|
|
2615
2614
|
}, e));
|
|
2616
2615
|
}, Un = fl, pl = {
|
|
@@ -2661,58 +2660,58 @@ var dl = process.env.NODE_ENV === "production" ? {
|
|
|
2661
2660
|
return "".concat(i).concat(n ? " for search term " + n : "", ".");
|
|
2662
2661
|
}
|
|
2663
2662
|
}, gl = function(e) {
|
|
2664
|
-
var n = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages, g = s.getOptionLabel, p = s.inputValue, m = s.isMulti, b = s.isOptionDisabled, h = s.isSearchable, v = s.menuIsOpen, A = s.options,
|
|
2665
|
-
return
|
|
2666
|
-
}, [f]),
|
|
2663
|
+
var n = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages, g = s.getOptionLabel, p = s.inputValue, m = s.isMulti, b = s.isOptionDisabled, h = s.isSearchable, v = s.menuIsOpen, A = s.options, x = s.screenReaderStatus, I = s.tabSelectsValue, C = s.isLoading, y = s["aria-label"], R = s["aria-live"], O = oe(function() {
|
|
2664
|
+
return H(H({}, pl), f || {});
|
|
2665
|
+
}, [f]), G = oe(function() {
|
|
2667
2666
|
var V = "";
|
|
2668
|
-
if (n &&
|
|
2669
|
-
var
|
|
2670
|
-
return Array.isArray(
|
|
2671
|
-
},
|
|
2667
|
+
if (n && O.onChange) {
|
|
2668
|
+
var Z = n.option, U = n.options, $ = n.removedValue, re = n.removedValues, se = n.value, X = function(ne) {
|
|
2669
|
+
return Array.isArray(ne) ? null : ne;
|
|
2670
|
+
}, w = $ || Z || X(se), _ = w ? g(w) : "", T = U || re || void 0, P = T ? T.map(g) : [], j = H({
|
|
2672
2671
|
// multiSelected items are usually items that have already been selected
|
|
2673
2672
|
// or set by the user as a default value so we assume they are not disabled
|
|
2674
|
-
isDisabled:
|
|
2675
|
-
label:
|
|
2676
|
-
labels:
|
|
2673
|
+
isDisabled: w && b(w, u),
|
|
2674
|
+
label: _,
|
|
2675
|
+
labels: P
|
|
2677
2676
|
}, n);
|
|
2678
|
-
V =
|
|
2677
|
+
V = O.onChange(j);
|
|
2679
2678
|
}
|
|
2680
2679
|
return V;
|
|
2681
|
-
}, [n,
|
|
2682
|
-
var V = "",
|
|
2683
|
-
if (
|
|
2684
|
-
var
|
|
2685
|
-
focused:
|
|
2686
|
-
label: g(
|
|
2687
|
-
isDisabled: b(
|
|
2680
|
+
}, [n, O, b, u, g]), M = oe(function() {
|
|
2681
|
+
var V = "", Z = i || r, U = !!(i && u && u.includes(i));
|
|
2682
|
+
if (Z && O.onFocus) {
|
|
2683
|
+
var $ = {
|
|
2684
|
+
focused: Z,
|
|
2685
|
+
label: g(Z),
|
|
2686
|
+
isDisabled: b(Z, u),
|
|
2688
2687
|
isSelected: U,
|
|
2689
2688
|
options: a,
|
|
2690
|
-
context:
|
|
2689
|
+
context: Z === i ? "menu" : "value",
|
|
2691
2690
|
selectValue: u,
|
|
2692
2691
|
isAppleDevice: c
|
|
2693
2692
|
};
|
|
2694
|
-
V =
|
|
2693
|
+
V = O.onFocus($);
|
|
2695
2694
|
}
|
|
2696
2695
|
return V;
|
|
2697
|
-
}, [i, r, g, b,
|
|
2696
|
+
}, [i, r, g, b, O, a, u, c]), N = oe(function() {
|
|
2698
2697
|
var V = "";
|
|
2699
|
-
if (v && A.length && !
|
|
2700
|
-
var
|
|
2698
|
+
if (v && A.length && !C && O.onFilter) {
|
|
2699
|
+
var Z = x({
|
|
2701
2700
|
count: a.length
|
|
2702
2701
|
});
|
|
2703
|
-
V =
|
|
2702
|
+
V = O.onFilter({
|
|
2704
2703
|
inputValue: p,
|
|
2705
|
-
resultsMessage:
|
|
2704
|
+
resultsMessage: Z
|
|
2706
2705
|
});
|
|
2707
2706
|
}
|
|
2708
2707
|
return V;
|
|
2709
|
-
}, [a, p, v,
|
|
2708
|
+
}, [a, p, v, O, A, x, C]), L = (n == null ? void 0 : n.action) === "initial-input-focus", B = oe(function() {
|
|
2710
2709
|
var V = "";
|
|
2711
|
-
if (
|
|
2712
|
-
var
|
|
2713
|
-
V =
|
|
2710
|
+
if (O.guidance) {
|
|
2711
|
+
var Z = r ? "value" : v ? "menu" : "input";
|
|
2712
|
+
V = O.guidance({
|
|
2714
2713
|
"aria-label": y,
|
|
2715
|
-
context:
|
|
2714
|
+
context: Z,
|
|
2716
2715
|
isDisabled: i && b(i, u),
|
|
2717
2716
|
isMulti: m,
|
|
2718
2717
|
isSearchable: h,
|
|
@@ -2721,23 +2720,23 @@ var dl = process.env.NODE_ENV === "production" ? {
|
|
|
2721
2720
|
});
|
|
2722
2721
|
}
|
|
2723
2722
|
return V;
|
|
2724
|
-
}, [y, i, r, m, b, h, v,
|
|
2723
|
+
}, [y, i, r, m, b, h, v, O, u, I, L]), F = J(qt, null, J("span", {
|
|
2725
2724
|
id: "aria-selection"
|
|
2726
|
-
},
|
|
2725
|
+
}, G), J("span", {
|
|
2727
2726
|
id: "aria-focused"
|
|
2728
|
-
}, M),
|
|
2727
|
+
}, M), J("span", {
|
|
2729
2728
|
id: "aria-results"
|
|
2730
|
-
}, N),
|
|
2729
|
+
}, N), J("span", {
|
|
2731
2730
|
id: "aria-guidance"
|
|
2732
|
-
},
|
|
2733
|
-
return
|
|
2731
|
+
}, B));
|
|
2732
|
+
return J(qt, null, J(Un, {
|
|
2734
2733
|
id: l
|
|
2735
|
-
}, L &&
|
|
2734
|
+
}, L && F), J(Un, {
|
|
2736
2735
|
"aria-live": R,
|
|
2737
2736
|
"aria-atomic": "false",
|
|
2738
2737
|
"aria-relevant": "additions text",
|
|
2739
2738
|
role: "log"
|
|
2740
|
-
}, o && !L &&
|
|
2739
|
+
}, o && !L && F));
|
|
2741
2740
|
}, bl = gl, on = [{
|
|
2742
2741
|
base: "A",
|
|
2743
2742
|
letters: "AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"
|
|
@@ -3007,7 +3006,7 @@ var yi = function(e) {
|
|
|
3007
3006
|
}, Il = function(e) {
|
|
3008
3007
|
return function(n, i) {
|
|
3009
3008
|
if (n.data.__isNew__) return !0;
|
|
3010
|
-
var r =
|
|
3009
|
+
var r = H({
|
|
3011
3010
|
ignoreCase: !0,
|
|
3012
3011
|
ignoreAccents: !0,
|
|
3013
3012
|
stringify: vl,
|
|
@@ -3019,7 +3018,7 @@ var yi = function(e) {
|
|
|
3019
3018
|
}, yl = ["innerRef"];
|
|
3020
3019
|
function xl(t) {
|
|
3021
3020
|
var e = t.innerRef, n = ve(t, yl), i = _a(n, "onExited", "in", "enter", "exit", "appear");
|
|
3022
|
-
return
|
|
3021
|
+
return J("input", Y({
|
|
3023
3022
|
ref: e
|
|
3024
3023
|
}, i, {
|
|
3025
3024
|
css: /* @__PURE__ */ Mr({
|
|
@@ -3049,26 +3048,26 @@ var Cl = function(e) {
|
|
|
3049
3048
|
e.cancelable && e.preventDefault(), e.stopPropagation();
|
|
3050
3049
|
};
|
|
3051
3050
|
function Al(t) {
|
|
3052
|
-
var e = t.isEnabled, n = t.onBottomArrive, i = t.onBottomLeave, r = t.onTopArrive, a = t.onTopLeave, o =
|
|
3051
|
+
var e = t.isEnabled, n = t.onBottomArrive, i = t.onBottomLeave, r = t.onTopArrive, a = t.onTopLeave, o = z(!1), u = z(!1), s = z(0), l = z(null), c = k(function(h, v) {
|
|
3053
3052
|
if (l.current !== null) {
|
|
3054
|
-
var A = l.current,
|
|
3055
|
-
|
|
3053
|
+
var A = l.current, x = A.scrollTop, I = A.scrollHeight, C = A.clientHeight, y = l.current, R = v > 0, O = I - C - x, G = !1;
|
|
3054
|
+
O > v && o.current && (i && i(h), o.current = !1), R && u.current && (a && a(h), u.current = !1), R && v > O ? (n && !o.current && n(h), y.scrollTop = I, G = !0, o.current = !0) : !R && -v > x && (r && !u.current && r(h), y.scrollTop = 0, G = !0, u.current = !0), G && Cl(h);
|
|
3056
3055
|
}
|
|
3057
|
-
}, [n, i, r, a]), f =
|
|
3056
|
+
}, [n, i, r, a]), f = k(function(h) {
|
|
3058
3057
|
c(h, h.deltaY);
|
|
3059
|
-
}, [c]), g =
|
|
3058
|
+
}, [c]), g = k(function(h) {
|
|
3060
3059
|
s.current = h.changedTouches[0].clientY;
|
|
3061
|
-
}, []), p =
|
|
3060
|
+
}, []), p = k(function(h) {
|
|
3062
3061
|
var v = s.current - h.changedTouches[0].clientY;
|
|
3063
3062
|
c(h, v);
|
|
3064
|
-
}, [c]), m =
|
|
3063
|
+
}, [c]), m = k(function(h) {
|
|
3065
3064
|
if (h) {
|
|
3066
3065
|
var v = za ? {
|
|
3067
3066
|
passive: !1
|
|
3068
3067
|
} : !1;
|
|
3069
3068
|
h.addEventListener("wheel", f, v), h.addEventListener("touchstart", g, v), h.addEventListener("touchmove", p, v);
|
|
3070
3069
|
}
|
|
3071
|
-
}, [p, g, f]), b =
|
|
3070
|
+
}, [p, g, f]), b = k(function(h) {
|
|
3072
3071
|
h && (h.removeEventListener("wheel", f, !1), h.removeEventListener("touchstart", g, !1), h.removeEventListener("touchmove", p, !1));
|
|
3073
3072
|
}, [p, g, f]);
|
|
3074
3073
|
return q(function() {
|
|
@@ -3102,12 +3101,12 @@ function nr() {
|
|
|
3102
3101
|
function rr() {
|
|
3103
3102
|
return "ontouchstart" in window || navigator.maxTouchPoints;
|
|
3104
3103
|
}
|
|
3105
|
-
var ir = !!(typeof window < "u" && window.document && window.document.createElement), Qe = 0,
|
|
3104
|
+
var ir = !!(typeof window < "u" && window.document && window.document.createElement), Qe = 0, Xe = {
|
|
3106
3105
|
capture: !1,
|
|
3107
3106
|
passive: !1
|
|
3108
3107
|
};
|
|
3109
3108
|
function Rl(t) {
|
|
3110
|
-
var e = t.isEnabled, n = t.accountForScrollbars, i = n === void 0 ? !0 : n, r =
|
|
3109
|
+
var e = t.isEnabled, n = t.accountForScrollbars, i = n === void 0 ? !0 : n, r = z({}), a = z(null), o = k(function(s) {
|
|
3111
3110
|
if (ir) {
|
|
3112
3111
|
var l = document.body, c = l && l.style;
|
|
3113
3112
|
if (i && qn.forEach(function(m) {
|
|
@@ -3120,15 +3119,15 @@ function Rl(t) {
|
|
|
3120
3119
|
c && (c[m] = b);
|
|
3121
3120
|
}), c && (c.paddingRight = "".concat(p, "px"));
|
|
3122
3121
|
}
|
|
3123
|
-
l && rr() && (l.addEventListener("touchmove", er,
|
|
3122
|
+
l && rr() && (l.addEventListener("touchmove", er, Xe), s && (s.addEventListener("touchstart", nr, Xe), s.addEventListener("touchmove", tr, Xe))), Qe += 1;
|
|
3124
3123
|
}
|
|
3125
|
-
}, [i]), u =
|
|
3124
|
+
}, [i]), u = k(function(s) {
|
|
3126
3125
|
if (ir) {
|
|
3127
3126
|
var l = document.body, c = l && l.style;
|
|
3128
3127
|
Qe = Math.max(Qe - 1, 0), i && Qe < 1 && qn.forEach(function(f) {
|
|
3129
3128
|
var g = r.current[f];
|
|
3130
3129
|
c && (c[f] = g);
|
|
3131
|
-
}), l && rr() && (l.removeEventListener("touchmove", er,
|
|
3130
|
+
}), l && rr() && (l.removeEventListener("touchmove", er, Xe), s && (s.removeEventListener("touchstart", nr, Xe), s.removeEventListener("touchmove", tr, Xe)));
|
|
3132
3131
|
}
|
|
3133
3132
|
}, [i]);
|
|
3134
3133
|
return q(function() {
|
|
@@ -3169,7 +3168,7 @@ function Fl(t) {
|
|
|
3169
3168
|
}), f = function(p) {
|
|
3170
3169
|
l(p), c(p);
|
|
3171
3170
|
};
|
|
3172
|
-
return
|
|
3171
|
+
return J(qt, null, n && J("div", {
|
|
3173
3172
|
onClick: El,
|
|
3174
3173
|
css: Ol
|
|
3175
3174
|
}), e(f));
|
|
@@ -3187,7 +3186,7 @@ var Tl = process.env.NODE_ENV === "production" ? {
|
|
|
3187
3186
|
toString: wl
|
|
3188
3187
|
}, Gl = function(e) {
|
|
3189
3188
|
var n = e.name, i = e.onFocus;
|
|
3190
|
-
return
|
|
3189
|
+
return J("input", {
|
|
3191
3190
|
required: !0,
|
|
3192
3191
|
name: n,
|
|
3193
3192
|
tabIndex: -1,
|
|
@@ -3357,14 +3356,14 @@ function ft(t, e) {
|
|
|
3357
3356
|
}
|
|
3358
3357
|
function Si(t) {
|
|
3359
3358
|
return t.reduce(function(e, n) {
|
|
3360
|
-
return n.type === "group" ? e.push.apply(e,
|
|
3359
|
+
return n.type === "group" ? e.push.apply(e, _e(n.options.map(function(i) {
|
|
3361
3360
|
return i.data;
|
|
3362
3361
|
}))) : e.push(n.data), e;
|
|
3363
3362
|
}, []);
|
|
3364
3363
|
}
|
|
3365
3364
|
function ar(t, e) {
|
|
3366
3365
|
return t.reduce(function(n, i) {
|
|
3367
|
-
return i.type === "group" ? n.push.apply(n,
|
|
3366
|
+
return i.type === "group" ? n.push.apply(n, _e(i.options.map(function(r) {
|
|
3368
3367
|
return {
|
|
3369
3368
|
data: r.data,
|
|
3370
3369
|
id: "".concat(e, "-").concat(i.index, "-").concat(r.index)
|
|
@@ -3481,7 +3480,7 @@ var Ti = function(e) {
|
|
|
3481
3480
|
return r.getOptionValue(v) !== h;
|
|
3482
3481
|
}), "deselect-option", s);
|
|
3483
3482
|
} else if (!b)
|
|
3484
|
-
f ? r.setValue([].concat(
|
|
3483
|
+
f ? r.setValue([].concat(_e(p), [s]), "select-option", s) : r.setValue(s, "select-option");
|
|
3485
3484
|
else {
|
|
3486
3485
|
r.ariaOnChange(s, {
|
|
3487
3486
|
action: "select-option",
|
|
@@ -3547,7 +3546,7 @@ var Ti = function(e) {
|
|
|
3547
3546
|
return r.props.menuIsOpen ? r.buildFocusableOptions() : [];
|
|
3548
3547
|
}, r.ariaOnChange = function(s, l) {
|
|
3549
3548
|
r.setState({
|
|
3550
|
-
ariaSelection:
|
|
3549
|
+
ariaSelection: H({
|
|
3551
3550
|
value: s
|
|
3552
3551
|
}, l)
|
|
3553
3552
|
});
|
|
@@ -3633,7 +3632,7 @@ var Ti = function(e) {
|
|
|
3633
3632
|
}, r.onValueInputFocus = function(s) {
|
|
3634
3633
|
s.preventDefault(), s.stopPropagation(), r.focus();
|
|
3635
3634
|
}, r.onKeyDown = function(s) {
|
|
3636
|
-
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue, g = l.escapeClearsValue, p = l.inputValue, m = l.isClearable, b = l.isDisabled, h = l.menuIsOpen, v = l.onKeyDown, A = l.tabSelectsValue,
|
|
3635
|
+
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue, g = l.escapeClearsValue, p = l.inputValue, m = l.isClearable, b = l.isDisabled, h = l.menuIsOpen, v = l.onKeyDown, A = l.tabSelectsValue, x = l.openMenuOnFocus, I = r.state, C = I.focusedOption, y = I.focusedValue, R = I.selectValue;
|
|
3637
3636
|
if (!b && !(typeof v == "function" && (v(s), s.defaultPrevented))) {
|
|
3638
3637
|
switch (r.blockOptionHover = !0, s.key) {
|
|
3639
3638
|
case "ArrowLeft":
|
|
@@ -3655,18 +3654,18 @@ var Ti = function(e) {
|
|
|
3655
3654
|
}
|
|
3656
3655
|
break;
|
|
3657
3656
|
case "Tab":
|
|
3658
|
-
if (r.isComposing || s.shiftKey || !h || !A || !
|
|
3657
|
+
if (r.isComposing || s.shiftKey || !h || !A || !C || // don't capture the event if the menu opens on focus and the focused
|
|
3659
3658
|
// option is already selected; it breaks the flow of navigation
|
|
3660
|
-
|
|
3659
|
+
x && r.isOptionSelected(C, R))
|
|
3661
3660
|
return;
|
|
3662
|
-
r.selectOption(
|
|
3661
|
+
r.selectOption(C);
|
|
3663
3662
|
break;
|
|
3664
3663
|
case "Enter":
|
|
3665
3664
|
if (s.keyCode === 229)
|
|
3666
3665
|
break;
|
|
3667
3666
|
if (h) {
|
|
3668
|
-
if (!
|
|
3669
|
-
r.selectOption(
|
|
3667
|
+
if (!C || r.isComposing) return;
|
|
3668
|
+
r.selectOption(C);
|
|
3670
3669
|
break;
|
|
3671
3670
|
}
|
|
3672
3671
|
return;
|
|
@@ -3685,8 +3684,8 @@ var Ti = function(e) {
|
|
|
3685
3684
|
r.openMenu("first");
|
|
3686
3685
|
break;
|
|
3687
3686
|
}
|
|
3688
|
-
if (!
|
|
3689
|
-
r.selectOption(
|
|
3687
|
+
if (!C) return;
|
|
3688
|
+
r.selectOption(C);
|
|
3690
3689
|
break;
|
|
3691
3690
|
case "ArrowUp":
|
|
3692
3691
|
h ? r.focusOption("up") : r.openMenu("last");
|
|
@@ -3844,7 +3843,7 @@ var Ti = function(e) {
|
|
|
3844
3843
|
// Getters
|
|
3845
3844
|
// ==============================
|
|
3846
3845
|
function() {
|
|
3847
|
-
return this.props.theme ? typeof this.props.theme == "function" ? this.props.theme(_t) :
|
|
3846
|
+
return this.props.theme ? typeof this.props.theme == "function" ? this.props.theme(_t) : H(H({}, _t), this.props.theme) : _t;
|
|
3848
3847
|
}
|
|
3849
3848
|
)
|
|
3850
3849
|
}, {
|
|
@@ -3957,7 +3956,7 @@ var Ti = function(e) {
|
|
|
3957
3956
|
// Renderers
|
|
3958
3957
|
// ==============================
|
|
3959
3958
|
function() {
|
|
3960
|
-
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, h = b.inputIsHidden, v = b.ariaSelection, A = this.commonProps,
|
|
3959
|
+
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, h = b.inputIsHidden, v = b.ariaSelection, A = this.commonProps, x = u || this.getElementId("input"), I = H(H(H({
|
|
3961
3960
|
"aria-autocomplete": "list",
|
|
3962
3961
|
"aria-expanded": f,
|
|
3963
3962
|
"aria-haspopup": !0,
|
|
@@ -3981,7 +3980,7 @@ var Ti = function(e) {
|
|
|
3981
3980
|
autoCapitalize: "none",
|
|
3982
3981
|
autoComplete: "off",
|
|
3983
3982
|
autoCorrect: "off",
|
|
3984
|
-
id:
|
|
3983
|
+
id: x,
|
|
3985
3984
|
innerRef: this.getInputRef,
|
|
3986
3985
|
isDisabled: a,
|
|
3987
3986
|
isHidden: h,
|
|
@@ -3994,7 +3993,7 @@ var Ti = function(e) {
|
|
|
3994
3993
|
type: "text",
|
|
3995
3994
|
value: s
|
|
3996
3995
|
}, I)) : /* @__PURE__ */ K.createElement(xl, Y({
|
|
3997
|
-
id:
|
|
3996
|
+
id: x,
|
|
3998
3997
|
innerRef: this.getInputRef,
|
|
3999
3998
|
onBlur: this.onInputBlur,
|
|
4000
3999
|
onChange: Rt,
|
|
@@ -4010,7 +4009,7 @@ var Ti = function(e) {
|
|
|
4010
4009
|
}, {
|
|
4011
4010
|
key: "renderPlaceholderOrValue",
|
|
4012
4011
|
value: function() {
|
|
4013
|
-
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, h = p.isMulti, v = p.inputValue, A = p.placeholder,
|
|
4012
|
+
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, h = p.isMulti, v = p.inputValue, A = p.placeholder, x = this.state, I = x.selectValue, C = x.focusedValue, y = x.isFocused;
|
|
4014
4013
|
if (!this.hasValue() || !m)
|
|
4015
4014
|
return v ? null : /* @__PURE__ */ K.createElement(f, Y({}, g, {
|
|
4016
4015
|
key: "placeholder",
|
|
@@ -4021,8 +4020,8 @@ var Ti = function(e) {
|
|
|
4021
4020
|
}
|
|
4022
4021
|
}), A);
|
|
4023
4022
|
if (h)
|
|
4024
|
-
return I.map(function(
|
|
4025
|
-
var M =
|
|
4023
|
+
return I.map(function(O, G) {
|
|
4024
|
+
var M = O === C, N = "".concat(r.getOptionLabel(O), "-").concat(r.getOptionValue(O));
|
|
4026
4025
|
return /* @__PURE__ */ K.createElement(o, Y({}, g, {
|
|
4027
4026
|
components: {
|
|
4028
4027
|
Container: u,
|
|
@@ -4032,20 +4031,20 @@ var Ti = function(e) {
|
|
|
4032
4031
|
isFocused: M,
|
|
4033
4032
|
isDisabled: b,
|
|
4034
4033
|
key: N,
|
|
4035
|
-
index:
|
|
4034
|
+
index: G,
|
|
4036
4035
|
removeProps: {
|
|
4037
4036
|
onClick: function() {
|
|
4038
|
-
return r.removeValue(
|
|
4037
|
+
return r.removeValue(O);
|
|
4039
4038
|
},
|
|
4040
4039
|
onTouchEnd: function() {
|
|
4041
|
-
return r.removeValue(
|
|
4040
|
+
return r.removeValue(O);
|
|
4042
4041
|
},
|
|
4043
|
-
onMouseDown: function(
|
|
4044
|
-
|
|
4042
|
+
onMouseDown: function(B) {
|
|
4043
|
+
B.preventDefault();
|
|
4045
4044
|
}
|
|
4046
4045
|
},
|
|
4047
|
-
data:
|
|
4048
|
-
}), r.formatOptionLabel(
|
|
4046
|
+
data: O
|
|
4047
|
+
}), r.formatOptionLabel(O, "value"));
|
|
4049
4048
|
});
|
|
4050
4049
|
if (v)
|
|
4051
4050
|
return null;
|
|
@@ -4115,112 +4114,112 @@ var Ti = function(e) {
|
|
|
4115
4114
|
}, {
|
|
4116
4115
|
key: "renderMenu",
|
|
4117
4116
|
value: function() {
|
|
4118
|
-
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, h = this.props, v = h.captureMenuScroll, A = h.inputValue,
|
|
4117
|
+
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, h = this.props, v = h.captureMenuScroll, A = h.inputValue, x = h.isLoading, I = h.loadingMessage, C = h.minMenuHeight, y = h.maxMenuHeight, R = h.menuIsOpen, O = h.menuPlacement, G = h.menuPosition, M = h.menuPortalTarget, N = h.menuShouldBlockScroll, L = h.menuShouldScrollIntoView, B = h.noOptionsMessage, F = h.onMenuScrollToTop, V = h.onMenuScrollToBottom;
|
|
4119
4118
|
if (!R) return null;
|
|
4120
|
-
var
|
|
4121
|
-
var
|
|
4122
|
-
return r.onOptionHover(
|
|
4119
|
+
var Z = function(_, T) {
|
|
4120
|
+
var P = _.type, j = _.data, Q = _.isDisabled, ne = _.isSelected, ie = _.label, Ce = _.value, Ie = b === j, je = Q ? void 0 : function() {
|
|
4121
|
+
return r.onOptionHover(j);
|
|
4123
4122
|
}, Mt = Q ? void 0 : function() {
|
|
4124
|
-
return r.selectOption(
|
|
4125
|
-
}, it = "".concat(r.getElementId("option"), "-").concat(
|
|
4123
|
+
return r.selectOption(j);
|
|
4124
|
+
}, it = "".concat(r.getElementId("option"), "-").concat(T), $e = {
|
|
4126
4125
|
id: it,
|
|
4127
4126
|
onClick: Mt,
|
|
4128
4127
|
onMouseMove: je,
|
|
4129
4128
|
onMouseOver: je,
|
|
4130
4129
|
tabIndex: -1,
|
|
4131
4130
|
role: "option",
|
|
4132
|
-
"aria-selected": r.state.isAppleDevice ? void 0 :
|
|
4131
|
+
"aria-selected": r.state.isAppleDevice ? void 0 : ne
|
|
4133
4132
|
// is not supported on Apple devices
|
|
4134
4133
|
};
|
|
4135
4134
|
return /* @__PURE__ */ K.createElement(p, Y({}, m, {
|
|
4136
4135
|
innerProps: $e,
|
|
4137
|
-
data:
|
|
4136
|
+
data: j,
|
|
4138
4137
|
isDisabled: Q,
|
|
4139
|
-
isSelected:
|
|
4138
|
+
isSelected: ne,
|
|
4140
4139
|
key: it,
|
|
4141
|
-
label:
|
|
4142
|
-
type:
|
|
4140
|
+
label: ie,
|
|
4141
|
+
type: P,
|
|
4143
4142
|
value: Ce,
|
|
4144
4143
|
isFocused: Ie,
|
|
4145
4144
|
innerRef: Ie ? r.getFocusedOptionRef : void 0
|
|
4146
|
-
}), r.formatOptionLabel(
|
|
4145
|
+
}), r.formatOptionLabel(_.data, "menu"));
|
|
4147
4146
|
}, U;
|
|
4148
4147
|
if (this.hasOptions())
|
|
4149
|
-
U = this.getCategorizedOptions().map(function(
|
|
4150
|
-
if (
|
|
4151
|
-
var
|
|
4148
|
+
U = this.getCategorizedOptions().map(function(w) {
|
|
4149
|
+
if (w.type === "group") {
|
|
4150
|
+
var _ = w.data, T = w.options, P = w.index, j = "".concat(r.getElementId("group"), "-").concat(P), Q = "".concat(j, "-heading");
|
|
4152
4151
|
return /* @__PURE__ */ K.createElement(o, Y({}, m, {
|
|
4153
|
-
key:
|
|
4154
|
-
data:
|
|
4155
|
-
options:
|
|
4152
|
+
key: j,
|
|
4153
|
+
data: _,
|
|
4154
|
+
options: T,
|
|
4156
4155
|
Heading: u,
|
|
4157
4156
|
headingProps: {
|
|
4158
4157
|
id: Q,
|
|
4159
|
-
data:
|
|
4158
|
+
data: w.data
|
|
4160
4159
|
},
|
|
4161
|
-
label: r.formatGroupLabel(
|
|
4162
|
-
}),
|
|
4163
|
-
return
|
|
4160
|
+
label: r.formatGroupLabel(w.data)
|
|
4161
|
+
}), w.options.map(function(ne) {
|
|
4162
|
+
return Z(ne, "".concat(P, "-").concat(ne.index));
|
|
4164
4163
|
}));
|
|
4165
|
-
} else if (
|
|
4166
|
-
return
|
|
4164
|
+
} else if (w.type === "option")
|
|
4165
|
+
return Z(w, "".concat(w.index));
|
|
4167
4166
|
});
|
|
4168
|
-
else if (
|
|
4169
|
-
var
|
|
4167
|
+
else if (x) {
|
|
4168
|
+
var $ = I({
|
|
4170
4169
|
inputValue: A
|
|
4171
4170
|
});
|
|
4172
|
-
if (
|
|
4173
|
-
U = /* @__PURE__ */ K.createElement(f, m,
|
|
4171
|
+
if ($ === null) return null;
|
|
4172
|
+
U = /* @__PURE__ */ K.createElement(f, m, $);
|
|
4174
4173
|
} else {
|
|
4175
|
-
var
|
|
4174
|
+
var re = B({
|
|
4176
4175
|
inputValue: A
|
|
4177
4176
|
});
|
|
4178
|
-
if (
|
|
4179
|
-
U = /* @__PURE__ */ K.createElement(g, m,
|
|
4177
|
+
if (re === null) return null;
|
|
4178
|
+
U = /* @__PURE__ */ K.createElement(g, m, re);
|
|
4180
4179
|
}
|
|
4181
|
-
var
|
|
4182
|
-
minMenuHeight:
|
|
4180
|
+
var se = {
|
|
4181
|
+
minMenuHeight: C,
|
|
4183
4182
|
maxMenuHeight: y,
|
|
4184
|
-
menuPlacement:
|
|
4185
|
-
menuPosition:
|
|
4183
|
+
menuPlacement: O,
|
|
4184
|
+
menuPosition: G,
|
|
4186
4185
|
menuShouldScrollIntoView: L
|
|
4187
|
-
},
|
|
4188
|
-
var
|
|
4189
|
-
return /* @__PURE__ */ K.createElement(s, Y({}, m,
|
|
4190
|
-
innerRef:
|
|
4186
|
+
}, X = /* @__PURE__ */ K.createElement(Qa, Y({}, m, se), function(w) {
|
|
4187
|
+
var _ = w.ref, T = w.placerProps, P = T.placement, j = T.maxHeight;
|
|
4188
|
+
return /* @__PURE__ */ K.createElement(s, Y({}, m, se, {
|
|
4189
|
+
innerRef: _,
|
|
4191
4190
|
innerProps: {
|
|
4192
4191
|
onMouseDown: r.onMenuMouseDown,
|
|
4193
4192
|
onMouseMove: r.onMenuMouseMove
|
|
4194
4193
|
},
|
|
4195
|
-
isLoading:
|
|
4196
|
-
placement:
|
|
4194
|
+
isLoading: x,
|
|
4195
|
+
placement: P
|
|
4197
4196
|
}), /* @__PURE__ */ K.createElement(Fl, {
|
|
4198
4197
|
captureEnabled: v,
|
|
4199
|
-
onTopArrive:
|
|
4198
|
+
onTopArrive: F,
|
|
4200
4199
|
onBottomArrive: V,
|
|
4201
4200
|
lockEnabled: N
|
|
4202
4201
|
}, function(Q) {
|
|
4203
4202
|
return /* @__PURE__ */ K.createElement(l, Y({}, m, {
|
|
4204
|
-
innerRef: function(
|
|
4205
|
-
r.getMenuListRef(
|
|
4203
|
+
innerRef: function(ie) {
|
|
4204
|
+
r.getMenuListRef(ie), Q(ie);
|
|
4206
4205
|
},
|
|
4207
4206
|
innerProps: {
|
|
4208
4207
|
role: "listbox",
|
|
4209
4208
|
"aria-multiselectable": m.isMulti,
|
|
4210
4209
|
id: r.getElementId("listbox")
|
|
4211
4210
|
},
|
|
4212
|
-
isLoading:
|
|
4213
|
-
maxHeight:
|
|
4211
|
+
isLoading: x,
|
|
4212
|
+
maxHeight: j,
|
|
4214
4213
|
focusedOption: b
|
|
4215
4214
|
}), U);
|
|
4216
4215
|
}));
|
|
4217
4216
|
});
|
|
4218
|
-
return M ||
|
|
4217
|
+
return M || G === "fixed" ? /* @__PURE__ */ K.createElement(c, Y({}, m, {
|
|
4219
4218
|
appendTo: M,
|
|
4220
4219
|
controlElement: this.controlRef,
|
|
4221
|
-
menuPlacement:
|
|
4222
|
-
menuPosition:
|
|
4223
|
-
}),
|
|
4220
|
+
menuPlacement: O,
|
|
4221
|
+
menuPosition: G
|
|
4222
|
+
}), X) : X;
|
|
4224
4223
|
}
|
|
4225
4224
|
}, {
|
|
4226
4225
|
key: "renderFormField",
|
|
@@ -4311,19 +4310,19 @@ var Ti = function(e) {
|
|
|
4311
4310
|
}], [{
|
|
4312
4311
|
key: "getDerivedStateFromProps",
|
|
4313
4312
|
value: function(r, a) {
|
|
4314
|
-
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, h = r.inputValue, v = r.isMulti, A = St(m),
|
|
4313
|
+
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, h = r.inputValue, v = r.isMulti, A = St(m), x = {};
|
|
4315
4314
|
if (o && (m !== o.value || p !== o.options || b !== o.menuIsOpen || h !== o.inputValue)) {
|
|
4316
|
-
var I = b ? Jl(r, A) : [],
|
|
4317
|
-
|
|
4315
|
+
var I = b ? Jl(r, A) : [], C = b ? ar(ft(r, A), "".concat(g, "-option")) : [], y = u ? Yl(a, A) : null, R = jl(a, I), O = Jt(C, R);
|
|
4316
|
+
x = {
|
|
4318
4317
|
selectValue: A,
|
|
4319
4318
|
focusedOption: R,
|
|
4320
|
-
focusedOptionId:
|
|
4321
|
-
focusableOptionsWithIds:
|
|
4319
|
+
focusedOptionId: O,
|
|
4320
|
+
focusableOptionsWithIds: C,
|
|
4322
4321
|
focusedValue: y,
|
|
4323
4322
|
clearFocusValueOnUpdate: !1
|
|
4324
4323
|
};
|
|
4325
4324
|
}
|
|
4326
|
-
var
|
|
4325
|
+
var G = s != null && r !== o ? {
|
|
4327
4326
|
inputIsHidden: s,
|
|
4328
4327
|
inputIsHiddenAfterUpdate: void 0
|
|
4329
4328
|
} : {}, M = l, N = c && f;
|
|
@@ -4331,7 +4330,7 @@ var Ti = function(e) {
|
|
|
4331
4330
|
value: qe(v, A, A[0] || null),
|
|
4332
4331
|
options: A,
|
|
4333
4332
|
action: "initial-input-focus"
|
|
4334
|
-
}, N = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (M = null),
|
|
4333
|
+
}, N = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (M = null), H(H(H({}, x), G), {}, {
|
|
4335
4334
|
prevProps: r,
|
|
4336
4335
|
ariaSelection: M,
|
|
4337
4336
|
prevWasFocused: N
|
|
@@ -4342,23 +4341,23 @@ var Ti = function(e) {
|
|
|
4342
4341
|
Nt.defaultProps = _l;
|
|
4343
4342
|
var Ul = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
4344
4343
|
function wn(t) {
|
|
4345
|
-
var e = t.defaultInputValue, n = e === void 0 ? "" : e, i = t.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = t.defaultValue, o = a === void 0 ? null : a, u = t.inputValue, s = t.menuIsOpen, l = t.onChange, c = t.onInputChange, f = t.onMenuClose, g = t.onMenuOpen, p = t.value, m = ve(t, Ul), b = W(u !== void 0 ? u : n), h =
|
|
4346
|
-
typeof l == "function" && l(
|
|
4347
|
-
}, [l]), L =
|
|
4348
|
-
var
|
|
4349
|
-
typeof c == "function" && (
|
|
4350
|
-
}, [c]),
|
|
4344
|
+
var e = t.defaultInputValue, n = e === void 0 ? "" : e, i = t.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = t.defaultValue, o = a === void 0 ? null : a, u = t.inputValue, s = t.menuIsOpen, l = t.onChange, c = t.onInputChange, f = t.onMenuClose, g = t.onMenuOpen, p = t.value, m = ve(t, Ul), b = W(u !== void 0 ? u : n), h = le(b, 2), v = h[0], A = h[1], x = W(s !== void 0 ? s : r), I = le(x, 2), C = I[0], y = I[1], R = W(p !== void 0 ? p : o), O = le(R, 2), G = O[0], M = O[1], N = k(function($, re) {
|
|
4345
|
+
typeof l == "function" && l($, re), M($);
|
|
4346
|
+
}, [l]), L = k(function($, re) {
|
|
4347
|
+
var se;
|
|
4348
|
+
typeof c == "function" && (se = c($, re)), A(se !== void 0 ? se : $);
|
|
4349
|
+
}, [c]), B = k(function() {
|
|
4351
4350
|
typeof g == "function" && g(), y(!0);
|
|
4352
|
-
}, [g]),
|
|
4351
|
+
}, [g]), F = k(function() {
|
|
4353
4352
|
typeof f == "function" && f(), y(!1);
|
|
4354
|
-
}, [f]), V = u !== void 0 ? u : v,
|
|
4355
|
-
return
|
|
4353
|
+
}, [f]), V = u !== void 0 ? u : v, Z = s !== void 0 ? s : C, U = p !== void 0 ? p : G;
|
|
4354
|
+
return H(H({}, m), {}, {
|
|
4356
4355
|
inputValue: V,
|
|
4357
|
-
menuIsOpen:
|
|
4356
|
+
menuIsOpen: Z,
|
|
4358
4357
|
onChange: N,
|
|
4359
4358
|
onInputChange: L,
|
|
4360
|
-
onMenuClose:
|
|
4361
|
-
onMenuOpen:
|
|
4359
|
+
onMenuClose: F,
|
|
4360
|
+
onMenuOpen: B,
|
|
4362
4361
|
value: U
|
|
4363
4362
|
});
|
|
4364
4363
|
}
|
|
@@ -4366,42 +4365,42 @@ var Ql = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading
|
|
|
4366
4365
|
function Gi(t) {
|
|
4367
4366
|
var e = t.defaultOptions, n = e === void 0 ? !1 : e, i = t.cacheOptions, r = i === void 0 ? !1 : i, a = t.loadOptions;
|
|
4368
4367
|
t.options;
|
|
4369
|
-
var o = t.isLoading, u = o === void 0 ? !1 : o, s = t.onInputChange, l = t.filterOption, c = l === void 0 ? null : l, f = ve(t, Ql), g = f.inputValue, p =
|
|
4370
|
-
r !== Mt && (
|
|
4368
|
+
var o = t.isLoading, u = o === void 0 ? !1 : o, s = t.onInputChange, l = t.filterOption, c = l === void 0 ? null : l, f = ve(t, Ql), g = f.inputValue, p = z(void 0), m = z(!1), b = W(Array.isArray(n) ? n : void 0), h = le(b, 2), v = h[0], A = h[1], x = W(typeof g < "u" ? g : ""), I = le(x, 2), C = I[0], y = I[1], R = W(n === !0), O = le(R, 2), G = O[0], M = O[1], N = W(void 0), L = le(N, 2), B = L[0], F = L[1], V = W([]), Z = le(V, 2), U = Z[0], $ = Z[1], re = W(!1), se = le(re, 2), X = se[0], w = se[1], _ = W({}), T = le(_, 2), P = T[0], j = T[1], Q = W(void 0), ne = le(Q, 2), ie = ne[0], Ce = ne[1], Ie = W(void 0), je = le(Ie, 2), Mt = je[0], it = je[1];
|
|
4369
|
+
r !== Mt && (j({}), it(r)), n !== ie && (A(Array.isArray(n) ? n : void 0), Ce(n)), q(function() {
|
|
4371
4370
|
return m.current = !0, function() {
|
|
4372
4371
|
m.current = !1;
|
|
4373
4372
|
};
|
|
4374
4373
|
}, []);
|
|
4375
|
-
var $e =
|
|
4376
|
-
if (!a) return
|
|
4377
|
-
var be = a(Ue,
|
|
4378
|
-
be && typeof be.then == "function" && be.then(
|
|
4379
|
-
return
|
|
4374
|
+
var $e = k(function(Ue, We) {
|
|
4375
|
+
if (!a) return We();
|
|
4376
|
+
var be = a(Ue, We);
|
|
4377
|
+
be && typeof be.then == "function" && be.then(We, function() {
|
|
4378
|
+
return We();
|
|
4380
4379
|
});
|
|
4381
4380
|
}, [a]);
|
|
4382
4381
|
q(function() {
|
|
4383
|
-
n === !0 && $e(
|
|
4382
|
+
n === !0 && $e(C, function(Ue) {
|
|
4384
4383
|
m.current && (A(Ue || []), M(!!p.current));
|
|
4385
4384
|
});
|
|
4386
4385
|
}, []);
|
|
4387
|
-
var go =
|
|
4388
|
-
var be = Na(Ue,
|
|
4386
|
+
var go = k(function(Ue, We) {
|
|
4387
|
+
var be = Na(Ue, We, s);
|
|
4389
4388
|
if (!be) {
|
|
4390
|
-
p.current = void 0, y(""),
|
|
4389
|
+
p.current = void 0, y(""), F(""), $([]), M(!1), w(!1);
|
|
4391
4390
|
return;
|
|
4392
4391
|
}
|
|
4393
|
-
if (r &&
|
|
4394
|
-
y(be),
|
|
4392
|
+
if (r && P[be])
|
|
4393
|
+
y(be), F(be), $(P[be]), M(!1), w(!1);
|
|
4395
4394
|
else {
|
|
4396
4395
|
var ho = p.current = {};
|
|
4397
|
-
y(be), M(!0),
|
|
4398
|
-
m && ho === p.current && (p.current = void 0, M(!1),
|
|
4396
|
+
y(be), M(!0), w(!B), $e(be, function(Wt) {
|
|
4397
|
+
m && ho === p.current && (p.current = void 0, M(!1), F(be), $(Wt || []), w(!1), j(Wt ? H(H({}, P), {}, He({}, be, Wt)) : P));
|
|
4399
4398
|
});
|
|
4400
4399
|
}
|
|
4401
|
-
}, [r, $e,
|
|
4402
|
-
return
|
|
4400
|
+
}, [r, $e, B, P, s]), bo = X ? [] : C && B ? U : v || [];
|
|
4401
|
+
return H(H({}, f), {}, {
|
|
4403
4402
|
options: bo,
|
|
4404
|
-
isLoading:
|
|
4403
|
+
isLoading: G || u,
|
|
4405
4404
|
onInputChange: go,
|
|
4406
4405
|
filterOption: c
|
|
4407
4406
|
});
|
|
@@ -4434,32 +4433,32 @@ var ql = /* @__PURE__ */ Tt(function(t, e) {
|
|
|
4434
4433
|
}
|
|
4435
4434
|
};
|
|
4436
4435
|
function Bi(t) {
|
|
4437
|
-
var e = t.allowCreateWhileLoading, n = e === void 0 ? !1 : e, i = t.createOptionPosition, r = i === void 0 ? "last" : i, a = t.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = t.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = t.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = t.onCreateOption, g = t.options, p = g === void 0 ? [] : g, m = t.onChange, b = ve(t, eu), h = b.getOptionValue, v = h === void 0 ? Ai : h, A = b.getOptionLabel,
|
|
4436
|
+
var e = t.allowCreateWhileLoading, n = e === void 0 ? !1 : e, i = t.createOptionPosition, r = i === void 0 ? "last" : i, a = t.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = t.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = t.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = t.onCreateOption, g = t.options, p = g === void 0 ? [] : g, m = t.onChange, b = ve(t, eu), h = b.getOptionValue, v = h === void 0 ? Ai : h, A = b.getOptionLabel, x = A === void 0 ? Ci : A, I = b.inputValue, C = b.isLoading, y = b.isMulti, R = b.value, O = b.name, G = oe(function() {
|
|
4438
4437
|
return s(I, St(R), p, {
|
|
4439
4438
|
getOptionValue: v,
|
|
4440
|
-
getOptionLabel:
|
|
4439
|
+
getOptionLabel: x
|
|
4441
4440
|
}) ? c(I, o(I)) : void 0;
|
|
4442
|
-
}, [o, c,
|
|
4443
|
-
return (n || !
|
|
4444
|
-
}, [n, r,
|
|
4445
|
-
if (
|
|
4446
|
-
return m(L,
|
|
4447
|
-
var
|
|
4448
|
-
if (
|
|
4441
|
+
}, [o, c, x, v, I, s, p, R]), M = oe(function() {
|
|
4442
|
+
return (n || !C) && G ? r === "first" ? [G].concat(_e(p)) : [].concat(_e(p), [G]) : p;
|
|
4443
|
+
}, [n, r, C, G, p]), N = k(function(L, B) {
|
|
4444
|
+
if (B.action !== "select-option")
|
|
4445
|
+
return m(L, B);
|
|
4446
|
+
var F = Array.isArray(L) ? L : [L];
|
|
4447
|
+
if (F[F.length - 1] === G) {
|
|
4449
4448
|
if (f) f(I);
|
|
4450
4449
|
else {
|
|
4451
|
-
var V = c(I, I),
|
|
4450
|
+
var V = c(I, I), Z = {
|
|
4452
4451
|
action: "create-option",
|
|
4453
|
-
name:
|
|
4452
|
+
name: O,
|
|
4454
4453
|
option: V
|
|
4455
4454
|
};
|
|
4456
|
-
m(qe(y, [].concat(
|
|
4455
|
+
m(qe(y, [].concat(_e(St(R)), [V]), V), Z);
|
|
4457
4456
|
}
|
|
4458
4457
|
return;
|
|
4459
4458
|
}
|
|
4460
|
-
m(L,
|
|
4461
|
-
}, [c, I, y,
|
|
4462
|
-
return
|
|
4459
|
+
m(L, B);
|
|
4460
|
+
}, [c, I, y, O, G, f, m, R]);
|
|
4461
|
+
return H(H({}, b), {}, {
|
|
4463
4462
|
options: M,
|
|
4464
4463
|
onChange: N
|
|
4465
4464
|
});
|
|
@@ -4487,9 +4486,9 @@ function Vi({
|
|
|
4487
4486
|
onFormulaConfigChange: s,
|
|
4488
4487
|
renderNative: l
|
|
4489
4488
|
}) {
|
|
4490
|
-
const c = t.formula === !0, f = rt(), g =
|
|
4489
|
+
const c = t.formula === !0, f = rt(), g = z(null), [p, m] = W(
|
|
4491
4490
|
() => c && (t.formula === !0 || e in (u ?? {}))
|
|
4492
|
-
), b =
|
|
4491
|
+
), b = z(p);
|
|
4493
4492
|
b.current = p, q(() => {
|
|
4494
4493
|
if (!(!c || !f))
|
|
4495
4494
|
return b.current && f.notifyFormulaToggle(!0), () => {
|
|
@@ -4498,28 +4497,28 @@ function Vi({
|
|
|
4498
4497
|
}, []);
|
|
4499
4498
|
const h = p, [v, A] = W(
|
|
4500
4499
|
() => c && p ? Ve(String(n ?? ""), !0) : []
|
|
4501
|
-
),
|
|
4500
|
+
), x = z(n), I = (y) => {
|
|
4502
4501
|
A(y);
|
|
4503
4502
|
const R = h ? It(y) : De(y);
|
|
4504
|
-
|
|
4505
|
-
},
|
|
4503
|
+
x.current = R, i(R);
|
|
4504
|
+
}, C = k(() => {
|
|
4506
4505
|
const y = !p;
|
|
4507
4506
|
if (m(y), f == null || f.notifyFormulaToggle(y, y ? g.current : null), y) {
|
|
4508
|
-
const R = String(n ?? ""),
|
|
4509
|
-
A(
|
|
4510
|
-
const
|
|
4511
|
-
|
|
4507
|
+
const R = String(n ?? ""), O = Ve(R, !0);
|
|
4508
|
+
A(O);
|
|
4509
|
+
const G = It(O);
|
|
4510
|
+
x.current = G, i(G), s == null || s({ ...u, [e]: Xr() });
|
|
4512
4511
|
} else {
|
|
4513
4512
|
const R = De(v);
|
|
4514
|
-
|
|
4515
|
-
const
|
|
4516
|
-
delete
|
|
4513
|
+
x.current = R, i(R);
|
|
4514
|
+
const O = { ...u };
|
|
4515
|
+
delete O[e], s == null || s(O), A([]);
|
|
4517
4516
|
}
|
|
4518
4517
|
}, [p, f, n, v, u, e, s, i]);
|
|
4519
|
-
return c ? /* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4518
|
+
return c ? /* @__PURE__ */ E("div", { children: [
|
|
4519
|
+
/* @__PURE__ */ E(D, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0 }, children: [
|
|
4521
4520
|
/* @__PURE__ */ d(
|
|
4522
|
-
|
|
4521
|
+
ue,
|
|
4523
4522
|
{
|
|
4524
4523
|
label: t.label,
|
|
4525
4524
|
required: t.required,
|
|
@@ -4534,13 +4533,13 @@ function Vi({
|
|
|
4534
4533
|
{
|
|
4535
4534
|
title: p ? "Use static value (dropdown)" : "Use dynamic formula expression",
|
|
4536
4535
|
placement: "top",
|
|
4537
|
-
children: /* @__PURE__ */
|
|
4536
|
+
children: /* @__PURE__ */ E(
|
|
4538
4537
|
D,
|
|
4539
4538
|
{
|
|
4540
4539
|
component: "button",
|
|
4541
4540
|
type: "button",
|
|
4542
4541
|
ref: g,
|
|
4543
|
-
onClick:
|
|
4542
|
+
onClick: C,
|
|
4544
4543
|
sx: {
|
|
4545
4544
|
border: "none",
|
|
4546
4545
|
cursor: "pointer",
|
|
@@ -4583,9 +4582,9 @@ function Vi({
|
|
|
4583
4582
|
formulaConfigEnabled: h
|
|
4584
4583
|
}
|
|
4585
4584
|
) : l()
|
|
4586
|
-
] }) : /* @__PURE__ */
|
|
4585
|
+
] }) : /* @__PURE__ */ E("div", { children: [
|
|
4587
4586
|
/* @__PURE__ */ d(
|
|
4588
|
-
|
|
4587
|
+
ue,
|
|
4589
4588
|
{
|
|
4590
4589
|
label: t.label,
|
|
4591
4590
|
required: t.required,
|
|
@@ -4605,10 +4604,10 @@ const Tn = nt({
|
|
|
4605
4604
|
}
|
|
4606
4605
|
}), Di = Symbol("options-cache");
|
|
4607
4606
|
function ou({ resolvers: t, children: e }) {
|
|
4608
|
-
const n =
|
|
4607
|
+
const n = z(/* @__PURE__ */ new Map()), i = z(/* @__PURE__ */ new Map()), r = k((o, u) => {
|
|
4609
4608
|
const s = n.current.get(o);
|
|
4610
4609
|
s && (u == null ? s.clear() : s.delete(u));
|
|
4611
|
-
}, []), a =
|
|
4610
|
+
}, []), a = oe(
|
|
4612
4611
|
() => ({
|
|
4613
4612
|
resolvers: t ?? {},
|
|
4614
4613
|
invalidate: r,
|
|
@@ -4639,18 +4638,18 @@ function ur(t) {
|
|
|
4639
4638
|
);
|
|
4640
4639
|
}
|
|
4641
4640
|
function su({ source: t, values: e }) {
|
|
4642
|
-
const n = Je(Tn), i = n[Di], r = t == null ? void 0 : t.id, a = r ? n.resolvers[r] : void 0, o =
|
|
4641
|
+
const n = Je(Tn), i = n[Di], r = t == null ? void 0 : t.id, a = r ? n.resolvers[r] : void 0, o = oe(
|
|
4643
4642
|
() => t ? au(t.dependsOn, e, t.params) : {},
|
|
4644
4643
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4645
4644
|
[t, ...Object.values(e ?? {})]
|
|
4646
|
-
), u =
|
|
4645
|
+
), u = oe(() => ur(o), [o]), s = z(null);
|
|
4647
4646
|
q(() => () => {
|
|
4648
4647
|
var p;
|
|
4649
4648
|
return (p = s.current) == null ? void 0 : p.abort();
|
|
4650
4649
|
}, [u]);
|
|
4651
|
-
const l =
|
|
4650
|
+
const l = k(
|
|
4652
4651
|
async (p, m) => {
|
|
4653
|
-
var
|
|
4652
|
+
var G;
|
|
4654
4653
|
if (!r || !a || !i)
|
|
4655
4654
|
return { options: [] };
|
|
4656
4655
|
const b = `${ur(p)}|${m ?? ""}`, h = i.cacheRef.current.get(r) ?? /* @__PURE__ */ new Map();
|
|
@@ -4659,13 +4658,13 @@ function su({ source: t, values: e }) {
|
|
|
4659
4658
|
h.set(u, v);
|
|
4660
4659
|
const A = v.get(b);
|
|
4661
4660
|
if (A) return A;
|
|
4662
|
-
const
|
|
4663
|
-
i.inFlightRef.current.set(r,
|
|
4664
|
-
const I =
|
|
4665
|
-
|
|
4666
|
-
const
|
|
4667
|
-
if (
|
|
4668
|
-
(
|
|
4661
|
+
const x = i.inFlightRef.current.get(r) ?? /* @__PURE__ */ new Map();
|
|
4662
|
+
i.inFlightRef.current.set(r, x);
|
|
4663
|
+
const I = x.get(u) ?? /* @__PURE__ */ new Map();
|
|
4664
|
+
x.set(u, I);
|
|
4665
|
+
const C = I.get(b);
|
|
4666
|
+
if (C) return C;
|
|
4667
|
+
(G = s.current) == null || G.abort();
|
|
4669
4668
|
const y = new AbortController();
|
|
4670
4669
|
s.current = y;
|
|
4671
4670
|
const R = {
|
|
@@ -4673,16 +4672,16 @@ function su({ source: t, values: e }) {
|
|
|
4673
4672
|
input: m,
|
|
4674
4673
|
values: e,
|
|
4675
4674
|
signal: y.signal
|
|
4676
|
-
},
|
|
4675
|
+
}, O = Promise.resolve().then(() => a(o, R)).then((M) => (v.set(b, M), I.delete(b), M)).catch((M) => {
|
|
4677
4676
|
throw I.delete(b), M;
|
|
4678
4677
|
});
|
|
4679
|
-
return I.set(b,
|
|
4678
|
+
return I.set(b, O), O;
|
|
4680
4679
|
},
|
|
4681
4680
|
[a, r, o, u, i, e]
|
|
4682
|
-
), c =
|
|
4681
|
+
), c = k(
|
|
4683
4682
|
async (p) => a ? (await l(void 0, p)).options : [],
|
|
4684
4683
|
[a, l]
|
|
4685
|
-
), f =
|
|
4684
|
+
), f = k(
|
|
4686
4685
|
async (p) => {
|
|
4687
4686
|
if (!a) return [];
|
|
4688
4687
|
if (t != null && t.resolveValueId) {
|
|
@@ -4694,7 +4693,7 @@ function su({ source: t, values: e }) {
|
|
|
4694
4693
|
return m.options.filter((h) => b.includes(String(h.value)));
|
|
4695
4694
|
},
|
|
4696
4695
|
[a, l, t == null ? void 0 : t.resolveValueId, n.resolvers, o, e]
|
|
4697
|
-
), g =
|
|
4696
|
+
), g = k(() => {
|
|
4698
4697
|
r && n.invalidate(r, u);
|
|
4699
4698
|
}, [n, r, u]);
|
|
4700
4699
|
return {
|
|
@@ -4705,44 +4704,44 @@ function su({ source: t, values: e }) {
|
|
|
4705
4704
|
refresh: g
|
|
4706
4705
|
};
|
|
4707
4706
|
}
|
|
4708
|
-
function
|
|
4707
|
+
function Td() {
|
|
4709
4708
|
return Je(Tn);
|
|
4710
4709
|
}
|
|
4711
4710
|
function lu({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, touched: o, formulaConfig: u, onFormulaConfigChange: s }) {
|
|
4712
|
-
var
|
|
4713
|
-
const l = t, c = !!(o && a), f = l.disabled === !0, g = (
|
|
4714
|
-
() => (l.options ?? []).map((
|
|
4715
|
-
...
|
|
4716
|
-
value: g(
|
|
4711
|
+
var B;
|
|
4712
|
+
const l = t, c = !!(o && a), f = l.disabled === !0, g = (F) => l.getOptionValue ? l.getOptionValue(F) : F.value ?? F.id, p = oe(
|
|
4713
|
+
() => (l.options ?? []).map((F) => ({
|
|
4714
|
+
...F,
|
|
4715
|
+
value: g(F)
|
|
4717
4716
|
})),
|
|
4718
4717
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4719
4718
|
[l.options]
|
|
4720
|
-
), m = su({ source: l.optionsSource, values: n }), b = l.loadOptions ?? (m.enabled ? m.loadOptions : void 0), h = l.loadValue ?? (m.enabled ? m.loadValue : void 0), [v, A] = W(0),
|
|
4719
|
+
), m = su({ source: l.optionsSource, values: n }), b = l.loadOptions ?? (m.enabled ? m.loadOptions : void 0), h = l.loadValue ?? (m.enabled ? m.loadValue : void 0), [v, A] = W(0), x = ((B = l.dependsOn) == null ? void 0 : B.map((F) => n[F])) ?? [];
|
|
4721
4720
|
q(() => {
|
|
4722
|
-
var
|
|
4723
|
-
(
|
|
4724
|
-
},
|
|
4725
|
-
m.enabled && A((
|
|
4721
|
+
var F;
|
|
4722
|
+
(F = l.dependsOn) != null && F.length && A((V) => V + 1);
|
|
4723
|
+
}, x), q(() => {
|
|
4724
|
+
m.enabled && A((F) => F + 1);
|
|
4726
4725
|
}, [m.depsKey]);
|
|
4727
|
-
const I = !!b, [
|
|
4726
|
+
const I = !!b, [C, y] = W(null), R = z(!1);
|
|
4728
4727
|
q(() => {
|
|
4729
4728
|
if (!I || R.current || e == null || e === "" || Array.isArray(e) && e.length === 0) return;
|
|
4730
|
-
const
|
|
4731
|
-
R.current = !0, (h ? h(
|
|
4732
|
-
|
|
4729
|
+
const F = Array.isArray(e) ? e : [e];
|
|
4730
|
+
R.current = !0, (h ? h(F) : b("").then((Z) => Z.filter((U) => F.some(($) => String(g(U)) === String($))))).then((Z) => {
|
|
4731
|
+
Z.length !== 0 && y(l.isMulti ? Z : Z[0]);
|
|
4733
4732
|
}).catch(() => {
|
|
4734
4733
|
R.current = !1;
|
|
4735
4734
|
});
|
|
4736
4735
|
}, [I, e]);
|
|
4737
|
-
const
|
|
4736
|
+
const O = oe(() => {
|
|
4738
4737
|
if (e == null || e === "") return l.isMulti ? [] : null;
|
|
4739
|
-
if (I) return
|
|
4738
|
+
if (I) return C;
|
|
4740
4739
|
if (l.isMulti) {
|
|
4741
|
-
const
|
|
4742
|
-
return p.filter((V) =>
|
|
4740
|
+
const F = Array.isArray(e) ? e : [e];
|
|
4741
|
+
return p.filter((V) => F.includes(g(V)));
|
|
4743
4742
|
}
|
|
4744
|
-
return p.find((
|
|
4745
|
-
}, [e, p, l.isMulti, I,
|
|
4743
|
+
return p.find((F) => String(g(F)) === String(e)) ?? null;
|
|
4744
|
+
}, [e, p, l.isMulti, I, C]), G = (F) => (I && y(F), F ? l.isMulti ? i(F.map(g)) : i(g(F)) : i(l.isMulti ? [] : null)), M = {
|
|
4746
4745
|
inputId: l.id ?? l.name,
|
|
4747
4746
|
name: l.id ?? l.name,
|
|
4748
4747
|
placeholder: l.placeholder ?? "Select...",
|
|
@@ -4750,8 +4749,8 @@ function lu({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, t
|
|
|
4750
4749
|
isMulti: l.isMulti ?? !1,
|
|
4751
4750
|
isSearchable: l.isSearchable ?? !0,
|
|
4752
4751
|
isClearable: l.isClearable ?? !1,
|
|
4753
|
-
value:
|
|
4754
|
-
onChange:
|
|
4752
|
+
value: O,
|
|
4753
|
+
onChange: G,
|
|
4755
4754
|
onBlur: r,
|
|
4756
4755
|
styles: Wr(c, l.isMulti),
|
|
4757
4756
|
menuPortalTarget: typeof document < "u" ? document.body : void 0,
|
|
@@ -4760,8 +4759,8 @@ function lu({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, t
|
|
|
4760
4759
|
"data-testid": l.dataTestId ?? `${l.name}-select`,
|
|
4761
4760
|
...l.getOptionLabel ? { getOptionLabel: l.getOptionLabel } : {}
|
|
4762
4761
|
}, N = () => {
|
|
4763
|
-
const
|
|
4764
|
-
return
|
|
4762
|
+
const F = !!b, V = l.isCreatable ?? !1;
|
|
4763
|
+
return F && V ? /* @__PURE__ */ d(
|
|
4765
4764
|
iu,
|
|
4766
4765
|
{
|
|
4767
4766
|
loadOptions: b,
|
|
@@ -4770,7 +4769,7 @@ function lu({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, t
|
|
|
4770
4769
|
...M
|
|
4771
4770
|
},
|
|
4772
4771
|
v
|
|
4773
|
-
) :
|
|
4772
|
+
) : F ? /* @__PURE__ */ d(
|
|
4774
4773
|
Kl,
|
|
4775
4774
|
{
|
|
4776
4775
|
loadOptions: b,
|
|
@@ -4793,7 +4792,7 @@ function lu({ field: t, value: e, values: n, onChange: i, onBlur: r, error: a, t
|
|
|
4793
4792
|
helperText: l.helperText,
|
|
4794
4793
|
formulaConfig: u,
|
|
4795
4794
|
onFormulaConfigChange: s,
|
|
4796
|
-
renderNative: () => /* @__PURE__ */
|
|
4795
|
+
renderNative: () => /* @__PURE__ */ E(Te, { children: [
|
|
4797
4796
|
N(),
|
|
4798
4797
|
c && /* @__PURE__ */ d("small", { "data-testid": `${l.name}-error`, style: pe, children: a })
|
|
4799
4798
|
] })
|
|
@@ -4816,13 +4815,13 @@ const uu = {
|
|
|
4816
4815
|
overflowWrap: "anywhere"
|
|
4817
4816
|
}, du = (t) => {
|
|
4818
4817
|
const { data: e, isSelected: n, isDisabled: i } = t;
|
|
4819
|
-
return /* @__PURE__ */ d(vn.Option, { ...t, children: /* @__PURE__ */
|
|
4818
|
+
return /* @__PURE__ */ d(vn.Option, { ...t, children: /* @__PURE__ */ E(
|
|
4820
4819
|
"div",
|
|
4821
4820
|
{
|
|
4822
4821
|
className: "ff-form-d-flex ff-form-align-start ff-form-justify-between ff-form-w-100",
|
|
4823
4822
|
title: i ? e.disabledReason ?? "Coming soon" : void 0,
|
|
4824
4823
|
children: [
|
|
4825
|
-
/* @__PURE__ */
|
|
4824
|
+
/* @__PURE__ */ E("div", { className: "ff-form-d-flex ff-form-align-start ff-form-gap-2 ff-form-flex-grow-1", style: { minWidth: 0 }, children: [
|
|
4826
4825
|
e.icon && /* @__PURE__ */ d(
|
|
4827
4826
|
"div",
|
|
4828
4827
|
{
|
|
@@ -4835,7 +4834,7 @@ const uu = {
|
|
|
4835
4834
|
children: e.icon
|
|
4836
4835
|
}
|
|
4837
4836
|
),
|
|
4838
|
-
/* @__PURE__ */
|
|
4837
|
+
/* @__PURE__ */ E("div", { className: "ff-form-flex-grow-1", style: { minWidth: 0 }, children: [
|
|
4839
4838
|
/* @__PURE__ */ d(
|
|
4840
4839
|
"div",
|
|
4841
4840
|
{
|
|
@@ -4868,7 +4867,7 @@ const uu = {
|
|
|
4868
4867
|
) });
|
|
4869
4868
|
}, fu = (t) => {
|
|
4870
4869
|
const { data: e } = t;
|
|
4871
|
-
return /* @__PURE__ */ d(vn.SingleValue, { ...t, children: /* @__PURE__ */
|
|
4870
|
+
return /* @__PURE__ */ d(vn.SingleValue, { ...t, children: /* @__PURE__ */ E("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: [
|
|
4872
4871
|
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 }),
|
|
4873
4872
|
/* @__PURE__ */ d(
|
|
4874
4873
|
"span",
|
|
@@ -4958,13 +4957,13 @@ function gu({
|
|
|
4958
4957
|
formulaConfig: o,
|
|
4959
4958
|
onFormulaConfigChange: u
|
|
4960
4959
|
}) {
|
|
4961
|
-
const s = !!(a && r), l = t.isMulti ?? !1, c = t.id ?? t.name ?? "", f =
|
|
4960
|
+
const s = !!(a && r), l = t.isMulti ?? !1, c = t.id ?? t.name ?? "", f = oe(
|
|
4962
4961
|
() => (t.options ?? []).map((v) => ({
|
|
4963
4962
|
...v,
|
|
4964
4963
|
value: v.id ?? v.value
|
|
4965
4964
|
})),
|
|
4966
4965
|
[t.options]
|
|
4967
|
-
), g = Array.isArray(e) ? e : e != null ? [e] : [], p =
|
|
4966
|
+
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = oe(() => new Set(g.map((v) => String(v))), [g]), m = oe(() => l ? f.filter((v) => p.has(String(v.value ?? ""))) : f.find((v) => String(v.value ?? "") === String(e ?? "")) ?? null, [l, f, e, p]), h = /* @__PURE__ */ E(Te, { children: [
|
|
4968
4967
|
/* @__PURE__ */ d(
|
|
4969
4968
|
mn,
|
|
4970
4969
|
{
|
|
@@ -4972,8 +4971,8 @@ function gu({
|
|
|
4972
4971
|
value: m,
|
|
4973
4972
|
onChange: (v) => {
|
|
4974
4973
|
if (l) {
|
|
4975
|
-
const
|
|
4976
|
-
n(
|
|
4974
|
+
const x = v;
|
|
4975
|
+
n(x == null ? [] : x.map((I) => I.value));
|
|
4977
4976
|
return;
|
|
4978
4977
|
}
|
|
4979
4978
|
const A = v;
|
|
@@ -5086,7 +5085,7 @@ function Iu({
|
|
|
5086
5085
|
options: n,
|
|
5087
5086
|
disabled: i
|
|
5088
5087
|
}) {
|
|
5089
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ E(
|
|
5090
5089
|
Nr,
|
|
5091
5090
|
{
|
|
5092
5091
|
size: "small",
|
|
@@ -5112,8 +5111,8 @@ function Pi({
|
|
|
5112
5111
|
}) {
|
|
5113
5112
|
return /* @__PURE__ */ d(D, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: t.map((a) => {
|
|
5114
5113
|
const o = a.id ?? a.name ?? "", u = a.colSpan ?? Math.max(2, Math.floor(12 / t.length)), s = `${Math.round(u / 12 * 100)}%`;
|
|
5115
|
-
return /* @__PURE__ */
|
|
5116
|
-
a.label && /* @__PURE__ */
|
|
5114
|
+
return /* @__PURE__ */ E(D, { sx: { flex: `0 0 calc(${s} - 8px)`, minWidth: 100 }, children: [
|
|
5115
|
+
a.label && /* @__PURE__ */ E(fe, { sx: { fontSize: 11, color: "#64748b", mb: 0.25, fontWeight: 500 }, children: [
|
|
5117
5116
|
a.label,
|
|
5118
5117
|
a.required && /* @__PURE__ */ d("span", { style: { color: "#ef4444" }, children: " *" })
|
|
5119
5118
|
] }),
|
|
@@ -5144,7 +5143,7 @@ function Pi({
|
|
|
5144
5143
|
}
|
|
5145
5144
|
}
|
|
5146
5145
|
)
|
|
5147
|
-
) : a.type === "select" ? /* @__PURE__ */
|
|
5146
|
+
) : a.type === "select" ? /* @__PURE__ */ E(
|
|
5148
5147
|
Nr,
|
|
5149
5148
|
{
|
|
5150
5149
|
size: "small",
|
|
@@ -5182,7 +5181,7 @@ function Li({
|
|
|
5182
5181
|
onRemove: i,
|
|
5183
5182
|
children: r
|
|
5184
5183
|
}) {
|
|
5185
|
-
return /* @__PURE__ */
|
|
5184
|
+
return /* @__PURE__ */ E(D, { sx: {
|
|
5186
5185
|
position: "relative",
|
|
5187
5186
|
// Match the breathing room of the host's "Conditional / Fallback" blocks:
|
|
5188
5187
|
// generous interior padding, comfortable inter-block gap.
|
|
@@ -5200,7 +5199,7 @@ function Li({
|
|
|
5200
5199
|
}, children: [
|
|
5201
5200
|
e && // Pill chip — visually consistent with the host's "Conditional" /
|
|
5202
5201
|
// "Fallback" tags. Sits above the first field with a 12px gap.
|
|
5203
|
-
/* @__PURE__ */
|
|
5202
|
+
/* @__PURE__ */ E(
|
|
5204
5203
|
D,
|
|
5205
5204
|
{
|
|
5206
5205
|
component: "span",
|
|
@@ -5266,14 +5265,14 @@ function yu({
|
|
|
5266
5265
|
q(() => {
|
|
5267
5266
|
b.length !== i.length && h((I) => i.length > I.length ? [...I, ...Array.from({ length: i.length - I.length }, () => we())] : I.slice(0, i.length));
|
|
5268
5267
|
}, [i.length]);
|
|
5269
|
-
const v =
|
|
5268
|
+
const v = k(() => {
|
|
5270
5269
|
i.length >= m || (u(e, [...i, Mi(n)]), h((I) => [...I, we()]));
|
|
5271
|
-
}, [i, m, u, e, n]), A =
|
|
5272
|
-
i.length <= p || (u(e, i.filter((
|
|
5273
|
-
}, [i, p, u, e]),
|
|
5274
|
-
return /* @__PURE__ */
|
|
5270
|
+
}, [i, m, u, e, n]), A = k((I) => {
|
|
5271
|
+
i.length <= p || (u(e, i.filter((C, y) => y !== I)), h((C) => C.filter((y, R) => R !== I)));
|
|
5272
|
+
}, [i, p, u, e]), x = t;
|
|
5273
|
+
return /* @__PURE__ */ E(D, { children: [
|
|
5275
5274
|
/* @__PURE__ */ d(
|
|
5276
|
-
|
|
5275
|
+
ue,
|
|
5277
5276
|
{
|
|
5278
5277
|
label: t.label,
|
|
5279
5278
|
required: t.required,
|
|
@@ -5292,18 +5291,18 @@ function yu({
|
|
|
5292
5291
|
color: "#94a3b8",
|
|
5293
5292
|
fontSize: 13
|
|
5294
5293
|
}, children: "No items yet — click Add to start" }),
|
|
5295
|
-
i.map((I,
|
|
5294
|
+
i.map((I, C) => /* @__PURE__ */ d(
|
|
5296
5295
|
Li,
|
|
5297
5296
|
{
|
|
5298
|
-
index:
|
|
5299
|
-
itemLabel:
|
|
5297
|
+
index: C,
|
|
5298
|
+
itemLabel: x.itemLabel,
|
|
5300
5299
|
canRemove: i.length > p && !g,
|
|
5301
|
-
onRemove: () => A(
|
|
5300
|
+
onRemove: () => A(C),
|
|
5302
5301
|
children: /* @__PURE__ */ d(D, { children: n.map((y) => {
|
|
5303
|
-
const R = y.id ?? y.name ?? "",
|
|
5302
|
+
const R = y.id ?? y.name ?? "", O = `${e}.${C}.${R}`;
|
|
5304
5303
|
return f({
|
|
5305
5304
|
field: y,
|
|
5306
|
-
pathPrefix:
|
|
5305
|
+
pathPrefix: O,
|
|
5307
5306
|
depth: l + 1,
|
|
5308
5307
|
values: r,
|
|
5309
5308
|
errors: a,
|
|
@@ -5322,10 +5321,10 @@ function yu({
|
|
|
5322
5321
|
});
|
|
5323
5322
|
}) })
|
|
5324
5323
|
},
|
|
5325
|
-
b[
|
|
5324
|
+
b[C] ?? C
|
|
5326
5325
|
)),
|
|
5327
5326
|
i.length > 0 && /* @__PURE__ */ d(hn, { sx: { mb: 1, borderColor: "transparent" } }),
|
|
5328
|
-
i.length < m && /* @__PURE__ */
|
|
5327
|
+
i.length < m && /* @__PURE__ */ E(
|
|
5329
5328
|
D,
|
|
5330
5329
|
{
|
|
5331
5330
|
component: "button",
|
|
@@ -5349,7 +5348,7 @@ function yu({
|
|
|
5349
5348
|
},
|
|
5350
5349
|
children: [
|
|
5351
5350
|
/* @__PURE__ */ d(tt, { size: 14 }),
|
|
5352
|
-
|
|
5351
|
+
x.addLabel ?? `Add ${x.itemLabel ?? "item"}`
|
|
5353
5352
|
]
|
|
5354
5353
|
}
|
|
5355
5354
|
)
|
|
@@ -5393,28 +5392,28 @@ function Pt(t) {
|
|
|
5393
5392
|
maxItems: v
|
|
5394
5393
|
}
|
|
5395
5394
|
);
|
|
5396
|
-
const [I,
|
|
5395
|
+
const [I, C] = W(() => jt(ut(n))), y = z(JSON.stringify($t(I)));
|
|
5397
5396
|
q(() => {
|
|
5398
5397
|
if (JSON.stringify(ut(n)) !== y.current) {
|
|
5399
5398
|
const L = jt(ut(n));
|
|
5400
|
-
|
|
5399
|
+
C(L), y.current = JSON.stringify($t(L));
|
|
5401
5400
|
}
|
|
5402
5401
|
}, [n]);
|
|
5403
|
-
const R =
|
|
5402
|
+
const R = k((N) => {
|
|
5404
5403
|
const L = jt(N);
|
|
5405
|
-
|
|
5406
|
-
const
|
|
5407
|
-
y.current = JSON.stringify(
|
|
5408
|
-
}, [i]),
|
|
5404
|
+
C(L);
|
|
5405
|
+
const B = $t(L);
|
|
5406
|
+
y.current = JSON.stringify(B), i(B);
|
|
5407
|
+
}, [i]), O = k(() => {
|
|
5409
5408
|
I.length >= v || R([...I, hu(b, p.itemFields)]);
|
|
5410
|
-
}, [I, b, p.itemFields, v, R]),
|
|
5409
|
+
}, [I, b, p.itemFields, v, R]), G = k((N) => {
|
|
5411
5410
|
I.length <= h || R(I.filter((L) => Ut(L) !== N));
|
|
5412
|
-
}, [I, h, R]), M =
|
|
5413
|
-
R(I.map((
|
|
5411
|
+
}, [I, h, R]), M = k((N, L) => {
|
|
5412
|
+
R(I.map((B) => Ut(B) !== N ? B : L !== null && typeof L == "object" && !Array.isArray(L) ? { ...L, [Re]: N } : { [Re]: N, __value: L }));
|
|
5414
5413
|
}, [I, R]);
|
|
5415
|
-
return /* @__PURE__ */
|
|
5414
|
+
return /* @__PURE__ */ E(D, { children: [
|
|
5416
5415
|
/* @__PURE__ */ d(
|
|
5417
|
-
|
|
5416
|
+
ue,
|
|
5418
5417
|
{
|
|
5419
5418
|
label: e.label,
|
|
5420
5419
|
required: e.required,
|
|
@@ -5434,27 +5433,27 @@ function Pt(t) {
|
|
|
5434
5433
|
fontSize: 13
|
|
5435
5434
|
}, children: "No items yet — click Add to start" }),
|
|
5436
5435
|
I.map((N, L) => {
|
|
5437
|
-
const
|
|
5436
|
+
const B = Ut(N), F = mu(N);
|
|
5438
5437
|
return /* @__PURE__ */ d(
|
|
5439
5438
|
Li,
|
|
5440
5439
|
{
|
|
5441
5440
|
index: L,
|
|
5442
5441
|
itemLabel: p.itemLabel,
|
|
5443
5442
|
canRemove: I.length > h && !m,
|
|
5444
|
-
onRemove: () => B
|
|
5443
|
+
onRemove: () => G(B),
|
|
5445
5444
|
children: b === "object" && p.itemFields ? /* @__PURE__ */ d(
|
|
5446
5445
|
Pi,
|
|
5447
5446
|
{
|
|
5448
5447
|
fields: p.itemFields,
|
|
5449
|
-
value:
|
|
5450
|
-
onChange: (V) => M(
|
|
5448
|
+
value: F ?? {},
|
|
5449
|
+
onChange: (V) => M(B, V),
|
|
5451
5450
|
disabled: m
|
|
5452
5451
|
}
|
|
5453
5452
|
) : b === "select" ? /* @__PURE__ */ d(
|
|
5454
5453
|
Iu,
|
|
5455
5454
|
{
|
|
5456
|
-
value:
|
|
5457
|
-
onChange: (V) => M(
|
|
5455
|
+
value: F,
|
|
5456
|
+
onChange: (V) => M(B, V),
|
|
5458
5457
|
options: p.itemOptions ?? [],
|
|
5459
5458
|
disabled: m
|
|
5460
5459
|
}
|
|
@@ -5463,37 +5462,37 @@ function Pt(t) {
|
|
|
5463
5462
|
{
|
|
5464
5463
|
field: {
|
|
5465
5464
|
...p.itemSchema,
|
|
5466
|
-
id: `${e.id}-${
|
|
5465
|
+
id: `${e.id}-${B}`,
|
|
5467
5466
|
type: "array",
|
|
5468
5467
|
label: void 0
|
|
5469
5468
|
},
|
|
5470
|
-
value:
|
|
5469
|
+
value: F,
|
|
5471
5470
|
values: {},
|
|
5472
|
-
onChange: (V) => M(
|
|
5471
|
+
onChange: (V) => M(B, V),
|
|
5473
5472
|
onBlur: () => {
|
|
5474
5473
|
}
|
|
5475
5474
|
}
|
|
5476
5475
|
) : /* @__PURE__ */ d(
|
|
5477
5476
|
vu,
|
|
5478
5477
|
{
|
|
5479
|
-
value:
|
|
5480
|
-
onChange: (V) => M(
|
|
5478
|
+
value: F,
|
|
5479
|
+
onChange: (V) => M(B, b === "number" ? V === "" ? "" : Number(V) : V),
|
|
5481
5480
|
inputType: b,
|
|
5482
5481
|
placeholder: p.itemPlaceholder,
|
|
5483
5482
|
disabled: m
|
|
5484
5483
|
}
|
|
5485
5484
|
)
|
|
5486
5485
|
},
|
|
5487
|
-
|
|
5486
|
+
B
|
|
5488
5487
|
);
|
|
5489
5488
|
}),
|
|
5490
5489
|
I.length > 0 && /* @__PURE__ */ d(hn, { sx: { mb: 1, borderColor: "transparent" } }),
|
|
5491
|
-
I.length < v && /* @__PURE__ */
|
|
5490
|
+
I.length < v && /* @__PURE__ */ E(
|
|
5492
5491
|
D,
|
|
5493
5492
|
{
|
|
5494
5493
|
component: "button",
|
|
5495
5494
|
type: "button",
|
|
5496
|
-
onClick:
|
|
5495
|
+
onClick: O,
|
|
5497
5496
|
disabled: m,
|
|
5498
5497
|
sx: {
|
|
5499
5498
|
display: "inline-flex",
|
|
@@ -5523,7 +5522,7 @@ function xu(t) {
|
|
|
5523
5522
|
}
|
|
5524
5523
|
function Ke({ field: t, children: e, compact: n }) {
|
|
5525
5524
|
const i = typeof t.colSpan == "number" ? t.colSpan : 12;
|
|
5526
|
-
return /* @__PURE__ */
|
|
5525
|
+
return /* @__PURE__ */ E(Te, { children: [
|
|
5527
5526
|
/* @__PURE__ */ d(
|
|
5528
5527
|
"div",
|
|
5529
5528
|
{
|
|
@@ -5566,15 +5565,15 @@ function Cu({
|
|
|
5566
5565
|
) }) : null;
|
|
5567
5566
|
}
|
|
5568
5567
|
function Au({ field: t, value: e, onChange: n, onBlur: i }) {
|
|
5569
|
-
const r = t.children ?? [], a = e ?? {}, o = cr(r, a), u =
|
|
5568
|
+
const r = t.children ?? [], a = e ?? {}, o = cr(r, a), u = z(a);
|
|
5570
5569
|
u.current = a;
|
|
5571
5570
|
function s(l, c) {
|
|
5572
5571
|
const g = { ...cr(r, u.current), [l]: c };
|
|
5573
5572
|
u.current = g, n(g);
|
|
5574
5573
|
}
|
|
5575
|
-
return /* @__PURE__ */
|
|
5574
|
+
return /* @__PURE__ */ E(D, { children: [
|
|
5576
5575
|
/* @__PURE__ */ d(
|
|
5577
|
-
|
|
5576
|
+
ue,
|
|
5578
5577
|
{
|
|
5579
5578
|
label: t.label,
|
|
5580
5579
|
required: t.required,
|
|
@@ -5621,7 +5620,7 @@ function Ru({
|
|
|
5621
5620
|
}) {
|
|
5622
5621
|
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(
|
|
5623
5622
|
() => e == null || e === "" ? "" : String(e)
|
|
5624
|
-
), g =
|
|
5623
|
+
), g = z(e);
|
|
5625
5624
|
q(() => {
|
|
5626
5625
|
e !== g.current && (g.current = e, f(e == null || e === "" ? "" : String(e)));
|
|
5627
5626
|
}, [e]);
|
|
@@ -5658,14 +5657,14 @@ function Ru({
|
|
|
5658
5657
|
flexShrink: 0,
|
|
5659
5658
|
borderLeft: m ? "1px solid rgba(0,0,0,0.1)" : void 0,
|
|
5660
5659
|
borderRight: p ? "1px solid rgba(0,0,0,0.1)" : void 0
|
|
5661
|
-
},
|
|
5662
|
-
|
|
5663
|
-
}, I = (
|
|
5664
|
-
|
|
5660
|
+
}, x = (C) => {
|
|
5661
|
+
C.currentTarget.style.borderColor = s ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR_FOCUS, C.currentTarget.style.boxShadow = s ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW;
|
|
5662
|
+
}, I = (C) => {
|
|
5663
|
+
C.currentTarget.contains(C.relatedTarget) || (C.currentTarget.style.borderColor = s ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR, C.currentTarget.style.boxShadow = "none", i());
|
|
5665
5664
|
};
|
|
5666
|
-
return /* @__PURE__ */
|
|
5665
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
5667
5666
|
/* @__PURE__ */ d(
|
|
5668
|
-
|
|
5667
|
+
ue,
|
|
5669
5668
|
{
|
|
5670
5669
|
label: o.label,
|
|
5671
5670
|
required: o.required,
|
|
@@ -5676,11 +5675,11 @@ function Ru({
|
|
|
5676
5675
|
}
|
|
5677
5676
|
),
|
|
5678
5677
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
5679
|
-
/* @__PURE__ */
|
|
5678
|
+
/* @__PURE__ */ E(
|
|
5680
5679
|
"div",
|
|
5681
5680
|
{
|
|
5682
5681
|
style: b ? v : void 0,
|
|
5683
|
-
onFocus: b ?
|
|
5682
|
+
onFocus: b ? x : void 0,
|
|
5684
5683
|
onBlur: b ? I : void 0,
|
|
5685
5684
|
children: [
|
|
5686
5685
|
p && /* @__PURE__ */ d("span", { style: A, children: o.prefix }),
|
|
@@ -5704,17 +5703,17 @@ function Ru({
|
|
|
5704
5703
|
borderRadius: S.BORDER_RADIUS,
|
|
5705
5704
|
backgroundColor: l ? S.COLOR_DISABLED_BG : "#fff"
|
|
5706
5705
|
},
|
|
5707
|
-
onChange: (
|
|
5708
|
-
const y =
|
|
5706
|
+
onChange: (C) => {
|
|
5707
|
+
const y = C.target.value;
|
|
5709
5708
|
f(y);
|
|
5710
5709
|
const R = y === "" ? null : Number(y);
|
|
5711
5710
|
g.current = R, n(R);
|
|
5712
5711
|
},
|
|
5713
|
-
onFocus: b ? void 0 : (
|
|
5714
|
-
|
|
5712
|
+
onFocus: b ? void 0 : (C) => {
|
|
5713
|
+
C.currentTarget.style.borderColor = s ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR_FOCUS, C.currentTarget.style.boxShadow = s ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW;
|
|
5715
5714
|
},
|
|
5716
|
-
onBlurCapture: b ? void 0 : (
|
|
5717
|
-
|
|
5715
|
+
onBlurCapture: b ? void 0 : (C) => {
|
|
5716
|
+
C.currentTarget.style.borderColor = s ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR, C.currentTarget.style.boxShadow = "none", i();
|
|
5718
5717
|
}
|
|
5719
5718
|
}
|
|
5720
5719
|
),
|
|
@@ -5759,7 +5758,7 @@ function Su({
|
|
|
5759
5758
|
sx: { m: 0 }
|
|
5760
5759
|
}
|
|
5761
5760
|
);
|
|
5762
|
-
return /* @__PURE__ */
|
|
5761
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
5763
5762
|
f,
|
|
5764
5763
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
5765
5764
|
s && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: pe, children: r })
|
|
@@ -5774,9 +5773,9 @@ function Eu({
|
|
|
5774
5773
|
touched: a
|
|
5775
5774
|
}) {
|
|
5776
5775
|
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = e != null ? String(e) : "";
|
|
5777
|
-
return /* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
5778
5777
|
/* @__PURE__ */ d(
|
|
5779
|
-
|
|
5778
|
+
ue,
|
|
5780
5779
|
{
|
|
5781
5780
|
label: o.label,
|
|
5782
5781
|
required: o.required,
|
|
@@ -5830,7 +5829,7 @@ function Gn({
|
|
|
5830
5829
|
error: r,
|
|
5831
5830
|
touched: a
|
|
5832
5831
|
}) {
|
|
5833
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.inputType === "datetime" ? "datetime-local" : o.inputType === "time" ? "time" : "date", [f, g] = W(() => String(e ?? "")), p =
|
|
5832
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.inputType === "datetime" ? "datetime-local" : o.inputType === "time" ? "time" : "date", [f, g] = W(() => String(e ?? "")), p = z(e);
|
|
5834
5833
|
q(() => {
|
|
5835
5834
|
e !== p.current && (p.current = e, g(String(e ?? "")));
|
|
5836
5835
|
}, [e]);
|
|
@@ -5847,9 +5846,9 @@ function Gn({
|
|
|
5847
5846
|
lineHeight: 1.5,
|
|
5848
5847
|
cursor: l ? "not-allowed" : void 0
|
|
5849
5848
|
};
|
|
5850
|
-
return /* @__PURE__ */
|
|
5849
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
5851
5850
|
/* @__PURE__ */ d(
|
|
5852
|
-
|
|
5851
|
+
ue,
|
|
5853
5852
|
{
|
|
5854
5853
|
label: o.label,
|
|
5855
5854
|
required: o.required,
|
|
@@ -5896,15 +5895,15 @@ function Ou({
|
|
|
5896
5895
|
error: r,
|
|
5897
5896
|
touched: a
|
|
5898
5897
|
}) {
|
|
5899
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = W(""), [p, m] = W(!1), b =
|
|
5900
|
-
const
|
|
5901
|
-
!
|
|
5898
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = W(""), [p, m] = W(!1), b = z(null), h = (I) => {
|
|
5899
|
+
const C = I.trim();
|
|
5900
|
+
!C || c.includes(C) || o.maxTags && c.length >= o.maxTags || (n([...c, C]), g(""));
|
|
5902
5901
|
}, v = (I) => {
|
|
5903
|
-
n(c.filter((
|
|
5904
|
-
}, A = s ? S.BORDER_COLOR_ERROR : p ? S.BORDER_COLOR_FOCUS : S.BORDER_COLOR,
|
|
5905
|
-
return /* @__PURE__ */
|
|
5902
|
+
n(c.filter((C, y) => y !== I));
|
|
5903
|
+
}, A = s ? S.BORDER_COLOR_ERROR : p ? S.BORDER_COLOR_FOCUS : S.BORDER_COLOR, x = p ? s ? S.FOCUS_SHADOW_ERROR : S.FOCUS_SHADOW : "none";
|
|
5904
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
5906
5905
|
/* @__PURE__ */ d(
|
|
5907
|
-
|
|
5906
|
+
ue,
|
|
5908
5907
|
{
|
|
5909
5908
|
label: o.label,
|
|
5910
5909
|
required: o.required,
|
|
@@ -5915,7 +5914,7 @@ function Ou({
|
|
|
5915
5914
|
}
|
|
5916
5915
|
),
|
|
5917
5916
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
5918
|
-
/* @__PURE__ */
|
|
5917
|
+
/* @__PURE__ */ E(
|
|
5919
5918
|
"div",
|
|
5920
5919
|
{
|
|
5921
5920
|
onClick: () => {
|
|
@@ -5932,13 +5931,13 @@ function Ou({
|
|
|
5932
5931
|
border: `1px solid ${A}`,
|
|
5933
5932
|
borderRadius: S.BORDER_RADIUS,
|
|
5934
5933
|
backgroundColor: l ? S.COLOR_DISABLED_BG : "#fff",
|
|
5935
|
-
boxShadow:
|
|
5934
|
+
boxShadow: x,
|
|
5936
5935
|
boxSizing: "border-box",
|
|
5937
5936
|
cursor: l ? "not-allowed" : "text",
|
|
5938
5937
|
transition: "border-color .15s, box-shadow .15s"
|
|
5939
5938
|
},
|
|
5940
5939
|
children: [
|
|
5941
|
-
c.map((I,
|
|
5940
|
+
c.map((I, C) => /* @__PURE__ */ E(
|
|
5942
5941
|
"span",
|
|
5943
5942
|
{
|
|
5944
5943
|
style: {
|
|
@@ -5961,7 +5960,7 @@ function Ou({
|
|
|
5961
5960
|
{
|
|
5962
5961
|
type: "button",
|
|
5963
5962
|
onClick: (y) => {
|
|
5964
|
-
y.stopPropagation(), v(
|
|
5963
|
+
y.stopPropagation(), v(C);
|
|
5965
5964
|
},
|
|
5966
5965
|
style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", color: "#7c3aed" },
|
|
5967
5966
|
children: /* @__PURE__ */ d(Ge, { size: 12 })
|
|
@@ -6017,12 +6016,12 @@ function Fu({
|
|
|
6017
6016
|
}) {
|
|
6018
6017
|
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = o.min ?? 0, f = o.max ?? 100, g = o.step ?? 1, [p, m] = W(
|
|
6019
6018
|
() => typeof e == "number" ? e : c
|
|
6020
|
-
), b =
|
|
6019
|
+
), b = z(e);
|
|
6021
6020
|
return q(() => {
|
|
6022
6021
|
e !== b.current && (b.current = e, m(typeof e == "number" ? e : c));
|
|
6023
|
-
}, [e, c]), /* @__PURE__ */
|
|
6022
|
+
}, [e, c]), /* @__PURE__ */ E("div", { children: [
|
|
6024
6023
|
/* @__PURE__ */ d(
|
|
6025
|
-
|
|
6024
|
+
ue,
|
|
6026
6025
|
{
|
|
6027
6026
|
label: o.label,
|
|
6028
6027
|
required: o.required,
|
|
@@ -6033,7 +6032,7 @@ function Fu({
|
|
|
6033
6032
|
}
|
|
6034
6033
|
),
|
|
6035
6034
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
6036
|
-
/* @__PURE__ */
|
|
6035
|
+
/* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 12, px: 1 }, children: [
|
|
6037
6036
|
/* @__PURE__ */ d(
|
|
6038
6037
|
Do,
|
|
6039
6038
|
{
|
|
@@ -6075,16 +6074,16 @@ function wu({
|
|
|
6075
6074
|
error: r,
|
|
6076
6075
|
touched: a
|
|
6077
6076
|
}) {
|
|
6078
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "#6366f1")), g =
|
|
6077
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "#6366f1")), g = z(e);
|
|
6079
6078
|
q(() => {
|
|
6080
6079
|
e !== g.current && (g.current = e, f(String(e ?? "#6366f1")));
|
|
6081
6080
|
}, [e]);
|
|
6082
6081
|
const p = (m) => {
|
|
6083
6082
|
f(m), g.current = m, n(m);
|
|
6084
6083
|
};
|
|
6085
|
-
return /* @__PURE__ */
|
|
6084
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
6086
6085
|
/* @__PURE__ */ d(
|
|
6087
|
-
|
|
6086
|
+
ue,
|
|
6088
6087
|
{
|
|
6089
6088
|
label: o.label,
|
|
6090
6089
|
required: o.required,
|
|
@@ -6095,8 +6094,8 @@ function wu({
|
|
|
6095
6094
|
}
|
|
6096
6095
|
),
|
|
6097
6096
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
6098
|
-
/* @__PURE__ */
|
|
6099
|
-
/* @__PURE__ */
|
|
6097
|
+
/* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
6098
|
+
/* @__PURE__ */ E(
|
|
6100
6099
|
"div",
|
|
6101
6100
|
{
|
|
6102
6101
|
style: {
|
|
@@ -6181,23 +6180,23 @@ function Gu({
|
|
|
6181
6180
|
error: r,
|
|
6182
6181
|
touched: a
|
|
6183
6182
|
}) {
|
|
6184
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c =
|
|
6185
|
-
if (!
|
|
6186
|
-
const I = Array.from(
|
|
6183
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = z(null), [f, g] = W(!1), [p, m] = W(null), b = e instanceof File ? [e] : Array.isArray(e) ? e : [], h = (x) => {
|
|
6184
|
+
if (!x) return;
|
|
6185
|
+
const I = Array.from(x);
|
|
6187
6186
|
if (o.maxSizeMb) {
|
|
6188
|
-
const
|
|
6189
|
-
if (
|
|
6190
|
-
m(`"${
|
|
6187
|
+
const C = I.find((y) => y.size > o.maxSizeMb * 1024 * 1024);
|
|
6188
|
+
if (C) {
|
|
6189
|
+
m(`"${C.name}" exceeds ${o.maxSizeMb} MB`);
|
|
6191
6190
|
return;
|
|
6192
6191
|
}
|
|
6193
6192
|
}
|
|
6194
6193
|
m(null), n(o.multiple ? I : I[0] ?? null);
|
|
6195
|
-
}, v = (
|
|
6196
|
-
o.multiple ? n(b.filter((I,
|
|
6194
|
+
}, v = (x) => {
|
|
6195
|
+
o.multiple ? n(b.filter((I, C) => C !== x)) : n(null), c.current && (c.current.value = "");
|
|
6197
6196
|
}, A = s || p ? S.BORDER_COLOR_ERROR : f ? S.BORDER_COLOR_FOCUS : S.BORDER_COLOR;
|
|
6198
|
-
return /* @__PURE__ */
|
|
6197
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
6199
6198
|
/* @__PURE__ */ d(
|
|
6200
|
-
|
|
6199
|
+
ue,
|
|
6201
6200
|
{
|
|
6202
6201
|
label: o.label,
|
|
6203
6202
|
required: o.required,
|
|
@@ -6208,19 +6207,19 @@ function Gu({
|
|
|
6208
6207
|
}
|
|
6209
6208
|
),
|
|
6210
6209
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ce, children: o.helperText }),
|
|
6211
|
-
/* @__PURE__ */
|
|
6210
|
+
/* @__PURE__ */ E(
|
|
6212
6211
|
"div",
|
|
6213
6212
|
{
|
|
6214
6213
|
onClick: () => {
|
|
6215
|
-
var
|
|
6216
|
-
return !l && ((
|
|
6214
|
+
var x;
|
|
6215
|
+
return !l && ((x = c.current) == null ? void 0 : x.click());
|
|
6217
6216
|
},
|
|
6218
|
-
onDragOver: (
|
|
6219
|
-
|
|
6217
|
+
onDragOver: (x) => {
|
|
6218
|
+
x.preventDefault(), l || g(!0);
|
|
6220
6219
|
},
|
|
6221
6220
|
onDragLeave: () => g(!1),
|
|
6222
|
-
onDrop: (
|
|
6223
|
-
|
|
6221
|
+
onDrop: (x) => {
|
|
6222
|
+
x.preventDefault(), g(!1), l || h(x.dataTransfer.files);
|
|
6224
6223
|
},
|
|
6225
6224
|
style: {
|
|
6226
6225
|
border: `1px dashed ${A}`,
|
|
@@ -6243,15 +6242,15 @@ function Gu({
|
|
|
6243
6242
|
disabled: l,
|
|
6244
6243
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6245
6244
|
style: { display: "none" },
|
|
6246
|
-
onChange: (
|
|
6247
|
-
h(
|
|
6245
|
+
onChange: (x) => {
|
|
6246
|
+
h(x.target.files), i();
|
|
6248
6247
|
}
|
|
6249
6248
|
}
|
|
6250
6249
|
),
|
|
6251
6250
|
/* @__PURE__ */ d(So, { size: 24, color: l ? "#9ca3af" : "#6366f1", style: { marginBottom: 4 } }),
|
|
6252
6251
|
/* @__PURE__ */ d("div", { style: { fontSize: 13, color: l ? "#9ca3af" : "#374151", fontWeight: 500 }, children: f ? "Drop file here" : "Click or drag file to upload" }),
|
|
6253
6252
|
o.accept && /* @__PURE__ */ d("div", { style: { fontSize: 11, color: "#6b7280", marginTop: 2 }, children: o.accept }),
|
|
6254
|
-
o.maxSizeMb && /* @__PURE__ */
|
|
6253
|
+
o.maxSizeMb && /* @__PURE__ */ E("div", { style: { fontSize: 11, color: "#6b7280" }, children: [
|
|
6255
6254
|
"Max ",
|
|
6256
6255
|
o.maxSizeMb,
|
|
6257
6256
|
" MB"
|
|
@@ -6259,18 +6258,18 @@ function Gu({
|
|
|
6259
6258
|
]
|
|
6260
6259
|
}
|
|
6261
6260
|
),
|
|
6262
|
-
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((
|
|
6261
|
+
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((x, I) => /* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 10px", border: "1px solid #e5e7eb", borderRadius: 4, backgroundColor: "#f9fafb" }, children: [
|
|
6263
6262
|
/* @__PURE__ */ d(Eo, { size: 16, color: "#6366f1" }),
|
|
6264
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children:
|
|
6265
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Tu(
|
|
6266
|
-
!l && /* @__PURE__ */ d("button", { type: "button", onClick: (
|
|
6267
|
-
|
|
6263
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: x.name }),
|
|
6264
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Tu(x.size) }),
|
|
6265
|
+
!l && /* @__PURE__ */ d("button", { type: "button", onClick: (C) => {
|
|
6266
|
+
C.stopPropagation(), v(I);
|
|
6268
6267
|
}, style: { background: "none", border: "none", cursor: "pointer", color: "#9ca3af", display: "flex", padding: 0 }, children: /* @__PURE__ */ d(Ge, { size: 14 }) })
|
|
6269
|
-
] }, `${
|
|
6268
|
+
] }, `${x.name}-${x.size}-${x.lastModified}`)) }),
|
|
6270
6269
|
(s || p) && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: pe, children: p ?? r })
|
|
6271
6270
|
] });
|
|
6272
6271
|
}
|
|
6273
|
-
const Bu = et.lazy(async () => ({ default: (await import("./index-
|
|
6272
|
+
const Bu = et.lazy(async () => ({ default: (await import("./index-BbYsmgpo.js")).default }));
|
|
6274
6273
|
async function Vu(t) {
|
|
6275
6274
|
switch (t) {
|
|
6276
6275
|
case "python":
|
|
@@ -6304,7 +6303,7 @@ function Wi({
|
|
|
6304
6303
|
p = !1;
|
|
6305
6304
|
};
|
|
6306
6305
|
}, [t]);
|
|
6307
|
-
const g =
|
|
6306
|
+
const g = oe(() => /* @__PURE__ */ d("div", { style: { minHeight: l ?? i, padding: 8, color: "#9ca3af", fontSize: 12 }, children: "Loading editor…" }), [l, i]);
|
|
6308
6307
|
return c ? /* @__PURE__ */ d(Gr, { fallback: g, children: /* @__PURE__ */ d(
|
|
6309
6308
|
Bu,
|
|
6310
6309
|
{
|
|
@@ -6329,29 +6328,29 @@ function Du({
|
|
|
6329
6328
|
error: r,
|
|
6330
6329
|
touched: a
|
|
6331
6330
|
}) {
|
|
6332
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(null), [g, p] = W(() => typeof e == "string" ? e : e != null ? JSON.stringify(e, null, 2) : ""), m =
|
|
6331
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(null), [g, p] = W(() => typeof e == "string" ? e : e != null ? JSON.stringify(e, null, 2) : ""), m = z(e);
|
|
6333
6332
|
q(() => {
|
|
6334
6333
|
e !== m.current && (m.current = e, typeof e == "string" ? p(e) : e != null ? p(JSON.stringify(e, null, 2)) : p(""));
|
|
6335
6334
|
}, [e]);
|
|
6336
|
-
const b = (
|
|
6337
|
-
p(
|
|
6335
|
+
const b = (C) => {
|
|
6336
|
+
p(C);
|
|
6338
6337
|
try {
|
|
6339
|
-
|
|
6338
|
+
C.trim() && JSON.parse(C), f(null);
|
|
6340
6339
|
} catch (y) {
|
|
6341
6340
|
f(y.message);
|
|
6342
6341
|
}
|
|
6343
|
-
m.current =
|
|
6342
|
+
m.current = C, n(C);
|
|
6344
6343
|
}, h = () => {
|
|
6345
6344
|
try {
|
|
6346
|
-
const
|
|
6347
|
-
p(
|
|
6345
|
+
const C = JSON.stringify(JSON.parse(g), null, 2);
|
|
6346
|
+
p(C), f(null), m.current = C, n(C);
|
|
6348
6347
|
} catch {
|
|
6349
6348
|
}
|
|
6350
|
-
}, v = o.rows ?? 8, A = `${v * 22}px`,
|
|
6351
|
-
return /* @__PURE__ */
|
|
6352
|
-
/* @__PURE__ */
|
|
6349
|
+
}, v = o.rows ?? 8, A = `${v * 22}px`, x = `${v * 22}px`, I = s || c ? S.BORDER_COLOR_ERROR : S.BORDER_COLOR;
|
|
6350
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
6351
|
+
/* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6353
6352
|
/* @__PURE__ */ d(
|
|
6354
|
-
|
|
6353
|
+
ue,
|
|
6355
6354
|
{
|
|
6356
6355
|
label: o.label,
|
|
6357
6356
|
required: o.required,
|
|
@@ -6390,7 +6389,7 @@ function Du({
|
|
|
6390
6389
|
value: g,
|
|
6391
6390
|
readOnly: l || o.readOnly,
|
|
6392
6391
|
minHeight: A,
|
|
6393
|
-
maxHeight:
|
|
6392
|
+
maxHeight: x,
|
|
6394
6393
|
basicSetup: { lineNumbers: !0, foldGutter: !0 },
|
|
6395
6394
|
onChange: b,
|
|
6396
6395
|
onBlur: i,
|
|
@@ -6416,17 +6415,17 @@ function Pu({
|
|
|
6416
6415
|
error: r,
|
|
6417
6416
|
touched: a
|
|
6418
6417
|
}) {
|
|
6419
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "")), g =
|
|
6418
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "")), g = z(e);
|
|
6420
6419
|
q(() => {
|
|
6421
6420
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6422
6421
|
}, [e]);
|
|
6423
6422
|
const p = (A) => {
|
|
6424
6423
|
f(A), g.current = A, n(A);
|
|
6425
6424
|
}, m = o.rows ?? 8, b = `${m * 22}px`, h = `${m * 22}px`, v = Nu[o.language ?? "javascript"] ?? "CODE";
|
|
6426
|
-
return /* @__PURE__ */
|
|
6427
|
-
/* @__PURE__ */
|
|
6425
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
6426
|
+
/* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6428
6427
|
/* @__PURE__ */ d(
|
|
6429
|
-
|
|
6428
|
+
ue,
|
|
6430
6429
|
{
|
|
6431
6430
|
label: o.label,
|
|
6432
6431
|
required: o.required,
|
|
@@ -6479,7 +6478,7 @@ function Pu({
|
|
|
6479
6478
|
] });
|
|
6480
6479
|
}
|
|
6481
6480
|
const Lu = et.lazy(
|
|
6482
|
-
() => import("./index-
|
|
6481
|
+
() => import("./index-BsgdZXaY.js").then((t) => t.i).then((t) => (Promise.resolve({ }), { default: t.default }))
|
|
6483
6482
|
), Mu = [
|
|
6484
6483
|
[{ header: [1, 2, 3, !1] }],
|
|
6485
6484
|
["bold", "italic", "underline", "strike"],
|
|
@@ -6495,16 +6494,16 @@ function Wu({
|
|
|
6495
6494
|
error: r,
|
|
6496
6495
|
touched: a
|
|
6497
6496
|
}) {
|
|
6498
|
-
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "")), g =
|
|
6497
|
+
const o = t, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, [c, f] = W(() => String(e ?? "")), g = z(e);
|
|
6499
6498
|
q(() => {
|
|
6500
6499
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6501
6500
|
}, [e]);
|
|
6502
6501
|
const p = (h) => {
|
|
6503
6502
|
f(h), g.current = h, n(h);
|
|
6504
6503
|
}, m = (o.rows ?? 6) * 24, b = o.toolbar !== !1;
|
|
6505
|
-
return /* @__PURE__ */
|
|
6504
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
6506
6505
|
/* @__PURE__ */ d(
|
|
6507
|
-
|
|
6506
|
+
ue,
|
|
6508
6507
|
{
|
|
6509
6508
|
label: o.label,
|
|
6510
6509
|
required: o.required,
|
|
@@ -6552,7 +6551,7 @@ if (typeof document < "u" && !document.getElementById("ff-spin-style")) {
|
|
|
6552
6551
|
t.id = "ff-spin-style", t.textContent = "@keyframes ff-spin { to { transform: rotate(360deg); } }", document.head.appendChild(t);
|
|
6553
6552
|
}
|
|
6554
6553
|
function ku(t) {
|
|
6555
|
-
const { onScrollBottom: e, isLoading: n, hasMore: i, innerRef: r, children: a, ...o } = t, u = et.Children.count(a) > 0, s =
|
|
6554
|
+
const { onScrollBottom: e, isLoading: n, hasMore: i, innerRef: r, children: a, ...o } = t, u = et.Children.count(a) > 0, s = z(null), l = k((c) => {
|
|
6556
6555
|
s.current = c, typeof r == "function" ? r(c) : r && "current" in r && (r.current = c);
|
|
6557
6556
|
}, [r]);
|
|
6558
6557
|
return q(() => {
|
|
@@ -6565,7 +6564,7 @@ function ku(t) {
|
|
|
6565
6564
|
}, [n, i, e]), q(() => {
|
|
6566
6565
|
const c = s.current;
|
|
6567
6566
|
!c || n || !i || c.scrollHeight <= c.clientHeight + 4 && e();
|
|
6568
|
-
}, [a, n, i, e]), /* @__PURE__ */
|
|
6567
|
+
}, [a, n, i, e]), /* @__PURE__ */ E(vn.MenuList, { ...o, innerRef: l, children: [
|
|
6569
6568
|
a,
|
|
6570
6569
|
u && (n || i) && /* @__PURE__ */ d("div", { style: {
|
|
6571
6570
|
display: "flex",
|
|
@@ -6579,7 +6578,7 @@ function ku(t) {
|
|
|
6579
6578
|
pointerEvents: "none",
|
|
6580
6579
|
// keep keyboard nav off this row
|
|
6581
6580
|
userSelect: "none"
|
|
6582
|
-
}, children: n ? /* @__PURE__ */
|
|
6581
|
+
}, children: n ? /* @__PURE__ */ E(Te, { children: [
|
|
6583
6582
|
/* @__PURE__ */ d(zu, {}),
|
|
6584
6583
|
"Loading…"
|
|
6585
6584
|
] }) : /* @__PURE__ */ d("span", { style: { color: "#adb5bd" }, children: "Scroll for more" }) })
|
|
@@ -6597,56 +6596,56 @@ function zu() {
|
|
|
6597
6596
|
} });
|
|
6598
6597
|
}
|
|
6599
6598
|
function Hu({ loadPage: t, loadSelected: e, currentValues: n, isOpen: i }) {
|
|
6600
|
-
const [r, a] = W([]), [o, u] = W(0), [s, l] = W(!0), [c, f] = W(!1), g =
|
|
6601
|
-
h(
|
|
6599
|
+
const [r, a] = W([]), [o, u] = W(0), [s, l] = W(!0), [c, f] = W(!1), g = z(/* @__PURE__ */ new Map()), [p, m] = W(0), [b, h] = W(""), [v, A] = W(""), x = z(null), I = z(null), C = z(null), y = k((B) => {
|
|
6600
|
+
h(B), x.current && clearTimeout(x.current), x.current = setTimeout(() => A(B), 300);
|
|
6602
6601
|
}, []);
|
|
6603
6602
|
q(() => {
|
|
6604
|
-
var
|
|
6605
|
-
if (!i ||
|
|
6606
|
-
|
|
6607
|
-
const
|
|
6608
|
-
return I.current =
|
|
6609
|
-
if (
|
|
6610
|
-
const
|
|
6611
|
-
a(
|
|
6603
|
+
var F;
|
|
6604
|
+
if (!i || C.current === v) return;
|
|
6605
|
+
C.current = v, (F = I.current) == null || F.abort();
|
|
6606
|
+
const B = new AbortController();
|
|
6607
|
+
return I.current = B, a([]), u(0), l(!0), f(!0), t({ page: 1, search: v, signal: B.signal }).then((V) => {
|
|
6608
|
+
if (B.signal.aborted) return;
|
|
6609
|
+
const Z = dr(V.options);
|
|
6610
|
+
a(Z), u(1), l(V.hasMore), f(!1);
|
|
6612
6611
|
}).catch((V) => {
|
|
6613
6612
|
fr(V) || f(!1);
|
|
6614
|
-
}), () =>
|
|
6613
|
+
}), () => B.abort();
|
|
6615
6614
|
}, [v, i]);
|
|
6616
|
-
const R =
|
|
6615
|
+
const R = k(() => {
|
|
6617
6616
|
var V;
|
|
6618
6617
|
if (c || !s) return;
|
|
6619
6618
|
(V = I.current) == null || V.abort();
|
|
6620
|
-
const
|
|
6621
|
-
I.current =
|
|
6622
|
-
const
|
|
6623
|
-
t({ page:
|
|
6624
|
-
|
|
6625
|
-
}).catch((
|
|
6626
|
-
fr(
|
|
6619
|
+
const B = new AbortController();
|
|
6620
|
+
I.current = B, f(!0);
|
|
6621
|
+
const F = o + 1;
|
|
6622
|
+
t({ page: F, search: v, signal: B.signal }).then((Z) => {
|
|
6623
|
+
B.signal.aborted || (a((U) => dr([...U, ...Z.options])), u(F), l(Z.hasMore), f(!1));
|
|
6624
|
+
}).catch((Z) => {
|
|
6625
|
+
fr(Z) || f(!1);
|
|
6627
6626
|
});
|
|
6628
|
-
}, [c, s, o, v]),
|
|
6627
|
+
}, [c, s, o, v]), O = z(/* @__PURE__ */ new Set());
|
|
6629
6628
|
q(() => {
|
|
6630
6629
|
if (!e || n.length === 0) return;
|
|
6631
|
-
const
|
|
6632
|
-
(
|
|
6630
|
+
const B = n.filter(
|
|
6631
|
+
(F) => !g.current.has(F) && !O.current.has(F)
|
|
6633
6632
|
);
|
|
6634
|
-
|
|
6635
|
-
|
|
6633
|
+
B.length !== 0 && (B.forEach((F) => O.current.add(F)), e(B).then((F) => {
|
|
6634
|
+
F.forEach((V) => g.current.set(V.value, V)), m((V) => V + 1);
|
|
6636
6635
|
}).catch(() => {
|
|
6637
6636
|
}).finally(() => {
|
|
6638
|
-
|
|
6637
|
+
B.forEach((F) => O.current.delete(F));
|
|
6639
6638
|
}));
|
|
6640
6639
|
}, [n.join("|")]);
|
|
6641
|
-
const
|
|
6642
|
-
var
|
|
6643
|
-
|
|
6644
|
-
}, []), M =
|
|
6645
|
-
const
|
|
6646
|
-
return
|
|
6647
|
-
}, [r, p]), L =
|
|
6648
|
-
if (!
|
|
6649
|
-
(Array.isArray(
|
|
6640
|
+
const G = k(() => {
|
|
6641
|
+
var B;
|
|
6642
|
+
C.current = null, h(""), A(""), x.current && clearTimeout(x.current), (B = I.current) == null || B.abort();
|
|
6643
|
+
}, []), M = oe(() => r, [r, p]), N = k((B) => {
|
|
6644
|
+
const F = r.find((V) => V.value === B);
|
|
6645
|
+
return F || g.current.get(B);
|
|
6646
|
+
}, [r, p]), L = k((B) => {
|
|
6647
|
+
if (!B) return;
|
|
6648
|
+
(Array.isArray(B) ? B : [B]).forEach((V) => g.current.set(V.value, V));
|
|
6650
6649
|
}, []);
|
|
6651
6650
|
return {
|
|
6652
6651
|
options: M,
|
|
@@ -6656,7 +6655,7 @@ function Hu({ loadPage: t, loadSelected: e, currentValues: n, isOpen: i }) {
|
|
|
6656
6655
|
inputValue: b,
|
|
6657
6656
|
handleInputChange: y,
|
|
6658
6657
|
loadMore: R,
|
|
6659
|
-
handleMenuClose:
|
|
6658
|
+
handleMenuClose: G,
|
|
6660
6659
|
updateSelectedCache: L
|
|
6661
6660
|
};
|
|
6662
6661
|
}
|
|
@@ -6678,65 +6677,65 @@ function Zu({
|
|
|
6678
6677
|
error: r,
|
|
6679
6678
|
touched: a
|
|
6680
6679
|
}) {
|
|
6681
|
-
const o = t, u = o.isMulti ?? !1, s = o.id ?? o.name ?? "", l = !!(a && r), c = o.disabled === !0, f =
|
|
6680
|
+
const o = t, u = o.isMulti ?? !1, s = o.id ?? o.name ?? "", l = !!(a && r), c = o.disabled === !0, f = z(`ff-inf-${Math.random().toString(36).slice(2)}`).current, [g, p] = W(!1);
|
|
6682
6681
|
q(() => {
|
|
6683
|
-
const U = (
|
|
6684
|
-
|
|
6682
|
+
const U = ($) => {
|
|
6683
|
+
$.detail !== f && p(!1);
|
|
6685
6684
|
};
|
|
6686
6685
|
return window.addEventListener(an, U), () => window.removeEventListener(an, U);
|
|
6687
6686
|
}, [f]), q(() => {
|
|
6688
6687
|
g && Xu(f);
|
|
6689
6688
|
}, [g, f]);
|
|
6690
|
-
const m =
|
|
6689
|
+
const m = k(() => p(!0), []), b = oe(() => pr(e), [e]), {
|
|
6691
6690
|
options: h,
|
|
6692
6691
|
lookupOption: v,
|
|
6693
6692
|
isLoading: A,
|
|
6694
|
-
hasMore:
|
|
6693
|
+
hasMore: x,
|
|
6695
6694
|
inputValue: I,
|
|
6696
|
-
handleInputChange:
|
|
6695
|
+
handleInputChange: C,
|
|
6697
6696
|
loadMore: y,
|
|
6698
6697
|
handleMenuClose: R,
|
|
6699
|
-
updateSelectedCache:
|
|
6698
|
+
updateSelectedCache: O
|
|
6700
6699
|
} = Hu({
|
|
6701
6700
|
loadPage: o.loadPage,
|
|
6702
6701
|
loadSelected: o.loadSelected,
|
|
6703
6702
|
currentValues: b,
|
|
6704
6703
|
isOpen: g
|
|
6705
|
-
}),
|
|
6706
|
-
|
|
6707
|
-
const M =
|
|
6704
|
+
}), G = z(R);
|
|
6705
|
+
G.current = R;
|
|
6706
|
+
const M = z(!1);
|
|
6708
6707
|
q(() => {
|
|
6709
|
-
M.current && !g &&
|
|
6708
|
+
M.current && !g && G.current(), M.current = g;
|
|
6710
6709
|
}, [g]);
|
|
6711
|
-
const N =
|
|
6710
|
+
const N = k(() => p(!1), []), L = oe(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? pr(e).map((U) => v(U)).filter((U) => !!U) : v(String(e)) ?? null, [e, v, u]), B = k((U) => {
|
|
6712
6711
|
if (u) {
|
|
6713
|
-
const
|
|
6714
|
-
|
|
6712
|
+
const $ = U ?? [];
|
|
6713
|
+
O($), n($.map((re) => re.value));
|
|
6715
6714
|
} else {
|
|
6716
|
-
const
|
|
6717
|
-
|
|
6715
|
+
const $ = U;
|
|
6716
|
+
$ && O($), n($ ? $.value : null);
|
|
6718
6717
|
}
|
|
6719
|
-
}, [u, n,
|
|
6720
|
-
|
|
6721
|
-
const V =
|
|
6722
|
-
function(
|
|
6718
|
+
}, [u, n, O]), F = z({ loadMore: y, isLoading: A, hasMore: x });
|
|
6719
|
+
F.current = { loadMore: y, isLoading: A, hasMore: x };
|
|
6720
|
+
const V = z(
|
|
6721
|
+
function($) {
|
|
6723
6722
|
return /* @__PURE__ */ d(
|
|
6724
6723
|
ku,
|
|
6725
6724
|
{
|
|
6726
|
-
|
|
6727
|
-
onScrollBottom: () =>
|
|
6728
|
-
isLoading:
|
|
6729
|
-
hasMore:
|
|
6725
|
+
...$,
|
|
6726
|
+
onScrollBottom: () => F.current.loadMore(),
|
|
6727
|
+
isLoading: F.current.isLoading,
|
|
6728
|
+
hasMore: F.current.hasMore
|
|
6730
6729
|
}
|
|
6731
6730
|
);
|
|
6732
6731
|
}
|
|
6733
|
-
).current,
|
|
6732
|
+
).current, Z = k(
|
|
6734
6733
|
() => A ? "Loading…" : "No options found",
|
|
6735
6734
|
[A]
|
|
6736
6735
|
);
|
|
6737
|
-
return /* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ E("div", { className: `${o.customClass ?? ""} ${o.hidden ? "ff-form-hidden" : ""}`, children: [
|
|
6738
6737
|
/* @__PURE__ */ d(
|
|
6739
|
-
|
|
6738
|
+
ue,
|
|
6740
6739
|
{
|
|
6741
6740
|
label: o.label,
|
|
6742
6741
|
required: o.required,
|
|
@@ -6752,8 +6751,8 @@ function Zu({
|
|
|
6752
6751
|
inputId: s,
|
|
6753
6752
|
value: L,
|
|
6754
6753
|
inputValue: I,
|
|
6755
|
-
onInputChange:
|
|
6756
|
-
onChange:
|
|
6754
|
+
onInputChange: C,
|
|
6755
|
+
onChange: B,
|
|
6757
6756
|
onBlur: i,
|
|
6758
6757
|
options: h,
|
|
6759
6758
|
isMulti: u,
|
|
@@ -6765,7 +6764,7 @@ function Zu({
|
|
|
6765
6764
|
onMenuOpen: m,
|
|
6766
6765
|
onMenuClose: N,
|
|
6767
6766
|
placeholder: o.placeholder ?? "Search…",
|
|
6768
|
-
noOptionsMessage:
|
|
6767
|
+
noOptionsMessage: Z,
|
|
6769
6768
|
styles: Wr(l, u),
|
|
6770
6769
|
components: { MenuList: V },
|
|
6771
6770
|
classNamePrefix: "ff-select",
|
|
@@ -6798,7 +6797,7 @@ te.register("json-editor", Du);
|
|
|
6798
6797
|
te.register("code", Pu);
|
|
6799
6798
|
te.register("rich-text", Wu);
|
|
6800
6799
|
te.register("infinite-select", Zu);
|
|
6801
|
-
var
|
|
6800
|
+
var Gd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6802
6801
|
function _u(t) {
|
|
6803
6802
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
6804
6803
|
}
|
|
@@ -7101,7 +7100,7 @@ const ct = {
|
|
|
7101
7100
|
context: "$",
|
|
7102
7101
|
value: "."
|
|
7103
7102
|
};
|
|
7104
|
-
class
|
|
7103
|
+
class Me {
|
|
7105
7104
|
constructor(e, n = {}) {
|
|
7106
7105
|
if (this.key = void 0, this.isContext = void 0, this.isValue = void 0, this.isSibling = void 0, this.path = void 0, this.getter = void 0, this.map = void 0, typeof e != "string") throw new TypeError("ref must be a string, got: " + e);
|
|
7107
7106
|
if (this.key = e.trim(), e === "") throw new TypeError("ref must be a non-empty string");
|
|
@@ -7139,9 +7138,9 @@ class Le {
|
|
|
7139
7138
|
return e && e.__isYupRef;
|
|
7140
7139
|
}
|
|
7141
7140
|
}
|
|
7142
|
-
|
|
7141
|
+
Me.prototype.__isYupRef = !0;
|
|
7143
7142
|
const me = (t) => t == null;
|
|
7144
|
-
function
|
|
7143
|
+
function ke(t) {
|
|
7145
7144
|
function e({
|
|
7146
7145
|
value: n,
|
|
7147
7146
|
path: i = "",
|
|
@@ -7167,7 +7166,7 @@ function Xe(t) {
|
|
|
7167
7166
|
parent: m,
|
|
7168
7167
|
context: b
|
|
7169
7168
|
};
|
|
7170
|
-
function
|
|
7169
|
+
function x(N = {}) {
|
|
7171
7170
|
const L = Yi(Object.assign({
|
|
7172
7171
|
value: n,
|
|
7173
7172
|
originalValue: a,
|
|
@@ -7175,16 +7174,16 @@ function Xe(t) {
|
|
|
7175
7174
|
path: N.path || i,
|
|
7176
7175
|
spec: o.spec,
|
|
7177
7176
|
disableStackTrace: N.disableStackTrace || v
|
|
7178
|
-
}, f, N.params), A),
|
|
7179
|
-
return
|
|
7177
|
+
}, f, N.params), A), B = new de(de.formatError(N.message || g, L), n, L.path, N.type || l, L.disableStackTrace);
|
|
7178
|
+
return B.params = L, B;
|
|
7180
7179
|
}
|
|
7181
7180
|
const I = h ? u : s;
|
|
7182
|
-
let
|
|
7181
|
+
let C = {
|
|
7183
7182
|
path: i,
|
|
7184
7183
|
parent: m,
|
|
7185
7184
|
type: l,
|
|
7186
7185
|
from: r.from,
|
|
7187
|
-
createError:
|
|
7186
|
+
createError: x,
|
|
7188
7187
|
resolve(N) {
|
|
7189
7188
|
return ji(N, A);
|
|
7190
7189
|
},
|
|
@@ -7193,25 +7192,25 @@ function Xe(t) {
|
|
|
7193
7192
|
schema: o
|
|
7194
7193
|
};
|
|
7195
7194
|
const y = (N) => {
|
|
7196
|
-
de.isError(N) ? I(N) : N ? s(null) : I(
|
|
7195
|
+
de.isError(N) ? I(N) : N ? s(null) : I(x());
|
|
7197
7196
|
}, R = (N) => {
|
|
7198
7197
|
de.isError(N) ? I(N) : u(N);
|
|
7199
7198
|
};
|
|
7200
7199
|
if (p && me(n))
|
|
7201
7200
|
return y(!0);
|
|
7202
|
-
let
|
|
7201
|
+
let G;
|
|
7203
7202
|
try {
|
|
7204
7203
|
var M;
|
|
7205
|
-
if (
|
|
7204
|
+
if (G = c.call(C, n, C), typeof ((M = G) == null ? void 0 : M.then) == "function") {
|
|
7206
7205
|
if (r.sync)
|
|
7207
|
-
throw new Error(`Validation test of type: "${
|
|
7208
|
-
return Promise.resolve(
|
|
7206
|
+
throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
|
|
7207
|
+
return Promise.resolve(G).then(y, R);
|
|
7209
7208
|
}
|
|
7210
7209
|
} catch (N) {
|
|
7211
7210
|
R(N);
|
|
7212
7211
|
return;
|
|
7213
7212
|
}
|
|
7214
|
-
y(
|
|
7213
|
+
y(G);
|
|
7215
7214
|
}
|
|
7216
7215
|
return e.OPTIONS = t, e;
|
|
7217
7216
|
}
|
|
@@ -7222,7 +7221,7 @@ function Yi(t, e) {
|
|
|
7222
7221
|
return t;
|
|
7223
7222
|
}
|
|
7224
7223
|
function ji(t, e) {
|
|
7225
|
-
return
|
|
7224
|
+
return Me.isRef(t) ? t.getValue(e.value, e.parent, e.context) : t;
|
|
7226
7225
|
}
|
|
7227
7226
|
function mc(t, e, n, i = n) {
|
|
7228
7227
|
let r, a, o;
|
|
@@ -7259,7 +7258,7 @@ class wt extends Set {
|
|
|
7259
7258
|
describe() {
|
|
7260
7259
|
const e = [];
|
|
7261
7260
|
for (const n of this.values())
|
|
7262
|
-
e.push(
|
|
7261
|
+
e.push(Me.isRef(n) ? n.describe() : n);
|
|
7263
7262
|
return e;
|
|
7264
7263
|
}
|
|
7265
7264
|
resolveAll(e) {
|
|
@@ -7276,7 +7275,7 @@ class wt extends Set {
|
|
|
7276
7275
|
return e.forEach((r) => i.add(r)), n.forEach((r) => i.delete(r)), i;
|
|
7277
7276
|
}
|
|
7278
7277
|
}
|
|
7279
|
-
function
|
|
7278
|
+
function Ze(t, e = /* @__PURE__ */ new Map()) {
|
|
7280
7279
|
if (Lt(t) || !t || typeof t != "object") return t;
|
|
7281
7280
|
if (e.has(t)) return e.get(t);
|
|
7282
7281
|
let n;
|
|
@@ -7286,16 +7285,16 @@ function He(t, e = /* @__PURE__ */ new Map()) {
|
|
|
7286
7285
|
n = new RegExp(t), e.set(t, n);
|
|
7287
7286
|
else if (Array.isArray(t)) {
|
|
7288
7287
|
n = new Array(t.length), e.set(t, n);
|
|
7289
|
-
for (let i = 0; i < t.length; i++) n[i] =
|
|
7288
|
+
for (let i = 0; i < t.length; i++) n[i] = Ze(t[i], e);
|
|
7290
7289
|
} else if (t instanceof Map) {
|
|
7291
7290
|
n = /* @__PURE__ */ new Map(), e.set(t, n);
|
|
7292
|
-
for (const [i, r] of t.entries()) n.set(i,
|
|
7291
|
+
for (const [i, r] of t.entries()) n.set(i, Ze(r, e));
|
|
7293
7292
|
} else if (t instanceof Set) {
|
|
7294
7293
|
n = /* @__PURE__ */ new Set(), e.set(t, n);
|
|
7295
|
-
for (const i of t) n.add(
|
|
7294
|
+
for (const i of t) n.add(Ze(i, e));
|
|
7296
7295
|
} else if (t instanceof Object) {
|
|
7297
7296
|
n = {}, e.set(t, n);
|
|
7298
|
-
for (const [i, r] of Object.entries(t)) n[i] =
|
|
7297
|
+
for (const [i, r] of Object.entries(t)) n[i] = Ze(r, e);
|
|
7299
7298
|
} else
|
|
7300
7299
|
throw Error(`Unable to clone ${t}`);
|
|
7301
7300
|
return n;
|
|
@@ -7366,7 +7365,7 @@ class he {
|
|
|
7366
7365
|
if (this._mutate)
|
|
7367
7366
|
return e && Object.assign(this.spec, e), this;
|
|
7368
7367
|
const n = Object.create(Object.getPrototypeOf(this));
|
|
7369
|
-
return n.type = this.type, n._typeCheck = this._typeCheck, n._whitelist = this._whitelist.clone(), n._blacklist = this._blacklist.clone(), n.internalTests = Object.assign({}, this.internalTests), n.exclusiveTests = Object.assign({}, this.exclusiveTests), n.deps = [...this.deps], n.conditions = [...this.conditions], n.tests = [...this.tests], n.transforms = [...this.transforms], n.spec =
|
|
7368
|
+
return n.type = this.type, n._typeCheck = this._typeCheck, n._whitelist = this._whitelist.clone(), n._blacklist = this._blacklist.clone(), n.internalTests = Object.assign({}, this.internalTests), n.exclusiveTests = Object.assign({}, this.exclusiveTests), n.deps = [...this.deps], n.conditions = [...this.conditions], n.tests = [...this.tests], n.transforms = [...this.transforms], n.spec = Ze(Object.assign({}, this.spec, e)), n;
|
|
7370
7369
|
}
|
|
7371
7370
|
label(e) {
|
|
7372
7371
|
let n = this.clone();
|
|
@@ -7571,7 +7570,7 @@ attempted value: ${o}
|
|
|
7571
7570
|
}
|
|
7572
7571
|
_getDefault(e) {
|
|
7573
7572
|
let n = this.spec.default;
|
|
7574
|
-
return n == null ? n : typeof n == "function" ? n.call(this, e) :
|
|
7573
|
+
return n == null ? n : typeof n == "function" ? n.call(this, e) : Ze(n);
|
|
7575
7574
|
}
|
|
7576
7575
|
getDefault(e) {
|
|
7577
7576
|
return this.resolve(e || {})._getDefault(e);
|
|
@@ -7590,7 +7589,7 @@ attempted value: ${o}
|
|
|
7590
7589
|
const i = this.clone({
|
|
7591
7590
|
nullable: e
|
|
7592
7591
|
});
|
|
7593
|
-
return i.internalTests.nullable =
|
|
7592
|
+
return i.internalTests.nullable = ke({
|
|
7594
7593
|
message: n,
|
|
7595
7594
|
name: "nullable",
|
|
7596
7595
|
test(r) {
|
|
@@ -7602,7 +7601,7 @@ attempted value: ${o}
|
|
|
7602
7601
|
const i = this.clone({
|
|
7603
7602
|
optional: e
|
|
7604
7603
|
});
|
|
7605
|
-
return i.internalTests.optionality =
|
|
7604
|
+
return i.internalTests.optionality = ke({
|
|
7606
7605
|
message: n,
|
|
7607
7606
|
name: "optionality",
|
|
7608
7607
|
test(r) {
|
|
@@ -7657,21 +7656,21 @@ attempted value: ${o}
|
|
|
7657
7656
|
message: e[1],
|
|
7658
7657
|
test: e[2]
|
|
7659
7658
|
}, n.message === void 0 && (n.message = xe.default), typeof n.test != "function") throw new TypeError("`test` is a required parameters");
|
|
7660
|
-
let i = this.clone(), r =
|
|
7659
|
+
let i = this.clone(), r = ke(n), a = n.exclusive || n.name && i.exclusiveTests[n.name] === !0;
|
|
7661
7660
|
if (n.exclusive && !n.name)
|
|
7662
7661
|
throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");
|
|
7663
7662
|
return n.name && (i.exclusiveTests[n.name] = !!n.exclusive), i.tests = i.tests.filter((o) => !(o.OPTIONS.name === n.name && (a || o.OPTIONS.test === r.OPTIONS.test))), i.tests.push(r), i;
|
|
7664
7663
|
}
|
|
7665
7664
|
when(e, n) {
|
|
7666
7665
|
!Array.isArray(e) && typeof e != "string" && (n = e, e = ".");
|
|
7667
|
-
let i = this.clone(), r = Hi(e).map((a) => new
|
|
7666
|
+
let i = this.clone(), r = Hi(e).map((a) => new Me(a));
|
|
7668
7667
|
return r.forEach((a) => {
|
|
7669
7668
|
a.isSibling && i.deps.push(a.key);
|
|
7670
7669
|
}), i.conditions.push(typeof n == "function" ? new Ft(r, n) : Ft.fromOptions(r, n)), i;
|
|
7671
7670
|
}
|
|
7672
7671
|
typeError(e) {
|
|
7673
7672
|
let n = this.clone();
|
|
7674
|
-
return n.internalTests.typeError =
|
|
7673
|
+
return n.internalTests.typeError = ke({
|
|
7675
7674
|
message: e,
|
|
7676
7675
|
name: "typeError",
|
|
7677
7676
|
skipAbsent: !0,
|
|
@@ -7688,7 +7687,7 @@ attempted value: ${o}
|
|
|
7688
7687
|
let i = this.clone();
|
|
7689
7688
|
return e.forEach((r) => {
|
|
7690
7689
|
i._whitelist.add(r), i._blacklist.delete(r);
|
|
7691
|
-
}), i.internalTests.whiteList =
|
|
7690
|
+
}), i.internalTests.whiteList = ke({
|
|
7692
7691
|
message: n,
|
|
7693
7692
|
name: "oneOf",
|
|
7694
7693
|
skipAbsent: !0,
|
|
@@ -7707,7 +7706,7 @@ attempted value: ${o}
|
|
|
7707
7706
|
let i = this.clone();
|
|
7708
7707
|
return e.forEach((r) => {
|
|
7709
7708
|
i._blacklist.add(r), i._whitelist.delete(r);
|
|
7710
|
-
}), i.internalTests.blacklist =
|
|
7709
|
+
}), i.internalTests.blacklist = ke({
|
|
7711
7710
|
message: n,
|
|
7712
7711
|
name: "notOneOf",
|
|
7713
7712
|
test(r) {
|
|
@@ -8198,7 +8197,7 @@ class Nn extends he {
|
|
|
8198
8197
|
}
|
|
8199
8198
|
prepareParam(e, n) {
|
|
8200
8199
|
let i;
|
|
8201
|
-
if (
|
|
8200
|
+
if (Me.isRef(e))
|
|
8202
8201
|
i = e;
|
|
8203
8202
|
else {
|
|
8204
8203
|
let r = this.cast(e);
|
|
@@ -8247,7 +8246,7 @@ function Dc(t, e = []) {
|
|
|
8247
8246
|
}
|
|
8248
8247
|
for (const o of Object.keys(t)) {
|
|
8249
8248
|
let u = t[o];
|
|
8250
|
-
i.add(o),
|
|
8249
|
+
i.add(o), Me.isRef(u) && u.isSibling ? a(u.path, o) : Lt(u) && "deps" in u && u.deps.forEach((s) => a(s, o));
|
|
8251
8250
|
}
|
|
8252
8251
|
return lc.array(Array.from(i), n).reverse();
|
|
8253
8252
|
}
|
|
@@ -8360,7 +8359,7 @@ class ro extends he {
|
|
|
8360
8359
|
let c = [];
|
|
8361
8360
|
for (let f of this._nodes) {
|
|
8362
8361
|
let g = this.fields[f];
|
|
8363
|
-
!g ||
|
|
8362
|
+
!g || Me.isRef(g) || c.push(g.asNestedTest({
|
|
8364
8363
|
options: n,
|
|
8365
8364
|
key: f,
|
|
8366
8365
|
parent: l,
|
|
@@ -8908,7 +8907,7 @@ const Mc = new Lc(), Wc = 8, ee = {
|
|
|
8908
8907
|
}
|
|
8909
8908
|
};
|
|
8910
8909
|
function Cr({ checked: t, onChange: e, indeterminate: n, disabled: i }) {
|
|
8911
|
-
const r =
|
|
8910
|
+
const r = z(null);
|
|
8912
8911
|
return q(() => {
|
|
8913
8912
|
r.current && (r.current.indeterminate = !!n);
|
|
8914
8913
|
}, [n]), /* @__PURE__ */ d(
|
|
@@ -8932,12 +8931,12 @@ function Xc({ selected: t, onRemove: e, onClose: n }) {
|
|
|
8932
8931
|
const [i, r] = W(""), a = t.filter(
|
|
8933
8932
|
(o) => o.label.toLowerCase().includes(i.toLowerCase())
|
|
8934
8933
|
);
|
|
8935
|
-
return /* @__PURE__ */ d("div", { style: ee.overlay, onClick: n, children: /* @__PURE__ */
|
|
8936
|
-
/* @__PURE__ */
|
|
8934
|
+
return /* @__PURE__ */ d("div", { style: ee.overlay, onClick: n, children: /* @__PURE__ */ E("div", { style: ee.modal, onClick: (o) => o.stopPropagation(), children: [
|
|
8935
|
+
/* @__PURE__ */ E("div", { style: ee.modalHeader, children: [
|
|
8937
8936
|
/* @__PURE__ */ d("span", { children: "Selected Rows" }),
|
|
8938
8937
|
/* @__PURE__ */ d("button", { type: "button", style: ee.modalCloseBtn, onClick: n, children: /* @__PURE__ */ d(Ge, { size: 20 }) })
|
|
8939
8938
|
] }),
|
|
8940
|
-
/* @__PURE__ */
|
|
8939
|
+
/* @__PURE__ */ E("div", { style: ee.modalSearch, children: [
|
|
8941
8940
|
/* @__PURE__ */ d(gn, { size: 18, color: "rgba(0,0,0,0.38)" }),
|
|
8942
8941
|
/* @__PURE__ */ d(
|
|
8943
8942
|
"input",
|
|
@@ -8951,9 +8950,9 @@ function Xc({ selected: t, onRemove: e, onClose: n }) {
|
|
|
8951
8950
|
}
|
|
8952
8951
|
)
|
|
8953
8952
|
] }),
|
|
8954
|
-
/* @__PURE__ */
|
|
8953
|
+
/* @__PURE__ */ E("div", { style: ee.modalList, children: [
|
|
8955
8954
|
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" }),
|
|
8956
|
-
a.map((o) => /* @__PURE__ */
|
|
8955
|
+
a.map((o) => /* @__PURE__ */ E("div", { style: ee.modalRow, children: [
|
|
8957
8956
|
/* @__PURE__ */ d("span", { children: o.label }),
|
|
8958
8957
|
/* @__PURE__ */ d(
|
|
8959
8958
|
"button",
|
|
@@ -8971,71 +8970,71 @@ function Xc({ selected: t, onRemove: e, onClose: n }) {
|
|
|
8971
8970
|
] }) });
|
|
8972
8971
|
}
|
|
8973
8972
|
function kc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }) {
|
|
8974
|
-
const o = t, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Wc, c = o.id ?? o.name ?? "", [f, g] = W(""), [p, m] = W(1), [b, h] = W([]), [v, A] = W(!1), [
|
|
8973
|
+
const o = t, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Wc, c = o.id ?? o.name ?? "", [f, g] = W(""), [p, m] = W(1), [b, h] = W([]), [v, A] = W(!1), [x, I] = W(!1), [C, y] = W(null), [R, O] = W(!1), G = z(null), M = z(0), N = z(!0);
|
|
8975
8974
|
q(() => () => {
|
|
8976
|
-
N.current = !1,
|
|
8975
|
+
N.current = !1, G.current && clearTimeout(G.current);
|
|
8977
8976
|
}, []);
|
|
8978
|
-
const L = s ? Array.isArray(e) ? e : [] : e ? [e] : [],
|
|
8979
|
-
(
|
|
8980
|
-
if (o.fetchOptions) return o.fetchOptions(
|
|
8977
|
+
const L = s ? Array.isArray(e) ? e : [] : e ? [e] : [], B = L.length, F = k(
|
|
8978
|
+
(T, P) => {
|
|
8979
|
+
if (o.fetchOptions) return o.fetchOptions(T, P);
|
|
8981
8980
|
if (o.dataSource) {
|
|
8982
|
-
const
|
|
8983
|
-
return
|
|
8981
|
+
const j = Mc.get(o.dataSource);
|
|
8982
|
+
return j ? j.fetch(T, P) : Promise.reject(new Error(`[FlowForge] DataSource "${o.dataSource}" is not registered.`));
|
|
8984
8983
|
}
|
|
8985
8984
|
return Promise.reject(new Error(`[FlowForge] table-picker "${o.id}" requires fetchOptions or dataSource.`));
|
|
8986
8985
|
},
|
|
8987
8986
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8988
8987
|
[o.fetchOptions, o.dataSource, o.id]
|
|
8989
|
-
), V =
|
|
8990
|
-
(
|
|
8991
|
-
const
|
|
8992
|
-
I(!0), T
|
|
8993
|
-
!N.current ||
|
|
8988
|
+
), V = k(
|
|
8989
|
+
(T, P) => {
|
|
8990
|
+
const j = ++M.current;
|
|
8991
|
+
I(!0), F(T, P).then((Q) => {
|
|
8992
|
+
!N.current || j !== M.current || (h(Q.options.slice(0, l)), A(Q.hasNextPage));
|
|
8994
8993
|
}).catch(() => {
|
|
8995
|
-
!N.current ||
|
|
8994
|
+
!N.current || j !== M.current || (h([]), A(!1));
|
|
8996
8995
|
}).finally(() => {
|
|
8997
|
-
!N.current ||
|
|
8996
|
+
!N.current || j !== M.current || I(!1);
|
|
8998
8997
|
});
|
|
8999
8998
|
},
|
|
9000
|
-
[
|
|
8999
|
+
[F, l]
|
|
9001
9000
|
);
|
|
9002
9001
|
q(() => {
|
|
9003
9002
|
V("", 1);
|
|
9004
9003
|
}, []);
|
|
9005
|
-
const
|
|
9006
|
-
const
|
|
9007
|
-
g(
|
|
9008
|
-
}, U = (
|
|
9004
|
+
const Z = (T) => {
|
|
9005
|
+
const P = T.target.value;
|
|
9006
|
+
g(P), m(1), G.current && clearTimeout(G.current), G.current = setTimeout(() => V(P, 1), 300);
|
|
9007
|
+
}, U = (T) => {
|
|
9009
9008
|
if (s) {
|
|
9010
|
-
const
|
|
9011
|
-
n(
|
|
9009
|
+
const P = Array.isArray(e) ? e : [], j = P.some((Q) => Q.value === T.value);
|
|
9010
|
+
n(j ? P.filter((Q) => Q.value !== T.value) : [...P, T]);
|
|
9012
9011
|
} else
|
|
9013
|
-
n((e == null ? void 0 : e.value) ===
|
|
9012
|
+
n((e == null ? void 0 : e.value) === T.value ? null : T);
|
|
9014
9013
|
i == null || i();
|
|
9015
|
-
},
|
|
9014
|
+
}, $ = () => {
|
|
9016
9015
|
if (!s) return;
|
|
9017
|
-
const
|
|
9018
|
-
if (b.every((
|
|
9019
|
-
n(
|
|
9016
|
+
const T = Array.isArray(e) ? e : [];
|
|
9017
|
+
if (b.every((j) => T.some((Q) => Q.value === j.value)))
|
|
9018
|
+
n(T.filter((j) => !b.some((Q) => Q.value === j.value)));
|
|
9020
9019
|
else {
|
|
9021
|
-
const
|
|
9022
|
-
n([...
|
|
9020
|
+
const j = b.filter((Q) => !T.some((ne) => ne.value === Q.value));
|
|
9021
|
+
n([...T, ...j]);
|
|
9023
9022
|
}
|
|
9024
|
-
},
|
|
9023
|
+
}, re = (T) => {
|
|
9025
9024
|
if (s) {
|
|
9026
|
-
const
|
|
9027
|
-
n(
|
|
9025
|
+
const j = (Array.isArray(e) ? e : []).filter((Q) => Q.value !== T);
|
|
9026
|
+
n(j), j.length === 0 && O(!1);
|
|
9028
9027
|
} else
|
|
9029
|
-
n(null),
|
|
9028
|
+
n(null), O(!1);
|
|
9030
9029
|
i == null || i();
|
|
9031
|
-
},
|
|
9032
|
-
(
|
|
9033
|
-
),
|
|
9034
|
-
(
|
|
9035
|
-
),
|
|
9036
|
-
return /* @__PURE__ */
|
|
9030
|
+
}, se = o.columns.length + 1, X = b.length > 0 && b.every(
|
|
9031
|
+
(T) => L.some((P) => P.value === T.value)
|
|
9032
|
+
), w = b.some(
|
|
9033
|
+
(T) => L.some((P) => P.value === T.value)
|
|
9034
|
+
), _ = (T) => L.some((P) => P.value === T.value);
|
|
9035
|
+
return /* @__PURE__ */ E("div", { style: { marginBottom: 16 }, children: [
|
|
9037
9036
|
/* @__PURE__ */ d(
|
|
9038
|
-
|
|
9037
|
+
ue,
|
|
9039
9038
|
{
|
|
9040
9039
|
label: o.label,
|
|
9041
9040
|
required: o.required,
|
|
@@ -9045,23 +9044,23 @@ function kc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
9045
9044
|
dataTestId: o.dataTestId ?? c
|
|
9046
9045
|
}
|
|
9047
9046
|
),
|
|
9048
|
-
/* @__PURE__ */
|
|
9049
|
-
/* @__PURE__ */
|
|
9050
|
-
|
|
9047
|
+
/* @__PURE__ */ E("div", { style: ee.wrapper(u), onBlur: i, id: c, children: [
|
|
9048
|
+
/* @__PURE__ */ E("div", { style: ee.toolbar, children: [
|
|
9049
|
+
B > 0 ? /* @__PURE__ */ E(
|
|
9051
9050
|
"button",
|
|
9052
9051
|
{
|
|
9053
9052
|
type: "button",
|
|
9054
9053
|
style: ee.selectedLink,
|
|
9055
|
-
onClick: () =>
|
|
9054
|
+
onClick: () => O(!0),
|
|
9056
9055
|
children: [
|
|
9057
|
-
|
|
9056
|
+
B,
|
|
9058
9057
|
" ",
|
|
9059
|
-
|
|
9058
|
+
B === 1 ? "Item" : "Items",
|
|
9060
9059
|
" Selected"
|
|
9061
9060
|
]
|
|
9062
9061
|
}
|
|
9063
9062
|
) : /* @__PURE__ */ d("span", { style: { fontSize: 13, color: "rgba(0,0,0,0.38)" }, children: "No selection" }),
|
|
9064
|
-
/* @__PURE__ */
|
|
9063
|
+
/* @__PURE__ */ E("div", { style: ee.searchWrap, children: [
|
|
9065
9064
|
/* @__PURE__ */ d(gn, { size: 15, color: "rgba(0,0,0,0.38)" }),
|
|
9066
9065
|
/* @__PURE__ */ d(
|
|
9067
9066
|
"input",
|
|
@@ -9069,75 +9068,75 @@ function kc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
9069
9068
|
type: "text",
|
|
9070
9069
|
placeholder: o.placeholder ?? "Search…",
|
|
9071
9070
|
value: f,
|
|
9072
|
-
onChange:
|
|
9071
|
+
onChange: Z,
|
|
9073
9072
|
style: ee.searchInput,
|
|
9074
9073
|
"aria-label": `Search ${o.label ?? ""}`
|
|
9075
9074
|
}
|
|
9076
9075
|
)
|
|
9077
9076
|
] })
|
|
9078
9077
|
] }),
|
|
9079
|
-
/* @__PURE__ */ d("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */
|
|
9080
|
-
/* @__PURE__ */ d("thead", { style: ee.thead, children: /* @__PURE__ */
|
|
9078
|
+
/* @__PURE__ */ d("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ E("table", { style: ee.table, children: [
|
|
9079
|
+
/* @__PURE__ */ d("thead", { style: ee.thead, children: /* @__PURE__ */ E("tr", { children: [
|
|
9081
9080
|
/* @__PURE__ */ d("th", { style: ee.checkTh, children: s && /* @__PURE__ */ d(
|
|
9082
9081
|
Cr,
|
|
9083
9082
|
{
|
|
9084
|
-
checked:
|
|
9085
|
-
indeterminate: !
|
|
9086
|
-
onChange:
|
|
9087
|
-
disabled:
|
|
9083
|
+
checked: X,
|
|
9084
|
+
indeterminate: !X && w,
|
|
9085
|
+
onChange: $,
|
|
9086
|
+
disabled: x || b.length === 0
|
|
9088
9087
|
}
|
|
9089
9088
|
) }),
|
|
9090
|
-
o.columns.map((
|
|
9089
|
+
o.columns.map((T) => /* @__PURE__ */ d("th", { style: ee.th(T.width), children: T.label }, T.key))
|
|
9091
9090
|
] }) }),
|
|
9092
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
9093
|
-
const
|
|
9094
|
-
return /* @__PURE__ */
|
|
9091
|
+
/* @__PURE__ */ d("tbody", { children: x ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: se, style: ee.statusRow, children: "Loading…" }) }) : b.length === 0 ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: se, style: ee.statusRow, children: "No results found" }) }) : b.map((T) => {
|
|
9092
|
+
const P = _(T), j = C === T.value;
|
|
9093
|
+
return /* @__PURE__ */ E(
|
|
9095
9094
|
"tr",
|
|
9096
9095
|
{
|
|
9097
9096
|
style: {
|
|
9098
9097
|
cursor: "pointer",
|
|
9099
|
-
background:
|
|
9098
|
+
background: P ? "rgba(25,118,210,0.06)" : j ? "rgba(0,0,0,0.03)" : "#fff",
|
|
9100
9099
|
transition: "background 0.1s"
|
|
9101
9100
|
},
|
|
9102
|
-
onClick: () => U(
|
|
9103
|
-
onMouseEnter: () => y(
|
|
9101
|
+
onClick: () => U(T),
|
|
9102
|
+
onMouseEnter: () => y(T.value),
|
|
9104
9103
|
onMouseLeave: () => y(null),
|
|
9105
|
-
"aria-selected":
|
|
9104
|
+
"aria-selected": P,
|
|
9106
9105
|
children: [
|
|
9107
9106
|
/* @__PURE__ */ d("td", { style: ee.checkTd, children: s ? /* @__PURE__ */ d(
|
|
9108
9107
|
Cr,
|
|
9109
9108
|
{
|
|
9110
|
-
checked:
|
|
9111
|
-
onChange: () => U(
|
|
9109
|
+
checked: P,
|
|
9110
|
+
onChange: () => U(T)
|
|
9112
9111
|
}
|
|
9113
9112
|
) : /* @__PURE__ */ d(
|
|
9114
9113
|
"input",
|
|
9115
9114
|
{
|
|
9116
9115
|
type: "radio",
|
|
9117
|
-
checked:
|
|
9118
|
-
onChange: () => U(
|
|
9116
|
+
checked: P,
|
|
9117
|
+
onChange: () => U(T),
|
|
9119
9118
|
onClick: (Q) => Q.stopPropagation(),
|
|
9120
9119
|
name: c,
|
|
9121
9120
|
style: { accentColor: "#1976d2", width: 16, height: 16, cursor: "pointer" }
|
|
9122
9121
|
}
|
|
9123
9122
|
) }),
|
|
9124
|
-
o.columns.map((Q) => /* @__PURE__ */ d("td", { style: ee.td, children: String(
|
|
9123
|
+
o.columns.map((Q) => /* @__PURE__ */ d("td", { style: ee.td, children: String(T[Q.key] ?? "") }, Q.key))
|
|
9125
9124
|
]
|
|
9126
9125
|
},
|
|
9127
|
-
|
|
9126
|
+
T.value
|
|
9128
9127
|
);
|
|
9129
9128
|
}) })
|
|
9130
9129
|
] }) }),
|
|
9131
|
-
/* @__PURE__ */
|
|
9130
|
+
/* @__PURE__ */ E("div", { style: ee.footer, children: [
|
|
9132
9131
|
/* @__PURE__ */ d("span", { children: `${(p - 1) * l + 1}–${(p - 1) * l + b.length} of many` }),
|
|
9133
|
-
/* @__PURE__ */
|
|
9132
|
+
/* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
9134
9133
|
/* @__PURE__ */ d(
|
|
9135
9134
|
"button",
|
|
9136
9135
|
{
|
|
9137
9136
|
type: "button",
|
|
9138
9137
|
onClick: () => {
|
|
9139
|
-
const
|
|
9140
|
-
m(
|
|
9138
|
+
const T = p - 1;
|
|
9139
|
+
m(T), V(f, T);
|
|
9141
9140
|
},
|
|
9142
9141
|
disabled: p <= 1,
|
|
9143
9142
|
style: ee.pageBtn(p <= 1),
|
|
@@ -9150,8 +9149,8 @@ function kc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
9150
9149
|
{
|
|
9151
9150
|
type: "button",
|
|
9152
9151
|
onClick: () => {
|
|
9153
|
-
const
|
|
9154
|
-
m(
|
|
9152
|
+
const T = p + 1;
|
|
9153
|
+
m(T), V(f, T);
|
|
9155
9154
|
},
|
|
9156
9155
|
disabled: !v,
|
|
9157
9156
|
style: ee.pageBtn(!v),
|
|
@@ -9168,8 +9167,8 @@ function kc({ field: t, value: e, onChange: n, onBlur: i, error: r, touched: a }
|
|
|
9168
9167
|
Xc,
|
|
9169
9168
|
{
|
|
9170
9169
|
selected: L,
|
|
9171
|
-
onRemove:
|
|
9172
|
-
onClose: () =>
|
|
9170
|
+
onRemove: re,
|
|
9171
|
+
onClose: () => O(!1)
|
|
9173
9172
|
}
|
|
9174
9173
|
)
|
|
9175
9174
|
] });
|
|
@@ -9419,8 +9418,8 @@ function jc({
|
|
|
9419
9418
|
item: c
|
|
9420
9419
|
}) {
|
|
9421
9420
|
const [f, g] = W(!0), p = t.children ?? [], m = ao(p), b = _c(t, e), h = typeof t.helperText == "string" ? t.helperText : void 0, v = `${m} field${m === 1 ? "" : "s"}`;
|
|
9422
|
-
return /* @__PURE__ */
|
|
9423
|
-
/* @__PURE__ */
|
|
9421
|
+
return /* @__PURE__ */ E(D, { sx: Jc(n, s), children: [
|
|
9422
|
+
/* @__PURE__ */ E(D, { onClick: () => g((A) => !A), sx: Yc(n, f), children: [
|
|
9424
9423
|
/* @__PURE__ */ d(
|
|
9425
9424
|
D,
|
|
9426
9425
|
{
|
|
@@ -9438,8 +9437,8 @@ function jc({
|
|
|
9438
9437
|
children: /* @__PURE__ */ d(bn, { size: 16 })
|
|
9439
9438
|
}
|
|
9440
9439
|
),
|
|
9441
|
-
/* @__PURE__ */
|
|
9442
|
-
/* @__PURE__ */
|
|
9440
|
+
/* @__PURE__ */ E(D, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
9441
|
+
/* @__PURE__ */ E(D, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
9443
9442
|
/* @__PURE__ */ d(
|
|
9444
9443
|
fe,
|
|
9445
9444
|
{
|
|
@@ -9499,7 +9498,7 @@ function jc({
|
|
|
9499
9498
|
pl: n === 0 ? 0 : n === 1 ? 1 : 0
|
|
9500
9499
|
},
|
|
9501
9500
|
children: p.map((A) => {
|
|
9502
|
-
const
|
|
9501
|
+
const x = A.id ?? A.name ?? "", I = e ? `${e}.${x}` : x;
|
|
9503
9502
|
return l({
|
|
9504
9503
|
field: A,
|
|
9505
9504
|
pathPrefix: I,
|
|
@@ -9538,12 +9537,12 @@ function Qc({
|
|
|
9538
9537
|
compact: s,
|
|
9539
9538
|
renderFieldRouter: l
|
|
9540
9539
|
}) {
|
|
9541
|
-
var
|
|
9542
|
-
const c = t.tabs ?? [], [f, g] = W(((
|
|
9540
|
+
var O;
|
|
9541
|
+
const c = t.tabs ?? [], [f, g] = W(((O = c[0]) == null ? void 0 : O.id) ?? "");
|
|
9543
9542
|
q(() => {
|
|
9544
|
-
c.length !== 0 && (c.some((
|
|
9543
|
+
c.length !== 0 && (c.some((G) => G.id === f) || g(c[0].id));
|
|
9545
9544
|
}, [c, f]);
|
|
9546
|
-
const p = Uc(), m = t.id ?? t.name ?? "", b = t.variant ?? "line", h = t.alignment ?? "left", v = t.height ?? "auto", A = t.margin ?? "normal",
|
|
9545
|
+
const p = Uc(), m = t.id ?? t.name ?? "", b = t.variant ?? "line", h = t.alignment ?? "left", v = t.height ?? "auto", A = t.margin ?? "normal", x = t.activeColor ?? "#6366f1", I = t.activeTextColor ?? (b === "pill" ? "#ffffff" : x), C = t.inactiveTextColor ?? "#64748b", y = {
|
|
9547
9546
|
left: "flex-start",
|
|
9548
9547
|
"center-left": "flex-start",
|
|
9549
9548
|
center: "center",
|
|
@@ -9551,13 +9550,13 @@ function Qc({
|
|
|
9551
9550
|
right: "flex-end"
|
|
9552
9551
|
};
|
|
9553
9552
|
if (c.length === 0)
|
|
9554
|
-
return /* @__PURE__ */
|
|
9553
|
+
return /* @__PURE__ */ E(D, { sx: { p: 2, border: "1px dashed #e2e8f0", borderRadius: 2, color: "#94a3b8", fontSize: 13 }, children: [
|
|
9555
9554
|
"No tabs defined. Add a ",
|
|
9556
9555
|
/* @__PURE__ */ d("code", { children: "tabs" }),
|
|
9557
9556
|
" array to this field descriptor."
|
|
9558
9557
|
] });
|
|
9559
|
-
const R = c.find((
|
|
9560
|
-
return /* @__PURE__ */
|
|
9558
|
+
const R = c.find((G) => G.id === f) ?? c[0];
|
|
9559
|
+
return /* @__PURE__ */ E(D, { sx: {
|
|
9561
9560
|
mb: A === "none" ? 0 : void 0,
|
|
9562
9561
|
height: v === "fixed" ? 400 : void 0,
|
|
9563
9562
|
display: v === "fixed" ? "flex" : void 0,
|
|
@@ -9572,20 +9571,20 @@ function Qc({
|
|
|
9572
9571
|
pt: 1.5,
|
|
9573
9572
|
borderBottom: "1px solid #e2e8f0",
|
|
9574
9573
|
flexShrink: 0
|
|
9575
|
-
}, children: c.map((
|
|
9576
|
-
const M =
|
|
9577
|
-
const
|
|
9578
|
-
return !!`${N}.${
|
|
9579
|
-
}),
|
|
9580
|
-
return /* @__PURE__ */
|
|
9574
|
+
}, children: c.map((G) => {
|
|
9575
|
+
const M = G.id === f, N = e ? `${e}.${G.id}` : G.id, L = G.fields.some(($) => {
|
|
9576
|
+
const re = $.id ?? $.name ?? "";
|
|
9577
|
+
return !!`${N}.${re}`.split(".").reduce((w, _) => w && typeof w == "object" ? w[_] : void 0, r);
|
|
9578
|
+
}), B = { bgcolor: x, color: I, borderRadius: "20px", border: "none" }, F = { bgcolor: "transparent", color: C, borderRadius: "20px", border: "none" }, V = { borderBottom: `2px solid ${x}`, color: I, border: "none" };
|
|
9579
|
+
return /* @__PURE__ */ E(
|
|
9581
9580
|
D,
|
|
9582
9581
|
{
|
|
9583
9582
|
component: "button",
|
|
9584
9583
|
type: "button",
|
|
9585
|
-
onClick: () => g(
|
|
9584
|
+
onClick: () => g(G.id),
|
|
9586
9585
|
sx: {
|
|
9587
|
-
...b === "pill" ? M ?
|
|
9588
|
-
background: b === "pill" && M ?
|
|
9586
|
+
...b === "pill" ? M ? B : F : M ? V : { borderBottom: "2px solid transparent", color: C, border: "none" },
|
|
9587
|
+
background: b === "pill" && M ? x : "none",
|
|
9589
9588
|
cursor: "pointer",
|
|
9590
9589
|
px: 1.5,
|
|
9591
9590
|
py: b === "pill" ? 0.5 : 1,
|
|
@@ -9595,22 +9594,22 @@ function Qc({
|
|
|
9595
9594
|
alignItems: "center",
|
|
9596
9595
|
gap: 0.5,
|
|
9597
9596
|
transition: "color .12s, border-color .12s, background .12s",
|
|
9598
|
-
"&:hover": { color: b === "pill" && M ? I :
|
|
9597
|
+
"&:hover": { color: b === "pill" && M ? I : x },
|
|
9599
9598
|
mb: b === "line" ? "-1px" : 0.5,
|
|
9600
9599
|
mr: b === "pill" ? 0.5 : 0
|
|
9601
9600
|
},
|
|
9602
9601
|
children: [
|
|
9603
|
-
|
|
9602
|
+
G.label,
|
|
9604
9603
|
L && /* @__PURE__ */ d(D, { sx: { width: 6, height: 6, borderRadius: "50%", bgcolor: "#ef4444", flexShrink: 0 } })
|
|
9605
9604
|
]
|
|
9606
9605
|
},
|
|
9607
|
-
|
|
9606
|
+
G.id
|
|
9608
9607
|
);
|
|
9609
9608
|
}) }),
|
|
9610
|
-
/* @__PURE__ */
|
|
9611
|
-
/* @__PURE__ */ d(D, { className: "ff-form-row", children: R.fields.map((
|
|
9612
|
-
const N =
|
|
9613
|
-
return /* @__PURE__ */
|
|
9609
|
+
/* @__PURE__ */ E(D, { sx: { p: 2, flex: v === "fixed" ? 1 : void 0, overflowY: v === "fixed" ? "auto" : void 0 }, children: [
|
|
9610
|
+
/* @__PURE__ */ d(D, { className: "ff-form-row", children: R.fields.map((G, M) => {
|
|
9611
|
+
const N = G.id ?? G.name ?? "", B = `${e ? `${e}.${R.id}` : R.id}.${N}`;
|
|
9612
|
+
return /* @__PURE__ */ E(D, { sx: { position: "relative", width: "100%" }, children: [
|
|
9614
9613
|
p && /* @__PURE__ */ d(
|
|
9615
9614
|
D,
|
|
9616
9615
|
{
|
|
@@ -9642,8 +9641,8 @@ function Qc({
|
|
|
9642
9641
|
}
|
|
9643
9642
|
),
|
|
9644
9643
|
l({
|
|
9645
|
-
field:
|
|
9646
|
-
pathPrefix:
|
|
9644
|
+
field: G,
|
|
9645
|
+
pathPrefix: B,
|
|
9647
9646
|
depth: n + 1,
|
|
9648
9647
|
values: i,
|
|
9649
9648
|
errors: r,
|
|
@@ -9653,9 +9652,9 @@ function Qc({
|
|
|
9653
9652
|
compact: s,
|
|
9654
9653
|
inlineLabel: !1
|
|
9655
9654
|
})
|
|
9656
|
-
] },
|
|
9655
|
+
] }, B);
|
|
9657
9656
|
}) }),
|
|
9658
|
-
p && /* @__PURE__ */
|
|
9657
|
+
p && /* @__PURE__ */ E(
|
|
9659
9658
|
D,
|
|
9660
9659
|
{
|
|
9661
9660
|
component: "button",
|
|
@@ -9834,14 +9833,14 @@ function td({ colDef: t, entry: e, onChange: n, cellId: i, formValues: r }) {
|
|
|
9834
9833
|
}
|
|
9835
9834
|
function nd({ node: t, conditionDef: e, depth: n, fieldPath: i, onUpdate: r, onRemove: a, formValues: o }) {
|
|
9836
9835
|
const [u, s] = W(!1), l = lo(t.entries);
|
|
9837
|
-
return /* @__PURE__ */
|
|
9836
|
+
return /* @__PURE__ */ E(D, { sx: {
|
|
9838
9837
|
border: "1px solid #e9e9e9",
|
|
9839
9838
|
borderLeft: "3px solid #d1d5db",
|
|
9840
9839
|
borderRadius: "6px",
|
|
9841
9840
|
bgcolor: "#f9fafb",
|
|
9842
9841
|
overflow: "hidden"
|
|
9843
9842
|
}, children: [
|
|
9844
|
-
/* @__PURE__ */
|
|
9843
|
+
/* @__PURE__ */ E(
|
|
9845
9844
|
D,
|
|
9846
9845
|
{
|
|
9847
9846
|
sx: {
|
|
@@ -9858,9 +9857,9 @@ function nd({ node: t, conditionDef: e, depth: n, fieldPath: i, onUpdate: r, onR
|
|
|
9858
9857
|
children: [
|
|
9859
9858
|
/* @__PURE__ */ d(D, { sx: { color: "#94a3b8", display: "flex", alignItems: "center" }, children: u ? /* @__PURE__ */ d(bn, { size: 15 }) : /* @__PURE__ */ d(Oo, { size: 15 }) }),
|
|
9860
9859
|
/* @__PURE__ */ d(fe, { sx: { fontSize: 11, fontWeight: 700, color: "#94a3b8", fontFamily: "monospace", letterSpacing: -1 }, children: "( )" }),
|
|
9861
|
-
/* @__PURE__ */
|
|
9860
|
+
/* @__PURE__ */ E(fe, { sx: { fontSize: 11, color: "#64748b" }, children: [
|
|
9862
9861
|
"Group",
|
|
9863
|
-
u && /* @__PURE__ */
|
|
9862
|
+
u && /* @__PURE__ */ E(D, { component: "span", sx: { ml: 0.5, color: "#94a3b8" }, children: [
|
|
9864
9863
|
"· ",
|
|
9865
9864
|
l,
|
|
9866
9865
|
" condition",
|
|
@@ -9901,8 +9900,8 @@ function uo({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9901
9900
|
}]), l = (p) => n(e.filter((m, b) => b !== p)), c = (p, m) => n(e.map((b, h) => h === p ? { ...b, connector: m } : b)), f = (p, m) => n(e.map((b, h) => h === p ? { ...b, ...m } : b)), g = (p, m) => n(e.map(
|
|
9902
9901
|
(b, h) => h === p ? { ...b, entries: m } : b
|
|
9903
9902
|
));
|
|
9904
|
-
return /* @__PURE__ */
|
|
9905
|
-
e.map((p, m) => /* @__PURE__ */
|
|
9903
|
+
return /* @__PURE__ */ E(D, { sx: { mt: i === 0 ? 1.25 : 0.25 }, children: [
|
|
9904
|
+
e.map((p, m) => /* @__PURE__ */ E(D, { children: [
|
|
9906
9905
|
m > 0 && /* @__PURE__ */ d(D, { sx: { display: "flex", alignItems: "center", my: "10px" }, children: /* @__PURE__ */ d(
|
|
9907
9906
|
ed,
|
|
9908
9907
|
{
|
|
@@ -9921,9 +9920,9 @@ function uo({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9921
9920
|
onRemove: () => l(m),
|
|
9922
9921
|
formValues: a
|
|
9923
9922
|
}
|
|
9924
|
-
) : /* @__PURE__ */
|
|
9923
|
+
) : /* @__PURE__ */ E(D, { children: [
|
|
9925
9924
|
m === 0 && /* @__PURE__ */ d(fe, { sx: { fontSize: 12, fontWeight: 600, color: "#475569", mb: 0.75 }, children: "When" }),
|
|
9926
|
-
/* @__PURE__ */
|
|
9925
|
+
/* @__PURE__ */ E(D, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
9927
9926
|
/* @__PURE__ */ d(D, { sx: { display: "grid", gridTemplateColumns: "repeat(12, 1fr)", gap: 0.75, flex: 1 }, children: t.fields.map((b) => /* @__PURE__ */ d(D, { sx: { gridColumn: `span ${b.colSpan ?? 4}` }, children: /* @__PURE__ */ d(
|
|
9928
9927
|
td,
|
|
9929
9928
|
{
|
|
@@ -9948,7 +9947,7 @@ function uo({ conditionDef: t, entries: e, onUpdate: n, depth: i = 0, fieldPath:
|
|
|
9948
9947
|
] })
|
|
9949
9948
|
] })
|
|
9950
9949
|
] }, m)),
|
|
9951
|
-
/* @__PURE__ */
|
|
9950
|
+
/* @__PURE__ */ E(D, { sx: { display: "flex", alignItems: "center", gap: 1, mt: e.length > 0 ? 1.5 : 0 }, children: [
|
|
9952
9951
|
/* @__PURE__ */ d(
|
|
9953
9952
|
Mn,
|
|
9954
9953
|
{
|
|
@@ -9996,7 +9995,7 @@ function fo({
|
|
|
9996
9995
|
function rd() {
|
|
9997
9996
|
return Je(co);
|
|
9998
9997
|
}
|
|
9999
|
-
function
|
|
9998
|
+
function Pe(t, e) {
|
|
10000
9999
|
return e.split(".").reduce((n, i) => {
|
|
10001
10000
|
if (!(n == null || typeof n != "object"))
|
|
10002
10001
|
return n[i];
|
|
@@ -10013,15 +10012,15 @@ function pn(t) {
|
|
|
10013
10012
|
}
|
|
10014
10013
|
return !0;
|
|
10015
10014
|
}
|
|
10016
|
-
const Or = "_conditionConfig";
|
|
10015
|
+
const Or = "_conditionConfig", id = "_formulaConfig";
|
|
10017
10016
|
function Fr({
|
|
10018
10017
|
handleRef: t,
|
|
10019
10018
|
onSave: e,
|
|
10020
10019
|
conditionConfigKey: n
|
|
10021
10020
|
}) {
|
|
10022
|
-
const i = Gt(), r =
|
|
10021
|
+
const i = Gt(), r = z(i);
|
|
10023
10022
|
r.current = i;
|
|
10024
|
-
const a =
|
|
10023
|
+
const a = z(e);
|
|
10025
10024
|
return a.current = e, vo(t, () => ({
|
|
10026
10025
|
save: async () => {
|
|
10027
10026
|
var c;
|
|
@@ -10037,55 +10036,62 @@ function Fr({
|
|
|
10037
10036
|
setValues: (o) => r.current.setValues(o)
|
|
10038
10037
|
}), []), null;
|
|
10039
10038
|
}
|
|
10040
|
-
function
|
|
10039
|
+
function od({
|
|
10041
10040
|
conditionConfigKey: t,
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10041
|
+
formulaConfigKey: e,
|
|
10042
|
+
explicitConditionConfig: n,
|
|
10043
|
+
explicitOnConditionConfigChange: i,
|
|
10044
|
+
explicitFormulaConfig: r,
|
|
10045
|
+
explicitOnFormulaConfigChange: a,
|
|
10046
|
+
children: o
|
|
10047
10047
|
}) {
|
|
10048
|
-
const
|
|
10048
|
+
const u = Gt(), s = n ?? Pe(u.values, t) ?? {}, l = (g) => {
|
|
10049
|
+
if (i) {
|
|
10050
|
+
i(g);
|
|
10051
|
+
return;
|
|
10052
|
+
}
|
|
10053
|
+
u.setFieldValue(t, g, !1);
|
|
10054
|
+
}, c = r ?? Pe(u.values, e) ?? {};
|
|
10049
10055
|
return /* @__PURE__ */ d(
|
|
10050
10056
|
fo,
|
|
10051
10057
|
{
|
|
10052
|
-
conditionConfig:
|
|
10053
|
-
onConditionConfigChange:
|
|
10054
|
-
|
|
10055
|
-
|
|
10058
|
+
conditionConfig: s,
|
|
10059
|
+
onConditionConfigChange: l,
|
|
10060
|
+
formulaConfig: c,
|
|
10061
|
+
onFormulaConfigChange: (g) => {
|
|
10062
|
+
if (a) {
|
|
10063
|
+
a(g);
|
|
10056
10064
|
return;
|
|
10057
10065
|
}
|
|
10058
|
-
|
|
10066
|
+
u.setFieldValue(e, g, !1);
|
|
10059
10067
|
},
|
|
10060
|
-
|
|
10061
|
-
onFormulaConfigChange: r,
|
|
10062
|
-
children: a
|
|
10068
|
+
children: o
|
|
10063
10069
|
}
|
|
10064
10070
|
);
|
|
10065
10071
|
}
|
|
10066
|
-
function
|
|
10072
|
+
function ad({ onValuesChange: t }) {
|
|
10067
10073
|
const { values: e } = Gt();
|
|
10068
10074
|
return q(() => {
|
|
10069
10075
|
t(e);
|
|
10070
10076
|
}, [e, t]), null;
|
|
10071
10077
|
}
|
|
10072
|
-
function
|
|
10078
|
+
function sd({ onValidityChange: t }) {
|
|
10073
10079
|
const { isValid: e } = Gt();
|
|
10074
10080
|
return q(() => {
|
|
10075
10081
|
t(e);
|
|
10076
10082
|
}, [e, t]), null;
|
|
10077
10083
|
}
|
|
10078
|
-
const
|
|
10079
|
-
var
|
|
10084
|
+
const ld = Tt(function(e, n) {
|
|
10085
|
+
var s;
|
|
10080
10086
|
if ("form" in e && e.form) {
|
|
10081
|
-
const { form:
|
|
10082
|
-
return /* @__PURE__ */ d(Ln, { value:
|
|
10087
|
+
const { form: l } = e;
|
|
10088
|
+
return /* @__PURE__ */ d(Ln, { value: l._formik, children: /* @__PURE__ */ E(
|
|
10083
10089
|
fo,
|
|
10084
10090
|
{
|
|
10085
|
-
formulaConfig:
|
|
10086
|
-
onFormulaConfigChange:
|
|
10087
|
-
conditionConfig:
|
|
10088
|
-
onConditionConfigChange:
|
|
10091
|
+
formulaConfig: l._formulaConfig,
|
|
10092
|
+
onFormulaConfigChange: l._onFormulaConfigChange,
|
|
10093
|
+
conditionConfig: l._conditionConfig,
|
|
10094
|
+
onConditionConfigChange: l._onConditionConfigChange,
|
|
10089
10095
|
children: [
|
|
10090
10096
|
/* @__PURE__ */ d(
|
|
10091
10097
|
Fr,
|
|
@@ -10094,69 +10100,70 @@ const sd = Tt(function(e, n) {
|
|
|
10094
10100
|
conditionConfigKey: Or
|
|
10095
10101
|
}
|
|
10096
10102
|
),
|
|
10097
|
-
/* @__PURE__ */ d(wr, { schema:
|
|
10103
|
+
/* @__PURE__ */ d(wr, { schema: l._schema, formik: l._formik })
|
|
10098
10104
|
]
|
|
10099
10105
|
}
|
|
10100
10106
|
) });
|
|
10101
10107
|
}
|
|
10102
|
-
const
|
|
10108
|
+
const i = e.conditionConfigKey ?? Or, r = e.formulaConfigKey ?? id, a = (l) => /* @__PURE__ */ E(Te, { children: [
|
|
10103
10109
|
/* @__PURE__ */ d(
|
|
10104
10110
|
Fr,
|
|
10105
10111
|
{
|
|
10106
10112
|
handleRef: n,
|
|
10107
10113
|
onSave: e.onSave,
|
|
10108
|
-
conditionConfigKey:
|
|
10114
|
+
conditionConfigKey: i
|
|
10109
10115
|
}
|
|
10110
10116
|
),
|
|
10111
10117
|
/* @__PURE__ */ d(
|
|
10112
|
-
|
|
10118
|
+
od,
|
|
10113
10119
|
{
|
|
10114
|
-
conditionConfigKey:
|
|
10120
|
+
conditionConfigKey: i,
|
|
10121
|
+
formulaConfigKey: r,
|
|
10115
10122
|
explicitConditionConfig: e.conditionConfig,
|
|
10116
10123
|
explicitOnConditionConfigChange: e.onConditionConfigChange,
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
children:
|
|
10124
|
+
explicitFormulaConfig: e.formulaConfig,
|
|
10125
|
+
explicitOnFormulaConfigChange: e.onFormulaConfigChange,
|
|
10126
|
+
children: l
|
|
10120
10127
|
}
|
|
10121
10128
|
)
|
|
10122
10129
|
] });
|
|
10123
|
-
let
|
|
10130
|
+
let u = e.formik ? /* @__PURE__ */ d(Ln, { value: e.formik, children: a(
|
|
10124
10131
|
/* @__PURE__ */ d(wr, { schema: e.schema, formik: e.formik })
|
|
10125
10132
|
) }) : /* @__PURE__ */ d(
|
|
10126
10133
|
Io,
|
|
10127
10134
|
{
|
|
10128
10135
|
initialValues: e.initialValues,
|
|
10129
10136
|
onSubmit: e.onSubmit,
|
|
10130
|
-
validationSchema: e.validationSchema ?? ((
|
|
10137
|
+
validationSchema: e.validationSchema ?? ((s = e.schema) != null && s.fields ? Pn(e.schema.fields) : void 0),
|
|
10131
10138
|
initialTouched: e.initialTouched,
|
|
10132
10139
|
validateOnMount: !!e.initialTouched,
|
|
10133
10140
|
enableReinitialize: !0,
|
|
10134
10141
|
validateOnChange: !0,
|
|
10135
10142
|
validateOnBlur: !0,
|
|
10136
|
-
children: ({ values:
|
|
10137
|
-
var
|
|
10138
|
-
return /* @__PURE__ */
|
|
10139
|
-
e.onValuesChange && /* @__PURE__ */ d(
|
|
10140
|
-
e.onValidityChange && /* @__PURE__ */ d(
|
|
10141
|
-
|
|
10143
|
+
children: ({ values: l, errors: c, touched: f, isSubmitting: g, setFieldValue: p, setFieldTouched: m }) => {
|
|
10144
|
+
var b;
|
|
10145
|
+
return /* @__PURE__ */ E(yo, { id: e.formId, children: [
|
|
10146
|
+
e.onValuesChange && /* @__PURE__ */ d(ad, { onValuesChange: e.onValuesChange }),
|
|
10147
|
+
e.onValidityChange && /* @__PURE__ */ d(sd, { onValidityChange: e.onValidityChange }),
|
|
10148
|
+
a(
|
|
10142
10149
|
/* @__PURE__ */ d(
|
|
10143
10150
|
po,
|
|
10144
10151
|
{
|
|
10145
10152
|
schema: e.schema,
|
|
10146
|
-
values:
|
|
10147
|
-
errors:
|
|
10148
|
-
touched:
|
|
10149
|
-
setFieldValue:
|
|
10150
|
-
setFieldTouched:
|
|
10153
|
+
values: l,
|
|
10154
|
+
errors: c,
|
|
10155
|
+
touched: f,
|
|
10156
|
+
setFieldValue: p,
|
|
10157
|
+
setFieldTouched: m
|
|
10151
10158
|
}
|
|
10152
10159
|
)
|
|
10153
10160
|
),
|
|
10154
|
-
(
|
|
10161
|
+
(b = e.children) == null ? void 0 : b.call(e, { isSubmitting: g })
|
|
10155
10162
|
] });
|
|
10156
10163
|
}
|
|
10157
10164
|
}
|
|
10158
10165
|
);
|
|
10159
|
-
return e.variableGroups && (
|
|
10166
|
+
return e.variableGroups && (u = /* @__PURE__ */ d(Qo, { groups: e.variableGroups, children: u })), "optionsResolvers" in e && e.optionsResolvers && (u = /* @__PURE__ */ d(ou, { resolvers: e.optionsResolvers, children: u })), /* @__PURE__ */ d(Te, { children: u });
|
|
10160
10167
|
});
|
|
10161
10168
|
function wr({
|
|
10162
10169
|
schema: t,
|
|
@@ -10174,7 +10181,7 @@ function wr({
|
|
|
10174
10181
|
}
|
|
10175
10182
|
);
|
|
10176
10183
|
}
|
|
10177
|
-
class
|
|
10184
|
+
class ud extends Tr {
|
|
10178
10185
|
constructor() {
|
|
10179
10186
|
super(...arguments), this.state = { error: null };
|
|
10180
10187
|
}
|
|
@@ -10196,7 +10203,7 @@ function po({
|
|
|
10196
10203
|
const u = (t.layout ?? "flat") === "flat" ? t.fields ?? [] : [], s = t.compact ?? !1;
|
|
10197
10204
|
return /* @__PURE__ */ d("div", { className: "ff-form-grid", children: u.map((l) => {
|
|
10198
10205
|
const c = oo(l);
|
|
10199
|
-
return /* @__PURE__ */ d(
|
|
10206
|
+
return /* @__PURE__ */ d(ud, { fieldId: c, children: /* @__PURE__ */ d(
|
|
10200
10207
|
mt,
|
|
10201
10208
|
{
|
|
10202
10209
|
field: l,
|
|
@@ -10225,28 +10232,28 @@ function mt({
|
|
|
10225
10232
|
inlineLabel: l,
|
|
10226
10233
|
item: c
|
|
10227
10234
|
}) {
|
|
10228
|
-
var
|
|
10229
|
-
const { formulaConfig: f, onFormulaConfigChange: g, conditionConfig: p, onConditionConfigChange: m } = rd(), b = { values: i, item: c }, h =
|
|
10235
|
+
var C;
|
|
10236
|
+
const { formulaConfig: f, onFormulaConfigChange: g, conditionConfig: p, onConditionConfigChange: m } = rd(), b = { values: i, item: c }, h = z(i);
|
|
10230
10237
|
h.current = i;
|
|
10231
|
-
const v =
|
|
10238
|
+
const v = z(c);
|
|
10232
10239
|
v.current = c;
|
|
10233
|
-
const A =
|
|
10240
|
+
const A = oe(() => {
|
|
10234
10241
|
const y = Zc(t);
|
|
10235
10242
|
return async (R) => {
|
|
10236
|
-
var
|
|
10237
|
-
const
|
|
10238
|
-
if (!(((
|
|
10243
|
+
var G;
|
|
10244
|
+
const O = { values: h.current, item: v.current };
|
|
10245
|
+
if (!(((G = t.shouldHide) == null ? void 0 : G.call(t, O)) ?? t.hidden))
|
|
10239
10246
|
return y(R);
|
|
10240
10247
|
};
|
|
10241
10248
|
}, [t]);
|
|
10242
10249
|
xo({ name: e, validate: A });
|
|
10243
|
-
const
|
|
10250
|
+
const x = ((C = t.shouldHide) == null ? void 0 : C.call(t, b)) ?? t.hidden ?? !1, I = z(void 0);
|
|
10244
10251
|
return q(() => {
|
|
10245
10252
|
const y = I.current;
|
|
10246
|
-
if (I.current =
|
|
10247
|
-
const R =
|
|
10253
|
+
if (I.current = x, !x || y === !0 || !t.clearOnHide) return;
|
|
10254
|
+
const R = Pe(h.current, e);
|
|
10248
10255
|
R == null || R === "" || Array.isArray(R) && R.length === 0 || o(e, t.defaultValue);
|
|
10249
|
-
}, [
|
|
10256
|
+
}, [x, e, t.clearOnHide, t.defaultValue, o]), x ? null : t.type === "object" ? /* @__PURE__ */ d(Ke, { field: t, compact: s, children: /* @__PURE__ */ d(
|
|
10250
10257
|
jc,
|
|
10251
10258
|
{
|
|
10252
10259
|
field: t,
|
|
@@ -10281,7 +10288,7 @@ function mt({
|
|
|
10281
10288
|
Pt,
|
|
10282
10289
|
{
|
|
10283
10290
|
field: t,
|
|
10284
|
-
value:
|
|
10291
|
+
value: Pe(i, e),
|
|
10285
10292
|
values: i,
|
|
10286
10293
|
onChange: (y) => o(e, y),
|
|
10287
10294
|
onBlur: () => u(e, !0),
|
|
@@ -10341,7 +10348,7 @@ function mt({
|
|
|
10341
10348
|
)
|
|
10342
10349
|
}
|
|
10343
10350
|
) }) : /* @__PURE__ */ d(
|
|
10344
|
-
|
|
10351
|
+
cd,
|
|
10345
10352
|
{
|
|
10346
10353
|
field: t,
|
|
10347
10354
|
pathPrefix: e,
|
|
@@ -10360,7 +10367,7 @@ function mt({
|
|
|
10360
10367
|
}
|
|
10361
10368
|
);
|
|
10362
10369
|
}
|
|
10363
|
-
function
|
|
10370
|
+
function cd({
|
|
10364
10371
|
field: t,
|
|
10365
10372
|
pathPrefix: e,
|
|
10366
10373
|
values: n,
|
|
@@ -10376,47 +10383,47 @@ function ud({
|
|
|
10376
10383
|
conditionConfig: g,
|
|
10377
10384
|
onConditionConfigChange: p
|
|
10378
10385
|
}) {
|
|
10379
|
-
var L,
|
|
10380
|
-
const m = { values: n, item: l }, b =
|
|
10386
|
+
var L, B, F;
|
|
10387
|
+
const m = { values: n, item: l }, b = Pe(n, e), h = z(t.compute);
|
|
10381
10388
|
h.current = t.compute, q(() => {
|
|
10382
10389
|
const V = h.current;
|
|
10383
10390
|
if (!V) return;
|
|
10384
|
-
const
|
|
10385
|
-
|
|
10391
|
+
const Z = V({ values: n });
|
|
10392
|
+
Z !== b && a(e, Z);
|
|
10386
10393
|
}, [n, b, e, a]);
|
|
10387
10394
|
const v = te.get(t.type);
|
|
10388
10395
|
if (!v)
|
|
10389
10396
|
return null;
|
|
10390
|
-
const A = typeof t.disabled == "function" ? t.disabled(m) : ((L = t.shouldDisable) == null ? void 0 : L.call(t, m)) ?? t.disabled ?? !1,
|
|
10391
|
-
var U,
|
|
10397
|
+
const A = typeof t.disabled == "function" ? t.disabled(m) : ((L = t.shouldDisable) == null ? void 0 : L.call(t, m)) ?? t.disabled ?? !1, x = Pe(i, e), I = !!Pe(r, e), C = (B = t.compute) == null ? void 0 : B.call(t, m), y = C !== void 0 ? C : b, R = (F = t.transform) != null && F.in ? t.transform.in(y) : y, O = (V) => {
|
|
10398
|
+
var U, $;
|
|
10392
10399
|
if (t.compute) return;
|
|
10393
|
-
const
|
|
10394
|
-
a(e,
|
|
10395
|
-
},
|
|
10400
|
+
const Z = (U = t.transform) != null && U.out ? t.transform.out(V) : V;
|
|
10401
|
+
a(e, Z), o(e, !0), ($ = t.onChange) == null || $.call(t, Z, { values: n, setFieldValue: a });
|
|
10402
|
+
}, G = t.condition && g ? g[e] ?? [] : [], M = (V) => {
|
|
10396
10403
|
if (!(!p || !g))
|
|
10397
10404
|
if (V.length === 0) {
|
|
10398
|
-
const
|
|
10399
|
-
delete
|
|
10405
|
+
const Z = { ...g };
|
|
10406
|
+
delete Z[e], p(Z);
|
|
10400
10407
|
} else
|
|
10401
10408
|
p({ ...g, [e]: V });
|
|
10402
10409
|
}, N = {
|
|
10403
10410
|
field: { ...t, disabled: A, id: e, name: e },
|
|
10404
10411
|
value: R,
|
|
10405
10412
|
values: n,
|
|
10406
|
-
onChange:
|
|
10413
|
+
onChange: O,
|
|
10407
10414
|
onBlur: () => o(e, !0),
|
|
10408
|
-
error:
|
|
10415
|
+
error: x,
|
|
10409
10416
|
touched: I,
|
|
10410
10417
|
formulaConfig: c,
|
|
10411
10418
|
onFormulaConfigChange: f
|
|
10412
10419
|
};
|
|
10413
|
-
return s ? /* @__PURE__ */ d(v, { ...N, inlineLabel: !0 }) : /* @__PURE__ */
|
|
10420
|
+
return s ? /* @__PURE__ */ d(v, { ...N, inlineLabel: !0 }) : /* @__PURE__ */ E(Ke, { field: t, compact: u, children: [
|
|
10414
10421
|
/* @__PURE__ */ d(v, { ...N, touched: I }),
|
|
10415
10422
|
t.condition && /* @__PURE__ */ d(
|
|
10416
10423
|
uo,
|
|
10417
10424
|
{
|
|
10418
10425
|
conditionDef: t.condition,
|
|
10419
|
-
entries:
|
|
10426
|
+
entries: G,
|
|
10420
10427
|
onUpdate: M,
|
|
10421
10428
|
fieldPath: e,
|
|
10422
10429
|
formValues: n
|
|
@@ -10424,49 +10431,49 @@ function ud({
|
|
|
10424
10431
|
)
|
|
10425
10432
|
] });
|
|
10426
10433
|
}
|
|
10427
|
-
const
|
|
10434
|
+
const Bd = ld;
|
|
10428
10435
|
export {
|
|
10429
|
-
|
|
10436
|
+
Td as A,
|
|
10430
10437
|
rt as B,
|
|
10431
|
-
|
|
10432
|
-
|
|
10438
|
+
Ed as C,
|
|
10439
|
+
Bd as D,
|
|
10433
10440
|
Mc as E,
|
|
10434
10441
|
S as F,
|
|
10435
10442
|
oo as G,
|
|
10436
10443
|
$c as H,
|
|
10437
10444
|
Zu as I,
|
|
10438
10445
|
Y as J,
|
|
10439
|
-
|
|
10446
|
+
Gd as K,
|
|
10440
10447
|
_u as L,
|
|
10441
10448
|
ou as O,
|
|
10442
10449
|
kc as T,
|
|
10443
|
-
|
|
10450
|
+
wd as V,
|
|
10444
10451
|
ma as _,
|
|
10445
10452
|
Hc as a,
|
|
10446
|
-
|
|
10453
|
+
ld as b,
|
|
10447
10454
|
Qr as c,
|
|
10448
10455
|
Qo as d,
|
|
10449
|
-
|
|
10456
|
+
Rd as e,
|
|
10450
10457
|
_r as f,
|
|
10451
|
-
|
|
10458
|
+
xd as g,
|
|
10452
10459
|
Xr as h,
|
|
10453
|
-
|
|
10460
|
+
yd as i,
|
|
10454
10461
|
Wr as j,
|
|
10455
10462
|
Pn as k,
|
|
10456
10463
|
pe as l,
|
|
10457
10464
|
ko as m,
|
|
10458
10465
|
te as n,
|
|
10459
|
-
|
|
10466
|
+
Ad as o,
|
|
10460
10467
|
ce as p,
|
|
10461
|
-
|
|
10462
|
-
|
|
10468
|
+
Id as q,
|
|
10469
|
+
Sd as r,
|
|
10463
10470
|
Ve as s,
|
|
10464
10471
|
De as t,
|
|
10465
10472
|
It as u,
|
|
10466
|
-
|
|
10467
|
-
|
|
10473
|
+
Cd as v,
|
|
10474
|
+
Fd as w,
|
|
10468
10475
|
jo as x,
|
|
10469
|
-
|
|
10476
|
+
Od as y,
|
|
10470
10477
|
su as z
|
|
10471
10478
|
};
|
|
10472
|
-
//# sourceMappingURL=index-
|
|
10479
|
+
//# sourceMappingURL=index-B-D9UuLO.js.map
|