react-luminus-components 1.2.43 → 1.2.45
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-CL8n-SeO.js → EventType-DIqpQkK_.js} +1 -1
- package/dist/{EventType-DWq5GS3Y.cjs → EventType-IAXuJf8R.cjs} +1 -1
- package/dist/{NoInputContainer-BKmw3xdm.js → NoInputContainer-BReesOiV.js} +5 -5
- package/dist/{NoInputContainer-DoFfFTND.cjs → NoInputContainer-GlxDKGwf.cjs} +14 -14
- package/dist/{SimpleTooltip-DyYYVmG7.js → SimpleTooltip-BzHyKewM.js} +1 -1
- package/dist/{SimpleTooltip-BePxo0C-.cjs → SimpleTooltip-wCGDQI44.cjs} +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +4 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +124 -110
- 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 +1310 -1307
- package/dist/style.css +1 -1
- package/dist/{useConfirm-D4nT0q-h.cjs → useConfirm-Cn2C3QOs.cjs} +1 -1
- package/dist/{useConfirm-DwMSFZPV.js → useConfirm-DIWTLBRl.js} +1 -1
- package/dist/{usePermissions-BoWWZ7Z8.cjs → usePermissions-BUDIInF0.cjs} +1 -1
- package/dist/{usePermissions-BVj_U7jR.js → usePermissions-IXexnHof.js} +1 -1
- package/dist/utils/hookForm/hookFormUtils.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +19 -13
- package/package.json +1 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { N as
|
|
2
|
-
import { aF as
|
|
3
|
-
import { a as
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { f as
|
|
6
|
-
import { i as
|
|
1
|
+
import { N as Ye, a5 as Je, am as He } from "./NoInputContainer-BReesOiV.js";
|
|
2
|
+
import { aF as fr, a9 as hr, aE as mr } from "./NoInputContainer-BReesOiV.js";
|
|
3
|
+
import { a as yr, u as _r } from "./useConfirm-DIWTLBRl.js";
|
|
4
|
+
import { useContext as Ae, useState as Ge, useCallback as Xe, useEffect as Ke } from "react";
|
|
5
|
+
import { f as Qe } from "./textUtils-BbxuIsKq.js";
|
|
6
|
+
import { i as Fe } from "./dateUtils-Crak7ii9.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
|
-
import { a as
|
|
9
|
-
import { u as
|
|
8
|
+
import { a as gr, u as xr } from "./useKeyPress-CwWcvmEW.js";
|
|
9
|
+
import { u as br } from "./usePermissions-IXexnHof.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -110,7 +110,7 @@ const f = x.arrayToEnum([
|
|
|
110
110
|
"invalid_intersection_types",
|
|
111
111
|
"not_multiple_of",
|
|
112
112
|
"not_finite"
|
|
113
|
-
]),
|
|
113
|
+
]), et = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
114
114
|
class N extends Error {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -227,12 +227,12 @@ const G = (r, e) => {
|
|
|
227
227
|
}
|
|
228
228
|
return { message: t };
|
|
229
229
|
};
|
|
230
|
-
let
|
|
231
|
-
function
|
|
232
|
-
|
|
230
|
+
let Me = G;
|
|
231
|
+
function tt(r) {
|
|
232
|
+
Me = r;
|
|
233
233
|
}
|
|
234
234
|
function ye() {
|
|
235
|
-
return
|
|
235
|
+
return Me;
|
|
236
236
|
}
|
|
237
237
|
const _e = (r) => {
|
|
238
238
|
const { data: e, path: t, errorMaps: n, issueData: s } = r, a = [...t, ...s.path || []], i = {
|
|
@@ -254,7 +254,7 @@ const _e = (r) => {
|
|
|
254
254
|
path: a,
|
|
255
255
|
message: o
|
|
256
256
|
};
|
|
257
|
-
},
|
|
257
|
+
}, rt = [];
|
|
258
258
|
function l(r, e) {
|
|
259
259
|
const t = ye(), n = _e({
|
|
260
260
|
issueData: e,
|
|
@@ -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 $e(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;
|
|
@@ -547,23 +547,23 @@ class v {
|
|
|
547
547
|
return this.safeParse(null).success;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
const
|
|
550
|
+
const nt = /^c[^\s-]{8,}$/i, st = /^[0-9a-z]+$/, at = /^[0-9A-HJKMNP-TV-Z]{26}$/, it = /^[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, ot = /^[a-z0-9_-]{21}$/i, dt = /^[-+]?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)?)??$/, ct = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ut = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
551
551
|
let Ze;
|
|
552
|
-
const
|
|
553
|
-
function
|
|
552
|
+
const lt = /^(?:(?: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])$/, ft = /^(([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})))$/, ht = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ze = "((\\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])))", mt = new RegExp(`^${ze}$`);
|
|
553
|
+
function Pe(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
|
-
function
|
|
558
|
-
return new RegExp(`^${
|
|
557
|
+
function pt(r) {
|
|
558
|
+
return new RegExp(`^${Pe(r)}$`);
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let e = `${
|
|
560
|
+
function Ve(r) {
|
|
561
|
+
let e = `${ze}T${Pe(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
|
}
|
|
565
|
-
function
|
|
566
|
-
return !!((e === "v4" || !e) &&
|
|
565
|
+
function yt(r, e) {
|
|
566
|
+
return !!((e === "v4" || !e) && lt.test(r) || (e === "v6" || !e) && ft.test(r));
|
|
567
567
|
}
|
|
568
568
|
class E extends v {
|
|
569
569
|
_parse(e) {
|
|
@@ -614,43 +614,43 @@ class E extends v {
|
|
|
614
614
|
message: a.message
|
|
615
615
|
}), n.dirty());
|
|
616
616
|
} else if (a.kind === "email")
|
|
617
|
-
|
|
617
|
+
ct.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
618
618
|
validation: "email",
|
|
619
619
|
code: d.invalid_string,
|
|
620
620
|
message: a.message
|
|
621
621
|
}), n.dirty());
|
|
622
622
|
else if (a.kind === "emoji")
|
|
623
|
-
Ze || (Ze = new RegExp(
|
|
623
|
+
Ze || (Ze = new RegExp(ut, "u")), Ze.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
624
624
|
validation: "emoji",
|
|
625
625
|
code: d.invalid_string,
|
|
626
626
|
message: a.message
|
|
627
627
|
}), n.dirty());
|
|
628
628
|
else if (a.kind === "uuid")
|
|
629
|
-
|
|
629
|
+
it.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
630
630
|
validation: "uuid",
|
|
631
631
|
code: d.invalid_string,
|
|
632
632
|
message: a.message
|
|
633
633
|
}), n.dirty());
|
|
634
634
|
else if (a.kind === "nanoid")
|
|
635
|
-
|
|
635
|
+
ot.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
636
636
|
validation: "nanoid",
|
|
637
637
|
code: d.invalid_string,
|
|
638
638
|
message: a.message
|
|
639
639
|
}), n.dirty());
|
|
640
640
|
else if (a.kind === "cuid")
|
|
641
|
-
|
|
641
|
+
nt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
642
642
|
validation: "cuid",
|
|
643
643
|
code: d.invalid_string,
|
|
644
644
|
message: a.message
|
|
645
645
|
}), n.dirty());
|
|
646
646
|
else if (a.kind === "cuid2")
|
|
647
|
-
|
|
647
|
+
st.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
648
648
|
validation: "cuid2",
|
|
649
649
|
code: d.invalid_string,
|
|
650
650
|
message: a.message
|
|
651
651
|
}), n.dirty());
|
|
652
652
|
else if (a.kind === "ulid")
|
|
653
|
-
|
|
653
|
+
at.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
654
654
|
validation: "ulid",
|
|
655
655
|
code: d.invalid_string,
|
|
656
656
|
message: a.message
|
|
@@ -682,27 +682,27 @@ 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" ? Ve(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
|
|
689
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
689
|
+
}), n.dirty()) : a.kind === "date" ? mt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
690
690
|
code: d.invalid_string,
|
|
691
691
|
validation: "date",
|
|
692
692
|
message: a.message
|
|
693
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
693
|
+
}), n.dirty()) : a.kind === "time" ? pt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
694
694
|
code: d.invalid_string,
|
|
695
695
|
validation: "time",
|
|
696
696
|
message: a.message
|
|
697
|
-
}), n.dirty()) : a.kind === "duration" ?
|
|
697
|
+
}), n.dirty()) : a.kind === "duration" ? dt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
698
698
|
validation: "duration",
|
|
699
699
|
code: d.invalid_string,
|
|
700
700
|
message: a.message
|
|
701
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
701
|
+
}), n.dirty()) : a.kind === "ip" ? yt(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
702
702
|
validation: "ip",
|
|
703
703
|
code: d.invalid_string,
|
|
704
704
|
message: a.message
|
|
705
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
705
|
+
}), n.dirty()) : a.kind === "base64" ? ht.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
706
706
|
validation: "base64",
|
|
707
707
|
code: d.invalid_string,
|
|
708
708
|
message: a.message
|
|
@@ -924,7 +924,7 @@ E.create = (r) => {
|
|
|
924
924
|
..._(r)
|
|
925
925
|
});
|
|
926
926
|
};
|
|
927
|
-
function
|
|
927
|
+
function _t(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
|
}
|
|
@@ -963,7 +963,7 @@ class V extends v {
|
|
|
963
963
|
inclusive: a.inclusive,
|
|
964
964
|
exact: !1,
|
|
965
965
|
message: a.message
|
|
966
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
966
|
+
}), s.dirty()) : a.kind === "multipleOf" ? _t(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), l(n, {
|
|
967
967
|
code: d.not_multiple_of,
|
|
968
968
|
multipleOf: a.value,
|
|
969
969
|
message: a.message
|
|
@@ -1784,7 +1784,7 @@ class k extends v {
|
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
keyof() {
|
|
1787
|
-
return
|
|
1787
|
+
return De(x.objectKeys(this.shape));
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
k.create = (r, e) => new k({
|
|
@@ -2348,7 +2348,7 @@ ce.create = (r, e) => new ce({
|
|
|
2348
2348
|
typeName: m.ZodLiteral,
|
|
2349
2349
|
..._(e)
|
|
2350
2350
|
});
|
|
2351
|
-
function
|
|
2351
|
+
function De(r, e) {
|
|
2352
2352
|
return new L({
|
|
2353
2353
|
values: r,
|
|
2354
2354
|
typeName: m.ZodEnum,
|
|
@@ -2368,7 +2368,7 @@ class L extends v {
|
|
|
2368
2368
|
code: d.invalid_type
|
|
2369
2369
|
}), p;
|
|
2370
2370
|
}
|
|
2371
|
-
if (ve(this, Q) ||
|
|
2371
|
+
if (ve(this, Q) || $e(this, Q, new Set(this._def.values)), !ve(this, Q).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
|
Q = /* @__PURE__ */ new WeakMap();
|
|
2416
|
-
L.create =
|
|
2416
|
+
L.create = De;
|
|
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
|
}), p;
|
|
2430
2430
|
}
|
|
2431
|
-
if (ve(this, F) ||
|
|
2431
|
+
if (ve(this, F) || $e(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,
|
|
@@ -2667,7 +2667,7 @@ be.create = (r) => new be({
|
|
|
2667
2667
|
typeName: m.ZodNaN,
|
|
2668
2668
|
..._(r)
|
|
2669
2669
|
});
|
|
2670
|
-
const
|
|
2670
|
+
const vt = Symbol("zod_brand");
|
|
2671
2671
|
class Ee extends v {
|
|
2672
2672
|
_parse(e) {
|
|
2673
2673
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -2735,7 +2735,7 @@ he.create = (r, e) => new he({
|
|
|
2735
2735
|
typeName: m.ZodReadonly,
|
|
2736
2736
|
..._(e)
|
|
2737
2737
|
});
|
|
2738
|
-
function
|
|
2738
|
+
function Le(r, e = {}, t) {
|
|
2739
2739
|
return r ? X.create().superRefine((n, s) => {
|
|
2740
2740
|
var a, i;
|
|
2741
2741
|
if (!r(n)) {
|
|
@@ -2744,16 +2744,16 @@ function De(r, e = {}, t) {
|
|
|
2744
2744
|
}
|
|
2745
2745
|
}) : X.create();
|
|
2746
2746
|
}
|
|
2747
|
-
const
|
|
2747
|
+
const gt = {
|
|
2748
2748
|
object: k.lazycreate
|
|
2749
2749
|
};
|
|
2750
2750
|
var m;
|
|
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
|
})(m || (m = {}));
|
|
2754
|
-
const
|
|
2754
|
+
const xt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) =>
|
|
2756
|
+
}) => Le((t) => t instanceof r, e), qe = E.create, Ue = V.create, kt = be.create, bt = D.create, Be = re.create, wt = B.create, Tt = ge.create, Zt = ne.create, St = se.create, Ct = X.create, Ot = U.create, Nt = z.create, Et = xe.create, Rt = R.create, It = k.create, jt = k.strictCreate, At = ae.create, Mt = we.create, $t = ie.create, zt = M.create, Pt = oe.create, Vt = ke.create, Dt = W.create, Lt = H.create, qt = de.create, Ut = ce.create, Bt = L.create, Wt = ue.create, Yt = K.create, je = I.create, Jt = j.create, Ht = q.create, Gt = I.createWithPreprocess, Xt = me.create, Kt = () => qe().optional(), Qt = () => Ue().optional(), Ft = () => Be().optional(), er = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => re.create({
|
|
@@ -2762,14 +2762,14 @@ const pt = (r, e = {
|
|
|
2762
2762
|
}),
|
|
2763
2763
|
bigint: (r) => D.create({ ...r, coerce: !0 }),
|
|
2764
2764
|
date: (r) => B.create({ ...r, coerce: !0 })
|
|
2765
|
-
},
|
|
2765
|
+
}, tr = p;
|
|
2766
2766
|
var C = /* @__PURE__ */ Object.freeze({
|
|
2767
2767
|
__proto__: null,
|
|
2768
2768
|
defaultErrorMap: G,
|
|
2769
|
-
setErrorMap:
|
|
2769
|
+
setErrorMap: tt,
|
|
2770
2770
|
getErrorMap: ye,
|
|
2771
2771
|
makeIssue: _e,
|
|
2772
|
-
EMPTY_PATH:
|
|
2772
|
+
EMPTY_PATH: rt,
|
|
2773
2773
|
addIssueToContext: l,
|
|
2774
2774
|
ParseStatus: Z,
|
|
2775
2775
|
INVALID: p,
|
|
@@ -2788,7 +2788,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2788
2788
|
ZodParsedType: f,
|
|
2789
2789
|
getParsedType: P,
|
|
2790
2790
|
ZodType: v,
|
|
2791
|
-
datetimeRegex:
|
|
2791
|
+
datetimeRegex: Ve,
|
|
2792
2792
|
ZodString: E,
|
|
2793
2793
|
ZodNumber: V,
|
|
2794
2794
|
ZodBigInt: D,
|
|
@@ -2823,64 +2823,64 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2823
2823
|
ZodDefault: le,
|
|
2824
2824
|
ZodCatch: fe,
|
|
2825
2825
|
ZodNaN: be,
|
|
2826
|
-
BRAND:
|
|
2826
|
+
BRAND: vt,
|
|
2827
2827
|
ZodBranded: Ee,
|
|
2828
2828
|
ZodPipeline: me,
|
|
2829
2829
|
ZodReadonly: he,
|
|
2830
|
-
custom:
|
|
2830
|
+
custom: Le,
|
|
2831
2831
|
Schema: v,
|
|
2832
2832
|
ZodSchema: v,
|
|
2833
|
-
late:
|
|
2833
|
+
late: gt,
|
|
2834
2834
|
get ZodFirstPartyTypeKind() {
|
|
2835
2835
|
return m;
|
|
2836
2836
|
},
|
|
2837
|
-
coerce:
|
|
2838
|
-
any:
|
|
2839
|
-
array:
|
|
2840
|
-
bigint:
|
|
2841
|
-
boolean:
|
|
2842
|
-
date:
|
|
2843
|
-
discriminatedUnion:
|
|
2837
|
+
coerce: er,
|
|
2838
|
+
any: Ct,
|
|
2839
|
+
array: Rt,
|
|
2840
|
+
bigint: bt,
|
|
2841
|
+
boolean: Be,
|
|
2842
|
+
date: wt,
|
|
2843
|
+
discriminatedUnion: Mt,
|
|
2844
2844
|
effect: je,
|
|
2845
|
-
enum:
|
|
2846
|
-
function:
|
|
2847
|
-
instanceof:
|
|
2848
|
-
intersection:
|
|
2849
|
-
lazy:
|
|
2850
|
-
literal:
|
|
2851
|
-
map:
|
|
2852
|
-
nan:
|
|
2853
|
-
nativeEnum:
|
|
2854
|
-
never:
|
|
2855
|
-
null:
|
|
2856
|
-
nullable:
|
|
2857
|
-
number:
|
|
2858
|
-
object:
|
|
2859
|
-
oboolean:
|
|
2860
|
-
onumber:
|
|
2861
|
-
optional:
|
|
2862
|
-
ostring:
|
|
2863
|
-
pipeline:
|
|
2864
|
-
preprocess:
|
|
2865
|
-
promise:
|
|
2866
|
-
record:
|
|
2867
|
-
set:
|
|
2868
|
-
strictObject:
|
|
2869
|
-
string:
|
|
2870
|
-
symbol:
|
|
2845
|
+
enum: Bt,
|
|
2846
|
+
function: Lt,
|
|
2847
|
+
instanceof: xt,
|
|
2848
|
+
intersection: $t,
|
|
2849
|
+
lazy: qt,
|
|
2850
|
+
literal: Ut,
|
|
2851
|
+
map: Vt,
|
|
2852
|
+
nan: kt,
|
|
2853
|
+
nativeEnum: Wt,
|
|
2854
|
+
never: Nt,
|
|
2855
|
+
null: St,
|
|
2856
|
+
nullable: Ht,
|
|
2857
|
+
number: Ue,
|
|
2858
|
+
object: It,
|
|
2859
|
+
oboolean: Ft,
|
|
2860
|
+
onumber: Qt,
|
|
2861
|
+
optional: Jt,
|
|
2862
|
+
ostring: Kt,
|
|
2863
|
+
pipeline: Xt,
|
|
2864
|
+
preprocess: Gt,
|
|
2865
|
+
promise: Yt,
|
|
2866
|
+
record: Pt,
|
|
2867
|
+
set: Dt,
|
|
2868
|
+
strictObject: jt,
|
|
2869
|
+
string: qe,
|
|
2870
|
+
symbol: Tt,
|
|
2871
2871
|
transformer: je,
|
|
2872
|
-
tuple:
|
|
2873
|
-
undefined:
|
|
2874
|
-
union:
|
|
2875
|
-
unknown:
|
|
2876
|
-
void:
|
|
2877
|
-
NEVER:
|
|
2872
|
+
tuple: zt,
|
|
2873
|
+
undefined: Zt,
|
|
2874
|
+
union: At,
|
|
2875
|
+
unknown: Ot,
|
|
2876
|
+
void: Et,
|
|
2877
|
+
NEVER: tr,
|
|
2878
2878
|
ZodIssueCode: d,
|
|
2879
|
-
quotelessJson:
|
|
2879
|
+
quotelessJson: et,
|
|
2880
2880
|
ZodError: N
|
|
2881
2881
|
});
|
|
2882
|
-
const
|
|
2883
|
-
const { formValidationTexts: r } = Ye
|
|
2882
|
+
const dr = () => {
|
|
2883
|
+
const { formValidationTexts: r } = Ae(Ye), e = (g) => (g != null && g.useCoerce ? C.coerce : C).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((b) => b ?? null), n = (g) => {
|
|
@@ -2895,7 +2895,7 @@ const nr = () => {
|
|
|
2895
2895
|
}).transform((b) => b ?? null), i = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2896
2896
|
invalid_type_error: r.required,
|
|
2897
2897
|
required_error: r.required
|
|
2898
|
-
}).refine(
|
|
2898
|
+
}).refine(Fe, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((b) => b ?? null), u = (g, b) => C.enum(g, {
|
|
2899
2899
|
invalid_type_error: r.required,
|
|
2900
2900
|
required_error: r.required
|
|
2901
2901
|
}).transform((Re) => Re ?? null);
|
|
@@ -2913,18 +2913,32 @@ const nr = () => {
|
|
|
2913
2913
|
zObjectIdIntRequired: (g) => C.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
2914
|
zObjectIdStr: (g) => C.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
2915
|
zObjectIdStrRequired: (g) => C.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
-
zFile: ({ required: g, multiple: b, maxFileSize: w }) => C.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((
|
|
2916
|
+
zFile: ({ required: g, multiple: b, maxFileSize: w }) => C.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((We) => We.size <= w), `Maximum file size is ${Qe(w)}.`).transform((T) => (b ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
|
+
}, cr = (r) => {
|
|
2919
|
+
const e = Je(), { startLoading: t, stopLoading: n } = Ae(He), [s, a] = Ge(null), i = Xe(async () => {
|
|
2920
|
+
t(`loadData-${r}`), a(null);
|
|
2921
|
+
try {
|
|
2922
|
+
const o = await e.get(r);
|
|
2923
|
+
a(o.data);
|
|
2924
|
+
} finally {
|
|
2925
|
+
n(`loadData-${r}`);
|
|
2926
|
+
}
|
|
2927
|
+
}, [e, t, n, r]);
|
|
2928
|
+
return Ke(() => {
|
|
2929
|
+
i();
|
|
2930
|
+
}, [i]), { data: s };
|
|
2918
2931
|
};
|
|
2919
2932
|
export {
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2933
|
+
fr as cancelToken,
|
|
2934
|
+
hr as useAuth,
|
|
2935
|
+
Je as useAxios,
|
|
2936
|
+
gr as useClickOutside,
|
|
2937
|
+
yr as useConfirm,
|
|
2938
|
+
cr as useGetApiData,
|
|
2939
|
+
xr as useKeyPress,
|
|
2940
|
+
mr as useNotifications,
|
|
2941
|
+
br as usePermissions,
|
|
2942
|
+
_r as usePrompt,
|
|
2943
|
+
dr as useZodSchemaTypes
|
|
2930
2944
|
};
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-GlxDKGwf.cjs"),u=require("react");require("react-hook-form");const w=require("./usePermissions-BUDIInF0.cjs"),C=require("./SimpleTooltip-wCGDQI44.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:H},L=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},q="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:q,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]}),X="_full-screen-container_1rm4r_1",Y={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:X},Z=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",l?"p-0":"p-3",c,Y.fullScreenContainer),style:{width:i?`calc(100% - ${a}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]});exports.FullScreenContainer=Z;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as B, j as e, b as o, W as I, X as P } from "./NoInputContainer-
|
|
1
|
+
import { N as B, j as e, b as o, W as I, X as P } from "./NoInputContainer-BReesOiV.js";
|
|
2
2
|
import { useContext as C, useState as M, useMemo as j, useEffect as g } from "react";
|
|
3
3
|
import "react-hook-form";
|
|
4
|
-
import { u as y } from "./usePermissions-
|
|
5
|
-
import { S } from "./SimpleTooltip-
|
|
4
|
+
import { u as y } from "./usePermissions-IXexnHof.js";
|
|
5
|
+
import { S } from "./SimpleTooltip-BzHyKewM.js";
|
|
6
6
|
const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", U = "_children-container_6vbwa_57", X = "_visible_6vbwa_65", q = "_children_6vbwa_57", i = {
|
|
7
7
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
8
8
|
sideMenuItem: T,
|