react-luminus-components 1.2.69 → 1.2.70
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 +25 -25
- package/dist/EventType-C7yHDXD-.cjs +1 -0
- package/dist/{EventType-BaJL273E.js → EventType-CnIS_MxK.js} +4 -2
- package/dist/{NoInputContainer-BL5lK_1n.js → NoInputContainer-BnAPYzCz.js} +76 -76
- package/dist/SimpleTooltip-ty5BQkX3.js +5 -0
- package/dist/components/common/Alert/Alert.d.ts +7 -0
- package/dist/components/common/VersionInfo/VersionInfo.d.ts +6 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +9 -9
- package/dist/hooks.es.js +25 -25
- package/dist/layout.es.js +17 -17
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +1025 -946
- package/dist/{useConfirm-DfJwzwi3.js → useConfirm-Td63xw5L.js} +5 -5
- package/dist/{usePermissions-BHuzq2YR.js → usePermissions-Dn_gKjni.js} +1 -1
- package/package.json +1 -1
- package/dist/EventType-D-3fmjBD.cjs +0 -1
- package/dist/SimpleTooltip-B8Mu42aG.js +0 -5
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { aF as hr,
|
|
3
|
-
import { a as _r, u as vr } from "./useConfirm-
|
|
4
|
-
import { useContext as Ae, useRef as Ge, useState as
|
|
1
|
+
import { Q as Ye, a4 as Je, an as He } from "./NoInputContainer-BnAPYzCz.js";
|
|
2
|
+
import { aF as hr, a9 as mr, aE as pr } from "./NoInputContainer-BnAPYzCz.js";
|
|
3
|
+
import { a as _r, u as vr } from "./useConfirm-Td63xw5L.js";
|
|
4
|
+
import { useContext as Ae, useRef as Ge, useState as Qe, useCallback as Xe, useEffect as Ke } from "react";
|
|
5
5
|
import { f as Fe } from "./textUtils-BbxuIsKq.js";
|
|
6
6
|
import { i as et } from "./dateUtils-Crak7ii9.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import { a as xr, b as br, u as kr } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
-
import { u as Tr } from "./usePermissions-
|
|
9
|
+
import { u as Tr } from "./usePermissions-Dn_gKjni.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -328,7 +328,7 @@ var h;
|
|
|
328
328
|
(function(r) {
|
|
329
329
|
r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
330
330
|
})(h || (h = {}));
|
|
331
|
-
var
|
|
331
|
+
var K, F;
|
|
332
332
|
class A {
|
|
333
333
|
constructor(e, t, n, s) {
|
|
334
334
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = s;
|
|
@@ -486,7 +486,7 @@ class v {
|
|
|
486
486
|
return R.create(this, this._def);
|
|
487
487
|
}
|
|
488
488
|
promise() {
|
|
489
|
-
return
|
|
489
|
+
return X.create(this, this._def);
|
|
490
490
|
}
|
|
491
491
|
or(e) {
|
|
492
492
|
return ae.create([this, e], this._def);
|
|
@@ -1375,7 +1375,7 @@ se.create = (r) => new se({
|
|
|
1375
1375
|
typeName: p.ZodNull,
|
|
1376
1376
|
..._(r)
|
|
1377
1377
|
});
|
|
1378
|
-
class
|
|
1378
|
+
class Q extends v {
|
|
1379
1379
|
constructor() {
|
|
1380
1380
|
super(...arguments), this._any = !0;
|
|
1381
1381
|
}
|
|
@@ -1383,7 +1383,7 @@ class X extends v {
|
|
|
1383
1383
|
return S(e.data);
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1386
|
+
Q.create = (r) => new Q({
|
|
1387
1387
|
typeName: p.ZodAny,
|
|
1388
1388
|
..._(r)
|
|
1389
1389
|
});
|
|
@@ -2257,7 +2257,7 @@ class H extends v {
|
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
2259
|
const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2260
|
-
if (this._def.returns instanceof
|
|
2260
|
+
if (this._def.returns instanceof X) {
|
|
2261
2261
|
const o = this;
|
|
2262
2262
|
return S(async function(...u) {
|
|
2263
2263
|
const c = new N([]), m = await o._def.args.parseAsync(u, a).catch((pe) => {
|
|
@@ -2357,7 +2357,7 @@ function De(r, e) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
class L extends v {
|
|
2359
2359
|
constructor() {
|
|
2360
|
-
super(...arguments),
|
|
2360
|
+
super(...arguments), K.set(this, void 0);
|
|
2361
2361
|
}
|
|
2362
2362
|
_parse(e) {
|
|
2363
2363
|
if (typeof e.data != "string") {
|
|
@@ -2368,7 +2368,7 @@ class L extends v {
|
|
|
2368
2368
|
code: d.invalid_type
|
|
2369
2369
|
}), y;
|
|
2370
2370
|
}
|
|
2371
|
-
if (ve(this,
|
|
2371
|
+
if (ve(this, K) || Me(this, K, new Set(this._def.values)), !ve(this, K).has(e.data)) {
|
|
2372
2372
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2373
2373
|
return l(t, {
|
|
2374
2374
|
received: t.data,
|
|
@@ -2412,7 +2412,7 @@ class L extends v {
|
|
|
2412
2412
|
});
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
|
|
2415
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
2416
2416
|
L.create = De;
|
|
2417
2417
|
class ue extends v {
|
|
2418
2418
|
constructor() {
|
|
@@ -2448,7 +2448,7 @@ ue.create = (r, e) => new ue({
|
|
|
2448
2448
|
typeName: p.ZodNativeEnum,
|
|
2449
2449
|
..._(e)
|
|
2450
2450
|
});
|
|
2451
|
-
class
|
|
2451
|
+
class X extends v {
|
|
2452
2452
|
unwrap() {
|
|
2453
2453
|
return this._def.type;
|
|
2454
2454
|
}
|
|
@@ -2467,7 +2467,7 @@ class K extends v {
|
|
|
2467
2467
|
})));
|
|
2468
2468
|
}
|
|
2469
2469
|
}
|
|
2470
|
-
|
|
2470
|
+
X.create = (r, e) => new X({
|
|
2471
2471
|
type: r,
|
|
2472
2472
|
typeName: p.ZodPromise,
|
|
2473
2473
|
..._(e)
|
|
@@ -2736,13 +2736,13 @@ he.create = (r, e) => new he({
|
|
|
2736
2736
|
..._(e)
|
|
2737
2737
|
});
|
|
2738
2738
|
function Le(r, e = {}, t) {
|
|
2739
|
-
return r ?
|
|
2739
|
+
return r ? Q.create().superRefine((n, s) => {
|
|
2740
2740
|
var a, i;
|
|
2741
2741
|
if (!r(n)) {
|
|
2742
2742
|
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, c = typeof o == "string" ? { message: o } : o;
|
|
2743
2743
|
s.addIssue({ code: "custom", ...c, fatal: u });
|
|
2744
2744
|
}
|
|
2745
|
-
}) :
|
|
2745
|
+
}) : Q.create();
|
|
2746
2746
|
}
|
|
2747
2747
|
const xt = {
|
|
2748
2748
|
object: b.lazycreate
|
|
@@ -2753,7 +2753,7 @@ var p;
|
|
|
2753
2753
|
})(p || (p = {}));
|
|
2754
2754
|
const bt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) => Le((t) => t instanceof r, e), qe = E.create, Ue = V.create, kt = ke.create, wt = D.create, Be = re.create, Tt = B.create, Zt = ge.create, Ct = ne.create, St = se.create, Ot =
|
|
2756
|
+
}) => Le((t) => t instanceof r, e), qe = E.create, Ue = V.create, kt = ke.create, wt = D.create, Be = re.create, Tt = B.create, Zt = ge.create, Ct = ne.create, St = se.create, Ot = Q.create, Nt = U.create, Et = z.create, Rt = xe.create, It = R.create, jt = b.create, At = b.strictCreate, $t = ae.create, Mt = we.create, zt = ie.create, Pt = $.create, Vt = oe.create, Dt = be.create, Lt = W.create, qt = H.create, Ut = de.create, Bt = ce.create, Wt = L.create, Yt = ue.create, Jt = X.create, je = I.create, Ht = j.create, Gt = q.create, Qt = I.createWithPreprocess, Xt = me.create, Kt = () => qe().optional(), Ft = () => Ue().optional(), er = () => Be().optional(), tr = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => re.create({
|
|
@@ -2797,7 +2797,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2797
2797
|
ZodSymbol: ge,
|
|
2798
2798
|
ZodUndefined: ne,
|
|
2799
2799
|
ZodNull: se,
|
|
2800
|
-
ZodAny:
|
|
2800
|
+
ZodAny: Q,
|
|
2801
2801
|
ZodUnknown: U,
|
|
2802
2802
|
ZodNever: z,
|
|
2803
2803
|
ZodVoid: xe,
|
|
@@ -2815,7 +2815,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2815
2815
|
ZodLiteral: ce,
|
|
2816
2816
|
ZodEnum: L,
|
|
2817
2817
|
ZodNativeEnum: ue,
|
|
2818
|
-
ZodPromise:
|
|
2818
|
+
ZodPromise: X,
|
|
2819
2819
|
ZodEffects: I,
|
|
2820
2820
|
ZodTransformer: I,
|
|
2821
2821
|
ZodOptional: j,
|
|
@@ -2859,9 +2859,9 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2859
2859
|
oboolean: er,
|
|
2860
2860
|
onumber: Ft,
|
|
2861
2861
|
optional: Ht,
|
|
2862
|
-
ostring:
|
|
2863
|
-
pipeline:
|
|
2864
|
-
preprocess:
|
|
2862
|
+
ostring: Kt,
|
|
2863
|
+
pipeline: Xt,
|
|
2864
|
+
preprocess: Qt,
|
|
2865
2865
|
promise: Jt,
|
|
2866
2866
|
record: Vt,
|
|
2867
2867
|
set: Lt,
|
|
@@ -2916,7 +2916,7 @@ const cr = () => {
|
|
|
2916
2916
|
zFile: ({ required: g, multiple: k, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => k || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((We) => We.size <= w), `Maximum file size is ${Fe(w)}.`).transform((T) => (k ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
2918
|
}, ur = (r, e = !1) => {
|
|
2919
|
-
const t = Je({ silent: e }), { startLoading: n, stopLoading: s } = Ae(He), a = Ge(0), [i, o] =
|
|
2919
|
+
const t = Je({ silent: e }), { startLoading: n, stopLoading: s } = Ae(He), a = Ge(0), [i, o] = Qe(null), u = Xe(async (c, m) => {
|
|
2920
2920
|
!e && n(`loadData-${r}-${m}`), o(null);
|
|
2921
2921
|
try {
|
|
2922
2922
|
const C = await t.get(r, {
|
|
@@ -2927,7 +2927,7 @@ const cr = () => {
|
|
|
2927
2927
|
!e && s(`loadData-${r}-${m}`);
|
|
2928
2928
|
}
|
|
2929
2929
|
}, [t, n, s, r, e]);
|
|
2930
|
-
return
|
|
2930
|
+
return Ke(() => {
|
|
2931
2931
|
const c = new AbortController();
|
|
2932
2932
|
return u(c.signal, ++a.current), () => {
|
|
2933
2933
|
c.abort();
|
package/dist/layout.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as B, j as e, b as o, X as I, Y as P } from "./NoInputContainer-BnAPYzCz.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-
|
|
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",
|
|
4
|
+
import { u as y } from "./usePermissions-Dn_gKjni.js";
|
|
5
|
+
import { S } from "./SimpleTooltip-ty5BQkX3.js";
|
|
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", Q = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", X = "_children_6vbwa_57", i = {
|
|
7
7
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
8
8
|
sideMenuItem: T,
|
|
9
9
|
disabled: $,
|
|
@@ -17,16 +17,16 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
17
17
|
collapsed: A,
|
|
18
18
|
expanded: K,
|
|
19
19
|
"children-container": "_children-container_6vbwa_57",
|
|
20
|
-
childrenContainer:
|
|
21
|
-
visible:
|
|
22
|
-
children:
|
|
23
|
-
},
|
|
20
|
+
childrenContainer: Q,
|
|
21
|
+
visible: U,
|
|
22
|
+
children: X
|
|
23
|
+
}, 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 }) => {
|
|
24
24
|
var b, v;
|
|
25
25
|
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 === _));
|
|
26
26
|
return /* @__PURE__ */ e.jsxs("li", { className: o("luminus-side-menu-item", i.sideMenuItem, {
|
|
27
27
|
[i.expanded]: t
|
|
28
28
|
}, { 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: [
|
|
29
|
-
/* @__PURE__ */ e.jsx(
|
|
29
|
+
/* @__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: [
|
|
30
30
|
/* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
|
|
31
31
|
t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title }),
|
|
32
32
|
t && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", i.collapseIcon, {
|
|
@@ -40,15 +40,15 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
40
40
|
[i.visible]: a
|
|
41
41
|
}), 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)) }) })
|
|
42
42
|
] });
|
|
43
|
-
},
|
|
43
|
+
}, 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 = {
|
|
44
44
|
"side-menu": "_side-menu_n1hvm_1",
|
|
45
|
-
sideMenu:
|
|
45
|
+
sideMenu: q,
|
|
46
46
|
"sidebar-header": "_sidebar-header_n1hvm_13",
|
|
47
|
-
sidebarHeader:
|
|
47
|
+
sidebarHeader: z,
|
|
48
48
|
"side-menu-content": "_side-menu-content_n1hvm_18",
|
|
49
|
-
sideMenuContent:
|
|
50
|
-
expand:
|
|
51
|
-
divider:
|
|
49
|
+
sideMenuContent: D,
|
|
50
|
+
expand: G,
|
|
51
|
+
divider: J
|
|
52
52
|
}, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: d, currentPath: c }) => {
|
|
53
53
|
const [p, u] = M(-1), { checkUserHasPermissions: _ } = y(), x = j(() => t.map((s) => {
|
|
54
54
|
var l;
|
|
@@ -86,9 +86,9 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
|
|
|
86
86
|
b.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title))
|
|
87
87
|
] })
|
|
88
88
|
] });
|
|
89
|
-
},
|
|
89
|
+
}, V = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
|
|
90
90
|
"top-bar": "_top-bar_1lk80_1",
|
|
91
|
-
topBar:
|
|
91
|
+
topBar: V,
|
|
92
92
|
"top-bar-brand": "_top-bar-brand_1lk80_14",
|
|
93
93
|
topBarBrand: Z
|
|
94
94
|
}, le = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {
|