react-luminus-components 1.3.152 → 1.3.156
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 +349 -349
- package/dist/.vite/manifest.json +52 -52
- package/dist/Loading-Bb2_fdjT.cjs +1 -0
- package/dist/{Loading-D012N8ha.js → Loading-CV3ZT5gc.js} +1 -1
- package/dist/components/Documents/components/DocumentDirectory/components/DocumentDirectoryLabel/DocumentDirectoryLabel.d.ts +2 -1
- package/dist/components/Form/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +1 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +4 -2
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +61 -61
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +21 -21
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +22 -22
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +3125 -3107
- package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +2 -0
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +2 -0
- package/dist/models/texts/CustomSelectTexts.d.ts +3 -0
- package/dist/nivo-bar.es-CaE2W807.cjs +279 -0
- package/dist/{ResponsiveContextDropdown-C9WqbqI0.js → nivo-bar.es-DDwtI-my.js} +11142 -11133
- package/dist/{searchUtils-Bd-Jy9zp.js → searchUtils-C6PvM1bt.js} +1 -1
- package/dist/searchUtils-b1QW5y-z.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useClipboard-BD7keGSc.cjs +1 -0
- package/dist/{useClipboard-ClHiiBOP.js → useClipboard-aZlIwfmN.js} +1 -1
- package/dist/useGetApiData-CC06DqnB.cjs +1 -0
- package/dist/{useGetApiData-DvRb2p5u.js → useGetApiData-Hc-yXwUZ.js} +8 -8
- package/dist/usePermissions-BJe0PsSE.cjs +1 -0
- package/dist/usePermissions-CtHtAy8y.js +20 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +26 -26
- package/dist/variables.scss +165 -165
- package/package.json +116 -116
- package/dist/Loading-TbgEJLF_.cjs +0 -1
- package/dist/ResponsiveContextDropdown-ep8LBIy7.cjs +0 -279
- package/dist/searchUtils-CqU0wzK3.cjs +0 -1
- package/dist/useClipboard-BoSxUeRj.cjs +0 -1
- package/dist/useGetApiData-B2Ap2urp.cjs +0 -1
- package/dist/usePermissions-CE2IinZO.js +0 -20
- package/dist/usePermissions-LOq-NC5k.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { t as N,
|
|
1
|
+
var be = Object.defineProperty;
|
|
2
|
+
var Se = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var b = (e, t, r) => Se(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { t as N, bh as Oe, j as f, bi as Ee, a2 as z, ap as we, bj as ue, av as S, am as Ie, a3 as G, bk as je, at as Pe, ar as De, aV as fe, bl as de, aW as ke, aX as D, as as Le, bm as He, aF as se, bn as _e, bo as me, bp as oe, bq as $e, aq as Me } from "./nivo-bar.es-DDwtI-my.js";
|
|
5
5
|
import E, { useState as C, useCallback as p, useMemo as A, useContext as _, useEffect as P, useRef as pe, Component as te } from "react";
|
|
6
|
-
import { EventType as
|
|
6
|
+
import { EventType as J } from "@azure/msal-browser";
|
|
7
7
|
import { MsalProvider as Re } from "@azure/msal-react";
|
|
8
8
|
import "react-router-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
|
-
import { L as Ue } from "./Loading-
|
|
12
|
-
import { u as Ne } from "./useGetApiData-
|
|
11
|
+
import { L as Ue } from "./Loading-CV3ZT5gc.js";
|
|
12
|
+
import { u as Ne } from "./useGetApiData-Hc-yXwUZ.js";
|
|
13
13
|
import { u as Fe } from "./useLocalStorageState-Bt99kkCr.js";
|
|
14
|
-
function
|
|
14
|
+
function qe(e) {
|
|
15
15
|
const t = N(e);
|
|
16
16
|
return t.setHours(23, 59, 59, 999), t;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function Ge() {
|
|
19
|
+
return qe(Date.now());
|
|
20
20
|
}
|
|
21
21
|
function ze(e, t) {
|
|
22
22
|
const r = +N(e), [n, s] = [
|
|
@@ -28,7 +28,7 @@ function ze(e, t) {
|
|
|
28
28
|
function Ke() {
|
|
29
29
|
return Oe(Date.now());
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const Ve = ({ children: e }) => {
|
|
32
32
|
const [t, r] = C(!1), [n, s] = C(""), o = p((i) => {
|
|
33
33
|
r(!0), s(i);
|
|
34
34
|
}, []), c = p(() => {
|
|
@@ -38,7 +38,7 @@ const Be = ({ children: e }) => {
|
|
|
38
38
|
/* @__PURE__ */ f.jsx(At, {}),
|
|
39
39
|
e
|
|
40
40
|
] });
|
|
41
|
-
},
|
|
41
|
+
}, Be = () => {
|
|
42
42
|
const { texts: { confirm: e } } = _(z), { isShown: t, text: r, onFinish: n } = we(), { options: s } = _(ue), [o, c] = C(s.defaultValue ?? ""), a = p(() => {
|
|
43
43
|
n(null);
|
|
44
44
|
}, [n]), i = p((u) => {
|
|
@@ -54,16 +54,16 @@ const Be = ({ children: e }) => {
|
|
|
54
54
|
autoFocus: !0,
|
|
55
55
|
tabIndex: 0
|
|
56
56
|
}), [o]);
|
|
57
|
-
return /* @__PURE__ */ f.jsxs(
|
|
58
|
-
/* @__PURE__ */ f.jsx(
|
|
57
|
+
return /* @__PURE__ */ f.jsxs(S, { show: t, size: "sm", centered: !0, onHide: a, children: [
|
|
58
|
+
/* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: r }) }),
|
|
59
59
|
/* @__PURE__ */ f.jsxs("form", { onSubmit: i, children: [
|
|
60
|
-
/* @__PURE__ */ f.jsxs(
|
|
60
|
+
/* @__PURE__ */ f.jsxs(S.Body, { children: [
|
|
61
61
|
s.input === "textarea" ? /* @__PURE__ */ f.jsx("textarea", { ...l, rows: 5 }) : void 0,
|
|
62
62
|
s.input === "input" ? /* @__PURE__ */ f.jsx(Ie, { ...l, type: s.type }) : void 0
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */ f.jsxs(
|
|
65
|
-
/* @__PURE__ */ f.jsx(
|
|
66
|
-
/* @__PURE__ */ f.jsx(
|
|
64
|
+
/* @__PURE__ */ f.jsxs(S.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
65
|
+
/* @__PURE__ */ f.jsx(G, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
|
|
66
|
+
/* @__PURE__ */ f.jsx(G, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
67
67
|
] })
|
|
68
68
|
] })
|
|
69
69
|
] });
|
|
@@ -84,7 +84,7 @@ const Be = ({ children: e }) => {
|
|
|
84
84
|
}), [t, n, i, l, o]);
|
|
85
85
|
return /* @__PURE__ */ f.jsxs(ue.Provider, { value: u, children: [
|
|
86
86
|
e,
|
|
87
|
-
/* @__PURE__ */ f.jsx(
|
|
87
|
+
/* @__PURE__ */ f.jsx(Be, {})
|
|
88
88
|
] });
|
|
89
89
|
}, Ht = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: c, children: a }) => {
|
|
90
90
|
const i = A(() => ({
|
|
@@ -104,7 +104,7 @@ const Be = ({ children: e }) => {
|
|
|
104
104
|
n,
|
|
105
105
|
c
|
|
106
106
|
]);
|
|
107
|
-
return /* @__PURE__ */ f.jsx(z.Provider, { value: i, children: /* @__PURE__ */ f.jsx(
|
|
107
|
+
return /* @__PURE__ */ f.jsx(z.Provider, { value: i, children: /* @__PURE__ */ f.jsx(Ve, { children: /* @__PURE__ */ f.jsxs(Ye, { children: [
|
|
108
108
|
/* @__PURE__ */ f.jsx(je, {}),
|
|
109
109
|
a
|
|
110
110
|
] }) }) });
|
|
@@ -163,7 +163,7 @@ const Be = ({ children: e }) => {
|
|
|
163
163
|
P(() => {
|
|
164
164
|
if (r) {
|
|
165
165
|
const y = r.addEventCallback((v) => {
|
|
166
|
-
if (v.eventType ===
|
|
166
|
+
if (v.eventType === J.LOGIN_SUCCESS && v.payload) {
|
|
167
167
|
const K = v.payload;
|
|
168
168
|
l(K.accessToken);
|
|
169
169
|
}
|
|
@@ -199,7 +199,7 @@ const Be = ({ children: e }) => {
|
|
|
199
199
|
return P(() => {
|
|
200
200
|
if (e.useMsal) {
|
|
201
201
|
const s = e.msalInstance.addEventCallback((o) => {
|
|
202
|
-
if (o.eventType ===
|
|
202
|
+
if (o.eventType === J.LOGIN_SUCCESS || o.eventType === J.ACQUIRE_TOKEN_SUCCESS && o.payload) {
|
|
203
203
|
const c = o.payload, a = c.account;
|
|
204
204
|
e.msalInstance.setActiveAccount(a);
|
|
205
205
|
const i = c.accessToken, l = c.expiresOn;
|
|
@@ -224,7 +224,7 @@ const Be = ({ children: e }) => {
|
|
|
224
224
|
const [r, n, s] = Fe("user-delegation", null), o = A(() => {
|
|
225
225
|
if (!r)
|
|
226
226
|
return null;
|
|
227
|
-
const d = r.from ? se(r.from) : Ke(), h = r.to ? se(r.to) :
|
|
227
|
+
const d = r.from ? se(r.from) : Ke(), h = r.to ? se(r.to) : Ge();
|
|
228
228
|
return ze(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
|
|
229
229
|
}, [r, n]), { data: c, setData: a, reloadData: i } = Ne(t, {
|
|
230
230
|
nullStateBeforeLoad: !1,
|
|
@@ -260,7 +260,7 @@ const Be = ({ children: e }) => {
|
|
|
260
260
|
]);
|
|
261
261
|
return /* @__PURE__ */ f.jsx(de.Provider, { value: u, children: e });
|
|
262
262
|
};
|
|
263
|
-
var
|
|
263
|
+
var We = typeof Element < "u", Je = typeof Map == "function", Ze = typeof Set == "function", Qe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
264
264
|
function F(e, t) {
|
|
265
265
|
if (e === t) return !0;
|
|
266
266
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -273,7 +273,7 @@ function F(e, t) {
|
|
|
273
273
|
return !0;
|
|
274
274
|
}
|
|
275
275
|
var o;
|
|
276
|
-
if (
|
|
276
|
+
if (Je && e instanceof Map && t instanceof Map) {
|
|
277
277
|
if (e.size !== t.size) return !1;
|
|
278
278
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
279
279
|
if (!t.has(n.value[0])) return !1;
|
|
@@ -281,13 +281,13 @@ function F(e, t) {
|
|
|
281
281
|
if (!F(n.value[1], t.get(n.value[0]))) return !1;
|
|
282
282
|
return !0;
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
284
|
+
if (Ze && e instanceof Set && t instanceof Set) {
|
|
285
285
|
if (e.size !== t.size) return !1;
|
|
286
286
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
287
287
|
if (!t.has(n.value[0])) return !1;
|
|
288
288
|
return !0;
|
|
289
289
|
}
|
|
290
|
-
if (
|
|
290
|
+
if (Qe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
291
291
|
if (r = e.length, r != t.length) return !1;
|
|
292
292
|
for (n = r; n-- !== 0; )
|
|
293
293
|
if (e[n] !== t[n]) return !1;
|
|
@@ -299,7 +299,7 @@ function F(e, t) {
|
|
|
299
299
|
if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
|
|
300
300
|
for (n = r; n-- !== 0; )
|
|
301
301
|
if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
|
|
302
|
-
if (
|
|
302
|
+
if (We && e instanceof Element) return !1;
|
|
303
303
|
for (n = r; n-- !== 0; )
|
|
304
304
|
if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !F(e[s[n]], t[s[n]]))
|
|
305
305
|
return !1;
|
|
@@ -339,7 +339,7 @@ var tt = function(t, r, n, s) {
|
|
|
339
339
|
return !0;
|
|
340
340
|
};
|
|
341
341
|
const rt = /* @__PURE__ */ me(tt);
|
|
342
|
-
var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(he || {}),
|
|
342
|
+
var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(he || {}), V = {
|
|
343
343
|
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
344
344
|
script: { type: ["application/ld+json"] },
|
|
345
345
|
meta: {
|
|
@@ -399,7 +399,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
399
399
|
const n = H(e, L.DEFAULT_TITLE);
|
|
400
400
|
return t || n || void 0;
|
|
401
401
|
}, ot = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
402
|
-
}),
|
|
402
|
+
}), B = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), at = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
|
|
403
403
|
if (!r.length) {
|
|
404
404
|
const s = Object.keys(n);
|
|
405
405
|
for (let o = 0; o < s.length; o += 1) {
|
|
@@ -449,10 +449,10 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
449
449
|
"href"
|
|
450
450
|
/* HREF */
|
|
451
451
|
], e),
|
|
452
|
-
bodyAttributes:
|
|
452
|
+
bodyAttributes: B("bodyAttributes", e),
|
|
453
453
|
defer: H(e, L.DEFER),
|
|
454
454
|
encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
|
|
455
|
-
htmlAttributes:
|
|
455
|
+
htmlAttributes: B("htmlAttributes", e),
|
|
456
456
|
linkTags: M(
|
|
457
457
|
"link",
|
|
458
458
|
[
|
|
@@ -493,7 +493,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
493
493
|
/* CSS_TEXT */
|
|
494
494
|
], e),
|
|
495
495
|
title: st(e),
|
|
496
|
-
titleAttributes:
|
|
496
|
+
titleAttributes: B("titleAttributes", e),
|
|
497
497
|
prioritizeSeoTags: lt(e, L.PRIORITIZE_SEO_TAGS)
|
|
498
498
|
}), ye = (e) => Array.isArray(e) ? e.join("") : e, ut = (e, t) => {
|
|
499
499
|
const r = Object.keys(e);
|
|
@@ -512,15 +512,15 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
512
512
|
"script",
|
|
513
513
|
"style"
|
|
514
514
|
/* STYLE */
|
|
515
|
-
],
|
|
515
|
+
], Z = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ge = (e) => Object.keys(e).reduce((t, r) => {
|
|
516
516
|
const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
|
|
517
517
|
return t ? `${t} ${n}` : n;
|
|
518
518
|
}, ""), dt = (e, t, r, n) => {
|
|
519
519
|
const s = ge(r), o = ye(t);
|
|
520
|
-
return s ? `<${e} ${x}="true" ${s}>${
|
|
520
|
+
return s ? `<${e} ${x}="true" ${s}>${Z(
|
|
521
521
|
o,
|
|
522
522
|
n
|
|
523
|
-
)}</${e}>` : `<${e} ${x}="true">${
|
|
523
|
+
)}</${e}>` : `<${e} ${x}="true">${Z(
|
|
524
524
|
o,
|
|
525
525
|
n
|
|
526
526
|
)}</${e}>`;
|
|
@@ -528,7 +528,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
528
528
|
const o = s, c = Object.keys(o).filter(
|
|
529
529
|
(l) => !(l === "innerHTML" || l === "cssText")
|
|
530
530
|
).reduce((l, u) => {
|
|
531
|
-
const d = typeof o[u] > "u" ? u : `${u}="${
|
|
531
|
+
const d = typeof o[u] > "u" ? u : `${u}="${Z(o[u], r)}"`;
|
|
532
532
|
return l ? `${l} ${d}` : d;
|
|
533
533
|
}, ""), a = o.innerHTML || o.cssText || "", i = ft.indexOf(e) === -1;
|
|
534
534
|
return `${n}<${e} ${x}="true" ${c}${i ? "/>" : `>${a}</${e}>`}`;
|
|
@@ -541,7 +541,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
541
541
|
[x]: !0
|
|
542
542
|
}, s = Te(r, n);
|
|
543
543
|
return [E.createElement("title", s, t)];
|
|
544
|
-
},
|
|
544
|
+
}, q = (e, t) => t.map((r, n) => {
|
|
545
545
|
const s = {
|
|
546
546
|
key: n,
|
|
547
547
|
[x]: !0
|
|
@@ -569,18 +569,18 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
569
569
|
};
|
|
570
570
|
default:
|
|
571
571
|
return {
|
|
572
|
-
toComponent: () =>
|
|
572
|
+
toComponent: () => q(e, t),
|
|
573
573
|
toString: () => mt(e, t, r)
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
}, ht = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
|
|
577
|
-
const s = Y(e,
|
|
577
|
+
const s = Y(e, V.meta), o = Y(t, V.link), c = Y(r, V.script);
|
|
578
578
|
return {
|
|
579
579
|
priorityMethods: {
|
|
580
580
|
toComponent: () => [
|
|
581
|
-
...
|
|
582
|
-
...
|
|
583
|
-
...
|
|
581
|
+
...q("meta", s.priority),
|
|
582
|
+
...q("link", o.priority),
|
|
583
|
+
...q("script", c.priority)
|
|
584
584
|
],
|
|
585
585
|
toString: () => (
|
|
586
586
|
// generate all the tags as strings and concatenate them
|
|
@@ -624,12 +624,12 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
624
624
|
style: T("style", c, n),
|
|
625
625
|
title: T("title", { title: a, titleAttributes: i }, n)
|
|
626
626
|
};
|
|
627
|
-
},
|
|
627
|
+
}, Q = yt, U = [], ve = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
|
|
628
628
|
constructor(e, t) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
629
|
+
b(this, "instances", []);
|
|
630
|
+
b(this, "canUseDOM", ve);
|
|
631
|
+
b(this, "context");
|
|
632
|
+
b(this, "value", {
|
|
633
633
|
setHelmet: (e) => {
|
|
634
634
|
this.context.helmet = e;
|
|
635
635
|
},
|
|
@@ -644,7 +644,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
|
-
this.context = e, this.canUseDOM = t || !1, t || (e.helmet =
|
|
647
|
+
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = Q({
|
|
648
648
|
baseTag: [],
|
|
649
649
|
bodyAttributes: {},
|
|
650
650
|
encodeSpecialCharacters: !0,
|
|
@@ -661,13 +661,13 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
661
661
|
}, gt = {}, xe = E.createContext(gt), j, Ce = (j = class extends te {
|
|
662
662
|
constructor(r) {
|
|
663
663
|
super(r);
|
|
664
|
-
|
|
664
|
+
b(this, "helmetData");
|
|
665
665
|
this.helmetData = new X(this.props.context || {}, j.canUseDOM);
|
|
666
666
|
}
|
|
667
667
|
render() {
|
|
668
668
|
return /* @__PURE__ */ E.createElement(xe.Provider, { value: this.helmetData.value }, this.props.children);
|
|
669
669
|
}
|
|
670
|
-
},
|
|
670
|
+
}, b(j, "canUseDOM", ve), j), k = (e, t) => {
|
|
671
671
|
const r = document.head || document.querySelector(
|
|
672
672
|
"head"
|
|
673
673
|
/* HEAD */
|
|
@@ -745,7 +745,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
745
745
|
}, xt = vt, ce = class extends te {
|
|
746
746
|
constructor() {
|
|
747
747
|
super(...arguments);
|
|
748
|
-
|
|
748
|
+
b(this, "rendered", !1);
|
|
749
749
|
}
|
|
750
750
|
shouldComponentUpdate(t) {
|
|
751
751
|
return !rt(t, this.props);
|
|
@@ -766,7 +766,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
766
766
|
return delete c.context, c;
|
|
767
767
|
})
|
|
768
768
|
);
|
|
769
|
-
Ce.canUseDOM ? xt(s) :
|
|
769
|
+
Ce.canUseDOM ? xt(s) : Q && (n = Q(s)), r(n);
|
|
770
770
|
}
|
|
771
771
|
// componentWillMount will be deprecated
|
|
772
772
|
// for SSR, initialize on first render
|
|
@@ -781,7 +781,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
781
781
|
render() {
|
|
782
782
|
return this.init(), null;
|
|
783
783
|
}
|
|
784
|
-
},
|
|
784
|
+
}, W, Ct = (W = class extends te {
|
|
785
785
|
shouldComponentUpdate(e) {
|
|
786
786
|
return !et(ie(this.props, "helmetData"), ie(e, "helmetData"));
|
|
787
787
|
}
|
|
@@ -899,11 +899,11 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
899
899
|
}
|
|
900
900
|
return n ? /* @__PURE__ */ E.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ E.createElement(xe.Consumer, null, (s) => /* @__PURE__ */ E.createElement(ce, { ...r, context: s }));
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, b(W, "defaultProps", {
|
|
903
903
|
defer: !0,
|
|
904
904
|
encodeSpecialCharacters: !0,
|
|
905
905
|
prioritizeSeoTags: !1
|
|
906
|
-
}),
|
|
906
|
+
}), W);
|
|
907
907
|
const Ut = ({ defaultHelmet: e, children: t }) => {
|
|
908
908
|
const [r, n] = C([e]), s = p((i) => {
|
|
909
909
|
n((l) => [...l, i]);
|
|
@@ -916,11 +916,11 @@ const Ut = ({ defaultHelmet: e, children: t }) => {
|
|
|
916
916
|
] }) });
|
|
917
917
|
}, At = () => {
|
|
918
918
|
const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: r, text: n, show: s } = Me();
|
|
919
|
-
return /* @__PURE__ */ f.jsxs(
|
|
920
|
-
/* @__PURE__ */ f.jsx(
|
|
921
|
-
/* @__PURE__ */ f.jsx(
|
|
922
|
-
/* @__PURE__ */ f.jsx(
|
|
923
|
-
/* @__PURE__ */ f.jsx(
|
|
919
|
+
return /* @__PURE__ */ f.jsxs(S, { show: s, size: "sm", centered: !0, onHide: r, children: [
|
|
920
|
+
/* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: n }) }),
|
|
921
|
+
/* @__PURE__ */ f.jsx(S.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
922
|
+
/* @__PURE__ */ f.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
|
|
923
|
+
/* @__PURE__ */ f.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
|
|
924
924
|
] }) })
|
|
925
925
|
] });
|
|
926
926
|
};
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar.es-CaE2W807.cjs"),q=require("./useWindowSize-CE6DJWzn.cjs"),T=require("./usePermissions-BJe0PsSE.cjs"),d=require("./useClipboard-BD7keGSc.cjs"),x=require("./useGetApiData-CC06DqnB.cjs"),c=require("react"),B=require("./useLocalStorageState-BFc8Gc8H.cjs");require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const G=r=>{let e="pending",a;const t=r.then(s=>{e="success",a=s},s=>{e="error",a=s});return()=>{switch(e){case"pending":throw t;case"success":return a;case"error":throw a;default:throw new Error("Unknown status")}}};function L(r,e){const a=u.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[t,s]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=a.get(r).then(o=>o.data);s(G(n))})()},[a,r]),t}const E=(r,e,a)=>{let t="pending",s;const l=r.then(n=>{t="success",s=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&a?(t="error-404",s=n):(t="error",s=n)});return()=>{switch(t){case"pending":throw l;case"success":return s;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},i={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},O=(r,{loadOnInit:e=i.loadOnInit,enabled:a=i.enabled,silent:t=i.silent,nullStateBeforeLoad:s=i.nullStateBeforeLoad,nullStateOnFail:l=i.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=i)=>{const g=u.useAxios({silent:t,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:w,stopLoading:D}=c.useContext(u.LoadingContext),P=c.useRef(0),{isAuthenticated:y}=u.useAuth(),[b,m]=c.useState(null),p=c.useCallback(async(f,A)=>{if(!y()||a===!1)return;!t&&w(`loadData-${r}-${A}`),s&&m(null);const k=g.get(r,{signal:f}).then(C=>h?h(C.data):C.data).finally(()=>!t&&D(`loadData-${r}-${A}`));m(E(k,l??!1,S??!1))},[y,a,t,w,r,s,g,h,D,l,S]);return c.useEffect(()=>{if(e===!1)return;const f=new AbortController;return p(f.signal,++P.current),()=>{f.abort()}},[p,e]),{data:b,setData:m,reloadData:p}};exports.cancelToken=u.cancelToken;exports.useAuth=u.useAuth;exports.useAxios=u.useAxios;exports.useConfirm=u.useConfirm;exports.useFormControlType=u.useFormControlType;exports.useNotifications=u.useNotifications;exports.usePrompt=u.usePrompt;exports.useZodSchemaTypes=u.useZodSchemaTypes;exports.useClickOutside=q.useClickOutside;exports.useWindowSize=q.useWindowSize;exports.usePermissions=T.usePermissions;exports.useClipboard=d.useClipboard;exports.useEmployeePhotoPath=d.useEmployeePhotoPath;exports.useKeyPress=d.useKeyPress;exports.useSearchQuery=d.useSearchQuery;exports.useSearchQueryState=d.useSearchQueryState;exports.useGetApiData=x.useGetApiData;exports.useLocalStorageState=B.useLocalStorageState;exports.useGetApiDataBound=O;exports.useGetDataBound=L;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ar as
|
|
2
|
-
import {
|
|
1
|
+
import { ar as S, at as L, aW as P } from "./nivo-bar.es-DDwtI-my.js";
|
|
2
|
+
import { br as Z, aq as j, af as H, au as J, ap as M, bs as V } from "./nivo-bar.es-DDwtI-my.js";
|
|
3
3
|
import { a as Y, u as _ } from "./useWindowSize-OLYtjFv_.js";
|
|
4
|
-
import { u as et } from "./usePermissions-
|
|
5
|
-
import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-
|
|
6
|
-
import { u as lt } from "./useGetApiData-
|
|
7
|
-
import { useState as b, useEffect as C, useContext as
|
|
4
|
+
import { u as et } from "./usePermissions-CtHtAy8y.js";
|
|
5
|
+
import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-aZlIwfmN.js";
|
|
6
|
+
import { u as lt } from "./useGetApiData-Hc-yXwUZ.js";
|
|
7
|
+
import { useState as b, useEffect as C, useContext as T, useRef as U, useCallback as $ } from "react";
|
|
8
8
|
import { u as ft } from "./useLocalStorageState-Bt99kkCr.js";
|
|
9
9
|
import "react-router-dom";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -31,8 +31,8 @@ const B = (o) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
function
|
|
35
|
-
const a =
|
|
34
|
+
function z(o, t) {
|
|
35
|
+
const a = S({
|
|
36
36
|
silent: !0,
|
|
37
37
|
differentBaseUrl: t == null ? void 0 : t.customBaseUrl,
|
|
38
38
|
customToken: t == null ? void 0 : t.customToken
|
|
@@ -72,20 +72,20 @@ const E = (o, t, a) => {
|
|
|
72
72
|
enabled: !0,
|
|
73
73
|
nullStateBeforeLoad: !0,
|
|
74
74
|
nullStateOnFail: !1
|
|
75
|
-
},
|
|
76
|
-
const p =
|
|
75
|
+
}, I = (o, { loadOnInit: t = u.loadOnInit, enabled: a = u.enabled, silent: e = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: c = u.nullStateOnFail, customApiUrl: r, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
|
|
76
|
+
const p = S({
|
|
77
77
|
silent: e,
|
|
78
78
|
customToken: n,
|
|
79
79
|
differentBaseUrl: r,
|
|
80
80
|
noToastOnStatus: f ? [404] : void 0
|
|
81
|
-
}), { startLoading: h, stopLoading: w } =
|
|
81
|
+
}), { startLoading: h, stopLoading: w } = T(L), k = U(0), { isAuthenticated: g } = P(), [y, d] = b(null), m = $(async (l, D) => {
|
|
82
82
|
if (!g() || a === !1)
|
|
83
83
|
return;
|
|
84
84
|
!e && h(`loadData-${o}-${D}`), s && d(null);
|
|
85
|
-
const
|
|
85
|
+
const A = p.get(o, {
|
|
86
86
|
signal: l
|
|
87
|
-
}).then((
|
|
88
|
-
d(E(
|
|
87
|
+
}).then((x) => i ? i(x.data) : x.data).finally(() => !e && w(`loadData-${o}-${D}`));
|
|
88
|
+
d(E(A, c ?? !1, f ?? !1));
|
|
89
89
|
}, [
|
|
90
90
|
g,
|
|
91
91
|
a,
|
|
@@ -106,20 +106,20 @@ const E = (o, t, a) => {
|
|
|
106
106
|
return m(l.signal, ++k.current), () => {
|
|
107
107
|
l.abort();
|
|
108
108
|
};
|
|
109
|
-
}, [m, t]), { data:
|
|
109
|
+
}, [m, t]), { data: y, setData: d, reloadData: m };
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
Z as cancelToken,
|
|
113
|
+
P as useAuth,
|
|
114
|
+
S as useAxios,
|
|
115
115
|
Y as useClickOutside,
|
|
116
116
|
at as useClipboard,
|
|
117
|
-
|
|
117
|
+
j as useConfirm,
|
|
118
118
|
ot as useEmployeePhotoPath,
|
|
119
119
|
H as useFormControlType,
|
|
120
120
|
lt as useGetApiData,
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
I as useGetApiDataBound,
|
|
122
|
+
z as useGetDataBound,
|
|
123
123
|
rt as useKeyPress,
|
|
124
124
|
ft as useLocalStorageState,
|
|
125
125
|
J as useNotifications,
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-CaE2W807.cjs"),m=require("react"),y=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const B=require("./useWindowSize-CE6DJWzn.cjs"),C=require("./usePermissions-BJe0PsSE.cjs"),P="_side-menu-item_1o1uo_1",w="_disabled_1o1uo_6",z="_nav-button_1o1uo_10",I="_child_1o1uo_18",f="_text_1o1uo_23",S="_icon_1o1uo_30",q="_collapse-icon_1o1uo_36",L="_collapsed_1o1uo_46",T="_collapse-icon-mini_1o1uo_49",O="_expanded_1o1uo_80",$="_children-container_1o1uo_86",A="_visible_1o1uo_94",K="_children_1o1uo_86",D="_mobile_1o1uo_106",o={"side-menu-item":"_side-menu-item_1o1uo_1",sideMenuItem:P,disabled:w,"nav-button":"_nav-button_1o1uo_10",navButton:z,child:I,text:f,icon:S,"collapse-icon":"_collapse-icon_1o1uo_36",collapseIcon:q,collapsed:L,"collapse-icon-mini":"_collapse-icon-mini_1o1uo_49",collapseIconMini:T,expanded:O,"children-container":"_children-container_1o1uo_86",childrenContainer:$,visible:A,children:K,mobile:D},F=({item:n,menuExpanded:t,useTooltips:i,children:a})=>n.tooltip&&!t&&i?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:n.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:a})}):a,g=({item:n,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:r,useHover:x,useTooltips:v,isMobile:c})=>{var M,h,R,j;const[N,_]=m.useState(!1),[p]=r.split("?"),d=n.linkTo===p||((M=n.children)==null?void 0:M.some(s=>s.linkTo===p)),E=m.useRef(null);return B.useClickOutside([E],()=>i&&a()),e.jsxRuntimeExports.jsxs("li",{ref:E,className:e.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.mobile]:c},{[o.expanded]:t},{active:N||d},{open:i&&n.children},{[o.disabled]:n.disabled||n.notPermitted||((h=n.children)==null?void 0:h.every(s=>s.notPermitted||s.disabled))},{disabled:n.disabled||n.notPermitted||((R=n.children)==null?void 0:R.every(s=>s.notPermitted||s.disabled))}),onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:[e.jsxRuntimeExports.jsx(F,{item:n,menuExpanded:t,useTooltips:v,children:n.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",o.navButton),onClick:()=>{a()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),!x&&!t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",o.collapseIconMini,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(y.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:e.classNames("nav-link",o.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",o.children),children:(j=n.children)==null?void 0:j.map(s=>e.jsxRuntimeExports.jsx(y.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:s.disabled||s.notPermitted},{disabled:s.disabled||s.notPermitted}),onClick:a,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title})},s.linkTo))})})]})},W="_side-menu_15z3o_1",U="_sidebar-header_15z3o_13",G="_side-menu-content_15z3o_20",J="_expand_15z3o_24",Q="_only-logo_15z3o_28",V="_mobile_15z3o_31",X="_divider_15z3o_45",u={"side-menu":"_side-menu_15z3o_1",sideMenu:W,"sidebar-header":"_sidebar-header_15z3o_13",sidebarHeader:U,"side-menu-content":"_side-menu-content_15z3o_20",sideMenuContent:G,expand:J,"only-logo":"_only-logo_15z3o_28",onlyLogo:Q,mobile:V,divider:X},Y=({headerItem:n,searchItem:t,mainItems:i,secondaryItems:a,expanded:r,setExpanded:x,currentPath:v,useHover:c,useTooltips:N})=>{const[_,p]=m.useState(-1),{checkUserHasPermissions:d}=C.usePermissions(),E=m.useMemo(()=>i.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any"),disabled:s.disabled||b.disabled}))}}),[i,d]),M=m.useMemo(()=>a.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any")}))}}),[a,d]),h=s=>{p(s===_?-1:s)};m.useEffect(()=>{r||p(-1)},[r]);const R=m.useRef(null);B.useClickOutside([R],()=>x(!1));const{isMobile:j}=B.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:R,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:j},{[u.expand]:r},{expand:r}),onMouseEnter:()=>c&&x(!0),onMouseLeave:()=>c&&x(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:c}),role:c?void 0:"button",onClick:c?void 0:()=>x(!r),children:c?n:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),n]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[t?e.jsxRuntimeExports.jsx("div",{className:"p-3",children:t}):null,E.map((s,l)=>e.jsxRuntimeExports.jsx(g,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),M.map((s,l)=>e.jsxRuntimeExports.jsx(g,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title))]})]})},Z="_top-bar_1usoa_1",H="_top-bar-brand_1usoa_13",k={"top-bar":"_top-bar_1usoa_1",topBar:Z,"top-bar-brand":"_top-bar-brand_1usoa_13",topBarBrand:H},ee=({appName:n,leftOffset:t,centerContent:i,rightContent:a})=>e.jsxRuntimeExports.jsxs("nav",{className:e.classNames("luminus-top-bar shadow gap-1 gap-lg-3",k.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[e.jsxRuntimeExports.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",k.topBarBrand),children:n}),i&&e.jsxRuntimeExports.jsx("div",{children:i}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center",children:a??null})]});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Y;exports.TopBar=ee;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { j as o, c as i, ac as g,
|
|
2
|
-
import {
|
|
3
|
-
import { useState as I, useRef as
|
|
4
|
-
import { Link as
|
|
1
|
+
import { j as o, c as i, ac as g, aG as L, be as T, bf as R } from "./nivo-bar.es-DDwtI-my.js";
|
|
2
|
+
import { aw as Ne, bg as ye } from "./nivo-bar.es-DDwtI-my.js";
|
|
3
|
+
import { useState as I, useRef as w, useMemo as k, useEffect as S } from "react";
|
|
4
|
+
import { Link as B } from "react-router-dom";
|
|
5
5
|
import "react-hook-form";
|
|
6
6
|
import "react-flexmonster";
|
|
7
7
|
import "@azure/msal-browser";
|
|
8
8
|
import "@azure/msal-react";
|
|
9
|
-
import { a as
|
|
10
|
-
import { u as A } from "./usePermissions-
|
|
11
|
-
const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1o1uo_10", D = "_child_1o1uo_18",
|
|
9
|
+
import { a as z, u as $ } from "./useWindowSize-OLYtjFv_.js";
|
|
10
|
+
import { u as A } from "./usePermissions-CtHtAy8y.js";
|
|
11
|
+
const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", G = "_text_1o1uo_23", U = "_icon_1o1uo_30", W = "_collapse-icon_1o1uo_36", q = "_collapsed_1o1uo_46", E = "_collapse-icon-mini_1o1uo_49", J = "_expanded_1o1uo_80", Q = "_children-container_1o1uo_86", V = "_visible_1o1uo_94", X = "_children_1o1uo_86", Y = "_mobile_1o1uo_106", s = {
|
|
12
12
|
"side-menu-item": "_side-menu-item_1o1uo_1",
|
|
13
13
|
sideMenuItem: F,
|
|
14
14
|
disabled: K,
|
|
15
15
|
"nav-button": "_nav-button_1o1uo_10",
|
|
16
16
|
navButton: O,
|
|
17
17
|
child: D,
|
|
18
|
-
text:
|
|
19
|
-
icon:
|
|
18
|
+
text: G,
|
|
19
|
+
icon: U,
|
|
20
20
|
"collapse-icon": "_collapse-icon_1o1uo_36",
|
|
21
|
-
collapseIcon:
|
|
22
|
-
collapsed:
|
|
21
|
+
collapseIcon: W,
|
|
22
|
+
collapsed: q,
|
|
23
23
|
"collapse-icon-mini": "_collapse-icon-mini_1o1uo_49",
|
|
24
|
-
collapseIconMini:
|
|
24
|
+
collapseIconMini: E,
|
|
25
25
|
expanded: J,
|
|
26
26
|
"children-container": "_children-container_1o1uo_86",
|
|
27
27
|
childrenContainer: Q,
|
|
@@ -29,9 +29,9 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
29
29
|
children: X,
|
|
30
30
|
mobile: Y
|
|
31
31
|
}, Z = ({ item: n, menuExpanded: t, useTooltips: l, children: a }) => n.tooltip && !t && l ? /* @__PURE__ */ o.jsx(L, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ o.jsx("div", { children: a }) }) : a, C = ({ item: n, menuExpanded: t, collapsed: l, onCollapse: a, currentPath: c, useHover: m, useTooltips: M, isMobile: r }) => {
|
|
32
|
-
var
|
|
33
|
-
const [N, p] = I(!1), [b] = c.split("?"), _ = n.linkTo === b || ((
|
|
34
|
-
return
|
|
32
|
+
var f, v, j, x;
|
|
33
|
+
const [N, p] = I(!1), [b] = c.split("?"), _ = n.linkTo === b || ((f = n.children) == null ? void 0 : f.some((e) => e.linkTo === b)), y = w(null);
|
|
34
|
+
return z([y], () => l && a()), /* @__PURE__ */ o.jsxs("li", { ref: y, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: r }, {
|
|
35
35
|
[s.expanded]: t
|
|
36
36
|
}, { active: N || _ }, { open: l && n.children }, {
|
|
37
37
|
[s.disabled]: n.disabled || n.notPermitted || ((v = n.children) == null ? void 0 : v.every((e) => e.notPermitted || e.disabled))
|
|
@@ -49,13 +49,13 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
49
49
|
t && /* @__PURE__ */ o.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
|
|
50
50
|
[s.collapsed]: l
|
|
51
51
|
}), children: /* @__PURE__ */ o.jsx(g, {}) })
|
|
52
|
-
] }) }) : /* @__PURE__ */ o.jsxs(
|
|
52
|
+
] }) }) : /* @__PURE__ */ o.jsxs(B, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
|
|
53
53
|
/* @__PURE__ */ o.jsx("div", { className: i("icon", s.icon), children: n.icon }),
|
|
54
54
|
t && /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
|
|
55
55
|
] }) }),
|
|
56
56
|
/* @__PURE__ */ o.jsx("div", { className: i("children-container", s.childrenContainer, {
|
|
57
57
|
[s.visible]: l
|
|
58
|
-
}), children: /* @__PURE__ */ o.jsx("div", { className: i("shadow rounded children", s.children), children: (x = n.children) == null ? void 0 : x.map((e) => /* @__PURE__ */ o.jsx(
|
|
58
|
+
}), children: /* @__PURE__ */ o.jsx("div", { className: i("shadow rounded children", s.children), children: (x = n.children) == null ? void 0 : x.map((e) => /* @__PURE__ */ o.jsx(B, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, { [s.disabled]: e.disabled || e.notPermitted }, { disabled: e.disabled || e.notPermitted }), onClick: a, children: /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }) }, e.linkTo)) }) })
|
|
59
59
|
] });
|
|
60
60
|
}, H = "_side-menu_15z3o_1", ee = "_sidebar-header_15z3o_13", oe = "_side-menu-content_15z3o_20", ne = "_expand_15z3o_24", se = "_only-logo_15z3o_28", ie = "_mobile_15z3o_31", te = "_divider_15z3o_45", u = {
|
|
61
61
|
"side-menu": "_side-menu_15z3o_1",
|
|
@@ -81,7 +81,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
81
81
|
disabled: e.disabled || h.disabled
|
|
82
82
|
}))
|
|
83
83
|
};
|
|
84
|
-
}), [l, _]),
|
|
84
|
+
}), [l, _]), f = k(() => a.map((e) => {
|
|
85
85
|
var d;
|
|
86
86
|
return {
|
|
87
87
|
...e,
|
|
@@ -97,8 +97,8 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
97
97
|
S(() => {
|
|
98
98
|
c || b(-1);
|
|
99
99
|
}, [c]);
|
|
100
|
-
const j =
|
|
101
|
-
|
|
100
|
+
const j = w(null);
|
|
101
|
+
z([j], () => m(!1));
|
|
102
102
|
const { isMobile: x } = $();
|
|
103
103
|
return /* @__PURE__ */ o.jsxs("section", { ref: j, className: i("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: x }, {
|
|
104
104
|
[u.expand]: c
|
|
@@ -113,7 +113,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
113
113
|
t ? /* @__PURE__ */ o.jsx("div", { className: "p-3", children: t }) : null,
|
|
114
114
|
y.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title)),
|
|
115
115
|
/* @__PURE__ */ o.jsx("hr", { className: i("divider", u.divider) }),
|
|
116
|
-
|
|
116
|
+
f.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title))
|
|
117
117
|
] })
|
|
118
118
|
] });
|
|
119
119
|
}, le = "_top-bar_1usoa_1", ae = "_top-bar-brand_1usoa_13", P = {
|
|
@@ -125,7 +125,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
|
|
|
125
125
|
width: t ? `calc(100% - ${t}px)` : void 0,
|
|
126
126
|
left: t ? `${t}px` : void 0
|
|
127
127
|
}, children: [
|
|
128
|
-
/* @__PURE__ */ o.jsx(
|
|
128
|
+
/* @__PURE__ */ o.jsx(B, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
|
|
129
129
|
l && /* @__PURE__ */ o.jsx("div", { children: l }),
|
|
130
130
|
/* @__PURE__ */ o.jsx("div", { className: "d-flex justify-content-end align-items-center", children: a ?? null })
|
|
131
131
|
] });
|