react-luminus-components 1.2.36 → 1.2.38
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/README.md +355 -355
- package/dist/.vite/manifest.json +46 -46
- package/dist/{EventType-SEEDuisM.js → EventType--bYeqoGO.js} +1 -1
- package/dist/{EventType-Dodj1wMo.cjs → EventType-DXVXbODv.cjs} +1 -1
- package/dist/{UserAvatarToggle-rzyVxLmG.cjs → NoInputContainer-BkFSaMQy.cjs} +1 -1
- package/dist/{UserAvatarToggle-CH7OqxNp.js → NoInputContainer-LdJeEMWI.js} +57 -58
- package/dist/SimpleTooltip-C_iRq-Q0.cjs +1 -0
- package/dist/SimpleTooltip-mxX4RNUy.js +5 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +28 -28
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +6 -6
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +98 -89
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +15 -15
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +729 -729
- package/dist/style.css +1 -1
- package/dist/useConfirm-BK_yKNWQ.cjs +1 -0
- package/dist/{useConfirm-B3BI8PzR.js → useConfirm-ee4Czv-n.js} +1 -1
- package/dist/{usePermissions-DVO-znuB.js → usePermissions-CHfDy8Yx.js} +1 -1
- package/dist/usePermissions-yA39pMjm.cjs +1 -0
- package/package.json +100 -100
- package/dist/SimpleTooltip-MhGCEWts.js +0 -5
- package/dist/SimpleTooltip-OE_cbcNU.cjs +0 -1
- package/dist/useConfirm-9zGqmWEb.cjs +0 -1
- package/dist/usePermissions-CO93mmCn.cjs +0 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { N as We } from "./
|
|
2
|
-
import { aF as ir,
|
|
3
|
-
import { a as lr, u as fr } from "./useConfirm-
|
|
1
|
+
import { N as We } from "./NoInputContainer-LdJeEMWI.js";
|
|
2
|
+
import { aF as ir, a9 as or, a5 as dr, aE as cr } from "./NoInputContainer-LdJeEMWI.js";
|
|
3
|
+
import { a as lr, u as fr } from "./useConfirm-ee4Czv-n.js";
|
|
4
4
|
import { useContext as Ye } from "react";
|
|
5
5
|
import { f as Je } from "./textUtils-BbxuIsKq.js";
|
|
6
6
|
import { i as He } from "./dateUtils-Crak7ii9.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import { a as mr, u as pr } from "./useKeyPress-CwWcvmEW.js";
|
|
9
|
-
import { u as _r } from "./usePermissions-
|
|
9
|
+
import { u as _r } from "./usePermissions-CHfDy8Yx.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -111,7 +111,7 @@ const f = x.arrayToEnum([
|
|
|
111
111
|
"not_multiple_of",
|
|
112
112
|
"not_finite"
|
|
113
113
|
]), Ge = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
114
|
-
class
|
|
114
|
+
class O extends Error {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
117
117
|
this.issues = [...this.issues, n];
|
|
@@ -148,7 +148,7 @@ class N extends Error {
|
|
|
148
148
|
return s(this), n;
|
|
149
149
|
}
|
|
150
150
|
static assert(e) {
|
|
151
|
-
if (!(e instanceof
|
|
151
|
+
if (!(e instanceof O))
|
|
152
152
|
throw new Error(`Not a ZodError: ${e}`);
|
|
153
153
|
}
|
|
154
154
|
toString() {
|
|
@@ -170,7 +170,7 @@ class N extends Error {
|
|
|
170
170
|
return this.flatten();
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
O.create = (r) => new O(r);
|
|
174
174
|
const G = (r, e) => {
|
|
175
175
|
let t;
|
|
176
176
|
switch (r.code) {
|
|
@@ -313,7 +313,7 @@ class Z {
|
|
|
313
313
|
}
|
|
314
314
|
const p = Object.freeze({
|
|
315
315
|
status: "aborted"
|
|
316
|
-
}), J = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted",
|
|
316
|
+
}), J = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted", Ne = (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");
|
|
@@ -347,7 +347,7 @@ const Ie = (r, e) => {
|
|
|
347
347
|
get error() {
|
|
348
348
|
if (this._error)
|
|
349
349
|
return this._error;
|
|
350
|
-
const t = new
|
|
350
|
+
const t = new O(r.common.issues);
|
|
351
351
|
return this._error = t, this._error;
|
|
352
352
|
}
|
|
353
353
|
};
|
|
@@ -477,7 +477,7 @@ class v {
|
|
|
477
477
|
return j.create(this, this._def);
|
|
478
478
|
}
|
|
479
479
|
nullable() {
|
|
480
|
-
return
|
|
480
|
+
return q.create(this, this._def);
|
|
481
481
|
}
|
|
482
482
|
nullish() {
|
|
483
483
|
return this.nullable().optional();
|
|
@@ -1246,7 +1246,7 @@ re.create = (r) => new re({
|
|
|
1246
1246
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1247
1247
|
..._(r)
|
|
1248
1248
|
});
|
|
1249
|
-
class
|
|
1249
|
+
class B extends v {
|
|
1250
1250
|
_parse(e) {
|
|
1251
1251
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
1252
1252
|
const a = this._getOrReturnCtx(e);
|
|
@@ -1286,7 +1286,7 @@ class q extends v {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
_addCheck(e) {
|
|
1289
|
-
return new
|
|
1289
|
+
return new B({
|
|
1290
1290
|
...this._def,
|
|
1291
1291
|
checks: [...this._def.checks, e]
|
|
1292
1292
|
});
|
|
@@ -1318,7 +1318,7 @@ class q extends v {
|
|
|
1318
1318
|
return e != null ? new Date(e) : null;
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
|
|
1321
|
+
B.create = (r) => new B({
|
|
1322
1322
|
checks: [],
|
|
1323
1323
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1324
1324
|
typeName: m.ZodDate,
|
|
@@ -1387,7 +1387,7 @@ X.create = (r) => new X({
|
|
|
1387
1387
|
typeName: m.ZodAny,
|
|
1388
1388
|
..._(r)
|
|
1389
1389
|
});
|
|
1390
|
-
class
|
|
1390
|
+
class U extends v {
|
|
1391
1391
|
constructor() {
|
|
1392
1392
|
super(...arguments), this._unknown = !0;
|
|
1393
1393
|
}
|
|
@@ -1395,7 +1395,7 @@ class B extends v {
|
|
|
1395
1395
|
return S(e.data);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
|
|
1398
|
+
U.create = (r) => new U({
|
|
1399
1399
|
typeName: m.ZodUnknown,
|
|
1400
1400
|
..._(r)
|
|
1401
1401
|
});
|
|
@@ -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 b) {
|
|
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 b({
|
|
1514
1514
|
...r._def,
|
|
1515
1515
|
shape: () => e
|
|
1516
1516
|
});
|
|
@@ -1518,9 +1518,9 @@ function Y(r) {
|
|
|
1518
1518
|
return r instanceof R ? new R({
|
|
1519
1519
|
...r._def,
|
|
1520
1520
|
type: Y(r.element)
|
|
1521
|
-
}) : r instanceof j ? j.create(Y(r.unwrap())) : r instanceof
|
|
1521
|
+
}) : r instanceof j ? j.create(Y(r.unwrap())) : r instanceof q ? q.create(Y(r.unwrap())) : r instanceof M ? M.create(r.items.map((e) => Y(e))) : r;
|
|
1522
1522
|
}
|
|
1523
|
-
class
|
|
1523
|
+
class b extends v {
|
|
1524
1524
|
constructor() {
|
|
1525
1525
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1526
1526
|
}
|
|
@@ -1545,10 +1545,10 @@ class k extends v {
|
|
|
1545
1545
|
i.includes(c) || o.push(c);
|
|
1546
1546
|
const u = [];
|
|
1547
1547
|
for (const c of i) {
|
|
1548
|
-
const y = a[c],
|
|
1548
|
+
const y = a[c], N = s.data[c];
|
|
1549
1549
|
u.push({
|
|
1550
1550
|
key: { status: "valid", value: c },
|
|
1551
|
-
value: y._parse(new A(s,
|
|
1551
|
+
value: y._parse(new A(s, N, s.path, c)),
|
|
1552
1552
|
alwaysSet: c in s.data
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
@@ -1570,11 +1570,11 @@ class k extends v {
|
|
|
1570
1570
|
} else {
|
|
1571
1571
|
const c = this._def.catchall;
|
|
1572
1572
|
for (const y of o) {
|
|
1573
|
-
const
|
|
1573
|
+
const N = s.data[y];
|
|
1574
1574
|
u.push({
|
|
1575
1575
|
key: { status: "valid", value: y },
|
|
1576
1576
|
value: c._parse(
|
|
1577
|
-
new A(s,
|
|
1577
|
+
new A(s, N, s.path, y)
|
|
1578
1578
|
//, ctx.child(key), value, getParsedType(value)
|
|
1579
1579
|
),
|
|
1580
1580
|
alwaysSet: y in s.data
|
|
@@ -1584,9 +1584,9 @@ class k extends v {
|
|
|
1584
1584
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1585
1585
|
const c = [];
|
|
1586
1586
|
for (const y of u) {
|
|
1587
|
-
const
|
|
1587
|
+
const N = await y.key, Te = await y.value;
|
|
1588
1588
|
c.push({
|
|
1589
|
-
key:
|
|
1589
|
+
key: N,
|
|
1590
1590
|
value: Te,
|
|
1591
1591
|
alwaysSet: y.alwaysSet
|
|
1592
1592
|
});
|
|
@@ -1598,7 +1598,7 @@ class k extends v {
|
|
|
1598
1598
|
return this._def.shape();
|
|
1599
1599
|
}
|
|
1600
1600
|
strict(e) {
|
|
1601
|
-
return h.errToObj, new
|
|
1601
|
+
return h.errToObj, new b({
|
|
1602
1602
|
...this._def,
|
|
1603
1603
|
unknownKeys: "strict",
|
|
1604
1604
|
...e !== void 0 ? {
|
|
@@ -1615,13 +1615,13 @@ class k extends v {
|
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
strip() {
|
|
1618
|
-
return new
|
|
1618
|
+
return new b({
|
|
1619
1619
|
...this._def,
|
|
1620
1620
|
unknownKeys: "strip"
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|
|
1623
1623
|
passthrough() {
|
|
1624
|
-
return new
|
|
1624
|
+
return new b({
|
|
1625
1625
|
...this._def,
|
|
1626
1626
|
unknownKeys: "passthrough"
|
|
1627
1627
|
});
|
|
@@ -1644,7 +1644,7 @@ class k extends v {
|
|
|
1644
1644
|
// }) as any;
|
|
1645
1645
|
// };
|
|
1646
1646
|
extend(e) {
|
|
1647
|
-
return new
|
|
1647
|
+
return new b({
|
|
1648
1648
|
...this._def,
|
|
1649
1649
|
shape: () => ({
|
|
1650
1650
|
...this._def.shape(),
|
|
@@ -1658,7 +1658,7 @@ class k extends v {
|
|
|
1658
1658
|
* upgrade if you are experiencing issues.
|
|
1659
1659
|
*/
|
|
1660
1660
|
merge(e) {
|
|
1661
|
-
return new
|
|
1661
|
+
return new b({
|
|
1662
1662
|
unknownKeys: e._def.unknownKeys,
|
|
1663
1663
|
catchall: e._def.catchall,
|
|
1664
1664
|
shape: () => ({
|
|
@@ -1728,7 +1728,7 @@ class k extends v {
|
|
|
1728
1728
|
// return merged;
|
|
1729
1729
|
// }
|
|
1730
1730
|
catchall(e) {
|
|
1731
|
-
return new
|
|
1731
|
+
return new b({
|
|
1732
1732
|
...this._def,
|
|
1733
1733
|
catchall: e
|
|
1734
1734
|
});
|
|
@@ -1737,7 +1737,7 @@ class k 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 b({
|
|
1741
1741
|
...this._def,
|
|
1742
1742
|
shape: () => t
|
|
1743
1743
|
});
|
|
@@ -1746,7 +1746,7 @@ class k 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 b({
|
|
1750
1750
|
...this._def,
|
|
1751
1751
|
shape: () => t
|
|
1752
1752
|
});
|
|
@@ -1762,7 +1762,7 @@ class k 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 b({
|
|
1766
1766
|
...this._def,
|
|
1767
1767
|
shape: () => t
|
|
1768
1768
|
});
|
|
@@ -1778,7 +1778,7 @@ class k extends v {
|
|
|
1778
1778
|
a = a._def.innerType;
|
|
1779
1779
|
t[n] = a;
|
|
1780
1780
|
}
|
|
1781
|
-
}), new
|
|
1781
|
+
}), new b({
|
|
1782
1782
|
...this._def,
|
|
1783
1783
|
shape: () => t
|
|
1784
1784
|
});
|
|
@@ -1787,21 +1787,21 @@ class k extends v {
|
|
|
1787
1787
|
return Ve(x.objectKeys(this.shape));
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
|
-
|
|
1790
|
+
b.create = (r, e) => new b({
|
|
1791
1791
|
shape: () => r,
|
|
1792
1792
|
unknownKeys: "strip",
|
|
1793
1793
|
catchall: z.create(),
|
|
1794
1794
|
typeName: m.ZodObject,
|
|
1795
1795
|
..._(e)
|
|
1796
1796
|
});
|
|
1797
|
-
|
|
1797
|
+
b.strictCreate = (r, e) => new b({
|
|
1798
1798
|
shape: () => r,
|
|
1799
1799
|
unknownKeys: "strict",
|
|
1800
1800
|
catchall: z.create(),
|
|
1801
1801
|
typeName: m.ZodObject,
|
|
1802
1802
|
..._(e)
|
|
1803
1803
|
});
|
|
1804
|
-
|
|
1804
|
+
b.lazycreate = (r, e) => new b({
|
|
1805
1805
|
shape: r,
|
|
1806
1806
|
unknownKeys: "strip",
|
|
1807
1807
|
catchall: z.create(),
|
|
@@ -1818,7 +1818,7 @@ class ae extends v {
|
|
|
1818
1818
|
for (const o of a)
|
|
1819
1819
|
if (o.result.status === "dirty")
|
|
1820
1820
|
return t.common.issues.push(...o.ctx.common.issues), o.result;
|
|
1821
|
-
const i = a.map((o) => new
|
|
1821
|
+
const i = a.map((o) => new O(o.ctx.common.issues));
|
|
1822
1822
|
return l(t, {
|
|
1823
1823
|
code: d.invalid_union,
|
|
1824
1824
|
unionErrors: i
|
|
@@ -1865,7 +1865,7 @@ class ae extends v {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
if (a)
|
|
1867
1867
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1868
|
-
const o = i.map((u) => new
|
|
1868
|
+
const o = i.map((u) => new O(u));
|
|
1869
1869
|
return l(t, {
|
|
1870
1870
|
code: d.invalid_union,
|
|
1871
1871
|
unionErrors: o
|
|
@@ -1881,7 +1881,7 @@ ae.create = (r, e) => new ae({
|
|
|
1881
1881
|
typeName: m.ZodUnion,
|
|
1882
1882
|
..._(e)
|
|
1883
1883
|
});
|
|
1884
|
-
const $ = (r) => r instanceof de ? $(r.schema) : r instanceof I ? $(r.innerType()) : r instanceof ce ? [r.value] : r instanceof L ? r.options : r instanceof ue ? x.objectValues(r.enum) : r instanceof le ? $(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof se ? [null] : r instanceof j ? [void 0, ...$(r.unwrap())] : r instanceof
|
|
1884
|
+
const $ = (r) => r instanceof de ? $(r.schema) : r instanceof I ? $(r.innerType()) : r instanceof ce ? [r.value] : r instanceof L ? r.options : r instanceof ue ? x.objectValues(r.enum) : r instanceof le ? $(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof se ? [null] : r instanceof j ? [void 0, ...$(r.unwrap())] : r instanceof q ? [null, ...$(r.unwrap())] : r instanceof Ee || r instanceof he ? $(r.unwrap()) : r instanceof fe ? $(r._def.innerType) : [];
|
|
1885
1885
|
class we extends v {
|
|
1886
1886
|
_parse(e) {
|
|
1887
1887
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -1944,14 +1944,14 @@ class we extends v {
|
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function Oe(r, e) {
|
|
1948
1948
|
const t = P(r), n = P(e);
|
|
1949
1949
|
if (r === e)
|
|
1950
1950
|
return { valid: !0, data: r };
|
|
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 u =
|
|
1954
|
+
const u = Oe(r[o], e[o]);
|
|
1955
1955
|
if (!u.valid)
|
|
1956
1956
|
return { valid: !1 };
|
|
1957
1957
|
i[o] = u.data;
|
|
@@ -1962,7 +1962,7 @@ 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], u =
|
|
1965
|
+
const i = r[a], o = e[a], u = Oe(i, o);
|
|
1966
1966
|
if (!u.valid)
|
|
1967
1967
|
return { valid: !1 };
|
|
1968
1968
|
s.push(u.data);
|
|
@@ -1976,8 +1976,8 @@ class ie extends v {
|
|
|
1976
1976
|
const { status: t, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
1977
1977
|
if (Ce(a) || Ce(i))
|
|
1978
1978
|
return p;
|
|
1979
|
-
const o =
|
|
1980
|
-
return o.valid ? ((
|
|
1979
|
+
const o = Oe(a.value, i.value);
|
|
1980
|
+
return o.valid ? ((Ne(a) || Ne(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(n, {
|
|
1981
1981
|
code: d.invalid_intersection_types
|
|
1982
1982
|
}), p);
|
|
1983
1983
|
};
|
|
@@ -2260,11 +2260,11 @@ class H extends v {
|
|
|
2260
2260
|
if (this._def.returns instanceof K) {
|
|
2261
2261
|
const o = this;
|
|
2262
2262
|
return S(async function(...u) {
|
|
2263
|
-
const c = new
|
|
2263
|
+
const c = new O([]), y = await o._def.args.parseAsync(u, a).catch((pe) => {
|
|
2264
2264
|
throw c.addIssue(n(u, pe)), c;
|
|
2265
|
-
}),
|
|
2266
|
-
return await o._def.returns._def.type.parseAsync(
|
|
2267
|
-
throw c.addIssue(s(
|
|
2265
|
+
}), N = await Reflect.apply(i, this, y);
|
|
2266
|
+
return await o._def.returns._def.type.parseAsync(N, a).catch((pe) => {
|
|
2267
|
+
throw c.addIssue(s(N, pe)), c;
|
|
2268
2268
|
});
|
|
2269
2269
|
});
|
|
2270
2270
|
} else {
|
|
@@ -2272,11 +2272,11 @@ class H extends v {
|
|
|
2272
2272
|
return S(function(...u) {
|
|
2273
2273
|
const c = o._def.args.safeParse(u, a);
|
|
2274
2274
|
if (!c.success)
|
|
2275
|
-
throw new
|
|
2276
|
-
const y = Reflect.apply(i, this, c.data),
|
|
2277
|
-
if (!
|
|
2278
|
-
throw new
|
|
2279
|
-
return
|
|
2275
|
+
throw new O([n(u, c.error)]);
|
|
2276
|
+
const y = Reflect.apply(i, this, c.data), N = o._def.returns.safeParse(y, a);
|
|
2277
|
+
if (!N.success)
|
|
2278
|
+
throw new O([s(y, N.error)]);
|
|
2279
|
+
return N.data;
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
@@ -2289,7 +2289,7 @@ class H extends v {
|
|
|
2289
2289
|
args(...e) {
|
|
2290
2290
|
return new H({
|
|
2291
2291
|
...this._def,
|
|
2292
|
-
args: M.create(e).rest(
|
|
2292
|
+
args: M.create(e).rest(U.create())
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
2295
|
returns(e) {
|
|
@@ -2306,8 +2306,8 @@ class H extends v {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
static create(e, t, n) {
|
|
2308
2308
|
return new H({
|
|
2309
|
-
args: e || M.create([]).rest(
|
|
2310
|
-
returns: t ||
|
|
2309
|
+
args: e || M.create([]).rest(U.create()),
|
|
2310
|
+
returns: t || U.create(),
|
|
2311
2311
|
typeName: m.ZodFunction,
|
|
2312
2312
|
..._(n)
|
|
2313
2313
|
});
|
|
@@ -2574,7 +2574,7 @@ j.create = (r, e) => new j({
|
|
|
2574
2574
|
typeName: m.ZodOptional,
|
|
2575
2575
|
..._(e)
|
|
2576
2576
|
});
|
|
2577
|
-
class
|
|
2577
|
+
class q extends v {
|
|
2578
2578
|
_parse(e) {
|
|
2579
2579
|
return this._getType(e) === f.null ? S(null) : this._def.innerType._parse(e);
|
|
2580
2580
|
}
|
|
@@ -2582,7 +2582,7 @@ class U extends v {
|
|
|
2582
2582
|
return this._def.innerType;
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
|
-
|
|
2585
|
+
q.create = (r, e) => new q({
|
|
2586
2586
|
innerType: r,
|
|
2587
2587
|
typeName: m.ZodNullable,
|
|
2588
2588
|
..._(e)
|
|
@@ -2626,7 +2626,7 @@ class fe extends v {
|
|
|
2626
2626
|
status: "valid",
|
|
2627
2627
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2628
2628
|
get error() {
|
|
2629
|
-
return new
|
|
2629
|
+
return new O(n.common.issues);
|
|
2630
2630
|
},
|
|
2631
2631
|
input: n.data
|
|
2632
2632
|
})
|
|
@@ -2634,7 +2634,7 @@ class fe extends v {
|
|
|
2634
2634
|
status: "valid",
|
|
2635
2635
|
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
2636
2636
|
get error() {
|
|
2637
|
-
return new
|
|
2637
|
+
return new O(n.common.issues);
|
|
2638
2638
|
},
|
|
2639
2639
|
input: n.data
|
|
2640
2640
|
})
|
|
@@ -2745,7 +2745,7 @@ function De(r, e = {}, t) {
|
|
|
2745
2745
|
}) : X.create();
|
|
2746
2746
|
}
|
|
2747
2747
|
const mt = {
|
|
2748
|
-
object:
|
|
2748
|
+
object: b.lazycreate
|
|
2749
2749
|
};
|
|
2750
2750
|
var m;
|
|
2751
2751
|
(function(r) {
|
|
@@ -2753,7 +2753,7 @@ var m;
|
|
|
2753
2753
|
})(m || (m = {}));
|
|
2754
2754
|
const pt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) => De((t) => t instanceof r, e), Le = E.create,
|
|
2756
|
+
}) => De((t) => t instanceof r, e), Le = E.create, qe = V.create, yt = be.create, _t = D.create, Ue = re.create, vt = B.create, gt = ge.create, xt = ne.create, kt = se.create, bt = X.create, wt = U.create, Tt = z.create, Zt = xe.create, St = R.create, Ct = b.create, Nt = b.strictCreate, Ot = ae.create, Et = we.create, Rt = ie.create, It = M.create, jt = oe.create, At = ke.create, Mt = W.create, $t = H.create, zt = de.create, Pt = ce.create, Vt = L.create, Dt = ue.create, Lt = K.create, je = I.create, qt = j.create, Ut = q.create, Bt = I.createWithPreprocess, Wt = me.create, Yt = () => Le().optional(), Jt = () => qe().optional(), Ht = () => Ue().optional(), Gt = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => re.create({
|
|
@@ -2761,7 +2761,7 @@ const pt = (r, e = {
|
|
|
2761
2761
|
coerce: !0
|
|
2762
2762
|
}),
|
|
2763
2763
|
bigint: (r) => D.create({ ...r, coerce: !0 }),
|
|
2764
|
-
date: (r) =>
|
|
2764
|
+
date: (r) => B.create({ ...r, coerce: !0 })
|
|
2765
2765
|
}, Xt = p;
|
|
2766
2766
|
var C = /* @__PURE__ */ Object.freeze({
|
|
2767
2767
|
__proto__: null,
|
|
@@ -2776,7 +2776,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2776
2776
|
DIRTY: J,
|
|
2777
2777
|
OK: S,
|
|
2778
2778
|
isAborted: Ce,
|
|
2779
|
-
isDirty:
|
|
2779
|
+
isDirty: Ne,
|
|
2780
2780
|
isValid: ee,
|
|
2781
2781
|
isAsync: te,
|
|
2782
2782
|
get util() {
|
|
@@ -2793,16 +2793,16 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2793
2793
|
ZodNumber: V,
|
|
2794
2794
|
ZodBigInt: D,
|
|
2795
2795
|
ZodBoolean: re,
|
|
2796
|
-
ZodDate:
|
|
2796
|
+
ZodDate: B,
|
|
2797
2797
|
ZodSymbol: ge,
|
|
2798
2798
|
ZodUndefined: ne,
|
|
2799
2799
|
ZodNull: se,
|
|
2800
2800
|
ZodAny: X,
|
|
2801
|
-
ZodUnknown:
|
|
2801
|
+
ZodUnknown: U,
|
|
2802
2802
|
ZodNever: z,
|
|
2803
2803
|
ZodVoid: xe,
|
|
2804
2804
|
ZodArray: R,
|
|
2805
|
-
ZodObject:
|
|
2805
|
+
ZodObject: b,
|
|
2806
2806
|
ZodUnion: ae,
|
|
2807
2807
|
ZodDiscriminatedUnion: we,
|
|
2808
2808
|
ZodIntersection: ie,
|
|
@@ -2819,7 +2819,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2819
2819
|
ZodEffects: I,
|
|
2820
2820
|
ZodTransformer: I,
|
|
2821
2821
|
ZodOptional: j,
|
|
2822
|
-
ZodNullable:
|
|
2822
|
+
ZodNullable: q,
|
|
2823
2823
|
ZodDefault: le,
|
|
2824
2824
|
ZodCatch: fe,
|
|
2825
2825
|
ZodNaN: be,
|
|
@@ -2838,7 +2838,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2838
2838
|
any: bt,
|
|
2839
2839
|
array: St,
|
|
2840
2840
|
bigint: _t,
|
|
2841
|
-
boolean:
|
|
2841
|
+
boolean: Ue,
|
|
2842
2842
|
date: vt,
|
|
2843
2843
|
discriminatedUnion: Et,
|
|
2844
2844
|
effect: je,
|
|
@@ -2853,43 +2853,52 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2853
2853
|
nativeEnum: Dt,
|
|
2854
2854
|
never: Tt,
|
|
2855
2855
|
null: kt,
|
|
2856
|
-
nullable:
|
|
2857
|
-
number:
|
|
2856
|
+
nullable: Ut,
|
|
2857
|
+
number: qe,
|
|
2858
2858
|
object: Ct,
|
|
2859
2859
|
oboolean: Ht,
|
|
2860
2860
|
onumber: Jt,
|
|
2861
|
-
optional:
|
|
2861
|
+
optional: qt,
|
|
2862
2862
|
ostring: Yt,
|
|
2863
2863
|
pipeline: Wt,
|
|
2864
|
-
preprocess:
|
|
2864
|
+
preprocess: Bt,
|
|
2865
2865
|
promise: Lt,
|
|
2866
2866
|
record: jt,
|
|
2867
2867
|
set: Mt,
|
|
2868
|
-
strictObject:
|
|
2868
|
+
strictObject: Nt,
|
|
2869
2869
|
string: Le,
|
|
2870
2870
|
symbol: gt,
|
|
2871
2871
|
transformer: je,
|
|
2872
2872
|
tuple: It,
|
|
2873
2873
|
undefined: xt,
|
|
2874
|
-
union:
|
|
2874
|
+
union: Ot,
|
|
2875
2875
|
unknown: wt,
|
|
2876
2876
|
void: Zt,
|
|
2877
2877
|
NEVER: Xt,
|
|
2878
2878
|
ZodIssueCode: d,
|
|
2879
2879
|
quotelessJson: Ge,
|
|
2880
|
-
ZodError:
|
|
2880
|
+
ZodError: O
|
|
2881
2881
|
});
|
|
2882
2882
|
const nr = () => {
|
|
2883
2883
|
const { formValidationTexts: r } = Ye(We), e = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2884
|
-
invalid_type_error: r.required
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
}
|
|
2884
|
+
invalid_type_error: r.required,
|
|
2885
|
+
required_error: r.required
|
|
2886
|
+
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((k) => k ?? null), n = (g) => {
|
|
2887
|
+
const k = (g != null && g.useCoerce ? C.coerce : C).number({
|
|
2888
|
+
invalid_type_error: r.required,
|
|
2889
|
+
required_error: r.required
|
|
2890
|
+
});
|
|
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) => Number.isNaN(w) ? null : w ?? null);
|
|
2892
|
+
}, s = (g) => n(g).nullable().optional().transform((k) => Number.isNaN(k) ? null : k ?? null), a = (g) => (g != null && g.useCoerce ? C.coerce : C).boolean({
|
|
2893
|
+
invalid_type_error: r.required,
|
|
2894
|
+
required_error: r.required
|
|
2895
|
+
}).transform((k) => k ?? null), i = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2896
|
+
invalid_type_error: r.required,
|
|
2897
|
+
required_error: r.required
|
|
2898
|
+
}).refine(He, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((k) => k ?? null), u = (g, k) => C.enum(g, {
|
|
2899
|
+
invalid_type_error: r.required,
|
|
2900
|
+
required_error: r.required
|
|
2901
|
+
}).transform((Re) => Re ?? null);
|
|
2893
2902
|
return {
|
|
2894
2903
|
zString: t,
|
|
2895
2904
|
zStringRequired: e,
|
|
@@ -2898,13 +2907,13 @@ const nr = () => {
|
|
|
2898
2907
|
zBool: a,
|
|
2899
2908
|
zDate: o,
|
|
2900
2909
|
zDateRequired: i,
|
|
2901
|
-
zEnum: (g,
|
|
2910
|
+
zEnum: (g, k) => u(g).nullable().transform((w) => w ?? null),
|
|
2902
2911
|
zEnumRequired: u,
|
|
2903
2912
|
zObjectIdInt: (g) => C.object({ id: s({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2904
2913
|
zObjectIdIntRequired: (g) => C.object({ id: n() }).transform((w) => w ?? null),
|
|
2905
2914
|
zObjectIdStr: (g) => C.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2906
2915
|
zObjectIdStrRequired: (g) => C.object({ id: e() }).transform((w) => w ?? null),
|
|
2907
|
-
zFile: ({ required: g, multiple:
|
|
2916
|
+
zFile: ({ required: g, multiple: k, maxFileSize: w }) => C.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((Be) => Be.size <= w), `Maximum file size is ${Je(w)}.`).transform((T) => (k ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2908
2917
|
};
|
|
2909
2918
|
};
|
|
2910
2919
|
export {
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-BkFSaMQy.cjs"),d=require("react");require("react-hook-form");const w=require("./usePermissions-yA39pMjm.cjs"),C=require("./SimpleTooltip-C_iRq-Q0.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:m}=d.useContext(s.LuminusComponentsContext),[p,u]=d.useState(!1),[c]=l.split("?"),h=e.linkTo===c||((v=e.children)==null?void 0:v.some(n=>n.linkTo===c));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:()=>u(!0),onMouseLeave:()=>u(!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(m,{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(m,{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:m})=>{const[p,u]=d.useState(-1),{checkUserHasPermissions:c}=w.usePermissions(),h=d.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!c(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(x=>({...x,notPermitted:!c(x.permissions??[]),disabled:n.disabled||x.disabled}))}}),[t,c]),v=d.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!c(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(x=>({...x,notPermitted:!c(x.permissions??[])}))}}),[i,c]),_=n=>{u(n===p?-1:n)};return d.useEffect(()=>{a||u(-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:m},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:m},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}=d.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,noPadding:a,className:l})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",a?"p-0":"p-3",l),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?"250px":void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:250,children:i})]}),W="_full-screen-container_1rm4r_1",X={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:W},Y=({title:e,children:t,sideContent:i,noPadding:a,className:l})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",a?"p-0":"p-3",l,X.fullScreenContainer),style:{width:i?"calc(100% - 250px)":"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:250,children:i})]});exports.FullScreenContainer=Y;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
|