react-luminus-components 1.2.59 → 1.2.61
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/.vite/manifest.json +40 -40
- package/dist/{EventType-C7vqWxBE.cjs → EventType-Byay8qD5.cjs} +1 -1
- package/dist/{EventType-BITUq9bG.js → EventType-DM9aPn8E.js} +1 -1
- package/dist/{NoInputContainer-C_KMMuq-.cjs → NoInputContainer-BY_zQfe0.cjs} +1 -1
- package/dist/{NoInputContainer-vBsdl4By.js → NoInputContainer-DcILYvcy.js} +3 -3
- package/dist/{SimpleTooltip-CI4u4sEB.cjs → SimpleTooltip-Bo8CPxZ5.cjs} +1 -1
- package/dist/{SimpleTooltip-D_EP1VLp.js → SimpleTooltip-De7k8q9u.js} +1 -1
- package/dist/components/NewTabs/Tab/Tab.d.ts +2 -1
- package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +141 -141
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +713 -709
- package/dist/style.css +1 -1
- package/dist/{useConfirm-DeyXejs7.js → useConfirm-8eQTJUI8.js} +1 -1
- package/dist/{useConfirm-BiHp2Y6a.cjs → useConfirm-h5QGRHKF.cjs} +1 -1
- package/dist/{usePermissions-CJ08LAVC.js → usePermissions-DA73ldvK.js} +1 -1
- package/dist/{usePermissions-z6sqoYhg.cjs → usePermissions-YkxnvF8m.cjs} +1 -1
- package/package.json +1 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { N as Ye, a3 as Je, am as He } from "./NoInputContainer-
|
|
2
|
-
import { aF as hr, a8 as mr, aE as pr } from "./NoInputContainer-
|
|
3
|
-
import { a as _r, u as vr } from "./useConfirm-
|
|
1
|
+
import { N as Ye, a3 as Je, am as He } from "./NoInputContainer-DcILYvcy.js";
|
|
2
|
+
import { aF as hr, a8 as mr, aE as pr } from "./NoInputContainer-DcILYvcy.js";
|
|
3
|
+
import { a as _r, u as vr } from "./useConfirm-8eQTJUI8.js";
|
|
4
4
|
import { useContext as Ae, useRef as Ge, useState as Xe, useCallback as Ke, useEffect as Qe } from "react";
|
|
5
5
|
import { f as Fe } from "./textUtils-BbxuIsKq.js";
|
|
6
6
|
import { i as et } from "./dateUtils-Crak7ii9.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import { a as xr, b as br, u as kr } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
-
import { u as Tr } from "./usePermissions-
|
|
9
|
+
import { u as Tr } from "./usePermissions-DA73ldvK.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -138,10 +138,10 @@ class N extends Error {
|
|
|
138
138
|
else if (i.path.length === 0)
|
|
139
139
|
n._errors.push(t(i));
|
|
140
140
|
else {
|
|
141
|
-
let o = n,
|
|
142
|
-
for (;
|
|
143
|
-
const
|
|
144
|
-
|
|
141
|
+
let o = n, u = 0;
|
|
142
|
+
for (; u < i.path.length; ) {
|
|
143
|
+
const c = i.path[u];
|
|
144
|
+
u === i.path.length - 1 ? (o[c] = o[c] || { _errors: [] }, o[c]._errors.push(t(i))) : o[c] = o[c] || { _errors: [] }, o = o[c], u++;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
};
|
|
@@ -246,9 +246,9 @@ const _e = (r) => {
|
|
|
246
246
|
message: s.message
|
|
247
247
|
};
|
|
248
248
|
let o = "";
|
|
249
|
-
const
|
|
250
|
-
for (const
|
|
251
|
-
o =
|
|
249
|
+
const u = n.filter((c) => !!c).slice().reverse();
|
|
250
|
+
for (const c of u)
|
|
251
|
+
o = c(i, { data: e, defaultError: o }).message;
|
|
252
252
|
return {
|
|
253
253
|
...s,
|
|
254
254
|
path: a,
|
|
@@ -313,7 +313,7 @@ class Z {
|
|
|
313
313
|
}
|
|
314
314
|
const y = Object.freeze({
|
|
315
315
|
status: "aborted"
|
|
316
|
-
}), J = (r) => ({ status: "dirty", value: r }),
|
|
316
|
+
}), J = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Se = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
317
317
|
function ve(r, e, t, n) {
|
|
318
318
|
if (typeof e == "function" ? r !== e || !n : !e.has(r))
|
|
319
319
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -359,9 +359,9 @@ function _(r) {
|
|
|
359
359
|
if (e && (t || n))
|
|
360
360
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
361
361
|
return e ? { errorMap: e, description: s } : { errorMap: (i, o) => {
|
|
362
|
-
var
|
|
362
|
+
var u, c;
|
|
363
363
|
const { message: m } = r;
|
|
364
|
-
return i.code === "invalid_enum_value" ? { message: m ?? o.defaultError } : typeof o.data > "u" ? { message: (
|
|
364
|
+
return i.code === "invalid_enum_value" ? { message: m ?? o.defaultError } : typeof o.data > "u" ? { message: (u = m ?? n) !== null && u !== void 0 ? u : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = m ?? t) !== null && c !== void 0 ? c : o.defaultError };
|
|
365
365
|
}, description: s };
|
|
366
366
|
}
|
|
367
367
|
class v {
|
|
@@ -457,7 +457,7 @@ class v {
|
|
|
457
457
|
code: d.custom,
|
|
458
458
|
...n(s)
|
|
459
459
|
});
|
|
460
|
-
return typeof Promise < "u" && i instanceof Promise ? i.then((
|
|
460
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((u) => u ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
refinement(e, t) {
|
|
@@ -1238,7 +1238,7 @@ class re extends v {
|
|
|
1238
1238
|
received: n.parsedType
|
|
1239
1239
|
}), y;
|
|
1240
1240
|
}
|
|
1241
|
-
return
|
|
1241
|
+
return S(e.data);
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
1244
|
re.create = (r) => new re({
|
|
@@ -1334,7 +1334,7 @@ class ge extends v {
|
|
|
1334
1334
|
received: n.parsedType
|
|
1335
1335
|
}), y;
|
|
1336
1336
|
}
|
|
1337
|
-
return
|
|
1337
|
+
return S(e.data);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
ge.create = (r) => new ge({
|
|
@@ -1351,7 +1351,7 @@ class ne extends v {
|
|
|
1351
1351
|
received: n.parsedType
|
|
1352
1352
|
}), y;
|
|
1353
1353
|
}
|
|
1354
|
-
return
|
|
1354
|
+
return S(e.data);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
1357
|
ne.create = (r) => new ne({
|
|
@@ -1368,7 +1368,7 @@ class se extends v {
|
|
|
1368
1368
|
received: n.parsedType
|
|
1369
1369
|
}), y;
|
|
1370
1370
|
}
|
|
1371
|
-
return
|
|
1371
|
+
return S(e.data);
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
1374
|
se.create = (r) => new se({
|
|
@@ -1380,7 +1380,7 @@ class X extends v {
|
|
|
1380
1380
|
super(...arguments), this._any = !0;
|
|
1381
1381
|
}
|
|
1382
1382
|
_parse(e) {
|
|
1383
|
-
return
|
|
1383
|
+
return S(e.data);
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
X.create = (r) => new X({
|
|
@@ -1392,7 +1392,7 @@ class U extends v {
|
|
|
1392
1392
|
super(...arguments), this._unknown = !0;
|
|
1393
1393
|
}
|
|
1394
1394
|
_parse(e) {
|
|
1395
|
-
return
|
|
1395
|
+
return S(e.data);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
U.create = (r) => new U({
|
|
@@ -1423,7 +1423,7 @@ class xe extends v {
|
|
|
1423
1423
|
received: n.parsedType
|
|
1424
1424
|
}), y;
|
|
1425
1425
|
}
|
|
1426
|
-
return
|
|
1426
|
+
return S(e.data);
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
1429
|
xe.create = (r) => new xe({
|
|
@@ -1532,49 +1532,49 @@ class b extends v {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
_parse(e) {
|
|
1534
1534
|
if (this._getType(e) !== f.object) {
|
|
1535
|
-
const
|
|
1536
|
-
return l(
|
|
1535
|
+
const c = this._getOrReturnCtx(e);
|
|
1536
|
+
return l(c, {
|
|
1537
1537
|
code: d.invalid_type,
|
|
1538
1538
|
expected: f.object,
|
|
1539
|
-
received:
|
|
1539
|
+
received: c.parsedType
|
|
1540
1540
|
}), y;
|
|
1541
1541
|
}
|
|
1542
1542
|
const { status: n, ctx: s } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
|
|
1543
1543
|
if (!(this._def.catchall instanceof z && this._def.unknownKeys === "strip"))
|
|
1544
|
-
for (const
|
|
1545
|
-
i.includes(
|
|
1546
|
-
const
|
|
1547
|
-
for (const
|
|
1548
|
-
const m = a[
|
|
1549
|
-
|
|
1550
|
-
key: { status: "valid", value:
|
|
1551
|
-
value: m._parse(new A(s,
|
|
1552
|
-
alwaysSet:
|
|
1544
|
+
for (const c in s.data)
|
|
1545
|
+
i.includes(c) || o.push(c);
|
|
1546
|
+
const u = [];
|
|
1547
|
+
for (const c of i) {
|
|
1548
|
+
const m = a[c], C = s.data[c];
|
|
1549
|
+
u.push({
|
|
1550
|
+
key: { status: "valid", value: c },
|
|
1551
|
+
value: m._parse(new A(s, C, s.path, c)),
|
|
1552
|
+
alwaysSet: c in s.data
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
if (this._def.catchall instanceof z) {
|
|
1556
|
-
const
|
|
1557
|
-
if (
|
|
1556
|
+
const c = this._def.unknownKeys;
|
|
1557
|
+
if (c === "passthrough")
|
|
1558
1558
|
for (const m of o)
|
|
1559
|
-
|
|
1559
|
+
u.push({
|
|
1560
1560
|
key: { status: "valid", value: m },
|
|
1561
1561
|
value: { status: "valid", value: s.data[m] }
|
|
1562
1562
|
});
|
|
1563
|
-
else if (
|
|
1563
|
+
else if (c === "strict")
|
|
1564
1564
|
o.length > 0 && (l(s, {
|
|
1565
1565
|
code: d.unrecognized_keys,
|
|
1566
1566
|
keys: o
|
|
1567
1567
|
}), n.dirty());
|
|
1568
|
-
else if (
|
|
1568
|
+
else if (c !== "strip")
|
|
1569
1569
|
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1570
1570
|
} else {
|
|
1571
|
-
const
|
|
1571
|
+
const c = this._def.catchall;
|
|
1572
1572
|
for (const m of o) {
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1573
|
+
const C = s.data[m];
|
|
1574
|
+
u.push({
|
|
1575
1575
|
key: { status: "valid", value: m },
|
|
1576
|
-
value:
|
|
1577
|
-
new A(s,
|
|
1576
|
+
value: c._parse(
|
|
1577
|
+
new A(s, C, s.path, m)
|
|
1578
1578
|
//, ctx.child(key), value, getParsedType(value)
|
|
1579
1579
|
),
|
|
1580
1580
|
alwaysSet: m in s.data
|
|
@@ -1582,17 +1582,17 @@ class b extends v {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1585
|
-
const
|
|
1586
|
-
for (const m of
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
key:
|
|
1585
|
+
const c = [];
|
|
1586
|
+
for (const m of u) {
|
|
1587
|
+
const C = await m.key, Te = await m.value;
|
|
1588
|
+
c.push({
|
|
1589
|
+
key: C,
|
|
1590
1590
|
value: Te,
|
|
1591
1591
|
alwaysSet: m.alwaysSet
|
|
1592
1592
|
});
|
|
1593
1593
|
}
|
|
1594
|
-
return
|
|
1595
|
-
}).then((
|
|
1594
|
+
return c;
|
|
1595
|
+
}).then((c) => Z.mergeObjectSync(n, c)) : Z.mergeObjectSync(n, u);
|
|
1596
1596
|
}
|
|
1597
1597
|
get shape() {
|
|
1598
1598
|
return this._def.shape();
|
|
@@ -1604,11 +1604,11 @@ class b extends v {
|
|
|
1604
1604
|
...e !== void 0 ? {
|
|
1605
1605
|
errorMap: (t, n) => {
|
|
1606
1606
|
var s, a, i, o;
|
|
1607
|
-
const
|
|
1607
|
+
const u = (i = (a = (s = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(s, t, n).message) !== null && i !== void 0 ? i : n.defaultError;
|
|
1608
1608
|
return t.code === "unrecognized_keys" ? {
|
|
1609
|
-
message: (o = h.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
1609
|
+
message: (o = h.errToObj(e).message) !== null && o !== void 0 ? o : u
|
|
1610
1610
|
} : {
|
|
1611
|
-
message:
|
|
1611
|
+
message: u
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
1614
1614
|
} : {}
|
|
@@ -1846,26 +1846,26 @@ class ae extends v {
|
|
|
1846
1846
|
{
|
|
1847
1847
|
let a;
|
|
1848
1848
|
const i = [];
|
|
1849
|
-
for (const
|
|
1850
|
-
const
|
|
1849
|
+
for (const u of n) {
|
|
1850
|
+
const c = {
|
|
1851
1851
|
...t,
|
|
1852
1852
|
common: {
|
|
1853
1853
|
...t.common,
|
|
1854
1854
|
issues: []
|
|
1855
1855
|
},
|
|
1856
1856
|
parent: null
|
|
1857
|
-
}, m =
|
|
1857
|
+
}, m = u._parseSync({
|
|
1858
1858
|
data: t.data,
|
|
1859
1859
|
path: t.path,
|
|
1860
|
-
parent:
|
|
1860
|
+
parent: c
|
|
1861
1861
|
});
|
|
1862
1862
|
if (m.status === "valid")
|
|
1863
1863
|
return m;
|
|
1864
|
-
m.status === "dirty" && !a && (a = { result: m, ctx:
|
|
1864
|
+
m.status === "dirty" && !a && (a = { result: m, ctx: c }), c.common.issues.length && i.push(c.common.issues);
|
|
1865
1865
|
}
|
|
1866
1866
|
if (a)
|
|
1867
1867
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1868
|
-
const o = i.map((
|
|
1868
|
+
const o = i.map((u) => new N(u));
|
|
1869
1869
|
return l(t, {
|
|
1870
1870
|
code: d.invalid_union,
|
|
1871
1871
|
unionErrors: o
|
|
@@ -1951,10 +1951,10 @@ function Ne(r, e) {
|
|
|
1951
1951
|
if (t === f.object && n === f.object) {
|
|
1952
1952
|
const s = x.objectKeys(e), a = x.objectKeys(r).filter((o) => s.indexOf(o) !== -1), i = { ...r, ...e };
|
|
1953
1953
|
for (const o of a) {
|
|
1954
|
-
const
|
|
1955
|
-
if (!
|
|
1954
|
+
const u = Ne(r[o], e[o]);
|
|
1955
|
+
if (!u.valid)
|
|
1956
1956
|
return { valid: !1 };
|
|
1957
|
-
i[o] =
|
|
1957
|
+
i[o] = u.data;
|
|
1958
1958
|
}
|
|
1959
1959
|
return { valid: !0, data: i };
|
|
1960
1960
|
} else if (t === f.array && n === f.array) {
|
|
@@ -1962,10 +1962,10 @@ function Ne(r, e) {
|
|
|
1962
1962
|
return { valid: !1 };
|
|
1963
1963
|
const s = [];
|
|
1964
1964
|
for (let a = 0; a < r.length; a++) {
|
|
1965
|
-
const i = r[a], o = e[a],
|
|
1966
|
-
if (!
|
|
1965
|
+
const i = r[a], o = e[a], u = Ne(i, o);
|
|
1966
|
+
if (!u.valid)
|
|
1967
1967
|
return { valid: !1 };
|
|
1968
|
-
s.push(
|
|
1968
|
+
s.push(u.data);
|
|
1969
1969
|
}
|
|
1970
1970
|
return { valid: !0, data: s };
|
|
1971
1971
|
} else
|
|
@@ -2034,8 +2034,8 @@ class $ extends v {
|
|
|
2034
2034
|
type: "array"
|
|
2035
2035
|
}), t.dirty());
|
|
2036
2036
|
const a = [...n.data].map((i, o) => {
|
|
2037
|
-
const
|
|
2038
|
-
return
|
|
2037
|
+
const u = this._def.items[o] || this._def.rest;
|
|
2038
|
+
return u ? u._parse(new A(n, i, n.path, o)) : null;
|
|
2039
2039
|
}).filter((i) => !!i);
|
|
2040
2040
|
return n.common.async ? Promise.all(a).then((i) => Z.mergeArray(t, i)) : Z.mergeArray(t, a);
|
|
2041
2041
|
}
|
|
@@ -2115,28 +2115,28 @@ class be extends v {
|
|
|
2115
2115
|
expected: f.map,
|
|
2116
2116
|
received: n.parsedType
|
|
2117
2117
|
}), y;
|
|
2118
|
-
const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o,
|
|
2119
|
-
key: s._parse(new A(n, o, n.path, [
|
|
2120
|
-
value: a._parse(new A(n,
|
|
2118
|
+
const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, u], c) => ({
|
|
2119
|
+
key: s._parse(new A(n, o, n.path, [c, "key"])),
|
|
2120
|
+
value: a._parse(new A(n, u, n.path, [c, "value"]))
|
|
2121
2121
|
}));
|
|
2122
2122
|
if (n.common.async) {
|
|
2123
2123
|
const o = /* @__PURE__ */ new Map();
|
|
2124
2124
|
return Promise.resolve().then(async () => {
|
|
2125
|
-
for (const
|
|
2126
|
-
const
|
|
2127
|
-
if (
|
|
2125
|
+
for (const u of i) {
|
|
2126
|
+
const c = await u.key, m = await u.value;
|
|
2127
|
+
if (c.status === "aborted" || m.status === "aborted")
|
|
2128
2128
|
return y;
|
|
2129
|
-
(
|
|
2129
|
+
(c.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(c.value, m.value);
|
|
2130
2130
|
}
|
|
2131
2131
|
return { status: t.value, value: o };
|
|
2132
2132
|
});
|
|
2133
2133
|
} else {
|
|
2134
2134
|
const o = /* @__PURE__ */ new Map();
|
|
2135
|
-
for (const
|
|
2136
|
-
const
|
|
2137
|
-
if (
|
|
2135
|
+
for (const u of i) {
|
|
2136
|
+
const c = u.key, m = u.value;
|
|
2137
|
+
if (c.status === "aborted" || m.status === "aborted")
|
|
2138
2138
|
return y;
|
|
2139
|
-
(
|
|
2139
|
+
(c.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(c.value, m.value);
|
|
2140
2140
|
}
|
|
2141
2141
|
return { status: t.value, value: o };
|
|
2142
2142
|
}
|
|
@@ -2174,17 +2174,17 @@ class W extends v {
|
|
|
2174
2174
|
message: s.maxSize.message
|
|
2175
2175
|
}), t.dirty());
|
|
2176
2176
|
const a = this._def.valueType;
|
|
2177
|
-
function i(
|
|
2178
|
-
const
|
|
2179
|
-
for (const m of
|
|
2177
|
+
function i(u) {
|
|
2178
|
+
const c = /* @__PURE__ */ new Set();
|
|
2179
|
+
for (const m of u) {
|
|
2180
2180
|
if (m.status === "aborted")
|
|
2181
2181
|
return y;
|
|
2182
|
-
m.status === "dirty" && t.dirty(),
|
|
2182
|
+
m.status === "dirty" && t.dirty(), c.add(m.value);
|
|
2183
2183
|
}
|
|
2184
|
-
return { status: t.value, value:
|
|
2184
|
+
return { status: t.value, value: c };
|
|
2185
2185
|
}
|
|
2186
|
-
const o = [...n.data.values()].map((
|
|
2187
|
-
return n.common.async ? Promise.all(o).then((
|
|
2186
|
+
const o = [...n.data.values()].map((u, c) => a._parse(new A(n, u, n.path, c)));
|
|
2187
|
+
return n.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
|
|
2188
2188
|
}
|
|
2189
2189
|
min(e, t) {
|
|
2190
2190
|
return new W({
|
|
@@ -2224,7 +2224,7 @@ class H extends v {
|
|
|
2224
2224
|
expected: f.function,
|
|
2225
2225
|
received: t.parsedType
|
|
2226
2226
|
}), y;
|
|
2227
|
-
function n(o,
|
|
2227
|
+
function n(o, u) {
|
|
2228
2228
|
return _e({
|
|
2229
2229
|
data: o,
|
|
2230
2230
|
path: t.path,
|
|
@@ -2233,14 +2233,14 @@ class H extends v {
|
|
|
2233
2233
|
t.schemaErrorMap,
|
|
2234
2234
|
ye(),
|
|
2235
2235
|
G
|
|
2236
|
-
].filter((
|
|
2236
|
+
].filter((c) => !!c),
|
|
2237
2237
|
issueData: {
|
|
2238
2238
|
code: d.invalid_arguments,
|
|
2239
|
-
argumentsError:
|
|
2239
|
+
argumentsError: u
|
|
2240
2240
|
}
|
|
2241
2241
|
});
|
|
2242
2242
|
}
|
|
2243
|
-
function s(o,
|
|
2243
|
+
function s(o, u) {
|
|
2244
2244
|
return _e({
|
|
2245
2245
|
data: o,
|
|
2246
2246
|
path: t.path,
|
|
@@ -2249,34 +2249,34 @@ class H extends v {
|
|
|
2249
2249
|
t.schemaErrorMap,
|
|
2250
2250
|
ye(),
|
|
2251
2251
|
G
|
|
2252
|
-
].filter((
|
|
2252
|
+
].filter((c) => !!c),
|
|
2253
2253
|
issueData: {
|
|
2254
2254
|
code: d.invalid_return_type,
|
|
2255
|
-
returnTypeError:
|
|
2255
|
+
returnTypeError: u
|
|
2256
2256
|
}
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
2259
|
const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2260
2260
|
if (this._def.returns instanceof K) {
|
|
2261
2261
|
const o = this;
|
|
2262
|
-
return
|
|
2263
|
-
const
|
|
2264
|
-
throw
|
|
2265
|
-
}),
|
|
2266
|
-
return await o._def.returns._def.type.parseAsync(
|
|
2267
|
-
throw
|
|
2262
|
+
return S(async function(...u) {
|
|
2263
|
+
const c = new N([]), m = await o._def.args.parseAsync(u, a).catch((pe) => {
|
|
2264
|
+
throw c.addIssue(n(u, pe)), c;
|
|
2265
|
+
}), C = await Reflect.apply(i, this, m);
|
|
2266
|
+
return await o._def.returns._def.type.parseAsync(C, a).catch((pe) => {
|
|
2267
|
+
throw c.addIssue(s(C, pe)), c;
|
|
2268
2268
|
});
|
|
2269
2269
|
});
|
|
2270
2270
|
} else {
|
|
2271
2271
|
const o = this;
|
|
2272
|
-
return
|
|
2273
|
-
const
|
|
2274
|
-
if (!
|
|
2275
|
-
throw new N([n(
|
|
2276
|
-
const m = Reflect.apply(i, this,
|
|
2277
|
-
if (!
|
|
2278
|
-
throw new N([s(m,
|
|
2279
|
-
return
|
|
2272
|
+
return S(function(...u) {
|
|
2273
|
+
const c = o._def.args.safeParse(u, a);
|
|
2274
|
+
if (!c.success)
|
|
2275
|
+
throw new N([n(u, c.error)]);
|
|
2276
|
+
const m = Reflect.apply(i, this, c.data), C = o._def.returns.safeParse(m, a);
|
|
2277
|
+
if (!C.success)
|
|
2278
|
+
throw new N([s(m, C.error)]);
|
|
2279
|
+
return C.data;
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
@@ -2376,7 +2376,7 @@ class L extends v {
|
|
|
2376
2376
|
options: n
|
|
2377
2377
|
}), y;
|
|
2378
2378
|
}
|
|
2379
|
-
return
|
|
2379
|
+
return S(e.data);
|
|
2380
2380
|
}
|
|
2381
2381
|
get options() {
|
|
2382
2382
|
return this._def.values;
|
|
@@ -2436,7 +2436,7 @@ class ue extends v {
|
|
|
2436
2436
|
options: s
|
|
2437
2437
|
}), y;
|
|
2438
2438
|
}
|
|
2439
|
-
return
|
|
2439
|
+
return S(e.data);
|
|
2440
2440
|
}
|
|
2441
2441
|
get enum() {
|
|
2442
2442
|
return this._def.values;
|
|
@@ -2461,7 +2461,7 @@ class K extends v {
|
|
|
2461
2461
|
received: t.parsedType
|
|
2462
2462
|
}), y;
|
|
2463
2463
|
const n = t.parsedType === f.promise ? t.data : Promise.resolve(t.data);
|
|
2464
|
-
return
|
|
2464
|
+
return S(n.then((s) => this._def.type.parseAsync(s, {
|
|
2465
2465
|
path: t.path,
|
|
2466
2466
|
errorMap: t.common.contextualErrorMap
|
|
2467
2467
|
})));
|
|
@@ -2494,12 +2494,12 @@ class I extends v {
|
|
|
2494
2494
|
return Promise.resolve(i).then(async (o) => {
|
|
2495
2495
|
if (t.value === "aborted")
|
|
2496
2496
|
return y;
|
|
2497
|
-
const
|
|
2497
|
+
const u = await this._def.schema._parseAsync({
|
|
2498
2498
|
data: o,
|
|
2499
2499
|
path: n.path,
|
|
2500
2500
|
parent: n
|
|
2501
2501
|
});
|
|
2502
|
-
return
|
|
2502
|
+
return u.status === "aborted" ? y : u.status === "dirty" || t.value === "dirty" ? J(u.value) : u;
|
|
2503
2503
|
});
|
|
2504
2504
|
{
|
|
2505
2505
|
if (t.value === "aborted")
|
|
@@ -2514,10 +2514,10 @@ class I extends v {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
if (s.type === "refinement") {
|
|
2516
2516
|
const i = (o) => {
|
|
2517
|
-
const
|
|
2517
|
+
const u = s.refinement(o, a);
|
|
2518
2518
|
if (n.common.async)
|
|
2519
|
-
return Promise.resolve(
|
|
2520
|
-
if (
|
|
2519
|
+
return Promise.resolve(u);
|
|
2520
|
+
if (u instanceof Promise)
|
|
2521
2521
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2522
2522
|
return o;
|
|
2523
2523
|
};
|
|
@@ -2563,7 +2563,7 @@ I.createWithPreprocess = (r, e, t) => new I({
|
|
|
2563
2563
|
});
|
|
2564
2564
|
class j extends v {
|
|
2565
2565
|
_parse(e) {
|
|
2566
|
-
return this._getType(e) === f.undefined ?
|
|
2566
|
+
return this._getType(e) === f.undefined ? S(void 0) : this._def.innerType._parse(e);
|
|
2567
2567
|
}
|
|
2568
2568
|
unwrap() {
|
|
2569
2569
|
return this._def.innerType;
|
|
@@ -2576,7 +2576,7 @@ j.create = (r, e) => new j({
|
|
|
2576
2576
|
});
|
|
2577
2577
|
class q extends v {
|
|
2578
2578
|
_parse(e) {
|
|
2579
|
-
return this._getType(e) === f.null ?
|
|
2579
|
+
return this._getType(e) === f.null ? S(null) : this._def.innerType._parse(e);
|
|
2580
2580
|
}
|
|
2581
2581
|
unwrap() {
|
|
2582
2582
|
return this._def.innerType;
|
|
@@ -2739,8 +2739,8 @@ function Le(r, e = {}, t) {
|
|
|
2739
2739
|
return r ? X.create().superRefine((n, s) => {
|
|
2740
2740
|
var a, i;
|
|
2741
2741
|
if (!r(n)) {
|
|
2742
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e,
|
|
2743
|
-
s.addIssue({ code: "custom", ...
|
|
2742
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, c = typeof o == "string" ? { message: o } : o;
|
|
2743
|
+
s.addIssue({ code: "custom", ...c, fatal: u });
|
|
2744
2744
|
}
|
|
2745
2745
|
}) : X.create();
|
|
2746
2746
|
}
|
|
@@ -2763,7 +2763,7 @@ const bt = (r, e = {
|
|
|
2763
2763
|
bigint: (r) => D.create({ ...r, coerce: !0 }),
|
|
2764
2764
|
date: (r) => B.create({ ...r, coerce: !0 })
|
|
2765
2765
|
}, rr = y;
|
|
2766
|
-
var
|
|
2766
|
+
var O = /* @__PURE__ */ Object.freeze({
|
|
2767
2767
|
__proto__: null,
|
|
2768
2768
|
defaultErrorMap: G,
|
|
2769
2769
|
setErrorMap: rt,
|
|
@@ -2774,7 +2774,7 @@ var S = /* @__PURE__ */ Object.freeze({
|
|
|
2774
2774
|
ParseStatus: Z,
|
|
2775
2775
|
INVALID: y,
|
|
2776
2776
|
DIRTY: J,
|
|
2777
|
-
OK:
|
|
2777
|
+
OK: S,
|
|
2778
2778
|
isAborted: Se,
|
|
2779
2779
|
isDirty: Oe,
|
|
2780
2780
|
isValid: ee,
|
|
@@ -2880,22 +2880,22 @@ var S = /* @__PURE__ */ Object.freeze({
|
|
|
2880
2880
|
ZodError: N
|
|
2881
2881
|
});
|
|
2882
2882
|
const cr = () => {
|
|
2883
|
-
const { formValidationTexts: r } = Ae(Ye), e = (g) => (g != null && g.useCoerce ?
|
|
2883
|
+
const { formValidationTexts: r } = Ae(Ye), e = (g) => (g != null && g.useCoerce ? O.coerce : O).string({
|
|
2884
2884
|
invalid_type_error: r.required,
|
|
2885
2885
|
required_error: r.required
|
|
2886
2886
|
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((k) => k ?? null), n = (g) => {
|
|
2887
|
-
const k = (g != null && g.useCoerce ?
|
|
2887
|
+
const k = (g != null && g.useCoerce ? O.coerce : O).number({
|
|
2888
2888
|
invalid_type_error: r.required,
|
|
2889
2889
|
required_error: r.required
|
|
2890
2890
|
});
|
|
2891
2891
|
return (g == null ? void 0 : g.min) !== void 0 && k.min(g.min), (g == null ? void 0 : g.max) !== void 0 && k.max(g.max), k.transform((w) => w ?? null);
|
|
2892
|
-
}, s = (g) => n(g).nullable().optional().transform((k) => k ?? null), a = (g) => (g != null && g.useCoerce ?
|
|
2892
|
+
}, s = (g) => n(g).nullable().optional().transform((k) => k ?? null), a = (g) => (g != null && g.useCoerce ? O.coerce : O).boolean({
|
|
2893
2893
|
invalid_type_error: r.required,
|
|
2894
2894
|
required_error: r.required
|
|
2895
|
-
}).transform((k) => k ?? null), i = (g) => (g != null && g.useCoerce ?
|
|
2895
|
+
}).transform((k) => k ?? null), i = (g) => (g != null && g.useCoerce ? O.coerce : O).string({
|
|
2896
2896
|
invalid_type_error: r.required,
|
|
2897
2897
|
required_error: r.required
|
|
2898
|
-
}).refine(et, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((k) => k ?? null),
|
|
2898
|
+
}).refine(et, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((k) => k ?? null), u = (g, k) => O.enum(g, {
|
|
2899
2899
|
invalid_type_error: r.required,
|
|
2900
2900
|
required_error: r.required
|
|
2901
2901
|
}).transform((Re) => Re ?? null);
|
|
@@ -2907,32 +2907,32 @@ const cr = () => {
|
|
|
2907
2907
|
zBool: a,
|
|
2908
2908
|
zDate: o,
|
|
2909
2909
|
zDateRequired: i,
|
|
2910
|
-
zEnum: (g, k) =>
|
|
2911
|
-
zEnumRequired:
|
|
2912
|
-
zObjectIdInt: (g) =>
|
|
2913
|
-
zObjectIdIntRequired: (g) =>
|
|
2914
|
-
zObjectIdStr: (g) =>
|
|
2915
|
-
zObjectIdStrRequired: (g) =>
|
|
2916
|
-
zFile: ({ required: g, multiple: k, maxFileSize: w }) =>
|
|
2910
|
+
zEnum: (g, k) => u(g).nullable().transform((w) => w ?? null),
|
|
2911
|
+
zEnumRequired: u,
|
|
2912
|
+
zObjectIdInt: (g) => O.object({ id: s({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2913
|
+
zObjectIdIntRequired: (g) => O.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
|
+
zObjectIdStr: (g) => O.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
|
+
zObjectIdStrRequired: (g) => O.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
+
zFile: ({ required: g, multiple: k, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => k || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((We) => We.size <= w), `Maximum file size is ${Fe(w)}.`).transform((T) => (k ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
|
-
}, ur = (r) => {
|
|
2919
|
-
const
|
|
2920
|
-
|
|
2918
|
+
}, ur = (r, e = !1) => {
|
|
2919
|
+
const t = Je({ silent: e }), { startLoading: n, stopLoading: s } = Ae(He), a = Ge(0), [i, o] = Xe(null), u = Ke(async (c, m) => {
|
|
2920
|
+
!e && n(`loadData-${r}-${m}`), o(null);
|
|
2921
2921
|
try {
|
|
2922
|
-
const
|
|
2922
|
+
const C = await t.get(r, {
|
|
2923
2923
|
signal: c
|
|
2924
2924
|
});
|
|
2925
|
-
|
|
2925
|
+
o(C.data);
|
|
2926
2926
|
} finally {
|
|
2927
|
-
|
|
2927
|
+
!e && s(`loadData-${r}-${m}`);
|
|
2928
2928
|
}
|
|
2929
|
-
}, [
|
|
2929
|
+
}, [t, n, s, r, e]);
|
|
2930
2930
|
return Qe(() => {
|
|
2931
2931
|
const c = new AbortController();
|
|
2932
|
-
return
|
|
2932
|
+
return u(c.signal, ++a.current), () => {
|
|
2933
2933
|
c.abort();
|
|
2934
2934
|
};
|
|
2935
|
-
}, [
|
|
2935
|
+
}, [u]), { data: i, setData: o };
|
|
2936
2936
|
};
|
|
2937
2937
|
export {
|
|
2938
2938
|
hr as cancelToken,
|