opsfuse-ui 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/combobox.d.ts +30 -5
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/shadcn/shadcn-combobox.d.ts +2 -1
- package/dist/components/ui/shadcn/shadcn-combobox.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +7 -3
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/core.js +3 -3
- package/dist/extended.js +3 -3
- package/dist/index.js +334 -334
- package/dist/{input-group-B7EsxYkc.js → input-group-B2bCcHga.js} +114 -107
- package/dist/{input-otp-DUMPmzcw.js → input-otp-VacbU32o.js} +3549 -3412
- package/dist/lib/portaled-layer.d.ts +10 -0
- package/dist/lib/portaled-layer.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/{toggle-group-eVKmACHy.js → toggle-group-DGn8DYrL.js} +2844 -2843
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { A as e, C as t,
|
|
1
|
+
import { A as e, C as t, F as n, I as r, L as i, M as a, O as o, P as s, R as c, S as l, Wt as u, _ as d, a as f, b as p, c as m, d as h, f as g, g as _, h as v, i as y, j as b, k as x, l as S, m as ee, n as te, o as ne, p as re, r as ie, s as ae, t as oe, u as se, v as ce, x as le, y as ue } from "./input-group-B2bCcHga.js";
|
|
2
2
|
import { t as de } from "./date-fns-DTKqTajJ.js";
|
|
3
3
|
import { kT as fe, t as pe } from "./lucide-react-Dil0H3iN.js";
|
|
4
4
|
import { t as me } from "./es6-CLjPx7Zx.js";
|
|
5
|
-
import { $ as he, $n as ge, $r as _e, $t as ve, A as ye, An as be, Ar as xe, At as Se, B as Ce, Bn as we, Br as Te, Bt as Ee, C as De, Cn as Oe, Cr as ke, Ct as Ae, D as je, Dn as Me, Dr as Ne, Dt as Pe, E as Fe, En as Ie, Er as Le, Et as Re, F as ze, Fn as Be, Fr as Ve, Ft as He, G as Ue, Gn as We, Gr as Ge, Gt as Ke, H as qe, Hn as Je, Hr as Ye, Ht as Xe, I as Ze, In as Qe, Ir as $e, It as et, J as tt, Jn as nt, Jr as rt, Jt as it, K as at, Kn as ot, Kr as st, Kt as ct, L as lt, Ln as ut, Lr as dt, Lt as ft, M as pt, Mn as mt, Mr as ht, Mt as gt, N as _t, Nn as vt, Nr as yt, Nt as bt, O as xt, On as St, Or as Ct, Ot as wt, P as Tt, Pn as Et, Pr as Dt, Pt as Ot, Q as kt, Qn as At, Qr as jt, Qt as Mt, R as Nt, Rn as Pt, Rr as Ft, Rt as It, S as Lt, Sn as Rt, Sr as zt, St as Bt, T as Vt, Tn as Ht, Tr as Ut, Tt as Wt, U as Gt, Un as Kt, Ur as qt, Ut as Jt, V as Yt, Vn as Xt, Vr as Zt, Vt as Qt, W as $t, Wn as en, Wr as tn, Wt as nn, X as rn, Xn as an, Xr as on, Xt as sn, Y as cn, Yn as ln, Yr as un, Yt as dn, Z as fn, Zn as pn, Zr as mn, Zt as hn, _ as gn, _n, _r as vn, _t as yn, a as bn, ai as xn, an as Sn, ar as Cn, at as wn, b as Tn, bn as En, br as Dn, bt as On, c as kn, ci as An, cn as jn, cr as Mn, ct as Nn, d as Pn, dn as Fn, dr as In, dt as Ln, ei as Rn, en as zn, er as Bn, et as Vn, f as Hn, fn as Un, fr as Wn, ft as Gn, g as Kn, gn as qn, gr as Jn, gt as Yn, h as Xn, hn as Zn, hr as Qn, ht as $n, i as er, ii as tr, in as nr, ir as rr, it as ir, j as ar, jn as or, jr as sr, jt as cr, k as lr, kn as ur, kr as dr, kt as fr, l as pr, li as mr, ln as hr, lr as gr, lt as _r, m as vr, mn as yr, mr as br, mt as xr, n as Sr, ni as Cr, nn as wr, nr as Tr, nt as Er, o as Dr, oi as Or, on as kr, or as Ar, ot as jr, p as Mr, pn as Nr, pr as Pr, pt as Fr, q as Ir, qn as Lr, qr as Rr, qt as zr, r as Br, ri as Vr, rn as Hr, rr as Ur, rt as Wr, s as Gr, si as Kr, sn as qr, sr as Jr, st as Yr, t as Xr, ti as Zr, tn as Qr, tr as $r, tt as ei, u as ti, ui as ni, un as ri, ur as ii, ut as ai, v as oi, vn as si, vr as ci, vt as li, w as ui, wn as di, wr as fi, wt as pi, x as mi, xn as hi, xr as gi, xt as _i, y as vi, yn as yi, yr as bi, yt as xi, z as Si, zn as Ci, zr as wi, zt as Ti } from "./toggle-group-
|
|
6
|
-
import { $ as Ei, A as Di, B as Oi, C as ki, D as Ai, E as ji, F as Mi, G as Ni, H as Pi, I as Fi, J as Ii, K as Li, L as Ri, M as zi, N as Bi, O as Vi, P as Hi, Q as Ui, R as Wi, S as Gi, T as Ki, U as qi, V as Ji, W as Yi, X as Xi, Y as Zi, Z as Qi, _ as $i, a as ea, b as ta, c as na, d as ra, et as ia, f as aa, g as oa, h as sa, i as ca, j as la, k as ua, l as da, m as fa, n as pa,
|
|
7
|
-
import * as
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { useSyncExternalStoreWithSelector as
|
|
10
|
-
import { Fragment as
|
|
5
|
+
import { $ as he, $n as ge, $r as _e, $t as ve, A as ye, An as be, Ar as xe, At as Se, B as Ce, Bn as we, Br as Te, Bt as Ee, C as De, Cn as Oe, Cr as ke, Ct as Ae, D as je, Dn as Me, Dr as Ne, Dt as Pe, E as Fe, En as Ie, Er as Le, Et as Re, F as ze, Fn as Be, Fr as Ve, Ft as He, G as Ue, Gn as We, Gr as Ge, Gt as Ke, H as qe, Hn as Je, Hr as Ye, Ht as Xe, I as Ze, In as Qe, Ir as $e, It as et, J as tt, Jn as nt, Jr as rt, Jt as it, K as at, Kn as ot, Kr as st, Kt as ct, L as lt, Ln as ut, Lr as dt, Lt as ft, M as pt, Mn as mt, Mr as ht, Mt as gt, N as _t, Nn as vt, Nr as yt, Nt as bt, O as xt, On as St, Or as Ct, Ot as wt, P as Tt, Pn as Et, Pr as Dt, Pt as Ot, Q as kt, Qn as At, Qr as jt, Qt as Mt, R as Nt, Rn as Pt, Rr as Ft, Rt as It, S as Lt, Sn as Rt, Sr as zt, St as Bt, T as Vt, Tn as Ht, Tr as Ut, Tt as Wt, U as Gt, Un as Kt, Ur as qt, Ut as Jt, V as Yt, Vn as Xt, Vr as Zt, Vt as Qt, W as $t, Wn as en, Wr as tn, Wt as nn, X as rn, Xn as an, Xr as on, Xt as sn, Y as cn, Yn as ln, Yr as un, Yt as dn, Z as fn, Zn as pn, Zr as mn, Zt as hn, _ as gn, _n, _r as vn, _t as yn, a as bn, ai as xn, an as Sn, ar as Cn, at as wn, b as Tn, bn as En, br as Dn, bt as On, c as kn, ci as An, cn as jn, cr as Mn, ct as Nn, d as Pn, dn as Fn, dr as In, dt as Ln, ei as Rn, en as zn, er as Bn, et as Vn, f as Hn, fn as Un, fr as Wn, ft as Gn, g as Kn, gn as qn, gr as Jn, gt as Yn, h as Xn, hn as Zn, hr as Qn, ht as $n, i as er, ii as tr, in as nr, ir as rr, it as ir, j as ar, jn as or, jr as sr, jt as cr, k as lr, kn as ur, kr as dr, kt as fr, l as pr, li as mr, ln as hr, lr as gr, lt as _r, m as vr, mn as yr, mr as br, mt as xr, n as Sr, ni as Cr, nn as wr, nr as Tr, nt as Er, o as Dr, oi as Or, on as kr, or as Ar, ot as jr, p as Mr, pn as Nr, pr as Pr, pt as Fr, q as Ir, qn as Lr, qr as Rr, qt as zr, r as Br, ri as Vr, rn as Hr, rr as Ur, rt as Wr, s as Gr, si as Kr, sn as qr, sr as Jr, st as Yr, t as Xr, ti as Zr, tn as Qr, tr as $r, tt as ei, u as ti, ui as ni, un as ri, ur as ii, ut as ai, v as oi, vn as si, vr as ci, vt as li, w as ui, wn as di, wr as fi, wt as pi, x as mi, xn as hi, xr as gi, xt as _i, y as vi, yn as yi, yr as bi, yt as xi, z as Si, zn as Ci, zr as wi, zt as Ti } from "./toggle-group-DGn8DYrL.js";
|
|
6
|
+
import { $ as Ei, A as Di, B as Oi, C as ki, D as Ai, E as ji, F as Mi, G as Ni, H as Pi, I as Fi, J as Ii, K as Li, L as Ri, M as zi, N as Bi, O as Vi, P as Hi, Q as Ui, R as Wi, S as Gi, T as Ki, U as qi, V as Ji, W as Yi, X as Xi, Y as Zi, Z as Qi, _ as $i, a as ea, b as ta, c as na, d as ra, et as ia, f as aa, g as oa, h as sa, i as ca, j as la, k as ua, l as da, m as fa, n as pa, nt as ma, o as ha, p as ga, q as _a, r as va, s as ya, t as ba, tt as xa, u as Sa, v as Ca, w as wa, x as Ta, y as Ea, z as Da } from "./input-otp-VacbU32o.js";
|
|
7
|
+
import * as Oa from "react";
|
|
8
|
+
import { createContext as ka, useCallback as Aa, useContext as ja, useEffect as Ma, useLayoutEffect as Na, useMemo as C, useRef as Pa, useState as w } from "react";
|
|
9
|
+
import { useSyncExternalStoreWithSelector as Fa } from "use-sync-external-store/shim/with-selector";
|
|
10
|
+
import { Fragment as Ia, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/ui/autocomplete.tsx
|
|
12
|
-
function
|
|
13
|
-
let d =
|
|
12
|
+
function La({ items: e, placeholder: t = "Select...", placeholderIcon: n, emptyMessage: i = "No items found.", disabled: a = !1, triggerWidth: o = "w-64", label: s, multiple: c, ...l }) {
|
|
13
|
+
let d = ma();
|
|
14
14
|
return /* @__PURE__ */ E("div", {
|
|
15
15
|
className: "flex flex-col gap-2",
|
|
16
|
-
children: [s && /* @__PURE__ */ T(S, { children: s }), /* @__PURE__ */ E(
|
|
16
|
+
children: [s && /* @__PURE__ */ T(S, { children: s }), /* @__PURE__ */ E(Da, {
|
|
17
17
|
items: e,
|
|
18
18
|
multiple: c,
|
|
19
19
|
disabled: a,
|
|
@@ -25,14 +25,14 @@ function Ia({ items: e, placeholder: t = "Select...", placeholderIcon: n, emptyM
|
|
|
25
25
|
"data-icon": "inline-start",
|
|
26
26
|
className: "contents text-muted-foreground [&>svg:not([class*='size-'])]:size-4",
|
|
27
27
|
children: n
|
|
28
|
-
}) : null, /* @__PURE__ */ T(
|
|
28
|
+
}) : null, /* @__PURE__ */ T(xa, { children: (e) => {
|
|
29
29
|
let n = e ?? [];
|
|
30
|
-
return /* @__PURE__ */ E(
|
|
30
|
+
return /* @__PURE__ */ E(Oa.Fragment, { children: [n.map((e) => /* @__PURE__ */ T(Oi, { children: e.label }, e.value)), /* @__PURE__ */ T(Pi, {
|
|
31
31
|
placeholder: t,
|
|
32
32
|
disabled: a
|
|
33
33
|
})] });
|
|
34
34
|
} })]
|
|
35
|
-
}) : /* @__PURE__ */ T(
|
|
35
|
+
}) : /* @__PURE__ */ T(ia, { render: /* @__PURE__ */ E(r, {
|
|
36
36
|
variant: "outline",
|
|
37
37
|
className: u(o, "justify-between font-normal"),
|
|
38
38
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -41,7 +41,7 @@ function Ia({ items: e, placeholder: t = "Select...", placeholderIcon: n, emptyM
|
|
|
41
41
|
"data-icon": "inline-start",
|
|
42
42
|
className: "contents text-muted-foreground [&>svg:not([class*='size-'])]:size-4",
|
|
43
43
|
children: n
|
|
44
|
-
}) : null, /* @__PURE__ */ T(
|
|
44
|
+
}) : null, /* @__PURE__ */ T(xa, { placeholder: t })]
|
|
45
45
|
}), /* @__PURE__ */ T(fe, { className: "ml-2 size-4 shrink-0 text-muted-foreground" })]
|
|
46
46
|
}) }), /* @__PURE__ */ E(Yi, {
|
|
47
47
|
anchor: c ? d : void 0,
|
|
@@ -66,7 +66,7 @@ var D = /* @__PURE__ */ function(e) {
|
|
|
66
66
|
return e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e;
|
|
67
67
|
}({});
|
|
68
68
|
/* @__NO_SIDE_EFFECTS__ */
|
|
69
|
-
function
|
|
69
|
+
function Ra({ update: e, notify: t, unwatched: n }) {
|
|
70
70
|
return {
|
|
71
71
|
link: r,
|
|
72
72
|
unlink: i,
|
|
@@ -185,7 +185,7 @@ function La({ update: e, notify: t, unwatched: n }) {
|
|
|
185
185
|
}
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region node_modules/@tanstack/store/dist/atom.js
|
|
188
|
-
function
|
|
188
|
+
function za(e, t, n) {
|
|
189
189
|
let r = typeof e == "object", i = r ? e : void 0;
|
|
190
190
|
return {
|
|
191
191
|
next: (r ? e.next : e)?.bind(i),
|
|
@@ -193,38 +193,38 @@ function Ra(e, t, n) {
|
|
|
193
193
|
complete: (r ? e.complete : n)?.bind(i)
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
var
|
|
196
|
+
var Ba = [], Va = 0, { link: Ha, unlink: Ua, propagate: Wa, checkDirty: Ga, shallowPropagate: Ka } = /* @__PURE__ */ Ra({
|
|
197
197
|
update(e) {
|
|
198
198
|
return e._update();
|
|
199
199
|
},
|
|
200
200
|
notify(e) {
|
|
201
|
-
|
|
201
|
+
Ba[Ja++] = e, e.flags &= ~D.Watching;
|
|
202
202
|
},
|
|
203
203
|
unwatched(e) {
|
|
204
|
-
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = D.Mutable | D.Dirty,
|
|
204
|
+
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = D.Mutable | D.Dirty, Xa(e));
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
207
|
-
function
|
|
206
|
+
}), qa = 0, Ja = 0, O, Ya = 0;
|
|
207
|
+
function k(e) {
|
|
208
208
|
try {
|
|
209
|
-
++
|
|
209
|
+
++Ya, e();
|
|
210
210
|
} finally {
|
|
211
|
-
--
|
|
211
|
+
--Ya || Za();
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Xa(e) {
|
|
215
215
|
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
|
|
216
|
-
for (; n !== void 0;) n =
|
|
216
|
+
for (; n !== void 0;) n = Ua(n, e);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
if (!(
|
|
220
|
-
for (;
|
|
221
|
-
let e =
|
|
222
|
-
|
|
218
|
+
function Za() {
|
|
219
|
+
if (!(Ya > 0)) {
|
|
220
|
+
for (; qa < Ja;) {
|
|
221
|
+
let e = Ba[qa];
|
|
222
|
+
Ba[qa++] = void 0, e.notify();
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
qa = 0, Ja = 0;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Qa(e, t) {
|
|
228
228
|
let n = typeof e == "function", r = e, i = {
|
|
229
229
|
_snapshot: n ? void 0 : e,
|
|
230
230
|
subs: void 0,
|
|
@@ -233,10 +233,10 @@ function Xa(e, t) {
|
|
|
233
233
|
depsTail: void 0,
|
|
234
234
|
flags: n ? D.None : D.Mutable,
|
|
235
235
|
get() {
|
|
236
|
-
return
|
|
236
|
+
return O !== void 0 && Ha(i, O, Va), i._snapshot;
|
|
237
237
|
},
|
|
238
238
|
subscribe(e) {
|
|
239
|
-
let t =
|
|
239
|
+
let t = za(e), n = { current: !1 }, r = $a(() => {
|
|
240
240
|
i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
|
|
241
241
|
});
|
|
242
242
|
return { unsubscribe: () => {
|
|
@@ -244,42 +244,42 @@ function Xa(e, t) {
|
|
|
244
244
|
} };
|
|
245
245
|
},
|
|
246
246
|
_update(e) {
|
|
247
|
-
let a =
|
|
248
|
-
if (n)
|
|
247
|
+
let a = O, o = t?.compare ?? Object.is;
|
|
248
|
+
if (n) O = i, ++Va, i.depsTail = void 0;
|
|
249
249
|
else if (e === void 0) return !1;
|
|
250
250
|
n && (i.flags = D.Mutable | D.RecursedCheck);
|
|
251
251
|
try {
|
|
252
252
|
let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
|
|
253
253
|
return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
|
|
254
254
|
} finally {
|
|
255
|
-
|
|
255
|
+
O = a, n && (i.flags &= ~D.RecursedCheck), Xa(i);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
return n ? (i.flags = D.Mutable | D.Dirty, i.get = function() {
|
|
260
260
|
let e = i.flags;
|
|
261
|
-
if (e & D.Dirty || e & D.Pending &&
|
|
261
|
+
if (e & D.Dirty || e & D.Pending && Ga(i.deps, i)) {
|
|
262
262
|
if (i._update()) {
|
|
263
263
|
let e = i.subs;
|
|
264
|
-
e !== void 0 &&
|
|
264
|
+
e !== void 0 && Ka(e);
|
|
265
265
|
}
|
|
266
266
|
} else e & D.Pending && (i.flags = e & ~D.Pending);
|
|
267
|
-
return
|
|
267
|
+
return O !== void 0 && Ha(i, O, Va), i._snapshot;
|
|
268
268
|
}) : i.set = function(e) {
|
|
269
269
|
if (i._update(e)) {
|
|
270
270
|
let e = i.subs;
|
|
271
|
-
e !== void 0 && (
|
|
271
|
+
e !== void 0 && (Wa(e), Ka(e), Za());
|
|
272
272
|
}
|
|
273
273
|
}, i;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function $a(e) {
|
|
276
276
|
let t = () => {
|
|
277
|
-
let t =
|
|
278
|
-
|
|
277
|
+
let t = O;
|
|
278
|
+
O = n, ++Va, n.depsTail = void 0, n.flags = D.Watching | D.RecursedCheck;
|
|
279
279
|
try {
|
|
280
280
|
return e();
|
|
281
281
|
} finally {
|
|
282
|
-
|
|
282
|
+
O = t, n.flags &= ~D.RecursedCheck, Xa(n);
|
|
283
283
|
}
|
|
284
284
|
}, n = {
|
|
285
285
|
deps: void 0,
|
|
@@ -289,19 +289,19 @@ function Za(e) {
|
|
|
289
289
|
flags: D.Watching | D.RecursedCheck,
|
|
290
290
|
notify() {
|
|
291
291
|
let e = this.flags;
|
|
292
|
-
e & D.Dirty || e & D.Pending &&
|
|
292
|
+
e & D.Dirty || e & D.Pending && Ga(this.deps, this) ? t() : this.flags = D.Watching;
|
|
293
293
|
},
|
|
294
294
|
stop() {
|
|
295
|
-
this.flags = D.None, this.depsTail = void 0,
|
|
295
|
+
this.flags = D.None, this.depsTail = void 0, Xa(this);
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
return t(), n;
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region node_modules/@tanstack/store/dist/store.js
|
|
302
|
-
var
|
|
302
|
+
var eo = class {
|
|
303
303
|
constructor(e, t) {
|
|
304
|
-
this.atom =
|
|
304
|
+
this.atom = Qa(e), this.get = this.get.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), t && (this.actions = t(this));
|
|
305
305
|
}
|
|
306
306
|
setState(e) {
|
|
307
307
|
this.atom.set(e);
|
|
@@ -313,11 +313,11 @@ var Qa = class {
|
|
|
313
313
|
return this.state;
|
|
314
314
|
}
|
|
315
315
|
subscribe(e) {
|
|
316
|
-
return this.atom.subscribe(
|
|
316
|
+
return this.atom.subscribe(za(e));
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, to = class {
|
|
319
319
|
constructor(e) {
|
|
320
|
-
this.atom =
|
|
320
|
+
this.atom = Qa(e);
|
|
321
321
|
}
|
|
322
322
|
get state() {
|
|
323
323
|
return this.atom.get();
|
|
@@ -326,15 +326,15 @@ var Qa = class {
|
|
|
326
326
|
return this.state;
|
|
327
327
|
}
|
|
328
328
|
subscribe(e) {
|
|
329
|
-
return this.atom.subscribe(
|
|
329
|
+
return this.atom.subscribe(za(e));
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
|
-
function
|
|
333
|
-
return typeof e == "function" ? new
|
|
332
|
+
function A(e, t) {
|
|
333
|
+
return typeof e == "function" ? new to(e) : t ? new eo(e, t) : new eo(e);
|
|
334
334
|
}
|
|
335
335
|
//#endregion
|
|
336
336
|
//#region node_modules/@tanstack/pacer-lite/dist/lite-throttler.js
|
|
337
|
-
var
|
|
337
|
+
var no = class {
|
|
338
338
|
constructor(e, t) {
|
|
339
339
|
this.fn = e, this.options = t, this.lastExecutionTime = 0, this.isPending = !1, this.maybeExecute = (...e) => {
|
|
340
340
|
let t = Date.now() - this.lastExecutionTime;
|
|
@@ -356,12 +356,12 @@ var eo = class {
|
|
|
356
356
|
}, this.options.leading === void 0 && this.options.trailing === void 0 && (this.options.leading = !0, this.options.trailing = !0);
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
|
-
function
|
|
360
|
-
return new
|
|
359
|
+
function ro(e, t) {
|
|
360
|
+
return new no(e, t).maybeExecute;
|
|
361
361
|
}
|
|
362
362
|
//#endregion
|
|
363
363
|
//#region node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js
|
|
364
|
-
var
|
|
364
|
+
var io = class {
|
|
365
365
|
#e = !0;
|
|
366
366
|
#t;
|
|
367
367
|
#n;
|
|
@@ -481,7 +481,7 @@ var no = class {
|
|
|
481
481
|
};
|
|
482
482
|
return this.#n().addEventListener("tanstack-devtools-global", t), () => this.#n().removeEventListener("tanstack-devtools-global", t);
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, j = new class extends io {
|
|
485
485
|
constructor() {
|
|
486
486
|
super({
|
|
487
487
|
pluginId: "form-devtools",
|
|
@@ -491,19 +491,19 @@ var no = class {
|
|
|
491
491
|
}();
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region node_modules/@tanstack/form-core/dist/esm/utils.js
|
|
494
|
-
function
|
|
494
|
+
function M(e, t) {
|
|
495
495
|
return typeof e == "function" ? e(t) : e;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
497
|
+
function N(e, t) {
|
|
498
|
+
return fo(t).reduce((e, t) => {
|
|
499
499
|
if (e === null) return null;
|
|
500
500
|
if (e !== void 0) return e[t];
|
|
501
501
|
}, e);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
let r =
|
|
503
|
+
function P(e, t, n) {
|
|
504
|
+
let r = fo(t);
|
|
505
505
|
function i(e) {
|
|
506
|
-
if (!r.length) return
|
|
506
|
+
if (!r.length) return M(n, e);
|
|
507
507
|
let t = r.shift();
|
|
508
508
|
if (typeof t == "string" || typeof t == "number" && !Array.isArray(e)) return typeof e == "object" ? (e === null && (e = {}), {
|
|
509
509
|
...e,
|
|
@@ -521,8 +521,8 @@ function F(e, t, n) {
|
|
|
521
521
|
}
|
|
522
522
|
return i(e);
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
let n =
|
|
524
|
+
function ao(e, t) {
|
|
525
|
+
let n = fo(t);
|
|
526
526
|
function r(e) {
|
|
527
527
|
if (!e) return;
|
|
528
528
|
if (n.length === 1) {
|
|
@@ -549,35 +549,35 @@ function ro(e, t) {
|
|
|
549
549
|
}
|
|
550
550
|
return r(e);
|
|
551
551
|
}
|
|
552
|
-
var
|
|
553
|
-
function
|
|
552
|
+
var oo = 46, so = 91, co = 93, lo = 48, uo = 57;
|
|
553
|
+
function fo(e) {
|
|
554
554
|
if (Array.isArray(e)) return [...e];
|
|
555
555
|
if (typeof e != "string") throw Error("Path must be a string.");
|
|
556
|
-
let t = e.length, n = [], r = +(t > 0 && e.charCodeAt(0) ===
|
|
556
|
+
let t = e.length, n = [], r = +(t > 0 && e.charCodeAt(0) === so), i = !0, a = -1;
|
|
557
557
|
for (let o = r; o <= t; o++) {
|
|
558
558
|
let s = o < t ? e.charCodeAt(o) : -1;
|
|
559
|
-
if (o === t || s ===
|
|
559
|
+
if (o === t || s === oo || s === so || s === co) {
|
|
560
560
|
let t = o - r;
|
|
561
561
|
if (t > 0) {
|
|
562
|
-
let a = i && (t === 1 || e.charCodeAt(r) !==
|
|
562
|
+
let a = i && (t === 1 || e.charCodeAt(r) !== lo), s = e.slice(r, o);
|
|
563
563
|
if (a) {
|
|
564
564
|
let e = parseInt(s, 10);
|
|
565
565
|
t <= 15 || String(e) === s ? n.push(e) : n.push(s);
|
|
566
566
|
} else n.push(s);
|
|
567
|
-
} else a !==
|
|
567
|
+
} else a !== co && !(a === -1 && s === co) && !(a === s && (s === oo || s === so)) && n.push("");
|
|
568
568
|
r = o + 1, i = !0;
|
|
569
|
-
} else (s <
|
|
569
|
+
} else (s < lo || s > uo) && (i = !1);
|
|
570
570
|
a = s;
|
|
571
571
|
}
|
|
572
572
|
return n.length || n.push(""), n;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function po(e, t) {
|
|
575
575
|
return e.length === 0 ? t : t.length === 0 ? e : t.startsWith("[") || t.startsWith(".") ? e + t : `${e}.${t}`;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function mo(e) {
|
|
578
578
|
return !(Array.isArray(e) && e.length === 0);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function F(e, t) {
|
|
581
581
|
return t.validationLogic({
|
|
582
582
|
form: t.form,
|
|
583
583
|
group: t.group,
|
|
@@ -593,7 +593,7 @@ function L(e, t) {
|
|
|
593
593
|
}))
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function I(e, t) {
|
|
597
597
|
let { asyncDebounceMs: n } = t, { onBlurAsyncDebounceMs: r, onChangeAsyncDebounceMs: i, onDynamicAsyncDebounceMs: a } = t.validators || {}, o = n ?? 0;
|
|
598
598
|
return t.validationLogic({
|
|
599
599
|
form: t.form,
|
|
@@ -628,8 +628,8 @@ function R(e, t) {
|
|
|
628
628
|
})
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
631
|
+
var ho = (e) => !!e && typeof e == "object" && "fields" in e;
|
|
632
|
+
function L(e, t) {
|
|
633
633
|
if (Object.is(e, t)) return !0;
|
|
634
634
|
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
|
|
635
635
|
if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
|
|
@@ -645,10 +645,10 @@ function B(e, t) {
|
|
|
645
645
|
}
|
|
646
646
|
let n = Object.keys(e), r = Object.keys(t);
|
|
647
647
|
if (n.length !== r.length || n.length === 0 && !Array.isArray(e) && !Array.isArray(t) && (Object.getPrototypeOf(e) !== Object.prototype || Object.getPrototypeOf(t) !== Object.prototype)) return !1;
|
|
648
|
-
for (let i of n) if (!r.includes(i) || !
|
|
648
|
+
for (let i of n) if (!r.includes(i) || !L(e[i], t[i])) return !1;
|
|
649
649
|
return !0;
|
|
650
650
|
}
|
|
651
|
-
var
|
|
651
|
+
var go = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previousErrorValue: n }) => e ? {
|
|
652
652
|
newErrorValue: e,
|
|
653
653
|
newSource: "form"
|
|
654
654
|
} : t ? {
|
|
@@ -660,7 +660,7 @@ var fo = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previ
|
|
|
660
660
|
} : {
|
|
661
661
|
newErrorValue: void 0,
|
|
662
662
|
newSource: void 0
|
|
663
|
-
},
|
|
663
|
+
}, R = ({ formLevelError: e, fieldLevelError: t }) => t ? {
|
|
664
664
|
newErrorValue: t,
|
|
665
665
|
newSource: "field"
|
|
666
666
|
} : e ? {
|
|
@@ -670,56 +670,56 @@ var fo = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previ
|
|
|
670
670
|
newErrorValue: void 0,
|
|
671
671
|
newSource: void 0
|
|
672
672
|
};
|
|
673
|
-
function
|
|
673
|
+
function z(e, t) {
|
|
674
674
|
return e == null ? t : {
|
|
675
675
|
...e,
|
|
676
676
|
...t
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
for (var
|
|
680
|
-
function
|
|
679
|
+
for (var B = 256, V = [], _o; B--;) V[B] = (B + 256).toString(16).substring(1);
|
|
680
|
+
function vo() {
|
|
681
681
|
let e = 0, t, n = "";
|
|
682
|
-
if (!
|
|
683
|
-
for (
|
|
684
|
-
e = 0,
|
|
682
|
+
if (!_o || B + 16 > 256) {
|
|
683
|
+
for (_o = Array(256), e = 256; e--;) _o[e] = 256 * Math.random() | 0;
|
|
684
|
+
e = 0, B = 0;
|
|
685
685
|
}
|
|
686
|
-
for (; e < 16; e++) t =
|
|
687
|
-
return
|
|
686
|
+
for (; e < 16; e++) t = _o[B + e], e === 6 ? n += V[t & 15 | 64] : e === 8 ? n += V[t & 63 | 128] : n += V[t], e & 1 && e > 1 && e < 11 && (n += "-");
|
|
687
|
+
return B++, n;
|
|
688
688
|
}
|
|
689
|
-
var
|
|
689
|
+
var yo = ro((e) => j.emit("form-state", {
|
|
690
690
|
id: e.formId,
|
|
691
691
|
state: e.store.state
|
|
692
692
|
}), { wait: 300 });
|
|
693
|
-
function
|
|
693
|
+
function H(e) {
|
|
694
694
|
if (typeof e != "object" || !e) return e;
|
|
695
695
|
if (e instanceof Date) return new Date(e.getTime());
|
|
696
696
|
if (Array.isArray(e)) {
|
|
697
697
|
let t = [];
|
|
698
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
698
|
+
for (let n = 0; n < e.length; n++) t[n] = H(e[n]);
|
|
699
699
|
return t;
|
|
700
700
|
}
|
|
701
701
|
if (e instanceof Map) {
|
|
702
702
|
let t = /* @__PURE__ */ new Map();
|
|
703
703
|
return e.forEach((e, n) => {
|
|
704
|
-
t.set(n,
|
|
704
|
+
t.set(n, H(e));
|
|
705
705
|
}), t;
|
|
706
706
|
}
|
|
707
707
|
if (e instanceof Set) {
|
|
708
708
|
let t = /* @__PURE__ */ new Set();
|
|
709
709
|
return e.forEach((e) => {
|
|
710
|
-
t.add(
|
|
710
|
+
t.add(H(e));
|
|
711
711
|
}), t;
|
|
712
712
|
}
|
|
713
713
|
let t = {};
|
|
714
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
714
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = H(e[n]));
|
|
715
715
|
return t;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function U(e, t) {
|
|
718
718
|
return t === e || t.startsWith(`${e}.`) || t.startsWith(`${e}[`);
|
|
719
719
|
}
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js
|
|
722
|
-
var
|
|
722
|
+
var W = (e) => {
|
|
723
723
|
if (!e.validators) return e.runValidation({
|
|
724
724
|
validators: [],
|
|
725
725
|
form: e.form
|
|
@@ -771,7 +771,7 @@ var G = (e) => {
|
|
|
771
771
|
};
|
|
772
772
|
//#endregion
|
|
773
773
|
//#region node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js
|
|
774
|
-
function
|
|
774
|
+
function bo(e, t) {
|
|
775
775
|
let n = /* @__PURE__ */ new Map();
|
|
776
776
|
for (let r of e) {
|
|
777
777
|
let e = r.path ?? [], i = t, a = "";
|
|
@@ -785,23 +785,23 @@ function vo(e, t) {
|
|
|
785
785
|
}
|
|
786
786
|
return Object.fromEntries(n);
|
|
787
787
|
}
|
|
788
|
-
var
|
|
789
|
-
let n =
|
|
788
|
+
var xo = (e, t) => {
|
|
789
|
+
let n = bo(e, t);
|
|
790
790
|
return {
|
|
791
791
|
form: n,
|
|
792
792
|
fields: n
|
|
793
793
|
};
|
|
794
|
-
},
|
|
794
|
+
}, G = {
|
|
795
795
|
validate({ value: e, validationSource: t }, n) {
|
|
796
796
|
let r = n["~standard"].validate(e);
|
|
797
797
|
if (r instanceof Promise) throw Error("async function passed to sync validator");
|
|
798
|
-
if (r.issues) return t === "field" ? r.issues :
|
|
798
|
+
if (r.issues) return t === "field" ? r.issues : xo(r.issues, e);
|
|
799
799
|
},
|
|
800
800
|
async validateAsync({ value: e, validationSource: t }, n) {
|
|
801
801
|
let r = await n["~standard"].validate(e);
|
|
802
|
-
if (r.issues) return t === "field" ? r.issues :
|
|
802
|
+
if (r.issues) return t === "field" ? r.issues : xo(r.issues, e);
|
|
803
803
|
}
|
|
804
|
-
},
|
|
804
|
+
}, So = (e) => !!e && "~standard" in e, K = {
|
|
805
805
|
isValidating: !1,
|
|
806
806
|
isTouched: !1,
|
|
807
807
|
isBlurred: !1,
|
|
@@ -814,9 +814,9 @@ var yo = (e, t) => {
|
|
|
814
814
|
errorSourceMap: {},
|
|
815
815
|
_arrayVersion: 0
|
|
816
816
|
};
|
|
817
|
-
function
|
|
817
|
+
function q(e) {
|
|
818
818
|
function t(t) {
|
|
819
|
-
let n = e.getFieldMeta(t) ??
|
|
819
|
+
let n = e.getFieldMeta(t) ?? K;
|
|
820
820
|
e.setFieldMeta(t, {
|
|
821
821
|
...n,
|
|
822
822
|
_arrayVersion: (n._arrayVersion || 0) + 1
|
|
@@ -883,7 +883,7 @@ function J(e) {
|
|
|
883
883
|
i ? e.setFieldMeta(t, i) : e.setFieldMeta(t, u());
|
|
884
884
|
});
|
|
885
885
|
}
|
|
886
|
-
let u = () =>
|
|
886
|
+
let u = () => K;
|
|
887
887
|
return {
|
|
888
888
|
bumpArrayVersion: t,
|
|
889
889
|
handleArrayMove: n,
|
|
@@ -894,7 +894,7 @@ function J(e) {
|
|
|
894
894
|
}
|
|
895
895
|
//#endregion
|
|
896
896
|
//#region node_modules/@tanstack/form-core/dist/esm/FormApi.js
|
|
897
|
-
function
|
|
897
|
+
function Co(e) {
|
|
898
898
|
return {
|
|
899
899
|
values: e.values ?? {},
|
|
900
900
|
errorMap: e.errorMap ?? {},
|
|
@@ -915,27 +915,27 @@ function xo(e) {
|
|
|
915
915
|
}
|
|
916
916
|
};
|
|
917
917
|
}
|
|
918
|
-
var
|
|
918
|
+
var wo = class {
|
|
919
919
|
constructor(e) {
|
|
920
920
|
this.options = {}, this.fieldInfo = {}, this.formGroupApis = /* @__PURE__ */ new Set(), this.mount = () => {
|
|
921
921
|
let e = this.store.subscribe(() => {
|
|
922
|
-
|
|
923
|
-
}), t =
|
|
924
|
-
e.payload.id === this._formId &&
|
|
922
|
+
yo(this);
|
|
923
|
+
}), t = j.on("request-form-state", (e) => {
|
|
924
|
+
e.payload.id === this._formId && j.emit("form-api", {
|
|
925
925
|
id: this._formId,
|
|
926
926
|
state: this.store.state,
|
|
927
927
|
options: this.options
|
|
928
928
|
});
|
|
929
|
-
}), n =
|
|
929
|
+
}), n = j.on("request-form-reset", (e) => {
|
|
930
930
|
e.payload.id === this._formId && this.reset();
|
|
931
|
-
}), r =
|
|
931
|
+
}), r = j.on("request-form-force-submit", (e) => {
|
|
932
932
|
e.payload.id === this._formId && (this._devtoolsSubmissionOverride = !0, this.handleSubmit(), this._devtoolsSubmissionOverride = !1);
|
|
933
933
|
}), i = () => {
|
|
934
|
-
r(), n(), t(), e.unsubscribe(),
|
|
934
|
+
r(), n(), t(), e.unsubscribe(), j.emit("form-unmounted", { id: this._formId });
|
|
935
935
|
};
|
|
936
936
|
this.options.listeners?.onMount?.({ formApi: this });
|
|
937
937
|
let { onMount: a } = this.options.validators || {};
|
|
938
|
-
return
|
|
938
|
+
return j.emit("form-api", {
|
|
939
939
|
id: this._formId,
|
|
940
940
|
state: this.store.state,
|
|
941
941
|
options: this.options
|
|
@@ -944,15 +944,15 @@ var So = class {
|
|
|
944
944
|
if (!e) return;
|
|
945
945
|
let t = this.options;
|
|
946
946
|
this.options = e;
|
|
947
|
-
let n = e.defaultValues && !
|
|
947
|
+
let n = e.defaultValues && !L(e.defaultValues, t.defaultValues) && !this.state.isTouched, r = !L(e.defaultState, t.defaultState) && !this.state.isTouched;
|
|
948
948
|
if (!(!n && !r)) {
|
|
949
|
-
if (
|
|
950
|
-
this.baseStore.setState(() =>
|
|
949
|
+
if (k(() => {
|
|
950
|
+
this.baseStore.setState(() => Co(Object.assign({}, this.state, r ? e.defaultState : {}, n ? { values: e.defaultValues } : {})));
|
|
951
951
|
}), n) {
|
|
952
|
-
let e =
|
|
952
|
+
let e = q(this);
|
|
953
953
|
for (let t of Object.keys(this.fieldInfo)) Array.isArray(this.getFieldValue(t)) && e.bumpArrayVersion(t);
|
|
954
954
|
}
|
|
955
|
-
|
|
955
|
+
j.emit("form-api", {
|
|
956
956
|
id: this._formId,
|
|
957
957
|
state: this.store.state,
|
|
958
958
|
options: this.options
|
|
@@ -966,8 +966,8 @@ var So = class {
|
|
|
966
966
|
}), this.baseStore.setState(() => {
|
|
967
967
|
let t = e ?? this.options.defaultValues ?? this.options.defaultState?.values;
|
|
968
968
|
return e || Object.values(this.fieldInfo).forEach((e) => {
|
|
969
|
-
e.instance && e.instance.options.defaultValue !== void 0 && (t =
|
|
970
|
-
}),
|
|
969
|
+
e.instance && e.instance.options.defaultValue !== void 0 && (t = P(t, e.instance.name, e.instance.options.defaultValue));
|
|
970
|
+
}), Co({
|
|
971
971
|
...this.options.defaultState,
|
|
972
972
|
values: t,
|
|
973
973
|
fieldMetaBase: r
|
|
@@ -975,7 +975,7 @@ var So = class {
|
|
|
975
975
|
});
|
|
976
976
|
}, this.validateAllFields = async (e) => {
|
|
977
977
|
let t = [];
|
|
978
|
-
return
|
|
978
|
+
return k(() => {
|
|
979
979
|
Object.values(this.fieldInfo).forEach((n) => {
|
|
980
980
|
if (!n.instance) return;
|
|
981
981
|
let r = n.instance;
|
|
@@ -992,7 +992,7 @@ var So = class {
|
|
|
992
992
|
let r = this.getFieldValue(e), i = Array.isArray(r) ? Math.max(r.length - 1, 0) : null, a = [`${e}[${t}]`];
|
|
993
993
|
for (let n = t + 1; n <= (i ?? 0); n++) a.push(`${e}[${n}]`);
|
|
994
994
|
let o = Object.keys(this.fieldInfo).filter((e) => a.some((t) => e.startsWith(t))), s = [];
|
|
995
|
-
return
|
|
995
|
+
return k(() => {
|
|
996
996
|
o.forEach((e) => {
|
|
997
997
|
s.push(Promise.resolve().then(() => this.validateField(e, n)));
|
|
998
998
|
});
|
|
@@ -1008,16 +1008,16 @@ var So = class {
|
|
|
1008
1008
|
isTouched: !0
|
|
1009
1009
|
})), n.validate(t);
|
|
1010
1010
|
}, this.validateSync = (e, t) => {
|
|
1011
|
-
let n =
|
|
1011
|
+
let n = F(e, {
|
|
1012
1012
|
...this.options,
|
|
1013
1013
|
form: this,
|
|
1014
1014
|
group: t?.group,
|
|
1015
|
-
validationLogic: this.options.validationLogic ||
|
|
1015
|
+
validationLogic: this.options.validationLogic || W
|
|
1016
1016
|
}), r = !1, i = {};
|
|
1017
|
-
return
|
|
1017
|
+
return k(() => {
|
|
1018
1018
|
for (let e of n) {
|
|
1019
1019
|
if (!e.validate) continue;
|
|
1020
|
-
let { formError: n, fieldErrors: a } =
|
|
1020
|
+
let { formError: n, fieldErrors: a } = J(this.runValidator({
|
|
1021
1021
|
validate: e.validate,
|
|
1022
1022
|
value: {
|
|
1023
1023
|
value: this.state.values,
|
|
@@ -1029,7 +1029,7 @@ var So = class {
|
|
|
1029
1029
|
t?.filterFieldNames && (s = new Set([...s].filter(t.filterFieldNames)));
|
|
1030
1030
|
for (let e of s) {
|
|
1031
1031
|
if (this.baseStore.state.fieldMetaBase[e] === void 0 && !a?.[e]) continue;
|
|
1032
|
-
let { errorMap: t, errorSourceMap: n } = this.getFieldMeta(e) ??
|
|
1032
|
+
let { errorMap: t, errorSourceMap: n } = this.getFieldMeta(e) ?? K, r = a?.[e], { newErrorValue: s, newSource: c } = go({
|
|
1033
1033
|
newFormValidatorError: r,
|
|
1034
1034
|
isPreviousErrorFromFormValidator: n?.[o] === "form",
|
|
1035
1035
|
previousErrorValue: t?.[o]
|
|
@@ -1037,7 +1037,7 @@ var So = class {
|
|
|
1037
1037
|
c === "form" && (i[e] = {
|
|
1038
1038
|
...i[e],
|
|
1039
1039
|
[o]: r
|
|
1040
|
-
}), t?.[o] !== s && this.setFieldMeta(e, (e =
|
|
1040
|
+
}), t?.[o] !== s && this.setFieldMeta(e, (e = K) => ({
|
|
1041
1041
|
...e,
|
|
1042
1042
|
errorMap: {
|
|
1043
1043
|
...e.errorMap,
|
|
@@ -1079,11 +1079,11 @@ var So = class {
|
|
|
1079
1079
|
fieldsErrorMap: i
|
|
1080
1080
|
};
|
|
1081
1081
|
}, this.validateAsync = async (e, t) => {
|
|
1082
|
-
let n =
|
|
1082
|
+
let n = I(e, {
|
|
1083
1083
|
...this.options,
|
|
1084
1084
|
form: this,
|
|
1085
1085
|
group: t?.group,
|
|
1086
|
-
validationLogic: this.options.validationLogic ||
|
|
1086
|
+
validationLogic: this.options.validationLogic || W
|
|
1087
1087
|
});
|
|
1088
1088
|
this.state.isFormValidating || this.baseStore.setState((e) => ({
|
|
1089
1089
|
...e,
|
|
@@ -1120,7 +1120,7 @@ var So = class {
|
|
|
1120
1120
|
} catch (e) {
|
|
1121
1121
|
r = e;
|
|
1122
1122
|
}
|
|
1123
|
-
let { formError: o, fieldErrors: s } =
|
|
1123
|
+
let { formError: o, fieldErrors: s } = J(r);
|
|
1124
1124
|
s && (i = i ? {
|
|
1125
1125
|
...i,
|
|
1126
1126
|
...s
|
|
@@ -1131,7 +1131,7 @@ var So = class {
|
|
|
1131
1131
|
if (this.baseStore.state.fieldMetaBase[e] === void 0) continue;
|
|
1132
1132
|
let t = this.getFieldMeta(e);
|
|
1133
1133
|
if (!t) continue;
|
|
1134
|
-
let { errorMap: n, errorSourceMap: r } = t, a = i?.[e], { newErrorValue: o, newSource: s } =
|
|
1134
|
+
let { errorMap: n, errorSourceMap: r } = t, a = i?.[e], { newErrorValue: o, newSource: s } = go({
|
|
1135
1135
|
newFormValidatorError: a,
|
|
1136
1136
|
isPreviousErrorFromFormValidator: r?.[c] === "form",
|
|
1137
1137
|
previousErrorValue: n?.[c]
|
|
@@ -1184,7 +1184,7 @@ var So = class {
|
|
|
1184
1184
|
isSubmitted: !1,
|
|
1185
1185
|
submissionAttempts: e.submissionAttempts + 1,
|
|
1186
1186
|
isSubmitSuccessful: !1
|
|
1187
|
-
})),
|
|
1187
|
+
})), k(() => {
|
|
1188
1188
|
Object.values(this.fieldInfo).forEach((e) => {
|
|
1189
1189
|
e.instance && (e.instance.store.state.meta.isTouched || e.instance.setMeta((e) => ({
|
|
1190
1190
|
...e,
|
|
@@ -1216,7 +1216,7 @@ var So = class {
|
|
|
1216
1216
|
value: this.state.values,
|
|
1217
1217
|
formApi: this,
|
|
1218
1218
|
meta: t
|
|
1219
|
-
}),
|
|
1219
|
+
}), j.emit("form-submission", {
|
|
1220
1220
|
id: this._formId,
|
|
1221
1221
|
submissionAttempt: this.state.submissionAttempts,
|
|
1222
1222
|
successful: !1,
|
|
@@ -1230,7 +1230,7 @@ var So = class {
|
|
|
1230
1230
|
value: this.state.values,
|
|
1231
1231
|
formApi: this,
|
|
1232
1232
|
meta: t
|
|
1233
|
-
}),
|
|
1233
|
+
}), j.emit("form-submission", {
|
|
1234
1234
|
id: this._formId,
|
|
1235
1235
|
submissionAttempt: this.state.submissionAttempts,
|
|
1236
1236
|
successful: !1,
|
|
@@ -1239,7 +1239,7 @@ var So = class {
|
|
|
1239
1239
|
});
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
|
-
|
|
1242
|
+
k(() => {
|
|
1243
1243
|
Object.values(this.fieldInfo).forEach((e) => {
|
|
1244
1244
|
e.instance?.triggerOnSubmitListener();
|
|
1245
1245
|
});
|
|
@@ -1252,12 +1252,12 @@ var So = class {
|
|
|
1252
1252
|
value: this.state.values,
|
|
1253
1253
|
formApi: this,
|
|
1254
1254
|
meta: t
|
|
1255
|
-
}),
|
|
1255
|
+
}), k(() => {
|
|
1256
1256
|
this.baseStore.setState((e) => ({
|
|
1257
1257
|
...e,
|
|
1258
1258
|
isSubmitted: !0,
|
|
1259
1259
|
isSubmitSuccessful: !0
|
|
1260
|
-
})),
|
|
1260
|
+
})), j.emit("form-submission", {
|
|
1261
1261
|
id: this._formId,
|
|
1262
1262
|
submissionAttempt: this.state.submissionAttempts,
|
|
1263
1263
|
successful: !0
|
|
@@ -1267,7 +1267,7 @@ var So = class {
|
|
|
1267
1267
|
throw this.baseStore.setState((e) => ({
|
|
1268
1268
|
...e,
|
|
1269
1269
|
isSubmitSuccessful: !1
|
|
1270
|
-
})),
|
|
1270
|
+
})), j.emit("form-submission", {
|
|
1271
1271
|
id: this._formId,
|
|
1272
1272
|
submissionAttempt: this.state.submissionAttempts,
|
|
1273
1273
|
successful: !1,
|
|
@@ -1275,7 +1275,7 @@ var So = class {
|
|
|
1275
1275
|
onError: e
|
|
1276
1276
|
}), n(), e;
|
|
1277
1277
|
}
|
|
1278
|
-
}, this.getFieldValue = (e) =>
|
|
1278
|
+
}, this.getFieldValue = (e) => N(this.state.values, e), this.getFieldMeta = (e) => this.state.fieldMeta[e], this.getFormGroupMeta = (e) => this.formGroupMetaDerived.state[e], this.getFieldInfo = (e) => this.fieldInfo[e] ||= {
|
|
1279
1279
|
instance: null,
|
|
1280
1280
|
validationMetaMap: {
|
|
1281
1281
|
onChange: void 0,
|
|
@@ -1290,15 +1290,15 @@ var So = class {
|
|
|
1290
1290
|
...n,
|
|
1291
1291
|
fieldMetaBase: {
|
|
1292
1292
|
...n.fieldMetaBase,
|
|
1293
|
-
[e]:
|
|
1293
|
+
[e]: M(t, n.fieldMetaBase[e])
|
|
1294
1294
|
}
|
|
1295
1295
|
}));
|
|
1296
1296
|
}, this.resetFieldMeta = (e) => Object.keys(e).reduce((e, t) => {
|
|
1297
1297
|
let n = t;
|
|
1298
|
-
return e[n] =
|
|
1298
|
+
return e[n] = K, e;
|
|
1299
1299
|
}, {}), this.setFieldValue = (e, t, n) => {
|
|
1300
1300
|
let r = n?.dontUpdateMeta ?? !1, i = n?.dontRunListeners ?? !1, a = n?.dontValidate ?? !1;
|
|
1301
|
-
|
|
1301
|
+
k(() => {
|
|
1302
1302
|
r || this.setFieldMeta(e, (e) => ({
|
|
1303
1303
|
...e,
|
|
1304
1304
|
isTouched: !0,
|
|
@@ -1309,7 +1309,7 @@ var So = class {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
})), this.baseStore.setState((n) => ({
|
|
1311
1311
|
...n,
|
|
1312
|
-
values:
|
|
1312
|
+
values: P(n.values, e, t)
|
|
1313
1313
|
}));
|
|
1314
1314
|
}), i || this.getFieldInfo(e).instance?.triggerOnChangeListener(), a || this.validateField(e, "change");
|
|
1315
1315
|
}, this.deleteField = (e) => {
|
|
@@ -1320,24 +1320,24 @@ var So = class {
|
|
|
1320
1320
|
this.baseStore.setState((e) => {
|
|
1321
1321
|
let n = { ...e };
|
|
1322
1322
|
return t.forEach((e) => {
|
|
1323
|
-
n.values =
|
|
1323
|
+
n.values = ao(n.values, e), delete this.fieldInfo[e], delete n.fieldMetaBase[e];
|
|
1324
1324
|
}), n;
|
|
1325
1325
|
});
|
|
1326
1326
|
}, this.pushFieldValue = (e, t, n) => {
|
|
1327
|
-
this.setFieldValue(e, (e) => [...Array.isArray(e) ? e : [], t], n),
|
|
1327
|
+
this.setFieldValue(e, (e) => [...Array.isArray(e) ? e : [], t], n), q(this).bumpArrayVersion(e);
|
|
1328
1328
|
}, this.insertFieldValue = async (e, t, n, r) => {
|
|
1329
1329
|
this.setFieldValue(e, (e) => [
|
|
1330
1330
|
...e.slice(0, t),
|
|
1331
1331
|
n,
|
|
1332
1332
|
...e.slice(t)
|
|
1333
|
-
],
|
|
1333
|
+
], z(r, { dontValidate: !0 }));
|
|
1334
1334
|
let i = r?.dontValidate ?? !1;
|
|
1335
|
-
i || await this.validateField(e, "change"),
|
|
1335
|
+
i || await this.validateField(e, "change"), q(this).handleArrayInsert(e, t), i || await this.validateArrayFieldsStartingFrom(e, t, "change");
|
|
1336
1336
|
}, this.replaceFieldValue = async (e, t, n, r) => {
|
|
1337
|
-
this.setFieldValue(e, (e) => e.map((e, r) => r === t ? n : e),
|
|
1337
|
+
this.setFieldValue(e, (e) => e.map((e, r) => r === t ? n : e), z(r, { dontValidate: !0 })), q(this).bumpArrayVersion(e), (r?.dontValidate ?? !1) || (await this.validateField(e, "change"), await this.validateArrayFieldsStartingFrom(e, t, "change"));
|
|
1338
1338
|
}, this.removeFieldValue = async (e, t, n) => {
|
|
1339
1339
|
let r = this.getFieldValue(e), i = Array.isArray(r) ? Math.max(r.length - 1, 0) : null;
|
|
1340
|
-
if (this.setFieldValue(e, (e) => e.filter((e, n) => n !== t),
|
|
1340
|
+
if (this.setFieldValue(e, (e) => e.filter((e, n) => n !== t), z(n, { dontValidate: !0 })), q(this).handleArrayRemove(e, t), i !== null) {
|
|
1341
1341
|
let t = `${e}[${i}]`;
|
|
1342
1342
|
this.deleteField(t);
|
|
1343
1343
|
}
|
|
@@ -1345,38 +1345,38 @@ var So = class {
|
|
|
1345
1345
|
}, this.swapFieldValues = (e, t, n, r) => {
|
|
1346
1346
|
this.setFieldValue(e, (e) => {
|
|
1347
1347
|
let r = e[t], i = e[n];
|
|
1348
|
-
return
|
|
1349
|
-
},
|
|
1348
|
+
return P(P(e, `${t}`, i), `${n}`, r);
|
|
1349
|
+
}, z(r, { dontValidate: !0 })), q(this).handleArraySwap(e, t, n), (r?.dontValidate ?? !1) || (this.validateField(e, "change"), this.validateField(`${e}[${t}]`, "change"), this.validateField(`${e}[${n}]`, "change"));
|
|
1350
1350
|
}, this.moveFieldValues = (e, t, n, r) => {
|
|
1351
1351
|
this.setFieldValue(e, (e) => {
|
|
1352
1352
|
let r = [...e];
|
|
1353
1353
|
return r.splice(n, 0, r.splice(t, 1)[0]), r;
|
|
1354
|
-
},
|
|
1354
|
+
}, z(r, { dontValidate: !0 })), q(this).handleArrayMove(e, t, n), (r?.dontValidate ?? !1) || (this.validateField(e, "change"), this.validateField(`${e}[${t}]`, "change"), this.validateField(`${e}[${n}]`, "change"));
|
|
1355
1355
|
}, this.clearFieldValues = (e, t) => {
|
|
1356
1356
|
let n = this.getFieldValue(e), r = Array.isArray(n) ? Math.max(n.length - 1, 0) : null;
|
|
1357
|
-
if (this.setFieldValue(e, [],
|
|
1357
|
+
if (this.setFieldValue(e, [], z(t, { dontValidate: !0 })), q(this).bumpArrayVersion(e), r !== null) for (let t = 0; t <= r; t++) {
|
|
1358
1358
|
let n = `${e}[${t}]`;
|
|
1359
1359
|
this.deleteField(n);
|
|
1360
1360
|
}
|
|
1361
1361
|
(t?.dontValidate ?? !1) || this.validateField(e, "change");
|
|
1362
1362
|
}, this.resetField = (e) => {
|
|
1363
1363
|
this.baseStore.setState((t) => {
|
|
1364
|
-
let n = this.getFieldInfo(e).instance?.options.defaultValue, r =
|
|
1364
|
+
let n = this.getFieldInfo(e).instance?.options.defaultValue, r = N(this.options.defaultValues, e), i = n ?? r;
|
|
1365
1365
|
return {
|
|
1366
1366
|
...t,
|
|
1367
1367
|
fieldMetaBase: {
|
|
1368
1368
|
...t.fieldMetaBase,
|
|
1369
|
-
[e]:
|
|
1369
|
+
[e]: K
|
|
1370
1370
|
},
|
|
1371
|
-
values: i === void 0 ? t.values :
|
|
1371
|
+
values: i === void 0 ? t.values : P(t.values, e, i)
|
|
1372
1372
|
};
|
|
1373
1373
|
});
|
|
1374
1374
|
}, this.setErrorMap = (e) => {
|
|
1375
|
-
|
|
1375
|
+
k(() => {
|
|
1376
1376
|
Object.entries(e).forEach(([e, t]) => {
|
|
1377
1377
|
let n = e;
|
|
1378
|
-
if (
|
|
1379
|
-
let { formError: e, fieldErrors: r } =
|
|
1378
|
+
if (ho(t)) {
|
|
1379
|
+
let { formError: e, fieldErrors: r } = J(t);
|
|
1380
1380
|
for (let e of Object.keys(this.fieldInfo)) this.getFieldMeta(e) && this.setFieldMeta(e, (t) => ({
|
|
1381
1381
|
...t,
|
|
1382
1382
|
errorMap: {
|
|
@@ -1413,18 +1413,18 @@ var So = class {
|
|
|
1413
1413
|
errors: n.errors,
|
|
1414
1414
|
errorMap: n.errorMap
|
|
1415
1415
|
}), e), {})
|
|
1416
|
-
}), this.parseValuesWithSchema = (e) =>
|
|
1416
|
+
}), this.parseValuesWithSchema = (e) => G.validate({
|
|
1417
1417
|
value: this.state.values,
|
|
1418
1418
|
validationSource: "form"
|
|
1419
|
-
}, e), this.parseValuesWithSchemaAsync = (e) =>
|
|
1419
|
+
}, e), this.parseValuesWithSchemaAsync = (e) => G.validateAsync({
|
|
1420
1420
|
value: this.state.values,
|
|
1421
1421
|
validationSource: "form"
|
|
1422
1422
|
}, e), this.timeoutIds = {
|
|
1423
1423
|
validations: {},
|
|
1424
1424
|
listeners: {},
|
|
1425
1425
|
formListeners: {}
|
|
1426
|
-
}, this._formId = e?.formId ??
|
|
1427
|
-
let t =
|
|
1426
|
+
}, this._formId = e?.formId ?? vo(), this._devtoolsSubmissionOverride = !1;
|
|
1427
|
+
let t = Co({
|
|
1428
1428
|
...e?.defaultState,
|
|
1429
1429
|
values: e?.defaultValues ?? e?.defaultState?.values
|
|
1430
1430
|
});
|
|
@@ -1432,7 +1432,7 @@ var So = class {
|
|
|
1432
1432
|
t = e.transform({ state: t }).state;
|
|
1433
1433
|
for (let e of Object.keys(t.errorMap)) {
|
|
1434
1434
|
let n = t.errorMap[e];
|
|
1435
|
-
if (!(n === void 0 || !
|
|
1435
|
+
if (!(n === void 0 || !ho(n))) for (let r of Object.keys(n.fields)) {
|
|
1436
1436
|
let i = n.fields[r];
|
|
1437
1437
|
if (i === void 0) continue;
|
|
1438
1438
|
let a = t.fieldMetaBase[r];
|
|
@@ -1455,18 +1455,18 @@ var So = class {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
|
-
this.baseStore =
|
|
1458
|
+
this.baseStore = A(t);
|
|
1459
1459
|
let n;
|
|
1460
|
-
this.fieldMetaDerived =
|
|
1460
|
+
this.fieldMetaDerived = A((e) => {
|
|
1461
1461
|
let t = this.baseStore.get(), r = 0, i = {};
|
|
1462
1462
|
for (let a of Object.keys(t.fieldMetaBase)) {
|
|
1463
|
-
let o = t.fieldMetaBase[a], s = n?.fieldMetaBase[a], c = e?.[a], l =
|
|
1463
|
+
let o = t.fieldMetaBase[a], s = n?.fieldMetaBase[a], c = e?.[a], l = N(t.values, a), u = c?.errors;
|
|
1464
1464
|
if (!s || o.errorMap !== s.errorMap) {
|
|
1465
1465
|
u = Object.values(o.errorMap ?? {}).filter((e) => e !== void 0);
|
|
1466
1466
|
let e = this.getFieldInfo(a)?.instance;
|
|
1467
1467
|
(!e || !e.options.disableErrorFlat) && (u = u.flat(1));
|
|
1468
1468
|
}
|
|
1469
|
-
let d = !
|
|
1469
|
+
let d = !mo(u), f = !o.isDirty, p = L(l, this.getFieldInfo(a)?.instance?.options.defaultValue ?? N(this.options.defaultValues, a));
|
|
1470
1470
|
if (c && c.isPristine === f && c.isValid === d && c.isDefaultValue === p && c.errors === u && o === s) {
|
|
1471
1471
|
i[a] = c, r++;
|
|
1472
1472
|
continue;
|
|
@@ -1480,7 +1480,7 @@ var So = class {
|
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
1482
|
return Object.keys(t.fieldMetaBase).length ? e && r === Object.keys(t.fieldMetaBase).length ? e : (n = this.baseStore.get(), i) : i;
|
|
1483
|
-
}), this.formGroupMetaDerived =
|
|
1483
|
+
}), this.formGroupMetaDerived = A((e) => {
|
|
1484
1484
|
let t = this.baseStore.get(), n = this.fieldMetaDerived.get(), r = {};
|
|
1485
1485
|
for (let i of this.formGroupApis) {
|
|
1486
1486
|
let a = i.name, o = t.formGroupStateBase[a] ?? {
|
|
@@ -1491,11 +1491,11 @@ var So = class {
|
|
|
1491
1491
|
isSubmitSuccessful: !1
|
|
1492
1492
|
}, s = n[a], c = !1, l = !0, u = !1, d = !1, f = !0, p = !1;
|
|
1493
1493
|
for (let e in n) {
|
|
1494
|
-
if (e === a || !
|
|
1494
|
+
if (e === a || !U(a, e)) continue;
|
|
1495
1495
|
let t = n[e];
|
|
1496
1496
|
t && (t.isValidating && (c = !0), t.isValid || (l = !1), t.isTouched && (u = !0), t.isBlurred && (d = !0), t.isDefaultValue || (f = !1), t.isDirty && (p = !0));
|
|
1497
1497
|
}
|
|
1498
|
-
let m = !p, h = !!c || o.isValidating, g = s?.errorMap ?? {}, _ = s?.errorSourceMap ?? {}, v = !!(g.onMount || Object.entries(n).some(([e, t]) => t && e !== a &&
|
|
1498
|
+
let m = !p, h = !!c || o.isValidating, g = s?.errorMap ?? {}, _ = s?.errorSourceMap ?? {}, v = !!(g.onMount || Object.entries(n).some(([e, t]) => t && e !== a && U(a, e) && t.errorMap.onMount)), y = e?.[a], b = y?.errors ?? [];
|
|
1499
1499
|
(!y || y.__srcErrorMap !== g) && (b = Object.values(g).reduce((e, t) => {
|
|
1500
1500
|
if (t === void 0) return e;
|
|
1501
1501
|
if (t && typeof t == "object" && "fields" in t) {
|
|
@@ -1536,11 +1536,11 @@ var So = class {
|
|
|
1536
1536
|
return r;
|
|
1537
1537
|
});
|
|
1538
1538
|
let r;
|
|
1539
|
-
this.store =
|
|
1539
|
+
this.store = A((e) => {
|
|
1540
1540
|
let t = this.baseStore.get(), n = this.fieldMetaDerived.get(), i = Object.values(n).filter(Boolean), a = i.some((e) => e.isValidating), o = i.every((e) => e.isValid), s = i.some((e) => e.isTouched), c = i.some((e) => e.isBlurred), l = i.every((e) => e.isDefaultValue), u = s && t.errorMap?.onMount, d = i.some((e) => e.isDirty), f = !d, p = !!(t.errorMap?.onMount || i.some((e) => e?.errorMap?.onMount)), m = !!a, h = e?.errors ?? [];
|
|
1541
|
-
(!r || t.errorMap !== r.errorMap) && (h = Object.values(t.errorMap).reduce((e, t) => t === void 0 ? e : t &&
|
|
1541
|
+
(!r || t.errorMap !== r.errorMap) && (h = Object.values(t.errorMap).reduce((e, t) => t === void 0 ? e : t && ho(t) ? (e.push(t.form), e) : (e.push(t), e), []));
|
|
1542
1542
|
let g = h.length === 0, _ = o && g, v = this.options.canSubmitWhenInvalid ?? !1, y = t.submissionAttempts === 0 && !s && !p || !m && !t.isSubmitting && _ || v, b = t.errorMap;
|
|
1543
|
-
if (u && (h = h.filter((e) => e !== t.errorMap.onMount), b = Object.assign(b, { onMount: void 0 })), e && r && e.errorMap === b && e.fieldMeta === this.fieldMetaDerived.state && e.errors === h && e.isFieldsValidating === a && e.isFieldsValid === o && e.isFormValid === g && e.isValid === _ && e.canSubmit === y && e.isTouched === s && e.isBlurred === c && e.isPristine === f && e.isDefaultValue === l && e.isDirty === d &&
|
|
1543
|
+
if (u && (h = h.filter((e) => e !== t.errorMap.onMount), b = Object.assign(b, { onMount: void 0 })), e && r && e.errorMap === b && e.fieldMeta === this.fieldMetaDerived.state && e.errors === h && e.isFieldsValidating === a && e.isFieldsValid === o && e.isFormValid === g && e.isValid === _ && e.canSubmit === y && e.isTouched === s && e.isBlurred === c && e.isPristine === f && e.isDefaultValue === l && e.isDirty === d && L(r, t)) return e;
|
|
1544
1544
|
let x = {
|
|
1545
1545
|
...t,
|
|
1546
1546
|
errorMap: b,
|
|
@@ -1567,15 +1567,15 @@ var So = class {
|
|
|
1567
1567
|
return this._formId;
|
|
1568
1568
|
}
|
|
1569
1569
|
runValidator(e) {
|
|
1570
|
-
return
|
|
1570
|
+
return So(e.validate) ? G[e.type](e.value, e.validate) : e.validate(e.value);
|
|
1571
1571
|
}
|
|
1572
1572
|
handleSubmit(e) {
|
|
1573
1573
|
return this._handleSubmit(e);
|
|
1574
1574
|
}
|
|
1575
1575
|
};
|
|
1576
|
-
function
|
|
1577
|
-
return e ?
|
|
1578
|
-
formError:
|
|
1576
|
+
function J(e) {
|
|
1577
|
+
return e ? ho(e) ? {
|
|
1578
|
+
formError: J(e.form).formError,
|
|
1579
1579
|
fieldErrors: e.fields
|
|
1580
1580
|
} : { formError: e } : { formError: void 0 };
|
|
1581
1581
|
}
|
|
@@ -1591,7 +1591,7 @@ function Y(e) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
//#endregion
|
|
1593
1593
|
//#region node_modules/@tanstack/form-core/dist/esm/FieldApi.js
|
|
1594
|
-
var
|
|
1594
|
+
var To = class e {
|
|
1595
1595
|
constructor(t) {
|
|
1596
1596
|
this.options = {}, this.mount = () => {
|
|
1597
1597
|
this.options.defaultValue !== void 0 && !this.getMeta().isTouched && this.form.setFieldValue(this.name, this.options.defaultValue, { dontUpdateMeta: !0 });
|
|
@@ -1635,10 +1635,10 @@ var wo = class e {
|
|
|
1635
1635
|
fieldMetaBase: {
|
|
1636
1636
|
...e.fieldMetaBase,
|
|
1637
1637
|
[this.name]: {
|
|
1638
|
-
...
|
|
1639
|
-
isTouched: e.fieldMetaBase[this.name]?.isTouched ??
|
|
1640
|
-
isBlurred: e.fieldMetaBase[this.name]?.isBlurred ??
|
|
1641
|
-
isDirty: e.fieldMetaBase[this.name]?.isDirty ??
|
|
1638
|
+
...K,
|
|
1639
|
+
isTouched: e.fieldMetaBase[this.name]?.isTouched ?? K.isTouched,
|
|
1640
|
+
isBlurred: e.fieldMetaBase[this.name]?.isBlurred ?? K.isBlurred,
|
|
1641
|
+
isDirty: e.fieldMetaBase[this.name]?.isDirty ?? K.isDirty
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
1644
|
})), e.instance = null, this.options.listeners?.onUnmount?.({
|
|
@@ -1651,30 +1651,30 @@ var wo = class e {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
};
|
|
1653
1653
|
}, this.update = (e) => {
|
|
1654
|
-
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (
|
|
1654
|
+
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (L(this.form.getFieldValue(this.name), e.defaultValue) || this.form.setFieldValue(this.name, e.defaultValue, {
|
|
1655
1655
|
dontUpdateMeta: !0,
|
|
1656
1656
|
dontValidate: !0,
|
|
1657
1657
|
dontRunListeners: !0
|
|
1658
1658
|
})), this.form.getFieldMeta(this.name) || this.form.setFieldMeta(this.name, this.state.meta);
|
|
1659
1659
|
}, this.getValue = () => this.form.getFieldValue(this.name), this.setValue = (e, t) => {
|
|
1660
|
-
this.form.setFieldValue(this.name, e,
|
|
1660
|
+
this.form.setFieldValue(this.name, e, z(t, {
|
|
1661
1661
|
dontRunListeners: !0,
|
|
1662
1662
|
dontValidate: !0
|
|
1663
1663
|
})), t?.dontRunListeners || this.triggerOnChangeListener(), t?.dontValidate || this.validate("change");
|
|
1664
1664
|
}, this.getMeta = () => this.store.state.meta, this.setMeta = (e) => this.form.setFieldMeta(this.name, e), this.getInfo = () => this.form.getFieldInfo(this.name), this.pushValue = (e, t) => {
|
|
1665
|
-
this.form.pushFieldValue(this.name, e,
|
|
1665
|
+
this.form.pushFieldValue(this.name, e, z(t, { dontRunListeners: !0 })), t?.dontRunListeners || this.triggerOnChangeListener();
|
|
1666
1666
|
}, this.insertValue = (e, t, n) => {
|
|
1667
|
-
this.form.insertFieldValue(this.name, e, t,
|
|
1667
|
+
this.form.insertFieldValue(this.name, e, t, z(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
1668
1668
|
}, this.replaceValue = (e, t, n) => {
|
|
1669
|
-
this.form.replaceFieldValue(this.name, e, t,
|
|
1669
|
+
this.form.replaceFieldValue(this.name, e, t, z(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
1670
1670
|
}, this.removeValue = (e, t) => {
|
|
1671
|
-
this.form.removeFieldValue(this.name, e,
|
|
1671
|
+
this.form.removeFieldValue(this.name, e, z(t, { dontRunListeners: !0 })), t?.dontRunListeners || this.triggerOnChangeListener();
|
|
1672
1672
|
}, this.swapValues = (e, t, n) => {
|
|
1673
|
-
this.form.swapFieldValues(this.name, e, t,
|
|
1673
|
+
this.form.swapFieldValues(this.name, e, t, z(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
1674
1674
|
}, this.moveValue = (e, t, n) => {
|
|
1675
|
-
this.form.moveFieldValues(this.name, e, t,
|
|
1675
|
+
this.form.moveFieldValues(this.name, e, t, z(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
1676
1676
|
}, this.clearValues = (e) => {
|
|
1677
|
-
this.form.clearFieldValues(this.name,
|
|
1677
|
+
this.form.clearFieldValues(this.name, z(e, { dontRunListeners: !0 })), e?.dontRunListeners || this.triggerOnChangeListener();
|
|
1678
1678
|
}, this.getLinkedFields = (t) => {
|
|
1679
1679
|
let n = Object.values(this.form.fieldInfo), r = [];
|
|
1680
1680
|
for (let i of n) {
|
|
@@ -1684,25 +1684,25 @@ var wo = class e {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
return r;
|
|
1686
1686
|
}, this.validateSync = (e, t) => {
|
|
1687
|
-
let n =
|
|
1687
|
+
let n = F(e, {
|
|
1688
1688
|
...this.options,
|
|
1689
1689
|
form: this.form,
|
|
1690
1690
|
fieldName: this.name,
|
|
1691
|
-
validationLogic: this.form.options.validationLogic ||
|
|
1691
|
+
validationLogic: this.form.options.validationLogic || W
|
|
1692
1692
|
}), r = this.getLinkedFields(e).reduce((t, n) => {
|
|
1693
|
-
let r =
|
|
1693
|
+
let r = F(e, {
|
|
1694
1694
|
...n.options,
|
|
1695
1695
|
form: n.form,
|
|
1696
1696
|
fieldName: n.name,
|
|
1697
|
-
validationLogic: n.form.options.validationLogic ||
|
|
1697
|
+
validationLogic: n.form.options.validationLogic || W
|
|
1698
1698
|
});
|
|
1699
1699
|
return r.forEach((e) => {
|
|
1700
1700
|
e.field = n;
|
|
1701
1701
|
}), t.concat(r);
|
|
1702
1702
|
}, []), i = !1;
|
|
1703
|
-
|
|
1703
|
+
k(() => {
|
|
1704
1704
|
let e = (e, n) => {
|
|
1705
|
-
let r = X(n.cause), a = n.validate ?
|
|
1705
|
+
let r = X(n.cause), a = n.validate ? Eo(e.runValidator({
|
|
1706
1706
|
validate: n.validate,
|
|
1707
1707
|
value: {
|
|
1708
1708
|
value: e.store.state.value,
|
|
@@ -1710,7 +1710,7 @@ var wo = class e {
|
|
|
1710
1710
|
fieldApi: e
|
|
1711
1711
|
},
|
|
1712
1712
|
type: "validate"
|
|
1713
|
-
})) : void 0, o = t[r], { newErrorValue: s, newSource: c } =
|
|
1713
|
+
})) : void 0, o = t[r], { newErrorValue: s, newSource: c } = R({
|
|
1714
1714
|
formLevelError: o,
|
|
1715
1715
|
fieldLevelError: a
|
|
1716
1716
|
});
|
|
@@ -1742,17 +1742,17 @@ var wo = class e {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
})), { hasErrored: i };
|
|
1744
1744
|
}, this.validateAsync = async (e, t) => {
|
|
1745
|
-
let n =
|
|
1745
|
+
let n = I(e, {
|
|
1746
1746
|
...this.options,
|
|
1747
1747
|
form: this.form,
|
|
1748
1748
|
fieldName: this.name,
|
|
1749
|
-
validationLogic: this.form.options.validationLogic ||
|
|
1749
|
+
validationLogic: this.form.options.validationLogic || W
|
|
1750
1750
|
}), r = await t, i = this.getLinkedFields(e), a = i.reduce((t, n) => {
|
|
1751
|
-
let r =
|
|
1751
|
+
let r = I(e, {
|
|
1752
1752
|
...n.options,
|
|
1753
1753
|
form: n.form,
|
|
1754
1754
|
fieldName: n.name,
|
|
1755
|
-
validationLogic: n.form.options.validationLogic ||
|
|
1755
|
+
validationLogic: n.form.options.validationLogic || W
|
|
1756
1756
|
});
|
|
1757
1757
|
return r.forEach((e) => {
|
|
1758
1758
|
e.field = n;
|
|
@@ -1798,7 +1798,7 @@ var wo = class e {
|
|
|
1798
1798
|
a = e;
|
|
1799
1799
|
}
|
|
1800
1800
|
if (o.signal.aborted) return n(void 0);
|
|
1801
|
-
let s =
|
|
1801
|
+
let s = Eo(a), c = r[e.name]?.[i], { newErrorValue: l, newSource: u } = R({
|
|
1802
1802
|
formLevelError: c,
|
|
1803
1803
|
fieldLevelError: s
|
|
1804
1804
|
});
|
|
@@ -1838,7 +1838,7 @@ var wo = class e {
|
|
|
1838
1838
|
let { fieldsErrorMap: n } = this.form.validateSync(e, {
|
|
1839
1839
|
group: t,
|
|
1840
1840
|
dontUpdateFormErrorMap: !0,
|
|
1841
|
-
filterFieldNames: (e) =>
|
|
1841
|
+
filterFieldNames: (e) => U(t.name, e)
|
|
1842
1842
|
});
|
|
1843
1843
|
r = {
|
|
1844
1844
|
...r,
|
|
@@ -1877,10 +1877,10 @@ var wo = class e {
|
|
|
1877
1877
|
...e
|
|
1878
1878
|
}
|
|
1879
1879
|
}));
|
|
1880
|
-
}, this.parseValueWithSchema = (e) =>
|
|
1880
|
+
}, this.parseValueWithSchema = (e) => G.validate({
|
|
1881
1881
|
value: this.state.value,
|
|
1882
1882
|
validationSource: "field"
|
|
1883
|
-
}, e), this.parseValueWithSchemaAsync = (e) =>
|
|
1883
|
+
}, e), this.parseValueWithSchemaAsync = (e) => G.validateAsync({
|
|
1884
1884
|
value: this.state.value,
|
|
1885
1885
|
validationSource: "field"
|
|
1886
1886
|
}, e), this.triggerOnBlurListener = () => {
|
|
@@ -1925,7 +1925,7 @@ var wo = class e {
|
|
|
1925
1925
|
value: this.state.value,
|
|
1926
1926
|
fieldApi: this
|
|
1927
1927
|
});
|
|
1928
|
-
for (let e of this.form.formGroupApis)
|
|
1928
|
+
for (let e of this.form.formGroupApis) U(e.name, this.name) && e.triggerOnChangeListener();
|
|
1929
1929
|
}, this.triggerOnSubmitListener = () => {
|
|
1930
1930
|
this.options.listeners?.onSubmit?.({
|
|
1931
1931
|
value: this.state.value,
|
|
@@ -1935,13 +1935,13 @@ var wo = class e {
|
|
|
1935
1935
|
validations: {},
|
|
1936
1936
|
listeners: {},
|
|
1937
1937
|
formListeners: {}
|
|
1938
|
-
}, this.store =
|
|
1938
|
+
}, this.store = A((e) => {
|
|
1939
1939
|
this.form.store.get();
|
|
1940
1940
|
let n = this.form.getFieldMeta(this.name) ?? {
|
|
1941
|
-
...
|
|
1941
|
+
...K,
|
|
1942
1942
|
...t.defaultMeta
|
|
1943
1943
|
}, r = this.form.getFieldValue(this.name);
|
|
1944
|
-
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !
|
|
1944
|
+
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !L(r, this.options.defaultValue) && (r = this.options.defaultValue), e && e.value === r && e.meta === n ? e : {
|
|
1945
1945
|
value: r,
|
|
1946
1946
|
meta: n
|
|
1947
1947
|
};
|
|
@@ -1951,10 +1951,10 @@ var wo = class e {
|
|
|
1951
1951
|
return this.store.state;
|
|
1952
1952
|
}
|
|
1953
1953
|
runValidator(e) {
|
|
1954
|
-
return
|
|
1954
|
+
return So(e.validate) ? G[e.type](e.value, e.validate) : e.validate(e.value);
|
|
1955
1955
|
}
|
|
1956
1956
|
};
|
|
1957
|
-
function
|
|
1957
|
+
function Eo(e) {
|
|
1958
1958
|
if (e) return e;
|
|
1959
1959
|
}
|
|
1960
1960
|
function X(e) {
|
|
@@ -1969,7 +1969,7 @@ function X(e) {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
//#endregion
|
|
1971
1971
|
//#region node_modules/@tanstack/form-core/dist/esm/FormGroupApi.js
|
|
1972
|
-
function
|
|
1972
|
+
function Do(e) {
|
|
1973
1973
|
return {
|
|
1974
1974
|
isSubmitted: e.isSubmitted ?? !1,
|
|
1975
1975
|
isSubmitting: e.isSubmitting ?? !1,
|
|
@@ -1978,9 +1978,9 @@ function Eo(e) {
|
|
|
1978
1978
|
isSubmitSuccessful: e.isSubmitSuccessful ?? !1
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
1981
|
-
function
|
|
1981
|
+
function Oo(e) {
|
|
1982
1982
|
return {
|
|
1983
|
-
...
|
|
1983
|
+
...K,
|
|
1984
1984
|
...e,
|
|
1985
1985
|
errors: [],
|
|
1986
1986
|
isPristine: !0,
|
|
@@ -1997,11 +1997,11 @@ function Do(e) {
|
|
|
1997
1997
|
isSubmitSuccessful: !1
|
|
1998
1998
|
};
|
|
1999
1999
|
}
|
|
2000
|
-
var
|
|
2000
|
+
var ko = class e {
|
|
2001
2001
|
constructor(t) {
|
|
2002
2002
|
this.options = {}, this.setFormGroupState = (e) => {
|
|
2003
2003
|
this.form.baseStore.setState((t) => {
|
|
2004
|
-
let n = t.formGroupStateBase[this.name] ??
|
|
2004
|
+
let n = t.formGroupStateBase[this.name] ?? Do({});
|
|
2005
2005
|
return {
|
|
2006
2006
|
...t,
|
|
2007
2007
|
formGroupStateBase: {
|
|
@@ -2011,12 +2011,12 @@ var Oo = class e {
|
|
|
2011
2011
|
};
|
|
2012
2012
|
});
|
|
2013
2013
|
}, this._lastDistributedFieldNames = {}, this.update = (e) => {
|
|
2014
|
-
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (
|
|
2014
|
+
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (L(this.form.getFieldValue(this.name), e.defaultValue) || this.form.setFieldValue(this.name, e.defaultValue, {
|
|
2015
2015
|
dontUpdateMeta: !0,
|
|
2016
2016
|
dontValidate: !0,
|
|
2017
2017
|
dontRunListeners: !0
|
|
2018
2018
|
})), this.form.getFieldMeta(this.name) || this.form.setFieldMeta(this.name, {
|
|
2019
|
-
...
|
|
2019
|
+
...K,
|
|
2020
2020
|
...this.options.defaultMeta
|
|
2021
2021
|
});
|
|
2022
2022
|
}, this.mount = () => {
|
|
@@ -2024,7 +2024,7 @@ var Oo = class e {
|
|
|
2024
2024
|
...e,
|
|
2025
2025
|
formGroupStateBase: {
|
|
2026
2026
|
...e.formGroupStateBase,
|
|
2027
|
-
[this.name]: e.formGroupStateBase[this.name] ??
|
|
2027
|
+
[this.name]: e.formGroupStateBase[this.name] ?? Do({ ...this.options.defaultState })
|
|
2028
2028
|
}
|
|
2029
2029
|
}));
|
|
2030
2030
|
let { onMount: e } = this.options.validators || {};
|
|
@@ -2038,8 +2038,8 @@ var Oo = class e {
|
|
|
2038
2038
|
},
|
|
2039
2039
|
type: "validate"
|
|
2040
2040
|
}), n = t, r;
|
|
2041
|
-
|
|
2042
|
-
let i =
|
|
2041
|
+
jo(t) && (n = t.group, r = t.fields);
|
|
2042
|
+
let i = Ao(n);
|
|
2043
2043
|
i && this.setMeta((e) => ({
|
|
2044
2044
|
...e,
|
|
2045
2045
|
errorMap: {
|
|
@@ -2065,7 +2065,7 @@ var Oo = class e {
|
|
|
2065
2065
|
...e,
|
|
2066
2066
|
formGroupStateBase: {
|
|
2067
2067
|
...e.formGroupStateBase,
|
|
2068
|
-
[this.name]:
|
|
2068
|
+
[this.name]: Do({})
|
|
2069
2069
|
}
|
|
2070
2070
|
})), this.fieldInfo.instance = null, this.options.listeners?.onUnmount?.({
|
|
2071
2071
|
value: this.state.value,
|
|
@@ -2074,17 +2074,17 @@ var Oo = class e {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
};
|
|
2076
2076
|
}, this.setValue = (e, t) => {
|
|
2077
|
-
this.form.setFieldValue(this.name, e,
|
|
2077
|
+
this.form.setFieldValue(this.name, e, z(t, {
|
|
2078
2078
|
dontRunListeners: !0,
|
|
2079
2079
|
dontValidate: !0
|
|
2080
2080
|
})), t?.dontRunListeners || this.triggerOnChangeListener(), t?.dontValidate || this.validate("change");
|
|
2081
2081
|
}, this.getMeta = () => this.store.state.meta, this.setMeta = (e) => this.form.setFieldMeta(this.name, e), this.getInfo = () => this.fieldInfo, this.getRelatedFields = () => {
|
|
2082
2082
|
let e = Object.values(this.form.fieldInfo), t = [];
|
|
2083
|
-
for (let n of e) n.instance && n.instance instanceof
|
|
2083
|
+
for (let n of e) n.instance && n.instance instanceof To && n.instance.name.startsWith(this.name) && t.push(n.instance);
|
|
2084
2084
|
return t;
|
|
2085
2085
|
}, this.getRelatedFieldMetasDerived = () => {
|
|
2086
2086
|
let e = Object.entries(this.form.fieldMetaDerived.state), t = [];
|
|
2087
|
-
for (let [n, r] of e) n !== this.name &&
|
|
2087
|
+
for (let [n, r] of e) n !== this.name && U(this.name, n) && t.push({
|
|
2088
2088
|
...r,
|
|
2089
2089
|
name: n
|
|
2090
2090
|
});
|
|
@@ -2096,7 +2096,7 @@ var Oo = class e {
|
|
|
2096
2096
|
for (let n of i) {
|
|
2097
2097
|
let r = n.startsWith(this.name + "[") ? n.slice(this.name.length) : n.slice(this.name.length + 1), i = t?.[r], o = this.form.getFieldMeta(n);
|
|
2098
2098
|
if (!o && !i) continue;
|
|
2099
|
-
let s = o?.errorMap[e], { newErrorValue: c, newSource: l } =
|
|
2099
|
+
let s = o?.errorMap[e], { newErrorValue: c, newSource: l } = go({
|
|
2100
2100
|
newFormValidatorError: i,
|
|
2101
2101
|
isPreviousErrorFromFormValidator: o?.errorSourceMap[e] === "form",
|
|
2102
2102
|
previousErrorValue: s
|
|
@@ -2115,24 +2115,24 @@ var Oo = class e {
|
|
|
2115
2115
|
}
|
|
2116
2116
|
return this._lastDistributedFieldNames[e] = r, a;
|
|
2117
2117
|
}, this.validateSync = (t, n, r = {}) => {
|
|
2118
|
-
let i =
|
|
2118
|
+
let i = F(t, {
|
|
2119
2119
|
...this.options,
|
|
2120
2120
|
form: this.form,
|
|
2121
2121
|
group: this,
|
|
2122
|
-
validationLogic: this.options.validationLogic || this.form.options.validationLogic ||
|
|
2122
|
+
validationLogic: this.options.validationLogic || this.form.options.validationLogic || W
|
|
2123
2123
|
}), a = (r.skipRelatedFieldValidation ? [] : this.getRelatedFields()).reduce((e, n) => {
|
|
2124
|
-
let r =
|
|
2124
|
+
let r = F(t, {
|
|
2125
2125
|
...n.options,
|
|
2126
2126
|
form: n.form,
|
|
2127
|
-
validationLogic: n.form.options.validationLogic ||
|
|
2127
|
+
validationLogic: n.form.options.validationLogic || W
|
|
2128
2128
|
});
|
|
2129
2129
|
return r.forEach((e) => {
|
|
2130
2130
|
e.field = n;
|
|
2131
2131
|
}), e.concat(r);
|
|
2132
2132
|
}, []), o = !1;
|
|
2133
|
-
|
|
2133
|
+
k(() => {
|
|
2134
2134
|
let t = (t, r) => {
|
|
2135
|
-
let i =
|
|
2135
|
+
let i = No(r.cause), a = t === this, s;
|
|
2136
2136
|
r.validate && (s = t.runValidator({
|
|
2137
2137
|
validate: r.validate,
|
|
2138
2138
|
value: {
|
|
@@ -2143,8 +2143,8 @@ var Oo = class e {
|
|
|
2143
2143
|
type: "validate"
|
|
2144
2144
|
}));
|
|
2145
2145
|
let c = s, l;
|
|
2146
|
-
a &&
|
|
2147
|
-
let u =
|
|
2146
|
+
a && jo(s) && (c = s.group, l = s.fields);
|
|
2147
|
+
let u = Ao(c), d = n[i], { newErrorValue: f, newSource: p } = R({
|
|
2148
2148
|
formLevelError: d,
|
|
2149
2149
|
fieldLevelError: u
|
|
2150
2150
|
});
|
|
@@ -2163,7 +2163,7 @@ var Oo = class e {
|
|
|
2163
2163
|
for (let e of i) t(this, e);
|
|
2164
2164
|
for (let e of a) e.validate && t(e.field, e);
|
|
2165
2165
|
});
|
|
2166
|
-
let s =
|
|
2166
|
+
let s = No("submit");
|
|
2167
2167
|
return this.state.meta.errorMap?.[s] && t !== "submit" && !o && this.setMeta((e) => ({
|
|
2168
2168
|
...e,
|
|
2169
2169
|
errorMap: {
|
|
@@ -2176,16 +2176,16 @@ var Oo = class e {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
})), { hasErrored: o };
|
|
2178
2178
|
}, this.validateAsync = async (t, n, r = {}) => {
|
|
2179
|
-
let i =
|
|
2179
|
+
let i = I(t, {
|
|
2180
2180
|
...this.options,
|
|
2181
2181
|
form: this.form,
|
|
2182
2182
|
group: this,
|
|
2183
|
-
validationLogic: this.options.validationLogic || this.form.options.validationLogic ||
|
|
2183
|
+
validationLogic: this.options.validationLogic || this.form.options.validationLogic || W
|
|
2184
2184
|
}), a = await n, o = r.skipRelatedFieldValidation ? [] : this.getRelatedFields(), s = o.reduce((e, n) => {
|
|
2185
|
-
let r =
|
|
2185
|
+
let r = I(t, {
|
|
2186
2186
|
...n.options,
|
|
2187
2187
|
form: n.form,
|
|
2188
|
-
validationLogic: n.form.options.validationLogic ||
|
|
2188
|
+
validationLogic: n.form.options.validationLogic || W
|
|
2189
2189
|
});
|
|
2190
2190
|
return r.forEach((e) => {
|
|
2191
2191
|
e.field = n;
|
|
@@ -2202,7 +2202,7 @@ var Oo = class e {
|
|
|
2202
2202
|
}));
|
|
2203
2203
|
}
|
|
2204
2204
|
let d = (t, n, r) => {
|
|
2205
|
-
let i =
|
|
2205
|
+
let i = No(n.cause), o = t.getInfo();
|
|
2206
2206
|
o.validationMetaMap[i]?.lastAbortController.abort();
|
|
2207
2207
|
let s = new AbortController();
|
|
2208
2208
|
o.validationMetaMap[i] = { lastAbortController: s };
|
|
@@ -2234,8 +2234,8 @@ var Oo = class e {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
if (s.signal.aborted) return r(void 0);
|
|
2236
2236
|
let l = o, u;
|
|
2237
|
-
c &&
|
|
2238
|
-
let d =
|
|
2237
|
+
c && jo(o) && (l = o.group, u = o.fields);
|
|
2238
|
+
let d = Ao(l), f = a[t.name]?.[i], { newErrorValue: p, newSource: m } = R({
|
|
2239
2239
|
formLevelError: f,
|
|
2240
2240
|
fieldLevelError: d
|
|
2241
2241
|
});
|
|
@@ -2269,7 +2269,7 @@ var Oo = class e {
|
|
|
2269
2269
|
return f.filter(Boolean);
|
|
2270
2270
|
}, this.validateAllFields = async (e) => {
|
|
2271
2271
|
let t = [];
|
|
2272
|
-
return
|
|
2272
|
+
return k(() => {
|
|
2273
2273
|
Object.values(this.getRelatedFields()).forEach((n) => {
|
|
2274
2274
|
t.push(Promise.resolve().then(() => n.validate(e, {
|
|
2275
2275
|
skipFormValidation: !0,
|
|
@@ -2283,12 +2283,12 @@ var Oo = class e {
|
|
|
2283
2283
|
}, this.validateArrayFieldsStartingFrom = (e, t, n) => this.form.validateArrayFieldsStartingFrom(e, t, n), this.validateField = (e, t) => this.form.validateField(e, t), this.getFieldValue = (e) => this.form.getFieldValue(e), this.getFieldMeta = (e) => this.form.getFieldMeta(e), this.setFieldMeta = (e, t) => this.form.setFieldMeta(e, t), this.setFieldValue = (e, t) => this.form.setFieldValue(e, t), this.deleteField = (e) => this.form.deleteField(e), this.pushFieldValue = (e, t) => this.form.pushFieldValue(e, t), this.insertFieldValue = (e, t, n) => this.form.insertFieldValue(e, t, n), this.replaceFieldValue = (e, t, n) => this.form.replaceFieldValue(e, t, n), this.swapFieldValues = (e, t, n) => this.form.swapFieldValues(e, t, n), this.moveFieldValues = (e, t, n) => this.form.moveFieldValues(e, t, n), this.clearFieldValues = (e) => this.form.clearFieldValues(e), this.resetField = (e) => this.form.resetField(e), this.removeFieldValue = (e, t) => this.form.removeFieldValue(e, t), this.areRelatedFieldsValid = () => Object.values(this.getRelatedFields()).every((e) => e.state.meta.isValid), this.validate = (e, t) => {
|
|
2284
2284
|
let { fieldsErrorMap: n } = t?.skipFormValidation ? { fieldsErrorMap: {} } : this.form.validateSync(e, {
|
|
2285
2285
|
dontUpdateFormErrorMap: !0,
|
|
2286
|
-
filterFieldNames: (e) =>
|
|
2286
|
+
filterFieldNames: (e) => U(this.name, e)
|
|
2287
2287
|
}), { hasErrored: r } = this.validateSync(e, n[this.name] ?? {}, { skipRelatedFieldValidation: t?.skipRelatedFieldValidation });
|
|
2288
|
-
if (r && !this.options.asyncAlways) return this.getInfo().validationMetaMap[
|
|
2288
|
+
if (r && !this.options.asyncAlways) return this.getInfo().validationMetaMap[No(e)]?.lastAbortController.abort(), this.state.meta.errors;
|
|
2289
2289
|
let i = t?.skipFormValidation ? Promise.resolve({}) : this.form.validateAsync(e, {
|
|
2290
2290
|
dontUpdateFormErrorMap: !0,
|
|
2291
|
-
filterFieldNames: (e) =>
|
|
2291
|
+
filterFieldNames: (e) => U(this.name, e)
|
|
2292
2292
|
});
|
|
2293
2293
|
return this.validateAsync(e, i, { skipRelatedFieldValidation: t?.skipRelatedFieldValidation });
|
|
2294
2294
|
}, this.triggerOnChangeListener = () => {
|
|
@@ -2323,7 +2323,7 @@ var Oo = class e {
|
|
|
2323
2323
|
isSubmitted: !1,
|
|
2324
2324
|
submissionAttempts: e.submissionAttempts + 1,
|
|
2325
2325
|
isSubmitSuccessful: !1
|
|
2326
|
-
})),
|
|
2326
|
+
})), k(() => {
|
|
2327
2327
|
Object.values(this.getRelatedFields()).forEach((e) => {
|
|
2328
2328
|
e.state.meta.isTouched || e.setMeta((e) => ({
|
|
2329
2329
|
...e,
|
|
@@ -2358,7 +2358,7 @@ var Oo = class e {
|
|
|
2358
2358
|
});
|
|
2359
2359
|
return;
|
|
2360
2360
|
}
|
|
2361
|
-
|
|
2361
|
+
k(() => {
|
|
2362
2362
|
Object.values(this.getRelatedFields()).forEach((e) => {
|
|
2363
2363
|
e.options.listeners?.onGroupSubmit?.({
|
|
2364
2364
|
value: e.state.value,
|
|
@@ -2374,7 +2374,7 @@ var Oo = class e {
|
|
|
2374
2374
|
value: this.state.value,
|
|
2375
2375
|
groupApi: this,
|
|
2376
2376
|
meta: t
|
|
2377
|
-
}),
|
|
2377
|
+
}), k(() => {
|
|
2378
2378
|
this.setFormGroupState((e) => ({
|
|
2379
2379
|
...e,
|
|
2380
2380
|
isSubmitted: !0,
|
|
@@ -2401,10 +2401,10 @@ var Oo = class e {
|
|
|
2401
2401
|
onServer: void 0,
|
|
2402
2402
|
onDynamic: void 0
|
|
2403
2403
|
}
|
|
2404
|
-
}, this.store =
|
|
2404
|
+
}, this.store = A((e) => {
|
|
2405
2405
|
this.form.formGroupMetaDerived.get(), this.form.baseStore.get();
|
|
2406
|
-
let n = this.form.getFormGroupMeta(this.name) ??
|
|
2407
|
-
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !
|
|
2406
|
+
let n = this.form.getFormGroupMeta(this.name) ?? Oo(t.defaultMeta), r = this.form.getFieldValue(this.name);
|
|
2407
|
+
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !L(r, this.options.defaultValue) && (r = this.options.defaultValue), e && e.value === r && e.meta === n ? e : {
|
|
2408
2408
|
value: r,
|
|
2409
2409
|
meta: n
|
|
2410
2410
|
};
|
|
@@ -2414,9 +2414,9 @@ var Oo = class e {
|
|
|
2414
2414
|
return this.store.state;
|
|
2415
2415
|
}
|
|
2416
2416
|
runValidator(e) {
|
|
2417
|
-
if (
|
|
2418
|
-
let t =
|
|
2419
|
-
return e.type === "validate" ?
|
|
2417
|
+
if (So(e.validate)) {
|
|
2418
|
+
let t = G[e.type](e.value, e.validate);
|
|
2419
|
+
return e.type === "validate" ? Mo(t) : t.then(Mo);
|
|
2420
2420
|
}
|
|
2421
2421
|
return e.validate(e.value);
|
|
2422
2422
|
}
|
|
@@ -2424,13 +2424,13 @@ var Oo = class e {
|
|
|
2424
2424
|
return this._handleSubmit(e);
|
|
2425
2425
|
}
|
|
2426
2426
|
};
|
|
2427
|
-
function
|
|
2427
|
+
function Ao(e) {
|
|
2428
2428
|
if (e) return e;
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2430
|
+
function jo(e) {
|
|
2431
2431
|
return !!e && typeof e == "object" && "fields" in e;
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2433
|
+
function Mo(e) {
|
|
2434
2434
|
if (!e || typeof e != "object" || !("form" in e) && !("fields" in e)) return e;
|
|
2435
2435
|
let { form: t, fields: n, ...r } = e;
|
|
2436
2436
|
return {
|
|
@@ -2439,7 +2439,7 @@ function jo(e) {
|
|
|
2439
2439
|
fields: n
|
|
2440
2440
|
};
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2442
|
+
function No(e) {
|
|
2443
2443
|
switch (e) {
|
|
2444
2444
|
case "submit": return "onSubmit";
|
|
2445
2445
|
case "blur": return "onBlur";
|
|
@@ -2451,14 +2451,14 @@ function Mo(e) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
//#endregion
|
|
2453
2453
|
//#region node_modules/@tanstack/form-core/dist/esm/FieldGroupApi.js
|
|
2454
|
-
var
|
|
2454
|
+
var Po = class e {
|
|
2455
2455
|
constructor(t) {
|
|
2456
2456
|
if (this.getFormFieldName = (e) => {
|
|
2457
|
-
if (typeof this.fieldsMap == "string") return
|
|
2458
|
-
let t =
|
|
2457
|
+
if (typeof this.fieldsMap == "string") return po(this.fieldsMap, e);
|
|
2458
|
+
let t = fo(e)[0];
|
|
2459
2459
|
if (typeof t != "string") return "";
|
|
2460
2460
|
let n = e.slice(t.length), r = this.fieldsMap[t];
|
|
2461
|
-
return
|
|
2461
|
+
return po(r, n);
|
|
2462
2462
|
}, this.getFormFieldOptions = (e) => {
|
|
2463
2463
|
let t = { ...e }, n = t.validators;
|
|
2464
2464
|
if (t.name = this.getFormFieldName(e.name), n && (n.onChangeListenTo || n.onBlurListenTo)) {
|
|
@@ -2477,13 +2477,13 @@ var No = class e {
|
|
|
2477
2477
|
this.fieldsMap = n;
|
|
2478
2478
|
}
|
|
2479
2479
|
} else this.form = t.form, this.fieldsMap = t.fields;
|
|
2480
|
-
this.store =
|
|
2480
|
+
this.store = A(() => {
|
|
2481
2481
|
let e = this.form.store.get(), t;
|
|
2482
|
-
if (typeof this.fieldsMap == "string") t =
|
|
2482
|
+
if (typeof this.fieldsMap == "string") t = N(e.values, this.fieldsMap);
|
|
2483
2483
|
else {
|
|
2484
2484
|
t = {};
|
|
2485
2485
|
let n = this.fieldsMap;
|
|
2486
|
-
for (let r in n) t[r] =
|
|
2486
|
+
for (let r in n) t[r] = N(e.values, n[r]);
|
|
2487
2487
|
}
|
|
2488
2488
|
return { values: t };
|
|
2489
2489
|
});
|
|
@@ -2497,9 +2497,9 @@ var No = class e {
|
|
|
2497
2497
|
};
|
|
2498
2498
|
//#endregion
|
|
2499
2499
|
//#region node_modules/@tanstack/form-core/dist/esm/transform.js
|
|
2500
|
-
function
|
|
2500
|
+
function Fo(e, t) {
|
|
2501
2501
|
if (!t) return;
|
|
2502
|
-
let n = Object.assign({}, e, { state:
|
|
2502
|
+
let n = Object.assign({}, e, { state: H(e.state) });
|
|
2503
2503
|
t(n), n.fieldInfo !== e.fieldInfo && (e.fieldInfo = n.fieldInfo), n.options !== e.options && (e.options = n.options);
|
|
2504
2504
|
let r = Object.keys({
|
|
2505
2505
|
values: null,
|
|
@@ -2513,7 +2513,7 @@ function Po(e, t) {
|
|
|
2513
2513
|
isSubmitSuccessful: null,
|
|
2514
2514
|
_force_re_eval: null
|
|
2515
2515
|
}).reduce((t, r) => (e.state[r] !== n.state[r] && (t[r] = n.state[r]), t), {});
|
|
2516
|
-
return
|
|
2516
|
+
return k(() => {
|
|
2517
2517
|
Object.keys(r).length && e.baseStore.setState((e) => ({
|
|
2518
2518
|
...e,
|
|
2519
2519
|
...r
|
|
@@ -2522,27 +2522,27 @@ function Po(e, t) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
2524
2524
|
//#region node_modules/@tanstack/react-store/dist/useSelector.js
|
|
2525
|
-
function
|
|
2525
|
+
function Io(e, t) {
|
|
2526
2526
|
return e === t;
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2529
|
-
let r = n?.compare ??
|
|
2528
|
+
function Lo(e, t = (e) => e, n) {
|
|
2529
|
+
let r = n?.compare ?? Io, i = Aa((t) => {
|
|
2530
2530
|
let { unsubscribe: n } = e.subscribe(t);
|
|
2531
2531
|
return n;
|
|
2532
|
-
}, [e]), a =
|
|
2533
|
-
return
|
|
2532
|
+
}, [e]), a = Aa(() => e.get(), [e]);
|
|
2533
|
+
return Fa(i, a, a, t, r);
|
|
2534
2534
|
}
|
|
2535
2535
|
//#endregion
|
|
2536
2536
|
//#region node_modules/@tanstack/react-store/dist/useStore.js
|
|
2537
|
-
var Z = (e, t = (e) => e, n) =>
|
|
2537
|
+
var Z = (e, t = (e) => e, n) => Lo(e, t, { compare: n }), Q = typeof window < "u" ? Na : Ma;
|
|
2538
2538
|
//#endregion
|
|
2539
2539
|
//#region node_modules/@tanstack/react-form/dist/esm/useField.js
|
|
2540
|
-
function
|
|
2540
|
+
function Ro(e) {
|
|
2541
2541
|
let [t, n] = w(() => ({
|
|
2542
2542
|
form: e.form,
|
|
2543
2543
|
name: e.name
|
|
2544
|
-
})), [r, i] = w(() => new
|
|
2545
|
-
(t.form !== e.form || t.name !== e.name) && (i(new
|
|
2544
|
+
})), [r, i] = w(() => new To({ ...e }));
|
|
2545
|
+
(t.form !== e.form || t.name !== e.name) && (i(new To({ ...e })), n({
|
|
2546
2546
|
form: e.form,
|
|
2547
2547
|
name: e.name
|
|
2548
2548
|
}));
|
|
@@ -2579,26 +2579,26 @@ function Lo(e) {
|
|
|
2579
2579
|
r.update(e);
|
|
2580
2580
|
}), f;
|
|
2581
2581
|
}
|
|
2582
|
-
var
|
|
2583
|
-
let n =
|
|
2584
|
-
return /* @__PURE__ */ T(
|
|
2582
|
+
var zo = (({ children: e, ...t }) => {
|
|
2583
|
+
let n = Ro(t);
|
|
2584
|
+
return /* @__PURE__ */ T(Ia, { children: C(() => M(e, n), [e, n]) });
|
|
2585
2585
|
});
|
|
2586
2586
|
//#endregion
|
|
2587
2587
|
//#region node_modules/@tanstack/react-form/dist/esm/useUUID.js
|
|
2588
|
-
function
|
|
2589
|
-
return w(() =>
|
|
2588
|
+
function Bo() {
|
|
2589
|
+
return w(() => vo())[0];
|
|
2590
2590
|
}
|
|
2591
2591
|
//#endregion
|
|
2592
2592
|
//#region node_modules/@tanstack/react-form/dist/esm/useFormId.js
|
|
2593
|
-
var
|
|
2593
|
+
var Vo = Oa, Ho = Oa.version.split(".")[0] === "17" ? Bo : Vo.useId;
|
|
2594
2594
|
//#endregion
|
|
2595
2595
|
//#region node_modules/@tanstack/react-form/dist/esm/useFormGroup.js
|
|
2596
|
-
function
|
|
2596
|
+
function Uo(e) {
|
|
2597
2597
|
let [t, n] = w(() => ({
|
|
2598
2598
|
form: e.form,
|
|
2599
2599
|
name: e.name
|
|
2600
|
-
})), [r, i] = w(() => new
|
|
2601
|
-
(t.form !== e.form || t.name !== e.name) && (i(new
|
|
2600
|
+
})), [r, i] = w(() => new ko({ ...e }));
|
|
2601
|
+
(t.form !== e.form || t.name !== e.name) && (i(new ko({ ...e })), n({
|
|
2602
2602
|
form: e.form,
|
|
2603
2603
|
name: e.name
|
|
2604
2604
|
}));
|
|
@@ -2654,23 +2654,23 @@ function Ho(e) {
|
|
|
2654
2654
|
r.update(e);
|
|
2655
2655
|
}), x;
|
|
2656
2656
|
}
|
|
2657
|
-
var
|
|
2658
|
-
let n =
|
|
2659
|
-
return /* @__PURE__ */ T(
|
|
2657
|
+
var Wo = (({ children: e, ...t }) => {
|
|
2658
|
+
let n = Uo(t);
|
|
2659
|
+
return /* @__PURE__ */ T(Ia, { children: C(() => M(e, n), [e, n]) });
|
|
2660
2660
|
});
|
|
2661
2661
|
//#endregion
|
|
2662
2662
|
//#region node_modules/@tanstack/react-form/dist/esm/useForm.js
|
|
2663
|
-
function
|
|
2664
|
-
return /* @__PURE__ */ T(
|
|
2663
|
+
function Go({ form: e, selector: t = (e) => e, children: n }) {
|
|
2664
|
+
return /* @__PURE__ */ T(Ia, { children: M(n, Z(e.store, t)) });
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2667
|
-
let t =
|
|
2666
|
+
function Ko(e) {
|
|
2667
|
+
let t = Ho(), [n, r] = w(e?.formId), [i, a] = w(() => new wo({
|
|
2668
2668
|
...e,
|
|
2669
2669
|
formId: e?.formId ?? t
|
|
2670
2670
|
}));
|
|
2671
2671
|
if (n !== e?.formId) {
|
|
2672
2672
|
let n = e?.formId ?? t;
|
|
2673
|
-
a(new
|
|
2673
|
+
a(new wo({
|
|
2674
2674
|
...e,
|
|
2675
2675
|
formId: n
|
|
2676
2676
|
})), r(n);
|
|
@@ -2687,17 +2687,17 @@ function Go(e) {
|
|
|
2687
2687
|
}
|
|
2688
2688
|
};
|
|
2689
2689
|
return e.Field = function(e) {
|
|
2690
|
-
return /* @__PURE__ */ T(
|
|
2690
|
+
return /* @__PURE__ */ T(zo, {
|
|
2691
2691
|
...e,
|
|
2692
2692
|
form: i
|
|
2693
2693
|
});
|
|
2694
2694
|
}, e.FormGroup = function(e) {
|
|
2695
|
-
return /* @__PURE__ */ T(
|
|
2695
|
+
return /* @__PURE__ */ T(Wo, {
|
|
2696
2696
|
...e,
|
|
2697
2697
|
form: i
|
|
2698
2698
|
});
|
|
2699
2699
|
}, e.Subscribe = function(e) {
|
|
2700
|
-
return /* @__PURE__ */ T(
|
|
2700
|
+
return /* @__PURE__ */ T(Go, {
|
|
2701
2701
|
form: i,
|
|
2702
2702
|
selector: e.selector,
|
|
2703
2703
|
children: e.children
|
|
@@ -2707,21 +2707,21 @@ function Go(e) {
|
|
|
2707
2707
|
Q(i.mount, []), Q(() => {
|
|
2708
2708
|
i.update(e);
|
|
2709
2709
|
});
|
|
2710
|
-
let s =
|
|
2710
|
+
let s = Pa(!1);
|
|
2711
2711
|
return Q(() => {
|
|
2712
|
-
s.current && e?.transform &&
|
|
2712
|
+
s.current && e?.transform && Fo(i, e.transform);
|
|
2713
2713
|
}, [i, e?.transform]), Q(() => {
|
|
2714
2714
|
s.current = !0;
|
|
2715
2715
|
}), o;
|
|
2716
2716
|
}
|
|
2717
2717
|
//#endregion
|
|
2718
2718
|
//#region node_modules/@tanstack/react-form/dist/esm/useFieldGroup.js
|
|
2719
|
-
function
|
|
2720
|
-
return /* @__PURE__ */ T(
|
|
2719
|
+
function qo({ lens: e, selector: t = (e) => e, children: n }) {
|
|
2720
|
+
return /* @__PURE__ */ T(Ia, { children: M(n, Z(e.store, t)) });
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2722
|
+
function Jo(e) {
|
|
2723
2723
|
let [t] = w(() => {
|
|
2724
|
-
let n = new
|
|
2724
|
+
let n = new Po(e), r = e.form instanceof Po ? e.form.form : e.form, i = n;
|
|
2725
2725
|
return i.AppForm = function(e) {
|
|
2726
2726
|
return /* @__PURE__ */ T(r.AppForm, { ...e });
|
|
2727
2727
|
}, i.AppField = function(e) {
|
|
@@ -2729,7 +2729,7 @@ function qo(e) {
|
|
|
2729
2729
|
}, i.Field = function(e) {
|
|
2730
2730
|
return /* @__PURE__ */ T(r.Field, { ...t.getFormFieldOptions(e) });
|
|
2731
2731
|
}, i.Subscribe = function(e) {
|
|
2732
|
-
return /* @__PURE__ */ T(
|
|
2732
|
+
return /* @__PURE__ */ T(qo, {
|
|
2733
2733
|
lens: t,
|
|
2734
2734
|
selector: e.selector,
|
|
2735
2735
|
children: e.children
|
|
@@ -2740,28 +2740,28 @@ function qo(e) {
|
|
|
2740
2740
|
}
|
|
2741
2741
|
//#endregion
|
|
2742
2742
|
//#region node_modules/@tanstack/react-form/dist/esm/createFormHook.js
|
|
2743
|
-
var
|
|
2744
|
-
function
|
|
2745
|
-
let e =
|
|
2743
|
+
var Yo = ka(null), Xo = ka(null);
|
|
2744
|
+
function Zo() {
|
|
2745
|
+
let e = ja(Xo);
|
|
2746
2746
|
if (!e) throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");
|
|
2747
2747
|
return e;
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2749
|
+
function Qo() {
|
|
2750
2750
|
function e() {
|
|
2751
|
-
let e =
|
|
2751
|
+
let e = ja(Yo);
|
|
2752
2752
|
if (!e) throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");
|
|
2753
2753
|
return e;
|
|
2754
2754
|
}
|
|
2755
2755
|
return {
|
|
2756
|
-
fieldContext:
|
|
2756
|
+
fieldContext: Yo,
|
|
2757
2757
|
useFieldContext: e,
|
|
2758
|
-
useFormContext:
|
|
2759
|
-
formContext:
|
|
2758
|
+
useFormContext: Zo,
|
|
2759
|
+
formContext: Xo
|
|
2760
2760
|
};
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function $o({ fieldComponents: e, fieldContext: t, formContext: n, formComponents: r }) {
|
|
2763
2763
|
function i(i) {
|
|
2764
|
-
let a =
|
|
2764
|
+
let a = Ko(i), o = C(() => ({ children: e }) => /* @__PURE__ */ T(n.Provider, {
|
|
2765
2765
|
value: a,
|
|
2766
2766
|
children: e
|
|
2767
2767
|
}), [a]), s = C(() => (({ children: n, ...r }) => /* @__PURE__ */ T(a.Field, {
|
|
@@ -2791,7 +2791,7 @@ function Qo({ fieldComponents: e, fieldContext: t, formContext: n, formComponent
|
|
|
2791
2791
|
}
|
|
2792
2792
|
function o({ render: e, props: t, defaultValues: n }) {
|
|
2793
2793
|
return function(i) {
|
|
2794
|
-
let a =
|
|
2794
|
+
let a = Jo(C(() => ({
|
|
2795
2795
|
form: i.form,
|
|
2796
2796
|
fields: i.fields,
|
|
2797
2797
|
defaultValues: n,
|
|
@@ -2805,10 +2805,10 @@ function Qo({ fieldComponents: e, fieldContext: t, formContext: n, formComponent
|
|
|
2805
2805
|
};
|
|
2806
2806
|
}
|
|
2807
2807
|
function s(e) {
|
|
2808
|
-
return
|
|
2808
|
+
return Zo();
|
|
2809
2809
|
}
|
|
2810
2810
|
function c(i) {
|
|
2811
|
-
return
|
|
2811
|
+
return $o({
|
|
2812
2812
|
fieldContext: t,
|
|
2813
2813
|
formContext: n,
|
|
2814
2814
|
fieldComponents: {
|
|
@@ -2831,15 +2831,15 @@ function Qo({ fieldComponents: e, fieldContext: t, formContext: n, formComponent
|
|
|
2831
2831
|
}
|
|
2832
2832
|
//#endregion
|
|
2833
2833
|
//#region src/components/ui/form.tsx
|
|
2834
|
-
var { fieldContext:
|
|
2835
|
-
function
|
|
2834
|
+
var { fieldContext: es, formContext: ts, useFieldContext: $, useFormContext: ns } = Qo();
|
|
2835
|
+
function rs({ className: e, ...t }) {
|
|
2836
2836
|
return /* @__PURE__ */ T("div", {
|
|
2837
2837
|
"data-slot": "form-item",
|
|
2838
2838
|
className: u("flex flex-col gap-1.5", e),
|
|
2839
2839
|
...t
|
|
2840
2840
|
});
|
|
2841
2841
|
}
|
|
2842
|
-
function
|
|
2842
|
+
function is({ className: e, ...t }) {
|
|
2843
2843
|
let n = $(), r = Z(n.store, (e) => e.meta.errors);
|
|
2844
2844
|
return /* @__PURE__ */ T(S, {
|
|
2845
2845
|
"data-slot": "form-label",
|
|
@@ -2848,7 +2848,7 @@ function rs({ className: e, ...t }) {
|
|
|
2848
2848
|
...t
|
|
2849
2849
|
});
|
|
2850
2850
|
}
|
|
2851
|
-
function
|
|
2851
|
+
function as({ className: e, ...t }) {
|
|
2852
2852
|
let n = $(), r = Z(n.store, (e) => e.meta.errors), i = String(n.name);
|
|
2853
2853
|
return /* @__PURE__ */ T("div", {
|
|
2854
2854
|
"data-slot": "form-control",
|
|
@@ -2859,7 +2859,7 @@ function is({ className: e, ...t }) {
|
|
|
2859
2859
|
...t
|
|
2860
2860
|
});
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function os({ className: e, ...t }) {
|
|
2863
2863
|
let n = $();
|
|
2864
2864
|
return /* @__PURE__ */ T("p", {
|
|
2865
2865
|
"data-slot": "form-description",
|
|
@@ -2868,7 +2868,7 @@ function as({ className: e, ...t }) {
|
|
|
2868
2868
|
...t
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function ss({ className: e, children: t, ...n }) {
|
|
2872
2872
|
let r = $(), i = Z(r.store, (e) => e.meta.errors), a = t ?? (i.length > 0 ? i[0]?.message ?? String(i[0]) : null);
|
|
2873
2873
|
return a ? /* @__PURE__ */ T("p", {
|
|
2874
2874
|
"data-slot": "form-message",
|
|
@@ -2880,4 +2880,4 @@ function os({ className: e, children: t, ...n }) {
|
|
|
2880
2880
|
}) : null;
|
|
2881
2881
|
}
|
|
2882
2882
|
//#endregion
|
|
2883
|
-
export { br as Accordion, Qn as AccordionContent, Jn as AccordionItem, vn as AccordionTrigger, _e as Alert, Rn as AlertAction, Zr as AlertDescription, Zt as AlertDialog, Ye as AlertDialogAction, qt as AlertDialogCancel, tn as AlertDialogContent, Ge as AlertDialogDescription, st as AlertDialogFooter, Rr as AlertDialogHeader, rt as AlertDialogMedia, un as AlertDialogOverlay, on as AlertDialogPortal, mn as AlertDialogTitle, jt as AlertDialogTrigger, Cr as AlertProvider, Vr as AlertTitle, Pr as AspectRatio,
|
|
2883
|
+
export { br as Accordion, Qn as AccordionContent, Jn as AccordionItem, vn as AccordionTrigger, _e as Alert, Rn as AlertAction, Zr as AlertDescription, Zt as AlertDialog, Ye as AlertDialogAction, qt as AlertDialogCancel, tn as AlertDialogContent, Ge as AlertDialogDescription, st as AlertDialogFooter, Rr as AlertDialogHeader, rt as AlertDialogMedia, un as AlertDialogOverlay, on as AlertDialogPortal, mn as AlertDialogTitle, jt as AlertDialogTrigger, Cr as AlertProvider, Vr as AlertTitle, Pr as AspectRatio, La as Autocomplete, Wn as Avatar, ii as Badge, Ur as Breadcrumb, rr as BreadcrumbEllipsis, Cn as BreadcrumbItem, Ar as BreadcrumbLink, Jr as BreadcrumbList, Mn as BreadcrumbPage, gr as BreadcrumbSeparator, r as Button, At as ButtonGroup, ge as ButtonGroupSeparator, Bn as ButtonGroupText, Da as CCombobox, Fi as Calendar, Ri as CalendarDayButton, We as Card, ot as CardAction, Lr as CardContent, nt as CardDescription, ln as CardFooter, an as CardHeader, pn as CardTitle, Di as Carousel, la as CarouselContent, zi as CarouselItem, Bi as CarouselNext, Hi as CarouselPrevious, wa as ChartContainer, Ki as ChartLegend, ji as ChartLegendContent, Ai as ChartStyle, Vi as ChartTooltip, ua as ChartTooltipContent, en as Checkbox, Xt as Collapsible, Je as CollapsibleContent, Kt as CollapsibleTrigger, Wi as Combobox, Oi as ComboboxChip, Ji as ComboboxChips, Pi as ComboboxChipsInput, qi as ComboboxCollection, Yi as ComboboxContent, Ni as ComboboxEmpty, Li as ComboboxField, _a as ComboboxGroup, Ii as ComboboxInput, Zi as ComboboxItem, Xi as ComboboxLabel, Qi as ComboboxList, Ui as ComboboxSeparator, Ei as ComboboxStatus, ia as ComboboxTrigger, xa as ComboboxValue, sa as Command, oa as CommandDialog, $i as CommandEmpty, Ca as CommandGroup, Ea as CommandInput, ta as CommandItem, Ta as CommandList, Gi as CommandSeparator, ki as CommandShortcut, wi as ConfirmationDialogProvider, Ie as ContextMenu, Me as ContextMenuCheckboxItem, St as ContextMenuContent, ur as ContextMenuGroup, be as ContextMenuItem, or as ContextMenuLabel, mt as ContextMenuPortal, vt as ContextMenuRadioGroup, Et as ContextMenuRadioItem, Be as ContextMenuSeparator, Qe as ContextMenuShortcut, ut as ContextMenuSub, Pt as ContextMenuSubContent, Ci as ContextMenuSubTrigger, we as ContextMenuTrigger, s as DEFAULT_OPSFUSE_BRAND_THEME, de as DateFns, g as Dialog, re as DialogClose, ee as DialogContent, v as DialogDescription, _ as DialogFooter, d as DialogHeader, ce as DialogOverlay, ue as DialogPortal, p as DialogProvider, le as DialogTitle, l as DialogTrigger, di as DirectionProvider, ea as Drawer, ha as DrawerClose, ya as DrawerContent, na as DrawerDescription, da as DrawerFooter, Sa as DrawerHeader, ra as DrawerOverlay, aa as DrawerPortal, ga as DrawerTitle, fa as DrawerTrigger, Oe as DropdownMenu, Rt as Empty, Un as Field, Nr as FieldContent, yr as FieldDescription, Zn as FieldError, qn as FieldGroup, _n as FieldLabel, si as FieldLegend, yi as FieldSeparator, En as FieldSet, hi as FieldTitle, as as FormControl, os as FormDescription, rs as FormItem, is as FormLabel, ss as FormMessage, hr as HoverCard, ri as HoverCardContent, Fn as HoverCardTrigger, m as Input, oe as InputGroup, te as InputGroupAddon, ie as InputGroupButton, y as InputGroupInput, f as InputGroupText, ne as InputGroupTextarea, ba as InputOTP, pa as InputOTPGroup, va as InputOTPSeparator, ca as InputOTPSlot, Mt as Item, ve as ItemActions, zn as ItemContent, Qr as ItemDescription, wr as ItemFooter, Hr as ItemGroup, nr as ItemHeader, Sn as ItemMedia, kr as ItemSeparator, qr as ItemTitle, sn as Kbd, hn as KbdGroup, S as Label, pe as Lucide, Ot as Menubar, He as MenubarCheckboxItem, et as MenubarContent, ft as MenubarGroup, It as MenubarItem, Ti as MenubarLabel, Ee as MenubarMenu, Qt as MenubarPortal, Xe as MenubarRadioGroup, Jt as MenubarRadioItem, nn as MenubarSeparator, Ke as MenubarShortcut, ct as MenubarSub, zr as MenubarSubContent, it as MenubarSubTrigger, dn as MenubarTrigger, Wt as NavigationMenu, Re as NavigationMenuContent, Pe as NavigationMenuIndicator, wt as NavigationMenuItem, fr as NavigationMenuLink, Se as NavigationMenuList, cr as NavigationMenuTrigger, gt as NavigationMenuViewport, n as OPSFUSE_BRAND_THEMES, a as OPSFUSE_THEME_SCOPE, bi as OpsfuseRoot, Dn as OpsfuseThemeProvider, jn as PageHeader, li as Pagination, xi as PaginationContent, On as PaginationEllipsis, _i as PaginationItem, Bt as PaginationLink, Ae as PaginationNext, pi as PaginationPrevious, yn as PaginationWrapper, ai as Popover, Ln as PopoverAnchor, Gn as PopoverContent, Fr as PopoverDescription, xr as PopoverHeader, $n as PopoverTitle, Yn as PopoverTrigger, _r as Progress, Yr as RadioGroup, Nn as RadioGroupItem, me as Recharts, ni as RecruitSmartly, ir as ResizableHandle, wn as ResizablePanel, jr as ResizablePanelGroup, Ue as SSelect, ke as STooltip, Er as ScrollArea, Wr as ScrollBar, $t as Select, at as SelectContent, Ir as SelectField, tt as SelectGroup, cn as SelectItem, rn as SelectLabel, fn as SelectScrollDownButton, kt as SelectScrollUpButton, he as SelectSeparator, Vn as SelectTrigger, ei as SelectValue, Tr as Separator, dr as Sheet, xe as SheetClose, sr as SheetContent, ht as SheetDescription, yt as SheetFooter, Dt as SheetHeader, Ve as SheetProvider, $e as SheetTitle, dt as SheetTrigger, vi as Sidebar, Tn as SidebarContent, mi as SidebarFooter, Lt as SidebarGroup, De as SidebarGroupAction, ui as SidebarGroupContent, Vt as SidebarGroupLabel, Fe as SidebarHeader, je as SidebarInput, xt as SidebarInset, lr as SidebarMenu, ye as SidebarMenuAction, ar as SidebarMenuBadge, pt as SidebarMenuButton, _t as SidebarMenuItem, Tt as SidebarMenuSkeleton, ze as SidebarMenuSub, Ze as SidebarMenuSubButton, lt as SidebarMenuSubItem, Nt as SidebarProvider, Si as SidebarRail, Ce as SidebarSeparator, Yt as SidebarTrigger, Gt as Skeleton, mr as SkillReady, Le as Slider, Ne as SliderDialogProvider, c as Spinner, oi as Switch, ti as Table, Pn as TableBody, Hn as TableCaption, Mr as TableCell, vr as TableFooter, Xn as TableHead, Kn as TableHeader, gn as TableRow, Dr as Tabs, bn as TabsComponent, Gr as TabsContent, kn as TabsList, pr as TabsTrigger, An as TalentScan, ae as Textarea, se as Toaster, Br as Toggle, Xr as ToggleGroup, Sr as ToggleGroupItem, gi as Tooltip, zt as TooltipContent, fi as TooltipProvider, Ut as TooltipTrigger, Kr as Verity, Or as WorkLog, In as badgeVariants, $r as buttonGroupVariants, i as buttonVariants, u as cn, Te as confirm, $o as createFormHook, tr as dismissAlert, es as fieldContext, ts as formContext, o as mergeOpsfusePortalSurface, bt as navigationMenuTriggerStyle, t as openDialog, Ft as openSheet, Ct as openSlider, x as opsfuseBrandThemeClass, xn as showAlert, h as toast, er as toggleVariants, Mi as useCarousel, ma as useComboboxAnchor, Ht as useDirection, $ as useFieldContext, ns as useFormContext, ci as useIsMobile, e as useOpsfuseBrandTheme, b as useOpsfusePortalSurface, qe as useSidebar };
|