react-luminus-components 1.2.77 → 1.2.80
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-BCIiHNVo.cjs +1 -0
- package/dist/{EventType-TaCH9oyp.js → EventType-DiHqEDqn.js} +140 -138
- package/dist/{NoInputContainer-CCGnNOSg.js → NoInputContainer-D_sgAiux.js} +933 -931
- package/dist/{NoInputContainer-DMOoy9Pc.cjs → NoInputContainer-QV9JLbnE.cjs} +46 -46
- package/dist/{SimpleTooltip-DVSE9qqf.cjs → SimpleTooltip-BKmgu79J.cjs} +1 -1
- package/dist/{SimpleTooltip-69aeczDW.js → SimpleTooltip-CXeUwU65.js} +1 -1
- package/dist/components/common/Card/Card.d.ts +1 -1
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +8 -0
- package/dist/components/common/Loading/LoadingBlock.d.ts +4 -0
- package/dist/components/common/Widget/WidgetCard.d.ts +8 -0
- package/dist/components/common/Widget/WidgetWrapper.d.ts +7 -0
- package/dist/components/common/index.d.ts +4 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +5 -1
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +7 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +80 -76
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +2 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +136 -107
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +1188 -1145
- package/dist/models/index.d.ts +3 -0
- package/dist/models/prop-types/DashboardWidgetCommonProps.d.ts +5 -0
- package/dist/models/texts/ErrorBoundaryTexts.d.ts +5 -0
- package/dist/models/texts/WidgetTexts.d.ts +4 -0
- package/dist/models/types/DashboardWidget.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/{useConfirm-Cbsu_0WS.js → useConfirm-BgDxf_xi.js} +1 -1
- package/dist/{useConfirm-DAxHTuPE.cjs → useConfirm-ZMFNWP8A.cjs} +1 -1
- package/dist/{usePermissions-ChiH0cXr.cjs → usePermissions-DQNoOuU8.cjs} +1 -1
- package/dist/{usePermissions-CfEdvkjX.js → usePermissions-cOpmP15X.js} +1 -1
- package/package.json +1 -1
- package/dist/EventType-7wos9_SI.cjs +0 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Q as
|
|
2
|
-
import { aF as
|
|
3
|
-
import { a as
|
|
4
|
-
import { useContext as
|
|
1
|
+
import { Q as He, a4 as Ae, an as Qe } from "./NoInputContainer-D_sgAiux.js";
|
|
2
|
+
import { aF as pr, a9 as yr, aE as _r } from "./NoInputContainer-D_sgAiux.js";
|
|
3
|
+
import { a as gr, u as xr } from "./useConfirm-BgDxf_xi.js";
|
|
4
|
+
import { useContext as $e, useRef as Xe, useState as Me, useCallback as Ke, useEffect as ze } 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
|
-
import { a as
|
|
9
|
-
import { u as
|
|
8
|
+
import { a as br, b as wr, u as Tr } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
+
import { u as Cr } from "./usePermissions-cOpmP15X.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -171,7 +171,7 @@ class N extends Error {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
N.create = (r) => new N(r);
|
|
174
|
-
const
|
|
174
|
+
const H = (r, e) => {
|
|
175
175
|
let t;
|
|
176
176
|
switch (r.code) {
|
|
177
177
|
case d.invalid_type:
|
|
@@ -227,12 +227,12 @@ const G = (r, e) => {
|
|
|
227
227
|
}
|
|
228
228
|
return { message: t };
|
|
229
229
|
};
|
|
230
|
-
let
|
|
230
|
+
let Pe = H;
|
|
231
231
|
function rt(r) {
|
|
232
|
-
|
|
232
|
+
Pe = r;
|
|
233
233
|
}
|
|
234
234
|
function ye() {
|
|
235
|
-
return
|
|
235
|
+
return Pe;
|
|
236
236
|
}
|
|
237
237
|
const _e = (r) => {
|
|
238
238
|
const { data: e, path: t, errorMaps: n, issueData: s } = r, a = [...t, ...s.path || []], i = {
|
|
@@ -264,7 +264,7 @@ function l(r, e) {
|
|
|
264
264
|
r.common.contextualErrorMap,
|
|
265
265
|
r.schemaErrorMap,
|
|
266
266
|
t,
|
|
267
|
-
t ===
|
|
267
|
+
t === H ? void 0 : H
|
|
268
268
|
// then global default map
|
|
269
269
|
].filter((s) => !!s)
|
|
270
270
|
});
|
|
@@ -319,7 +319,7 @@ function ve(r, e, t, n) {
|
|
|
319
319
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
320
320
|
return e.get(r);
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function De(r, e, t, n, s) {
|
|
323
323
|
if (typeof e == "function" ? r !== e || !s : !e.has(r))
|
|
324
324
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
325
325
|
return e.set(r, t), t;
|
|
@@ -549,16 +549,16 @@ class v {
|
|
|
549
549
|
}
|
|
550
550
|
const st = /^c[^\s-]{8,}$/i, at = /^[0-9a-z]+$/, it = /^[0-9A-HJKMNP-TV-Z]{26}$/, ot = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, dt = /^[a-z0-9_-]{21}$/i, ct = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ut = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, lt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
551
551
|
let Ze;
|
|
552
|
-
const ft = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ht = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, mt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
553
|
-
function
|
|
552
|
+
const ft = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ht = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, mt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", pt = new RegExp(`^${Ve}$`);
|
|
553
|
+
function Le(r) {
|
|
554
554
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
555
555
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
556
556
|
}
|
|
557
557
|
function yt(r) {
|
|
558
|
-
return new RegExp(`^${
|
|
558
|
+
return new RegExp(`^${Le(r)}$`);
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let e = `${
|
|
560
|
+
function qe(r) {
|
|
561
|
+
let e = `${Ve}T${Le(r)}`;
|
|
562
562
|
const t = [];
|
|
563
563
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
564
564
|
}
|
|
@@ -682,7 +682,7 @@ class E extends v {
|
|
|
682
682
|
code: d.invalid_string,
|
|
683
683
|
validation: { endsWith: a.value },
|
|
684
684
|
message: a.message
|
|
685
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
685
|
+
}), n.dirty()) : a.kind === "datetime" ? qe(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
686
686
|
code: d.invalid_string,
|
|
687
687
|
validation: "datetime",
|
|
688
688
|
message: a.message
|
|
@@ -928,7 +928,7 @@ function vt(r, e) {
|
|
|
928
928
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, a = parseInt(r.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
|
|
929
929
|
return a % i / Math.pow(10, s);
|
|
930
930
|
}
|
|
931
|
-
class
|
|
931
|
+
class D extends v {
|
|
932
932
|
constructor() {
|
|
933
933
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
934
934
|
}
|
|
@@ -986,7 +986,7 @@ class V extends v {
|
|
|
986
986
|
return this.setLimit("max", e, !1, h.toString(t));
|
|
987
987
|
}
|
|
988
988
|
setLimit(e, t, n, s) {
|
|
989
|
-
return new
|
|
989
|
+
return new D({
|
|
990
990
|
...this._def,
|
|
991
991
|
checks: [
|
|
992
992
|
...this._def.checks,
|
|
@@ -1000,7 +1000,7 @@ class V extends v {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
1002
|
_addCheck(e) {
|
|
1003
|
-
return new
|
|
1003
|
+
return new D({
|
|
1004
1004
|
...this._def,
|
|
1005
1005
|
checks: [...this._def.checks, e]
|
|
1006
1006
|
});
|
|
@@ -1094,13 +1094,13 @@ class V extends v {
|
|
|
1094
1094
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
|
-
|
|
1097
|
+
D.create = (r) => new D({
|
|
1098
1098
|
checks: [],
|
|
1099
1099
|
typeName: p.ZodNumber,
|
|
1100
1100
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1101
1101
|
..._(r)
|
|
1102
1102
|
});
|
|
1103
|
-
class
|
|
1103
|
+
class V extends v {
|
|
1104
1104
|
constructor() {
|
|
1105
1105
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1106
1106
|
}
|
|
@@ -1148,7 +1148,7 @@ class D extends v {
|
|
|
1148
1148
|
return this.setLimit("max", e, !1, h.toString(t));
|
|
1149
1149
|
}
|
|
1150
1150
|
setLimit(e, t, n, s) {
|
|
1151
|
-
return new
|
|
1151
|
+
return new V({
|
|
1152
1152
|
...this._def,
|
|
1153
1153
|
checks: [
|
|
1154
1154
|
...this._def.checks,
|
|
@@ -1162,7 +1162,7 @@ class D extends v {
|
|
|
1162
1162
|
});
|
|
1163
1163
|
}
|
|
1164
1164
|
_addCheck(e) {
|
|
1165
|
-
return new
|
|
1165
|
+
return new V({
|
|
1166
1166
|
...this._def,
|
|
1167
1167
|
checks: [...this._def.checks, e]
|
|
1168
1168
|
});
|
|
@@ -1219,9 +1219,9 @@ class D extends v {
|
|
|
1219
1219
|
return e;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
|
|
1222
|
+
V.create = (r) => {
|
|
1223
1223
|
var e;
|
|
1224
|
-
return new
|
|
1224
|
+
return new V({
|
|
1225
1225
|
checks: [],
|
|
1226
1226
|
typeName: p.ZodBigInt,
|
|
1227
1227
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -1504,13 +1504,13 @@ R.create = (r, e) => new R({
|
|
|
1504
1504
|
..._(e)
|
|
1505
1505
|
});
|
|
1506
1506
|
function Y(r) {
|
|
1507
|
-
if (r instanceof
|
|
1507
|
+
if (r instanceof k) {
|
|
1508
1508
|
const e = {};
|
|
1509
1509
|
for (const t in r.shape) {
|
|
1510
1510
|
const n = r.shape[t];
|
|
1511
1511
|
e[t] = j.create(Y(n));
|
|
1512
1512
|
}
|
|
1513
|
-
return new
|
|
1513
|
+
return new k({
|
|
1514
1514
|
...r._def,
|
|
1515
1515
|
shape: () => e
|
|
1516
1516
|
});
|
|
@@ -1520,7 +1520,7 @@ function Y(r) {
|
|
|
1520
1520
|
type: Y(r.element)
|
|
1521
1521
|
}) : r instanceof j ? j.create(Y(r.unwrap())) : r instanceof q ? q.create(Y(r.unwrap())) : r instanceof $ ? $.create(r.items.map((e) => Y(e))) : r;
|
|
1522
1522
|
}
|
|
1523
|
-
class
|
|
1523
|
+
class k extends v {
|
|
1524
1524
|
constructor() {
|
|
1525
1525
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1526
1526
|
}
|
|
@@ -1598,7 +1598,7 @@ class b extends v {
|
|
|
1598
1598
|
return this._def.shape();
|
|
1599
1599
|
}
|
|
1600
1600
|
strict(e) {
|
|
1601
|
-
return h.errToObj, new
|
|
1601
|
+
return h.errToObj, new k({
|
|
1602
1602
|
...this._def,
|
|
1603
1603
|
unknownKeys: "strict",
|
|
1604
1604
|
...e !== void 0 ? {
|
|
@@ -1615,13 +1615,13 @@ class b extends v {
|
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
strip() {
|
|
1618
|
-
return new
|
|
1618
|
+
return new k({
|
|
1619
1619
|
...this._def,
|
|
1620
1620
|
unknownKeys: "strip"
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|
|
1623
1623
|
passthrough() {
|
|
1624
|
-
return new
|
|
1624
|
+
return new k({
|
|
1625
1625
|
...this._def,
|
|
1626
1626
|
unknownKeys: "passthrough"
|
|
1627
1627
|
});
|
|
@@ -1644,7 +1644,7 @@ class b extends v {
|
|
|
1644
1644
|
// }) as any;
|
|
1645
1645
|
// };
|
|
1646
1646
|
extend(e) {
|
|
1647
|
-
return new
|
|
1647
|
+
return new k({
|
|
1648
1648
|
...this._def,
|
|
1649
1649
|
shape: () => ({
|
|
1650
1650
|
...this._def.shape(),
|
|
@@ -1658,7 +1658,7 @@ class b extends v {
|
|
|
1658
1658
|
* upgrade if you are experiencing issues.
|
|
1659
1659
|
*/
|
|
1660
1660
|
merge(e) {
|
|
1661
|
-
return new
|
|
1661
|
+
return new k({
|
|
1662
1662
|
unknownKeys: e._def.unknownKeys,
|
|
1663
1663
|
catchall: e._def.catchall,
|
|
1664
1664
|
shape: () => ({
|
|
@@ -1728,7 +1728,7 @@ class b extends v {
|
|
|
1728
1728
|
// return merged;
|
|
1729
1729
|
// }
|
|
1730
1730
|
catchall(e) {
|
|
1731
|
-
return new
|
|
1731
|
+
return new k({
|
|
1732
1732
|
...this._def,
|
|
1733
1733
|
catchall: e
|
|
1734
1734
|
});
|
|
@@ -1737,7 +1737,7 @@ class b extends v {
|
|
|
1737
1737
|
const t = {};
|
|
1738
1738
|
return x.objectKeys(e).forEach((n) => {
|
|
1739
1739
|
e[n] && this.shape[n] && (t[n] = this.shape[n]);
|
|
1740
|
-
}), new
|
|
1740
|
+
}), new k({
|
|
1741
1741
|
...this._def,
|
|
1742
1742
|
shape: () => t
|
|
1743
1743
|
});
|
|
@@ -1746,7 +1746,7 @@ class b extends v {
|
|
|
1746
1746
|
const t = {};
|
|
1747
1747
|
return x.objectKeys(this.shape).forEach((n) => {
|
|
1748
1748
|
e[n] || (t[n] = this.shape[n]);
|
|
1749
|
-
}), new
|
|
1749
|
+
}), new k({
|
|
1750
1750
|
...this._def,
|
|
1751
1751
|
shape: () => t
|
|
1752
1752
|
});
|
|
@@ -1762,7 +1762,7 @@ class b extends v {
|
|
|
1762
1762
|
return x.objectKeys(this.shape).forEach((n) => {
|
|
1763
1763
|
const s = this.shape[n];
|
|
1764
1764
|
e && !e[n] ? t[n] = s : t[n] = s.optional();
|
|
1765
|
-
}), new
|
|
1765
|
+
}), new k({
|
|
1766
1766
|
...this._def,
|
|
1767
1767
|
shape: () => t
|
|
1768
1768
|
});
|
|
@@ -1778,30 +1778,30 @@ class b extends v {
|
|
|
1778
1778
|
a = a._def.innerType;
|
|
1779
1779
|
t[n] = a;
|
|
1780
1780
|
}
|
|
1781
|
-
}), new
|
|
1781
|
+
}), new k({
|
|
1782
1782
|
...this._def,
|
|
1783
1783
|
shape: () => t
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
keyof() {
|
|
1787
|
-
return
|
|
1787
|
+
return Ue(x.objectKeys(this.shape));
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
|
-
|
|
1790
|
+
k.create = (r, e) => new k({
|
|
1791
1791
|
shape: () => r,
|
|
1792
1792
|
unknownKeys: "strip",
|
|
1793
1793
|
catchall: z.create(),
|
|
1794
1794
|
typeName: p.ZodObject,
|
|
1795
1795
|
..._(e)
|
|
1796
1796
|
});
|
|
1797
|
-
|
|
1797
|
+
k.strictCreate = (r, e) => new k({
|
|
1798
1798
|
shape: () => r,
|
|
1799
1799
|
unknownKeys: "strict",
|
|
1800
1800
|
catchall: z.create(),
|
|
1801
1801
|
typeName: p.ZodObject,
|
|
1802
1802
|
..._(e)
|
|
1803
1803
|
});
|
|
1804
|
-
|
|
1804
|
+
k.lazycreate = (r, e) => new k({
|
|
1805
1805
|
shape: r,
|
|
1806
1806
|
unknownKeys: "strip",
|
|
1807
1807
|
catchall: z.create(),
|
|
@@ -2100,7 +2100,7 @@ class oe extends v {
|
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
class
|
|
2103
|
+
class ke extends v {
|
|
2104
2104
|
get keySchema() {
|
|
2105
2105
|
return this._def.keyType;
|
|
2106
2106
|
}
|
|
@@ -2142,7 +2142,7 @@ class be extends v {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
|
-
|
|
2145
|
+
ke.create = (r, e, t) => new ke({
|
|
2146
2146
|
valueType: e,
|
|
2147
2147
|
keyType: r,
|
|
2148
2148
|
typeName: p.ZodMap,
|
|
@@ -2212,7 +2212,7 @@ W.create = (r, e) => new W({
|
|
|
2212
2212
|
typeName: p.ZodSet,
|
|
2213
2213
|
..._(e)
|
|
2214
2214
|
});
|
|
2215
|
-
class
|
|
2215
|
+
class G extends v {
|
|
2216
2216
|
constructor() {
|
|
2217
2217
|
super(...arguments), this.validate = this.implement;
|
|
2218
2218
|
}
|
|
@@ -2232,7 +2232,7 @@ class H extends v {
|
|
|
2232
2232
|
t.common.contextualErrorMap,
|
|
2233
2233
|
t.schemaErrorMap,
|
|
2234
2234
|
ye(),
|
|
2235
|
-
|
|
2235
|
+
H
|
|
2236
2236
|
].filter((c) => !!c),
|
|
2237
2237
|
issueData: {
|
|
2238
2238
|
code: d.invalid_arguments,
|
|
@@ -2248,7 +2248,7 @@ class H extends v {
|
|
|
2248
2248
|
t.common.contextualErrorMap,
|
|
2249
2249
|
t.schemaErrorMap,
|
|
2250
2250
|
ye(),
|
|
2251
|
-
|
|
2251
|
+
H
|
|
2252
2252
|
].filter((c) => !!c),
|
|
2253
2253
|
issueData: {
|
|
2254
2254
|
code: d.invalid_return_type,
|
|
@@ -2287,13 +2287,13 @@ class H extends v {
|
|
|
2287
2287
|
return this._def.returns;
|
|
2288
2288
|
}
|
|
2289
2289
|
args(...e) {
|
|
2290
|
-
return new
|
|
2290
|
+
return new G({
|
|
2291
2291
|
...this._def,
|
|
2292
2292
|
args: $.create(e).rest(U.create())
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
2295
|
returns(e) {
|
|
2296
|
-
return new
|
|
2296
|
+
return new G({
|
|
2297
2297
|
...this._def,
|
|
2298
2298
|
returns: e
|
|
2299
2299
|
});
|
|
@@ -2305,7 +2305,7 @@ class H extends v {
|
|
|
2305
2305
|
return this.parse(e);
|
|
2306
2306
|
}
|
|
2307
2307
|
static create(e, t, n) {
|
|
2308
|
-
return new
|
|
2308
|
+
return new G({
|
|
2309
2309
|
args: e || $.create([]).rest(U.create()),
|
|
2310
2310
|
returns: t || U.create(),
|
|
2311
2311
|
typeName: p.ZodFunction,
|
|
@@ -2348,7 +2348,7 @@ ce.create = (r, e) => new ce({
|
|
|
2348
2348
|
typeName: p.ZodLiteral,
|
|
2349
2349
|
..._(e)
|
|
2350
2350
|
});
|
|
2351
|
-
function
|
|
2351
|
+
function Ue(r, e) {
|
|
2352
2352
|
return new L({
|
|
2353
2353
|
values: r,
|
|
2354
2354
|
typeName: p.ZodEnum,
|
|
@@ -2368,7 +2368,7 @@ class L extends v {
|
|
|
2368
2368
|
code: d.invalid_type
|
|
2369
2369
|
}), y;
|
|
2370
2370
|
}
|
|
2371
|
-
if (ve(this, K) ||
|
|
2371
|
+
if (ve(this, K) || De(this, K, new Set(this._def.values)), !ve(this, K).has(e.data)) {
|
|
2372
2372
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2373
2373
|
return l(t, {
|
|
2374
2374
|
received: t.data,
|
|
@@ -2413,7 +2413,7 @@ class L extends v {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
2415
|
K = /* @__PURE__ */ new WeakMap();
|
|
2416
|
-
L.create =
|
|
2416
|
+
L.create = Ue;
|
|
2417
2417
|
class ue extends v {
|
|
2418
2418
|
constructor() {
|
|
2419
2419
|
super(...arguments), F.set(this, void 0);
|
|
@@ -2428,7 +2428,7 @@ class ue extends v {
|
|
|
2428
2428
|
code: d.invalid_type
|
|
2429
2429
|
}), y;
|
|
2430
2430
|
}
|
|
2431
|
-
if (ve(this, F) ||
|
|
2431
|
+
if (ve(this, F) || De(this, F, new Set(x.getValidEnumValues(this._def.values))), !ve(this, F).has(e.data)) {
|
|
2432
2432
|
const s = x.objectValues(t);
|
|
2433
2433
|
return l(n, {
|
|
2434
2434
|
received: n.data,
|
|
@@ -2650,7 +2650,7 @@ fe.create = (r, e) => new fe({
|
|
|
2650
2650
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2651
2651
|
..._(e)
|
|
2652
2652
|
});
|
|
2653
|
-
class
|
|
2653
|
+
class be extends v {
|
|
2654
2654
|
_parse(e) {
|
|
2655
2655
|
if (this._getType(e) !== f.nan) {
|
|
2656
2656
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2663,7 +2663,7 @@ class ke extends v {
|
|
|
2663
2663
|
return { status: "valid", value: e.data };
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
2666
|
-
|
|
2666
|
+
be.create = (r) => new be({
|
|
2667
2667
|
typeName: p.ZodNaN,
|
|
2668
2668
|
..._(r)
|
|
2669
2669
|
});
|
|
@@ -2735,7 +2735,7 @@ he.create = (r, e) => new he({
|
|
|
2735
2735
|
typeName: p.ZodReadonly,
|
|
2736
2736
|
..._(e)
|
|
2737
2737
|
});
|
|
2738
|
-
function
|
|
2738
|
+
function Be(r, e = {}, t) {
|
|
2739
2739
|
return r ? Q.create().superRefine((n, s) => {
|
|
2740
2740
|
var a, i;
|
|
2741
2741
|
if (!r(n)) {
|
|
@@ -2745,27 +2745,27 @@ function Le(r, e = {}, t) {
|
|
|
2745
2745
|
}) : Q.create();
|
|
2746
2746
|
}
|
|
2747
2747
|
const xt = {
|
|
2748
|
-
object:
|
|
2748
|
+
object: k.lazycreate
|
|
2749
2749
|
};
|
|
2750
2750
|
var p;
|
|
2751
2751
|
(function(r) {
|
|
2752
2752
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
2753
2753
|
})(p || (p = {}));
|
|
2754
|
-
const
|
|
2754
|
+
const kt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) =>
|
|
2756
|
+
}) => Be((t) => t instanceof r, e), We = E.create, Ye = D.create, bt = be.create, wt = V.create, Je = re.create, Tt = B.create, Zt = ge.create, Ct = ne.create, St = se.create, Ot = Q.create, Nt = U.create, Et = z.create, Rt = xe.create, It = R.create, jt = k.create, At = k.strictCreate, $t = ae.create, Mt = we.create, zt = ie.create, Pt = $.create, Dt = oe.create, Vt = ke.create, Lt = W.create, qt = G.create, Ut = de.create, Bt = ce.create, Wt = L.create, Yt = ue.create, Jt = X.create, je = I.create, Gt = j.create, Ht = q.create, Qt = I.createWithPreprocess, Xt = me.create, Kt = () => We().optional(), Ft = () => Ye().optional(), er = () => Je().optional(), tr = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
|
-
number: (r) =>
|
|
2758
|
+
number: (r) => D.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => re.create({
|
|
2760
2760
|
...r,
|
|
2761
2761
|
coerce: !0
|
|
2762
2762
|
}),
|
|
2763
|
-
bigint: (r) =>
|
|
2763
|
+
bigint: (r) => V.create({ ...r, coerce: !0 }),
|
|
2764
2764
|
date: (r) => B.create({ ...r, coerce: !0 })
|
|
2765
2765
|
}, rr = y;
|
|
2766
2766
|
var O = /* @__PURE__ */ Object.freeze({
|
|
2767
2767
|
__proto__: null,
|
|
2768
|
-
defaultErrorMap:
|
|
2768
|
+
defaultErrorMap: H,
|
|
2769
2769
|
setErrorMap: rt,
|
|
2770
2770
|
getErrorMap: ye,
|
|
2771
2771
|
makeIssue: _e,
|
|
@@ -2788,10 +2788,10 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2788
2788
|
ZodParsedType: f,
|
|
2789
2789
|
getParsedType: P,
|
|
2790
2790
|
ZodType: v,
|
|
2791
|
-
datetimeRegex:
|
|
2791
|
+
datetimeRegex: qe,
|
|
2792
2792
|
ZodString: E,
|
|
2793
|
-
ZodNumber:
|
|
2794
|
-
ZodBigInt:
|
|
2793
|
+
ZodNumber: D,
|
|
2794
|
+
ZodBigInt: V,
|
|
2795
2795
|
ZodBoolean: re,
|
|
2796
2796
|
ZodDate: B,
|
|
2797
2797
|
ZodSymbol: ge,
|
|
@@ -2802,15 +2802,15 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2802
2802
|
ZodNever: z,
|
|
2803
2803
|
ZodVoid: xe,
|
|
2804
2804
|
ZodArray: R,
|
|
2805
|
-
ZodObject:
|
|
2805
|
+
ZodObject: k,
|
|
2806
2806
|
ZodUnion: ae,
|
|
2807
2807
|
ZodDiscriminatedUnion: we,
|
|
2808
2808
|
ZodIntersection: ie,
|
|
2809
2809
|
ZodTuple: $,
|
|
2810
2810
|
ZodRecord: oe,
|
|
2811
|
-
ZodMap:
|
|
2811
|
+
ZodMap: ke,
|
|
2812
2812
|
ZodSet: W,
|
|
2813
|
-
ZodFunction:
|
|
2813
|
+
ZodFunction: G,
|
|
2814
2814
|
ZodLazy: de,
|
|
2815
2815
|
ZodLiteral: ce,
|
|
2816
2816
|
ZodEnum: L,
|
|
@@ -2822,12 +2822,12 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2822
2822
|
ZodNullable: q,
|
|
2823
2823
|
ZodDefault: le,
|
|
2824
2824
|
ZodCatch: fe,
|
|
2825
|
-
ZodNaN:
|
|
2825
|
+
ZodNaN: be,
|
|
2826
2826
|
BRAND: gt,
|
|
2827
2827
|
ZodBranded: Ee,
|
|
2828
2828
|
ZodPipeline: me,
|
|
2829
2829
|
ZodReadonly: he,
|
|
2830
|
-
custom:
|
|
2830
|
+
custom: Be,
|
|
2831
2831
|
Schema: v,
|
|
2832
2832
|
ZodSchema: v,
|
|
2833
2833
|
late: xt,
|
|
@@ -2838,35 +2838,35 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2838
2838
|
any: Ot,
|
|
2839
2839
|
array: It,
|
|
2840
2840
|
bigint: wt,
|
|
2841
|
-
boolean:
|
|
2841
|
+
boolean: Je,
|
|
2842
2842
|
date: Tt,
|
|
2843
2843
|
discriminatedUnion: Mt,
|
|
2844
2844
|
effect: je,
|
|
2845
2845
|
enum: Wt,
|
|
2846
2846
|
function: qt,
|
|
2847
|
-
instanceof:
|
|
2847
|
+
instanceof: kt,
|
|
2848
2848
|
intersection: zt,
|
|
2849
2849
|
lazy: Ut,
|
|
2850
2850
|
literal: Bt,
|
|
2851
|
-
map:
|
|
2852
|
-
nan:
|
|
2851
|
+
map: Vt,
|
|
2852
|
+
nan: bt,
|
|
2853
2853
|
nativeEnum: Yt,
|
|
2854
2854
|
never: Et,
|
|
2855
2855
|
null: St,
|
|
2856
|
-
nullable:
|
|
2857
|
-
number:
|
|
2856
|
+
nullable: Ht,
|
|
2857
|
+
number: Ye,
|
|
2858
2858
|
object: jt,
|
|
2859
2859
|
oboolean: er,
|
|
2860
2860
|
onumber: Ft,
|
|
2861
|
-
optional:
|
|
2861
|
+
optional: Gt,
|
|
2862
2862
|
ostring: Kt,
|
|
2863
2863
|
pipeline: Xt,
|
|
2864
2864
|
preprocess: Qt,
|
|
2865
2865
|
promise: Jt,
|
|
2866
|
-
record:
|
|
2866
|
+
record: Dt,
|
|
2867
2867
|
set: Lt,
|
|
2868
2868
|
strictObject: At,
|
|
2869
|
-
string:
|
|
2869
|
+
string: We,
|
|
2870
2870
|
symbol: Zt,
|
|
2871
2871
|
transformer: je,
|
|
2872
2872
|
tuple: Pt,
|
|
@@ -2879,23 +2879,23 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2879
2879
|
quotelessJson: tt,
|
|
2880
2880
|
ZodError: N
|
|
2881
2881
|
});
|
|
2882
|
-
const
|
|
2883
|
-
const { formValidationTexts: r } =
|
|
2882
|
+
const ur = () => {
|
|
2883
|
+
const { formValidationTexts: r } = $e(He), e = (g) => (g != null && g.useCoerce ? O.coerce : O).string({
|
|
2884
2884
|
invalid_type_error: r.required,
|
|
2885
2885
|
required_error: r.required
|
|
2886
|
-
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((
|
|
2887
|
-
const
|
|
2886
|
+
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((b) => b ?? null), n = (g) => {
|
|
2887
|
+
const b = (g != null && g.useCoerce ? O.coerce : O).number({
|
|
2888
2888
|
invalid_type_error: r.required,
|
|
2889
2889
|
required_error: r.required
|
|
2890
2890
|
});
|
|
2891
|
-
return (g == null ? void 0 : g.min) !== void 0 &&
|
|
2892
|
-
}, s = (g) => n(g).nullable().optional().transform((
|
|
2891
|
+
return (g == null ? void 0 : g.min) !== void 0 && b.min(g.min), (g == null ? void 0 : g.max) !== void 0 && b.max(g.max), b.transform((w) => w ?? null);
|
|
2892
|
+
}, s = (g) => n(g).nullable().optional().transform((b) => b ?? 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((
|
|
2895
|
+
}).transform((b) => b ?? 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((
|
|
2898
|
+
}).refine(et, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((b) => b ?? null), u = (g, b) => O.enum(g, {
|
|
2899
2899
|
invalid_type_error: r.required,
|
|
2900
2900
|
required_error: r.required
|
|
2901
2901
|
}).transform((Re) => Re ?? null);
|
|
@@ -2907,16 +2907,16 @@ const cr = () => {
|
|
|
2907
2907
|
zBool: a,
|
|
2908
2908
|
zDate: o,
|
|
2909
2909
|
zDateRequired: i,
|
|
2910
|
-
zEnum: (g,
|
|
2910
|
+
zEnum: (g, b) => u(g).nullable().transform((w) => w ?? null),
|
|
2911
2911
|
zEnumRequired: u,
|
|
2912
2912
|
zObjectIdInt: (g) => O.object({ id: s({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2913
2913
|
zObjectIdIntRequired: (g) => O.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
2914
|
zObjectIdStr: (g) => O.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
2915
|
zObjectIdStrRequired: (g) => O.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
-
zFile: ({ required: g, multiple:
|
|
2916
|
+
zFile: ({ required: g, multiple: b, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => b || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((Ge) => Ge.size <= w), `Maximum file size is ${Fe(w)}.`).transform((T) => (b ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
|
-
},
|
|
2919
|
-
const t =
|
|
2918
|
+
}, lr = (r, e = !1) => {
|
|
2919
|
+
const t = Ae({ silent: e }), { startLoading: n, stopLoading: s } = $e(Qe), a = Xe(0), [i, o] = Me(null), u = Ke(async (c, m) => {
|
|
2920
2920
|
!e && n(`loadData-${r}-${m}`), o(null);
|
|
2921
2921
|
try {
|
|
2922
2922
|
const C = await t.get(r, {
|
|
@@ -2927,24 +2927,53 @@ const cr = () => {
|
|
|
2927
2927
|
!e && s(`loadData-${r}-${m}`);
|
|
2928
2928
|
}
|
|
2929
2929
|
}, [t, n, s, r, e]);
|
|
2930
|
-
return
|
|
2930
|
+
return ze(() => {
|
|
2931
2931
|
const c = new AbortController();
|
|
2932
2932
|
return u(c.signal, ++a.current), () => {
|
|
2933
2933
|
c.abort();
|
|
2934
2934
|
};
|
|
2935
2935
|
}, [u]), { data: i, setData: o };
|
|
2936
|
+
}, nr = (r) => {
|
|
2937
|
+
let e = "pending", t;
|
|
2938
|
+
const n = r.then((s) => {
|
|
2939
|
+
e = "success", t = s;
|
|
2940
|
+
}, (s) => {
|
|
2941
|
+
e = "error", t = s;
|
|
2942
|
+
});
|
|
2943
|
+
return () => {
|
|
2944
|
+
switch (e) {
|
|
2945
|
+
case "pending":
|
|
2946
|
+
throw n;
|
|
2947
|
+
case "success":
|
|
2948
|
+
return t;
|
|
2949
|
+
case "error":
|
|
2950
|
+
throw t;
|
|
2951
|
+
default:
|
|
2952
|
+
throw new Error("Unknown status");
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2936
2955
|
};
|
|
2956
|
+
function fr(r) {
|
|
2957
|
+
const e = Ae({ silent: !0 }), [t, n] = Me(null);
|
|
2958
|
+
return ze(() => {
|
|
2959
|
+
(async () => {
|
|
2960
|
+
const a = e.get(r).then((i) => i.data);
|
|
2961
|
+
n(nr(a));
|
|
2962
|
+
})();
|
|
2963
|
+
}, [e, r]), t;
|
|
2964
|
+
}
|
|
2937
2965
|
export {
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2966
|
+
pr as cancelToken,
|
|
2967
|
+
yr as useAuth,
|
|
2968
|
+
Ae as useAxios,
|
|
2969
|
+
br as useClickOutside,
|
|
2970
|
+
gr as useConfirm,
|
|
2971
|
+
wr as useFormControlType,
|
|
2972
|
+
lr as useGetApiData,
|
|
2973
|
+
fr as useGetDataBound,
|
|
2974
|
+
Tr as useKeyPress,
|
|
2975
|
+
_r as useNotifications,
|
|
2976
|
+
Cr as usePermissions,
|
|
2977
|
+
xr as usePrompt,
|
|
2978
|
+
ur as useZodSchemaTypes
|
|
2950
2979
|
};
|