react-luminus-components 1.3.237 → 1.3.239
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 +36 -36
- package/dist/Loading-D4SCMh6h.cjs +1 -0
- package/dist/{Loading-CCSVZUhe.js → Loading-_7loOvtU.js} +1 -1
- package/dist/components/common/LineChart/LineChart.d.ts +23 -0
- package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +12 -0
- package/dist/components/common/LineChart/comps/index.d.ts +1 -0
- package/dist/components/common/YearPicker/YearPicker.d.ts +2 -1
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +81 -81
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +31 -31
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +17 -17
- package/dist/main.cjs.js +47 -47
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +9183 -9079
- package/dist/models/types/common/KeysExtendingType.d.ts +4 -0
- package/dist/models/types/common/OnlyAttrExtending.d.ts +6 -0
- package/dist/models/types/lineChartTypes/LineChartValidKey.d.ts +2 -0
- package/dist/models/types/lineChartTypes/LineChartValidValue.d.ts +2 -0
- package/dist/{ShortcutLinksContext-BssuYypF.js → nivo-bar.es-BeALe7Gh.js} +16193 -14997
- package/dist/nivo-bar.es-BebGU-zz.cjs +279 -0
- package/dist/style.css +1 -1
- package/dist/useGetApiData-COPBCf8x.cjs +1 -0
- package/dist/{useGetApiData-BrxYGyDd.js → useGetApiData-DrkjC5UR.js} +8 -8
- package/dist/{usePermissions-Drdy5QyP.js → usePermissions-Blbd53ol.js} +1 -1
- package/dist/usePermissions-Daf3EkaR.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +26 -26
- package/dist/variables.scss +165 -165
- package/package.json +121 -120
- package/dist/Loading-DL2EkP3d.cjs +0 -1
- package/dist/ShortcutLinksContext-DfBnlBCo.cjs +0 -279
- package/dist/useGetApiData-Bf_FxATb.cjs +0 -1
- package/dist/usePermissions-Bbpwz3_4.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Ee = (e, t, r) => t in e ?
|
|
3
|
-
var
|
|
4
|
-
import { t as N,
|
|
5
|
-
import O, { useState as C, useCallback as m, useMemo as
|
|
6
|
-
import { EventType as
|
|
1
|
+
var be = Object.defineProperty;
|
|
2
|
+
var Ee = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var S = (e, t, r) => Ee(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { t as N, br as Oe, j as f, bs as we, P as z, ag as Ie, bt as fe, am as b, ad as Pe, Q as q, bu as je, ak as De, ai as ke, aZ as de, bv as me, a_ as Le, a$ as D, aj as He, bw as _e, ay as se, bx as $e, aQ as pe, by as oe, bz as Me, ah as Re, aU as Ue } from "./nivo-bar.es-BeALe7Gh.js";
|
|
5
|
+
import O, { useState as C, useCallback as m, useMemo as A, useContext as _, useEffect as j, useRef as he, Component as te } from "react";
|
|
6
|
+
import { EventType as Z } from "@azure/msal-browser";
|
|
7
7
|
import { MsalProvider as Ne } from "@azure/msal-react";
|
|
8
8
|
import "react-router-dom";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import "react-flexmonster";
|
|
12
|
-
import { L as Fe } from "./Loading-
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
12
|
+
import { L as Fe } from "./Loading-_7loOvtU.js";
|
|
13
|
+
import { u as Ge } from "./useGetApiData-DrkjC5UR.js";
|
|
14
|
+
import { u as qe } from "./useLocalStorageState-Bt99kkCr.js";
|
|
15
15
|
function ze(e) {
|
|
16
16
|
const t = N(e);
|
|
17
17
|
return t.setHours(23, 59, 59, 999), t;
|
|
@@ -19,14 +19,14 @@ function ze(e) {
|
|
|
19
19
|
function Ke() {
|
|
20
20
|
return ze(Date.now());
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ve(e, t) {
|
|
23
23
|
const r = +N(e), [n, s] = [
|
|
24
24
|
+N(t.start),
|
|
25
25
|
+N(t.end)
|
|
26
26
|
].sort((o, l) => o - l);
|
|
27
27
|
return r >= n && r <= s;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Be() {
|
|
30
30
|
return Oe(Date.now());
|
|
31
31
|
}
|
|
32
32
|
const Ye = ({ children: e }) => {
|
|
@@ -34,12 +34,12 @@ const Ye = ({ children: e }) => {
|
|
|
34
34
|
r(!0), s(c);
|
|
35
35
|
}, []), l = m(() => {
|
|
36
36
|
r(!1);
|
|
37
|
-
}, []), a =
|
|
37
|
+
}, []), a = A(() => ({ show: t, text: n, showConfirm: o, hideConfirm: l }), [t, n, o, l]);
|
|
38
38
|
return /* @__PURE__ */ f.jsxs(we.Provider, { value: a, children: [
|
|
39
|
-
/* @__PURE__ */ f.jsx(
|
|
39
|
+
/* @__PURE__ */ f.jsx(bt, {}),
|
|
40
40
|
e
|
|
41
41
|
] });
|
|
42
|
-
},
|
|
42
|
+
}, Qe = () => {
|
|
43
43
|
const { texts: { confirm: e } } = _(z), { isShown: t, text: r, onFinish: n } = Ie(), { options: s } = _(fe), [o, l] = C(s.defaultValue ?? ""), a = m(() => {
|
|
44
44
|
n(null);
|
|
45
45
|
}, [n]), c = m((u) => {
|
|
@@ -48,33 +48,33 @@ const Ye = ({ children: e }) => {
|
|
|
48
48
|
j(() => {
|
|
49
49
|
t === !0 && l(s.defaultValue ?? "");
|
|
50
50
|
}, [t, s.defaultValue]);
|
|
51
|
-
const i =
|
|
51
|
+
const i = A(() => ({
|
|
52
52
|
value: o,
|
|
53
53
|
onChange: (u) => l(u.currentTarget.value),
|
|
54
54
|
className: "w-100",
|
|
55
55
|
autoFocus: !0,
|
|
56
56
|
tabIndex: 0
|
|
57
57
|
}), [o]);
|
|
58
|
-
return /* @__PURE__ */ f.jsxs(
|
|
59
|
-
/* @__PURE__ */ f.jsx(
|
|
58
|
+
return /* @__PURE__ */ f.jsxs(b, { show: t, size: "sm", centered: !0, onHide: a, children: [
|
|
59
|
+
/* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: r }) }),
|
|
60
60
|
/* @__PURE__ */ f.jsxs("form", { onSubmit: c, children: [
|
|
61
|
-
/* @__PURE__ */ f.jsxs(
|
|
61
|
+
/* @__PURE__ */ f.jsxs(b.Body, { children: [
|
|
62
62
|
s.input === "textarea" ? /* @__PURE__ */ f.jsx("textarea", { ...i, rows: 5 }) : void 0,
|
|
63
63
|
s.input === "input" ? /* @__PURE__ */ f.jsx(Pe, { ...i, type: s.type }) : void 0
|
|
64
64
|
] }),
|
|
65
|
-
/* @__PURE__ */ f.jsxs(
|
|
66
|
-
/* @__PURE__ */ f.jsx(
|
|
67
|
-
/* @__PURE__ */ f.jsx(
|
|
65
|
+
/* @__PURE__ */ f.jsxs(b.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
66
|
+
/* @__PURE__ */ f.jsx(q, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
|
|
67
|
+
/* @__PURE__ */ f.jsx(q, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
68
68
|
] })
|
|
69
69
|
] })
|
|
70
70
|
] });
|
|
71
|
-
},
|
|
71
|
+
}, Ze = ({ children: e }) => {
|
|
72
72
|
const [t, r] = C(!1), [n, s] = C(""), [o, l] = C({ input: "textarea", type: "text" }), a = he(() => {
|
|
73
73
|
}), c = m((d) => {
|
|
74
74
|
s(d), r(!0);
|
|
75
75
|
}, []), i = m(() => {
|
|
76
76
|
r(!1);
|
|
77
|
-
}, []), u =
|
|
77
|
+
}, []), u = A(() => ({
|
|
78
78
|
isShown: t,
|
|
79
79
|
text: n,
|
|
80
80
|
showPrompt: c,
|
|
@@ -85,10 +85,10 @@ const Ye = ({ children: e }) => {
|
|
|
85
85
|
}), [t, n, c, i, o]);
|
|
86
86
|
return /* @__PURE__ */ f.jsxs(fe.Provider, { value: u, children: [
|
|
87
87
|
e,
|
|
88
|
-
/* @__PURE__ */ f.jsx(
|
|
88
|
+
/* @__PURE__ */ f.jsx(Qe, {})
|
|
89
89
|
] });
|
|
90
90
|
}, Mt = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: a }) => {
|
|
91
|
-
const c =
|
|
91
|
+
const c = A(() => ({
|
|
92
92
|
axiosOptions: t,
|
|
93
93
|
cookieDomain: e,
|
|
94
94
|
language: r,
|
|
@@ -105,7 +105,7 @@ const Ye = ({ children: e }) => {
|
|
|
105
105
|
n,
|
|
106
106
|
l
|
|
107
107
|
]);
|
|
108
|
-
return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Ye, { children: /* @__PURE__ */ f.jsxs(
|
|
108
|
+
return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Ye, { children: /* @__PURE__ */ f.jsxs(Ze, { children: [
|
|
109
109
|
/* @__PURE__ */ f.jsx(je, {}),
|
|
110
110
|
a
|
|
111
111
|
] }) }) });
|
|
@@ -114,7 +114,7 @@ const Ye = ({ children: e }) => {
|
|
|
114
114
|
n.add(a), r(!0);
|
|
115
115
|
}, [n]), o = m((a) => {
|
|
116
116
|
n.delete(a), n.size === 0 && r(!1);
|
|
117
|
-
}, [n]), l =
|
|
117
|
+
}, [n]), l = A(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
|
|
118
118
|
return /* @__PURE__ */ f.jsxs(De.Provider, { value: l, children: [
|
|
119
119
|
t && /* @__PURE__ */ f.jsx(Fe, {}),
|
|
120
120
|
e
|
|
@@ -164,7 +164,7 @@ const Ye = ({ children: e }) => {
|
|
|
164
164
|
j(() => {
|
|
165
165
|
if (r) {
|
|
166
166
|
const y = r.addEventCallback((v) => {
|
|
167
|
-
if (v.eventType ===
|
|
167
|
+
if (v.eventType === Z.LOGIN_SUCCESS && v.payload) {
|
|
168
168
|
const K = v.payload;
|
|
169
169
|
i(K.accessToken);
|
|
170
170
|
}
|
|
@@ -184,15 +184,15 @@ const Ye = ({ children: e }) => {
|
|
|
184
184
|
j(() => {
|
|
185
185
|
ne(c);
|
|
186
186
|
}, [c, n == null ? void 0 : n.id, ne]);
|
|
187
|
-
const
|
|
187
|
+
const Se = A(() => ({
|
|
188
188
|
user: p.user,
|
|
189
189
|
userLoginState: p,
|
|
190
190
|
loginUser: E,
|
|
191
191
|
logoutUser: I
|
|
192
192
|
}), [p, E, I]);
|
|
193
|
-
return /* @__PURE__ */ f.jsx(He.Provider, { value:
|
|
193
|
+
return /* @__PURE__ */ f.jsx(He.Provider, { value: Se, children: e });
|
|
194
194
|
}, Nt = ({ ...e }) => {
|
|
195
|
-
const { cookieDomain: t } = _(z), [, r] = _e(["Authorization"]), n =
|
|
195
|
+
const { cookieDomain: t } = _(z), [, r] = _e(["Authorization"]), n = A(() => ({
|
|
196
196
|
useMsal: e.useMsal ?? !1,
|
|
197
197
|
msalInstance: e.useMsal ? e.msalInstance ?? null : null,
|
|
198
198
|
msalScopes: e.useMsal ? e.msalScopes ?? [] : [],
|
|
@@ -201,7 +201,7 @@ const Ye = ({ children: e }) => {
|
|
|
201
201
|
return j(() => {
|
|
202
202
|
if (e.useMsal) {
|
|
203
203
|
const s = e.msalInstance.addEventCallback((o) => {
|
|
204
|
-
if (o.eventType ===
|
|
204
|
+
if (o.eventType === Z.LOGIN_SUCCESS || o.eventType === Z.ACQUIRE_TOKEN_SUCCESS && o.payload) {
|
|
205
205
|
const l = o.payload, a = l.account;
|
|
206
206
|
e.msalInstance.setActiveAccount(a);
|
|
207
207
|
const c = l.accessToken, i = l.expiresOn;
|
|
@@ -223,12 +223,12 @@ const Ye = ({ children: e }) => {
|
|
|
223
223
|
};
|
|
224
224
|
}, [e, r, t]), /* @__PURE__ */ f.jsx(de.Provider, { value: n, children: e.useMsal ? /* @__PURE__ */ f.jsx(Ne, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
225
225
|
}, Ft = ({ children: e, relativeEndpoint: t }) => {
|
|
226
|
-
const [r, n, s] =
|
|
226
|
+
const [r, n, s] = qe("user-delegation", null), o = A(() => {
|
|
227
227
|
if (!r)
|
|
228
228
|
return null;
|
|
229
|
-
const d = r.from ? se(r.from) :
|
|
230
|
-
return
|
|
231
|
-
}, [r, n]), { data: l, setData: a, reloadData: c } =
|
|
229
|
+
const d = r.from ? se(r.from) : Be(), h = r.to ? se(r.to) : Ke();
|
|
230
|
+
return Ve(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
|
|
231
|
+
}, [r, n]), { data: l, setData: a, reloadData: c } = Ge(t, {
|
|
232
232
|
nullStateBeforeLoad: !1,
|
|
233
233
|
nullStateOnFail: !0
|
|
234
234
|
}), i = he(null);
|
|
@@ -247,7 +247,7 @@ const Ye = ({ children: e }) => {
|
|
|
247
247
|
window.removeEventListener("focus", d);
|
|
248
248
|
};
|
|
249
249
|
}, [s, c]);
|
|
250
|
-
const u =
|
|
250
|
+
const u = A(() => ({
|
|
251
251
|
delegation: o,
|
|
252
252
|
setDelegation: n,
|
|
253
253
|
availableDelegations: l,
|
|
@@ -262,7 +262,7 @@ const Ye = ({ children: e }) => {
|
|
|
262
262
|
]);
|
|
263
263
|
return /* @__PURE__ */ f.jsx(me.Provider, { value: u, children: e });
|
|
264
264
|
};
|
|
265
|
-
var
|
|
265
|
+
var Je = typeof Element < "u", We = typeof Map == "function", Xe = typeof Set == "function", et = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
266
266
|
function F(e, t) {
|
|
267
267
|
if (e === t) return !0;
|
|
268
268
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -275,7 +275,7 @@ function F(e, t) {
|
|
|
275
275
|
return !0;
|
|
276
276
|
}
|
|
277
277
|
var o;
|
|
278
|
-
if (
|
|
278
|
+
if (We && e instanceof Map && t instanceof Map) {
|
|
279
279
|
if (e.size !== t.size) return !1;
|
|
280
280
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
281
281
|
if (!t.has(n.value[0])) return !1;
|
|
@@ -301,7 +301,7 @@ function F(e, t) {
|
|
|
301
301
|
if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
|
|
302
302
|
for (n = r; n-- !== 0; )
|
|
303
303
|
if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
|
|
304
|
-
if (
|
|
304
|
+
if (Je && e instanceof Element) return !1;
|
|
305
305
|
for (n = r; n-- !== 0; )
|
|
306
306
|
if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !F(e[s[n]], t[s[n]]))
|
|
307
307
|
return !1;
|
|
@@ -341,7 +341,7 @@ var nt = function(t, r, n, s) {
|
|
|
341
341
|
return !0;
|
|
342
342
|
};
|
|
343
343
|
const st = /* @__PURE__ */ pe(nt);
|
|
344
|
-
var ye = /* @__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))(ye || {}),
|
|
344
|
+
var ye = /* @__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))(ye || {}), V = {
|
|
345
345
|
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
346
346
|
script: { type: ["application/ld+json"] },
|
|
347
347
|
meta: {
|
|
@@ -401,7 +401,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
401
401
|
const n = H(e, L.DEFAULT_TITLE);
|
|
402
402
|
return t || n || void 0;
|
|
403
403
|
}, it = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
404
|
-
}),
|
|
404
|
+
}), B = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), lt = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
|
|
405
405
|
if (!r.length) {
|
|
406
406
|
const s = Object.keys(n);
|
|
407
407
|
for (let o = 0; o < s.length; o += 1) {
|
|
@@ -451,10 +451,10 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
451
451
|
"href"
|
|
452
452
|
/* HREF */
|
|
453
453
|
], e),
|
|
454
|
-
bodyAttributes:
|
|
454
|
+
bodyAttributes: B("bodyAttributes", e),
|
|
455
455
|
defer: H(e, L.DEFER),
|
|
456
456
|
encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
|
|
457
|
-
htmlAttributes:
|
|
457
|
+
htmlAttributes: B("htmlAttributes", e),
|
|
458
458
|
linkTags: M(
|
|
459
459
|
"link",
|
|
460
460
|
[
|
|
@@ -495,7 +495,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
495
495
|
/* CSS_TEXT */
|
|
496
496
|
], e),
|
|
497
497
|
title: at(e),
|
|
498
|
-
titleAttributes:
|
|
498
|
+
titleAttributes: B("titleAttributes", e),
|
|
499
499
|
prioritizeSeoTags: ut(e, L.PRIORITIZE_SEO_TAGS)
|
|
500
500
|
}), ge = (e) => Array.isArray(e) ? e.join("") : e, dt = (e, t) => {
|
|
501
501
|
const r = Object.keys(e);
|
|
@@ -514,15 +514,15 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
514
514
|
"script",
|
|
515
515
|
"style"
|
|
516
516
|
/* STYLE */
|
|
517
|
-
],
|
|
517
|
+
], J = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Te = (e) => Object.keys(e).reduce((t, r) => {
|
|
518
518
|
const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
|
|
519
519
|
return t ? `${t} ${n}` : n;
|
|
520
520
|
}, ""), pt = (e, t, r, n) => {
|
|
521
521
|
const s = Te(r), o = ge(t);
|
|
522
|
-
return s ? `<${e} ${x}="true" ${s}>${
|
|
522
|
+
return s ? `<${e} ${x}="true" ${s}>${J(
|
|
523
523
|
o,
|
|
524
524
|
n
|
|
525
|
-
)}</${e}>` : `<${e} ${x}="true">${
|
|
525
|
+
)}</${e}>` : `<${e} ${x}="true">${J(
|
|
526
526
|
o,
|
|
527
527
|
n
|
|
528
528
|
)}</${e}>`;
|
|
@@ -530,7 +530,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
530
530
|
const o = s, l = Object.keys(o).filter(
|
|
531
531
|
(i) => !(i === "innerHTML" || i === "cssText")
|
|
532
532
|
).reduce((i, u) => {
|
|
533
|
-
const d = typeof o[u] > "u" ? u : `${u}="${
|
|
533
|
+
const d = typeof o[u] > "u" ? u : `${u}="${J(o[u], r)}"`;
|
|
534
534
|
return i ? `${i} ${d}` : d;
|
|
535
535
|
}, ""), a = o.innerHTML || o.cssText || "", c = mt.indexOf(e) === -1;
|
|
536
536
|
return `${n}<${e} ${x}="true" ${l}${c ? "/>" : `>${a}</${e}>`}`;
|
|
@@ -543,7 +543,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
543
543
|
[x]: !0
|
|
544
544
|
}, s = ve(r, n);
|
|
545
545
|
return [O.createElement("title", s, t)];
|
|
546
|
-
},
|
|
546
|
+
}, G = (e, t) => t.map((r, n) => {
|
|
547
547
|
const s = {
|
|
548
548
|
key: n,
|
|
549
549
|
[x]: !0
|
|
@@ -571,18 +571,18 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
571
571
|
};
|
|
572
572
|
default:
|
|
573
573
|
return {
|
|
574
|
-
toComponent: () =>
|
|
574
|
+
toComponent: () => G(e, t),
|
|
575
575
|
toString: () => ht(e, t, r)
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
}, gt = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
|
|
579
|
-
const s = Y(e,
|
|
579
|
+
const s = Y(e, V.meta), o = Y(t, V.link), l = Y(r, V.script);
|
|
580
580
|
return {
|
|
581
581
|
priorityMethods: {
|
|
582
582
|
toComponent: () => [
|
|
583
|
-
...
|
|
584
|
-
...
|
|
585
|
-
...
|
|
583
|
+
...G("meta", s.priority),
|
|
584
|
+
...G("link", o.priority),
|
|
585
|
+
...G("script", l.priority)
|
|
586
586
|
],
|
|
587
587
|
toString: () => (
|
|
588
588
|
// generate all the tags as strings and concatenate them
|
|
@@ -626,12 +626,12 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
626
626
|
style: T("style", l, n),
|
|
627
627
|
title: T("title", { title: a, titleAttributes: c }, n)
|
|
628
628
|
};
|
|
629
|
-
},
|
|
629
|
+
}, W = Tt, U = [], xe = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
|
|
630
630
|
constructor(e, t) {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
631
|
+
S(this, "instances", []);
|
|
632
|
+
S(this, "canUseDOM", xe);
|
|
633
|
+
S(this, "context");
|
|
634
|
+
S(this, "value", {
|
|
635
635
|
setHelmet: (e) => {
|
|
636
636
|
this.context.helmet = e;
|
|
637
637
|
},
|
|
@@ -646,7 +646,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
|
-
this.context = e, this.canUseDOM = t || !1, t || (e.helmet =
|
|
649
|
+
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = W({
|
|
650
650
|
baseTag: [],
|
|
651
651
|
bodyAttributes: {},
|
|
652
652
|
encodeSpecialCharacters: !0,
|
|
@@ -660,16 +660,16 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
660
660
|
titleAttributes: {}
|
|
661
661
|
}));
|
|
662
662
|
}
|
|
663
|
-
}, vt = {}, Ce = O.createContext(vt), P,
|
|
663
|
+
}, vt = {}, Ce = O.createContext(vt), P, Ae = (P = class extends te {
|
|
664
664
|
constructor(r) {
|
|
665
665
|
super(r);
|
|
666
|
-
|
|
666
|
+
S(this, "helmetData");
|
|
667
667
|
this.helmetData = new X(this.props.context || {}, P.canUseDOM);
|
|
668
668
|
}
|
|
669
669
|
render() {
|
|
670
670
|
return /* @__PURE__ */ O.createElement(Ce.Provider, { value: this.helmetData.value }, this.props.children);
|
|
671
671
|
}
|
|
672
|
-
},
|
|
672
|
+
}, S(P, "canUseDOM", xe), P), k = (e, t) => {
|
|
673
673
|
const r = document.head || document.querySelector(
|
|
674
674
|
"head"
|
|
675
675
|
/* HEAD */
|
|
@@ -744,10 +744,10 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
744
744
|
R = null;
|
|
745
745
|
});
|
|
746
746
|
}) : (le(e), R = null);
|
|
747
|
-
},
|
|
747
|
+
}, At = Ct, ce = class extends te {
|
|
748
748
|
constructor() {
|
|
749
749
|
super(...arguments);
|
|
750
|
-
|
|
750
|
+
S(this, "rendered", !1);
|
|
751
751
|
}
|
|
752
752
|
shouldComponentUpdate(t) {
|
|
753
753
|
return !st(t, this.props);
|
|
@@ -768,7 +768,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
768
768
|
return delete l.context, l;
|
|
769
769
|
})
|
|
770
770
|
);
|
|
771
|
-
|
|
771
|
+
Ae.canUseDOM ? At(s) : W && (n = W(s)), r(n);
|
|
772
772
|
}
|
|
773
773
|
// componentWillMount will be deprecated
|
|
774
774
|
// for SSR, initialize on first render
|
|
@@ -783,7 +783,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
783
783
|
render() {
|
|
784
784
|
return this.init(), null;
|
|
785
785
|
}
|
|
786
|
-
},
|
|
786
|
+
}, Q, St = (Q = class extends te {
|
|
787
787
|
shouldComponentUpdate(e) {
|
|
788
788
|
return !rt(ie(this.props, "helmetData"), ie(e, "helmetData"));
|
|
789
789
|
}
|
|
@@ -901,24 +901,24 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
901
901
|
}
|
|
902
902
|
return n ? /* @__PURE__ */ O.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ O.createElement(Ce.Consumer, null, (s) => /* @__PURE__ */ O.createElement(ce, { ...r, context: s }));
|
|
903
903
|
}
|
|
904
|
-
},
|
|
904
|
+
}, S(Q, "defaultProps", {
|
|
905
905
|
defer: !0,
|
|
906
906
|
encodeSpecialCharacters: !0,
|
|
907
907
|
prioritizeSeoTags: !1
|
|
908
|
-
}),
|
|
909
|
-
const ue = (e, t) => e ? `${e} | ${t}` : t,
|
|
908
|
+
}), Q);
|
|
909
|
+
const ue = (e, t) => e ? `${e} | ${t}` : t, Gt = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
|
|
910
910
|
const [n, s] = C([
|
|
911
911
|
ue(r ?? "", e)
|
|
912
912
|
]), o = m((i) => {
|
|
913
913
|
s((u) => [...u, ue(r ?? "", i)]);
|
|
914
914
|
}, [r]), l = m(() => {
|
|
915
915
|
s((i) => i.length > 1 ? i.slice(0, -1) : i);
|
|
916
|
-
}, [s]), a =
|
|
917
|
-
return /* @__PURE__ */ f.jsx(Me.Provider, { value: c, children: /* @__PURE__ */ f.jsxs(
|
|
918
|
-
/* @__PURE__ */ f.jsx(
|
|
916
|
+
}, [s]), a = A(() => n.at(-1) ?? "", [n]), c = A(() => ({ addHelmet: o, removeHelmet: l }), [o, l]);
|
|
917
|
+
return /* @__PURE__ */ f.jsx(Me.Provider, { value: c, children: /* @__PURE__ */ f.jsxs(Ae, { children: [
|
|
918
|
+
/* @__PURE__ */ f.jsx(St, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: a }) }),
|
|
919
919
|
t
|
|
920
920
|
] }) });
|
|
921
|
-
},
|
|
921
|
+
}, bt = () => {
|
|
922
922
|
const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: r, text: n, show: s } = Re(), o = m((l) => {
|
|
923
923
|
switch (l.key) {
|
|
924
924
|
case "Enter":
|
|
@@ -929,11 +929,11 @@ const ue = (e, t) => e ? `${e} | ${t}` : t, qt = ({ defaultHelmet: e, children:
|
|
|
929
929
|
break;
|
|
930
930
|
}
|
|
931
931
|
}, [t, r]);
|
|
932
|
-
return Ue(o), /* @__PURE__ */ f.jsxs(
|
|
933
|
-
/* @__PURE__ */ f.jsx(
|
|
934
|
-
/* @__PURE__ */ f.jsx(
|
|
935
|
-
/* @__PURE__ */ f.jsx(
|
|
936
|
-
/* @__PURE__ */ f.jsx(
|
|
932
|
+
return Ue(o), /* @__PURE__ */ f.jsxs(b, { show: s, size: "sm", centered: !0, onHide: r, children: [
|
|
933
|
+
/* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: n }) }),
|
|
934
|
+
/* @__PURE__ */ f.jsx(b.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
935
|
+
/* @__PURE__ */ f.jsx(q, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
|
|
936
|
+
/* @__PURE__ */ f.jsx(q, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
|
|
937
937
|
] }) })
|
|
938
938
|
] });
|
|
939
939
|
};
|
|
@@ -943,7 +943,7 @@ export {
|
|
|
943
943
|
me as DelegationContext,
|
|
944
944
|
Ft as DelegationProvider,
|
|
945
945
|
Me as HelmetContext,
|
|
946
|
-
|
|
946
|
+
Gt as HelmetProvider,
|
|
947
947
|
De as LoadingContext,
|
|
948
948
|
Rt as LoadingProvider,
|
|
949
949
|
z as LuminusComponentsContext,
|
package/dist/hooks.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-BebGU-zz.cjs"),k=require("./usePermissions-Daf3EkaR.cjs"),T=require("./useGetApiData-COPBCf8x.cjs"),c=require("react"),x=require("./useLocalStorageState-BFc8Gc8H.cjs"),f=require("./useRenderDraggableInPortal-QPCaw-E_.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const B=r=>{let t="pending",u;const s=r.then(a=>{t="success",u=a},a=>{t="error",u=a});return()=>{switch(t){case"pending":throw s;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function G(r,t){const u=e.useAxios({silent:!0,differentBaseUrl:t==null?void 0:t.customBaseUrl,customToken:t==null?void 0:t.customToken}),[s,a]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=u.get(r).then(o=>o.data);a(B(n))})()},[u,r]),s}const L=(r,t,u)=>{let s="pending",a;const i=r.then(n=>{s="success",a=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(s="error-404",a=n):(s="error",a=n)});return()=>{switch(s){case"pending":throw i;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},l={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(r,{loadOnInit:t=l.loadOnInit,enabled:u=l.enabled,silent:s=l.silent,nullStateBeforeLoad:a=l.nullStateBeforeLoad,nullStateOnFail:i=l.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=l)=>{const p=e.useAxios({silent:s,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(e.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=e.useAuth(),[b,g]=c.useState(null),m=c.useCallback(async(d,y)=>{if(!P()||u===!1)return;!s&&D(`loadData-${r}-${y}`),a&&g(null);const q=p.get(r,{signal:d}).then(A=>h?h(A.data):A.data).finally(()=>!s&&w(`loadData-${r}-${y}`));g(L(q,i??!1,S??!1))},[P,u,s,D,r,a,p,h,w,i,S]);return c.useEffect(()=>{if(t===!1)return;const d=new AbortController;return m(d.signal,++C.current),()=>{d.abort()}},[m,t]),{data:b,setData:g,reloadData:m}};exports.cancelToken=e.cancelToken;exports.useAuth=e.useAuth;exports.useAxios=e.useAxios;exports.useClickOutside=e.useClickOutside;exports.useClipboard=e.useClipboard;exports.useConfirm=e.useConfirm;exports.useFormControlType=e.useFormControlType;exports.useKeyPress=e.useKeyPress;exports.useNotifications=e.useNotifications;exports.usePrompt=e.usePrompt;exports.useWindowSize=e.useWindowSize;exports.useZodSchemaTypes=e.useZodSchemaTypes;exports.usePermissions=k.usePermissions;exports.useGetApiData=T.useGetApiData;exports.useLocalStorageState=x.useLocalStorageState;exports.useEmployeePhotoPath=f.useEmployeePhotoPath;exports.useRenderDraggableInPortal=f.useRenderDraggableInPortal;exports.useSearchQuery=f.useSearchQuery;exports.useSearchQueryState=f.useSearchQueryState;exports.useGetApiDataBound=E;exports.useGetDataBound=G;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { u as ae } from "./usePermissions-
|
|
4
|
-
import { u as re } from "./useGetApiData-
|
|
5
|
-
import { useState as x, useEffect as C, useContext as
|
|
1
|
+
import { ai as S, ak as B, a_ as P } from "./nivo-bar.es-BeALe7Gh.js";
|
|
2
|
+
import { bA as j, aK as q, bD as H, ah as J, bC as M, aU as V, al as X, ag as Y, aB as ee, bB as te } from "./nivo-bar.es-BeALe7Gh.js";
|
|
3
|
+
import { u as ae } from "./usePermissions-Blbd53ol.js";
|
|
4
|
+
import { u as re } from "./useGetApiData-DrkjC5UR.js";
|
|
5
|
+
import { useState as x, useEffect as C, useContext as U, useRef as L, useCallback as T } from "react";
|
|
6
6
|
import { u as ue } from "./useLocalStorageState-Bt99kkCr.js";
|
|
7
|
-
import { c as
|
|
7
|
+
import { c as ce, u as ie, a as fe, b as de } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
8
8
|
import "react-router-dom";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -31,7 +31,7 @@ const $ = (o) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function z(o, e) {
|
|
35
35
|
const a = S({
|
|
36
36
|
silent: !0,
|
|
37
37
|
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
@@ -46,7 +46,7 @@ function j(o, e) {
|
|
|
46
46
|
}
|
|
47
47
|
const E = (o, e, a) => {
|
|
48
48
|
let t = "pending", s;
|
|
49
|
-
const
|
|
49
|
+
const l = o.then((r) => {
|
|
50
50
|
t = "success", s = r;
|
|
51
51
|
}, (r) => {
|
|
52
52
|
const n = r == null ? void 0 : r.response;
|
|
@@ -55,7 +55,7 @@ const E = (o, e, a) => {
|
|
|
55
55
|
return () => {
|
|
56
56
|
switch (t) {
|
|
57
57
|
case "pending":
|
|
58
|
-
throw
|
|
58
|
+
throw l;
|
|
59
59
|
case "success":
|
|
60
60
|
return s;
|
|
61
61
|
case "error":
|
|
@@ -72,20 +72,20 @@ const E = (o, e, a) => {
|
|
|
72
72
|
enabled: !0,
|
|
73
73
|
nullStateBeforeLoad: !0,
|
|
74
74
|
nullStateOnFail: !1
|
|
75
|
-
},
|
|
75
|
+
}, N = (o, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: l = u.nullStateOnFail, customApiUrl: r, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
|
|
76
76
|
const p = S({
|
|
77
77
|
silent: t,
|
|
78
78
|
customToken: n,
|
|
79
79
|
differentBaseUrl: r,
|
|
80
80
|
noToastOnStatus: f ? [404] : void 0
|
|
81
|
-
}), { startLoading: h, stopLoading: g } =
|
|
81
|
+
}), { startLoading: h, stopLoading: g } = U(B), k = L(0), { isAuthenticated: w } = P(), [A, d] = x(null), m = T(async (c, D) => {
|
|
82
82
|
if (!w() || a === !1)
|
|
83
83
|
return;
|
|
84
|
-
!t && h(`loadData-${o}-${
|
|
84
|
+
!t && h(`loadData-${o}-${D}`), s && d(null);
|
|
85
85
|
const y = p.get(o, {
|
|
86
|
-
signal:
|
|
87
|
-
}).then((
|
|
88
|
-
d(E(y,
|
|
86
|
+
signal: c
|
|
87
|
+
}).then((b) => i ? i(b.data) : b.data).finally(() => !t && g(`loadData-${o}-${D}`));
|
|
88
|
+
d(E(y, l ?? !1, f ?? !1));
|
|
89
89
|
}, [
|
|
90
90
|
w,
|
|
91
91
|
a,
|
|
@@ -96,35 +96,35 @@ const E = (o, e, a) => {
|
|
|
96
96
|
p,
|
|
97
97
|
i,
|
|
98
98
|
g,
|
|
99
|
-
|
|
99
|
+
l,
|
|
100
100
|
f
|
|
101
101
|
]);
|
|
102
102
|
return C(() => {
|
|
103
103
|
if (e === !1)
|
|
104
104
|
return;
|
|
105
|
-
const
|
|
106
|
-
return m(
|
|
107
|
-
|
|
105
|
+
const c = new AbortController();
|
|
106
|
+
return m(c.signal, ++k.current), () => {
|
|
107
|
+
c.abort();
|
|
108
108
|
};
|
|
109
109
|
}, [m, e]), { data: A, setData: d, reloadData: m };
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
j as cancelToken,
|
|
113
|
+
P as useAuth,
|
|
114
114
|
S as useAxios,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
q as useClickOutside,
|
|
116
|
+
H as useClipboard,
|
|
117
|
+
J as useConfirm,
|
|
118
|
+
ce as useEmployeePhotoPath,
|
|
119
|
+
M as useFormControlType,
|
|
120
120
|
re as useGetApiData,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
N as useGetApiDataBound,
|
|
122
|
+
z as useGetDataBound,
|
|
123
|
+
V as useKeyPress,
|
|
124
124
|
ue as useLocalStorageState,
|
|
125
|
-
|
|
125
|
+
X as useNotifications,
|
|
126
126
|
ae as usePermissions,
|
|
127
|
-
|
|
127
|
+
Y as usePrompt,
|
|
128
128
|
ie as useRenderDraggableInPortal,
|
|
129
129
|
fe as useSearchQuery,
|
|
130
130
|
de as useSearchQueryState,
|
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-BebGU-zz.cjs"),x=require("react"),g=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k=require("./usePermissions-Daf3EkaR.cjs"),P="_side-menu-item_o72rm_1",f="_disabled_o72rm_6",w="_hidden_o72rm_10",I="_nav-button_o72rm_13",S="_child_o72rm_21",L="_text_o72rm_26",T="_icon_o72rm_36",O="_collapse-icon_o72rm_42",$="_collapsed_o72rm_52",A="_collapse-icon-mini_o72rm_55",K="_expanded_o72rm_86",D="_children-container_o72rm_92",F="_visible_o72rm_100",z="_children_o72rm_92",U="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:P,disabled:f,hidden:w,"nav-button":"_nav-button_o72rm_13",navButton:I,child:S,text:L,icon:T,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:O,collapsed:$,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:A,expanded:K,"children-container":"_children-container_o72rm_92",childrenContainer:D,visible:F,children:z,mobile:U},W=({item:s,menuExpanded:i,useTooltips:l,children:c})=>s.tooltip&&!i&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,B=({item:s,menuExpanded:i,collapsed:l,onCollapse:c,currentPath:_,useHover:r,useTooltips:p,isMobile:E,disableMode:a})=>{var q,y,v,N;const[M,b]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((q=s.children)==null?void 0:q.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>l&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:E},{[n.expanded]:i},{active:M||R},{open:l&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((y=s.children)==null?void 0:y.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsxRuntimeExports.jsx(W,{item:s,menuExpanded:i,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",n.navButton),onClick:()=>{c()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),!r&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",n.collapseIcon,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(g.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",n.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",n.childrenContainer,{[n.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(N=s.children)==null?void 0:N.map(o=>e.jsxRuntimeExports.jsx(g.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",n.navButton,n.child,{[a==="disable"?n.disabled:n.hidden]:o.disabled||o.notPermitted},{[a==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted}),onClick:c,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},G="_side-menu_1q9oh_1",J="_sidebar-header_1q9oh_15",Q="_side-menu-content_1q9oh_22",V="_expand_1q9oh_27",X="_only-logo_1q9oh_31",Y="_mobile_1q9oh_34",Z="_divider_1q9oh_49",u={"side-menu":"_side-menu_1q9oh_1",sideMenu:G,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:J,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:Q,expand:V,"only-logo":"_only-logo_1q9oh_31",onlyLogo:X,mobile:Y,divider:Z},H=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:c,secondaryItems:_,expanded:r,setExpanded:p,currentPath:E,useHover:a,useTooltips:M,disableMode:b="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=k.usePermissions(),q=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any"),disabled:t.disabled||h.disabled}))}}),[c,m]),y=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any")}))}}),[_,m]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{r||R(-1)},[r]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:r},{expand:r}),onMouseEnter:()=>a&&p(!0),onMouseLeave:()=>a&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:a}),role:a?void 0:"button",onClick:a?void 0:()=>p(!r),children:a?s:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),r&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&r?l:null,i&&r?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[q.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),y.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title))]})]})},ee="_top-bar_lnmq0_1",se="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:ee,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:se},ne=({appName:s,leftOffset:i,leftContent:l,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:i?`calc(100% - ${i}px)`:void 0,left:i?`${i}px`:void 0},children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 row g-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsxRuntimeExports.jsx(g.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:c??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:_??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=H;exports.TopBar=ne;
|