@notmrabhi/flowforge 0.1.34 → 0.1.35
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-BbkOK4Xc.js → SchemaBuilderDrawer-CUzYWGCN.js} +2 -2
- package/dist/{SchemaBuilderDrawer-BbkOK4Xc.js.map → SchemaBuilderDrawer-CUzYWGCN.js.map} +1 -1
- package/dist/{SchemaBuilderDrawer-BcaULxqB.js → SchemaBuilderDrawer-CiSdfXzJ.js} +2 -2
- package/dist/{SchemaBuilderDrawer-BcaULxqB.js.map → SchemaBuilderDrawer-CiSdfXzJ.js.map} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +24 -0
- package/dist/canvas.js +1 -1
- package/dist/core.d.ts +12 -0
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +12 -0
- package/dist/form.js +2 -2
- package/dist/{index-CEg1wTCw.js → index-B74jTc2b.js} +869 -862
- package/dist/{index-CEg1wTCw.js.map → index-B74jTc2b.js.map} +1 -1
- package/dist/{index-CYdDPwd2.js → index-B8-KKaH_.js} +2 -2
- package/dist/{index-CYdDPwd2.js.map → index-B8-KKaH_.js.map} +1 -1
- package/dist/{index-dhI8qsmP.js → index-Buv1ylwP.js} +2 -2
- package/dist/{index-dhI8qsmP.js.map → index-Buv1ylwP.js.map} +1 -1
- package/dist/{index-fcb3uyVA.js → index-CiU9_8f1.js} +2 -2
- package/dist/{index-fcb3uyVA.js.map → index-CiU9_8f1.js.map} +1 -1
- package/dist/{index-x1DrmceO.js → index-CqMPyOkL.js} +5 -5
- package/dist/{index-x1DrmceO.js.map → index-CqMPyOkL.js.map} +1 -1
- package/dist/{index-B9W10Fvn.js → index-DjKhaaWf.js} +2 -2
- package/dist/{index-B9W10Fvn.js.map → index-DjKhaaWf.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +3 -3
- package/dist/nodeRegistry.d.ts +12 -0
- package/dist/{templateSkeletons-CY4tkEp2.js → templateSkeletons-BTC2fk5u.js} +2 -2
- package/dist/{templateSkeletons-CY4tkEp2.js.map → templateSkeletons-BTC2fk5u.js.map} +1 -1
- package/dist/{templateSkeletons-BPIZ_EHv.js → templateSkeletons-DCvfog6-.js} +2 -2
- package/dist/{templateSkeletons-BPIZ_EHv.js.map → templateSkeletons-DCvfog6-.js.map} +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { jsxs as O, jsx as d, Fragment as Ve } from "react/jsx-runtime";
|
|
|
2
2
|
import * as K from "react";
|
|
3
3
|
import Qe, { createContext as Ot, useContext as Ft, useState as L, useRef as H, useCallback as z, useEffect as q, useMemo as ae, useLayoutEffect as go, Component as Fr, Fragment as qt, forwardRef as wt, Suspense as wr, useImperativeHandle as bo } from "react";
|
|
4
4
|
import { FormikProvider as Pn, Formik as ho, Form as mo, useField as vo, useFormikContext as Tt } from "formik";
|
|
5
|
-
import { MdInfoOutline as Io, MdDataObject as Gt, MdClose as Fe, MdSearch as gn, MdKeyboardArrowRight as bn, MdContentCopy as
|
|
5
|
+
import { MdInfoOutline as Io, MdDataObject as Gt, MdClose as Fe, MdSearch as gn, MdKeyboardArrowRight as bn, MdContentCopy as yo, MdCheckCircle as xo, MdAdd as qe, MdUploadFile as Co, MdInsertDriveFile as Ao, MdDeleteOutline as Tr, MdKeyboardArrowDown as So } from "react-icons/md";
|
|
6
6
|
import { Tooltip as Se, IconButton as Gr, Box as N, Typography as de, InputBase as Ro, Divider as hn, Collapse as Br, Snackbar as Eo, Alert as Oo, Select as Vr, MenuItem as bt, TextField as Dr, FormControlLabel as Nr, Switch as Fo, RadioGroup as wo, Radio as To, Slider as Go, Chip as Bo, Button as Ln } from "@mui/material";
|
|
7
7
|
import Vo, { createPortal as Do } from "react-dom";
|
|
8
8
|
import mn, { components as vn } from "react-select";
|
|
@@ -22,7 +22,7 @@ const nt = /* @__PURE__ */ new Map(), te = {
|
|
|
22
22
|
keys() {
|
|
23
23
|
return Array.from(nt.keys());
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, R = {
|
|
26
26
|
// Input dimensions
|
|
27
27
|
INPUT_HEIGHT: 38,
|
|
28
28
|
INPUT_PADDING: "0 12px",
|
|
@@ -57,15 +57,15 @@ const nt = /* @__PURE__ */ new Map(), te = {
|
|
|
57
57
|
};
|
|
58
58
|
function fd(n) {
|
|
59
59
|
return {
|
|
60
|
-
height:
|
|
60
|
+
height: R.INPUT_HEIGHT,
|
|
61
61
|
width: "100%",
|
|
62
|
-
padding:
|
|
63
|
-
fontSize:
|
|
62
|
+
padding: R.INPUT_PADDING,
|
|
63
|
+
fontSize: R.INPUT_FONT_SIZE,
|
|
64
64
|
fontFamily: "inherit",
|
|
65
|
-
color: n.isDisabled ?
|
|
66
|
-
background: n.isDisabled ?
|
|
67
|
-
border: n.hasError ?
|
|
68
|
-
borderRadius:
|
|
65
|
+
color: n.isDisabled ? R.COLOR_DISABLED_TEXT : R.COLOR_LABEL,
|
|
66
|
+
background: n.isDisabled ? R.COLOR_DISABLED_BG : "#fff",
|
|
67
|
+
border: n.hasError ? R.BORDER_ERROR : R.BORDER,
|
|
68
|
+
borderRadius: R.BORDER_RADIUS,
|
|
69
69
|
outline: "none",
|
|
70
70
|
boxSizing: "border-box",
|
|
71
71
|
transition: "border-color 0.15s, box-shadow 0.15s",
|
|
@@ -77,44 +77,44 @@ function Lr(n, e) {
|
|
|
77
77
|
return {
|
|
78
78
|
control: (t, i) => ({
|
|
79
79
|
...t,
|
|
80
|
-
minHeight:
|
|
81
|
-
height: e ? void 0 :
|
|
82
|
-
fontSize:
|
|
80
|
+
minHeight: R.INPUT_HEIGHT,
|
|
81
|
+
height: e ? void 0 : R.INPUT_HEIGHT,
|
|
82
|
+
fontSize: R.INPUT_FONT_SIZE,
|
|
83
83
|
fontFamily: "inherit",
|
|
84
|
-
borderRadius:
|
|
85
|
-
borderColor: n ?
|
|
86
|
-
boxShadow: i.isFocused ? n ?
|
|
84
|
+
borderRadius: R.BORDER_RADIUS,
|
|
85
|
+
borderColor: n ? R.BORDER_COLOR_ERROR : i.isFocused ? R.BORDER_COLOR_FOCUS : R.BORDER_COLOR,
|
|
86
|
+
boxShadow: i.isFocused ? n ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW : "none",
|
|
87
87
|
transition: "border-color 0.15s, box-shadow 0.15s",
|
|
88
88
|
"&:hover": {
|
|
89
|
-
borderColor: n ?
|
|
89
|
+
borderColor: n ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_HOVER
|
|
90
90
|
}
|
|
91
91
|
}),
|
|
92
|
-
valueContainer: (t) => ({ ...t, padding: e ? "1px 8px" : "0 8px", fontSize:
|
|
93
|
-
input: (t) => ({ ...t, margin: 0, padding: 0, fontSize:
|
|
94
|
-
placeholder: (t) => ({ ...t, color:
|
|
95
|
-
singleValue: (t) => ({ ...t, fontSize:
|
|
92
|
+
valueContainer: (t) => ({ ...t, padding: e ? "1px 8px" : "0 8px", fontSize: R.INPUT_FONT_SIZE }),
|
|
93
|
+
input: (t) => ({ ...t, margin: 0, padding: 0, fontSize: R.INPUT_FONT_SIZE }),
|
|
94
|
+
placeholder: (t) => ({ ...t, color: R.COLOR_PLACEHOLDER, fontSize: R.INPUT_FONT_SIZE }),
|
|
95
|
+
singleValue: (t) => ({ ...t, fontSize: R.INPUT_FONT_SIZE, color: R.COLOR_LABEL }),
|
|
96
96
|
dropdownIndicator: (t) => ({ ...t, padding: "0 8px" }),
|
|
97
97
|
clearIndicator: (t) => ({ ...t, padding: "0 4px" }),
|
|
98
98
|
indicatorSeparator: (t) => ({ ...t, marginTop: 6, marginBottom: 6 }),
|
|
99
99
|
option: (t, { isDisabled: i }) => ({
|
|
100
100
|
...t,
|
|
101
|
-
fontSize:
|
|
101
|
+
fontSize: R.INPUT_FONT_SIZE,
|
|
102
102
|
cursor: i ? "not-allowed" : "pointer"
|
|
103
103
|
}),
|
|
104
|
-
menu: (t) => ({ ...t, borderRadius:
|
|
104
|
+
menu: (t) => ({ ...t, borderRadius: R.BORDER_RADIUS, zIndex: 9999 }),
|
|
105
105
|
menuPortal: (t) => ({ ...t, zIndex: 9999 })
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
const fe = {
|
|
109
109
|
display: "flex",
|
|
110
|
-
color:
|
|
111
|
-
fontSize:
|
|
112
|
-
marginTop:
|
|
110
|
+
color: R.COLOR_ERROR,
|
|
111
|
+
fontSize: R.FONT_SIZE_HELPER,
|
|
112
|
+
marginTop: R.HELPER_MT,
|
|
113
113
|
lineHeight: 1.4
|
|
114
114
|
}, ue = {
|
|
115
|
-
color:
|
|
116
|
-
fontSize:
|
|
117
|
-
marginTop:
|
|
115
|
+
color: R.COLOR_HELPER,
|
|
116
|
+
fontSize: R.FONT_SIZE_HELPER,
|
|
117
|
+
marginTop: R.HELPER_MT,
|
|
118
118
|
lineHeight: 1.4
|
|
119
119
|
}, Po = /_DE_\{_P\('([^']*)'\)\}|_P\('([^']*)'\)/g, Lo = /_DE_\{_P\('([^']*)'\)\}/g;
|
|
120
120
|
function Mo(n) {
|
|
@@ -195,7 +195,7 @@ function Xr(n) {
|
|
|
195
195
|
const e = n.trim(), t = e.match(/^_DE_\{_P\('([^']*)'\)\}$/);
|
|
196
196
|
return t ? `_P('${t[1]}')` : /^_P\('[^']*'\)$/.test(e) ? e : n;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ho(n) {
|
|
199
199
|
const e = {
|
|
200
200
|
field: Xr(n.field),
|
|
201
201
|
operator: n.operator,
|
|
@@ -208,7 +208,7 @@ function kr(n) {
|
|
|
208
208
|
type: "group",
|
|
209
209
|
entries: n.entries.map(kr),
|
|
210
210
|
...n.connector && { connector: n.connector }
|
|
211
|
-
} :
|
|
211
|
+
} : Ho(n);
|
|
212
212
|
}
|
|
213
213
|
function gd({
|
|
214
214
|
values: n,
|
|
@@ -225,7 +225,7 @@ function gd({
|
|
|
225
225
|
function Ie(n) {
|
|
226
226
|
return n !== "" && !isNaN(Number(n)) ? n : `'${n}'`;
|
|
227
227
|
}
|
|
228
|
-
const
|
|
228
|
+
const zo = {
|
|
229
229
|
equals: (n, e) => `${n} == ${Ie(e)}`,
|
|
230
230
|
notEquals: (n, e) => `${n} != ${Ie(e)}`,
|
|
231
231
|
contains: (n, e) => `contains(${n}, ${Ie(e)})`,
|
|
@@ -241,11 +241,11 @@ const Ho = {
|
|
|
241
241
|
};
|
|
242
242
|
function Zo(n) {
|
|
243
243
|
if (Wr(n))
|
|
244
|
-
return `(${
|
|
245
|
-
const e = Xr(n.field) || `_P('${n.field}')`, t =
|
|
244
|
+
return `(${Hr(n.entries)})`;
|
|
245
|
+
const e = Xr(n.field) || `_P('${n.field}')`, t = zo[n.operator];
|
|
246
246
|
return t ? t(e, n.value ?? "") : `${e} ${n.operator} '${n.value ?? ""}'`;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Hr(n) {
|
|
249
249
|
return n.map((e, t) => {
|
|
250
250
|
const i = Zo(e);
|
|
251
251
|
return t === 0 ? i : (e.connector === "or" ? " || " : " && ") + i;
|
|
@@ -253,7 +253,7 @@ function zr(n) {
|
|
|
253
253
|
}
|
|
254
254
|
function bd(n) {
|
|
255
255
|
return Object.fromEntries(
|
|
256
|
-
Object.entries(n).filter(([, e]) => e.length > 0).map(([e, t]) => [e,
|
|
256
|
+
Object.entries(n).filter(([, e]) => e.length > 0).map(([e, t]) => [e, Hr(t)])
|
|
257
257
|
);
|
|
258
258
|
}
|
|
259
259
|
function hd(n) {
|
|
@@ -262,7 +262,7 @@ function hd(n) {
|
|
|
262
262
|
function md(n) {
|
|
263
263
|
return n.some((e) => e.type !== "text");
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function zr(n, e = !1) {
|
|
266
266
|
const t = [];
|
|
267
267
|
for (const i of n)
|
|
268
268
|
if (i.type === "text")
|
|
@@ -282,19 +282,19 @@ function Hr(n, e = !1) {
|
|
|
282
282
|
return t;
|
|
283
283
|
}
|
|
284
284
|
function _o(n, e = !1) {
|
|
285
|
-
return
|
|
285
|
+
return zr(Te(n, e), e);
|
|
286
286
|
}
|
|
287
|
-
const In = "_DE_{_P(",
|
|
287
|
+
const In = "_DE_{_P(", yn = ")}";
|
|
288
288
|
function vd(n) {
|
|
289
|
-
return typeof n == "string" && n.startsWith(In) && n.endsWith(
|
|
289
|
+
return typeof n == "string" && n.startsWith(In) && n.endsWith(yn);
|
|
290
290
|
}
|
|
291
291
|
function Id(n) {
|
|
292
|
-
return `${In}'${n}'${
|
|
293
|
-
}
|
|
294
|
-
function xd(n) {
|
|
295
|
-
return n.slice(In.length, -xn.length).replace(/^['"]|['"]$/g, "");
|
|
292
|
+
return `${In}'${n}'${yn}`;
|
|
296
293
|
}
|
|
297
294
|
function yd(n) {
|
|
295
|
+
return n.slice(In.length, -yn.length).replace(/^['"]|['"]$/g, "");
|
|
296
|
+
}
|
|
297
|
+
function xd(n) {
|
|
298
298
|
return n.replace(/_DE_\{_P\('[^']*'\)\}/g, "");
|
|
299
299
|
}
|
|
300
300
|
function le({ label: n, required: e, showOptional: t, info: i, htmlFor: r, dataTestId: a }) {
|
|
@@ -341,7 +341,7 @@ const Jo = {
|
|
|
341
341
|
whiteSpace: "nowrap",
|
|
342
342
|
fontFamily: "inherit"
|
|
343
343
|
}, Yo = "font-family:monospace;font-size:inherit;opacity:0.5;margin-right:2px;";
|
|
344
|
-
function
|
|
344
|
+
function xn(n) {
|
|
345
345
|
const { expr: e, label: t, path: i } = n, r = document.createElement("span");
|
|
346
346
|
r.contentEditable = "false", r.dataset.expr = e, r.dataset.label = t, r.dataset.path = i;
|
|
347
347
|
const a = document.createElement("span");
|
|
@@ -354,31 +354,31 @@ const _r = Ot(null);
|
|
|
354
354
|
function jo({ groups: n, children: e }) {
|
|
355
355
|
const [t, i] = L(!1), [r, a] = L(null), [o, u] = L(null), s = H(null), l = H(0), c = z(() => i(!0), []), f = z(() => {
|
|
356
356
|
i(!1), u(null);
|
|
357
|
-
}, []), g = z((
|
|
358
|
-
|
|
359
|
-
}, []), p = z((
|
|
360
|
-
s.current =
|
|
361
|
-
}, []), m = z((
|
|
362
|
-
s.current && (s.current.savedRange =
|
|
363
|
-
}, []), b = z((
|
|
364
|
-
const
|
|
365
|
-
if (!
|
|
366
|
-
if (
|
|
367
|
-
|
|
357
|
+
}, []), g = z((h, v) => {
|
|
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 = z((h) => {
|
|
360
|
+
s.current = h, a(h.fieldId);
|
|
361
|
+
}, []), m = z((h) => {
|
|
362
|
+
s.current && (s.current.savedRange = h);
|
|
363
|
+
}, []), b = z((h, v) => {
|
|
364
|
+
const A = s.current;
|
|
365
|
+
if (!A) return;
|
|
366
|
+
if (A.onInsert) {
|
|
367
|
+
A.onInsert(h, v);
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
if (!
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
let x =
|
|
370
|
+
const C = A.editorRef.current;
|
|
371
|
+
if (!C) return;
|
|
372
|
+
C.focus();
|
|
373
|
+
const I = $o(h, v);
|
|
374
|
+
let x = A.savedRange;
|
|
375
375
|
if (!x) {
|
|
376
376
|
const S = window.getSelection();
|
|
377
|
-
S && S.rangeCount > 0 && (x = S.getRangeAt(0),
|
|
377
|
+
S && S.rangeCount > 0 && (x = S.getRangeAt(0), C.contains(x.commonAncestorContainer) || (x = null));
|
|
378
378
|
}
|
|
379
|
-
x || (x = document.createRange(), x.selectNodeContents(
|
|
380
|
-
const
|
|
381
|
-
|
|
379
|
+
x || (x = document.createRange(), x.selectNodeContents(C), x.collapse(!1)), x.deleteContents(), x.insertNode(I), x.setStartAfter(I), x.collapse(!0);
|
|
380
|
+
const y = window.getSelection();
|
|
381
|
+
y == null || y.removeAllRanges(), y == null || y.addRange(x), s.current && (s.current.savedRange = x.cloneRange()), C.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
382
382
|
}, []);
|
|
383
383
|
return /* @__PURE__ */ d(_r.Provider, { value: {
|
|
384
384
|
groups: n,
|
|
@@ -390,8 +390,8 @@ function jo({ groups: n, children: e }) {
|
|
|
390
390
|
saveRange: m,
|
|
391
391
|
insertVariable: b,
|
|
392
392
|
activeFieldId: r,
|
|
393
|
-
notifyFieldFocus: (
|
|
394
|
-
a(
|
|
393
|
+
notifyFieldFocus: (h, v) => {
|
|
394
|
+
a(h), v && u(v), i(!0);
|
|
395
395
|
},
|
|
396
396
|
anchorEl: o
|
|
397
397
|
}, children: e });
|
|
@@ -400,7 +400,7 @@ function Ke() {
|
|
|
400
400
|
return Ft(_r);
|
|
401
401
|
}
|
|
402
402
|
function $o(n, e) {
|
|
403
|
-
return
|
|
403
|
+
return xn({ expr: Zr(n), label: e, path: n });
|
|
404
404
|
}
|
|
405
405
|
const Kt = "application/x-flowforge-variable";
|
|
406
406
|
function Cn(n) {
|
|
@@ -548,8 +548,8 @@ function Cd({
|
|
|
548
548
|
if (q(() => {
|
|
549
549
|
if (t !== "popover" || !(i != null && i.isOpen)) return;
|
|
550
550
|
function f(g) {
|
|
551
|
-
var
|
|
552
|
-
const p = g.target, m = (
|
|
551
|
+
var h, v;
|
|
552
|
+
const p = g.target, m = (h = s.current) == null ? void 0 : h.contains(p), b = (v = i == null ? void 0 : i.anchorEl) == null ? void 0 : v.contains(p);
|
|
553
553
|
!m && !b && (i == null || i.closePicker());
|
|
554
554
|
}
|
|
555
555
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
@@ -558,8 +558,8 @@ function Cd({
|
|
|
558
558
|
u(null);
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
|
-
const f = i.anchorEl.getBoundingClientRect(), g = n, p = 440, m = i.anchorEl.closest(".MuiDrawer-paper") || i.anchorEl.closest(".MuiDialog-paper") || i.anchorEl.closest(".MuiPaper-root"), b = m ? m.getBoundingClientRect() : f,
|
|
562
|
-
u({ top:
|
|
561
|
+
const f = i.anchorEl.getBoundingClientRect(), g = n, p = 440, m = i.anchorEl.closest(".MuiDrawer-paper") || i.anchorEl.closest(".MuiDialog-paper") || i.anchorEl.closest(".MuiPaper-root"), b = m ? m.getBoundingClientRect() : f, h = b.left - 8, v = window.innerWidth - b.right - 8, A = h >= g ? b.left - g - 8 : v >= g ? b.right + 8 : Math.max(8, b.left - g - 8), C = f.top, I = Math.min(C, window.innerHeight - p - 8);
|
|
562
|
+
u({ top: I, left: A });
|
|
563
563
|
}, [t, i == null ? void 0 : i.anchorEl, i == null ? void 0 : i.isOpen, n]), !i || t === "popover" && !i.isOpen) return null;
|
|
564
564
|
const l = i.groups.some((f) => r ? Cn(f.items).some((g) => !g.children && Jr(g, r)) : !0), c = /* @__PURE__ */ O(
|
|
565
565
|
N,
|
|
@@ -685,7 +685,7 @@ function Cd({
|
|
|
685
685
|
return t === "popover" ? Vo.createPortal(c, document.body) : c;
|
|
686
686
|
}
|
|
687
687
|
function jr(n) {
|
|
688
|
-
return
|
|
688
|
+
return xn({ expr: n.expr, label: n.label, path: n.path });
|
|
689
689
|
}
|
|
690
690
|
function An(n) {
|
|
691
691
|
var i;
|
|
@@ -734,45 +734,45 @@ function $r({
|
|
|
734
734
|
onPickerOpen: l,
|
|
735
735
|
compact: c
|
|
736
736
|
}) {
|
|
737
|
-
const f = H(null), g = H(null), p = H(""), m = H(!1), b = n.length === 0 || n.length === 1 && n[0].type === "text" && !n[0].value,
|
|
737
|
+
const f = H(null), g = H(null), p = H(""), m = H(!1), b = n.length === 0 || n.length === 1 && n[0].type === "text" && !n[0].value, h = Ke(), [v, A] = L(null), [C, I] = L(!1);
|
|
738
738
|
q(() => {
|
|
739
739
|
const E = f.current;
|
|
740
740
|
if (!E) return;
|
|
741
741
|
const P = Ge(n), Z = `${u ? "1" : "0"}:${P}`;
|
|
742
742
|
if (Z === p.current) return;
|
|
743
|
-
const
|
|
744
|
-
if (
|
|
743
|
+
const T = /* @__PURE__ */ new Map();
|
|
744
|
+
if (h != null && h.groups) {
|
|
745
745
|
const _ = (oe) => {
|
|
746
746
|
for (const he of oe)
|
|
747
|
-
he.path &&
|
|
747
|
+
he.path && T.set(he.path, he.label), he.children && _(he.children);
|
|
748
748
|
};
|
|
749
|
-
for (const oe of
|
|
749
|
+
for (const oe of h.groups) _(oe.items);
|
|
750
750
|
}
|
|
751
751
|
const k = /* @__PURE__ */ new Map();
|
|
752
752
|
E.querySelectorAll("[data-path]").forEach((_) => {
|
|
753
753
|
_.dataset.path && _.dataset.label && k.set(_.dataset.path, _.dataset.label);
|
|
754
754
|
});
|
|
755
|
-
const $ =
|
|
755
|
+
const $ = zr(n, u).map((_) => {
|
|
756
756
|
if (_.type !== "chip" || !_.path) return _;
|
|
757
|
-
const oe = k.get(_.path) ??
|
|
757
|
+
const oe = k.get(_.path) ?? T.get(_.path) ?? _.label;
|
|
758
758
|
return { ..._, label: oe };
|
|
759
759
|
});
|
|
760
760
|
qo(E, $), p.current = Z;
|
|
761
|
-
}, [n, u,
|
|
761
|
+
}, [n, u, h == null ? void 0 : h.groups]);
|
|
762
762
|
const x = z(() => {
|
|
763
763
|
const E = f.current;
|
|
764
764
|
if (!E) return;
|
|
765
|
-
const P = Qo(E), Z = Te(P, u),
|
|
766
|
-
|
|
767
|
-
}, [e, u]),
|
|
765
|
+
const P = Qo(E), Z = Te(P, u), T = `${u ? "1" : "0"}:${Ge(Z)}`;
|
|
766
|
+
T !== p.current && (p.current = T, e(Z));
|
|
767
|
+
}, [e, u]), y = z(() => {
|
|
768
768
|
m.current || x();
|
|
769
769
|
}, [x]), S = z((E) => {
|
|
770
770
|
E.preventDefault();
|
|
771
771
|
const P = E.clipboardData.getData("text/plain"), Z = window.getSelection();
|
|
772
772
|
if (!(Z != null && Z.rangeCount)) return;
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
}, [x, u]),
|
|
773
|
+
const T = Z.getRangeAt(0);
|
|
774
|
+
T.deleteContents(), T.insertNode(Ko(_o(P, u))), T.collapse(!1), Z.removeAllRanges(), Z.addRange(T), x();
|
|
775
|
+
}, [x, u]), w = z((E) => {
|
|
776
776
|
const P = window.getSelection();
|
|
777
777
|
if (!(P != null && P.rangeCount)) return;
|
|
778
778
|
const Z = Mn(P.getRangeAt(0).cloneContents());
|
|
@@ -780,41 +780,41 @@ function $r({
|
|
|
780
780
|
}, []), B = z((E) => {
|
|
781
781
|
const P = window.getSelection();
|
|
782
782
|
if (!(P != null && P.rangeCount)) return;
|
|
783
|
-
const Z = P.getRangeAt(0),
|
|
784
|
-
|
|
783
|
+
const Z = P.getRangeAt(0), T = Mn(Z.cloneContents());
|
|
784
|
+
T && (E.clipboardData.setData("text/plain", T), E.preventDefault(), Z.deleteContents(), x());
|
|
785
785
|
}, [x]), M = z((E) => {
|
|
786
786
|
E.key === "Enter" && E.preventDefault();
|
|
787
787
|
}, []), F = z((E, P) => {
|
|
788
788
|
const Z = f.current;
|
|
789
789
|
if (!Z) return;
|
|
790
790
|
Z.focus();
|
|
791
|
-
const
|
|
791
|
+
const T = window.getSelection();
|
|
792
792
|
let k = null;
|
|
793
|
-
|
|
793
|
+
T && T.rangeCount > 0 && Z.contains(T.getRangeAt(0).commonAncestorContainer) ? k = T.getRangeAt(0) : (k = document.createRange(), k.selectNodeContents(Z), k.collapse(!1));
|
|
794
794
|
const $ = Wn(E, P);
|
|
795
|
-
k.deleteContents(), k.insertNode($), k.setStartAfter($), k.collapse(!0),
|
|
795
|
+
k.deleteContents(), k.insertNode($), k.setStartAfter($), k.collapse(!0), T == null || T.removeAllRanges(), T == null || T.addRange(k), x();
|
|
796
796
|
}, [x]), D = z(() => {
|
|
797
|
-
!
|
|
798
|
-
}, [
|
|
797
|
+
!h || !o || (h.registerField({ editorRef: f, savedRange: null, fieldId: o, onInsert: F }), h.notifyFieldFocus(o, f.current));
|
|
798
|
+
}, [h, o, F]), G = z(() => {
|
|
799
799
|
var P;
|
|
800
|
-
if (!
|
|
800
|
+
if (!h) return;
|
|
801
801
|
const E = window.getSelection();
|
|
802
|
-
E && E.rangeCount > 0 && ((P = f.current) != null && P.contains(E.anchorNode)) &&
|
|
803
|
-
}, [
|
|
802
|
+
E && E.rangeCount > 0 && ((P = f.current) != null && P.contains(E.anchorNode)) && h.saveRange(E.getRangeAt(0).cloneRange());
|
|
803
|
+
}, [h]);
|
|
804
804
|
q(() => {
|
|
805
805
|
document.addEventListener("selectionchange", G);
|
|
806
806
|
const E = f.current;
|
|
807
|
-
return E && E.addEventListener("input",
|
|
808
|
-
document.removeEventListener("selectionchange", G), E && E.removeEventListener("input",
|
|
807
|
+
return E && E.addEventListener("input", y), () => {
|
|
808
|
+
document.removeEventListener("selectionchange", G), E && E.removeEventListener("input", y);
|
|
809
809
|
};
|
|
810
|
-
}, [G,
|
|
810
|
+
}, [G, y]);
|
|
811
811
|
const W = z((E) => {
|
|
812
|
-
r || !E.dataTransfer.types.includes(Kt) || (E.preventDefault(), E.dataTransfer.dropEffect = "copy",
|
|
812
|
+
r || !E.dataTransfer.types.includes(Kt) || (E.preventDefault(), E.dataTransfer.dropEffect = "copy", A("valid"));
|
|
813
813
|
}, [r]), V = z(() => {
|
|
814
|
-
|
|
814
|
+
A(null);
|
|
815
815
|
}, []), j = z((E) => {
|
|
816
|
-
if (E.preventDefault(),
|
|
817
|
-
|
|
816
|
+
if (E.preventDefault(), A(null), r) {
|
|
817
|
+
I(!0);
|
|
818
818
|
return;
|
|
819
819
|
}
|
|
820
820
|
const P = E.dataTransfer.getData(Kt);
|
|
@@ -825,15 +825,15 @@ function $r({
|
|
|
825
825
|
} catch {
|
|
826
826
|
return;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
829
|
-
if (!
|
|
828
|
+
const T = ea(E.clientX, E.clientY);
|
|
829
|
+
if (!T) return;
|
|
830
830
|
const k = f.current;
|
|
831
|
-
if (!k || !k.contains(
|
|
831
|
+
if (!k || !k.contains(T.commonAncestorContainer)) return;
|
|
832
832
|
const $ = Wn(Z.path, Z.label);
|
|
833
|
-
|
|
833
|
+
T.deleteContents(), T.insertNode($), T.setStartAfter($), T.collapse(!0);
|
|
834
834
|
const _ = window.getSelection();
|
|
835
|
-
_ == null || _.removeAllRanges(), _ == null || _.addRange(
|
|
836
|
-
}, [r]), Q = (s ? 1 : 0) + (l ? 1 : 0), U = Q > 0 ? `${Q * 30 + 8}px` : "12px", re =
|
|
835
|
+
_ == null || _.removeAllRanges(), _ == null || _.addRange(T), k.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
836
|
+
}, [r]), Q = (s ? 1 : 0) + (l ? 1 : 0), U = Q > 0 ? `${Q * 30 + 8}px` : "12px", re = v === "valid" ? "#16a34a" : v === "invalid" || a ? "#d32f2f" : "rgba(0,0,0,0.23)", ie = 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;
|
|
837
837
|
return /* @__PURE__ */ O(N, { sx: { position: "relative" }, children: [
|
|
838
838
|
/* @__PURE__ */ O(
|
|
839
839
|
N,
|
|
@@ -859,7 +859,7 @@ function $r({
|
|
|
859
859
|
fontSize: c ? 13 : 14,
|
|
860
860
|
lineHeight: 1.5,
|
|
861
861
|
cursor: r ? "not-allowed" : "text",
|
|
862
|
-
bgcolor:
|
|
862
|
+
bgcolor: v === "valid" ? "rgba(22,163,74,0.04)" : r ? "rgba(0,0,0,0.04)" : "#fff",
|
|
863
863
|
transition: "border-color 0.15s, box-shadow 0.15s, background 0.15s",
|
|
864
864
|
boxShadow: ie,
|
|
865
865
|
"&:focus-within": {
|
|
@@ -906,7 +906,7 @@ function $r({
|
|
|
906
906
|
contentEditable: r ? "false" : "true",
|
|
907
907
|
suppressContentEditableWarning: !0,
|
|
908
908
|
onPaste: S,
|
|
909
|
-
onCopy:
|
|
909
|
+
onCopy: w,
|
|
910
910
|
onCut: B,
|
|
911
911
|
onKeyDown: M,
|
|
912
912
|
onFocus: D,
|
|
@@ -954,7 +954,7 @@ function $r({
|
|
|
954
954
|
onClick: (E) => {
|
|
955
955
|
E.stopPropagation();
|
|
956
956
|
const P = !u;
|
|
957
|
-
|
|
957
|
+
h == null || h.notifyFormulaToggle(P, P ? g.current : null), s();
|
|
958
958
|
},
|
|
959
959
|
sx: {
|
|
960
960
|
border: "none",
|
|
@@ -1004,11 +1004,11 @@ function $r({
|
|
|
1004
1004
|
/* @__PURE__ */ d(
|
|
1005
1005
|
Eo,
|
|
1006
1006
|
{
|
|
1007
|
-
open:
|
|
1007
|
+
open: C,
|
|
1008
1008
|
autoHideDuration: 3e3,
|
|
1009
|
-
onClose: () =>
|
|
1009
|
+
onClose: () => I(!1),
|
|
1010
1010
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
1011
|
-
children: /* @__PURE__ */ d(Oo, { severity: "error", onClose: () =>
|
|
1011
|
+
children: /* @__PURE__ */ d(Oo, { severity: "error", onClose: () => I(!1), sx: { fontSize: 13 }, children: "This field is disabled — cannot insert variable" })
|
|
1012
1012
|
}
|
|
1013
1013
|
)
|
|
1014
1014
|
] });
|
|
@@ -1025,7 +1025,7 @@ function ea(n, e) {
|
|
|
1025
1025
|
return null;
|
|
1026
1026
|
}
|
|
1027
1027
|
function Wn(n, e) {
|
|
1028
|
-
return
|
|
1028
|
+
return xn({ expr: Zr(n), label: e, path: n });
|
|
1029
1029
|
}
|
|
1030
1030
|
function Ur({
|
|
1031
1031
|
field: n,
|
|
@@ -1044,33 +1044,33 @@ function Ur({
|
|
|
1044
1044
|
b.current = p, q(() => () => {
|
|
1045
1045
|
b.current && (g == null || g.notifyFormulaToggle(!1));
|
|
1046
1046
|
}, []);
|
|
1047
|
-
const [
|
|
1047
|
+
const [h, v] = L(
|
|
1048
1048
|
() => f ? Te(String(e ?? ""), c in (o ?? {})) : []
|
|
1049
|
-
), [
|
|
1049
|
+
), [A, C] = L(() => String(e ?? "")), I = H(e);
|
|
1050
1050
|
q(() => {
|
|
1051
|
-
if (e ===
|
|
1052
|
-
|
|
1051
|
+
if (e === I.current) return;
|
|
1052
|
+
I.current = e;
|
|
1053
1053
|
const E = String(e ?? "");
|
|
1054
|
-
|
|
1054
|
+
C(E), f && v(Te(E, p));
|
|
1055
1055
|
}, [e]);
|
|
1056
1056
|
const x = (E) => {
|
|
1057
|
-
|
|
1057
|
+
v(E);
|
|
1058
1058
|
const P = p ? ht(E) : Ge(E);
|
|
1059
|
-
|
|
1060
|
-
},
|
|
1059
|
+
I.current = P, t(P);
|
|
1060
|
+
}, y = () => {
|
|
1061
1061
|
const E = !p;
|
|
1062
1062
|
if (m(E), E) {
|
|
1063
|
-
const P = Ge(
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1063
|
+
const P = Ge(h), Z = Te(P, !0);
|
|
1064
|
+
v(Z);
|
|
1065
|
+
const T = ht(Z);
|
|
1066
|
+
I.current = T, t(T), u == null || u({ ...o, [c]: Mr() });
|
|
1067
1067
|
} else {
|
|
1068
|
-
const P = Ge(
|
|
1069
|
-
|
|
1068
|
+
const P = Ge(h);
|
|
1069
|
+
I.current = P, t(P);
|
|
1070
1070
|
const Z = { ...o };
|
|
1071
1071
|
delete Z[c], u == null || u(Z);
|
|
1072
1072
|
}
|
|
1073
|
-
}, S = a && !!r,
|
|
1073
|
+
}, S = a && !!r, w = l.disabled === !0, B = /* @__PURE__ */ d(
|
|
1074
1074
|
le,
|
|
1075
1075
|
{
|
|
1076
1076
|
label: l.label,
|
|
@@ -1088,14 +1088,14 @@ function Ur({
|
|
|
1088
1088
|
$r,
|
|
1089
1089
|
{
|
|
1090
1090
|
id: c,
|
|
1091
|
-
expression:
|
|
1091
|
+
expression: h,
|
|
1092
1092
|
onExpressionChange: x,
|
|
1093
1093
|
onBlur: i,
|
|
1094
1094
|
placeholder: l.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
1095
|
-
disabled:
|
|
1095
|
+
disabled: w,
|
|
1096
1096
|
error: S,
|
|
1097
1097
|
formulaConfigEnabled: p,
|
|
1098
|
-
onFormulaConfigToggle:
|
|
1098
|
+
onFormulaConfigToggle: y,
|
|
1099
1099
|
compact: l.compact
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
@@ -1113,9 +1113,9 @@ function Ur({
|
|
|
1113
1113
|
width: "100%",
|
|
1114
1114
|
fontSize: 14,
|
|
1115
1115
|
color: "#374151",
|
|
1116
|
-
backgroundColor:
|
|
1117
|
-
border: `1px solid ${S ?
|
|
1118
|
-
borderRadius:
|
|
1116
|
+
backgroundColor: w ? "#f9fafb" : "#fff",
|
|
1117
|
+
border: `1px solid ${S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR}`,
|
|
1118
|
+
borderRadius: R.BORDER_RADIUS,
|
|
1119
1119
|
outline: "none",
|
|
1120
1120
|
paddingTop: l.multiline ? "8px" : "6px",
|
|
1121
1121
|
paddingBottom: l.multiline ? "8px" : "6px",
|
|
@@ -1123,16 +1123,16 @@ function Ur({
|
|
|
1123
1123
|
paddingRight: G ? 0 : "12px",
|
|
1124
1124
|
boxSizing: "border-box",
|
|
1125
1125
|
lineHeight: 1.5,
|
|
1126
|
-
cursor:
|
|
1126
|
+
cursor: w ? "not-allowed" : void 0,
|
|
1127
1127
|
resize: l.multiline ? "vertical" : "none"
|
|
1128
1128
|
}, V = {
|
|
1129
1129
|
position: "relative",
|
|
1130
1130
|
display: "flex",
|
|
1131
1131
|
alignItems: "stretch",
|
|
1132
1132
|
width: "100%",
|
|
1133
|
-
border: `1px solid ${S ?
|
|
1134
|
-
borderRadius:
|
|
1135
|
-
backgroundColor:
|
|
1133
|
+
border: `1px solid ${S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR}`,
|
|
1134
|
+
borderRadius: R.BORDER_RADIUS,
|
|
1135
|
+
backgroundColor: w ? "#f9fafb" : "#fff",
|
|
1136
1136
|
boxSizing: "border-box"
|
|
1137
1137
|
}, j = {
|
|
1138
1138
|
display: "flex",
|
|
@@ -1151,7 +1151,7 @@ function Ur({
|
|
|
1151
1151
|
fontSize: 14,
|
|
1152
1152
|
color: "#374151",
|
|
1153
1153
|
padding: l.multiline ? "8px 12px" : "6px 12px",
|
|
1154
|
-
cursor:
|
|
1154
|
+
cursor: w ? "not-allowed" : void 0,
|
|
1155
1155
|
resize: l.multiline ? "vertical" : "none",
|
|
1156
1156
|
boxSizing: "border-box",
|
|
1157
1157
|
lineHeight: 1.5
|
|
@@ -1160,10 +1160,10 @@ function Ur({
|
|
|
1160
1160
|
{
|
|
1161
1161
|
style: V,
|
|
1162
1162
|
onFocus: (E) => {
|
|
1163
|
-
E.currentTarget.style.borderColor = S ?
|
|
1163
|
+
E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
1164
1164
|
},
|
|
1165
1165
|
onBlur: (E) => {
|
|
1166
|
-
E.currentTarget.contains(E.relatedTarget) || (E.currentTarget.style.borderColor = S ?
|
|
1166
|
+
E.currentTarget.contains(E.relatedTarget) || (E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, E.currentTarget.style.boxShadow = "none");
|
|
1167
1167
|
},
|
|
1168
1168
|
children: [
|
|
1169
1169
|
M && /* @__PURE__ */ d("span", { style: j, children: l.prefix }),
|
|
@@ -1174,8 +1174,8 @@ function Ur({
|
|
|
1174
1174
|
name: c,
|
|
1175
1175
|
style: { ...Q, minHeight: 72 },
|
|
1176
1176
|
placeholder: l.placeholder ?? "",
|
|
1177
|
-
value:
|
|
1178
|
-
disabled:
|
|
1177
|
+
value: A,
|
|
1178
|
+
disabled: w,
|
|
1179
1179
|
readOnly: l.readOnly,
|
|
1180
1180
|
rows: l.rows ?? 3,
|
|
1181
1181
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1186,7 +1186,7 @@ function Ur({
|
|
|
1186
1186
|
"aria-required": l.required || void 0,
|
|
1187
1187
|
"aria-invalid": S || void 0,
|
|
1188
1188
|
onChange: (E) => {
|
|
1189
|
-
|
|
1189
|
+
C(E.target.value), I.current = E.target.value, t(E.target.value);
|
|
1190
1190
|
},
|
|
1191
1191
|
onBlur: i
|
|
1192
1192
|
}
|
|
@@ -1198,8 +1198,8 @@ function Ur({
|
|
|
1198
1198
|
type: l.inputType ?? "text",
|
|
1199
1199
|
style: Q,
|
|
1200
1200
|
placeholder: l.placeholder ?? "",
|
|
1201
|
-
value:
|
|
1202
|
-
disabled:
|
|
1201
|
+
value: A,
|
|
1202
|
+
disabled: w,
|
|
1203
1203
|
readOnly: l.readOnly,
|
|
1204
1204
|
autoComplete: l.autocomplete ?? "off",
|
|
1205
1205
|
autoFocus: l.autoFocus,
|
|
@@ -1209,7 +1209,7 @@ function Ur({
|
|
|
1209
1209
|
"aria-required": l.required || void 0,
|
|
1210
1210
|
"aria-invalid": S || void 0,
|
|
1211
1211
|
onChange: (E) => {
|
|
1212
|
-
|
|
1212
|
+
C(E.target.value), I.current = E.target.value, t(E.target.value);
|
|
1213
1213
|
},
|
|
1214
1214
|
onBlur: i
|
|
1215
1215
|
}
|
|
@@ -1219,11 +1219,11 @@ function Ur({
|
|
|
1219
1219
|
"button",
|
|
1220
1220
|
{
|
|
1221
1221
|
type: "button",
|
|
1222
|
-
onClick: () => navigator.clipboard.writeText(
|
|
1222
|
+
onClick: () => navigator.clipboard.writeText(A),
|
|
1223
1223
|
"aria-label": "copy",
|
|
1224
1224
|
tabIndex: -1,
|
|
1225
1225
|
style: { ...j, background: "none", border: "none", cursor: "pointer", padding: "0 8px" },
|
|
1226
|
-
children: /* @__PURE__ */ d(
|
|
1226
|
+
children: /* @__PURE__ */ d(yo, { size: 16 })
|
|
1227
1227
|
}
|
|
1228
1228
|
) })
|
|
1229
1229
|
]
|
|
@@ -1235,8 +1235,8 @@ function Ur({
|
|
|
1235
1235
|
name: c,
|
|
1236
1236
|
style: { ...W, minHeight: 72, height: void 0, padding: "8px 12px" },
|
|
1237
1237
|
placeholder: l.placeholder ?? "",
|
|
1238
|
-
value:
|
|
1239
|
-
disabled:
|
|
1238
|
+
value: A,
|
|
1239
|
+
disabled: w,
|
|
1240
1240
|
readOnly: l.readOnly,
|
|
1241
1241
|
rows: l.rows ?? 3,
|
|
1242
1242
|
autoComplete: l.autocomplete ?? "off",
|
|
@@ -1247,14 +1247,14 @@ function Ur({
|
|
|
1247
1247
|
"aria-required": l.required || void 0,
|
|
1248
1248
|
"aria-invalid": S || void 0,
|
|
1249
1249
|
onChange: (E) => {
|
|
1250
|
-
|
|
1250
|
+
C(E.target.value), I.current = E.target.value, t(E.target.value);
|
|
1251
1251
|
},
|
|
1252
1252
|
onBlur: i,
|
|
1253
1253
|
onFocus: (E) => {
|
|
1254
|
-
E.currentTarget.style.borderColor = S ?
|
|
1254
|
+
E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
1255
1255
|
},
|
|
1256
1256
|
onBlurCapture: (E) => {
|
|
1257
|
-
E.currentTarget.style.borderColor = S ?
|
|
1257
|
+
E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, E.currentTarget.style.boxShadow = "none";
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
1260
|
) : /* @__PURE__ */ d(
|
|
@@ -1265,8 +1265,8 @@ function Ur({
|
|
|
1265
1265
|
type: l.inputType ?? "text",
|
|
1266
1266
|
style: W,
|
|
1267
1267
|
placeholder: l.placeholder ?? "",
|
|
1268
|
-
value:
|
|
1269
|
-
disabled:
|
|
1268
|
+
value: A,
|
|
1269
|
+
disabled: w,
|
|
1270
1270
|
readOnly: l.readOnly,
|
|
1271
1271
|
autoComplete: l.autocomplete ?? "off",
|
|
1272
1272
|
autoFocus: l.autoFocus,
|
|
@@ -1276,14 +1276,14 @@ function Ur({
|
|
|
1276
1276
|
"aria-required": l.required || void 0,
|
|
1277
1277
|
"aria-invalid": S || void 0,
|
|
1278
1278
|
onChange: (E) => {
|
|
1279
|
-
|
|
1279
|
+
C(E.target.value), I.current = E.target.value, t(E.target.value);
|
|
1280
1280
|
},
|
|
1281
1281
|
onBlur: i,
|
|
1282
1282
|
onFocus: (E) => {
|
|
1283
|
-
E.currentTarget.style.borderColor = S ?
|
|
1283
|
+
E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, E.currentTarget.style.boxShadow = S ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
1284
1284
|
},
|
|
1285
1285
|
onBlurCapture: (E) => {
|
|
1286
|
-
E.currentTarget.style.borderColor = S ?
|
|
1286
|
+
E.currentTarget.style.borderColor = S ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, E.currentTarget.style.boxShadow = "none";
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
), ie = /* @__PURE__ */ O(Ve, { children: [
|
|
@@ -1447,7 +1447,7 @@ function ca() {
|
|
|
1447
1447
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1448
1448
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function He(n) {
|
|
1451
1451
|
return la(n) || ua(n) || Kr(n) || ca();
|
|
1452
1452
|
}
|
|
1453
1453
|
function da(n) {
|
|
@@ -1551,7 +1551,7 @@ function Ia(n) {
|
|
|
1551
1551
|
function Sn(n) {
|
|
1552
1552
|
return Bt() ? n instanceof HTMLElement || n instanceof Re(n).HTMLElement : !1;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function Hn(n) {
|
|
1555
1555
|
return !Bt() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof Re(n).ShadowRoot;
|
|
1556
1556
|
}
|
|
1557
1557
|
function ri(n) {
|
|
@@ -1564,10 +1564,10 @@ function ri(n) {
|
|
|
1564
1564
|
return /auto|scroll|overlay|hidden|clip/.test(e + i + t) && r !== "inline" && r !== "contents";
|
|
1565
1565
|
}
|
|
1566
1566
|
let Xt;
|
|
1567
|
-
function
|
|
1567
|
+
function ya() {
|
|
1568
1568
|
return Xt == null && (Xt = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Xt;
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1570
|
+
function xa(n) {
|
|
1571
1571
|
return /^(html|body|#document)$/.test(ei(n));
|
|
1572
1572
|
}
|
|
1573
1573
|
function Rn(n) {
|
|
@@ -1580,24 +1580,24 @@ function Ca(n) {
|
|
|
1580
1580
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1581
1581
|
n.assignedSlot || // DOM Element detected.
|
|
1582
1582
|
n.parentNode || // ShadowRoot detected.
|
|
1583
|
-
|
|
1583
|
+
Hn(n) && n.host || // Fallback.
|
|
1584
1584
|
ti(n)
|
|
1585
1585
|
);
|
|
1586
|
-
return
|
|
1586
|
+
return Hn(e) ? e.host : e;
|
|
1587
1587
|
}
|
|
1588
1588
|
function ii(n) {
|
|
1589
1589
|
const e = Ca(n);
|
|
1590
|
-
return
|
|
1590
|
+
return xa(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : Sn(e) && ri(e) ? e : ii(e);
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1592
|
+
function yt(n, e, t) {
|
|
1593
1593
|
var i;
|
|
1594
1594
|
e === void 0 && (e = []), t === void 0 && (t = !0);
|
|
1595
1595
|
const r = ii(n), a = r === ((i = n.ownerDocument) == null ? void 0 : i.body), o = Re(r);
|
|
1596
1596
|
if (a) {
|
|
1597
1597
|
const u = nn(o);
|
|
1598
|
-
return e.concat(o, o.visualViewport || [], ri(r) ? r : [], u && t ?
|
|
1598
|
+
return e.concat(o, o.visualViewport || [], ri(r) ? r : [], u && t ? yt(u) : []);
|
|
1599
1599
|
} else
|
|
1600
|
-
return e.concat(r,
|
|
1600
|
+
return e.concat(r, yt(r, [], t));
|
|
1601
1601
|
}
|
|
1602
1602
|
function nn(n) {
|
|
1603
1603
|
return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null;
|
|
@@ -1615,7 +1615,7 @@ function Aa(n) {
|
|
|
1615
1615
|
function En(n) {
|
|
1616
1616
|
return Ia(n) ? n : n.contextElement;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function zn(n) {
|
|
1619
1619
|
const e = En(n);
|
|
1620
1620
|
if (!Sn(e))
|
|
1621
1621
|
return It(1);
|
|
@@ -1633,7 +1633,7 @@ function Hn(n) {
|
|
|
1633
1633
|
const Sa = /* @__PURE__ */ It(0);
|
|
1634
1634
|
function Ra(n) {
|
|
1635
1635
|
const e = Re(n);
|
|
1636
|
-
return !
|
|
1636
|
+
return !ya() || !e.visualViewport ? Sa : {
|
|
1637
1637
|
x: e.visualViewport.offsetLeft,
|
|
1638
1638
|
y: e.visualViewport.offsetTop
|
|
1639
1639
|
};
|
|
@@ -1645,15 +1645,15 @@ function Zn(n, e, t, i) {
|
|
|
1645
1645
|
e === void 0 && (e = !1);
|
|
1646
1646
|
const r = n.getBoundingClientRect(), a = En(n);
|
|
1647
1647
|
let o = It(1);
|
|
1648
|
-
e && (o =
|
|
1648
|
+
e && (o = zn(n));
|
|
1649
1649
|
const u = Ea() ? Ra(a) : It(0);
|
|
1650
1650
|
let s = (r.left + u.x) / o.x, l = (r.top + u.y) / o.y, c = r.width / o.x, f = r.height / o.y;
|
|
1651
1651
|
if (a) {
|
|
1652
1652
|
const g = Re(a), p = i;
|
|
1653
1653
|
let m = g, b = nn(m);
|
|
1654
1654
|
for (; b && i && p !== m; ) {
|
|
1655
|
-
const
|
|
1656
|
-
s *=
|
|
1655
|
+
const h = zn(b), v = b.getBoundingClientRect(), A = Rn(b), C = v.left + (b.clientLeft + parseFloat(A.paddingLeft)) * h.x, I = v.top + (b.clientTop + parseFloat(A.paddingTop)) * h.y;
|
|
1656
|
+
s *= h.x, l *= h.y, c *= h.x, f *= h.y, s += C, l += I, m = Re(b), b = nn(m);
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
1659
|
return va({
|
|
@@ -1683,30 +1683,30 @@ function Oa(n, e) {
|
|
|
1683
1683
|
} = l;
|
|
1684
1684
|
if (u || e(), !g || !p)
|
|
1685
1685
|
return;
|
|
1686
|
-
const m = rt(f), b = rt(r.clientWidth - (c + g)),
|
|
1687
|
-
rootMargin: -m + "px " + -b + "px " + -
|
|
1686
|
+
const m = rt(f), b = rt(r.clientWidth - (c + g)), h = rt(r.clientHeight - (f + p)), v = rt(c), C = {
|
|
1687
|
+
rootMargin: -m + "px " + -b + "px " + -h + "px " + -v + "px",
|
|
1688
1688
|
threshold: ma(0, ha(1, s)) || 1
|
|
1689
1689
|
};
|
|
1690
|
-
let
|
|
1691
|
-
function x(
|
|
1692
|
-
const S =
|
|
1690
|
+
let I = !0;
|
|
1691
|
+
function x(y) {
|
|
1692
|
+
const S = y[0].intersectionRatio;
|
|
1693
1693
|
if (S !== s) {
|
|
1694
|
-
if (!
|
|
1694
|
+
if (!I)
|
|
1695
1695
|
return o();
|
|
1696
1696
|
S ? o(!1, S) : i = setTimeout(() => {
|
|
1697
1697
|
o(!1, 1e-7);
|
|
1698
1698
|
}, 1e3);
|
|
1699
1699
|
}
|
|
1700
|
-
S === 1 && !oi(l, n.getBoundingClientRect()) && o(),
|
|
1700
|
+
S === 1 && !oi(l, n.getBoundingClientRect()) && o(), I = !1;
|
|
1701
1701
|
}
|
|
1702
1702
|
try {
|
|
1703
1703
|
t = new IntersectionObserver(x, {
|
|
1704
|
-
...
|
|
1704
|
+
...C,
|
|
1705
1705
|
// Handle <iframe>s
|
|
1706
1706
|
root: r.ownerDocument
|
|
1707
1707
|
});
|
|
1708
1708
|
} catch {
|
|
1709
|
-
t = new IntersectionObserver(x,
|
|
1709
|
+
t = new IntersectionObserver(x, C);
|
|
1710
1710
|
}
|
|
1711
1711
|
t.observe(n);
|
|
1712
1712
|
}
|
|
@@ -1720,35 +1720,35 @@ function Fa(n, e, t, i) {
|
|
|
1720
1720
|
elementResize: o = typeof ResizeObserver == "function",
|
|
1721
1721
|
layoutShift: u = typeof IntersectionObserver == "function",
|
|
1722
1722
|
animationFrame: s = !1
|
|
1723
|
-
} = i, l = En(n), c = r || a ? [...l ?
|
|
1724
|
-
c.forEach((
|
|
1725
|
-
r &&
|
|
1723
|
+
} = i, l = En(n), c = r || a ? [...l ? yt(l) : [], ...e ? yt(e) : []] : [];
|
|
1724
|
+
c.forEach((v) => {
|
|
1725
|
+
r && v.addEventListener("scroll", t, {
|
|
1726
1726
|
passive: !0
|
|
1727
|
-
}), a &&
|
|
1727
|
+
}), a && v.addEventListener("resize", t);
|
|
1728
1728
|
});
|
|
1729
1729
|
const f = l && u ? Oa(l, t) : null;
|
|
1730
1730
|
let g = -1, p = null;
|
|
1731
|
-
o && (p = new ResizeObserver((
|
|
1732
|
-
let [
|
|
1733
|
-
|
|
1734
|
-
var
|
|
1735
|
-
(
|
|
1731
|
+
o && (p = new ResizeObserver((v) => {
|
|
1732
|
+
let [A] = v;
|
|
1733
|
+
A && A.target === l && p && e && (p.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1734
|
+
var C;
|
|
1735
|
+
(C = p) == null || C.observe(e);
|
|
1736
1736
|
})), t();
|
|
1737
1737
|
}), l && !s && p.observe(l), e && p.observe(e));
|
|
1738
1738
|
let m, b = s ? Zn(n) : null;
|
|
1739
|
-
s &&
|
|
1740
|
-
function
|
|
1741
|
-
const
|
|
1742
|
-
b && !oi(b,
|
|
1739
|
+
s && h();
|
|
1740
|
+
function h() {
|
|
1741
|
+
const v = Zn(n);
|
|
1742
|
+
b && !oi(b, v) && t(), b = v, m = requestAnimationFrame(h);
|
|
1743
1743
|
}
|
|
1744
1744
|
return t(), () => {
|
|
1745
|
-
var
|
|
1746
|
-
c.forEach((
|
|
1747
|
-
r &&
|
|
1748
|
-
}), f == null || f(), (
|
|
1745
|
+
var v;
|
|
1746
|
+
c.forEach((A) => {
|
|
1747
|
+
r && A.removeEventListener("scroll", t), a && A.removeEventListener("resize", t);
|
|
1748
|
+
}), f == null || f(), (v = p) == null || v.disconnect(), p = null, s && cancelAnimationFrame(m);
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
var rn = go, wa = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"],
|
|
1751
|
+
var rn = go, wa = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"], xt = function() {
|
|
1752
1752
|
};
|
|
1753
1753
|
function Ta(n, e) {
|
|
1754
1754
|
return e ? e[0] === "-" ? n + e : n + "__" + e : n;
|
|
@@ -1814,7 +1814,7 @@ function Na(n, e, t, i) {
|
|
|
1814
1814
|
return t * ((n = n / i - 1) * n * n + 1) + e;
|
|
1815
1815
|
}
|
|
1816
1816
|
function it(n, e) {
|
|
1817
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 200, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] :
|
|
1817
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 200, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : xt, r = si(n), a = e - r, o = 10, u = 0;
|
|
1818
1818
|
function s() {
|
|
1819
1819
|
u += o;
|
|
1820
1820
|
var l = Na(u, r, a, t);
|
|
@@ -1856,7 +1856,7 @@ var li = !1, Ma = {
|
|
|
1856
1856
|
return li = !0;
|
|
1857
1857
|
}
|
|
1858
1858
|
}, ot = typeof window < "u" ? window : {};
|
|
1859
|
-
ot.addEventListener && ot.removeEventListener && (ot.addEventListener("p",
|
|
1859
|
+
ot.addEventListener && ot.removeEventListener && (ot.addEventListener("p", xt, Ma), ot.removeEventListener("p", xt, !1));
|
|
1860
1860
|
var Wa = li;
|
|
1861
1861
|
function Xa(n) {
|
|
1862
1862
|
return n != null;
|
|
@@ -1864,10 +1864,10 @@ function Xa(n) {
|
|
|
1864
1864
|
function ka(n) {
|
|
1865
1865
|
return Array.isArray(n);
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function $e(n, e, t) {
|
|
1868
1868
|
return n ? e : t;
|
|
1869
1869
|
}
|
|
1870
|
-
var
|
|
1870
|
+
var Ha = function(e) {
|
|
1871
1871
|
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
1872
1872
|
i[r - 1] = arguments[r];
|
|
1873
1873
|
var a = Object.entries(e).filter(function(o) {
|
|
@@ -1878,14 +1878,14 @@ var za = function(e) {
|
|
|
1878
1878
|
var s = se(u, 2), l = s[0], c = s[1];
|
|
1879
1879
|
return o[l] = c, o;
|
|
1880
1880
|
}, {});
|
|
1881
|
-
},
|
|
1881
|
+
}, za = ["children", "innerProps"], Za = ["children", "innerProps"];
|
|
1882
1882
|
function _a(n) {
|
|
1883
1883
|
var e = n.maxHeight, t = n.menuEl, i = n.minHeight, r = n.placement, a = n.shouldScroll, o = n.isFixedPosition, u = n.controlHeight, s = Da(t), l = {
|
|
1884
1884
|
placement: "bottom",
|
|
1885
1885
|
maxHeight: e
|
|
1886
1886
|
};
|
|
1887
1887
|
if (!t || !t.offsetParent) return l;
|
|
1888
|
-
var c = s.getBoundingClientRect(), f = c.height, g = t.getBoundingClientRect(), p = g.bottom, m = g.height, b = g.top,
|
|
1888
|
+
var c = s.getBoundingClientRect(), f = c.height, g = t.getBoundingClientRect(), p = g.bottom, m = g.height, b = g.top, h = t.offsetParent.getBoundingClientRect(), v = h.top, A = o ? window.innerHeight : Va(s), C = si(s), I = parseInt(getComputedStyle(t).marginBottom, 10), x = parseInt(getComputedStyle(t).marginTop, 10), y = v - x, S = A - b, w = y + C, B = f - C - b, M = p - A + C + I, F = C + b - x, D = 160;
|
|
1889
1889
|
switch (r) {
|
|
1890
1890
|
case "auto":
|
|
1891
1891
|
case "bottom":
|
|
@@ -1901,15 +1901,15 @@ function _a(n) {
|
|
|
1901
1901
|
};
|
|
1902
1902
|
if (!o && B >= i || o && S >= i) {
|
|
1903
1903
|
a && it(s, M, D);
|
|
1904
|
-
var G = o ? S -
|
|
1904
|
+
var G = o ? S - I : B - I;
|
|
1905
1905
|
return {
|
|
1906
1906
|
placement: "bottom",
|
|
1907
1907
|
maxHeight: G
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
1910
|
if (r === "auto" || o) {
|
|
1911
|
-
var W = e, V = o ?
|
|
1912
|
-
return V >= i && (W = Math.min(V -
|
|
1911
|
+
var W = e, V = o ? y : w;
|
|
1912
|
+
return V >= i && (W = Math.min(V - I - u, e)), {
|
|
1913
1913
|
placement: "top",
|
|
1914
1914
|
maxHeight: W
|
|
1915
1915
|
};
|
|
@@ -1921,19 +1921,19 @@ function _a(n) {
|
|
|
1921
1921
|
};
|
|
1922
1922
|
break;
|
|
1923
1923
|
case "top":
|
|
1924
|
-
if (
|
|
1924
|
+
if (y >= m)
|
|
1925
1925
|
return {
|
|
1926
1926
|
placement: "top",
|
|
1927
1927
|
maxHeight: e
|
|
1928
1928
|
};
|
|
1929
|
-
if (
|
|
1929
|
+
if (w >= m && !o)
|
|
1930
1930
|
return a && it(s, F, D), {
|
|
1931
1931
|
placement: "top",
|
|
1932
1932
|
maxHeight: e
|
|
1933
1933
|
};
|
|
1934
|
-
if (!o &&
|
|
1934
|
+
if (!o && w >= i || o && y >= i) {
|
|
1935
1935
|
var j = e;
|
|
1936
|
-
return (!o &&
|
|
1936
|
+
return (!o && w >= i || o && y >= i) && (j = o ? y - x : w - x), a && it(s, F, D), {
|
|
1937
1937
|
placement: "top",
|
|
1938
1938
|
maxHeight: j
|
|
1939
1939
|
};
|
|
@@ -1968,25 +1968,25 @@ var ui = function(e) {
|
|
|
1968
1968
|
marginTop: u.menuGutter
|
|
1969
1969
|
});
|
|
1970
1970
|
}, ci = /* @__PURE__ */ Ot(null), ja = function(e) {
|
|
1971
|
-
var t = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Ft(ci) || {}, c = l.setPortalPlacement, f = H(null), g = L(r), p = se(g, 2), m = p[0], b = p[1],
|
|
1971
|
+
var t = e.children, i = e.minMenuHeight, r = e.maxMenuHeight, a = e.menuPlacement, o = e.menuPosition, u = e.menuShouldScrollIntoView, s = e.theme, l = Ft(ci) || {}, c = l.setPortalPlacement, f = H(null), g = L(r), p = se(g, 2), m = p[0], b = p[1], h = L(null), v = se(h, 2), A = v[0], C = v[1], I = s.spacing.controlHeight;
|
|
1972
1972
|
return rn(function() {
|
|
1973
1973
|
var x = f.current;
|
|
1974
1974
|
if (x) {
|
|
1975
|
-
var
|
|
1975
|
+
var y = o === "fixed", S = u && !y, w = _a({
|
|
1976
1976
|
maxHeight: r,
|
|
1977
1977
|
menuEl: x,
|
|
1978
1978
|
minHeight: i,
|
|
1979
1979
|
placement: a,
|
|
1980
1980
|
shouldScroll: S,
|
|
1981
|
-
isFixedPosition:
|
|
1982
|
-
controlHeight:
|
|
1981
|
+
isFixedPosition: y,
|
|
1982
|
+
controlHeight: I
|
|
1983
1983
|
});
|
|
1984
|
-
b(
|
|
1984
|
+
b(w.maxHeight), C(w.placement), c == null || c(w.placement);
|
|
1985
1985
|
}
|
|
1986
|
-
}, [r, a, o, u, i, c,
|
|
1986
|
+
}, [r, a, o, u, i, c, I]), t({
|
|
1987
1987
|
ref: f,
|
|
1988
1988
|
placerProps: X(X({}, e), {}, {
|
|
1989
|
-
placement:
|
|
1989
|
+
placement: A || ui(a),
|
|
1990
1990
|
maxHeight: m
|
|
1991
1991
|
})
|
|
1992
1992
|
});
|
|
@@ -2026,7 +2026,7 @@ var ui = function(e) {
|
|
|
2026
2026
|
padding: "".concat(r * 2, "px ").concat(r * 3, "px")
|
|
2027
2027
|
});
|
|
2028
2028
|
}, Ka = di, es = di, ts = function(e) {
|
|
2029
|
-
var t = e.children, i = t === void 0 ? "No options" : t, r = e.innerProps, a = ve(e,
|
|
2029
|
+
var t = e.children, i = t === void 0 ? "No options" : t, r = e.innerProps, a = ve(e, za);
|
|
2030
2030
|
return J("div", Y({}, ne(X(X({}, a), {}, {
|
|
2031
2031
|
children: i,
|
|
2032
2032
|
innerProps: r
|
|
@@ -2057,42 +2057,42 @@ var ui = function(e) {
|
|
|
2057
2057
|
return {
|
|
2058
2058
|
setPortalPlacement: p
|
|
2059
2059
|
};
|
|
2060
|
-
}, []), b = L(null),
|
|
2060
|
+
}, []), b = L(null), h = se(b, 2), v = h[0], A = h[1], C = z(function() {
|
|
2061
2061
|
if (r) {
|
|
2062
|
-
var S = Pa(r),
|
|
2063
|
-
(B !== (
|
|
2062
|
+
var S = Pa(r), w = u === "fixed" ? 0 : window.pageYOffset, B = S[g] + w;
|
|
2063
|
+
(B !== (v == null ? void 0 : v.offset) || S.left !== (v == null ? void 0 : v.rect.left) || S.width !== (v == null ? void 0 : v.rect.width)) && A({
|
|
2064
2064
|
offset: B,
|
|
2065
2065
|
rect: S
|
|
2066
2066
|
});
|
|
2067
2067
|
}
|
|
2068
|
-
}, [r, u, g,
|
|
2068
|
+
}, [r, u, g, v == null ? void 0 : v.offset, v == null ? void 0 : v.rect.left, v == null ? void 0 : v.rect.width]);
|
|
2069
2069
|
rn(function() {
|
|
2070
|
-
|
|
2071
|
-
}, [
|
|
2072
|
-
var
|
|
2073
|
-
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Fa(r, s.current,
|
|
2070
|
+
C();
|
|
2071
|
+
}, [C]);
|
|
2072
|
+
var I = z(function() {
|
|
2073
|
+
typeof l.current == "function" && (l.current(), l.current = null), r && s.current && (l.current = Fa(r, s.current, C, {
|
|
2074
2074
|
elementResize: "ResizeObserver" in window
|
|
2075
2075
|
}));
|
|
2076
|
-
}, [r,
|
|
2076
|
+
}, [r, C]);
|
|
2077
2077
|
rn(function() {
|
|
2078
|
-
|
|
2079
|
-
}, [
|
|
2078
|
+
I();
|
|
2079
|
+
}, [I]);
|
|
2080
2080
|
var x = z(function(S) {
|
|
2081
|
-
s.current = S,
|
|
2082
|
-
}, [
|
|
2083
|
-
if (!t && u !== "fixed" || !
|
|
2084
|
-
var
|
|
2081
|
+
s.current = S, I();
|
|
2082
|
+
}, [I]);
|
|
2083
|
+
if (!t && u !== "fixed" || !v) return null;
|
|
2084
|
+
var y = J("div", Y({
|
|
2085
2085
|
ref: x
|
|
2086
2086
|
}, ne(X(X({}, e), {}, {
|
|
2087
|
-
offset:
|
|
2087
|
+
offset: v.offset,
|
|
2088
2088
|
position: u,
|
|
2089
|
-
rect:
|
|
2089
|
+
rect: v.rect
|
|
2090
2090
|
}), "menuPortal", {
|
|
2091
2091
|
"menu-portal": !0
|
|
2092
2092
|
}), a), i);
|
|
2093
2093
|
return J(ci.Provider, {
|
|
2094
2094
|
value: m
|
|
2095
|
-
}, t ? /* @__PURE__ */ Do(
|
|
2095
|
+
}, t ? /* @__PURE__ */ Do(y, t) : y);
|
|
2096
2096
|
}, os = function(e) {
|
|
2097
2097
|
var t = e.isDisabled, i = e.isRtl;
|
|
2098
2098
|
return {
|
|
@@ -2210,12 +2210,12 @@ var gs = process.env.NODE_ENV === "production" ? {
|
|
|
2210
2210
|
marginBottom: a * 2,
|
|
2211
2211
|
marginTop: a * 2
|
|
2212
2212
|
});
|
|
2213
|
-
},
|
|
2213
|
+
}, ys = function(e) {
|
|
2214
2214
|
var t = e.innerProps;
|
|
2215
2215
|
return J("span", Y({}, t, ne(e, "indicatorSeparator", {
|
|
2216
2216
|
"indicator-separator": !0
|
|
2217
2217
|
})));
|
|
2218
|
-
},
|
|
2218
|
+
}, xs = No(Yn || (Yn = ba([`
|
|
2219
2219
|
0%, 80%, 100% { opacity: 0; }
|
|
2220
2220
|
40% { opacity: 1; }
|
|
2221
2221
|
`]))), Cs = function(e, t) {
|
|
@@ -2238,7 +2238,7 @@ var gs = process.env.NODE_ENV === "production" ? {
|
|
|
2238
2238
|
var t = e.delay, i = e.offset;
|
|
2239
2239
|
return J("span", {
|
|
2240
2240
|
css: /* @__PURE__ */ Pr({
|
|
2241
|
-
animation: "".concat(
|
|
2241
|
+
animation: "".concat(xs, " 1s ease-in-out ").concat(t, "ms infinite;"),
|
|
2242
2242
|
backgroundColor: "currentColor",
|
|
2243
2243
|
borderRadius: "1em",
|
|
2244
2244
|
display: "inline-block",
|
|
@@ -2437,7 +2437,7 @@ var gs = process.env.NODE_ENV === "production" ? {
|
|
|
2437
2437
|
}, hi = function(e) {
|
|
2438
2438
|
var t = e.children, i = e.innerProps;
|
|
2439
2439
|
return J("div", i, t);
|
|
2440
|
-
},
|
|
2440
|
+
}, Hs = hi, zs = hi;
|
|
2441
2441
|
function Zs(n) {
|
|
2442
2442
|
var e = n.children, t = n.innerProps;
|
|
2443
2443
|
return J("div", Y({
|
|
@@ -2544,7 +2544,7 @@ var _s = function(e) {
|
|
|
2544
2544
|
Group: Bs,
|
|
2545
2545
|
GroupHeading: Gs,
|
|
2546
2546
|
IndicatorsContainer: cs,
|
|
2547
|
-
IndicatorSeparator:
|
|
2547
|
+
IndicatorSeparator: ys,
|
|
2548
2548
|
Input: Ms,
|
|
2549
2549
|
LoadingIndicator: As,
|
|
2550
2550
|
Menu: Ua,
|
|
@@ -2553,8 +2553,8 @@ var _s = function(e) {
|
|
|
2553
2553
|
LoadingMessage: ns,
|
|
2554
2554
|
NoOptionsMessage: ts,
|
|
2555
2555
|
MultiValue: Js,
|
|
2556
|
-
MultiValueContainer:
|
|
2557
|
-
MultiValueLabel:
|
|
2556
|
+
MultiValueContainer: Hs,
|
|
2557
|
+
MultiValueLabel: zs,
|
|
2558
2558
|
MultiValueRemove: Zs,
|
|
2559
2559
|
Option: $s,
|
|
2560
2560
|
Placeholder: qs,
|
|
@@ -2643,8 +2643,8 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
},
|
|
2645
2645
|
onFocus: function(e) {
|
|
2646
|
-
var t = e.context, i = e.focused, r = e.options, a = e.label, o = a === void 0 ? "" : a, u = e.selectValue, s = e.isDisabled, l = e.isSelected, c = e.isAppleDevice, f = function(b,
|
|
2647
|
-
return b && b.length ? "".concat(b.indexOf(
|
|
2646
|
+
var t = e.context, i = e.focused, r = e.options, a = e.label, o = a === void 0 ? "" : a, u = e.selectValue, s = e.isDisabled, l = e.isSelected, c = e.isAppleDevice, f = function(b, h) {
|
|
2647
|
+
return b && b.length ? "".concat(b.indexOf(h) + 1, " of ").concat(b.length) : "";
|
|
2648
2648
|
};
|
|
2649
2649
|
if (t === "value" && u)
|
|
2650
2650
|
return "value ".concat(o, " focused, ").concat(f(u, i), ".");
|
|
@@ -2659,26 +2659,26 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2659
2659
|
return "".concat(i).concat(t ? " for search term " + t : "", ".");
|
|
2660
2660
|
}
|
|
2661
2661
|
}, dl = function(e) {
|
|
2662
|
-
var t = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages, g = s.getOptionLabel, p = s.inputValue, m = s.isMulti, b = s.isOptionDisabled,
|
|
2662
|
+
var t = e.ariaSelection, i = e.focusedOption, r = e.focusedValue, a = e.focusableOptions, o = e.isFocused, u = e.selectValue, s = e.selectProps, l = e.id, c = e.isAppleDevice, f = s.ariaLiveMessages, g = s.getOptionLabel, p = s.inputValue, m = s.isMulti, b = s.isOptionDisabled, h = s.isSearchable, v = s.menuIsOpen, A = s.options, C = s.screenReaderStatus, I = s.tabSelectsValue, x = s.isLoading, y = s["aria-label"], S = s["aria-live"], w = ae(function() {
|
|
2663
2663
|
return X(X({}, cl), f || {});
|
|
2664
2664
|
}, [f]), B = ae(function() {
|
|
2665
2665
|
var V = "";
|
|
2666
|
-
if (t &&
|
|
2666
|
+
if (t && w.onChange) {
|
|
2667
2667
|
var j = t.option, Q = t.options, U = t.removedValue, re = t.removedValues, ie = t.value, E = function(oe) {
|
|
2668
2668
|
return Array.isArray(oe) ? null : oe;
|
|
2669
|
-
}, P = U || j || E(ie), Z = P ? g(P) : "",
|
|
2669
|
+
}, P = U || j || E(ie), Z = P ? g(P) : "", T = Q || re || void 0, k = T ? T.map(g) : [], $ = X({
|
|
2670
2670
|
// multiSelected items are usually items that have already been selected
|
|
2671
2671
|
// or set by the user as a default value so we assume they are not disabled
|
|
2672
2672
|
isDisabled: P && b(P, u),
|
|
2673
2673
|
label: Z,
|
|
2674
2674
|
labels: k
|
|
2675
2675
|
}, t);
|
|
2676
|
-
V =
|
|
2676
|
+
V = w.onChange($);
|
|
2677
2677
|
}
|
|
2678
2678
|
return V;
|
|
2679
|
-
}, [t,
|
|
2679
|
+
}, [t, w, b, u, g]), M = ae(function() {
|
|
2680
2680
|
var V = "", j = i || r, Q = !!(i && u && u.includes(i));
|
|
2681
|
-
if (j &&
|
|
2681
|
+
if (j && w.onFocus) {
|
|
2682
2682
|
var U = {
|
|
2683
2683
|
focused: j,
|
|
2684
2684
|
label: g(j),
|
|
@@ -2689,37 +2689,37 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2689
2689
|
selectValue: u,
|
|
2690
2690
|
isAppleDevice: c
|
|
2691
2691
|
};
|
|
2692
|
-
V =
|
|
2692
|
+
V = w.onFocus(U);
|
|
2693
2693
|
}
|
|
2694
2694
|
return V;
|
|
2695
|
-
}, [i, r, g, b,
|
|
2695
|
+
}, [i, r, g, b, w, a, u, c]), F = ae(function() {
|
|
2696
2696
|
var V = "";
|
|
2697
|
-
if (
|
|
2698
|
-
var j =
|
|
2697
|
+
if (v && A.length && !x && w.onFilter) {
|
|
2698
|
+
var j = C({
|
|
2699
2699
|
count: a.length
|
|
2700
2700
|
});
|
|
2701
|
-
V =
|
|
2701
|
+
V = w.onFilter({
|
|
2702
2702
|
inputValue: p,
|
|
2703
2703
|
resultsMessage: j
|
|
2704
2704
|
});
|
|
2705
2705
|
}
|
|
2706
2706
|
return V;
|
|
2707
|
-
}, [a, p,
|
|
2707
|
+
}, [a, p, v, w, A, C, x]), D = (t == null ? void 0 : t.action) === "initial-input-focus", G = ae(function() {
|
|
2708
2708
|
var V = "";
|
|
2709
|
-
if (
|
|
2710
|
-
var j = r ? "value" :
|
|
2711
|
-
V =
|
|
2712
|
-
"aria-label":
|
|
2709
|
+
if (w.guidance) {
|
|
2710
|
+
var j = r ? "value" : v ? "menu" : "input";
|
|
2711
|
+
V = w.guidance({
|
|
2712
|
+
"aria-label": y,
|
|
2713
2713
|
context: j,
|
|
2714
2714
|
isDisabled: i && b(i, u),
|
|
2715
2715
|
isMulti: m,
|
|
2716
|
-
isSearchable:
|
|
2717
|
-
tabSelectsValue:
|
|
2716
|
+
isSearchable: h,
|
|
2717
|
+
tabSelectsValue: I,
|
|
2718
2718
|
isInitialFocus: D
|
|
2719
2719
|
});
|
|
2720
2720
|
}
|
|
2721
2721
|
return V;
|
|
2722
|
-
}, [
|
|
2722
|
+
}, [y, i, r, m, b, h, v, w, u, I, D]), W = J(qt, null, J("span", {
|
|
2723
2723
|
id: "aria-selection"
|
|
2724
2724
|
}, B), J("span", {
|
|
2725
2725
|
id: "aria-focused"
|
|
@@ -2991,9 +2991,9 @@ var ll = process.env.NODE_ENV === "production" ? {
|
|
|
2991
2991
|
}], pl = new RegExp("[" + on.map(function(n) {
|
|
2992
2992
|
return n.letters;
|
|
2993
2993
|
}).join("") + "]", "g"), mi = {};
|
|
2994
|
-
for (var
|
|
2995
|
-
for (var
|
|
2996
|
-
mi[
|
|
2994
|
+
for (var Ht = 0; Ht < on.length; Ht++)
|
|
2995
|
+
for (var zt = on[Ht], Zt = 0; Zt < zt.letters.length; Zt++)
|
|
2996
|
+
mi[zt.letters[Zt]] = zt.base;
|
|
2997
2997
|
var vi = function(e) {
|
|
2998
2998
|
return e.replace(pl, function(t) {
|
|
2999
2999
|
return mi[t];
|
|
@@ -3016,7 +3016,7 @@ var vi = function(e) {
|
|
|
3016
3016
|
};
|
|
3017
3017
|
}, ml = ["innerRef"];
|
|
3018
3018
|
function vl(n) {
|
|
3019
|
-
var e = n.innerRef, t = ve(n, ml), i =
|
|
3019
|
+
var e = n.innerRef, t = ve(n, ml), i = Ha(t, "onExited", "in", "enter", "exit", "appear");
|
|
3020
3020
|
return J("input", Y({
|
|
3021
3021
|
ref: e
|
|
3022
3022
|
}, i, {
|
|
@@ -3046,38 +3046,38 @@ function vl(n) {
|
|
|
3046
3046
|
var Il = function(e) {
|
|
3047
3047
|
e.cancelable && e.preventDefault(), e.stopPropagation();
|
|
3048
3048
|
};
|
|
3049
|
-
function
|
|
3050
|
-
var e = n.isEnabled, t = n.onBottomArrive, i = n.onBottomLeave, r = n.onTopArrive, a = n.onTopLeave, o = H(!1), u = H(!1), s = H(0), l = H(null), c = z(function(
|
|
3049
|
+
function yl(n) {
|
|
3050
|
+
var e = n.isEnabled, t = n.onBottomArrive, i = n.onBottomLeave, r = n.onTopArrive, a = n.onTopLeave, o = H(!1), u = H(!1), s = H(0), l = H(null), c = z(function(h, v) {
|
|
3051
3051
|
if (l.current !== null) {
|
|
3052
|
-
var
|
|
3053
|
-
|
|
3054
|
-
}
|
|
3055
|
-
}, [t, i, r, a]), f = z(function(
|
|
3056
|
-
c(
|
|
3057
|
-
}, [c]), g = z(function(
|
|
3058
|
-
s.current =
|
|
3059
|
-
}, []), p = z(function(
|
|
3060
|
-
var
|
|
3061
|
-
c(
|
|
3062
|
-
}, [c]), m = z(function(
|
|
3063
|
-
if (
|
|
3064
|
-
var
|
|
3052
|
+
var A = l.current, C = A.scrollTop, I = A.scrollHeight, x = A.clientHeight, y = l.current, S = v > 0, w = I - x - C, B = !1;
|
|
3053
|
+
w > v && o.current && (i && i(h), o.current = !1), S && u.current && (a && a(h), u.current = !1), S && v > w ? (t && !o.current && t(h), y.scrollTop = I, B = !0, o.current = !0) : !S && -v > C && (r && !u.current && r(h), y.scrollTop = 0, B = !0, u.current = !0), B && Il(h);
|
|
3054
|
+
}
|
|
3055
|
+
}, [t, i, r, a]), f = z(function(h) {
|
|
3056
|
+
c(h, h.deltaY);
|
|
3057
|
+
}, [c]), g = z(function(h) {
|
|
3058
|
+
s.current = h.changedTouches[0].clientY;
|
|
3059
|
+
}, []), p = z(function(h) {
|
|
3060
|
+
var v = s.current - h.changedTouches[0].clientY;
|
|
3061
|
+
c(h, v);
|
|
3062
|
+
}, [c]), m = z(function(h) {
|
|
3063
|
+
if (h) {
|
|
3064
|
+
var v = Wa ? {
|
|
3065
3065
|
passive: !1
|
|
3066
3066
|
} : !1;
|
|
3067
|
-
|
|
3067
|
+
h.addEventListener("wheel", f, v), h.addEventListener("touchstart", g, v), h.addEventListener("touchmove", p, v);
|
|
3068
3068
|
}
|
|
3069
|
-
}, [p, g, f]), b = z(function(
|
|
3070
|
-
|
|
3069
|
+
}, [p, g, f]), b = z(function(h) {
|
|
3070
|
+
h && (h.removeEventListener("wheel", f, !1), h.removeEventListener("touchstart", g, !1), h.removeEventListener("touchmove", p, !1));
|
|
3071
3071
|
}, [p, g, f]);
|
|
3072
3072
|
return q(function() {
|
|
3073
3073
|
if (e) {
|
|
3074
|
-
var
|
|
3075
|
-
return m(
|
|
3076
|
-
b(
|
|
3074
|
+
var h = l.current;
|
|
3075
|
+
return m(h), function() {
|
|
3076
|
+
b(h);
|
|
3077
3077
|
};
|
|
3078
3078
|
}
|
|
3079
|
-
}, [e, m, b]), function(
|
|
3080
|
-
l.current =
|
|
3079
|
+
}, [e, m, b]), function(h) {
|
|
3080
|
+
l.current = h;
|
|
3081
3081
|
};
|
|
3082
3082
|
}
|
|
3083
3083
|
var Qn = ["boxSizing", "height", "overflow", "paddingRight", "position"], qn = {
|
|
@@ -3100,30 +3100,30 @@ function tr() {
|
|
|
3100
3100
|
function nr() {
|
|
3101
3101
|
return "ontouchstart" in window || navigator.maxTouchPoints;
|
|
3102
3102
|
}
|
|
3103
|
-
var rr = !!(typeof window < "u" && window.document && window.document.createElement),
|
|
3103
|
+
var rr = !!(typeof window < "u" && window.document && window.document.createElement), je = 0, Le = {
|
|
3104
3104
|
capture: !1,
|
|
3105
3105
|
passive: !1
|
|
3106
3106
|
};
|
|
3107
|
-
function
|
|
3107
|
+
function xl(n) {
|
|
3108
3108
|
var e = n.isEnabled, t = n.accountForScrollbars, i = t === void 0 ? !0 : t, r = H({}), a = H(null), o = z(function(s) {
|
|
3109
3109
|
if (rr) {
|
|
3110
3110
|
var l = document.body, c = l && l.style;
|
|
3111
3111
|
if (i && Qn.forEach(function(m) {
|
|
3112
3112
|
var b = c && c[m];
|
|
3113
3113
|
r.current[m] = b;
|
|
3114
|
-
}), i &&
|
|
3114
|
+
}), i && je < 1) {
|
|
3115
3115
|
var f = parseInt(r.current.paddingRight, 10) || 0, g = document.body ? document.body.clientWidth : 0, p = window.innerWidth - g + f || 0;
|
|
3116
3116
|
Object.keys(qn).forEach(function(m) {
|
|
3117
3117
|
var b = qn[m];
|
|
3118
3118
|
c && (c[m] = b);
|
|
3119
3119
|
}), c && (c.paddingRight = "".concat(p, "px"));
|
|
3120
3120
|
}
|
|
3121
|
-
l && nr() && (l.addEventListener("touchmove", Kn, Le), s && (s.addEventListener("touchstart", tr, Le), s.addEventListener("touchmove", er, Le))),
|
|
3121
|
+
l && nr() && (l.addEventListener("touchmove", Kn, Le), s && (s.addEventListener("touchstart", tr, Le), s.addEventListener("touchmove", er, Le))), je += 1;
|
|
3122
3122
|
}
|
|
3123
3123
|
}, [i]), u = z(function(s) {
|
|
3124
3124
|
if (rr) {
|
|
3125
3125
|
var l = document.body, c = l && l.style;
|
|
3126
|
-
|
|
3126
|
+
je = Math.max(je - 1, 0), i && je < 1 && Qn.forEach(function(f) {
|
|
3127
3127
|
var g = r.current[f];
|
|
3128
3128
|
c && (c[f] = g);
|
|
3129
3129
|
}), l && nr() && (l.removeEventListener("touchmove", Kn, Le), s && (s.removeEventListener("touchstart", tr, Le), s.removeEventListener("touchmove", er, Le)));
|
|
@@ -3156,13 +3156,13 @@ var Al = function(e) {
|
|
|
3156
3156
|
toString: Cl
|
|
3157
3157
|
};
|
|
3158
3158
|
function Rl(n) {
|
|
3159
|
-
var e = n.children, t = n.lockEnabled, i = n.captureEnabled, r = i === void 0 ? !0 : i, a = n.onBottomArrive, o = n.onBottomLeave, u = n.onTopArrive, s = n.onTopLeave, l =
|
|
3159
|
+
var e = n.children, t = n.lockEnabled, i = n.captureEnabled, r = i === void 0 ? !0 : i, a = n.onBottomArrive, o = n.onBottomLeave, u = n.onTopArrive, s = n.onTopLeave, l = yl({
|
|
3160
3160
|
isEnabled: r,
|
|
3161
3161
|
onBottomArrive: a,
|
|
3162
3162
|
onBottomLeave: o,
|
|
3163
3163
|
onTopArrive: u,
|
|
3164
3164
|
onTopLeave: s
|
|
3165
|
-
}), c =
|
|
3165
|
+
}), c = xl({
|
|
3166
3166
|
isEnabled: t
|
|
3167
3167
|
}), f = function(p) {
|
|
3168
3168
|
l(p), c(p);
|
|
@@ -3219,9 +3219,9 @@ function Vl() {
|
|
|
3219
3219
|
}
|
|
3220
3220
|
var Dl = function(e) {
|
|
3221
3221
|
return e.label;
|
|
3222
|
-
}, xi = function(e) {
|
|
3223
|
-
return e.label;
|
|
3224
3222
|
}, yi = function(e) {
|
|
3223
|
+
return e.label;
|
|
3224
|
+
}, xi = function(e) {
|
|
3225
3225
|
return e.value;
|
|
3226
3226
|
}, Nl = function(e) {
|
|
3227
3227
|
return !!e.isDisabled;
|
|
@@ -3274,7 +3274,7 @@ var Dl = function(e) {
|
|
|
3274
3274
|
borderRadius: Ml,
|
|
3275
3275
|
colors: Ll,
|
|
3276
3276
|
spacing: kl
|
|
3277
|
-
},
|
|
3277
|
+
}, Hl = {
|
|
3278
3278
|
"aria-live": "polite",
|
|
3279
3279
|
backspaceRemovesValue: !0,
|
|
3280
3280
|
blurInputOnSelect: Jn(),
|
|
@@ -3287,8 +3287,8 @@ var Dl = function(e) {
|
|
|
3287
3287
|
escapeClearsValue: !1,
|
|
3288
3288
|
filterOption: hl(),
|
|
3289
3289
|
formatGroupLabel: Dl,
|
|
3290
|
-
getOptionLabel:
|
|
3291
|
-
getOptionValue:
|
|
3290
|
+
getOptionLabel: yi,
|
|
3291
|
+
getOptionValue: xi,
|
|
3292
3292
|
isDisabled: !1,
|
|
3293
3293
|
isLoading: !1,
|
|
3294
3294
|
isMulti: !1,
|
|
@@ -3355,14 +3355,14 @@ function ut(n, e) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
function Ai(n) {
|
|
3357
3357
|
return n.reduce(function(e, t) {
|
|
3358
|
-
return t.type === "group" ? e.push.apply(e,
|
|
3358
|
+
return t.type === "group" ? e.push.apply(e, He(t.options.map(function(i) {
|
|
3359
3359
|
return i.data;
|
|
3360
3360
|
}))) : e.push(t.data), e;
|
|
3361
3361
|
}, []);
|
|
3362
3362
|
}
|
|
3363
3363
|
function or(n, e) {
|
|
3364
3364
|
return n.reduce(function(t, i) {
|
|
3365
|
-
return i.type === "group" ? t.push.apply(t,
|
|
3365
|
+
return i.type === "group" ? t.push.apply(t, He(i.options.map(function(r) {
|
|
3366
3366
|
return {
|
|
3367
3367
|
data: r.data,
|
|
3368
3368
|
id: "".concat(e, "-").concat(i.index, "-").concat(r.index)
|
|
@@ -3373,7 +3373,7 @@ function or(n, e) {
|
|
|
3373
3373
|
}), t;
|
|
3374
3374
|
}, []);
|
|
3375
3375
|
}
|
|
3376
|
-
function
|
|
3376
|
+
function zl(n, e) {
|
|
3377
3377
|
return Ai(ut(n, e));
|
|
3378
3378
|
}
|
|
3379
3379
|
function ar(n, e) {
|
|
@@ -3474,12 +3474,12 @@ var Fi = function(e) {
|
|
|
3474
3474
|
}, r.selectOption = function(s) {
|
|
3475
3475
|
var l = r.props, c = l.blurInputOnSelect, f = l.isMulti, g = l.name, p = r.state.selectValue, m = f && r.isOptionSelected(s, p), b = r.isOptionDisabled(s, p);
|
|
3476
3476
|
if (m) {
|
|
3477
|
-
var
|
|
3478
|
-
r.setValue(p.filter(function(
|
|
3479
|
-
return r.getOptionValue(
|
|
3477
|
+
var h = r.getOptionValue(s);
|
|
3478
|
+
r.setValue(p.filter(function(v) {
|
|
3479
|
+
return r.getOptionValue(v) !== h;
|
|
3480
3480
|
}), "deselect-option", s);
|
|
3481
3481
|
} else if (!b)
|
|
3482
|
-
f ? r.setValue([].concat(
|
|
3482
|
+
f ? r.setValue([].concat(He(p), [s]), "select-option", s) : r.setValue(s, "select-option");
|
|
3483
3483
|
else {
|
|
3484
3484
|
r.ariaOnChange(s, {
|
|
3485
3485
|
action: "select-option",
|
|
@@ -3492,19 +3492,19 @@ var Fi = function(e) {
|
|
|
3492
3492
|
}, r.removeValue = function(s) {
|
|
3493
3493
|
var l = r.props.isMulti, c = r.state.selectValue, f = r.getOptionValue(s), g = c.filter(function(m) {
|
|
3494
3494
|
return r.getOptionValue(m) !== f;
|
|
3495
|
-
}), p =
|
|
3495
|
+
}), p = $e(l, g, g[0] || null);
|
|
3496
3496
|
r.onChange(p, {
|
|
3497
3497
|
action: "remove-value",
|
|
3498
3498
|
removedValue: s
|
|
3499
3499
|
}), r.focusInput();
|
|
3500
3500
|
}, r.clearValue = function() {
|
|
3501
3501
|
var s = r.state.selectValue;
|
|
3502
|
-
r.onChange(
|
|
3502
|
+
r.onChange($e(r.props.isMulti, [], null), {
|
|
3503
3503
|
action: "clear",
|
|
3504
3504
|
removedValues: s
|
|
3505
3505
|
});
|
|
3506
3506
|
}, r.popValue = function() {
|
|
3507
|
-
var s = r.props.isMulti, l = r.state.selectValue, c = l[l.length - 1], f = l.slice(0, l.length - 1), g =
|
|
3507
|
+
var s = r.props.isMulti, l = r.state.selectValue, c = l[l.length - 1], f = l.slice(0, l.length - 1), g = $e(s, f, f[0] || null);
|
|
3508
3508
|
c && r.onChange(g, {
|
|
3509
3509
|
action: "pop-value",
|
|
3510
3510
|
removedValue: c
|
|
@@ -3631,8 +3631,8 @@ var Fi = function(e) {
|
|
|
3631
3631
|
}, r.onValueInputFocus = function(s) {
|
|
3632
3632
|
s.preventDefault(), s.stopPropagation(), r.focus();
|
|
3633
3633
|
}, r.onKeyDown = function(s) {
|
|
3634
|
-
var l = r.props, c = l.isMulti, f = l.backspaceRemovesValue, g = l.escapeClearsValue, p = l.inputValue, m = l.isClearable, b = l.isDisabled,
|
|
3635
|
-
if (!b && !(typeof
|
|
3634
|
+
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, C = l.openMenuOnFocus, I = r.state, x = I.focusedOption, y = I.focusedValue, S = I.selectValue;
|
|
3635
|
+
if (!b && !(typeof v == "function" && (v(s), s.defaultPrevented))) {
|
|
3636
3636
|
switch (r.blockOptionHover = !0, s.key) {
|
|
3637
3637
|
case "ArrowLeft":
|
|
3638
3638
|
if (!c || p) return;
|
|
@@ -3645,31 +3645,31 @@ var Fi = function(e) {
|
|
|
3645
3645
|
case "Delete":
|
|
3646
3646
|
case "Backspace":
|
|
3647
3647
|
if (p) return;
|
|
3648
|
-
if (
|
|
3649
|
-
r.removeValue(
|
|
3648
|
+
if (y)
|
|
3649
|
+
r.removeValue(y);
|
|
3650
3650
|
else {
|
|
3651
3651
|
if (!f) return;
|
|
3652
3652
|
c ? r.popValue() : m && r.clearValue();
|
|
3653
3653
|
}
|
|
3654
3654
|
break;
|
|
3655
3655
|
case "Tab":
|
|
3656
|
-
if (r.isComposing || s.shiftKey || !
|
|
3656
|
+
if (r.isComposing || s.shiftKey || !h || !A || !x || // don't capture the event if the menu opens on focus and the focused
|
|
3657
3657
|
// option is already selected; it breaks the flow of navigation
|
|
3658
|
-
|
|
3658
|
+
C && r.isOptionSelected(x, S))
|
|
3659
3659
|
return;
|
|
3660
3660
|
r.selectOption(x);
|
|
3661
3661
|
break;
|
|
3662
3662
|
case "Enter":
|
|
3663
3663
|
if (s.keyCode === 229)
|
|
3664
3664
|
break;
|
|
3665
|
-
if (
|
|
3665
|
+
if (h) {
|
|
3666
3666
|
if (!x || r.isComposing) return;
|
|
3667
3667
|
r.selectOption(x);
|
|
3668
3668
|
break;
|
|
3669
3669
|
}
|
|
3670
3670
|
return;
|
|
3671
3671
|
case "Escape":
|
|
3672
|
-
|
|
3672
|
+
h ? (r.setState({
|
|
3673
3673
|
inputIsHiddenAfterUpdate: !1
|
|
3674
3674
|
}), r.onInputChange("", {
|
|
3675
3675
|
action: "menu-close",
|
|
@@ -3679,7 +3679,7 @@ var Fi = function(e) {
|
|
|
3679
3679
|
case " ":
|
|
3680
3680
|
if (p)
|
|
3681
3681
|
return;
|
|
3682
|
-
if (!
|
|
3682
|
+
if (!h) {
|
|
3683
3683
|
r.openMenu("first");
|
|
3684
3684
|
break;
|
|
3685
3685
|
}
|
|
@@ -3687,25 +3687,25 @@ var Fi = function(e) {
|
|
|
3687
3687
|
r.selectOption(x);
|
|
3688
3688
|
break;
|
|
3689
3689
|
case "ArrowUp":
|
|
3690
|
-
|
|
3690
|
+
h ? r.focusOption("up") : r.openMenu("last");
|
|
3691
3691
|
break;
|
|
3692
3692
|
case "ArrowDown":
|
|
3693
|
-
|
|
3693
|
+
h ? r.focusOption("down") : r.openMenu("first");
|
|
3694
3694
|
break;
|
|
3695
3695
|
case "PageUp":
|
|
3696
|
-
if (!
|
|
3696
|
+
if (!h) return;
|
|
3697
3697
|
r.focusOption("pageup");
|
|
3698
3698
|
break;
|
|
3699
3699
|
case "PageDown":
|
|
3700
|
-
if (!
|
|
3700
|
+
if (!h) return;
|
|
3701
3701
|
r.focusOption("pagedown");
|
|
3702
3702
|
break;
|
|
3703
3703
|
case "Home":
|
|
3704
|
-
if (!
|
|
3704
|
+
if (!h) return;
|
|
3705
3705
|
r.focusOption("first");
|
|
3706
3706
|
break;
|
|
3707
3707
|
case "End":
|
|
3708
|
-
if (!
|
|
3708
|
+
if (!h) return;
|
|
3709
3709
|
r.focusOption("last");
|
|
3710
3710
|
break;
|
|
3711
3711
|
default:
|
|
@@ -3955,7 +3955,7 @@ var Fi = function(e) {
|
|
|
3955
3955
|
// Renderers
|
|
3956
3956
|
// ==============================
|
|
3957
3957
|
function() {
|
|
3958
|
-
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,
|
|
3958
|
+
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, C = u || this.getElementId("input"), I = X(X(X({
|
|
3959
3959
|
"aria-autocomplete": "list",
|
|
3960
3960
|
"aria-expanded": f,
|
|
3961
3961
|
"aria-haspopup": !0,
|
|
@@ -3970,19 +3970,19 @@ var Fi = function(e) {
|
|
|
3970
3970
|
"aria-controls": this.getElementId("listbox")
|
|
3971
3971
|
}), !o && {
|
|
3972
3972
|
"aria-readonly": !0
|
|
3973
|
-
}), this.hasValue() ? (
|
|
3973
|
+
}), this.hasValue() ? (v == null ? void 0 : v.action) === "initial-input-focus" && {
|
|
3974
3974
|
"aria-describedby": this.getElementId("live-region")
|
|
3975
3975
|
} : {
|
|
3976
3976
|
"aria-describedby": this.getElementId("placeholder")
|
|
3977
3977
|
});
|
|
3978
|
-
return o ? /* @__PURE__ */ K.createElement(m, Y({},
|
|
3978
|
+
return o ? /* @__PURE__ */ K.createElement(m, Y({}, A, {
|
|
3979
3979
|
autoCapitalize: "none",
|
|
3980
3980
|
autoComplete: "off",
|
|
3981
3981
|
autoCorrect: "off",
|
|
3982
|
-
id:
|
|
3982
|
+
id: C,
|
|
3983
3983
|
innerRef: this.getInputRef,
|
|
3984
3984
|
isDisabled: a,
|
|
3985
|
-
isHidden:
|
|
3985
|
+
isHidden: h,
|
|
3986
3986
|
onBlur: this.onInputBlur,
|
|
3987
3987
|
onChange: this.handleInputChange,
|
|
3988
3988
|
onFocus: this.onInputFocus,
|
|
@@ -3991,36 +3991,36 @@ var Fi = function(e) {
|
|
|
3991
3991
|
form: c,
|
|
3992
3992
|
type: "text",
|
|
3993
3993
|
value: s
|
|
3994
|
-
},
|
|
3995
|
-
id:
|
|
3994
|
+
}, I)) : /* @__PURE__ */ K.createElement(vl, Y({
|
|
3995
|
+
id: C,
|
|
3996
3996
|
innerRef: this.getInputRef,
|
|
3997
3997
|
onBlur: this.onInputBlur,
|
|
3998
|
-
onChange:
|
|
3998
|
+
onChange: xt,
|
|
3999
3999
|
onFocus: this.onInputFocus,
|
|
4000
4000
|
disabled: a,
|
|
4001
4001
|
tabIndex: l,
|
|
4002
4002
|
inputMode: "none",
|
|
4003
4003
|
form: c,
|
|
4004
4004
|
value: ""
|
|
4005
|
-
},
|
|
4005
|
+
}, I));
|
|
4006
4006
|
}
|
|
4007
4007
|
)
|
|
4008
4008
|
}, {
|
|
4009
4009
|
key: "renderPlaceholderOrValue",
|
|
4010
4010
|
value: function() {
|
|
4011
|
-
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,
|
|
4011
|
+
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, C = this.state, I = C.selectValue, x = C.focusedValue, y = C.isFocused;
|
|
4012
4012
|
if (!this.hasValue() || !m)
|
|
4013
|
-
return
|
|
4013
|
+
return v ? null : /* @__PURE__ */ K.createElement(f, Y({}, g, {
|
|
4014
4014
|
key: "placeholder",
|
|
4015
4015
|
isDisabled: b,
|
|
4016
|
-
isFocused:
|
|
4016
|
+
isFocused: y,
|
|
4017
4017
|
innerProps: {
|
|
4018
4018
|
id: this.getElementId("placeholder")
|
|
4019
4019
|
}
|
|
4020
|
-
}),
|
|
4021
|
-
if (
|
|
4022
|
-
return
|
|
4023
|
-
var M =
|
|
4020
|
+
}), A);
|
|
4021
|
+
if (h)
|
|
4022
|
+
return I.map(function(w, B) {
|
|
4023
|
+
var M = w === x, F = "".concat(r.getOptionLabel(w), "-").concat(r.getOptionValue(w));
|
|
4024
4024
|
return /* @__PURE__ */ K.createElement(o, Y({}, g, {
|
|
4025
4025
|
components: {
|
|
4026
4026
|
Container: u,
|
|
@@ -4033,21 +4033,21 @@ var Fi = function(e) {
|
|
|
4033
4033
|
index: B,
|
|
4034
4034
|
removeProps: {
|
|
4035
4035
|
onClick: function() {
|
|
4036
|
-
return r.removeValue(
|
|
4036
|
+
return r.removeValue(w);
|
|
4037
4037
|
},
|
|
4038
4038
|
onTouchEnd: function() {
|
|
4039
|
-
return r.removeValue(
|
|
4039
|
+
return r.removeValue(w);
|
|
4040
4040
|
},
|
|
4041
4041
|
onMouseDown: function(G) {
|
|
4042
4042
|
G.preventDefault();
|
|
4043
4043
|
}
|
|
4044
4044
|
},
|
|
4045
|
-
data:
|
|
4046
|
-
}), r.formatOptionLabel(
|
|
4045
|
+
data: w
|
|
4046
|
+
}), r.formatOptionLabel(w, "value"));
|
|
4047
4047
|
});
|
|
4048
|
-
if (
|
|
4048
|
+
if (v)
|
|
4049
4049
|
return null;
|
|
4050
|
-
var S =
|
|
4050
|
+
var S = I[0];
|
|
4051
4051
|
return /* @__PURE__ */ K.createElement(c, Y({}, g, {
|
|
4052
4052
|
data: S,
|
|
4053
4053
|
isDisabled: b
|
|
@@ -4113,25 +4113,25 @@ var Fi = function(e) {
|
|
|
4113
4113
|
}, {
|
|
4114
4114
|
key: "renderMenu",
|
|
4115
4115
|
value: function() {
|
|
4116
|
-
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,
|
|
4116
|
+
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, C = h.isLoading, I = h.loadingMessage, x = h.minMenuHeight, y = h.maxMenuHeight, S = h.menuIsOpen, w = h.menuPlacement, B = h.menuPosition, M = h.menuPortalTarget, F = h.menuShouldBlockScroll, D = h.menuShouldScrollIntoView, G = h.noOptionsMessage, W = h.onMenuScrollToTop, V = h.onMenuScrollToBottom;
|
|
4117
4117
|
if (!S) return null;
|
|
4118
|
-
var j = function(Z,
|
|
4119
|
-
var k = Z.type, $ = Z.data, _ = Z.isDisabled, oe = Z.isSelected, he = Z.label, Lt = Z.value, et = b === $,
|
|
4118
|
+
var j = function(Z, T) {
|
|
4119
|
+
var k = Z.type, $ = Z.data, _ = Z.isDisabled, oe = Z.isSelected, he = Z.label, Lt = Z.value, et = b === $, _e = _ ? void 0 : function() {
|
|
4120
4120
|
return r.onOptionHover($);
|
|
4121
4121
|
}, Mt = _ ? void 0 : function() {
|
|
4122
4122
|
return r.selectOption($);
|
|
4123
|
-
}, tt = "".concat(r.getElementId("option"), "-").concat(
|
|
4123
|
+
}, tt = "".concat(r.getElementId("option"), "-").concat(T), Je = {
|
|
4124
4124
|
id: tt,
|
|
4125
4125
|
onClick: Mt,
|
|
4126
|
-
onMouseMove:
|
|
4127
|
-
onMouseOver:
|
|
4126
|
+
onMouseMove: _e,
|
|
4127
|
+
onMouseOver: _e,
|
|
4128
4128
|
tabIndex: -1,
|
|
4129
4129
|
role: "option",
|
|
4130
4130
|
"aria-selected": r.state.isAppleDevice ? void 0 : oe
|
|
4131
4131
|
// is not supported on Apple devices
|
|
4132
4132
|
};
|
|
4133
4133
|
return /* @__PURE__ */ K.createElement(p, Y({}, m, {
|
|
4134
|
-
innerProps:
|
|
4134
|
+
innerProps: Je,
|
|
4135
4135
|
data: $,
|
|
4136
4136
|
isDisabled: _,
|
|
4137
4137
|
isSelected: oe,
|
|
@@ -4146,11 +4146,11 @@ var Fi = function(e) {
|
|
|
4146
4146
|
if (this.hasOptions())
|
|
4147
4147
|
Q = this.getCategorizedOptions().map(function(P) {
|
|
4148
4148
|
if (P.type === "group") {
|
|
4149
|
-
var Z = P.data,
|
|
4149
|
+
var Z = P.data, T = P.options, k = P.index, $ = "".concat(r.getElementId("group"), "-").concat(k), _ = "".concat($, "-heading");
|
|
4150
4150
|
return /* @__PURE__ */ K.createElement(o, Y({}, m, {
|
|
4151
4151
|
key: $,
|
|
4152
4152
|
data: Z,
|
|
4153
|
-
options:
|
|
4153
|
+
options: T,
|
|
4154
4154
|
Heading: u,
|
|
4155
4155
|
headingProps: {
|
|
4156
4156
|
id: _,
|
|
@@ -4163,37 +4163,37 @@ var Fi = function(e) {
|
|
|
4163
4163
|
} else if (P.type === "option")
|
|
4164
4164
|
return j(P, "".concat(P.index));
|
|
4165
4165
|
});
|
|
4166
|
-
else if (
|
|
4167
|
-
var U =
|
|
4168
|
-
inputValue:
|
|
4166
|
+
else if (C) {
|
|
4167
|
+
var U = I({
|
|
4168
|
+
inputValue: A
|
|
4169
4169
|
});
|
|
4170
4170
|
if (U === null) return null;
|
|
4171
4171
|
Q = /* @__PURE__ */ K.createElement(f, m, U);
|
|
4172
4172
|
} else {
|
|
4173
4173
|
var re = G({
|
|
4174
|
-
inputValue:
|
|
4174
|
+
inputValue: A
|
|
4175
4175
|
});
|
|
4176
4176
|
if (re === null) return null;
|
|
4177
4177
|
Q = /* @__PURE__ */ K.createElement(g, m, re);
|
|
4178
4178
|
}
|
|
4179
4179
|
var ie = {
|
|
4180
4180
|
minMenuHeight: x,
|
|
4181
|
-
maxMenuHeight:
|
|
4182
|
-
menuPlacement:
|
|
4181
|
+
maxMenuHeight: y,
|
|
4182
|
+
menuPlacement: w,
|
|
4183
4183
|
menuPosition: B,
|
|
4184
4184
|
menuShouldScrollIntoView: D
|
|
4185
4185
|
}, E = /* @__PURE__ */ K.createElement(ja, Y({}, m, ie), function(P) {
|
|
4186
|
-
var Z = P.ref,
|
|
4186
|
+
var Z = P.ref, T = P.placerProps, k = T.placement, $ = T.maxHeight;
|
|
4187
4187
|
return /* @__PURE__ */ K.createElement(s, Y({}, m, ie, {
|
|
4188
4188
|
innerRef: Z,
|
|
4189
4189
|
innerProps: {
|
|
4190
4190
|
onMouseDown: r.onMenuMouseDown,
|
|
4191
4191
|
onMouseMove: r.onMenuMouseMove
|
|
4192
4192
|
},
|
|
4193
|
-
isLoading:
|
|
4193
|
+
isLoading: C,
|
|
4194
4194
|
placement: k
|
|
4195
4195
|
}), /* @__PURE__ */ K.createElement(Rl, {
|
|
4196
|
-
captureEnabled:
|
|
4196
|
+
captureEnabled: v,
|
|
4197
4197
|
onTopArrive: W,
|
|
4198
4198
|
onBottomArrive: V,
|
|
4199
4199
|
lockEnabled: F
|
|
@@ -4207,7 +4207,7 @@ var Fi = function(e) {
|
|
|
4207
4207
|
"aria-multiselectable": m.isMulti,
|
|
4208
4208
|
id: r.getElementId("listbox")
|
|
4209
4209
|
},
|
|
4210
|
-
isLoading:
|
|
4210
|
+
isLoading: C,
|
|
4211
4211
|
maxHeight: $,
|
|
4212
4212
|
focusedOption: b
|
|
4213
4213
|
}), Q);
|
|
@@ -4216,7 +4216,7 @@ var Fi = function(e) {
|
|
|
4216
4216
|
return M || B === "fixed" ? /* @__PURE__ */ K.createElement(c, Y({}, m, {
|
|
4217
4217
|
appendTo: M,
|
|
4218
4218
|
controlElement: this.controlRef,
|
|
4219
|
-
menuPlacement:
|
|
4219
|
+
menuPlacement: w,
|
|
4220
4220
|
menuPosition: B
|
|
4221
4221
|
}), E) : E;
|
|
4222
4222
|
}
|
|
@@ -4241,9 +4241,9 @@ var Fi = function(e) {
|
|
|
4241
4241
|
value: g
|
|
4242
4242
|
});
|
|
4243
4243
|
} else {
|
|
4244
|
-
var p = f.length > 0 ? f.map(function(b,
|
|
4244
|
+
var p = f.length > 0 ? f.map(function(b, h) {
|
|
4245
4245
|
return /* @__PURE__ */ K.createElement("input", {
|
|
4246
|
-
key: "i-".concat(
|
|
4246
|
+
key: "i-".concat(h),
|
|
4247
4247
|
name: l,
|
|
4248
4248
|
type: "hidden",
|
|
4249
4249
|
value: r.getOptionValue(b)
|
|
@@ -4309,15 +4309,15 @@ var Fi = function(e) {
|
|
|
4309
4309
|
}], [{
|
|
4310
4310
|
key: "getDerivedStateFromProps",
|
|
4311
4311
|
value: function(r, a) {
|
|
4312
|
-
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,
|
|
4313
|
-
if (o && (m !== o.value || p !== o.options || b !== o.menuIsOpen ||
|
|
4314
|
-
var
|
|
4315
|
-
|
|
4316
|
-
selectValue:
|
|
4312
|
+
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 = Ct(m), C = {};
|
|
4313
|
+
if (o && (m !== o.value || p !== o.options || b !== o.menuIsOpen || h !== o.inputValue)) {
|
|
4314
|
+
var I = b ? zl(r, A) : [], x = b ? or(ut(r, A), "".concat(g, "-option")) : [], y = u ? Zl(a, A) : null, S = _l(a, I), w = Jt(x, S);
|
|
4315
|
+
C = {
|
|
4316
|
+
selectValue: A,
|
|
4317
4317
|
focusedOption: S,
|
|
4318
|
-
focusedOptionId:
|
|
4318
|
+
focusedOptionId: w,
|
|
4319
4319
|
focusableOptionsWithIds: x,
|
|
4320
|
-
focusedValue:
|
|
4320
|
+
focusedValue: y,
|
|
4321
4321
|
clearFocusValueOnUpdate: !1
|
|
4322
4322
|
};
|
|
4323
4323
|
}
|
|
@@ -4326,10 +4326,10 @@ var Fi = function(e) {
|
|
|
4326
4326
|
inputIsHiddenAfterUpdate: void 0
|
|
4327
4327
|
} : {}, M = l, F = c && f;
|
|
4328
4328
|
return c && !F && (M = {
|
|
4329
|
-
value:
|
|
4330
|
-
options:
|
|
4329
|
+
value: $e(v, A, A[0] || null),
|
|
4330
|
+
options: A,
|
|
4331
4331
|
action: "initial-input-focus"
|
|
4332
|
-
}, F = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (M = null), X(X(X({},
|
|
4332
|
+
}, F = !f), (l == null ? void 0 : l.action) === "initial-input-focus" && (M = null), X(X(X({}, C), B), {}, {
|
|
4333
4333
|
prevProps: r,
|
|
4334
4334
|
ariaSelection: M,
|
|
4335
4335
|
prevWasFocused: F
|
|
@@ -4337,19 +4337,19 @@ var Fi = function(e) {
|
|
|
4337
4337
|
}
|
|
4338
4338
|
}]), t;
|
|
4339
4339
|
}(Fr);
|
|
4340
|
-
Dt.defaultProps =
|
|
4340
|
+
Dt.defaultProps = Hl;
|
|
4341
4341
|
var Yl = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
4342
4342
|
function wn(n) {
|
|
4343
|
-
var e = n.defaultInputValue, t = e === void 0 ? "" : e, i = n.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = n.defaultValue, o = a === void 0 ? null : a, u = n.inputValue, s = n.menuIsOpen, l = n.onChange, c = n.onInputChange, f = n.onMenuClose, g = n.onMenuOpen, p = n.value, m = ve(n, Yl), b = L(u !== void 0 ? u : t),
|
|
4343
|
+
var e = n.defaultInputValue, t = e === void 0 ? "" : e, i = n.defaultMenuIsOpen, r = i === void 0 ? !1 : i, a = n.defaultValue, o = a === void 0 ? null : a, u = n.inputValue, s = n.menuIsOpen, l = n.onChange, c = n.onInputChange, f = n.onMenuClose, g = n.onMenuOpen, p = n.value, m = ve(n, Yl), b = L(u !== void 0 ? u : t), h = se(b, 2), v = h[0], A = h[1], C = L(s !== void 0 ? s : r), I = se(C, 2), x = I[0], y = I[1], S = L(p !== void 0 ? p : o), w = se(S, 2), B = w[0], M = w[1], F = z(function(U, re) {
|
|
4344
4344
|
typeof l == "function" && l(U, re), M(U);
|
|
4345
4345
|
}, [l]), D = z(function(U, re) {
|
|
4346
4346
|
var ie;
|
|
4347
|
-
typeof c == "function" && (ie = c(U, re)),
|
|
4347
|
+
typeof c == "function" && (ie = c(U, re)), A(ie !== void 0 ? ie : U);
|
|
4348
4348
|
}, [c]), G = z(function() {
|
|
4349
|
-
typeof g == "function" && g(),
|
|
4349
|
+
typeof g == "function" && g(), y(!0);
|
|
4350
4350
|
}, [g]), W = z(function() {
|
|
4351
|
-
typeof f == "function" && f(),
|
|
4352
|
-
}, [f]), V = u !== void 0 ? u :
|
|
4351
|
+
typeof f == "function" && f(), y(!1);
|
|
4352
|
+
}, [f]), V = u !== void 0 ? u : v, j = s !== void 0 ? s : x, Q = p !== void 0 ? p : B;
|
|
4353
4353
|
return X(X({}, m), {}, {
|
|
4354
4354
|
inputValue: V,
|
|
4355
4355
|
menuIsOpen: j,
|
|
@@ -4364,39 +4364,39 @@ var jl = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading
|
|
|
4364
4364
|
function wi(n) {
|
|
4365
4365
|
var e = n.defaultOptions, t = e === void 0 ? !1 : e, i = n.cacheOptions, r = i === void 0 ? !1 : i, a = n.loadOptions;
|
|
4366
4366
|
n.options;
|
|
4367
|
-
var o = n.isLoading, u = o === void 0 ? !1 : o, s = n.onInputChange, l = n.filterOption, c = l === void 0 ? null : l, f = ve(n, jl), g = f.inputValue, p = H(void 0), m = H(!1), b = L(Array.isArray(t) ? t : void 0),
|
|
4368
|
-
r !== Mt && ($({}), tt(r)), t !== he && (
|
|
4367
|
+
var o = n.isLoading, u = o === void 0 ? !1 : o, s = n.onInputChange, l = n.filterOption, c = l === void 0 ? null : l, f = ve(n, jl), g = f.inputValue, p = H(void 0), m = H(!1), b = L(Array.isArray(t) ? t : void 0), h = se(b, 2), v = h[0], A = h[1], C = L(typeof g < "u" ? g : ""), I = se(C, 2), x = I[0], y = I[1], S = L(t === !0), w = se(S, 2), B = w[0], M = w[1], F = L(void 0), D = se(F, 2), G = D[0], W = D[1], V = L([]), j = se(V, 2), Q = j[0], U = j[1], re = L(!1), ie = se(re, 2), E = ie[0], P = ie[1], Z = L({}), T = se(Z, 2), k = T[0], $ = T[1], _ = L(void 0), oe = se(_, 2), he = oe[0], Lt = oe[1], et = L(void 0), _e = se(et, 2), Mt = _e[0], tt = _e[1];
|
|
4368
|
+
r !== Mt && ($({}), tt(r)), t !== he && (A(Array.isArray(t) ? t : void 0), Lt(t)), q(function() {
|
|
4369
4369
|
return m.current = !0, function() {
|
|
4370
4370
|
m.current = !1;
|
|
4371
4371
|
};
|
|
4372
4372
|
}, []);
|
|
4373
|
-
var
|
|
4373
|
+
var Je = z(function(Ye, Pe) {
|
|
4374
4374
|
if (!a) return Pe();
|
|
4375
|
-
var ge = a(
|
|
4375
|
+
var ge = a(Ye, Pe);
|
|
4376
4376
|
ge && typeof ge.then == "function" && ge.then(Pe, function() {
|
|
4377
4377
|
return Pe();
|
|
4378
4378
|
});
|
|
4379
4379
|
}, [a]);
|
|
4380
4380
|
q(function() {
|
|
4381
|
-
t === !0 &&
|
|
4382
|
-
m.current && (
|
|
4381
|
+
t === !0 && Je(x, function(Ye) {
|
|
4382
|
+
m.current && (A(Ye || []), M(!!p.current));
|
|
4383
4383
|
});
|
|
4384
4384
|
}, []);
|
|
4385
|
-
var co = z(function(
|
|
4386
|
-
var ge = Ba(
|
|
4385
|
+
var co = z(function(Ye, Pe) {
|
|
4386
|
+
var ge = Ba(Ye, Pe, s);
|
|
4387
4387
|
if (!ge) {
|
|
4388
|
-
p.current = void 0,
|
|
4388
|
+
p.current = void 0, y(""), W(""), U([]), M(!1), P(!1);
|
|
4389
4389
|
return;
|
|
4390
4390
|
}
|
|
4391
4391
|
if (r && k[ge])
|
|
4392
|
-
|
|
4392
|
+
y(ge), W(ge), U(k[ge]), M(!1), P(!1);
|
|
4393
4393
|
else {
|
|
4394
4394
|
var po = p.current = {};
|
|
4395
|
-
|
|
4395
|
+
y(ge), M(!0), P(!G), Je(ge, function(Wt) {
|
|
4396
4396
|
m && po === p.current && (p.current = void 0, M(!1), W(ge), U(Wt || []), P(!1), $(Wt ? X(X({}, k), {}, Xe({}, ge, Wt)) : k));
|
|
4397
4397
|
});
|
|
4398
4398
|
}
|
|
4399
|
-
}, [r,
|
|
4399
|
+
}, [r, Je, G, k, s]), fo = E ? [] : x && G ? Q : v || [];
|
|
4400
4400
|
return X(X({}, f), {}, {
|
|
4401
4401
|
options: fo,
|
|
4402
4402
|
isLoading: B || u,
|
|
@@ -4432,31 +4432,31 @@ var $l = /* @__PURE__ */ wt(function(n, e) {
|
|
|
4432
4432
|
}
|
|
4433
4433
|
};
|
|
4434
4434
|
function Ti(n) {
|
|
4435
|
-
var e = n.allowCreateWhileLoading, t = e === void 0 ? !1 : e, i = n.createOptionPosition, r = i === void 0 ? "last" : i, a = n.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = n.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = n.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = n.onCreateOption, g = n.options, p = g === void 0 ? [] : g, m = n.onChange, b = ve(n, Ql),
|
|
4436
|
-
return s(
|
|
4437
|
-
getOptionValue:
|
|
4438
|
-
getOptionLabel:
|
|
4439
|
-
}) ? c(
|
|
4440
|
-
}, [o, c,
|
|
4441
|
-
return (t || !x) && B ? r === "first" ? [B].concat(
|
|
4435
|
+
var e = n.allowCreateWhileLoading, t = e === void 0 ? !1 : e, i = n.createOptionPosition, r = i === void 0 ? "last" : i, a = n.formatCreateLabel, o = a === void 0 ? Yt.formatCreateLabel : a, u = n.isValidNewOption, s = u === void 0 ? Yt.isValidNewOption : u, l = n.getNewOptionData, c = l === void 0 ? Yt.getNewOptionData : l, f = n.onCreateOption, g = n.options, p = g === void 0 ? [] : g, m = n.onChange, b = ve(n, Ql), h = b.getOptionValue, v = h === void 0 ? xi : h, A = b.getOptionLabel, C = A === void 0 ? yi : A, I = b.inputValue, x = b.isLoading, y = b.isMulti, S = b.value, w = b.name, B = ae(function() {
|
|
4436
|
+
return s(I, Ct(S), p, {
|
|
4437
|
+
getOptionValue: v,
|
|
4438
|
+
getOptionLabel: C
|
|
4439
|
+
}) ? c(I, o(I)) : void 0;
|
|
4440
|
+
}, [o, c, C, v, I, s, p, S]), M = ae(function() {
|
|
4441
|
+
return (t || !x) && B ? r === "first" ? [B].concat(He(p)) : [].concat(He(p), [B]) : p;
|
|
4442
4442
|
}, [t, r, x, B, p]), F = z(function(D, G) {
|
|
4443
4443
|
if (G.action !== "select-option")
|
|
4444
4444
|
return m(D, G);
|
|
4445
4445
|
var W = Array.isArray(D) ? D : [D];
|
|
4446
4446
|
if (W[W.length - 1] === B) {
|
|
4447
|
-
if (f) f(
|
|
4447
|
+
if (f) f(I);
|
|
4448
4448
|
else {
|
|
4449
|
-
var V = c(
|
|
4449
|
+
var V = c(I, I), j = {
|
|
4450
4450
|
action: "create-option",
|
|
4451
|
-
name:
|
|
4451
|
+
name: w,
|
|
4452
4452
|
option: V
|
|
4453
4453
|
};
|
|
4454
|
-
m(
|
|
4454
|
+
m($e(y, [].concat(He(Ct(S)), [V]), V), j);
|
|
4455
4455
|
}
|
|
4456
4456
|
return;
|
|
4457
4457
|
}
|
|
4458
4458
|
m(D, G);
|
|
4459
|
-
}, [c,
|
|
4459
|
+
}, [c, I, y, w, B, f, m, S]);
|
|
4460
4460
|
return X(X({}, b), {}, {
|
|
4461
4461
|
options: M,
|
|
4462
4462
|
onChange: F
|
|
@@ -4494,26 +4494,26 @@ function Gi({
|
|
|
4494
4494
|
b.current && f.notifyFormulaToggle(!1);
|
|
4495
4495
|
};
|
|
4496
4496
|
}, []);
|
|
4497
|
-
const
|
|
4497
|
+
const h = p, [v, A] = L(
|
|
4498
4498
|
() => c && p ? Te(String(t ?? ""), !0) : []
|
|
4499
|
-
),
|
|
4500
|
-
|
|
4501
|
-
const S =
|
|
4502
|
-
|
|
4499
|
+
), C = H(t), I = (y) => {
|
|
4500
|
+
A(y);
|
|
4501
|
+
const S = h ? ht(y) : Ge(y);
|
|
4502
|
+
C.current = S, i(S);
|
|
4503
4503
|
}, x = z(() => {
|
|
4504
|
-
const
|
|
4505
|
-
if (m(
|
|
4506
|
-
const S = String(t ?? ""),
|
|
4507
|
-
|
|
4508
|
-
const B = ht(
|
|
4509
|
-
|
|
4504
|
+
const y = !p;
|
|
4505
|
+
if (m(y), f == null || f.notifyFormulaToggle(y, y ? g.current : null), y) {
|
|
4506
|
+
const S = String(t ?? ""), w = Te(S, !0);
|
|
4507
|
+
A(w);
|
|
4508
|
+
const B = ht(w);
|
|
4509
|
+
C.current = B, i(B), s == null || s({ ...u, [e]: Mr() });
|
|
4510
4510
|
} else {
|
|
4511
|
-
const S = Ge(
|
|
4512
|
-
|
|
4513
|
-
const
|
|
4514
|
-
delete
|
|
4511
|
+
const S = Ge(v);
|
|
4512
|
+
C.current = S, i(S);
|
|
4513
|
+
const w = { ...u };
|
|
4514
|
+
delete w[e], s == null || s(w), A([]);
|
|
4515
4515
|
}
|
|
4516
|
-
}, [p, f, t,
|
|
4516
|
+
}, [p, f, t, v, u, e, s, i]);
|
|
4517
4517
|
return c ? /* @__PURE__ */ O("div", { children: [
|
|
4518
4518
|
/* @__PURE__ */ O(N, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0 }, children: [
|
|
4519
4519
|
/* @__PURE__ */ d(
|
|
@@ -4572,13 +4572,13 @@ function Gi({
|
|
|
4572
4572
|
$r,
|
|
4573
4573
|
{
|
|
4574
4574
|
id: e,
|
|
4575
|
-
expression:
|
|
4576
|
-
onExpressionChange:
|
|
4575
|
+
expression: v,
|
|
4576
|
+
onExpressionChange: I,
|
|
4577
4577
|
onBlur: r,
|
|
4578
4578
|
placeholder: n.formulaPlaceholder ?? "Type or paste a variable expression...",
|
|
4579
4579
|
disabled: n.disabled === !0,
|
|
4580
4580
|
error: a,
|
|
4581
|
-
formulaConfigEnabled:
|
|
4581
|
+
formulaConfigEnabled: h
|
|
4582
4582
|
}
|
|
4583
4583
|
) : l()
|
|
4584
4584
|
] }) : /* @__PURE__ */ O("div", { children: [
|
|
@@ -4606,30 +4606,30 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4606
4606
|
})),
|
|
4607
4607
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4608
4608
|
[l.options]
|
|
4609
|
-
), [m, b] = L(0),
|
|
4609
|
+
), [m, b] = L(0), h = ((M = l.dependsOn) == null ? void 0 : M.map((F) => t[F])) ?? [];
|
|
4610
4610
|
q(() => {
|
|
4611
4611
|
var F;
|
|
4612
4612
|
(F = l.dependsOn) != null && F.length && b((D) => D + 1);
|
|
4613
|
-
},
|
|
4614
|
-
const
|
|
4613
|
+
}, h);
|
|
4614
|
+
const v = !!l.loadOptions, [A, C] = L(null), I = H(!1);
|
|
4615
4615
|
q(() => {
|
|
4616
|
-
if (!
|
|
4616
|
+
if (!v || I.current || e == null || e === "" || Array.isArray(e) && e.length === 0) return;
|
|
4617
4617
|
const F = Array.isArray(e) ? e : [e];
|
|
4618
|
-
|
|
4619
|
-
G.length !== 0 &&
|
|
4618
|
+
I.current = !0, (l.loadValue ? l.loadValue(F) : l.loadOptions("").then((G) => G.filter((W) => F.some((V) => String(g(W)) === String(V))))).then((G) => {
|
|
4619
|
+
G.length !== 0 && C(l.isMulti ? G : G[0]);
|
|
4620
4620
|
}).catch(() => {
|
|
4621
|
-
|
|
4621
|
+
I.current = !1;
|
|
4622
4622
|
});
|
|
4623
|
-
}, [
|
|
4623
|
+
}, [v, e]);
|
|
4624
4624
|
const x = ae(() => {
|
|
4625
4625
|
if (e == null || e === "") return l.isMulti ? [] : null;
|
|
4626
|
-
if (
|
|
4626
|
+
if (v) return A;
|
|
4627
4627
|
if (l.isMulti) {
|
|
4628
4628
|
const F = Array.isArray(e) ? e : [e];
|
|
4629
4629
|
return p.filter((D) => F.includes(g(D)));
|
|
4630
4630
|
}
|
|
4631
4631
|
return p.find((F) => String(g(F)) === String(e)) ?? null;
|
|
4632
|
-
}, [e, p, l.isMulti,
|
|
4632
|
+
}, [e, p, l.isMulti, v, A]), y = (F) => (v && C(F), F ? l.isMulti ? i(F.map(g)) : i(g(F)) : i(l.isMulti ? [] : null)), S = {
|
|
4633
4633
|
inputId: l.id ?? l.name,
|
|
4634
4634
|
name: l.id ?? l.name,
|
|
4635
4635
|
placeholder: l.placeholder ?? "Select...",
|
|
@@ -4638,7 +4638,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4638
4638
|
isSearchable: l.isSearchable ?? !0,
|
|
4639
4639
|
isClearable: l.isClearable ?? !1,
|
|
4640
4640
|
value: x,
|
|
4641
|
-
onChange:
|
|
4641
|
+
onChange: y,
|
|
4642
4642
|
onBlur: r,
|
|
4643
4643
|
styles: Lr(c, l.isMulti),
|
|
4644
4644
|
menuPortalTarget: typeof document < "u" ? document.body : void 0,
|
|
@@ -4646,7 +4646,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4646
4646
|
classNamePrefix: "ff-select",
|
|
4647
4647
|
"data-testid": l.dataTestId ?? `${l.name}-select`,
|
|
4648
4648
|
...l.getOptionLabel ? { getOptionLabel: l.getOptionLabel } : {}
|
|
4649
|
-
},
|
|
4649
|
+
}, w = () => {
|
|
4650
4650
|
const F = !!l.loadOptions, D = l.isCreatable ?? !1;
|
|
4651
4651
|
return F && D ? /* @__PURE__ */ d(
|
|
4652
4652
|
tu,
|
|
@@ -4681,7 +4681,7 @@ function nu({ field: n, value: e, values: t, onChange: i, onBlur: r, error: a, t
|
|
|
4681
4681
|
formulaConfig: u,
|
|
4682
4682
|
onFormulaConfigChange: s,
|
|
4683
4683
|
renderNative: () => /* @__PURE__ */ O(Ve, { children: [
|
|
4684
|
-
|
|
4684
|
+
w(),
|
|
4685
4685
|
c && /* @__PURE__ */ d("small", { "data-testid": `${l.name}-error`, style: fe, children: a })
|
|
4686
4686
|
] })
|
|
4687
4687
|
}
|
|
@@ -4749,7 +4749,7 @@ const ru = {
|
|
|
4749
4749
|
)
|
|
4750
4750
|
] })
|
|
4751
4751
|
] }),
|
|
4752
|
-
t && /* @__PURE__ */ d(
|
|
4752
|
+
t && /* @__PURE__ */ d(xo, { size: 16, className: "ff-form-ms-2 ff-form-mt-1 ff-form-text-primary ff-form-flex-shrink-0" })
|
|
4753
4753
|
]
|
|
4754
4754
|
}
|
|
4755
4755
|
) });
|
|
@@ -4846,32 +4846,32 @@ function lu({
|
|
|
4846
4846
|
onFormulaConfigChange: u
|
|
4847
4847
|
}) {
|
|
4848
4848
|
const s = !!(a && r), l = n.isMulti ?? !1, c = n.id ?? n.name ?? "", f = ae(
|
|
4849
|
-
() => (n.options ?? []).map((
|
|
4850
|
-
...
|
|
4851
|
-
value:
|
|
4849
|
+
() => (n.options ?? []).map((v) => ({
|
|
4850
|
+
...v,
|
|
4851
|
+
value: v.id ?? v.value
|
|
4852
4852
|
})),
|
|
4853
4853
|
[n.options]
|
|
4854
|
-
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = ae(() => new Set(g.map((
|
|
4854
|
+
), g = Array.isArray(e) ? e : e != null ? [e] : [], p = ae(() => new Set(g.map((v) => String(v))), [g]), m = ae(() => l ? f.filter((v) => p.has(String(v.value ?? ""))) : f.find((v) => String(v.value ?? "") === String(e ?? "")) ?? null, [l, f, e, p]), h = /* @__PURE__ */ O(Ve, { children: [
|
|
4855
4855
|
/* @__PURE__ */ d(
|
|
4856
4856
|
mn,
|
|
4857
4857
|
{
|
|
4858
4858
|
inputId: c,
|
|
4859
4859
|
value: m,
|
|
4860
|
-
onChange: (
|
|
4860
|
+
onChange: (v) => {
|
|
4861
4861
|
if (l) {
|
|
4862
|
-
const
|
|
4863
|
-
t(
|
|
4862
|
+
const C = v;
|
|
4863
|
+
t(C == null ? [] : C.map((I) => I.value));
|
|
4864
4864
|
return;
|
|
4865
4865
|
}
|
|
4866
|
-
const
|
|
4867
|
-
t(
|
|
4866
|
+
const A = v;
|
|
4867
|
+
t(A == null ? null : A.value);
|
|
4868
4868
|
},
|
|
4869
4869
|
onBlur: i,
|
|
4870
4870
|
options: f,
|
|
4871
4871
|
placeholder: n.placeholder ?? "Select option...",
|
|
4872
4872
|
isMulti: l,
|
|
4873
4873
|
isDisabled: n.disabled ?? !1,
|
|
4874
|
-
isOptionDisabled: (
|
|
4874
|
+
isOptionDisabled: (v) => !!v.isDisabled,
|
|
4875
4875
|
isSearchable: !0,
|
|
4876
4876
|
styles: su(s),
|
|
4877
4877
|
components: { Option: ou, SingleValue: au },
|
|
@@ -4894,7 +4894,7 @@ function lu({
|
|
|
4894
4894
|
helperText: n.helperText,
|
|
4895
4895
|
formulaConfig: o,
|
|
4896
4896
|
onFormulaConfigChange: u,
|
|
4897
|
-
renderNative: () =>
|
|
4897
|
+
renderNative: () => h
|
|
4898
4898
|
}
|
|
4899
4899
|
) });
|
|
4900
4900
|
}
|
|
@@ -5149,15 +5149,15 @@ function gu({
|
|
|
5149
5149
|
minItems: p,
|
|
5150
5150
|
maxItems: m
|
|
5151
5151
|
}) {
|
|
5152
|
-
const [b,
|
|
5152
|
+
const [b, h] = L(() => i.map(() => Oe()));
|
|
5153
5153
|
q(() => {
|
|
5154
|
-
b.length !== i.length &&
|
|
5154
|
+
b.length !== i.length && h((I) => i.length > I.length ? [...I, ...Array.from({ length: i.length - I.length }, () => Oe())] : I.slice(0, i.length));
|
|
5155
5155
|
}, [i.length]);
|
|
5156
|
-
const
|
|
5157
|
-
i.length >= m || (u(e, [...i, Ni(t)]),
|
|
5158
|
-
}, [i, m, u, e, t]),
|
|
5159
|
-
i.length <= p || (u(e, i.filter((x,
|
|
5160
|
-
}, [i, p, u, e]),
|
|
5156
|
+
const v = z(() => {
|
|
5157
|
+
i.length >= m || (u(e, [...i, Ni(t)]), h((I) => [...I, Oe()]));
|
|
5158
|
+
}, [i, m, u, e, t]), A = z((I) => {
|
|
5159
|
+
i.length <= p || (u(e, i.filter((x, y) => y !== I)), h((x) => x.filter((y, S) => S !== I)));
|
|
5160
|
+
}, [i, p, u, e]), C = n;
|
|
5161
5161
|
return /* @__PURE__ */ O(N, { children: [
|
|
5162
5162
|
/* @__PURE__ */ d(
|
|
5163
5163
|
le,
|
|
@@ -5179,18 +5179,18 @@ function gu({
|
|
|
5179
5179
|
color: "#94a3b8",
|
|
5180
5180
|
fontSize: 13
|
|
5181
5181
|
}, children: "No items yet — click Add to start" }),
|
|
5182
|
-
i.map((
|
|
5182
|
+
i.map((I, x) => /* @__PURE__ */ d(
|
|
5183
5183
|
Di,
|
|
5184
5184
|
{
|
|
5185
5185
|
index: x,
|
|
5186
|
-
itemLabel:
|
|
5186
|
+
itemLabel: C.itemLabel,
|
|
5187
5187
|
canRemove: i.length > p && !g,
|
|
5188
|
-
onRemove: () =>
|
|
5189
|
-
children: /* @__PURE__ */ d(N, { children: t.map((
|
|
5190
|
-
const S =
|
|
5188
|
+
onRemove: () => A(x),
|
|
5189
|
+
children: /* @__PURE__ */ d(N, { children: t.map((y) => {
|
|
5190
|
+
const S = y.id ?? y.name ?? "", w = `${e}.${x}.${S}`;
|
|
5191
5191
|
return f({
|
|
5192
|
-
field:
|
|
5193
|
-
pathPrefix:
|
|
5192
|
+
field: y,
|
|
5193
|
+
pathPrefix: w,
|
|
5194
5194
|
depth: l + 1,
|
|
5195
5195
|
values: r,
|
|
5196
5196
|
errors: a,
|
|
@@ -5200,7 +5200,7 @@ function gu({
|
|
|
5200
5200
|
// Item-scoped values for this row — lets the child's
|
|
5201
5201
|
// shouldHide / shouldDisable / shouldRequire / compute see
|
|
5202
5202
|
// its siblings via `ctx.item` without splicing the path.
|
|
5203
|
-
item:
|
|
5203
|
+
item: I && typeof I == "object" ? I : void 0,
|
|
5204
5204
|
// Keep normal sibling spacing inside the row (32px between
|
|
5205
5205
|
// fields). The RowShell's CSS kills the LAST child's
|
|
5206
5206
|
// trailing margin so the row hugs its content.
|
|
@@ -5217,7 +5217,7 @@ function gu({
|
|
|
5217
5217
|
{
|
|
5218
5218
|
component: "button",
|
|
5219
5219
|
type: "button",
|
|
5220
|
-
onClick:
|
|
5220
|
+
onClick: v,
|
|
5221
5221
|
disabled: g,
|
|
5222
5222
|
sx: {
|
|
5223
5223
|
display: "inline-flex",
|
|
@@ -5236,7 +5236,7 @@ function gu({
|
|
|
5236
5236
|
},
|
|
5237
5237
|
children: [
|
|
5238
5238
|
/* @__PURE__ */ d(qe, { size: 14 }),
|
|
5239
|
-
|
|
5239
|
+
C.addLabel ?? `Add ${C.itemLabel ?? "item"}`
|
|
5240
5240
|
]
|
|
5241
5241
|
}
|
|
5242
5242
|
)
|
|
@@ -5256,14 +5256,14 @@ function Nt(n) {
|
|
|
5256
5256
|
depth: c = 0,
|
|
5257
5257
|
compact: f,
|
|
5258
5258
|
renderFieldRouter: g
|
|
5259
|
-
} = n, p = e, m = e.disabled === !0, b = p.itemType ?? "text",
|
|
5260
|
-
if (!!g && typeof r == "string" && Array.isArray(
|
|
5259
|
+
} = n, p = e, m = e.disabled === !0, b = p.itemType ?? "text", h = p.minItems ?? 0, v = p.maxItems ?? 1 / 0, A = e.children ?? p.itemFields;
|
|
5260
|
+
if (!!g && typeof r == "string" && Array.isArray(A) && A.length > 0)
|
|
5261
5261
|
return /* @__PURE__ */ d(
|
|
5262
5262
|
gu,
|
|
5263
5263
|
{
|
|
5264
5264
|
field: e,
|
|
5265
5265
|
pathPrefix: r,
|
|
5266
|
-
childFields:
|
|
5266
|
+
childFields: A,
|
|
5267
5267
|
items: at(t),
|
|
5268
5268
|
values: a ?? {},
|
|
5269
5269
|
errors: o ?? {},
|
|
@@ -5276,29 +5276,29 @@ function Nt(n) {
|
|
|
5276
5276
|
compact: f,
|
|
5277
5277
|
renderFieldRouter: g,
|
|
5278
5278
|
disabled: m,
|
|
5279
|
-
minItems:
|
|
5280
|
-
maxItems:
|
|
5279
|
+
minItems: h,
|
|
5280
|
+
maxItems: v
|
|
5281
5281
|
}
|
|
5282
5282
|
);
|
|
5283
|
-
const [
|
|
5283
|
+
const [I, x] = L(() => jt(at(t))), y = H(JSON.stringify($t(I)));
|
|
5284
5284
|
q(() => {
|
|
5285
|
-
if (JSON.stringify(at(t)) !==
|
|
5285
|
+
if (JSON.stringify(at(t)) !== y.current) {
|
|
5286
5286
|
const D = jt(at(t));
|
|
5287
|
-
x(D),
|
|
5287
|
+
x(D), y.current = JSON.stringify($t(D));
|
|
5288
5288
|
}
|
|
5289
5289
|
}, [t]);
|
|
5290
5290
|
const S = z((F) => {
|
|
5291
5291
|
const D = jt(F);
|
|
5292
5292
|
x(D);
|
|
5293
5293
|
const G = $t(D);
|
|
5294
|
-
|
|
5295
|
-
}, [i]),
|
|
5296
|
-
|
|
5297
|
-
}, [
|
|
5298
|
-
|
|
5299
|
-
}, [
|
|
5300
|
-
S(
|
|
5301
|
-
}, [
|
|
5294
|
+
y.current = JSON.stringify(G), i(G);
|
|
5295
|
+
}, [i]), w = z(() => {
|
|
5296
|
+
I.length >= v || S([...I, cu(b, p.itemFields)]);
|
|
5297
|
+
}, [I, b, p.itemFields, v, S]), B = z((F) => {
|
|
5298
|
+
I.length <= h || S(I.filter((D) => Ut(D) !== F));
|
|
5299
|
+
}, [I, h, S]), M = z((F, D) => {
|
|
5300
|
+
S(I.map((G) => Ut(G) !== F ? G : D !== null && typeof D == "object" && !Array.isArray(D) ? { ...D, [Ce]: F } : { [Ce]: F, __value: D }));
|
|
5301
|
+
}, [I, S]);
|
|
5302
5302
|
return /* @__PURE__ */ O(N, { children: [
|
|
5303
5303
|
/* @__PURE__ */ d(
|
|
5304
5304
|
le,
|
|
@@ -5311,7 +5311,7 @@ function Nt(n) {
|
|
|
5311
5311
|
}
|
|
5312
5312
|
),
|
|
5313
5313
|
e.helperText && /* @__PURE__ */ d(de, { sx: { fontSize: 12, color: "#6c757d", mb: 0.75 }, children: e.helperText }),
|
|
5314
|
-
|
|
5314
|
+
I.length === 0 && /* @__PURE__ */ d(N, { sx: {
|
|
5315
5315
|
py: 2.5,
|
|
5316
5316
|
textAlign: "center",
|
|
5317
5317
|
border: "1.5px dashed #e2e8f0",
|
|
@@ -5320,14 +5320,14 @@ function Nt(n) {
|
|
|
5320
5320
|
color: "#94a3b8",
|
|
5321
5321
|
fontSize: 13
|
|
5322
5322
|
}, children: "No items yet — click Add to start" }),
|
|
5323
|
-
|
|
5323
|
+
I.map((F, D) => {
|
|
5324
5324
|
const G = Ut(F), W = du(F);
|
|
5325
5325
|
return /* @__PURE__ */ d(
|
|
5326
5326
|
Di,
|
|
5327
5327
|
{
|
|
5328
5328
|
index: D,
|
|
5329
5329
|
itemLabel: p.itemLabel,
|
|
5330
|
-
canRemove:
|
|
5330
|
+
canRemove: I.length > h && !m,
|
|
5331
5331
|
onRemove: () => B(G),
|
|
5332
5332
|
children: b === "object" && p.itemFields ? /* @__PURE__ */ d(
|
|
5333
5333
|
Vi,
|
|
@@ -5374,13 +5374,13 @@ function Nt(n) {
|
|
|
5374
5374
|
G
|
|
5375
5375
|
);
|
|
5376
5376
|
}),
|
|
5377
|
-
|
|
5378
|
-
|
|
5377
|
+
I.length > 0 && /* @__PURE__ */ d(hn, { sx: { mb: 1, borderColor: "transparent" } }),
|
|
5378
|
+
I.length < v && /* @__PURE__ */ O(
|
|
5379
5379
|
N,
|
|
5380
5380
|
{
|
|
5381
5381
|
component: "button",
|
|
5382
5382
|
type: "button",
|
|
5383
|
-
onClick:
|
|
5383
|
+
onClick: w,
|
|
5384
5384
|
disabled: m,
|
|
5385
5385
|
sx: {
|
|
5386
5386
|
display: "inline-flex",
|
|
@@ -5408,7 +5408,7 @@ function Nt(n) {
|
|
|
5408
5408
|
function bu(n) {
|
|
5409
5409
|
return `ff-form-col-${n}`;
|
|
5410
5410
|
}
|
|
5411
|
-
function
|
|
5411
|
+
function Ue({ field: n, children: e, compact: t }) {
|
|
5412
5412
|
const i = typeof n.colSpan == "number" ? n.colSpan : 12;
|
|
5413
5413
|
return /* @__PURE__ */ O(Ve, { children: [
|
|
5414
5414
|
/* @__PURE__ */ d(
|
|
@@ -5441,7 +5441,7 @@ function hu({
|
|
|
5441
5441
|
onBlur: r
|
|
5442
5442
|
}) {
|
|
5443
5443
|
const a = te.get(n.type);
|
|
5444
|
-
return a ? /* @__PURE__ */ d(
|
|
5444
|
+
return a ? /* @__PURE__ */ d(Ue, { field: n, children: /* @__PURE__ */ d(
|
|
5445
5445
|
a,
|
|
5446
5446
|
{
|
|
5447
5447
|
field: n,
|
|
@@ -5512,7 +5512,7 @@ function vu({
|
|
|
5512
5512
|
q(() => {
|
|
5513
5513
|
e !== g.current && (g.current = e, f(e == null || e === "" ? "" : String(e)));
|
|
5514
5514
|
}, [e]);
|
|
5515
|
-
const p = !!o.prefix, m = !!o.suffix, b = p || m,
|
|
5515
|
+
const p = !!o.prefix, m = !!o.suffix, b = p || m, h = {
|
|
5516
5516
|
flex: 1,
|
|
5517
5517
|
border: "none",
|
|
5518
5518
|
outline: "none",
|
|
@@ -5526,16 +5526,16 @@ function vu({
|
|
|
5526
5526
|
width: "100%",
|
|
5527
5527
|
appearance: "none",
|
|
5528
5528
|
MozAppearance: "textfield"
|
|
5529
|
-
},
|
|
5529
|
+
}, v = {
|
|
5530
5530
|
display: "flex",
|
|
5531
5531
|
alignItems: "stretch",
|
|
5532
5532
|
width: "100%",
|
|
5533
|
-
border: s ?
|
|
5534
|
-
borderRadius:
|
|
5535
|
-
backgroundColor: l ?
|
|
5533
|
+
border: s ? R.BORDER_ERROR : R.BORDER,
|
|
5534
|
+
borderRadius: R.BORDER_RADIUS,
|
|
5535
|
+
backgroundColor: l ? R.COLOR_DISABLED_BG : "#fff",
|
|
5536
5536
|
boxSizing: "border-box",
|
|
5537
5537
|
transition: "border-color .15s, box-shadow .15s"
|
|
5538
|
-
},
|
|
5538
|
+
}, A = {
|
|
5539
5539
|
display: "flex",
|
|
5540
5540
|
alignItems: "center",
|
|
5541
5541
|
padding: "0 10px",
|
|
@@ -5545,10 +5545,10 @@ function vu({
|
|
|
5545
5545
|
flexShrink: 0,
|
|
5546
5546
|
borderLeft: m ? "1px solid rgba(0,0,0,0.1)" : void 0,
|
|
5547
5547
|
borderRight: p ? "1px solid rgba(0,0,0,0.1)" : void 0
|
|
5548
|
-
},
|
|
5549
|
-
x.currentTarget.style.borderColor = s ?
|
|
5550
|
-
},
|
|
5551
|
-
x.currentTarget.contains(x.relatedTarget) || (x.currentTarget.style.borderColor = s ?
|
|
5548
|
+
}, C = (x) => {
|
|
5549
|
+
x.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, x.currentTarget.style.boxShadow = s ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
5550
|
+
}, I = (x) => {
|
|
5551
|
+
x.currentTarget.contains(x.relatedTarget) || (x.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, x.currentTarget.style.boxShadow = "none", i());
|
|
5552
5552
|
};
|
|
5553
5553
|
return /* @__PURE__ */ O("div", { children: [
|
|
5554
5554
|
/* @__PURE__ */ d(
|
|
@@ -5566,11 +5566,11 @@ function vu({
|
|
|
5566
5566
|
/* @__PURE__ */ O(
|
|
5567
5567
|
"div",
|
|
5568
5568
|
{
|
|
5569
|
-
style: b ?
|
|
5570
|
-
onFocus: b ?
|
|
5571
|
-
onBlur: b ?
|
|
5569
|
+
style: b ? v : void 0,
|
|
5570
|
+
onFocus: b ? C : void 0,
|
|
5571
|
+
onBlur: b ? I : void 0,
|
|
5572
5572
|
children: [
|
|
5573
|
-
p && /* @__PURE__ */ d("span", { style:
|
|
5573
|
+
p && /* @__PURE__ */ d("span", { style: A, children: o.prefix }),
|
|
5574
5574
|
/* @__PURE__ */ d(
|
|
5575
5575
|
"input",
|
|
5576
5576
|
{
|
|
@@ -5585,27 +5585,27 @@ function vu({
|
|
|
5585
5585
|
placeholder: o.placeholder ?? "",
|
|
5586
5586
|
value: c,
|
|
5587
5587
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
5588
|
-
style: b ?
|
|
5589
|
-
...
|
|
5590
|
-
border: s ?
|
|
5591
|
-
borderRadius:
|
|
5592
|
-
backgroundColor: l ?
|
|
5588
|
+
style: b ? h : {
|
|
5589
|
+
...h,
|
|
5590
|
+
border: s ? R.BORDER_ERROR : R.BORDER,
|
|
5591
|
+
borderRadius: R.BORDER_RADIUS,
|
|
5592
|
+
backgroundColor: l ? R.COLOR_DISABLED_BG : "#fff"
|
|
5593
5593
|
},
|
|
5594
5594
|
onChange: (x) => {
|
|
5595
|
-
const
|
|
5596
|
-
f(
|
|
5597
|
-
const S =
|
|
5595
|
+
const y = x.target.value;
|
|
5596
|
+
f(y);
|
|
5597
|
+
const S = y === "" ? null : Number(y);
|
|
5598
5598
|
g.current = S, t(S);
|
|
5599
5599
|
},
|
|
5600
5600
|
onFocus: b ? void 0 : (x) => {
|
|
5601
|
-
x.currentTarget.style.borderColor = s ?
|
|
5601
|
+
x.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, x.currentTarget.style.boxShadow = s ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
5602
5602
|
},
|
|
5603
5603
|
onBlurCapture: b ? void 0 : (x) => {
|
|
5604
|
-
x.currentTarget.style.borderColor = s ?
|
|
5604
|
+
x.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, x.currentTarget.style.boxShadow = "none", i();
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
5607
|
),
|
|
5608
|
-
m && /* @__PURE__ */ d("span", { style: { ...
|
|
5608
|
+
m && /* @__PURE__ */ d("span", { style: { ...A, borderRight: void 0 }, children: o.suffix })
|
|
5609
5609
|
]
|
|
5610
5610
|
}
|
|
5611
5611
|
),
|
|
@@ -5652,7 +5652,7 @@ function Iu({
|
|
|
5652
5652
|
s && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: fe, children: r })
|
|
5653
5653
|
] });
|
|
5654
5654
|
}
|
|
5655
|
-
function
|
|
5655
|
+
function yu({
|
|
5656
5656
|
field: n,
|
|
5657
5657
|
value: e,
|
|
5658
5658
|
onChange: t,
|
|
@@ -5726,8 +5726,8 @@ function Tn({
|
|
|
5726
5726
|
fontSize: 14,
|
|
5727
5727
|
color: "#374151",
|
|
5728
5728
|
backgroundColor: l ? "#f9fafb" : "#fff",
|
|
5729
|
-
border: `1px solid ${s ?
|
|
5730
|
-
borderRadius:
|
|
5729
|
+
border: `1px solid ${s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR}`,
|
|
5730
|
+
borderRadius: R.BORDER_RADIUS,
|
|
5731
5731
|
outline: "none",
|
|
5732
5732
|
padding: "6px 12px",
|
|
5733
5733
|
boxSizing: "border-box",
|
|
@@ -5765,17 +5765,17 @@ function Tn({
|
|
|
5765
5765
|
},
|
|
5766
5766
|
onBlur: i,
|
|
5767
5767
|
onFocus: (b) => {
|
|
5768
|
-
b.currentTarget.style.borderColor = s ?
|
|
5768
|
+
b.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR_FOCUS, b.currentTarget.style.boxShadow = s ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW;
|
|
5769
5769
|
},
|
|
5770
5770
|
onBlurCapture: (b) => {
|
|
5771
|
-
b.currentTarget.style.borderColor = s ?
|
|
5771
|
+
b.currentTarget.style.borderColor = s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR, b.currentTarget.style.boxShadow = "none";
|
|
5772
5772
|
}
|
|
5773
5773
|
}
|
|
5774
5774
|
),
|
|
5775
5775
|
s && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: fe, children: r })
|
|
5776
5776
|
] });
|
|
5777
5777
|
}
|
|
5778
|
-
function
|
|
5778
|
+
function xu({
|
|
5779
5779
|
field: n,
|
|
5780
5780
|
value: e,
|
|
5781
5781
|
onChange: t,
|
|
@@ -5783,12 +5783,12 @@ function yu({
|
|
|
5783
5783
|
error: r,
|
|
5784
5784
|
touched: a
|
|
5785
5785
|
}) {
|
|
5786
|
-
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = L(""), [p, m] = L(!1), b = H(null),
|
|
5787
|
-
const x =
|
|
5786
|
+
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = Array.isArray(e) ? e : [], [f, g] = L(""), [p, m] = L(!1), b = H(null), h = (I) => {
|
|
5787
|
+
const x = I.trim();
|
|
5788
5788
|
!x || c.includes(x) || o.maxTags && c.length >= o.maxTags || (t([...c, x]), g(""));
|
|
5789
|
-
},
|
|
5790
|
-
t(c.filter((x,
|
|
5791
|
-
},
|
|
5789
|
+
}, v = (I) => {
|
|
5790
|
+
t(c.filter((x, y) => y !== I));
|
|
5791
|
+
}, A = s ? R.BORDER_COLOR_ERROR : p ? R.BORDER_COLOR_FOCUS : R.BORDER_COLOR, C = p ? s ? R.FOCUS_SHADOW_ERROR : R.FOCUS_SHADOW : "none";
|
|
5792
5792
|
return /* @__PURE__ */ O("div", { children: [
|
|
5793
5793
|
/* @__PURE__ */ d(
|
|
5794
5794
|
le,
|
|
@@ -5806,8 +5806,8 @@ function yu({
|
|
|
5806
5806
|
"div",
|
|
5807
5807
|
{
|
|
5808
5808
|
onClick: () => {
|
|
5809
|
-
var
|
|
5810
|
-
return (
|
|
5809
|
+
var I;
|
|
5810
|
+
return (I = b.current) == null ? void 0 : I.focus();
|
|
5811
5811
|
},
|
|
5812
5812
|
style: {
|
|
5813
5813
|
display: "flex",
|
|
@@ -5816,16 +5816,16 @@ function yu({
|
|
|
5816
5816
|
gap: 4,
|
|
5817
5817
|
minHeight: 38,
|
|
5818
5818
|
padding: "4px 8px",
|
|
5819
|
-
border: `1px solid ${
|
|
5820
|
-
borderRadius:
|
|
5821
|
-
backgroundColor: l ?
|
|
5822
|
-
boxShadow:
|
|
5819
|
+
border: `1px solid ${A}`,
|
|
5820
|
+
borderRadius: R.BORDER_RADIUS,
|
|
5821
|
+
backgroundColor: l ? R.COLOR_DISABLED_BG : "#fff",
|
|
5822
|
+
boxShadow: C,
|
|
5823
5823
|
boxSizing: "border-box",
|
|
5824
5824
|
cursor: l ? "not-allowed" : "text",
|
|
5825
5825
|
transition: "border-color .15s, box-shadow .15s"
|
|
5826
5826
|
},
|
|
5827
5827
|
children: [
|
|
5828
|
-
c.map((
|
|
5828
|
+
c.map((I, x) => /* @__PURE__ */ O(
|
|
5829
5829
|
"span",
|
|
5830
5830
|
{
|
|
5831
5831
|
style: {
|
|
@@ -5842,13 +5842,13 @@ function yu({
|
|
|
5842
5842
|
lineHeight: 1.6
|
|
5843
5843
|
},
|
|
5844
5844
|
children: [
|
|
5845
|
-
|
|
5845
|
+
I,
|
|
5846
5846
|
!l && /* @__PURE__ */ d(
|
|
5847
5847
|
"button",
|
|
5848
5848
|
{
|
|
5849
5849
|
type: "button",
|
|
5850
|
-
onClick: (
|
|
5851
|
-
|
|
5850
|
+
onClick: (y) => {
|
|
5851
|
+
y.stopPropagation(), v(x);
|
|
5852
5852
|
},
|
|
5853
5853
|
style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", color: "#7c3aed" },
|
|
5854
5854
|
children: /* @__PURE__ */ d(Fe, { size: 12 })
|
|
@@ -5856,7 +5856,7 @@ function yu({
|
|
|
5856
5856
|
)
|
|
5857
5857
|
]
|
|
5858
5858
|
},
|
|
5859
|
-
|
|
5859
|
+
I
|
|
5860
5860
|
)),
|
|
5861
5861
|
/* @__PURE__ */ d(
|
|
5862
5862
|
"input",
|
|
@@ -5878,13 +5878,13 @@ function yu({
|
|
|
5878
5878
|
padding: "2px 4px",
|
|
5879
5879
|
cursor: l ? "not-allowed" : void 0
|
|
5880
5880
|
},
|
|
5881
|
-
onChange: (
|
|
5882
|
-
onKeyDown: (
|
|
5883
|
-
(
|
|
5881
|
+
onChange: (I) => g(I.target.value),
|
|
5882
|
+
onKeyDown: (I) => {
|
|
5883
|
+
(I.key === "Enter" || I.key === ",") && (I.preventDefault(), h(f)), I.key === "Backspace" && !f && c.length > 0 && v(c.length - 1);
|
|
5884
5884
|
},
|
|
5885
5885
|
onFocus: () => m(!0),
|
|
5886
5886
|
onBlur: () => {
|
|
5887
|
-
m(!1), f.trim() &&
|
|
5887
|
+
m(!1), f.trim() && h(f), i();
|
|
5888
5888
|
}
|
|
5889
5889
|
}
|
|
5890
5890
|
)
|
|
@@ -5931,9 +5931,9 @@ function Cu({
|
|
|
5931
5931
|
step: g,
|
|
5932
5932
|
disabled: l,
|
|
5933
5933
|
marks: o.marks,
|
|
5934
|
-
onChange: (
|
|
5935
|
-
const
|
|
5936
|
-
m(
|
|
5934
|
+
onChange: (h, v) => {
|
|
5935
|
+
const A = Array.isArray(v) ? v[0] : v;
|
|
5936
|
+
m(A), b.current = A, t(A);
|
|
5937
5937
|
},
|
|
5938
5938
|
onChangeCommitted: () => i(),
|
|
5939
5939
|
sx: {
|
|
@@ -5987,10 +5987,10 @@ function Au({
|
|
|
5987
5987
|
"div",
|
|
5988
5988
|
{
|
|
5989
5989
|
style: {
|
|
5990
|
-
width:
|
|
5991
|
-
height:
|
|
5992
|
-
borderRadius:
|
|
5993
|
-
border: s ?
|
|
5990
|
+
width: R.INPUT_HEIGHT,
|
|
5991
|
+
height: R.INPUT_HEIGHT,
|
|
5992
|
+
borderRadius: R.BORDER_RADIUS,
|
|
5993
|
+
border: s ? R.BORDER_ERROR : R.BORDER,
|
|
5994
5994
|
overflow: "hidden",
|
|
5995
5995
|
flexShrink: 0,
|
|
5996
5996
|
cursor: l ? "not-allowed" : "pointer",
|
|
@@ -6038,15 +6038,15 @@ function Au({
|
|
|
6038
6038
|
},
|
|
6039
6039
|
onBlur: i,
|
|
6040
6040
|
style: {
|
|
6041
|
-
fontSize:
|
|
6041
|
+
fontSize: R.FONT_SIZE_INPUT,
|
|
6042
6042
|
fontFamily: "monospace",
|
|
6043
|
-
color:
|
|
6044
|
-
backgroundColor: l ?
|
|
6045
|
-
border: s ?
|
|
6046
|
-
borderRadius:
|
|
6043
|
+
color: R.COLOR_LABEL,
|
|
6044
|
+
backgroundColor: l ? R.COLOR_DISABLED_BG : "#fff",
|
|
6045
|
+
border: s ? R.BORDER_ERROR : R.BORDER,
|
|
6046
|
+
borderRadius: R.BORDER_RADIUS,
|
|
6047
6047
|
padding: "0 10px",
|
|
6048
6048
|
outline: "none",
|
|
6049
|
-
height:
|
|
6049
|
+
height: R.INPUT_HEIGHT,
|
|
6050
6050
|
width: 100,
|
|
6051
6051
|
boxSizing: "border-box",
|
|
6052
6052
|
transition: "border-color 0.15s, box-shadow 0.15s"
|
|
@@ -6068,20 +6068,20 @@ function Ru({
|
|
|
6068
6068
|
error: r,
|
|
6069
6069
|
touched: a
|
|
6070
6070
|
}) {
|
|
6071
|
-
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = H(null), [f, g] = L(!1), [p, m] = L(null), b = e instanceof File ? [e] : Array.isArray(e) ? e : [],
|
|
6072
|
-
if (!
|
|
6073
|
-
const
|
|
6071
|
+
const o = n, u = o.id ?? o.name ?? "", s = !!(a && r), l = o.disabled === !0, c = H(null), [f, g] = L(!1), [p, m] = L(null), b = e instanceof File ? [e] : Array.isArray(e) ? e : [], h = (C) => {
|
|
6072
|
+
if (!C) return;
|
|
6073
|
+
const I = Array.from(C);
|
|
6074
6074
|
if (o.maxSizeMb) {
|
|
6075
|
-
const x =
|
|
6075
|
+
const x = I.find((y) => y.size > o.maxSizeMb * 1024 * 1024);
|
|
6076
6076
|
if (x) {
|
|
6077
6077
|
m(`"${x.name}" exceeds ${o.maxSizeMb} MB`);
|
|
6078
6078
|
return;
|
|
6079
6079
|
}
|
|
6080
6080
|
}
|
|
6081
|
-
m(null), t(o.multiple ?
|
|
6082
|
-
},
|
|
6083
|
-
o.multiple ? t(b.filter((
|
|
6084
|
-
},
|
|
6081
|
+
m(null), t(o.multiple ? I : I[0] ?? null);
|
|
6082
|
+
}, v = (C) => {
|
|
6083
|
+
o.multiple ? t(b.filter((I, x) => x !== C)) : t(null), c.current && (c.current.value = "");
|
|
6084
|
+
}, A = s || p ? R.BORDER_COLOR_ERROR : f ? R.BORDER_COLOR_FOCUS : R.BORDER_COLOR;
|
|
6085
6085
|
return /* @__PURE__ */ O("div", { children: [
|
|
6086
6086
|
/* @__PURE__ */ d(
|
|
6087
6087
|
le,
|
|
@@ -6099,19 +6099,19 @@ function Ru({
|
|
|
6099
6099
|
"div",
|
|
6100
6100
|
{
|
|
6101
6101
|
onClick: () => {
|
|
6102
|
-
var
|
|
6103
|
-
return !l && ((
|
|
6102
|
+
var C;
|
|
6103
|
+
return !l && ((C = c.current) == null ? void 0 : C.click());
|
|
6104
6104
|
},
|
|
6105
|
-
onDragOver: (
|
|
6106
|
-
|
|
6105
|
+
onDragOver: (C) => {
|
|
6106
|
+
C.preventDefault(), l || g(!0);
|
|
6107
6107
|
},
|
|
6108
6108
|
onDragLeave: () => g(!1),
|
|
6109
|
-
onDrop: (
|
|
6110
|
-
|
|
6109
|
+
onDrop: (C) => {
|
|
6110
|
+
C.preventDefault(), g(!1), l || h(C.dataTransfer.files);
|
|
6111
6111
|
},
|
|
6112
6112
|
style: {
|
|
6113
|
-
border: `1px dashed ${
|
|
6114
|
-
borderRadius:
|
|
6113
|
+
border: `1px dashed ${A}`,
|
|
6114
|
+
borderRadius: R.BORDER_RADIUS,
|
|
6115
6115
|
padding: "14px 16px",
|
|
6116
6116
|
textAlign: "center",
|
|
6117
6117
|
cursor: l ? "not-allowed" : "pointer",
|
|
@@ -6130,8 +6130,8 @@ function Ru({
|
|
|
6130
6130
|
disabled: l,
|
|
6131
6131
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6132
6132
|
style: { display: "none" },
|
|
6133
|
-
onChange: (
|
|
6134
|
-
|
|
6133
|
+
onChange: (C) => {
|
|
6134
|
+
h(C.target.files), i();
|
|
6135
6135
|
}
|
|
6136
6136
|
}
|
|
6137
6137
|
),
|
|
@@ -6146,18 +6146,18 @@ function Ru({
|
|
|
6146
6146
|
]
|
|
6147
6147
|
}
|
|
6148
6148
|
),
|
|
6149
|
-
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((
|
|
6149
|
+
b.length > 0 && /* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 4, marginTop: 8 }, children: b.map((C, I) => /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 10px", border: "1px solid #e5e7eb", borderRadius: 4, backgroundColor: "#f9fafb" }, children: [
|
|
6150
6150
|
/* @__PURE__ */ d(Ao, { size: 16, color: "#6366f1" }),
|
|
6151
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children:
|
|
6152
|
-
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Su(
|
|
6151
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 13, color: "#374151", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: C.name }),
|
|
6152
|
+
/* @__PURE__ */ d("span", { style: { fontSize: 11, color: "#6b7280", flexShrink: 0 }, children: Su(C.size) }),
|
|
6153
6153
|
!l && /* @__PURE__ */ d("button", { type: "button", onClick: (x) => {
|
|
6154
|
-
x.stopPropagation(), I
|
|
6154
|
+
x.stopPropagation(), v(I);
|
|
6155
6155
|
}, style: { background: "none", border: "none", cursor: "pointer", color: "#9ca3af", display: "flex", padding: 0 }, children: /* @__PURE__ */ d(Fe, { size: 14 }) })
|
|
6156
|
-
] }, `${
|
|
6156
|
+
] }, `${C.name}-${C.size}-${C.lastModified}`)) }),
|
|
6157
6157
|
(s || p) && /* @__PURE__ */ d("small", { "data-testid": `${u}-error`, style: fe, children: p ?? r })
|
|
6158
6158
|
] });
|
|
6159
6159
|
}
|
|
6160
|
-
const Eu = Qe.lazy(async () => ({ default: (await import("./index-
|
|
6160
|
+
const Eu = Qe.lazy(async () => ({ default: (await import("./index-Buv1ylwP.js")).default }));
|
|
6161
6161
|
async function Ou(n) {
|
|
6162
6162
|
switch (n) {
|
|
6163
6163
|
case "python":
|
|
@@ -6224,17 +6224,17 @@ function Fu({
|
|
|
6224
6224
|
p(x);
|
|
6225
6225
|
try {
|
|
6226
6226
|
x.trim() && JSON.parse(x), f(null);
|
|
6227
|
-
} catch (
|
|
6228
|
-
f(
|
|
6227
|
+
} catch (y) {
|
|
6228
|
+
f(y.message);
|
|
6229
6229
|
}
|
|
6230
6230
|
m.current = x, t(x);
|
|
6231
|
-
},
|
|
6231
|
+
}, h = () => {
|
|
6232
6232
|
try {
|
|
6233
6233
|
const x = JSON.stringify(JSON.parse(g), null, 2);
|
|
6234
6234
|
p(x), f(null), m.current = x, t(x);
|
|
6235
6235
|
} catch {
|
|
6236
6236
|
}
|
|
6237
|
-
},
|
|
6237
|
+
}, v = o.rows ?? 8, A = `${v * 22}px`, C = `${v * 22}px`, I = s || c ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR;
|
|
6238
6238
|
return /* @__PURE__ */ O("div", { children: [
|
|
6239
6239
|
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6240
6240
|
/* @__PURE__ */ d(
|
|
@@ -6252,7 +6252,7 @@ function Fu({
|
|
|
6252
6252
|
"button",
|
|
6253
6253
|
{
|
|
6254
6254
|
type: "button",
|
|
6255
|
-
onClick:
|
|
6255
|
+
onClick: h,
|
|
6256
6256
|
style: { fontSize: 11, fontWeight: 600, color: "#6366f1", background: "none", border: "none", cursor: "pointer", padding: "0 0 4px" },
|
|
6257
6257
|
children: "Format"
|
|
6258
6258
|
}
|
|
@@ -6265,8 +6265,8 @@ function Fu({
|
|
|
6265
6265
|
id: u,
|
|
6266
6266
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6267
6267
|
style: {
|
|
6268
|
-
border: `1px solid ${
|
|
6269
|
-
borderRadius:
|
|
6268
|
+
border: `1px solid ${I}`,
|
|
6269
|
+
borderRadius: R.BORDER_RADIUS,
|
|
6270
6270
|
overflow: "hidden",
|
|
6271
6271
|
fontSize: 13
|
|
6272
6272
|
},
|
|
@@ -6276,8 +6276,8 @@ function Fu({
|
|
|
6276
6276
|
language: "json",
|
|
6277
6277
|
value: g,
|
|
6278
6278
|
readOnly: l || o.readOnly,
|
|
6279
|
-
minHeight:
|
|
6280
|
-
maxHeight:
|
|
6279
|
+
minHeight: A,
|
|
6280
|
+
maxHeight: C,
|
|
6281
6281
|
basicSetup: { lineNumbers: !0, foldGutter: !0 },
|
|
6282
6282
|
onChange: b,
|
|
6283
6283
|
onBlur: i,
|
|
@@ -6307,9 +6307,9 @@ function Tu({
|
|
|
6307
6307
|
q(() => {
|
|
6308
6308
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6309
6309
|
}, [e]);
|
|
6310
|
-
const p = (
|
|
6311
|
-
f(
|
|
6312
|
-
}, m = o.rows ?? 8, b = `${m * 22}px`,
|
|
6310
|
+
const p = (A) => {
|
|
6311
|
+
f(A), g.current = A, t(A);
|
|
6312
|
+
}, m = o.rows ?? 8, b = `${m * 22}px`, h = `${m * 22}px`, v = wu[o.language ?? "javascript"] ?? "CODE";
|
|
6313
6313
|
return /* @__PURE__ */ O("div", { children: [
|
|
6314
6314
|
/* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6315
6315
|
/* @__PURE__ */ d(
|
|
@@ -6333,7 +6333,7 @@ function Tu({
|
|
|
6333
6333
|
padding: "1px 6px",
|
|
6334
6334
|
letterSpacing: 0.5,
|
|
6335
6335
|
marginBottom: 4
|
|
6336
|
-
}, children:
|
|
6336
|
+
}, children: v })
|
|
6337
6337
|
] }),
|
|
6338
6338
|
o.helperText && !s && /* @__PURE__ */ d("small", { style: ue, children: o.helperText }),
|
|
6339
6339
|
/* @__PURE__ */ d(
|
|
@@ -6342,8 +6342,8 @@ function Tu({
|
|
|
6342
6342
|
id: u,
|
|
6343
6343
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6344
6344
|
style: {
|
|
6345
|
-
border: `1px solid ${s ?
|
|
6346
|
-
borderRadius:
|
|
6345
|
+
border: `1px solid ${s ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR}`,
|
|
6346
|
+
borderRadius: R.BORDER_RADIUS,
|
|
6347
6347
|
overflow: "hidden"
|
|
6348
6348
|
},
|
|
6349
6349
|
children: /* @__PURE__ */ d(
|
|
@@ -6353,7 +6353,7 @@ function Tu({
|
|
|
6353
6353
|
value: c,
|
|
6354
6354
|
readOnly: l || o.readOnly,
|
|
6355
6355
|
minHeight: b,
|
|
6356
|
-
maxHeight:
|
|
6356
|
+
maxHeight: h,
|
|
6357
6357
|
basicSetup: { lineNumbers: !0, foldGutter: !0, autocompletion: !0 },
|
|
6358
6358
|
onChange: p,
|
|
6359
6359
|
onBlur: i,
|
|
@@ -6366,7 +6366,7 @@ function Tu({
|
|
|
6366
6366
|
] });
|
|
6367
6367
|
}
|
|
6368
6368
|
const Gu = Qe.lazy(
|
|
6369
|
-
() => import("./index-
|
|
6369
|
+
() => import("./index-B8-KKaH_.js").then((n) => n.i).then((n) => (Promise.resolve({ }), { default: n.default }))
|
|
6370
6370
|
), Bu = [
|
|
6371
6371
|
[{ header: [1, 2, 3, !1] }],
|
|
6372
6372
|
["bold", "italic", "underline", "strike"],
|
|
@@ -6386,8 +6386,8 @@ function Vu({
|
|
|
6386
6386
|
q(() => {
|
|
6387
6387
|
e !== g.current && (g.current = e, f(String(e ?? "")));
|
|
6388
6388
|
}, [e]);
|
|
6389
|
-
const p = (
|
|
6390
|
-
f(
|
|
6389
|
+
const p = (h) => {
|
|
6390
|
+
f(h), g.current = h, t(h);
|
|
6391
6391
|
}, m = (o.rows ?? 6) * 24, b = o.toolbar !== !1;
|
|
6392
6392
|
return /* @__PURE__ */ O("div", { children: [
|
|
6393
6393
|
/* @__PURE__ */ d(
|
|
@@ -6408,8 +6408,8 @@ function Vu({
|
|
|
6408
6408
|
id: u,
|
|
6409
6409
|
"data-testid": o.dataTestId ?? `${u}-input`,
|
|
6410
6410
|
style: {
|
|
6411
|
-
border: s ?
|
|
6412
|
-
borderRadius:
|
|
6411
|
+
border: s ? R.BORDER_ERROR : R.BORDER,
|
|
6412
|
+
borderRadius: R.BORDER_RADIUS,
|
|
6413
6413
|
overflow: "hidden",
|
|
6414
6414
|
fontSize: 14
|
|
6415
6415
|
},
|
|
@@ -6484,50 +6484,50 @@ function Pu() {
|
|
|
6484
6484
|
} });
|
|
6485
6485
|
}
|
|
6486
6486
|
function Lu({ loadPage: n, loadSelected: e, currentValues: t, isOpen: i }) {
|
|
6487
|
-
const [r, a] = L([]), [o, u] = L(0), [s, l] = L(!0), [c, f] = L(!1), g = H(/* @__PURE__ */ new Map()), [p, m] = L(0), [b,
|
|
6488
|
-
|
|
6487
|
+
const [r, a] = L([]), [o, u] = L(0), [s, l] = L(!0), [c, f] = L(!1), g = H(/* @__PURE__ */ new Map()), [p, m] = L(0), [b, h] = L(""), [v, A] = L(""), C = H(null), I = H(null), x = H(null), y = z((G) => {
|
|
6488
|
+
h(G), C.current && clearTimeout(C.current), C.current = setTimeout(() => A(G), 300);
|
|
6489
6489
|
}, []);
|
|
6490
6490
|
q(() => {
|
|
6491
6491
|
var W;
|
|
6492
|
-
if (!i || x.current ===
|
|
6493
|
-
x.current =
|
|
6492
|
+
if (!i || x.current === v) return;
|
|
6493
|
+
x.current = v, (W = I.current) == null || W.abort();
|
|
6494
6494
|
const G = new AbortController();
|
|
6495
|
-
return
|
|
6495
|
+
return I.current = G, a([]), u(0), l(!0), f(!0), n({ page: 1, search: v, signal: G.signal }).then((V) => {
|
|
6496
6496
|
if (G.signal.aborted) return;
|
|
6497
6497
|
const j = ur(V.options);
|
|
6498
6498
|
a(j), u(1), l(V.hasMore), f(!1);
|
|
6499
6499
|
}).catch((V) => {
|
|
6500
6500
|
cr(V) || f(!1);
|
|
6501
6501
|
}), () => G.abort();
|
|
6502
|
-
}, [
|
|
6502
|
+
}, [v, i]);
|
|
6503
6503
|
const S = z(() => {
|
|
6504
6504
|
var V;
|
|
6505
6505
|
if (c || !s) return;
|
|
6506
|
-
(V =
|
|
6506
|
+
(V = I.current) == null || V.abort();
|
|
6507
6507
|
const G = new AbortController();
|
|
6508
|
-
|
|
6508
|
+
I.current = G, f(!0);
|
|
6509
6509
|
const W = o + 1;
|
|
6510
|
-
n({ page: W, search:
|
|
6510
|
+
n({ page: W, search: v, signal: G.signal }).then((j) => {
|
|
6511
6511
|
G.signal.aborted || (a((Q) => ur([...Q, ...j.options])), u(W), l(j.hasMore), f(!1));
|
|
6512
6512
|
}).catch((j) => {
|
|
6513
6513
|
cr(j) || f(!1);
|
|
6514
6514
|
});
|
|
6515
|
-
}, [c, s, o,
|
|
6515
|
+
}, [c, s, o, v]), w = H(/* @__PURE__ */ new Set());
|
|
6516
6516
|
q(() => {
|
|
6517
6517
|
if (!e || t.length === 0) return;
|
|
6518
6518
|
const G = t.filter(
|
|
6519
|
-
(W) => !g.current.has(W) && !
|
|
6519
|
+
(W) => !g.current.has(W) && !w.current.has(W)
|
|
6520
6520
|
);
|
|
6521
|
-
G.length !== 0 && (G.forEach((W) =>
|
|
6521
|
+
G.length !== 0 && (G.forEach((W) => w.current.add(W)), e(G).then((W) => {
|
|
6522
6522
|
W.forEach((V) => g.current.set(V.value, V)), m((V) => V + 1);
|
|
6523
6523
|
}).catch(() => {
|
|
6524
6524
|
}).finally(() => {
|
|
6525
|
-
G.forEach((W) =>
|
|
6525
|
+
G.forEach((W) => w.current.delete(W));
|
|
6526
6526
|
}));
|
|
6527
6527
|
}, [t.join("|")]);
|
|
6528
6528
|
const B = z(() => {
|
|
6529
6529
|
var G;
|
|
6530
|
-
x.current = null,
|
|
6530
|
+
x.current = null, h(""), A(""), C.current && clearTimeout(C.current), (G = I.current) == null || G.abort();
|
|
6531
6531
|
}, []), M = ae(() => r, [r, p]), F = z((G) => {
|
|
6532
6532
|
const W = r.find((V) => V.value === G);
|
|
6533
6533
|
return W || g.current.get(G);
|
|
@@ -6541,7 +6541,7 @@ function Lu({ loadPage: n, loadSelected: e, currentValues: t, isOpen: i }) {
|
|
|
6541
6541
|
isLoading: c,
|
|
6542
6542
|
hasMore: s,
|
|
6543
6543
|
inputValue: b,
|
|
6544
|
-
handleInputChange:
|
|
6544
|
+
handleInputChange: y,
|
|
6545
6545
|
loadMore: S,
|
|
6546
6546
|
handleMenuClose: B,
|
|
6547
6547
|
updateSelectedCache: D
|
|
@@ -6575,15 +6575,15 @@ function Mu({
|
|
|
6575
6575
|
g && Du(f);
|
|
6576
6576
|
}, [g, f]);
|
|
6577
6577
|
const m = z(() => p(!0), []), b = ae(() => dr(e), [e]), {
|
|
6578
|
-
options:
|
|
6579
|
-
lookupOption:
|
|
6580
|
-
isLoading:
|
|
6581
|
-
hasMore:
|
|
6582
|
-
inputValue:
|
|
6578
|
+
options: h,
|
|
6579
|
+
lookupOption: v,
|
|
6580
|
+
isLoading: A,
|
|
6581
|
+
hasMore: C,
|
|
6582
|
+
inputValue: I,
|
|
6583
6583
|
handleInputChange: x,
|
|
6584
|
-
loadMore:
|
|
6584
|
+
loadMore: y,
|
|
6585
6585
|
handleMenuClose: S,
|
|
6586
|
-
updateSelectedCache:
|
|
6586
|
+
updateSelectedCache: w
|
|
6587
6587
|
} = Lu({
|
|
6588
6588
|
loadPage: o.loadPage,
|
|
6589
6589
|
loadSelected: o.loadSelected,
|
|
@@ -6595,16 +6595,16 @@ function Mu({
|
|
|
6595
6595
|
q(() => {
|
|
6596
6596
|
M.current && !g && B.current(), M.current = g;
|
|
6597
6597
|
}, [g]);
|
|
6598
|
-
const F = z(() => p(!1), []), D = ae(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? dr(e).map((Q) =>
|
|
6598
|
+
const F = z(() => p(!1), []), D = ae(() => e == null || e === "" || Array.isArray(e) && e.length === 0 ? u ? [] : null : u ? dr(e).map((Q) => v(Q)).filter((Q) => !!Q) : v(String(e)) ?? null, [e, v, u]), G = z((Q) => {
|
|
6599
6599
|
if (u) {
|
|
6600
6600
|
const U = Q ?? [];
|
|
6601
|
-
|
|
6601
|
+
w(U), t(U.map((re) => re.value));
|
|
6602
6602
|
} else {
|
|
6603
6603
|
const U = Q;
|
|
6604
|
-
U &&
|
|
6604
|
+
U && w(U), t(U ? U.value : null);
|
|
6605
6605
|
}
|
|
6606
|
-
}, [u, t,
|
|
6607
|
-
W.current = { loadMore:
|
|
6606
|
+
}, [u, t, w]), W = H({ loadMore: y, isLoading: A, hasMore: C });
|
|
6607
|
+
W.current = { loadMore: y, isLoading: A, hasMore: C };
|
|
6608
6608
|
const V = H(
|
|
6609
6609
|
function(U) {
|
|
6610
6610
|
return /* @__PURE__ */ d(
|
|
@@ -6618,8 +6618,8 @@ function Mu({
|
|
|
6618
6618
|
);
|
|
6619
6619
|
}
|
|
6620
6620
|
).current, j = z(
|
|
6621
|
-
() =>
|
|
6622
|
-
[
|
|
6621
|
+
() => A ? "Loading…" : "No options found",
|
|
6622
|
+
[A]
|
|
6623
6623
|
);
|
|
6624
6624
|
return /* @__PURE__ */ O("div", { className: `${o.customClass ?? ""} ${o.hidden ? "ff-form-hidden" : ""}`, children: [
|
|
6625
6625
|
/* @__PURE__ */ d(
|
|
@@ -6638,11 +6638,11 @@ function Mu({
|
|
|
6638
6638
|
{
|
|
6639
6639
|
inputId: s,
|
|
6640
6640
|
value: D,
|
|
6641
|
-
inputValue:
|
|
6641
|
+
inputValue: I,
|
|
6642
6642
|
onInputChange: x,
|
|
6643
6643
|
onChange: G,
|
|
6644
6644
|
onBlur: i,
|
|
6645
|
-
options:
|
|
6645
|
+
options: h,
|
|
6646
6646
|
isMulti: u,
|
|
6647
6647
|
isDisabled: c,
|
|
6648
6648
|
isClearable: o.isClearable ?? !1,
|
|
@@ -6673,11 +6673,11 @@ te.register("array", Nt);
|
|
|
6673
6673
|
te.register("schema", mu);
|
|
6674
6674
|
te.register("number", vu);
|
|
6675
6675
|
te.register("toggle", Iu);
|
|
6676
|
-
te.register("radio-group",
|
|
6676
|
+
te.register("radio-group", yu);
|
|
6677
6677
|
te.register("date", Tn);
|
|
6678
6678
|
te.register("datetime", Tn);
|
|
6679
6679
|
te.register("time", Tn);
|
|
6680
|
-
te.register("tags",
|
|
6680
|
+
te.register("tags", xu);
|
|
6681
6681
|
te.register("slider", Cu);
|
|
6682
6682
|
te.register("color", Au);
|
|
6683
6683
|
te.register("file", Ru);
|
|
@@ -6689,21 +6689,21 @@ var Ad = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
6689
6689
|
function Wu(n) {
|
|
6690
6690
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
6691
6691
|
}
|
|
6692
|
-
function
|
|
6692
|
+
function Ze(n) {
|
|
6693
6693
|
this._maxSize = n, this.clear();
|
|
6694
6694
|
}
|
|
6695
|
-
|
|
6695
|
+
Ze.prototype.clear = function() {
|
|
6696
6696
|
this._size = 0, this._values = /* @__PURE__ */ Object.create(null);
|
|
6697
6697
|
};
|
|
6698
|
-
|
|
6698
|
+
Ze.prototype.get = function(n) {
|
|
6699
6699
|
return this._values[n];
|
|
6700
6700
|
};
|
|
6701
|
-
|
|
6701
|
+
Ze.prototype.set = function(n, e) {
|
|
6702
6702
|
return this._size >= this._maxSize && this.clear(), n in this._values || this._size++, this._values[n] = e;
|
|
6703
6703
|
};
|
|
6704
|
-
var Xu = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Li = /^\d+$/, ku = /^\d/,
|
|
6705
|
-
new
|
|
6706
|
-
var pr = new
|
|
6704
|
+
var Xu = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Li = /^\d+$/, ku = /^\d/, Hu = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, zu = /^\s*(['"]?)(.*?)(\1)\s*$/, Gn = 512, fr = new Ze(Gn);
|
|
6705
|
+
new Ze(Gn);
|
|
6706
|
+
var pr = new Ze(Gn), Be = {
|
|
6707
6707
|
split: sn,
|
|
6708
6708
|
normalizePath: gr,
|
|
6709
6709
|
getter: function(n, e) {
|
|
@@ -6728,7 +6728,7 @@ function gr(n) {
|
|
|
6728
6728
|
return fr.get(n) || fr.set(
|
|
6729
6729
|
n,
|
|
6730
6730
|
sn(n).map(function(e) {
|
|
6731
|
-
return e.replace(
|
|
6731
|
+
return e.replace(zu, "$2");
|
|
6732
6732
|
})
|
|
6733
6733
|
);
|
|
6734
6734
|
}
|
|
@@ -6747,7 +6747,7 @@ function _u(n) {
|
|
|
6747
6747
|
return n.match(ku) && !n.match(Li);
|
|
6748
6748
|
}
|
|
6749
6749
|
function Ju(n) {
|
|
6750
|
-
return
|
|
6750
|
+
return Hu.test(n);
|
|
6751
6751
|
}
|
|
6752
6752
|
function Yu(n) {
|
|
6753
6753
|
return !Bn(n) && (_u(n) || Ju(n));
|
|
@@ -6843,7 +6843,7 @@ function Ae(n, e) {
|
|
|
6843
6843
|
function Xi(n) {
|
|
6844
6844
|
return n == null ? [] : [].concat(n);
|
|
6845
6845
|
}
|
|
6846
|
-
let ki,
|
|
6846
|
+
let ki, Hi, zi, uc = /\$\{\s*(\w+)\s*\}/g;
|
|
6847
6847
|
ki = Symbol.toStringTag;
|
|
6848
6848
|
class hr {
|
|
6849
6849
|
constructor(e, t, i, r) {
|
|
@@ -6857,8 +6857,8 @@ class hr {
|
|
|
6857
6857
|
}), this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];
|
|
6858
6858
|
}
|
|
6859
6859
|
}
|
|
6860
|
-
|
|
6861
|
-
|
|
6860
|
+
Hi = Symbol.hasInstance;
|
|
6861
|
+
zi = Symbol.toStringTag;
|
|
6862
6862
|
class ce extends Error {
|
|
6863
6863
|
static formatError(e, t) {
|
|
6864
6864
|
const i = t.label || t.path || "this";
|
|
@@ -6874,13 +6874,13 @@ class ce extends Error {
|
|
|
6874
6874
|
const o = new hr(e, t, i, r);
|
|
6875
6875
|
if (a)
|
|
6876
6876
|
return o;
|
|
6877
|
-
super(), this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = [], this.inner = [], this[
|
|
6877
|
+
super(), this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = [], this.inner = [], this[zi] = "Error", this.name = o.name, this.message = o.message, this.type = o.type, this.value = o.value, this.path = o.path, this.errors = o.errors, this.inner = o.inner, Error.captureStackTrace && Error.captureStackTrace(this, ce);
|
|
6878
6878
|
}
|
|
6879
|
-
static [
|
|
6879
|
+
static [Hi](e) {
|
|
6880
6880
|
return hr[Symbol.hasInstance](e) || super[Symbol.hasInstance](e);
|
|
6881
6881
|
}
|
|
6882
6882
|
}
|
|
6883
|
-
let
|
|
6883
|
+
let ye = {
|
|
6884
6884
|
default: "${path} is invalid",
|
|
6885
6885
|
required: "${path} is a required field",
|
|
6886
6886
|
defined: "${path} must be defined",
|
|
@@ -6941,11 +6941,11 @@ let xe = {
|
|
|
6941
6941
|
if (t.length < r) return `${e} tuple value has too few items, expected a length of ${r} but got ${t.length} for value: \`${Ae(t, !0)}\``;
|
|
6942
6942
|
if (t.length > r) return `${e} tuple value has too many items, expected a length of ${r} but got ${t.length} for value: \`${Ae(t, !0)}\``;
|
|
6943
6943
|
}
|
|
6944
|
-
return ce.formatError(
|
|
6944
|
+
return ce.formatError(ye.notType, n);
|
|
6945
6945
|
}
|
|
6946
6946
|
};
|
|
6947
6947
|
Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6948
|
-
mixed:
|
|
6948
|
+
mixed: ye,
|
|
6949
6949
|
string: pe,
|
|
6950
6950
|
number: Ee,
|
|
6951
6951
|
date: ln,
|
|
@@ -7046,59 +7046,59 @@ function Me(n) {
|
|
|
7046
7046
|
let {
|
|
7047
7047
|
parent: m,
|
|
7048
7048
|
context: b,
|
|
7049
|
-
abortEarly:
|
|
7050
|
-
disableStackTrace:
|
|
7049
|
+
abortEarly: h = o.spec.abortEarly,
|
|
7050
|
+
disableStackTrace: v = o.spec.disableStackTrace
|
|
7051
7051
|
} = r;
|
|
7052
|
-
const
|
|
7052
|
+
const A = {
|
|
7053
7053
|
value: t,
|
|
7054
7054
|
parent: m,
|
|
7055
7055
|
context: b
|
|
7056
7056
|
};
|
|
7057
|
-
function
|
|
7057
|
+
function C(F = {}) {
|
|
7058
7058
|
const D = Zi(Object.assign({
|
|
7059
7059
|
value: t,
|
|
7060
7060
|
originalValue: a,
|
|
7061
7061
|
label: o.spec.label,
|
|
7062
7062
|
path: F.path || i,
|
|
7063
7063
|
spec: o.spec,
|
|
7064
|
-
disableStackTrace: F.disableStackTrace ||
|
|
7065
|
-
}, f, F.params),
|
|
7064
|
+
disableStackTrace: F.disableStackTrace || v
|
|
7065
|
+
}, f, F.params), A), G = new ce(ce.formatError(F.message || g, D), t, D.path, F.type || l, D.disableStackTrace);
|
|
7066
7066
|
return G.params = D, G;
|
|
7067
7067
|
}
|
|
7068
|
-
const
|
|
7068
|
+
const I = h ? u : s;
|
|
7069
7069
|
let x = {
|
|
7070
7070
|
path: i,
|
|
7071
7071
|
parent: m,
|
|
7072
7072
|
type: l,
|
|
7073
7073
|
from: r.from,
|
|
7074
|
-
createError:
|
|
7074
|
+
createError: C,
|
|
7075
7075
|
resolve(F) {
|
|
7076
|
-
return _i(F,
|
|
7076
|
+
return _i(F, A);
|
|
7077
7077
|
},
|
|
7078
7078
|
options: r,
|
|
7079
7079
|
originalValue: a,
|
|
7080
7080
|
schema: o
|
|
7081
7081
|
};
|
|
7082
|
-
const
|
|
7083
|
-
ce.isError(F) ?
|
|
7082
|
+
const y = (F) => {
|
|
7083
|
+
ce.isError(F) ? I(F) : F ? s(null) : I(C());
|
|
7084
7084
|
}, S = (F) => {
|
|
7085
|
-
ce.isError(F) ?
|
|
7085
|
+
ce.isError(F) ? I(F) : u(F);
|
|
7086
7086
|
};
|
|
7087
7087
|
if (p && me(t))
|
|
7088
|
-
return
|
|
7088
|
+
return y(!0);
|
|
7089
7089
|
let B;
|
|
7090
7090
|
try {
|
|
7091
7091
|
var M;
|
|
7092
7092
|
if (B = c.call(x, t, x), typeof ((M = B) == null ? void 0 : M.then) == "function") {
|
|
7093
7093
|
if (r.sync)
|
|
7094
7094
|
throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
|
|
7095
|
-
return Promise.resolve(B).then(
|
|
7095
|
+
return Promise.resolve(B).then(y, S);
|
|
7096
7096
|
}
|
|
7097
7097
|
} catch (F) {
|
|
7098
7098
|
S(F);
|
|
7099
7099
|
return;
|
|
7100
7100
|
}
|
|
7101
|
-
|
|
7101
|
+
y(B);
|
|
7102
7102
|
}
|
|
7103
7103
|
return e.OPTIONS = n, e;
|
|
7104
7104
|
}
|
|
@@ -7231,7 +7231,7 @@ function Ji(n, e) {
|
|
|
7231
7231
|
class be {
|
|
7232
7232
|
constructor(e) {
|
|
7233
7233
|
this.type = void 0, this.deps = [], this.tests = void 0, this.transforms = void 0, this.conditions = [], this._mutate = void 0, this.internalTests = {}, this._whitelist = new Et(), this._blacklist = new Et(), this.exclusiveTests = /* @__PURE__ */ Object.create(null), this._typeCheck = void 0, this.spec = void 0, this.tests = [], this.transforms = [], this.withMutation(() => {
|
|
7234
|
-
this.typeError(
|
|
7234
|
+
this.typeError(ye.notType);
|
|
7235
7235
|
}), this.type = e.type, this._typeCheck = e.check, this.spec = Object.assign({
|
|
7236
7236
|
strip: !1,
|
|
7237
7237
|
strict: !1,
|
|
@@ -7381,9 +7381,9 @@ attempted value: ${o}
|
|
|
7381
7381
|
schema: this
|
|
7382
7382
|
};
|
|
7383
7383
|
for (let b = 0; b < a.length; b++) {
|
|
7384
|
-
const
|
|
7385
|
-
|
|
7386
|
-
|
|
7384
|
+
const h = a[b];
|
|
7385
|
+
h(m, c, function(A) {
|
|
7386
|
+
A && (Array.isArray(A) ? p.push(...A) : p.push(A)), --g <= 0 && f(p);
|
|
7387
7387
|
});
|
|
7388
7388
|
}
|
|
7389
7389
|
}
|
|
@@ -7500,16 +7500,16 @@ attempted value: ${o}
|
|
|
7500
7500
|
optional() {
|
|
7501
7501
|
return this.optionality(!0);
|
|
7502
7502
|
}
|
|
7503
|
-
defined(e =
|
|
7503
|
+
defined(e = ye.defined) {
|
|
7504
7504
|
return this.optionality(!1, e);
|
|
7505
7505
|
}
|
|
7506
7506
|
nullable() {
|
|
7507
7507
|
return this.nullability(!0);
|
|
7508
7508
|
}
|
|
7509
|
-
nonNullable(e =
|
|
7509
|
+
nonNullable(e = ye.notNull) {
|
|
7510
7510
|
return this.nullability(!1, e);
|
|
7511
7511
|
}
|
|
7512
|
-
required(e =
|
|
7512
|
+
required(e = ye.required) {
|
|
7513
7513
|
return this.clone().withMutation((t) => t.nonNullable(e).defined(e));
|
|
7514
7514
|
}
|
|
7515
7515
|
notRequired() {
|
|
@@ -7543,7 +7543,7 @@ attempted value: ${o}
|
|
|
7543
7543
|
name: e[0],
|
|
7544
7544
|
message: e[1],
|
|
7545
7545
|
test: e[2]
|
|
7546
|
-
}, t.message === void 0 && (t.message =
|
|
7546
|
+
}, t.message === void 0 && (t.message = ye.default), typeof t.test != "function") throw new TypeError("`test` is a required parameters");
|
|
7547
7547
|
let i = this.clone(), r = Me(t), a = t.exclusive || t.name && i.exclusiveTests[t.name] === !0;
|
|
7548
7548
|
if (t.exclusive && !t.name)
|
|
7549
7549
|
throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");
|
|
@@ -7571,7 +7571,7 @@ attempted value: ${o}
|
|
|
7571
7571
|
}
|
|
7572
7572
|
}), t;
|
|
7573
7573
|
}
|
|
7574
|
-
oneOf(e, t =
|
|
7574
|
+
oneOf(e, t = ye.oneOf) {
|
|
7575
7575
|
let i = this.clone();
|
|
7576
7576
|
return e.forEach((r) => {
|
|
7577
7577
|
i._whitelist.add(r), i._blacklist.delete(r);
|
|
@@ -7590,7 +7590,7 @@ attempted value: ${o}
|
|
|
7590
7590
|
}
|
|
7591
7591
|
}), i;
|
|
7592
7592
|
}
|
|
7593
|
-
notOneOf(e, t =
|
|
7593
|
+
notOneOf(e, t = ye.notOneOf) {
|
|
7594
7594
|
let i = this.clone();
|
|
7595
7595
|
return e.forEach((r) => {
|
|
7596
7596
|
i._blacklist.add(r), i._whitelist.delete(r);
|
|
@@ -7764,24 +7764,24 @@ function cn(n) {
|
|
|
7764
7764
|
var e, t;
|
|
7765
7765
|
const i = gc.exec(n);
|
|
7766
7766
|
return i ? {
|
|
7767
|
-
year:
|
|
7768
|
-
month:
|
|
7769
|
-
day:
|
|
7770
|
-
hour:
|
|
7771
|
-
minute:
|
|
7772
|
-
second:
|
|
7767
|
+
year: xe(i[1]),
|
|
7768
|
+
month: xe(i[2], 1) - 1,
|
|
7769
|
+
day: xe(i[3], 1),
|
|
7770
|
+
hour: xe(i[4]),
|
|
7771
|
+
minute: xe(i[5]),
|
|
7772
|
+
second: xe(i[6]),
|
|
7773
7773
|
millisecond: i[7] ? (
|
|
7774
7774
|
// allow arbitrary sub-second precision beyond milliseconds
|
|
7775
|
-
|
|
7775
|
+
xe(i[7].substring(0, 3))
|
|
7776
7776
|
) : 0,
|
|
7777
7777
|
precision: (e = (t = i[7]) == null ? void 0 : t.length) != null ? e : void 0,
|
|
7778
7778
|
z: i[8] || void 0,
|
|
7779
7779
|
plusMinus: i[9] || void 0,
|
|
7780
|
-
hourOffset:
|
|
7781
|
-
minuteOffset:
|
|
7780
|
+
hourOffset: xe(i[10]),
|
|
7781
|
+
minuteOffset: xe(i[11])
|
|
7782
7782
|
} : null;
|
|
7783
7783
|
}
|
|
7784
|
-
function
|
|
7784
|
+
function xe(n, e = 0) {
|
|
7785
7785
|
return Number(n) || e;
|
|
7786
7786
|
}
|
|
7787
7787
|
let hc = (
|
|
@@ -7790,7 +7790,7 @@ let hc = (
|
|
|
7790
7790
|
), mc = (
|
|
7791
7791
|
// eslint-disable-next-line
|
|
7792
7792
|
/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i
|
|
7793
|
-
), vc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, Ic = "^\\d{4}-\\d{2}-\\d{2}",
|
|
7793
|
+
), vc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, Ic = "^\\d{4}-\\d{2}-\\d{2}", yc = "\\d{2}:\\d{2}:\\d{2}", xc = "(([+-]\\d{2}(:?\\d{2})?)|Z)", Cc = new RegExp(`${Ic}T${yc}(\\.\\d+)?${xc}$`), Ac = (n) => me(n) || n === n.trim(), Sc = {}.toString();
|
|
7794
7794
|
function ft() {
|
|
7795
7795
|
return new $i();
|
|
7796
7796
|
}
|
|
@@ -7811,7 +7811,7 @@ class $i extends be {
|
|
|
7811
7811
|
}
|
|
7812
7812
|
required(e) {
|
|
7813
7813
|
return super.required(e).withMutation((t) => t.test({
|
|
7814
|
-
message: e ||
|
|
7814
|
+
message: e || ye.required,
|
|
7815
7815
|
name: "required",
|
|
7816
7816
|
skipAbsent: !0,
|
|
7817
7817
|
test: (i) => !!i.length
|
|
@@ -8218,12 +8218,12 @@ class eo extends be {
|
|
|
8218
8218
|
context: t.context,
|
|
8219
8219
|
parent: s
|
|
8220
8220
|
});
|
|
8221
|
-
let
|
|
8222
|
-
if (
|
|
8221
|
+
let h = g instanceof be ? g.spec : void 0, v = h == null ? void 0 : h.strict;
|
|
8222
|
+
if (h != null && h.strip) {
|
|
8223
8223
|
c = c || f in r;
|
|
8224
8224
|
continue;
|
|
8225
8225
|
}
|
|
8226
|
-
b = !t.__validating || !
|
|
8226
|
+
b = !t.__validating || !v ? g.cast(m, l) : m, b !== void 0 && (s[f] = b);
|
|
8227
8227
|
} else p && !o && (s[f] = m);
|
|
8228
8228
|
(p !== f in s || s[f] !== m) && (c = !0);
|
|
8229
8229
|
}
|
|
@@ -8583,8 +8583,8 @@ class Gc {
|
|
|
8583
8583
|
}
|
|
8584
8584
|
const Bc = new Gc(), Vc = 8, ee = {
|
|
8585
8585
|
wrapper: (n) => ({
|
|
8586
|
-
border: `1px solid ${n ?
|
|
8587
|
-
borderRadius:
|
|
8586
|
+
border: `1px solid ${n ? R.BORDER_COLOR_ERROR : R.BORDER_COLOR}`,
|
|
8587
|
+
borderRadius: R.BORDER_RADIUS,
|
|
8588
8588
|
overflow: "hidden",
|
|
8589
8589
|
background: "#fff",
|
|
8590
8590
|
fontSize: 13
|
|
@@ -8794,7 +8794,7 @@ const Bc = new Gc(), Vc = 8, ee = {
|
|
|
8794
8794
|
color: "rgba(0,0,0,0.87)"
|
|
8795
8795
|
}
|
|
8796
8796
|
};
|
|
8797
|
-
function
|
|
8797
|
+
function yr({ checked: n, onChange: e, indeterminate: t, disabled: i }) {
|
|
8798
8798
|
const r = H(null);
|
|
8799
8799
|
return q(() => {
|
|
8800
8800
|
r.current && (r.current.indeterminate = !!t);
|
|
@@ -8858,30 +8858,30 @@ function Dc({ selected: n, onRemove: e, onClose: t }) {
|
|
|
8858
8858
|
] }) });
|
|
8859
8859
|
}
|
|
8860
8860
|
function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }) {
|
|
8861
|
-
const o = n, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Vc, c = o.id ?? o.name ?? "", [f, g] = L(""), [p, m] = L(1), [b,
|
|
8861
|
+
const o = n, u = !!(a && r), s = o.isMulti ?? !1, l = o.pageSize ?? Vc, c = o.id ?? o.name ?? "", [f, g] = L(""), [p, m] = L(1), [b, h] = L([]), [v, A] = L(!1), [C, I] = L(!1), [x, y] = L(null), [S, w] = L(!1), B = H(null), M = H(0), F = H(!0);
|
|
8862
8862
|
q(() => () => {
|
|
8863
8863
|
F.current = !1, B.current && clearTimeout(B.current);
|
|
8864
8864
|
}, []);
|
|
8865
8865
|
const D = s ? Array.isArray(e) ? e : [] : e ? [e] : [], G = D.length, W = z(
|
|
8866
|
-
(
|
|
8867
|
-
if (o.fetchOptions) return o.fetchOptions(
|
|
8866
|
+
(T, k) => {
|
|
8867
|
+
if (o.fetchOptions) return o.fetchOptions(T, k);
|
|
8868
8868
|
if (o.dataSource) {
|
|
8869
8869
|
const $ = Bc.get(o.dataSource);
|
|
8870
|
-
return $ ? $.fetch(
|
|
8870
|
+
return $ ? $.fetch(T, k) : Promise.reject(new Error(`[FlowForge] DataSource "${o.dataSource}" is not registered.`));
|
|
8871
8871
|
}
|
|
8872
8872
|
return Promise.reject(new Error(`[FlowForge] table-picker "${o.id}" requires fetchOptions or dataSource.`));
|
|
8873
8873
|
},
|
|
8874
8874
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8875
8875
|
[o.fetchOptions, o.dataSource, o.id]
|
|
8876
8876
|
), V = z(
|
|
8877
|
-
(
|
|
8877
|
+
(T, k) => {
|
|
8878
8878
|
const $ = ++M.current;
|
|
8879
|
-
|
|
8880
|
-
!F.current || $ !== M.current || (
|
|
8879
|
+
I(!0), W(T, k).then((_) => {
|
|
8880
|
+
!F.current || $ !== M.current || (h(_.options.slice(0, l)), A(_.hasNextPage));
|
|
8881
8881
|
}).catch(() => {
|
|
8882
|
-
!F.current || $ !== M.current || (
|
|
8882
|
+
!F.current || $ !== M.current || (h([]), A(!1));
|
|
8883
8883
|
}).finally(() => {
|
|
8884
|
-
!F.current || $ !== M.current ||
|
|
8884
|
+
!F.current || $ !== M.current || I(!1);
|
|
8885
8885
|
});
|
|
8886
8886
|
},
|
|
8887
8887
|
[W, l]
|
|
@@ -8889,37 +8889,37 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8889
8889
|
q(() => {
|
|
8890
8890
|
V("", 1);
|
|
8891
8891
|
}, []);
|
|
8892
|
-
const j = (
|
|
8893
|
-
const k =
|
|
8892
|
+
const j = (T) => {
|
|
8893
|
+
const k = T.target.value;
|
|
8894
8894
|
g(k), m(1), B.current && clearTimeout(B.current), B.current = setTimeout(() => V(k, 1), 300);
|
|
8895
|
-
}, Q = (
|
|
8895
|
+
}, Q = (T) => {
|
|
8896
8896
|
if (s) {
|
|
8897
|
-
const k = Array.isArray(e) ? e : [], $ = k.some((_) => _.value ===
|
|
8898
|
-
t($ ? k.filter((_) => _.value !==
|
|
8897
|
+
const k = Array.isArray(e) ? e : [], $ = k.some((_) => _.value === T.value);
|
|
8898
|
+
t($ ? k.filter((_) => _.value !== T.value) : [...k, T]);
|
|
8899
8899
|
} else
|
|
8900
|
-
t((e == null ? void 0 : e.value) ===
|
|
8900
|
+
t((e == null ? void 0 : e.value) === T.value ? null : T);
|
|
8901
8901
|
i == null || i();
|
|
8902
8902
|
}, U = () => {
|
|
8903
8903
|
if (!s) return;
|
|
8904
|
-
const
|
|
8905
|
-
if (b.every(($) =>
|
|
8906
|
-
t(
|
|
8904
|
+
const T = Array.isArray(e) ? e : [];
|
|
8905
|
+
if (b.every(($) => T.some((_) => _.value === $.value)))
|
|
8906
|
+
t(T.filter(($) => !b.some((_) => _.value === $.value)));
|
|
8907
8907
|
else {
|
|
8908
|
-
const $ = b.filter((_) => !
|
|
8909
|
-
t([...
|
|
8908
|
+
const $ = b.filter((_) => !T.some((oe) => oe.value === _.value));
|
|
8909
|
+
t([...T, ...$]);
|
|
8910
8910
|
}
|
|
8911
|
-
}, re = (
|
|
8911
|
+
}, re = (T) => {
|
|
8912
8912
|
if (s) {
|
|
8913
|
-
const $ = (Array.isArray(e) ? e : []).filter((_) => _.value !==
|
|
8914
|
-
t($), $.length === 0 &&
|
|
8913
|
+
const $ = (Array.isArray(e) ? e : []).filter((_) => _.value !== T);
|
|
8914
|
+
t($), $.length === 0 && w(!1);
|
|
8915
8915
|
} else
|
|
8916
|
-
t(null),
|
|
8916
|
+
t(null), w(!1);
|
|
8917
8917
|
i == null || i();
|
|
8918
8918
|
}, ie = o.columns.length + 1, E = b.length > 0 && b.every(
|
|
8919
|
-
(
|
|
8919
|
+
(T) => D.some((k) => k.value === T.value)
|
|
8920
8920
|
), P = b.some(
|
|
8921
|
-
(
|
|
8922
|
-
), Z = (
|
|
8921
|
+
(T) => D.some((k) => k.value === T.value)
|
|
8922
|
+
), Z = (T) => D.some((k) => k.value === T.value);
|
|
8923
8923
|
return /* @__PURE__ */ O("div", { style: { marginBottom: 16 }, children: [
|
|
8924
8924
|
/* @__PURE__ */ d(
|
|
8925
8925
|
le,
|
|
@@ -8939,7 +8939,7 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8939
8939
|
{
|
|
8940
8940
|
type: "button",
|
|
8941
8941
|
style: ee.selectedLink,
|
|
8942
|
-
onClick: () =>
|
|
8942
|
+
onClick: () => w(!0),
|
|
8943
8943
|
children: [
|
|
8944
8944
|
G,
|
|
8945
8945
|
" ",
|
|
@@ -8966,18 +8966,18 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8966
8966
|
/* @__PURE__ */ d("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ O("table", { style: ee.table, children: [
|
|
8967
8967
|
/* @__PURE__ */ d("thead", { style: ee.thead, children: /* @__PURE__ */ O("tr", { children: [
|
|
8968
8968
|
/* @__PURE__ */ d("th", { style: ee.checkTh, children: s && /* @__PURE__ */ d(
|
|
8969
|
-
|
|
8969
|
+
yr,
|
|
8970
8970
|
{
|
|
8971
8971
|
checked: E,
|
|
8972
8972
|
indeterminate: !E && P,
|
|
8973
8973
|
onChange: U,
|
|
8974
|
-
disabled:
|
|
8974
|
+
disabled: C || b.length === 0
|
|
8975
8975
|
}
|
|
8976
8976
|
) }),
|
|
8977
|
-
o.columns.map((
|
|
8977
|
+
o.columns.map((T) => /* @__PURE__ */ d("th", { style: ee.th(T.width), children: T.label }, T.key))
|
|
8978
8978
|
] }) }),
|
|
8979
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
8980
|
-
const k = Z(
|
|
8979
|
+
/* @__PURE__ */ d("tbody", { children: C ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: ie, style: ee.statusRow, children: "Loading…" }) }) : b.length === 0 ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", { colSpan: ie, style: ee.statusRow, children: "No results found" }) }) : b.map((T) => {
|
|
8980
|
+
const k = Z(T), $ = x === T.value;
|
|
8981
8981
|
return /* @__PURE__ */ O(
|
|
8982
8982
|
"tr",
|
|
8983
8983
|
{
|
|
@@ -8986,32 +8986,32 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
8986
8986
|
background: k ? "rgba(25,118,210,0.06)" : $ ? "rgba(0,0,0,0.03)" : "#fff",
|
|
8987
8987
|
transition: "background 0.1s"
|
|
8988
8988
|
},
|
|
8989
|
-
onClick: () => Q(
|
|
8990
|
-
onMouseEnter: () =>
|
|
8991
|
-
onMouseLeave: () =>
|
|
8989
|
+
onClick: () => Q(T),
|
|
8990
|
+
onMouseEnter: () => y(T.value),
|
|
8991
|
+
onMouseLeave: () => y(null),
|
|
8992
8992
|
"aria-selected": k,
|
|
8993
8993
|
children: [
|
|
8994
8994
|
/* @__PURE__ */ d("td", { style: ee.checkTd, children: s ? /* @__PURE__ */ d(
|
|
8995
|
-
|
|
8995
|
+
yr,
|
|
8996
8996
|
{
|
|
8997
8997
|
checked: k,
|
|
8998
|
-
onChange: () => Q(
|
|
8998
|
+
onChange: () => Q(T)
|
|
8999
8999
|
}
|
|
9000
9000
|
) : /* @__PURE__ */ d(
|
|
9001
9001
|
"input",
|
|
9002
9002
|
{
|
|
9003
9003
|
type: "radio",
|
|
9004
9004
|
checked: k,
|
|
9005
|
-
onChange: () => Q(
|
|
9005
|
+
onChange: () => Q(T),
|
|
9006
9006
|
onClick: (_) => _.stopPropagation(),
|
|
9007
9007
|
name: c,
|
|
9008
9008
|
style: { accentColor: "#1976d2", width: 16, height: 16, cursor: "pointer" }
|
|
9009
9009
|
}
|
|
9010
9010
|
) }),
|
|
9011
|
-
o.columns.map((_) => /* @__PURE__ */ d("td", { style: ee.td, children: String(
|
|
9011
|
+
o.columns.map((_) => /* @__PURE__ */ d("td", { style: ee.td, children: String(T[_.key] ?? "") }, _.key))
|
|
9012
9012
|
]
|
|
9013
9013
|
},
|
|
9014
|
-
|
|
9014
|
+
T.value
|
|
9015
9015
|
);
|
|
9016
9016
|
}) })
|
|
9017
9017
|
] }) }),
|
|
@@ -9023,8 +9023,8 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
9023
9023
|
{
|
|
9024
9024
|
type: "button",
|
|
9025
9025
|
onClick: () => {
|
|
9026
|
-
const
|
|
9027
|
-
m(
|
|
9026
|
+
const T = p - 1;
|
|
9027
|
+
m(T), V(f, T);
|
|
9028
9028
|
},
|
|
9029
9029
|
disabled: p <= 1,
|
|
9030
9030
|
style: ee.pageBtn(p <= 1),
|
|
@@ -9037,11 +9037,11 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
9037
9037
|
{
|
|
9038
9038
|
type: "button",
|
|
9039
9039
|
onClick: () => {
|
|
9040
|
-
const
|
|
9041
|
-
m(
|
|
9040
|
+
const T = p + 1;
|
|
9041
|
+
m(T), V(f, T);
|
|
9042
9042
|
},
|
|
9043
|
-
disabled: !
|
|
9044
|
-
style: ee.pageBtn(!
|
|
9043
|
+
disabled: !v,
|
|
9044
|
+
style: ee.pageBtn(!v),
|
|
9045
9045
|
"aria-label": "Next page",
|
|
9046
9046
|
children: "›"
|
|
9047
9047
|
}
|
|
@@ -9056,7 +9056,7 @@ function Nc({ field: n, value: e, onChange: t, onBlur: i, error: r, touched: a }
|
|
|
9056
9056
|
{
|
|
9057
9057
|
selected: D,
|
|
9058
9058
|
onRemove: re,
|
|
9059
|
-
onClose: () =>
|
|
9059
|
+
onClose: () => w(!1)
|
|
9060
9060
|
}
|
|
9061
9061
|
)
|
|
9062
9062
|
] });
|
|
@@ -9292,7 +9292,7 @@ function kc(n, e) {
|
|
|
9292
9292
|
}
|
|
9293
9293
|
};
|
|
9294
9294
|
}
|
|
9295
|
-
function
|
|
9295
|
+
function Hc({
|
|
9296
9296
|
field: n,
|
|
9297
9297
|
pathPrefix: e,
|
|
9298
9298
|
depth: t,
|
|
@@ -9305,9 +9305,9 @@ function zc({
|
|
|
9305
9305
|
renderFieldRouter: l,
|
|
9306
9306
|
item: c
|
|
9307
9307
|
}) {
|
|
9308
|
-
const [f, g] = L(!0), p = n.children ?? [], m = ro(p), b = Wc(n, e),
|
|
9308
|
+
const [f, g] = L(!0), p = n.children ?? [], m = ro(p), b = Wc(n, e), h = typeof n.helperText == "string" ? n.helperText : void 0, v = `${m} field${m === 1 ? "" : "s"}`;
|
|
9309
9309
|
return /* @__PURE__ */ O(N, { sx: Xc(t, s), children: [
|
|
9310
|
-
/* @__PURE__ */ O(N, { onClick: () => g((
|
|
9310
|
+
/* @__PURE__ */ O(N, { onClick: () => g((A) => !A), sx: kc(t, f), children: [
|
|
9311
9311
|
/* @__PURE__ */ d(
|
|
9312
9312
|
N,
|
|
9313
9313
|
{
|
|
@@ -9343,7 +9343,7 @@ function zc({
|
|
|
9343
9343
|
/* @__PURE__ */ d(
|
|
9344
9344
|
Bo,
|
|
9345
9345
|
{
|
|
9346
|
-
label:
|
|
9346
|
+
label: v,
|
|
9347
9347
|
size: "small",
|
|
9348
9348
|
sx: {
|
|
9349
9349
|
height: 20,
|
|
@@ -9356,7 +9356,7 @@ function zc({
|
|
|
9356
9356
|
}
|
|
9357
9357
|
)
|
|
9358
9358
|
] }),
|
|
9359
|
-
|
|
9359
|
+
h && /* @__PURE__ */ d(
|
|
9360
9360
|
de,
|
|
9361
9361
|
{
|
|
9362
9362
|
sx: {
|
|
@@ -9366,7 +9366,7 @@ function zc({
|
|
|
9366
9366
|
color: "#6c757d",
|
|
9367
9367
|
overflowWrap: "anywhere"
|
|
9368
9368
|
},
|
|
9369
|
-
children:
|
|
9369
|
+
children: h
|
|
9370
9370
|
}
|
|
9371
9371
|
)
|
|
9372
9372
|
] })
|
|
@@ -9385,11 +9385,11 @@ function zc({
|
|
|
9385
9385
|
sx: {
|
|
9386
9386
|
pl: t === 0 ? 0 : t === 1 ? 1 : 0
|
|
9387
9387
|
},
|
|
9388
|
-
children: p.map((
|
|
9389
|
-
const
|
|
9388
|
+
children: p.map((A) => {
|
|
9389
|
+
const C = A.id ?? A.name ?? "", I = e ? `${e}.${C}` : C;
|
|
9390
9390
|
return l({
|
|
9391
|
-
field:
|
|
9392
|
-
pathPrefix:
|
|
9391
|
+
field: A,
|
|
9392
|
+
pathPrefix: I,
|
|
9393
9393
|
depth: t + 1,
|
|
9394
9394
|
values: i,
|
|
9395
9395
|
errors: r,
|
|
@@ -9409,9 +9409,9 @@ function zc({
|
|
|
9409
9409
|
)
|
|
9410
9410
|
] });
|
|
9411
9411
|
}
|
|
9412
|
-
const
|
|
9412
|
+
const zc = Ot(null);
|
|
9413
9413
|
function Zc() {
|
|
9414
|
-
return Ft(
|
|
9414
|
+
return Ft(zc);
|
|
9415
9415
|
}
|
|
9416
9416
|
function _c({
|
|
9417
9417
|
field: n,
|
|
@@ -9425,12 +9425,12 @@ function _c({
|
|
|
9425
9425
|
compact: s,
|
|
9426
9426
|
renderFieldRouter: l
|
|
9427
9427
|
}) {
|
|
9428
|
-
var
|
|
9429
|
-
const c = n.tabs ?? [], [f, g] = L(((
|
|
9428
|
+
var w;
|
|
9429
|
+
const c = n.tabs ?? [], [f, g] = L(((w = c[0]) == null ? void 0 : w.id) ?? "");
|
|
9430
9430
|
q(() => {
|
|
9431
9431
|
c.length !== 0 && (c.some((B) => B.id === f) || g(c[0].id));
|
|
9432
9432
|
}, [c, f]);
|
|
9433
|
-
const p = Zc(), m = n.id ?? n.name ?? "", b = n.variant ?? "line",
|
|
9433
|
+
const p = Zc(), m = n.id ?? n.name ?? "", b = n.variant ?? "line", h = n.alignment ?? "left", v = n.height ?? "auto", A = n.margin ?? "normal", C = n.activeColor ?? "#6366f1", I = n.activeTextColor ?? (b === "pill" ? "#ffffff" : C), x = n.inactiveTextColor ?? "#64748b", y = {
|
|
9434
9434
|
left: "flex-start",
|
|
9435
9435
|
"center-left": "flex-start",
|
|
9436
9436
|
center: "center",
|
|
@@ -9445,14 +9445,14 @@ function _c({
|
|
|
9445
9445
|
] });
|
|
9446
9446
|
const S = c.find((B) => B.id === f) ?? c[0];
|
|
9447
9447
|
return /* @__PURE__ */ O(N, { sx: {
|
|
9448
|
-
mb:
|
|
9449
|
-
height:
|
|
9450
|
-
display:
|
|
9451
|
-
flexDirection:
|
|
9448
|
+
mb: A === "none" ? 0 : void 0,
|
|
9449
|
+
height: v === "fixed" ? 400 : void 0,
|
|
9450
|
+
display: v === "fixed" ? "flex" : void 0,
|
|
9451
|
+
flexDirection: v === "fixed" ? "column" : void 0
|
|
9452
9452
|
}, children: [
|
|
9453
9453
|
/* @__PURE__ */ d(N, { sx: {
|
|
9454
9454
|
display: "flex",
|
|
9455
|
-
justifyContent:
|
|
9455
|
+
justifyContent: y[h] ?? "flex-start",
|
|
9456
9456
|
alignItems: "center",
|
|
9457
9457
|
gap: 0,
|
|
9458
9458
|
px: 1.5,
|
|
@@ -9463,7 +9463,7 @@ function _c({
|
|
|
9463
9463
|
const M = B.id === f, F = e ? `${e}.${B.id}` : B.id, D = B.fields.some((U) => {
|
|
9464
9464
|
const re = U.id ?? U.name ?? "";
|
|
9465
9465
|
return !!`${F}.${re}`.split(".").reduce((P, Z) => P && typeof P == "object" ? P[Z] : void 0, r);
|
|
9466
|
-
}), G = { bgcolor:
|
|
9466
|
+
}), G = { bgcolor: C, color: I, borderRadius: "20px", border: "none" }, W = { bgcolor: "transparent", color: x, borderRadius: "20px", border: "none" }, V = { borderBottom: `2px solid ${C}`, color: I, border: "none" };
|
|
9467
9467
|
return /* @__PURE__ */ O(
|
|
9468
9468
|
N,
|
|
9469
9469
|
{
|
|
@@ -9472,7 +9472,7 @@ function _c({
|
|
|
9472
9472
|
onClick: () => g(B.id),
|
|
9473
9473
|
sx: {
|
|
9474
9474
|
...b === "pill" ? M ? G : W : M ? V : { borderBottom: "2px solid transparent", color: x, border: "none" },
|
|
9475
|
-
background: b === "pill" && M ?
|
|
9475
|
+
background: b === "pill" && M ? C : "none",
|
|
9476
9476
|
cursor: "pointer",
|
|
9477
9477
|
px: 1.5,
|
|
9478
9478
|
py: b === "pill" ? 0.5 : 1,
|
|
@@ -9482,7 +9482,7 @@ function _c({
|
|
|
9482
9482
|
alignItems: "center",
|
|
9483
9483
|
gap: 0.5,
|
|
9484
9484
|
transition: "color .12s, border-color .12s, background .12s",
|
|
9485
|
-
"&:hover": { color: b === "pill" && M ?
|
|
9485
|
+
"&:hover": { color: b === "pill" && M ? I : C },
|
|
9486
9486
|
mb: b === "line" ? "-1px" : 0.5,
|
|
9487
9487
|
mr: b === "pill" ? 0.5 : 0
|
|
9488
9488
|
},
|
|
@@ -9494,7 +9494,7 @@ function _c({
|
|
|
9494
9494
|
B.id
|
|
9495
9495
|
);
|
|
9496
9496
|
}) }),
|
|
9497
|
-
/* @__PURE__ */ O(N, { sx: { p: 2, flex:
|
|
9497
|
+
/* @__PURE__ */ O(N, { sx: { p: 2, flex: v === "fixed" ? 1 : void 0, overflowY: v === "fixed" ? "auto" : void 0 }, children: [
|
|
9498
9498
|
/* @__PURE__ */ d(N, { className: "ff-form-row", children: S.fields.map((B, M) => {
|
|
9499
9499
|
const F = B.id ?? B.name ?? "", G = `${e ? `${e}.${S.id}` : S.id}.${F}`;
|
|
9500
9500
|
return /* @__PURE__ */ O(N, { sx: { position: "relative", width: "100%" }, children: [
|
|
@@ -9589,7 +9589,7 @@ const Jc = [
|
|
|
9589
9589
|
{ value: "lessThan", label: "less than" },
|
|
9590
9590
|
{ value: "greaterOrEquals", label: "greater or equal" },
|
|
9591
9591
|
{ value: "lessOrEquals", label: "less or equal" }
|
|
9592
|
-
], Yc = /* @__PURE__ */ new Set(["isPresent", "isNotPresent", "isEmpty", "isNotEmpty"]),
|
|
9592
|
+
], Yc = /* @__PURE__ */ new Set(["isPresent", "isNotPresent", "isEmpty", "isNotEmpty"]), xr = {
|
|
9593
9593
|
textTransform: "none",
|
|
9594
9594
|
fontSize: 12,
|
|
9595
9595
|
fontWeight: 500,
|
|
@@ -9833,7 +9833,7 @@ function ao({ conditionDef: n, entries: e, onUpdate: t, depth: i = 0, fieldPath:
|
|
|
9833
9833
|
"data-testid": "add-condition-button",
|
|
9834
9834
|
className: "ff-form-text-capitalize ff-form-text-12 ff-form-text-dark ff-form-shadow-none ff-form-bg-light",
|
|
9835
9835
|
disableElevation: !0,
|
|
9836
|
-
sx:
|
|
9836
|
+
sx: xr,
|
|
9837
9837
|
children: "Add"
|
|
9838
9838
|
}
|
|
9839
9839
|
),
|
|
@@ -9845,7 +9845,7 @@ function ao({ conditionDef: n, entries: e, onUpdate: t, depth: i = 0, fieldPath:
|
|
|
9845
9845
|
onClick: u,
|
|
9846
9846
|
"data-testid": "add-group-button",
|
|
9847
9847
|
disableElevation: !0,
|
|
9848
|
-
sx:
|
|
9848
|
+
sx: xr,
|
|
9849
9849
|
children: "Add Group"
|
|
9850
9850
|
}
|
|
9851
9851
|
)
|
|
@@ -9871,7 +9871,7 @@ function lo({
|
|
|
9871
9871
|
function Qc() {
|
|
9872
9872
|
return Ft(so);
|
|
9873
9873
|
}
|
|
9874
|
-
function
|
|
9874
|
+
function ze(n, e) {
|
|
9875
9875
|
return e.split(".").reduce((t, i) => {
|
|
9876
9876
|
if (!(t == null || typeof t != "object"))
|
|
9877
9877
|
return t[i];
|
|
@@ -9920,7 +9920,7 @@ function qc({
|
|
|
9920
9920
|
onFormulaConfigChange: r,
|
|
9921
9921
|
children: a
|
|
9922
9922
|
}) {
|
|
9923
|
-
const o = Tt(), u = e ??
|
|
9923
|
+
const o = Tt(), u = e ?? ze(o.values, n) ?? {};
|
|
9924
9924
|
return /* @__PURE__ */ d(
|
|
9925
9925
|
lo,
|
|
9926
9926
|
{
|
|
@@ -10007,8 +10007,8 @@ const td = wt(function(e, t) {
|
|
|
10007
10007
|
enableReinitialize: !0,
|
|
10008
10008
|
validateOnChange: !0,
|
|
10009
10009
|
validateOnBlur: !0,
|
|
10010
|
-
children: ({ values: f, errors: g, touched: p, isSubmitting: m, setFieldValue: b, setFieldTouched:
|
|
10011
|
-
var
|
|
10010
|
+
children: ({ values: f, errors: g, touched: p, isSubmitting: m, setFieldValue: b, setFieldTouched: h }) => {
|
|
10011
|
+
var v;
|
|
10012
10012
|
return /* @__PURE__ */ O(mo, { id: e.formId, children: [
|
|
10013
10013
|
e.onValuesChange && /* @__PURE__ */ d(Kc, { onValuesChange: e.onValuesChange }),
|
|
10014
10014
|
e.onValidityChange && /* @__PURE__ */ d(ed, { onValidityChange: e.onValidityChange }),
|
|
@@ -10021,11 +10021,11 @@ const td = wt(function(e, t) {
|
|
|
10021
10021
|
errors: g,
|
|
10022
10022
|
touched: p,
|
|
10023
10023
|
setFieldValue: b,
|
|
10024
|
-
setFieldTouched:
|
|
10024
|
+
setFieldTouched: h
|
|
10025
10025
|
}
|
|
10026
10026
|
)
|
|
10027
10027
|
),
|
|
10028
|
-
(
|
|
10028
|
+
(v = e.children) == null ? void 0 : v.call(e, { isSubmitting: m })
|
|
10029
10029
|
] });
|
|
10030
10030
|
}
|
|
10031
10031
|
}
|
|
@@ -10099,22 +10099,29 @@ function gt({
|
|
|
10099
10099
|
inlineLabel: l,
|
|
10100
10100
|
item: c
|
|
10101
10101
|
}) {
|
|
10102
|
-
var
|
|
10103
|
-
const { formulaConfig: f, onFormulaConfigChange: g, conditionConfig: p, onConditionConfigChange: m } = Qc(), b = { values: i, item: c },
|
|
10104
|
-
|
|
10105
|
-
const
|
|
10106
|
-
|
|
10107
|
-
const
|
|
10108
|
-
const
|
|
10109
|
-
return async (
|
|
10110
|
-
var
|
|
10111
|
-
const
|
|
10112
|
-
if (!(((
|
|
10113
|
-
return
|
|
10102
|
+
var x;
|
|
10103
|
+
const { formulaConfig: f, onFormulaConfigChange: g, conditionConfig: p, onConditionConfigChange: m } = Qc(), b = { values: i, item: c }, h = H(i);
|
|
10104
|
+
h.current = i;
|
|
10105
|
+
const v = H(c);
|
|
10106
|
+
v.current = c;
|
|
10107
|
+
const A = ae(() => {
|
|
10108
|
+
const y = Mc(n);
|
|
10109
|
+
return async (S) => {
|
|
10110
|
+
var B;
|
|
10111
|
+
const w = { values: h.current, item: v.current };
|
|
10112
|
+
if (!(((B = n.shouldHide) == null ? void 0 : B.call(n, w)) ?? n.hidden))
|
|
10113
|
+
return y(S);
|
|
10114
10114
|
};
|
|
10115
10115
|
}, [n]);
|
|
10116
|
-
|
|
10117
|
-
|
|
10116
|
+
vo({ name: e, validate: A });
|
|
10117
|
+
const C = ((x = n.shouldHide) == null ? void 0 : x.call(n, b)) ?? n.hidden ?? !1, I = H(void 0);
|
|
10118
|
+
return q(() => {
|
|
10119
|
+
const y = I.current;
|
|
10120
|
+
if (I.current = C, !C || y === !0 || !n.clearOnHide) return;
|
|
10121
|
+
const S = ze(h.current, e);
|
|
10122
|
+
S == null || S === "" || Array.isArray(S) && S.length === 0 || o(e, n.defaultValue);
|
|
10123
|
+
}, [C, e, n.clearOnHide, n.defaultValue, o]), C ? null : n.type === "object" ? /* @__PURE__ */ d(Ue, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
10124
|
+
Hc,
|
|
10118
10125
|
{
|
|
10119
10126
|
field: n,
|
|
10120
10127
|
pathPrefix: e,
|
|
@@ -10126,31 +10133,31 @@ function gt({
|
|
|
10126
10133
|
setFieldTouched: u,
|
|
10127
10134
|
compact: s,
|
|
10128
10135
|
item: c,
|
|
10129
|
-
renderFieldRouter: (
|
|
10136
|
+
renderFieldRouter: (y) => /* @__PURE__ */ d(
|
|
10130
10137
|
gt,
|
|
10131
10138
|
{
|
|
10132
|
-
field:
|
|
10133
|
-
pathPrefix:
|
|
10134
|
-
depth:
|
|
10135
|
-
values:
|
|
10136
|
-
errors:
|
|
10137
|
-
touched:
|
|
10138
|
-
setFieldValue:
|
|
10139
|
-
setFieldTouched:
|
|
10140
|
-
compact:
|
|
10141
|
-
inlineLabel:
|
|
10142
|
-
item:
|
|
10139
|
+
field: y.field,
|
|
10140
|
+
pathPrefix: y.pathPrefix,
|
|
10141
|
+
depth: y.depth,
|
|
10142
|
+
values: y.values,
|
|
10143
|
+
errors: y.errors,
|
|
10144
|
+
touched: y.touched,
|
|
10145
|
+
setFieldValue: y.setFieldValue,
|
|
10146
|
+
setFieldTouched: y.setFieldTouched,
|
|
10147
|
+
compact: y.compact,
|
|
10148
|
+
inlineLabel: y.inlineLabel,
|
|
10149
|
+
item: y.item
|
|
10143
10150
|
},
|
|
10144
|
-
|
|
10151
|
+
y.pathPrefix
|
|
10145
10152
|
)
|
|
10146
10153
|
}
|
|
10147
|
-
) }) : n.type === "array" && Array.isArray(n.children ?? n.itemFields) ? /* @__PURE__ */ d(
|
|
10154
|
+
) }) : n.type === "array" && Array.isArray(n.children ?? n.itemFields) ? /* @__PURE__ */ d(Ue, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
10148
10155
|
Nt,
|
|
10149
10156
|
{
|
|
10150
10157
|
field: n,
|
|
10151
|
-
value:
|
|
10158
|
+
value: ze(i, e),
|
|
10152
10159
|
values: i,
|
|
10153
|
-
onChange: (
|
|
10160
|
+
onChange: (y) => o(e, y),
|
|
10154
10161
|
onBlur: () => u(e, !0),
|
|
10155
10162
|
pathPrefix: e,
|
|
10156
10163
|
depth: t,
|
|
@@ -10159,25 +10166,25 @@ function gt({
|
|
|
10159
10166
|
parentTouched: a,
|
|
10160
10167
|
parentSetFieldValue: o,
|
|
10161
10168
|
parentSetFieldTouched: u,
|
|
10162
|
-
renderFieldRouter: (
|
|
10169
|
+
renderFieldRouter: (y) => /* @__PURE__ */ d(
|
|
10163
10170
|
gt,
|
|
10164
10171
|
{
|
|
10165
|
-
field:
|
|
10166
|
-
pathPrefix:
|
|
10167
|
-
depth:
|
|
10168
|
-
values:
|
|
10169
|
-
errors:
|
|
10170
|
-
touched:
|
|
10171
|
-
setFieldValue:
|
|
10172
|
-
setFieldTouched:
|
|
10173
|
-
compact:
|
|
10174
|
-
inlineLabel:
|
|
10175
|
-
item:
|
|
10172
|
+
field: y.field,
|
|
10173
|
+
pathPrefix: y.pathPrefix,
|
|
10174
|
+
depth: y.depth,
|
|
10175
|
+
values: y.values,
|
|
10176
|
+
errors: y.errors,
|
|
10177
|
+
touched: y.touched,
|
|
10178
|
+
setFieldValue: y.setFieldValue,
|
|
10179
|
+
setFieldTouched: y.setFieldTouched,
|
|
10180
|
+
compact: y.compact,
|
|
10181
|
+
inlineLabel: y.inlineLabel,
|
|
10182
|
+
item: y.item
|
|
10176
10183
|
},
|
|
10177
|
-
|
|
10184
|
+
y.pathPrefix
|
|
10178
10185
|
)
|
|
10179
10186
|
}
|
|
10180
|
-
) }) : n.type === "tabs" ? /* @__PURE__ */ d(
|
|
10187
|
+
) }) : n.type === "tabs" ? /* @__PURE__ */ d(Ue, { field: n, compact: s, children: /* @__PURE__ */ d(
|
|
10181
10188
|
_c,
|
|
10182
10189
|
{
|
|
10183
10190
|
field: n,
|
|
@@ -10189,22 +10196,22 @@ function gt({
|
|
|
10189
10196
|
setFieldValue: o,
|
|
10190
10197
|
setFieldTouched: u,
|
|
10191
10198
|
compact: s,
|
|
10192
|
-
renderFieldRouter: (
|
|
10199
|
+
renderFieldRouter: (y) => /* @__PURE__ */ d(
|
|
10193
10200
|
gt,
|
|
10194
10201
|
{
|
|
10195
|
-
field:
|
|
10196
|
-
pathPrefix:
|
|
10197
|
-
depth:
|
|
10198
|
-
values:
|
|
10199
|
-
errors:
|
|
10200
|
-
touched:
|
|
10201
|
-
setFieldValue:
|
|
10202
|
-
setFieldTouched:
|
|
10203
|
-
compact:
|
|
10204
|
-
inlineLabel:
|
|
10205
|
-
item:
|
|
10202
|
+
field: y.field,
|
|
10203
|
+
pathPrefix: y.pathPrefix,
|
|
10204
|
+
depth: y.depth,
|
|
10205
|
+
values: y.values,
|
|
10206
|
+
errors: y.errors,
|
|
10207
|
+
touched: y.touched,
|
|
10208
|
+
setFieldValue: y.setFieldValue,
|
|
10209
|
+
setFieldTouched: y.setFieldTouched,
|
|
10210
|
+
compact: y.compact,
|
|
10211
|
+
inlineLabel: y.inlineLabel,
|
|
10212
|
+
item: y.item
|
|
10206
10213
|
},
|
|
10207
|
-
|
|
10214
|
+
y.pathPrefix
|
|
10208
10215
|
)
|
|
10209
10216
|
}
|
|
10210
10217
|
) }) : /* @__PURE__ */ d(
|
|
@@ -10244,17 +10251,17 @@ function rd({
|
|
|
10244
10251
|
onConditionConfigChange: p
|
|
10245
10252
|
}) {
|
|
10246
10253
|
var D, G, W;
|
|
10247
|
-
const m = { values: t, item: l }, b =
|
|
10248
|
-
|
|
10249
|
-
const V =
|
|
10254
|
+
const m = { values: t, item: l }, b = ze(t, e), h = H(n.compute);
|
|
10255
|
+
h.current = n.compute, q(() => {
|
|
10256
|
+
const V = h.current;
|
|
10250
10257
|
if (!V) return;
|
|
10251
10258
|
const j = V({ values: t });
|
|
10252
10259
|
j !== b && a(e, j);
|
|
10253
10260
|
}, [t, b, e, a]);
|
|
10254
|
-
const
|
|
10255
|
-
if (!
|
|
10261
|
+
const v = te.get(n.type);
|
|
10262
|
+
if (!v)
|
|
10256
10263
|
return null;
|
|
10257
|
-
const
|
|
10264
|
+
const A = typeof n.disabled == "function" ? n.disabled(m) : ((D = n.shouldDisable) == null ? void 0 : D.call(n, m)) ?? n.disabled ?? !1, C = ze(i, e), I = !!ze(r, e), x = (G = n.compute) == null ? void 0 : G.call(n, m), y = x !== void 0 ? x : b, S = (W = n.transform) != null && W.in ? n.transform.in(y) : y, w = (V) => {
|
|
10258
10265
|
var Q, U;
|
|
10259
10266
|
if (n.compute) return;
|
|
10260
10267
|
const j = (Q = n.transform) != null && Q.out ? n.transform.out(V) : V;
|
|
@@ -10267,18 +10274,18 @@ function rd({
|
|
|
10267
10274
|
} else
|
|
10268
10275
|
p({ ...g, [e]: V });
|
|
10269
10276
|
}, F = {
|
|
10270
|
-
field: { ...n, disabled:
|
|
10277
|
+
field: { ...n, disabled: A, id: e, name: e },
|
|
10271
10278
|
value: S,
|
|
10272
10279
|
values: t,
|
|
10273
|
-
onChange:
|
|
10280
|
+
onChange: w,
|
|
10274
10281
|
onBlur: () => o(e, !0),
|
|
10275
|
-
error:
|
|
10276
|
-
touched:
|
|
10282
|
+
error: C,
|
|
10283
|
+
touched: I,
|
|
10277
10284
|
formulaConfig: c,
|
|
10278
10285
|
onFormulaConfigChange: f
|
|
10279
10286
|
};
|
|
10280
|
-
return s ? /* @__PURE__ */ d(
|
|
10281
|
-
/* @__PURE__ */ d(
|
|
10287
|
+
return s ? /* @__PURE__ */ d(v, { ...F, inlineLabel: !0 }) : /* @__PURE__ */ O(Ue, { field: n, compact: u, children: [
|
|
10288
|
+
/* @__PURE__ */ d(v, { ...F, touched: I }),
|
|
10282
10289
|
n.condition && /* @__PURE__ */ d(
|
|
10283
10290
|
ao,
|
|
10284
10291
|
{
|
|
@@ -10296,8 +10303,8 @@ export {
|
|
|
10296
10303
|
Bc as B,
|
|
10297
10304
|
no as C,
|
|
10298
10305
|
Sd as D,
|
|
10299
|
-
|
|
10300
|
-
|
|
10306
|
+
zc as E,
|
|
10307
|
+
R as F,
|
|
10301
10308
|
Y as G,
|
|
10302
10309
|
Ad as H,
|
|
10303
10310
|
Mu as I,
|
|
@@ -10310,7 +10317,7 @@ export {
|
|
|
10310
10317
|
$r as c,
|
|
10311
10318
|
jo as d,
|
|
10312
10319
|
md as e,
|
|
10313
|
-
|
|
10320
|
+
zr as f,
|
|
10314
10321
|
gd as g,
|
|
10315
10322
|
Mr as h,
|
|
10316
10323
|
pd as i,
|
|
@@ -10327,9 +10334,9 @@ export {
|
|
|
10327
10334
|
Ge as t,
|
|
10328
10335
|
ht as u,
|
|
10329
10336
|
bd as v,
|
|
10330
|
-
|
|
10337
|
+
xd as w,
|
|
10331
10338
|
_o as x,
|
|
10332
|
-
|
|
10339
|
+
yd as y,
|
|
10333
10340
|
Ke as z
|
|
10334
10341
|
};
|
|
10335
|
-
//# sourceMappingURL=index-
|
|
10342
|
+
//# sourceMappingURL=index-B74jTc2b.js.map
|