react-luminus-components 1.3.48 → 1.3.49
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 +69 -69
- package/dist/{PrimaryButton-R456AnRz.js → PrimaryButton-ByKyWqwd.js} +1 -1
- package/dist/{PrimaryButton-CPcXJhYt.cjs → PrimaryButton-CFqOb1bv.cjs} +1 -1
- package/dist/{SimpleTooltip-DYrAVkD0.cjs → SimpleTooltip-DYxPkXgn.cjs} +1 -1
- package/dist/{SimpleTooltip-CN7Is6YN.js → SimpleTooltip-DqIdlcRY.js} +1 -1
- package/dist/components/common/SearchBox/SearchBox.d.ts +8 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +8 -8
- package/dist/{dateUtils-DLb1nP1q.js → dateUtils-D3ihjADH.js} +13 -13
- package/dist/{dateUtils-Bc-kGMdV.cjs → dateUtils-Sm1hYKnO.cjs} +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +37 -37
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +1344 -1334
- package/dist/{nivo-pie.es-BJ1l5OpS.cjs → nivo-pie.es-CeZbGy8u.cjs} +40 -40
- package/dist/{nivo-pie.es-CoN57YDH.js → nivo-pie.es-mdfdQL4R.js} +219 -215
- package/dist/{searchUtils-CKVGpXMd.js → searchUtils-pmMfjkU3.js} +1 -1
- package/dist/{searchUtils-BV44hoaC.cjs → searchUtils-qC84J1Yy.cjs} +1 -1
- package/dist/{useConfirm-DZ-jWpsy.js → useConfirm-Ck4Qo5KA.js} +1 -1
- package/dist/{useConfirm-CUsacgMv.cjs → useConfirm-cHBuY98J.cjs} +1 -1
- package/dist/{useLocalStorageState-CnG22J8a.js → useLocalStorageState-CTM-VtC2.js} +11 -11
- package/dist/{useLocalStorageState-isx3MAJp.cjs → useLocalStorageState-ClBA0936.cjs} +1 -1
- package/dist/{usePermissions-3oMWt-B1.cjs → usePermissions-Bzr5Et1a.cjs} +1 -1
- package/dist/{usePermissions-Ca5nob2q.js → usePermissions-RgnKfews.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +15 -15
- package/package.json +1 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { U as We,
|
|
2
|
-
import {
|
|
3
|
-
import { u as _r } from "./useConfirm-
|
|
4
|
-
import { b as gr, a as xr, u as kr } from "./useLocalStorageState-
|
|
5
|
-
import { useContext as
|
|
6
|
-
import { i as Xe } from "./dateUtils-
|
|
1
|
+
import { U as We, aI as Je, a5 as Ye } from "./nivo-pie.es-mdfdQL4R.js";
|
|
2
|
+
import { aJ as hr, aa as mr, al as pr } from "./nivo-pie.es-mdfdQL4R.js";
|
|
3
|
+
import { u as _r } from "./useConfirm-Ck4Qo5KA.js";
|
|
4
|
+
import { b as gr, a as xr, u as kr } from "./useLocalStorageState-CTM-VtC2.js";
|
|
5
|
+
import { useContext as Ge, useState as He, useEffect as Qe } from "react";
|
|
6
|
+
import { i as Xe } from "./dateUtils-D3ihjADH.js";
|
|
7
7
|
import "@azure/msal-browser";
|
|
8
8
|
import "@azure/msal-react";
|
|
9
9
|
import "react-router-dom";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import { a as wr, e as Tr, b as Zr, u as Sr, c as Cr, d as Or } from "./useEmployeePhotoPath-DjxgOb6H.js";
|
|
12
|
-
import { u as Er } from "./usePermissions-
|
|
12
|
+
import { u as Er } from "./usePermissions-RgnKfews.js";
|
|
13
13
|
var x;
|
|
14
14
|
(function(r) {
|
|
15
15
|
r.assertEqual = (s) => s;
|
|
@@ -174,7 +174,7 @@ class N extends Error {
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
N.create = (r) => new N(r);
|
|
177
|
-
const
|
|
177
|
+
const H = (r, e) => {
|
|
178
178
|
let t;
|
|
179
179
|
switch (r.code) {
|
|
180
180
|
case d.invalid_type:
|
|
@@ -230,7 +230,7 @@ const G = (r, e) => {
|
|
|
230
230
|
}
|
|
231
231
|
return { message: t };
|
|
232
232
|
};
|
|
233
|
-
let Ae =
|
|
233
|
+
let Ae = H;
|
|
234
234
|
function Fe(r) {
|
|
235
235
|
Ae = r;
|
|
236
236
|
}
|
|
@@ -267,7 +267,7 @@ function l(r, e) {
|
|
|
267
267
|
r.common.contextualErrorMap,
|
|
268
268
|
r.schemaErrorMap,
|
|
269
269
|
t,
|
|
270
|
-
t ===
|
|
270
|
+
t === H ? void 0 : H
|
|
271
271
|
// then global default map
|
|
272
272
|
].filter((s) => !!s)
|
|
273
273
|
});
|
|
@@ -316,7 +316,7 @@ class Z {
|
|
|
316
316
|
}
|
|
317
317
|
const p = Object.freeze({
|
|
318
318
|
status: "aborted"
|
|
319
|
-
}),
|
|
319
|
+
}), Y = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
320
320
|
function ve(r, e, t, n) {
|
|
321
321
|
if (typeof e == "function" ? r !== e || !n : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
322
322
|
return e.get(r);
|
|
@@ -1503,12 +1503,12 @@ R.create = (r, e) => new R({
|
|
|
1503
1503
|
typeName: m.ZodArray,
|
|
1504
1504
|
..._(e)
|
|
1505
1505
|
});
|
|
1506
|
-
function
|
|
1506
|
+
function J(r) {
|
|
1507
1507
|
if (r instanceof k) {
|
|
1508
1508
|
const e = {};
|
|
1509
1509
|
for (const t in r.shape) {
|
|
1510
1510
|
const n = r.shape[t];
|
|
1511
|
-
e[t] = j.create(
|
|
1511
|
+
e[t] = j.create(J(n));
|
|
1512
1512
|
}
|
|
1513
1513
|
return new k({
|
|
1514
1514
|
...r._def,
|
|
@@ -1516,8 +1516,8 @@ function Y(r) {
|
|
|
1516
1516
|
});
|
|
1517
1517
|
} else return r instanceof R ? new R({
|
|
1518
1518
|
...r._def,
|
|
1519
|
-
type:
|
|
1520
|
-
}) : r instanceof j ? j.create(
|
|
1519
|
+
type: J(r.element)
|
|
1520
|
+
}) : r instanceof j ? j.create(J(r.unwrap())) : r instanceof q ? q.create(J(r.unwrap())) : r instanceof M ? M.create(r.items.map((e) => J(e))) : r;
|
|
1521
1521
|
}
|
|
1522
1522
|
class k extends v {
|
|
1523
1523
|
constructor() {
|
|
@@ -1753,7 +1753,7 @@ class k extends v {
|
|
|
1753
1753
|
* @deprecated
|
|
1754
1754
|
*/
|
|
1755
1755
|
deepPartial() {
|
|
1756
|
-
return
|
|
1756
|
+
return J(this);
|
|
1757
1757
|
}
|
|
1758
1758
|
partial(e) {
|
|
1759
1759
|
const t = {};
|
|
@@ -2209,7 +2209,7 @@ W.create = (r, e) => new W({
|
|
|
2209
2209
|
typeName: m.ZodSet,
|
|
2210
2210
|
..._(e)
|
|
2211
2211
|
});
|
|
2212
|
-
class
|
|
2212
|
+
class G extends v {
|
|
2213
2213
|
constructor() {
|
|
2214
2214
|
super(...arguments), this.validate = this.implement;
|
|
2215
2215
|
}
|
|
@@ -2229,7 +2229,7 @@ class J extends v {
|
|
|
2229
2229
|
t.common.contextualErrorMap,
|
|
2230
2230
|
t.schemaErrorMap,
|
|
2231
2231
|
ye(),
|
|
2232
|
-
|
|
2232
|
+
H
|
|
2233
2233
|
].filter((c) => !!c),
|
|
2234
2234
|
issueData: {
|
|
2235
2235
|
code: d.invalid_arguments,
|
|
@@ -2245,7 +2245,7 @@ class J extends v {
|
|
|
2245
2245
|
t.common.contextualErrorMap,
|
|
2246
2246
|
t.schemaErrorMap,
|
|
2247
2247
|
ye(),
|
|
2248
|
-
|
|
2248
|
+
H
|
|
2249
2249
|
].filter((c) => !!c),
|
|
2250
2250
|
issueData: {
|
|
2251
2251
|
code: d.invalid_return_type,
|
|
@@ -2284,13 +2284,13 @@ class J extends v {
|
|
|
2284
2284
|
return this._def.returns;
|
|
2285
2285
|
}
|
|
2286
2286
|
args(...e) {
|
|
2287
|
-
return new
|
|
2287
|
+
return new G({
|
|
2288
2288
|
...this._def,
|
|
2289
2289
|
args: M.create(e).rest(U.create())
|
|
2290
2290
|
});
|
|
2291
2291
|
}
|
|
2292
2292
|
returns(e) {
|
|
2293
|
-
return new
|
|
2293
|
+
return new G({
|
|
2294
2294
|
...this._def,
|
|
2295
2295
|
returns: e
|
|
2296
2296
|
});
|
|
@@ -2302,7 +2302,7 @@ class J extends v {
|
|
|
2302
2302
|
return this.parse(e);
|
|
2303
2303
|
}
|
|
2304
2304
|
static create(e, t, n) {
|
|
2305
|
-
return new
|
|
2305
|
+
return new G({
|
|
2306
2306
|
args: e || M.create([]).rest(U.create()),
|
|
2307
2307
|
returns: t || U.create(),
|
|
2308
2308
|
typeName: m.ZodFunction,
|
|
@@ -2496,7 +2496,7 @@ class I extends v {
|
|
|
2496
2496
|
path: n.path,
|
|
2497
2497
|
parent: n
|
|
2498
2498
|
});
|
|
2499
|
-
return u.status === "aborted" ? p : u.status === "dirty" || t.value === "dirty" ?
|
|
2499
|
+
return u.status === "aborted" ? p : u.status === "dirty" || t.value === "dirty" ? Y(u.value) : u;
|
|
2500
2500
|
});
|
|
2501
2501
|
{
|
|
2502
2502
|
if (t.value === "aborted")
|
|
@@ -2506,7 +2506,7 @@ class I extends v {
|
|
|
2506
2506
|
path: n.path,
|
|
2507
2507
|
parent: n
|
|
2508
2508
|
});
|
|
2509
|
-
return o.status === "aborted" ? p : o.status === "dirty" || t.value === "dirty" ?
|
|
2509
|
+
return o.status === "aborted" ? p : o.status === "dirty" || t.value === "dirty" ? Y(o.value) : o;
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
2512
|
if (s.type === "refinement") {
|
|
@@ -2688,7 +2688,7 @@ class me extends v {
|
|
|
2688
2688
|
path: n.path,
|
|
2689
2689
|
parent: n
|
|
2690
2690
|
});
|
|
2691
|
-
return a.status === "aborted" ? p : a.status === "dirty" ? (t.dirty(),
|
|
2691
|
+
return a.status === "aborted" ? p : a.status === "dirty" ? (t.dirty(), Y(a.value)) : this._def.out._parseAsync({
|
|
2692
2692
|
data: a.value,
|
|
2693
2693
|
path: n.path,
|
|
2694
2694
|
parent: n
|
|
@@ -2750,7 +2750,7 @@ var m;
|
|
|
2750
2750
|
})(m || (m = {}));
|
|
2751
2751
|
const vt = (r, e = {
|
|
2752
2752
|
message: `Input not instance of ${r.name}`
|
|
2753
|
-
}) => De((t) => t instanceof r, e), Le = E.create, qe = V.create, gt = be.create, xt = D.create, Ue = re.create, kt = B.create, bt = ge.create, wt = ne.create, Tt = se.create, Zt = Q.create, St = U.create, Ct = P.create, Ot = xe.create, Nt = R.create, Et = k.create, Rt = k.strictCreate, It = ae.create, jt = we.create, At = ie.create, Mt = M.create, $t = oe.create, Pt = ke.create, zt = W.create, Vt =
|
|
2753
|
+
}) => De((t) => t instanceof r, e), Le = E.create, qe = V.create, gt = be.create, xt = D.create, Ue = re.create, kt = B.create, bt = ge.create, wt = ne.create, Tt = se.create, Zt = Q.create, St = U.create, Ct = P.create, Ot = xe.create, Nt = R.create, Et = k.create, Rt = k.strictCreate, It = ae.create, jt = we.create, At = ie.create, Mt = M.create, $t = oe.create, Pt = ke.create, zt = W.create, Vt = G.create, Dt = de.create, Lt = ce.create, qt = L.create, Ut = ue.create, Bt = X.create, je = I.create, Wt = j.create, Jt = q.create, Yt = I.createWithPreprocess, Gt = me.create, Ht = () => Le().optional(), Qt = () => qe().optional(), Xt = () => Ue().optional(), Kt = {
|
|
2754
2754
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2755
2755
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2756
2756
|
boolean: (r) => re.create({
|
|
@@ -2762,7 +2762,7 @@ const vt = (r, e = {
|
|
|
2762
2762
|
}, Ft = p;
|
|
2763
2763
|
var C = /* @__PURE__ */ Object.freeze({
|
|
2764
2764
|
__proto__: null,
|
|
2765
|
-
defaultErrorMap:
|
|
2765
|
+
defaultErrorMap: H,
|
|
2766
2766
|
setErrorMap: Fe,
|
|
2767
2767
|
getErrorMap: ye,
|
|
2768
2768
|
makeIssue: _e,
|
|
@@ -2770,7 +2770,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2770
2770
|
addIssueToContext: l,
|
|
2771
2771
|
ParseStatus: Z,
|
|
2772
2772
|
INVALID: p,
|
|
2773
|
-
DIRTY:
|
|
2773
|
+
DIRTY: Y,
|
|
2774
2774
|
OK: S,
|
|
2775
2775
|
isAborted: Ce,
|
|
2776
2776
|
isDirty: Oe,
|
|
@@ -2807,7 +2807,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2807
2807
|
ZodRecord: oe,
|
|
2808
2808
|
ZodMap: ke,
|
|
2809
2809
|
ZodSet: W,
|
|
2810
|
-
ZodFunction:
|
|
2810
|
+
ZodFunction: G,
|
|
2811
2811
|
ZodLazy: de,
|
|
2812
2812
|
ZodLiteral: ce,
|
|
2813
2813
|
ZodEnum: L,
|
|
@@ -2850,15 +2850,15 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2850
2850
|
nativeEnum: Ut,
|
|
2851
2851
|
never: Ct,
|
|
2852
2852
|
null: Tt,
|
|
2853
|
-
nullable:
|
|
2853
|
+
nullable: Jt,
|
|
2854
2854
|
number: qe,
|
|
2855
2855
|
object: Et,
|
|
2856
2856
|
oboolean: Xt,
|
|
2857
2857
|
onumber: Qt,
|
|
2858
2858
|
optional: Wt,
|
|
2859
|
-
ostring:
|
|
2860
|
-
pipeline:
|
|
2861
|
-
preprocess:
|
|
2859
|
+
ostring: Ht,
|
|
2860
|
+
pipeline: Gt,
|
|
2861
|
+
preprocess: Yt,
|
|
2862
2862
|
promise: Bt,
|
|
2863
2863
|
record: $t,
|
|
2864
2864
|
set: zt,
|
|
@@ -2877,7 +2877,7 @@ var C = /* @__PURE__ */ Object.freeze({
|
|
|
2877
2877
|
ZodError: N
|
|
2878
2878
|
});
|
|
2879
2879
|
const cr = () => {
|
|
2880
|
-
const { texts: { formValidation: r } } =
|
|
2880
|
+
const { texts: { formValidation: r } } = Ge(We), e = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2881
2881
|
invalid_type_error: r.required,
|
|
2882
2882
|
required_error: r.required
|
|
2883
2883
|
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((b) => b ?? null), n = (g) => {
|
|
@@ -2910,7 +2910,7 @@ const cr = () => {
|
|
|
2910
2910
|
zObjectIdIntRequired: (g) => C.object({ id: n() }).transform((w) => w ?? null),
|
|
2911
2911
|
zObjectIdStr: (g) => C.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2912
2912
|
zObjectIdStrRequired: (g) => C.object({ id: e() }).transform((w) => w ?? null),
|
|
2913
|
-
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((Be) => Be.size <= w), `Maximum file size is ${
|
|
2913
|
+
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((Be) => Be.size <= w), `Maximum file size is ${Je(w)}.`).transform((T) => (b ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2914
2914
|
};
|
|
2915
2915
|
}, er = (r) => {
|
|
2916
2916
|
let e = "pending", t;
|
|
@@ -2933,7 +2933,7 @@ const cr = () => {
|
|
|
2933
2933
|
};
|
|
2934
2934
|
};
|
|
2935
2935
|
function ur(r) {
|
|
2936
|
-
const e =
|
|
2936
|
+
const e = Ye({ silent: !0 }), [t, n] = He(null);
|
|
2937
2937
|
return Qe(() => {
|
|
2938
2938
|
(async () => {
|
|
2939
2939
|
const a = e.get(r).then((i) => i.data);
|
|
@@ -2944,7 +2944,7 @@ function ur(r) {
|
|
|
2944
2944
|
export {
|
|
2945
2945
|
hr as cancelToken,
|
|
2946
2946
|
mr as useAuth,
|
|
2947
|
-
|
|
2947
|
+
Ye as useAxios,
|
|
2948
2948
|
wr as useClickOutside,
|
|
2949
2949
|
_r as useConfirm,
|
|
2950
2950
|
Tr as useEmployeePhotoPath,
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-pie.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-pie.es-CeZbGy8u.cjs"),j=require("react"),b=require("react-router-dom");require("react-hook-form");require("@azure/msal-browser");require("@azure/msal-react");const M=require("./usePermissions-Bzr5Et1a.cjs"),B=require("./SimpleTooltip-DYxPkXgn.cjs"),k="_side-menu-item_6vbwa_1",C="_disabled_6vbwa_5",P="_nav-button_6vbwa_9",S="_child_6vbwa_17",f="_text_6vbwa_21",g="_icon_6vbwa_28",y="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",T="_expanded_6vbwa_51",$="_children-container_6vbwa_57",q="_visible_6vbwa_65",H="_children_6vbwa_57",i={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:k,disabled:C,"nav-button":"_nav-button_6vbwa_9",navButton:P,child:S,text:f,icon:g,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:y,collapsed:I,expanded:T,"children-container":"_children-container_6vbwa_57",childrenContainer:$,visible:q,children:H},L=({item:e,menuExpanded:n,children:t})=>e.tooltip&&!n?s.jsxRuntimeExports.jsx(B.SimpleTooltip,{text:e.tooltip,placement:"right",children:t}):t,R=({item:e,menuExpanded:n,collapsed:t,onCollapse:r,currentPath:c})=>{var v,h;const[d,x]=j.useState(!1),[m]=c.split("?"),u=e.linkTo===m||((v=e.children)==null?void 0:v.some(o=>o.linkTo===m));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",i.sideMenuItem,{[i.expanded]:n},{active:d||u},{open:t&&e.children},{[i.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:n,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",i.navButton),onClick:()=>r(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",i.icon),children:e.icon}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:e.title}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",i.collapseIcon,{[i.collapsed]:t}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(b.Link,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",i.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",i.icon),children:e.icon}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",i.childrenContainer,{[i.visible]:t}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",i.children),children:(h=e.children)==null?void 0:h.map(o=>s.jsxRuntimeExports.jsx(b.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:s.classNames("nav-link child rounded",i.navButton,i.child,{[i.disabled]:o.disabled||o.notPermitted},{disabled:o.disabled||o.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},F="_side-menu_n1hvm_1",A="_sidebar-header_n1hvm_13",D="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",_={"side-menu":"_side-menu_n1hvm_1",sideMenu:F,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:A,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:D,expand:K,divider:U},z=({headerItem:e,mainItems:n,secondaryItems:t,expanded:r,setExpanded:c,currentPath:d})=>{const[x,m]=j.useState(-1),{checkUserHasPermissions:u}=M.usePermissions(),v=j.useMemo(()=>n.map(a=>{var l;return{...a,notPermitted:!u(a.permissions??[]),children:(l=a.children)==null?void 0:l.map(p=>({...p,notPermitted:!u(p.permissions??[]),disabled:a.disabled||p.disabled}))}}),[n,u]),h=j.useMemo(()=>t.map(a=>{var l;return{...a,notPermitted:!u(a.permissions??[]),children:(l=a.children)==null?void 0:l.map(p=>({...p,notPermitted:!u(p.permissions??[])}))}}),[t,u]),o=a=>{m(a===x?-1:a)};return j.useEffect(()=>{r||m(-1)},[r]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",_.sideMenu,{[_.expand]:r},{expand:r}),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",_.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:_.sideMenuContent,children:[v.map((a,l)=>s.jsxRuntimeExports.jsx(R,{item:a,menuExpanded:r,collapsed:l===x,onCollapse:()=>o(l),currentPath:d},a.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",_.divider)}),h.map((a,l)=>s.jsxRuntimeExports.jsx(R,{item:a,menuExpanded:r,collapsed:l===x,onCollapse:()=>o(l),currentPath:d},a.title))]})]})},G="_top-bar_1lk80_1",J="_top-bar-brand_1lk80_14",E={"top-bar":"_top-bar_1lk80_1",topBar:G,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:J},O=({appName:e,leftOffset:n,centerContent:t,rightContent:r})=>s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",E.topBar),style:{width:n?`calc(100% - ${n}px)`:void 0,left:n?`${n}px`:void 0},children:[s.jsxRuntimeExports.jsx(b.Link,{to:"/",className:s.classNames("luminus-top-bar-brand",E.topBarBrand),children:e}),t&&s.jsxRuntimeExports.jsx("div",{children:t}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:r??null})]}),Q="_side-content-bar_17kwd_1",V={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:Q},N=({width:e,children:n})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",V.sideContentBar),style:{width:`${e}px`},children:n}),w=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),X=({title:e,children:n,sideContent:t,sideContentWidth:r=250,noPadding:c,className:d})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",c?"p-0":"p-3",d),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:t?`${r}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(w,{title:e}):null,n]}),t&&s.jsxRuntimeExports.jsx(N,{width:r,children:t})]}),Y="_full-screen-container_1rm4r_1",Z={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:Y},W=({title:e,children:n,sideContent:t,sideContentWidth:r=250,noPadding:c,className:d})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",c?"p-0":"p-3",d,Z.fullScreenContainer),style:{width:t?`calc(100% - ${r}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(w,{title:e}):null,n]}),t&&s.jsxRuntimeExports.jsx(N,{width:r,children:t})]});exports.FullScreenContainer=W;exports.MainContainer=X;exports.SideContentBar=N;exports.SideMenu=z;exports.TopBar=O;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as e, c as t, Z as C, S as I } from "./nivo-pie.es-
|
|
1
|
+
import { j as e, c as t, Z as C, S as I } from "./nivo-pie.es-mdfdQL4R.js";
|
|
2
2
|
import { useState as M, useMemo as w, useEffect as P } from "react";
|
|
3
3
|
import { Link as j } from "react-router-dom";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "@azure/msal-browser";
|
|
6
6
|
import "@azure/msal-react";
|
|
7
|
-
import { u as g } from "./usePermissions-
|
|
8
|
-
import { S as y } from "./SimpleTooltip-
|
|
7
|
+
import { u as g } from "./usePermissions-RgnKfews.js";
|
|
8
|
+
import { S as y } from "./SimpleTooltip-DqIdlcRY.js";
|
|
9
9
|
const S = "_side-menu-item_6vbwa_1", T = "_disabled_6vbwa_5", $ = "_nav-button_6vbwa_9", H = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", L = "_collapse-icon_6vbwa_34", R = "_collapsed_6vbwa_44", A = "_expanded_6vbwa_51", K = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", Z = "_children_6vbwa_57", i = {
|
|
10
10
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
11
11
|
sideMenuItem: S,
|