react-luminus-components 1.3.18 → 1.3.20
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 +54 -54
- package/dist/{UserAvatarToggle-BkBi1Auu.cjs → NoInputContainer-BKPv5rmP.cjs} +45 -45
- package/dist/{UserAvatarToggle-D2Jm1R51.js → NoInputContainer-C2e1tx-D.js} +850 -846
- package/dist/{PrimaryButton-DslNAB-3.js → PrimaryButton-JNkq9258.js} +1 -1
- package/dist/{PrimaryButton-I6y4OCxs.cjs → PrimaryButton-PjAN0Acn.cjs} +1 -1
- package/dist/SimpleTooltip-BCnuzxKk.js +5 -0
- package/dist/SimpleTooltip-BTqqafx1.cjs +1 -0
- package/dist/contexts/delegation/DelegationContext.d.ts +7 -0
- package/dist/contexts/delegation/DelegationProvider.d.ts +6 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +190 -180
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +66 -66
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +13 -13
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1075 -1075
- package/dist/style.css +1 -1
- package/dist/useConfirm-95WxctJ9.cjs +1 -0
- package/dist/{useConfirm-BhEDUE32.js → useConfirm-DkHhgyYO.js} +1 -1
- package/dist/{useFormControlType-oJGqgThz.js → useFormControlType-BAFqxupC.js} +3 -3
- package/dist/{usePermissions-BgwZ65fl.js → usePermissions-B2G69gWH.js} +1 -1
- package/dist/usePermissions-kfYKLHzs.cjs +1 -0
- package/package.json +105 -105
- package/dist/SimpleTooltip-B5VccvE5.cjs +0 -1
- package/dist/SimpleTooltip-D98Qd8ok.js +0 -5
- package/dist/useConfirm-C8_Cwa9N.cjs +0 -1
- package/dist/usePermissions-DQP6LdI3.cjs +0 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Q as Xe,
|
|
2
|
-
import {
|
|
3
|
-
import { a as xr, u as
|
|
1
|
+
import { Q as Xe, a4 as Me, ap as Ke } from "./NoInputContainer-C2e1tx-D.js";
|
|
2
|
+
import { aI as yr, a9 as _r, aH as vr } from "./NoInputContainer-C2e1tx-D.js";
|
|
3
|
+
import { a as xr, u as kr } from "./useConfirm-DkHhgyYO.js";
|
|
4
4
|
import { useContext as ze, useRef as Fe, useState as Pe, useCallback as et, useEffect as De } from "react";
|
|
5
5
|
import { f as tt } from "./latinize-BQrinury.js";
|
|
6
6
|
import { i as rt } from "./dateUtils-7nL2BXlo.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
|
-
import {
|
|
9
|
-
import { u as Sr } from "./usePermissions-
|
|
8
|
+
import { a as wr, b as Tr, u as Zr } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
+
import { u as Sr } from "./usePermissions-B2G69gWH.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -313,8 +313,8 @@ class Z {
|
|
|
313
313
|
}
|
|
314
314
|
const y = Object.freeze({
|
|
315
315
|
status: "aborted"
|
|
316
|
-
}),
|
|
317
|
-
function
|
|
316
|
+
}), G = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ne = (r) => r.status === "aborted", Ee = (r) => r.status === "dirty", se = (r) => r.status === "valid", ae = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
317
|
+
function ke(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");
|
|
320
320
|
return e.get(r);
|
|
@@ -1324,7 +1324,7 @@ Y.create = (r) => new Y({
|
|
|
1324
1324
|
typeName: p.ZodDate,
|
|
1325
1325
|
...v(r)
|
|
1326
1326
|
});
|
|
1327
|
-
class
|
|
1327
|
+
class be extends g {
|
|
1328
1328
|
_parse(e) {
|
|
1329
1329
|
if (this._getType(e) !== f.symbol) {
|
|
1330
1330
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1337,7 +1337,7 @@ class ke extends g {
|
|
|
1337
1337
|
return S(e.data);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
|
|
1340
|
+
be.create = (r) => new be({
|
|
1341
1341
|
typeName: p.ZodSymbol,
|
|
1342
1342
|
...v(r)
|
|
1343
1343
|
});
|
|
@@ -1503,24 +1503,24 @@ R.create = (r, e) => new R({
|
|
|
1503
1503
|
typeName: p.ZodArray,
|
|
1504
1504
|
...v(e)
|
|
1505
1505
|
});
|
|
1506
|
-
function
|
|
1507
|
-
if (r instanceof
|
|
1506
|
+
function J(r) {
|
|
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
|
-
e[t] = j.create(
|
|
1511
|
+
e[t] = j.create(J(n));
|
|
1512
1512
|
}
|
|
1513
|
-
return new
|
|
1513
|
+
return new b({
|
|
1514
1514
|
...r._def,
|
|
1515
1515
|
shape: () => e
|
|
1516
1516
|
});
|
|
1517
1517
|
} else
|
|
1518
1518
|
return r instanceof R ? new R({
|
|
1519
1519
|
...r._def,
|
|
1520
|
-
type:
|
|
1521
|
-
}) : r instanceof j ? j.create(
|
|
1520
|
+
type: J(r.element)
|
|
1521
|
+
}) : r instanceof j ? j.create(J(r.unwrap())) : r instanceof U ? U.create(J(r.unwrap())) : r instanceof $ ? $.create(r.items.map((e) => J(e))) : r;
|
|
1522
1522
|
}
|
|
1523
|
-
class
|
|
1523
|
+
class b extends g {
|
|
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 k extends g {
|
|
|
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 g {
|
|
|
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 g {
|
|
|
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 g {
|
|
|
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 g {
|
|
|
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 g {
|
|
|
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 g {
|
|
|
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
|
});
|
|
@@ -1755,14 +1755,14 @@ class k extends g {
|
|
|
1755
1755
|
* @deprecated
|
|
1756
1756
|
*/
|
|
1757
1757
|
deepPartial() {
|
|
1758
|
-
return
|
|
1758
|
+
return J(this);
|
|
1759
1759
|
}
|
|
1760
1760
|
partial(e) {
|
|
1761
1761
|
const t = {};
|
|
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 g {
|
|
|
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 g {
|
|
|
1787
1787
|
return We(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: p.ZodObject,
|
|
1795
1795
|
...v(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: p.ZodObject,
|
|
1802
1802
|
...v(e)
|
|
1803
1803
|
});
|
|
1804
|
-
|
|
1804
|
+
b.lazycreate = (r, e) => new b({
|
|
1805
1805
|
shape: r,
|
|
1806
1806
|
unknownKeys: "strip",
|
|
1807
1807
|
catchall: z.create(),
|
|
@@ -2148,7 +2148,7 @@ Te.create = (r, e, t) => new Te({
|
|
|
2148
2148
|
typeName: p.ZodMap,
|
|
2149
2149
|
...v(t)
|
|
2150
2150
|
});
|
|
2151
|
-
class
|
|
2151
|
+
class H extends g {
|
|
2152
2152
|
_parse(e) {
|
|
2153
2153
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2154
2154
|
if (n.parsedType !== f.set)
|
|
@@ -2187,13 +2187,13 @@ class G extends g {
|
|
|
2187
2187
|
return n.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
|
|
2188
2188
|
}
|
|
2189
2189
|
min(e, t) {
|
|
2190
|
-
return new
|
|
2190
|
+
return new H({
|
|
2191
2191
|
...this._def,
|
|
2192
2192
|
minSize: { value: e, message: h.toString(t) }
|
|
2193
2193
|
});
|
|
2194
2194
|
}
|
|
2195
2195
|
max(e, t) {
|
|
2196
|
-
return new
|
|
2196
|
+
return new H({
|
|
2197
2197
|
...this._def,
|
|
2198
2198
|
maxSize: { value: e, message: h.toString(t) }
|
|
2199
2199
|
});
|
|
@@ -2205,7 +2205,7 @@ class G extends g {
|
|
|
2205
2205
|
return this.min(1, e);
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
|
|
2208
|
+
H.create = (r, e) => new H({
|
|
2209
2209
|
valueType: r,
|
|
2210
2210
|
minSize: null,
|
|
2211
2211
|
maxSize: null,
|
|
@@ -2368,7 +2368,7 @@ class q extends g {
|
|
|
2368
2368
|
code: d.invalid_type
|
|
2369
2369
|
}), y;
|
|
2370
2370
|
}
|
|
2371
|
-
if (
|
|
2371
|
+
if (ke(this, re) || Le(this, re, new Set(this._def.values)), !ke(this, re).has(e.data)) {
|
|
2372
2372
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2373
2373
|
return l(t, {
|
|
2374
2374
|
received: t.data,
|
|
@@ -2428,7 +2428,7 @@ class me extends g {
|
|
|
2428
2428
|
code: d.invalid_type
|
|
2429
2429
|
}), y;
|
|
2430
2430
|
}
|
|
2431
|
-
if (
|
|
2431
|
+
if (ke(this, ne) || Le(this, ne, new Set(x.getValidEnumValues(this._def.values))), !ke(this, ne).has(e.data)) {
|
|
2432
2432
|
const s = x.objectValues(t);
|
|
2433
2433
|
return l(n, {
|
|
2434
2434
|
received: n.data,
|
|
@@ -2499,7 +2499,7 @@ class I extends g {
|
|
|
2499
2499
|
path: n.path,
|
|
2500
2500
|
parent: n
|
|
2501
2501
|
});
|
|
2502
|
-
return u.status === "aborted" ? y : u.status === "dirty" || t.value === "dirty" ?
|
|
2502
|
+
return u.status === "aborted" ? y : u.status === "dirty" || t.value === "dirty" ? G(u.value) : u;
|
|
2503
2503
|
});
|
|
2504
2504
|
{
|
|
2505
2505
|
if (t.value === "aborted")
|
|
@@ -2509,7 +2509,7 @@ class I extends g {
|
|
|
2509
2509
|
path: n.path,
|
|
2510
2510
|
parent: n
|
|
2511
2511
|
});
|
|
2512
|
-
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ?
|
|
2512
|
+
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? G(o.value) : o;
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
2515
|
if (s.type === "refinement") {
|
|
@@ -2667,7 +2667,7 @@ Ze.create = (r) => new Ze({
|
|
|
2667
2667
|
typeName: p.ZodNaN,
|
|
2668
2668
|
...v(r)
|
|
2669
2669
|
});
|
|
2670
|
-
const
|
|
2670
|
+
const kt = Symbol("zod_brand");
|
|
2671
2671
|
class Ie extends g {
|
|
2672
2672
|
_parse(e) {
|
|
2673
2673
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -2691,7 +2691,7 @@ class ve extends g {
|
|
|
2691
2691
|
path: n.path,
|
|
2692
2692
|
parent: n
|
|
2693
2693
|
});
|
|
2694
|
-
return a.status === "aborted" ? y : a.status === "dirty" ? (t.dirty(),
|
|
2694
|
+
return a.status === "aborted" ? y : a.status === "dirty" ? (t.dirty(), G(a.value)) : this._def.out._parseAsync({
|
|
2695
2695
|
data: a.value,
|
|
2696
2696
|
path: n.path,
|
|
2697
2697
|
parent: n
|
|
@@ -2744,8 +2744,8 @@ function Ye(r, e = {}, t) {
|
|
|
2744
2744
|
}
|
|
2745
2745
|
}) : K.create();
|
|
2746
2746
|
}
|
|
2747
|
-
const
|
|
2748
|
-
object:
|
|
2747
|
+
const bt = {
|
|
2748
|
+
object: b.lazycreate
|
|
2749
2749
|
};
|
|
2750
2750
|
var p;
|
|
2751
2751
|
(function(r) {
|
|
@@ -2753,7 +2753,7 @@ var p;
|
|
|
2753
2753
|
})(p || (p = {}));
|
|
2754
2754
|
const wt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) => Ye((t) => t instanceof r, e),
|
|
2756
|
+
}) => Ye((t) => t instanceof r, e), He = E.create, Je = V.create, Tt = Ze.create, Zt = L.create, Ge = ie.create, Ct = Y.create, St = be.create, Ot = oe.create, Nt = de.create, Et = K.create, Rt = W.create, It = z.create, jt = we.create, At = R.create, $t = b.create, Mt = b.strictCreate, zt = ce.create, Pt = Ce.create, Dt = ue.create, Vt = $.create, Lt = le.create, qt = Te.create, Ut = H.create, Bt = Q.create, Wt = fe.create, Yt = he.create, Ht = q.create, Jt = me.create, Gt = F.create, $e = I.create, Qt = j.create, Xt = U.create, Kt = I.createWithPreprocess, Ft = ve.create, er = () => He().optional(), tr = () => Je().optional(), rr = () => Ge().optional(), nr = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => ie.create({
|
|
@@ -2773,7 +2773,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2773
2773
|
addIssueToContext: l,
|
|
2774
2774
|
ParseStatus: Z,
|
|
2775
2775
|
INVALID: y,
|
|
2776
|
-
DIRTY:
|
|
2776
|
+
DIRTY: G,
|
|
2777
2777
|
OK: S,
|
|
2778
2778
|
isAborted: Ne,
|
|
2779
2779
|
isDirty: Ee,
|
|
@@ -2794,7 +2794,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2794
2794
|
ZodBigInt: L,
|
|
2795
2795
|
ZodBoolean: ie,
|
|
2796
2796
|
ZodDate: Y,
|
|
2797
|
-
ZodSymbol:
|
|
2797
|
+
ZodSymbol: be,
|
|
2798
2798
|
ZodUndefined: oe,
|
|
2799
2799
|
ZodNull: de,
|
|
2800
2800
|
ZodAny: K,
|
|
@@ -2802,14 +2802,14 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2802
2802
|
ZodNever: z,
|
|
2803
2803
|
ZodVoid: we,
|
|
2804
2804
|
ZodArray: R,
|
|
2805
|
-
ZodObject:
|
|
2805
|
+
ZodObject: b,
|
|
2806
2806
|
ZodUnion: ce,
|
|
2807
2807
|
ZodDiscriminatedUnion: Ce,
|
|
2808
2808
|
ZodIntersection: ue,
|
|
2809
2809
|
ZodTuple: $,
|
|
2810
2810
|
ZodRecord: le,
|
|
2811
2811
|
ZodMap: Te,
|
|
2812
|
-
ZodSet:
|
|
2812
|
+
ZodSet: H,
|
|
2813
2813
|
ZodFunction: Q,
|
|
2814
2814
|
ZodLazy: fe,
|
|
2815
2815
|
ZodLiteral: he,
|
|
@@ -2823,14 +2823,14 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2823
2823
|
ZodDefault: pe,
|
|
2824
2824
|
ZodCatch: ye,
|
|
2825
2825
|
ZodNaN: Ze,
|
|
2826
|
-
BRAND:
|
|
2826
|
+
BRAND: kt,
|
|
2827
2827
|
ZodBranded: Ie,
|
|
2828
2828
|
ZodPipeline: ve,
|
|
2829
2829
|
ZodReadonly: _e,
|
|
2830
2830
|
custom: Ye,
|
|
2831
2831
|
Schema: g,
|
|
2832
2832
|
ZodSchema: g,
|
|
2833
|
-
late:
|
|
2833
|
+
late: bt,
|
|
2834
2834
|
get ZodFirstPartyTypeKind() {
|
|
2835
2835
|
return p;
|
|
2836
2836
|
},
|
|
@@ -2838,11 +2838,11 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2838
2838
|
any: Et,
|
|
2839
2839
|
array: At,
|
|
2840
2840
|
bigint: Zt,
|
|
2841
|
-
boolean:
|
|
2841
|
+
boolean: Ge,
|
|
2842
2842
|
date: Ct,
|
|
2843
2843
|
discriminatedUnion: Pt,
|
|
2844
2844
|
effect: $e,
|
|
2845
|
-
enum:
|
|
2845
|
+
enum: Ht,
|
|
2846
2846
|
function: Bt,
|
|
2847
2847
|
instanceof: wt,
|
|
2848
2848
|
intersection: Dt,
|
|
@@ -2850,11 +2850,11 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2850
2850
|
literal: Yt,
|
|
2851
2851
|
map: qt,
|
|
2852
2852
|
nan: Tt,
|
|
2853
|
-
nativeEnum:
|
|
2853
|
+
nativeEnum: Jt,
|
|
2854
2854
|
never: It,
|
|
2855
2855
|
null: Nt,
|
|
2856
2856
|
nullable: Xt,
|
|
2857
|
-
number:
|
|
2857
|
+
number: Je,
|
|
2858
2858
|
object: $t,
|
|
2859
2859
|
oboolean: rr,
|
|
2860
2860
|
onumber: tr,
|
|
@@ -2862,11 +2862,11 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2862
2862
|
ostring: er,
|
|
2863
2863
|
pipeline: Ft,
|
|
2864
2864
|
preprocess: Kt,
|
|
2865
|
-
promise:
|
|
2865
|
+
promise: Gt,
|
|
2866
2866
|
record: Lt,
|
|
2867
2867
|
set: Ut,
|
|
2868
2868
|
strictObject: Mt,
|
|
2869
|
-
string:
|
|
2869
|
+
string: He,
|
|
2870
2870
|
symbol: St,
|
|
2871
2871
|
transformer: $e,
|
|
2872
2872
|
tuple: Vt,
|
|
@@ -2883,19 +2883,19 @@ const lr = () => {
|
|
|
2883
2883
|
const { formValidationTexts: r } = ze(Xe), e = (_) => (_ != null && _.useCoerce ? O.coerce : O).string({
|
|
2884
2884
|
invalid_type_error: r.required,
|
|
2885
2885
|
required_error: r.required
|
|
2886
|
-
}).transform((w) => w ?? null), t = (_) => e(_).nullable().optional().transform((
|
|
2887
|
-
const
|
|
2886
|
+
}).transform((w) => w ?? null), t = (_) => e(_).nullable().optional().transform((k) => k ?? null), n = (_) => {
|
|
2887
|
+
const k = (_ != null && _.useCoerce ? O.coerce : O).number({
|
|
2888
2888
|
invalid_type_error: r.required,
|
|
2889
2889
|
required_error: r.required
|
|
2890
2890
|
});
|
|
2891
|
-
return (_ == null ? void 0 : _.min) !== void 0 &&
|
|
2892
|
-
}, s = (_) => n(_).nullable().optional().transform((
|
|
2891
|
+
return (_ == null ? void 0 : _.min) !== void 0 && k.min(_.min), (_ == null ? void 0 : _.max) !== void 0 && k.max(_.max), k.transform((w) => w ?? null);
|
|
2892
|
+
}, s = (_) => n(_).nullable().optional().transform((k) => k ?? null), a = (_) => (_ != null && _.useCoerce ? O.coerce : O).boolean({
|
|
2893
2893
|
invalid_type_error: r.required,
|
|
2894
2894
|
required_error: r.required
|
|
2895
|
-
}).transform((
|
|
2895
|
+
}).transform((k) => k ?? null), i = (_) => (_ != null && _.useCoerce ? O.coerce : O).string({
|
|
2896
2896
|
invalid_type_error: r.required,
|
|
2897
2897
|
required_error: r.required
|
|
2898
|
-
}).refine(rt, { message: r.invalidDate }).transform((w) => w ?? null), o = (_) => i(_).nullable().transform((
|
|
2898
|
+
}).refine(rt, { message: r.invalidDate }).transform((w) => w ?? null), o = (_) => i(_).nullable().transform((k) => k ?? null), u = (_, k) => O.enum(_, {
|
|
2899
2899
|
invalid_type_error: r.required,
|
|
2900
2900
|
required_error: r.required
|
|
2901
2901
|
}).transform((je) => je ?? null);
|
|
@@ -2907,13 +2907,13 @@ const lr = () => {
|
|
|
2907
2907
|
zBool: a,
|
|
2908
2908
|
zDate: o,
|
|
2909
2909
|
zDateRequired: i,
|
|
2910
|
-
zEnum: (_,
|
|
2910
|
+
zEnum: (_, k) => u(_).nullable().transform((w) => w ?? null),
|
|
2911
2911
|
zEnumRequired: u,
|
|
2912
2912
|
zObjectIdInt: (_) => O.object({ id: s({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2913
2913
|
zObjectIdIntRequired: (_) => O.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
2914
|
zObjectIdStr: (_) => O.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
2915
|
zObjectIdStrRequired: (_) => O.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
-
zFile: ({ required: _, multiple:
|
|
2916
|
+
zFile: ({ required: _, multiple: k, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !_ || (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((Qe) => Qe.size <= w), `Maximum file size is ${tt(w)}.`).transform((T) => (k ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
2918
|
}, te = {
|
|
2919
2919
|
loadOnInit: !0,
|
|
@@ -2925,10 +2925,10 @@ const lr = () => {
|
|
|
2925
2925
|
if (t !== !1) {
|
|
2926
2926
|
!n && u(`loadData-${r}-${_}`), s && B(null);
|
|
2927
2927
|
try {
|
|
2928
|
-
const
|
|
2928
|
+
const k = await o.get(r, {
|
|
2929
2929
|
signal: ee
|
|
2930
2930
|
});
|
|
2931
|
-
B(
|
|
2931
|
+
B(k.data);
|
|
2932
2932
|
} finally {
|
|
2933
2933
|
!n && c(`loadData-${r}-${_}`);
|
|
2934
2934
|
}
|
|
@@ -2983,6 +2983,6 @@ export {
|
|
|
2983
2983
|
Zr as useKeyPress,
|
|
2984
2984
|
vr as useNotifications,
|
|
2985
2985
|
Sr as usePermissions,
|
|
2986
|
-
|
|
2986
|
+
kr as usePrompt,
|
|
2987
2987
|
lr as useZodSchemaTypes
|
|
2988
2988
|
};
|
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-BKPv5rmP.cjs"),u=require("react");require("react-hook-form");require("./latinize-DaqzUOla.cjs");const w=require("./usePermissions-kfYKLHzs.cjs"),C=require("./SimpleTooltip-BTqqafx1.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",q="_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:q},H=({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(H,{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))})})]})},L="_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:L,"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,9 +1,9 @@
|
|
|
1
|
-
import { Q as B, j as e, c as o, X as I,
|
|
1
|
+
import { Q as B, j as e, c as o, X as I, Y as P } from "./NoInputContainer-C2e1tx-D.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
4
|
import "./latinize-BQrinury.js";
|
|
5
|
-
import { u as y } from "./usePermissions-
|
|
6
|
-
import { S } from "./SimpleTooltip-
|
|
5
|
+
import { u as y } from "./usePermissions-B2G69gWH.js";
|
|
6
|
+
import { S } from "./SimpleTooltip-BCnuzxKk.js";
|
|
7
7
|
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", Q = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", X = "_children_6vbwa_57", i = {
|
|
8
8
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
9
9
|
sideMenuItem: T,
|
|
@@ -21,13 +21,13 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
21
21
|
childrenContainer: Q,
|
|
22
22
|
visible: U,
|
|
23
23
|
children: X
|
|
24
|
-
},
|
|
24
|
+
}, Y = ({ item: n, menuExpanded: t, children: a }) => n.tooltip && !t ? /* @__PURE__ */ e.jsx(S, { text: n.tooltip, placement: "right", children: a }) : a, w = ({ item: n, menuExpanded: t, collapsed: a, onCollapse: r, currentPath: d }) => {
|
|
25
25
|
var b, v;
|
|
26
26
|
const { LinkComponent: c } = C(B), [p, u] = M(!1), [_] = d.split("?"), x = n.linkTo === _ || ((b = n.children) == null ? void 0 : b.some((s) => s.linkTo === _));
|
|
27
27
|
return /* @__PURE__ */ e.jsxs("li", { className: o("luminus-side-menu-item", i.sideMenuItem, {
|
|
28
28
|
[i.expanded]: t
|
|
29
29
|
}, { active: p || x }, { open: a && n.children }, { [i.disabled]: n.disabled || n.notPermitted }, { disabled: n.disabled || n.notPermitted }), onMouseEnter: () => u(!0), onMouseLeave: () => u(!1), children: [
|
|
30
|
-
/* @__PURE__ */ e.jsx(
|
|
30
|
+
/* @__PURE__ */ e.jsx(Y, { item: n, menuExpanded: t, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: o("nav-link", i.navButton), onClick: () => r(), children: [
|
|
31
31
|
/* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
|
|
32
32
|
t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title }),
|
|
33
33
|
t && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", i.collapseIcon, {
|
|
@@ -41,15 +41,15 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
41
41
|
[i.visible]: a
|
|
42
42
|
}), children: /* @__PURE__ */ e.jsx("div", { className: o("shadow rounded children", i.children), children: (v = n.children) == null ? void 0 : v.map((s) => /* @__PURE__ */ e.jsx(c, { to: s.disabled || s.notPermitted ? "/" : s.linkTo ?? "/", className: o("nav-link child rounded", i.navButton, i.child, { [i.disabled]: s.disabled || s.notPermitted }, { disabled: s.disabled || s.notPermitted }), children: /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: s.title }) }, s.linkTo)) }) })
|
|
43
43
|
] });
|
|
44
|
-
},
|
|
44
|
+
}, q = "_side-menu_n1hvm_1", z = "_sidebar-header_n1hvm_13", D = "_side-menu-content_n1hvm_18", G = "_expand_n1hvm_22", J = "_divider_n1hvm_26", h = {
|
|
45
45
|
"side-menu": "_side-menu_n1hvm_1",
|
|
46
|
-
sideMenu:
|
|
46
|
+
sideMenu: q,
|
|
47
47
|
"sidebar-header": "_sidebar-header_n1hvm_13",
|
|
48
|
-
sidebarHeader:
|
|
48
|
+
sidebarHeader: z,
|
|
49
49
|
"side-menu-content": "_side-menu-content_n1hvm_18",
|
|
50
|
-
sideMenuContent:
|
|
51
|
-
expand:
|
|
52
|
-
divider:
|
|
50
|
+
sideMenuContent: D,
|
|
51
|
+
expand: G,
|
|
52
|
+
divider: J
|
|
53
53
|
}, le = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: d, currentPath: c }) => {
|
|
54
54
|
const [p, u] = M(-1), { checkUserHasPermissions: _ } = y(), x = j(() => t.map((s) => {
|
|
55
55
|
var l;
|
|
@@ -87,9 +87,9 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
87
87
|
b.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title))
|
|
88
88
|
] })
|
|
89
89
|
] });
|
|
90
|
-
},
|
|
90
|
+
}, V = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
|
|
91
91
|
"top-bar": "_top-bar_1lk80_1",
|
|
92
|
-
topBar:
|
|
92
|
+
topBar: V,
|
|
93
93
|
"top-bar-brand": "_top-bar-brand_1lk80_14",
|
|
94
94
|
topBarBrand: Z
|
|
95
95
|
}, de = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {
|