react-luminus-components 1.5.4 → 1.5.6
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/{FormDisabledProvider-Dko54lPr.js → FormDisabledProvider-CB-JXGnI.js} +5 -5
- package/dist/FormDisabledProvider-DtQ7YOqf.cjs +1 -0
- package/dist/ShortcutLinksContext-AgOPPcPf.cjs +281 -0
- package/dist/{nivo-bar.es-CTjPolEf.js → ShortcutLinksContext-CNZMOV_j.js} +6925 -6887
- package/dist/components/ShortcutLinks/ShortcutLinksSetup/comps/ShortcutLinkSetupItem/comps/ShortcutLinkItemEdit/ShortcutLinkItemEdit.d.ts +2 -1
- package/dist/components/UserSettings/FileDownloadUS/FileDownloadUS.d.ts +1 -3
- package/dist/components/common/Approvals/Approvals/Approvals.d.ts +17 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/ApprovalDetail.d.ts +12 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalDelegations/ApprovalDelegations.d.ts +9 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/ApprovalLevel.d.ts +11 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/comps/ChangeEmployeeModal/ChangeEmployeeModal.d.ts +13 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/comps/index.d.ts +1 -0
- package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/index.d.ts +2 -0
- package/dist/components/common/Approvals/Approvals/comps/index.d.ts +1 -0
- package/dist/components/common/Approvals/Delegations/ApprovalsDelegations.d.ts +16 -0
- package/dist/components/common/Approvals/Delegations/comps/DelegationModal/DelegationModal.d.ts +14 -0
- package/dist/components/common/Approvals/Delegations/comps/DelegationModal/hooks/useDelegationModalApi.d.ts +8 -0
- package/dist/components/common/Approvals/Delegations/comps/DelegationsTable/DelegationsTable.d.ts +10 -0
- package/dist/components/common/Approvals/Delegations/comps/index.d.ts +2 -0
- package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +4 -3
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +64 -64
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +47 -47
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +23 -23
- package/dist/localStorageUtils-CBQuZzg0.cjs +1 -0
- package/dist/localStorageUtils-DBNNyBcc.js +57 -0
- package/dist/main.cjs.js +60 -60
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +9679 -9408
- package/dist/models/api/approval/ApprovalDefinitionIndexModel.d.ts +6 -0
- package/dist/models/api/approval/ApprovalDefinitionLevelApproverModel.d.ts +7 -0
- package/dist/models/api/approval/ApprovalDefinitionLevelModel.d.ts +8 -0
- package/dist/models/api/approval/ApprovalDefinitionModel.d.ts +8 -0
- package/dist/models/api/approval/ApprovalDelegationModel.d.ts +12 -0
- package/dist/models/index.d.ts +7 -1
- package/dist/models/texts/ApprovalTexts.d.ts +44 -0
- package/dist/models/types/EmployeePickerBaseProps.d.ts +8 -0
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +1 -1
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +0 -1
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItemWithGroup.d.ts +6 -0
- package/dist/models/types/dynamicForms/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/useLocalStorageState-B_unZcbQ.cjs +1 -0
- package/dist/{useLocalStorageState-BpK3wMPU.js → useLocalStorageState-Uqlj_lt1.js} +10 -10
- package/dist/utils/constants/CommonLuminusIconsArray.d.ts +1 -1
- package/dist/utils/file/fileUtils.d.ts +2 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +80 -85
- package/dist/variables.scss +165 -165
- package/package.json +123 -123
- package/dist/FormDisabledProvider-DEnF17ZC.cjs +0 -1
- package/dist/localStorageUtils-CHdu9Xvf.js +0 -46
- package/dist/localStorageUtils-DUQHXXBp.cjs +0 -1
- package/dist/nivo-bar.es-BBwBFH2s.cjs +0 -281
- package/dist/useLocalStorageState-BrwcXD6Y.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
var Ee = Object.defineProperty;
|
|
2
2
|
var Oe = (e, t, n) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var E = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
4
|
+
import { t as N, bF as we, j as d, bG as De, P as z, bo as Pe, bH as me, $ as O, bg as ke, Q as G, bI as je, aX as Ie, aw as Me, aq as pe, bi as he, at as I, as as Le, bJ as He, aP as oe, bK as _e, ab as ye, bL as ae, bM as $e, aR as Re, af as Ue, a1 as Ne } from "./ShortcutLinksContext-CNZMOV_j.js";
|
|
5
|
+
import { bN as Bt, bd as Yt } from "./ShortcutLinksContext-CNZMOV_j.js";
|
|
6
6
|
import D, { useState as S, useCallback as h, useMemo as T, useContext as _, useEffect as j, useRef as te, Component as re } from "react";
|
|
7
|
-
import { EventType as W, InteractionRequiredAuthError as
|
|
7
|
+
import { EventType as W, InteractionRequiredAuthError as Fe } from "@azure/msal-browser";
|
|
8
8
|
import { MsalProvider as qe } from "@azure/msal-react";
|
|
9
9
|
import "react-router-dom";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
import "react-hook-form";
|
|
12
12
|
import "react-flexmonster";
|
|
13
|
-
import { L as Ge, b as ze } from "./FormDisabledProvider-
|
|
14
|
-
import { F as Wt } from "./FormDisabledProvider-
|
|
15
|
-
import { a as Ke, u as Ve } from "./useLocalStorageState-
|
|
13
|
+
import { L as Ge, b as ze } from "./FormDisabledProvider-CB-JXGnI.js";
|
|
14
|
+
import { F as Wt } from "./FormDisabledProvider-CB-JXGnI.js";
|
|
15
|
+
import { a as Ke, u as Ve } from "./useLocalStorageState-Uqlj_lt1.js";
|
|
16
16
|
function Be(e) {
|
|
17
|
-
const t =
|
|
17
|
+
const t = N(e);
|
|
18
18
|
return t.setHours(23, 59, 59, 999), t;
|
|
19
19
|
}
|
|
20
20
|
function Ye() {
|
|
21
21
|
return Be(Date.now());
|
|
22
22
|
}
|
|
23
23
|
function Je(e, t) {
|
|
24
|
-
const n = +
|
|
25
|
-
+
|
|
26
|
-
+
|
|
24
|
+
const n = +N(e), [r, s] = [
|
|
25
|
+
+N(t.start),
|
|
26
|
+
+N(t.end)
|
|
27
27
|
].sort((o, l) => o - l);
|
|
28
28
|
return n >= r && n <= s;
|
|
29
29
|
}
|
|
30
30
|
function We() {
|
|
31
31
|
return we(Date.now());
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const Qe = ({ children: e }) => {
|
|
34
34
|
const [t, n] = S(!1), [r, s] = S(""), [o, l] = S(void 0), i = h((u, f) => {
|
|
35
35
|
n(!0), s(u), l(f);
|
|
36
36
|
}, []), c = h(() => {
|
|
@@ -40,8 +40,8 @@ const Ze = ({ children: e }) => {
|
|
|
40
40
|
/* @__PURE__ */ d.jsx(wt, {}),
|
|
41
41
|
e
|
|
42
42
|
] });
|
|
43
|
-
},
|
|
44
|
-
const { texts: { confirm: e } } = _(z), { isShown: t, text: n, onFinish: r } =
|
|
43
|
+
}, Xe = () => {
|
|
44
|
+
const { texts: { confirm: e } } = _(z), { isShown: t, text: n, onFinish: r } = Pe(), { options: s } = _(me), [o, l] = S(s.defaultValue ?? ""), i = h(() => {
|
|
45
45
|
r(null);
|
|
46
46
|
}, [r]), c = h((u) => {
|
|
47
47
|
u.preventDefault(), !(s.required && !o) && (r(o), l(""));
|
|
@@ -59,7 +59,7 @@ const Ze = ({ children: e }) => {
|
|
|
59
59
|
/* @__PURE__ */ d.jsxs("form", { onSubmit: c, onKeyDown: (u) => u.stopPropagation(), children: [
|
|
60
60
|
/* @__PURE__ */ d.jsxs(O.Body, { children: [
|
|
61
61
|
s.input === "textarea" ? /* @__PURE__ */ d.jsx("textarea", { ...a, rows: 5 }) : void 0,
|
|
62
|
-
s.input === "input" ? /* @__PURE__ */ d.jsx(
|
|
62
|
+
s.input === "input" ? /* @__PURE__ */ d.jsx(ke, { ...a, type: s.type }) : void 0
|
|
63
63
|
] }),
|
|
64
64
|
/* @__PURE__ */ d.jsxs(O.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
65
65
|
/* @__PURE__ */ d.jsx(G, { variant: "outlined", color: "secondary", onClick: i, className: "flex-grow-1", children: e.cancel }),
|
|
@@ -67,7 +67,7 @@ const Ze = ({ children: e }) => {
|
|
|
67
67
|
] })
|
|
68
68
|
] })
|
|
69
69
|
] });
|
|
70
|
-
},
|
|
70
|
+
}, Ze = ({ children: e }) => {
|
|
71
71
|
const [t, n] = S(!1), [r, s] = S(""), [o, l] = S({ input: "textarea", type: "text" }), i = te(() => {
|
|
72
72
|
}), c = h((f) => {
|
|
73
73
|
s(f), n(!0);
|
|
@@ -84,7 +84,7 @@ const Ze = ({ children: e }) => {
|
|
|
84
84
|
}), [t, r, c, a, o]);
|
|
85
85
|
return /* @__PURE__ */ d.jsxs(me.Provider, { value: u, children: [
|
|
86
86
|
e,
|
|
87
|
-
/* @__PURE__ */ d.jsx(
|
|
87
|
+
/* @__PURE__ */ d.jsx(Xe, {})
|
|
88
88
|
] });
|
|
89
89
|
}, Ut = ({ cookieDomain: e, axiosOptions: t, language: n, texts: r, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: i }) => {
|
|
90
90
|
const c = T(() => ({
|
|
@@ -104,11 +104,11 @@ const Ze = ({ children: e }) => {
|
|
|
104
104
|
r,
|
|
105
105
|
l
|
|
106
106
|
]);
|
|
107
|
-
return /* @__PURE__ */ d.jsx(z.Provider, { value: c, children: /* @__PURE__ */ d.jsx(
|
|
107
|
+
return /* @__PURE__ */ d.jsx(z.Provider, { value: c, children: /* @__PURE__ */ d.jsx(Qe, { children: /* @__PURE__ */ d.jsxs(Ze, { children: [
|
|
108
108
|
/* @__PURE__ */ d.jsx(je, {}),
|
|
109
109
|
i
|
|
110
110
|
] }) }) });
|
|
111
|
-
},
|
|
111
|
+
}, Nt = ({ children: e }) => {
|
|
112
112
|
const [t, n] = S(!1), [r] = S(/* @__PURE__ */ new Set()), s = h((i) => {
|
|
113
113
|
r.add(i), n(!0);
|
|
114
114
|
}, [r]), o = h((i) => {
|
|
@@ -118,8 +118,8 @@ const Ze = ({ children: e }) => {
|
|
|
118
118
|
t && /* @__PURE__ */ d.jsx(Ge, {}),
|
|
119
119
|
e
|
|
120
120
|
] });
|
|
121
|
-
},
|
|
122
|
-
const t =
|
|
121
|
+
}, Ft = ({ children: e }) => {
|
|
122
|
+
const t = Me(), { msalInstance: n, getToken: r } = _(pe), { delegation: s, setDelegation: o, setAvailableDelegations: l, refreshAvailableDelegations: i } = _(he), [c, a] = S(null), u = h(async () => {
|
|
123
123
|
const g = await r();
|
|
124
124
|
g && a(g.token);
|
|
125
125
|
}, [r]);
|
|
@@ -157,7 +157,7 @@ const Ze = ({ children: e }) => {
|
|
|
157
157
|
state: I.LOGIN_FAILED,
|
|
158
158
|
user: null
|
|
159
159
|
}), !1);
|
|
160
|
-
}, [v, i]),
|
|
160
|
+
}, [v, i]), P = h(() => {
|
|
161
161
|
C();
|
|
162
162
|
}, [C]);
|
|
163
163
|
j(() => {
|
|
@@ -174,12 +174,12 @@ const Ze = ({ children: e }) => {
|
|
|
174
174
|
}
|
|
175
175
|
return () => {
|
|
176
176
|
};
|
|
177
|
-
}, [n, w,
|
|
177
|
+
}, [n, w, P]);
|
|
178
178
|
const se = h(async (g) => {
|
|
179
179
|
g && await w(g).catch(() => {
|
|
180
|
-
|
|
180
|
+
P(), o(null);
|
|
181
181
|
});
|
|
182
|
-
}, [w,
|
|
182
|
+
}, [w, P, o]);
|
|
183
183
|
j(() => {
|
|
184
184
|
se(c);
|
|
185
185
|
}, [c, s == null ? void 0 : s.id, se]);
|
|
@@ -187,9 +187,9 @@ const Ze = ({ children: e }) => {
|
|
|
187
187
|
user: p.user,
|
|
188
188
|
userLoginState: p,
|
|
189
189
|
loginUser: w,
|
|
190
|
-
logoutUser:
|
|
191
|
-
}), [p, w,
|
|
192
|
-
return /* @__PURE__ */ d.jsx(
|
|
190
|
+
logoutUser: P
|
|
191
|
+
}), [p, w, P]);
|
|
192
|
+
return /* @__PURE__ */ d.jsx(Le.Provider, { value: Ce, children: e });
|
|
193
193
|
}, qt = ({ ...e }) => {
|
|
194
194
|
const { cookieDomain: t } = _(z), [, n] = He(["Authorization"]), r = T(
|
|
195
195
|
() => e.useMsal ? e.msalInstance : null,
|
|
@@ -224,7 +224,7 @@ const Ze = ({ children: e }) => {
|
|
|
224
224
|
token: v.accessToken,
|
|
225
225
|
expiresOn: v.expiresOn ?? new Date(Date.now())
|
|
226
226
|
})).catch((v) => {
|
|
227
|
-
if (console.error("Error acquiring token", v), v instanceof
|
|
227
|
+
if (console.error("Error acquiring token", v), v instanceof Fe)
|
|
228
228
|
return console.log("Silent token acquisition failed. Acquiring token using redirect"), r == null || r.acquireTokenRedirect({
|
|
229
229
|
scopes: s,
|
|
230
230
|
extraScopesToConsent: o
|
|
@@ -306,7 +306,7 @@ const Ze = ({ children: e }) => {
|
|
|
306
306
|
return /* @__PURE__ */ d.jsx(he.Provider, { value: u, children: e });
|
|
307
307
|
};
|
|
308
308
|
var et = typeof Element < "u", tt = typeof Map == "function", rt = typeof Set == "function", nt = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
309
|
-
function
|
|
309
|
+
function F(e, t) {
|
|
310
310
|
if (e === t) return !0;
|
|
311
311
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
312
312
|
if (e.constructor !== t.constructor) return !1;
|
|
@@ -314,7 +314,7 @@ function N(e, t) {
|
|
|
314
314
|
if (Array.isArray(e)) {
|
|
315
315
|
if (n = e.length, n != t.length) return !1;
|
|
316
316
|
for (r = n; r-- !== 0; )
|
|
317
|
-
if (!
|
|
317
|
+
if (!F(e[r], t[r])) return !1;
|
|
318
318
|
return !0;
|
|
319
319
|
}
|
|
320
320
|
var o;
|
|
@@ -323,7 +323,7 @@ function N(e, t) {
|
|
|
323
323
|
for (o = e.entries(); !(r = o.next()).done; )
|
|
324
324
|
if (!t.has(r.value[0])) return !1;
|
|
325
325
|
for (o = e.entries(); !(r = o.next()).done; )
|
|
326
|
-
if (!
|
|
326
|
+
if (!F(r.value[1], t.get(r.value[0]))) return !1;
|
|
327
327
|
return !0;
|
|
328
328
|
}
|
|
329
329
|
if (rt && e instanceof Set && t instanceof Set) {
|
|
@@ -346,7 +346,7 @@ function N(e, t) {
|
|
|
346
346
|
if (!Object.prototype.hasOwnProperty.call(t, s[r])) return !1;
|
|
347
347
|
if (et && e instanceof Element) return !1;
|
|
348
348
|
for (r = n; r-- !== 0; )
|
|
349
|
-
if (!((s[r] === "_owner" || s[r] === "__v" || s[r] === "__o") && e.$$typeof) && !
|
|
349
|
+
if (!((s[r] === "_owner" || s[r] === "__v" || s[r] === "__o") && e.$$typeof) && !F(e[s[r]], t[s[r]]))
|
|
350
350
|
return !1;
|
|
351
351
|
return !0;
|
|
352
352
|
}
|
|
@@ -354,7 +354,7 @@ function N(e, t) {
|
|
|
354
354
|
}
|
|
355
355
|
var st = function(t, n) {
|
|
356
356
|
try {
|
|
357
|
-
return
|
|
357
|
+
return F(t, n);
|
|
358
358
|
} catch (r) {
|
|
359
359
|
if ((r.message || "").match(/stack|recursion/i))
|
|
360
360
|
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
@@ -418,7 +418,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
418
418
|
}, lt = Object.entries(ne).reduce(
|
|
419
419
|
(e, [t, n]) => (e[n] = t, e),
|
|
420
420
|
{}
|
|
421
|
-
), A = "data-rh",
|
|
421
|
+
), A = "data-rh", L = {
|
|
422
422
|
DEFAULT_TITLE: "defaultTitle",
|
|
423
423
|
DEFER: "defer",
|
|
424
424
|
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
@@ -438,12 +438,12 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
438
438
|
"title"
|
|
439
439
|
/* TITLE */
|
|
440
440
|
);
|
|
441
|
-
const n = H(e,
|
|
441
|
+
const n = H(e, L.TITLE_TEMPLATE);
|
|
442
442
|
if (Array.isArray(t) && (t = t.join("")), n && t)
|
|
443
443
|
return n.replace(/%s/g, () => t);
|
|
444
|
-
const r = H(e,
|
|
444
|
+
const r = H(e, L.DEFAULT_TITLE);
|
|
445
445
|
return t || r || void 0;
|
|
446
|
-
}, ut = (e) => H(e,
|
|
446
|
+
}, ut = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
447
447
|
}), B = (e, t) => t.filter((n) => typeof n[e] < "u").map((n) => n[e]).reduce((n, r) => ({ ...n, ...r }), {}), ft = (e, t) => t.filter((n) => typeof n.base < "u").map((n) => n.base).reverse().reduce((n, r) => {
|
|
448
448
|
if (!n.length) {
|
|
449
449
|
const s = Object.keys(r);
|
|
@@ -495,8 +495,8 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
495
495
|
/* HREF */
|
|
496
496
|
], e),
|
|
497
497
|
bodyAttributes: B("bodyAttributes", e),
|
|
498
|
-
defer: H(e,
|
|
499
|
-
encode: H(e,
|
|
498
|
+
defer: H(e, L.DEFER),
|
|
499
|
+
encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
|
|
500
500
|
htmlAttributes: B("htmlAttributes", e),
|
|
501
501
|
linkTags: $(
|
|
502
502
|
"link",
|
|
@@ -539,7 +539,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
539
539
|
], e),
|
|
540
540
|
title: ct(e),
|
|
541
541
|
titleAttributes: B("titleAttributes", e),
|
|
542
|
-
prioritizeSeoTags: mt(e,
|
|
542
|
+
prioritizeSeoTags: mt(e, L.PRIORITIZE_SEO_TAGS)
|
|
543
543
|
}), Te = (e) => Array.isArray(e) ? e.join("") : e, ht = (e, t) => {
|
|
544
544
|
const n = Object.keys(e);
|
|
545
545
|
for (let r = 0; r < n.length; r += 1)
|
|
@@ -557,15 +557,15 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
557
557
|
"script",
|
|
558
558
|
"style"
|
|
559
559
|
/* STYLE */
|
|
560
|
-
],
|
|
560
|
+
], Q = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ve = (e) => Object.keys(e).reduce((t, n) => {
|
|
561
561
|
const r = typeof e[n] < "u" ? `${n}="${e[n]}"` : `${n}`;
|
|
562
562
|
return t ? `${t} ${r}` : r;
|
|
563
563
|
}, ""), gt = (e, t, n, r) => {
|
|
564
564
|
const s = ve(n), o = Te(t);
|
|
565
|
-
return s ? `<${e} ${A}="true" ${s}>${
|
|
565
|
+
return s ? `<${e} ${A}="true" ${s}>${Q(
|
|
566
566
|
o,
|
|
567
567
|
r
|
|
568
|
-
)}</${e}>` : `<${e} ${A}="true">${
|
|
568
|
+
)}</${e}>` : `<${e} ${A}="true">${Q(
|
|
569
569
|
o,
|
|
570
570
|
r
|
|
571
571
|
)}</${e}>`;
|
|
@@ -573,7 +573,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
573
573
|
const o = s, l = Object.keys(o).filter(
|
|
574
574
|
(a) => !(a === "innerHTML" || a === "cssText")
|
|
575
575
|
).reduce((a, u) => {
|
|
576
|
-
const f = typeof o[u] > "u" ? u : `${u}="${
|
|
576
|
+
const f = typeof o[u] > "u" ? u : `${u}="${Q(o[u], n)}"`;
|
|
577
577
|
return a ? `${a} ${f}` : f;
|
|
578
578
|
}, ""), i = o.innerHTML || o.cssText || "", c = yt.indexOf(e) === -1;
|
|
579
579
|
return `${r}<${e} ${A}="true" ${l}${c ? "/>" : `>${i}</${e}>`}`;
|
|
@@ -669,7 +669,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
669
669
|
style: x("style", l, r),
|
|
670
670
|
title: x("title", { title: i, titleAttributes: c }, r)
|
|
671
671
|
};
|
|
672
|
-
},
|
|
672
|
+
}, X = St, U = [], Se = !!(typeof window < "u" && window.document && window.document.createElement), Z = class {
|
|
673
673
|
constructor(e, t) {
|
|
674
674
|
E(this, "instances", []);
|
|
675
675
|
E(this, "canUseDOM", Se);
|
|
@@ -689,7 +689,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
});
|
|
692
|
-
this.context = e, this.canUseDOM = t || !1, t || (e.helmet =
|
|
692
|
+
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = X({
|
|
693
693
|
baseTag: [],
|
|
694
694
|
bodyAttributes: {},
|
|
695
695
|
encodeSpecialCharacters: !0,
|
|
@@ -703,16 +703,16 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
703
703
|
titleAttributes: {}
|
|
704
704
|
}));
|
|
705
705
|
}
|
|
706
|
-
}, bt = {}, be = D.createContext(bt),
|
|
706
|
+
}, bt = {}, be = D.createContext(bt), k, Ae = (k = class extends re {
|
|
707
707
|
constructor(n) {
|
|
708
708
|
super(n);
|
|
709
709
|
E(this, "helmetData");
|
|
710
|
-
this.helmetData = new
|
|
710
|
+
this.helmetData = new Z(this.props.context || {}, k.canUseDOM);
|
|
711
711
|
}
|
|
712
712
|
render() {
|
|
713
713
|
return /* @__PURE__ */ D.createElement(be.Provider, { value: this.helmetData.value }, this.props.children);
|
|
714
714
|
}
|
|
715
|
-
}, E(
|
|
715
|
+
}, E(k, "canUseDOM", Se), k), M = (e, t) => {
|
|
716
716
|
const n = document.head || document.querySelector(
|
|
717
717
|
"head"
|
|
718
718
|
/* HEAD */
|
|
@@ -770,16 +770,16 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
770
770
|
} = e;
|
|
771
771
|
ee("body", r), ee("html", s), At(f, m);
|
|
772
772
|
const p = {
|
|
773
|
-
baseTag:
|
|
774
|
-
linkTags:
|
|
775
|
-
metaTags:
|
|
776
|
-
noscriptTags:
|
|
777
|
-
scriptTags:
|
|
778
|
-
styleTags:
|
|
773
|
+
baseTag: M("base", n),
|
|
774
|
+
linkTags: M("link", o),
|
|
775
|
+
metaTags: M("meta", l),
|
|
776
|
+
noscriptTags: M("noscript", i),
|
|
777
|
+
scriptTags: M("script", a),
|
|
778
|
+
styleTags: M("style", u)
|
|
779
779
|
}, y = {}, v = {};
|
|
780
780
|
Object.keys(p).forEach((C) => {
|
|
781
|
-
const { newTags: w, oldTags:
|
|
782
|
-
w.length && (y[C] = w),
|
|
781
|
+
const { newTags: w, oldTags: P } = p[C];
|
|
782
|
+
w.length && (y[C] = w), P.length && (v[C] = p[C].oldTags);
|
|
783
783
|
}), t && t(), c(e, y, v);
|
|
784
784
|
}, R = null, Ct = (e) => {
|
|
785
785
|
R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
|
|
@@ -811,7 +811,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
811
811
|
return delete l.context, l;
|
|
812
812
|
})
|
|
813
813
|
);
|
|
814
|
-
Ae.canUseDOM ? Et(s) :
|
|
814
|
+
Ae.canUseDOM ? Et(s) : X && (r = X(s)), n(r);
|
|
815
815
|
}
|
|
816
816
|
// componentWillMount will be deprecated
|
|
817
817
|
// for SSR, initialize on first render
|
|
@@ -938,9 +938,9 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
938
938
|
render() {
|
|
939
939
|
const { children: e, ...t } = this.props;
|
|
940
940
|
let n = { ...t }, { helmetData: r } = t;
|
|
941
|
-
if (e && (n = this.mapChildrenToProps(e, n)), r && !(r instanceof
|
|
941
|
+
if (e && (n = this.mapChildrenToProps(e, n)), r && !(r instanceof Z)) {
|
|
942
942
|
const s = r;
|
|
943
|
-
r = new
|
|
943
|
+
r = new Z(s.context, !0), delete n.helmetData;
|
|
944
944
|
}
|
|
945
945
|
return r ? /* @__PURE__ */ D.createElement(ue, { ...n, context: r.value }) : /* @__PURE__ */ D.createElement(be.Consumer, null, (s) => /* @__PURE__ */ D.createElement(ue, { ...n, context: s }));
|
|
946
946
|
}
|
|
@@ -974,7 +974,7 @@ const fe = (e, t) => e ? `${e} | ${t}` : t, zt = ({ defaultHelmet: e, children:
|
|
|
974
974
|
}
|
|
975
975
|
}, [t, n, s]);
|
|
976
976
|
return Ue(c), /* @__PURE__ */ d.jsxs(O, { show: s, size: i ? void 0 : "sm", centered: !0, onHide: n, children: [
|
|
977
|
-
/* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: l ? /* @__PURE__ */ d.jsx(
|
|
977
|
+
/* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: l ? /* @__PURE__ */ d.jsx(Ne, { variant: "body", children: r }) : /* @__PURE__ */ d.jsx(O.Title, { children: r }) }),
|
|
978
978
|
/* @__PURE__ */ d.jsx(O.Body, { children: /* @__PURE__ */ d.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
979
979
|
/* @__PURE__ */ d.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: e.no }),
|
|
980
980
|
/* @__PURE__ */ d.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
|
|
@@ -991,10 +991,10 @@ export {
|
|
|
991
991
|
$e as HelmetContext,
|
|
992
992
|
zt as HelmetProvider,
|
|
993
993
|
Ie as LoadingContext,
|
|
994
|
-
|
|
994
|
+
Nt as LoadingProvider,
|
|
995
995
|
z as LuminusComponentsContext,
|
|
996
996
|
Ut as LuminusComponentsProvider,
|
|
997
|
-
|
|
998
|
-
|
|
997
|
+
Le as UserContext,
|
|
998
|
+
Ft as UserProvider,
|
|
999
999
|
Yt as useFormDisabledContext
|
|
1000
1000
|
};
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./ShortcutLinksContext-AgOPPcPf.cjs"),b=require("./useLocalStorageState-B_unZcbQ.cjs"),l=require("react"),p=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 q=t=>{let e="pending",n;const r=t.then(a=>{e="success",n=a},a=>{e="error",n=a});return()=>{switch(e){case"pending":throw r;case"success":return n;case"error":throw n;default:throw new Error("Unknown status")}}};function I(t,e){const n=s.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[r,a]=l.useState(null);return l.useEffect(()=>{(async()=>{const u=n.get(t).then(c=>c.data);a(q(u))})()},[n,t]),r}const x=(t,e,n)=>{let r="pending",a;const d=t.then(u=>{r="success",a=u},u=>{const c=u==null?void 0:u.response;(c==null?void 0:c.status)===404&&n?(r="error-404",a=u):(r="error",a=u)});return()=>{switch(r){case"pending":throw d;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(t,{loadOnInit:e=S.loadOnInit,enabled:n=S.enabled,silent:r=S.silent,nullStateBeforeLoad:a=S.nullStateBeforeLoad,nullStateOnFail:d=S.nullStateOnFail,customApiUrl:u,customBearerToken:c,dataTransformer:f,errorBoundaryOn404:o}=S)=>{const i=s.useAxios({silent:r,customToken:c,differentBaseUrl:u,noToastOnStatus:o?[404]:void 0}),{startLoading:g,stopLoading:C}=l.useContext(s.LoadingContext),k=l.useRef(0),{isAuthenticated:v}=s.useAuth(),[y,w]=l.useState(null),D=l.useCallback(async(h,P)=>{if(!v()||n===!1)return;!r&&g(`loadData-${t}-${P}`),a&&w(null);const T=i.get(t,{signal:h}).then(A=>f?f(A.data):A.data).finally(()=>!r&&C(`loadData-${t}-${P}`));w(x(T,d??!1,o??!1))},[v,n,r,g,t,a,i,f,C,d,o]);return l.useEffect(()=>{if(e===!1)return;const h=new AbortController;return D(h.signal,++k.current),()=>{h.abort()}},[D,e]),{data:y,setData:w,reloadData:D}},m={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},L=(t,{storageKey:e=m.storageKey,requiredHeight:n=m.requiredHeight,retryInterval:r=m.retryInterval}=m)=>{const[a,d]=l.useState(!1),u=l.useRef(null),c=l.useCallback(()=>{const o=localStorage.getItem(e);return localStorage.removeItem(e),o===null?null:Number(o)},[e]),f=l.useCallback(o=>{localStorage.setItem(e,o)},[e]);return l.useEffect(()=>{const o=window.setInterval(()=>{if(!a&&t.current!==null&&t.current.getBoundingClientRect().height>n){d(!0);const i=c();i!==null&&t.current.scrollTo({top:i}),window.clearInterval(o)}},r);return()=>{window.clearTimeout(o)}},[a,n,c,r,t]),l.useEffect(()=>{var i;const o=new AbortController;return(i=t.current)==null||i.addEventListener("scrollend",()=>{var g;u.current=((g=t.current)==null?void 0:g.scrollTop)??0,f((u.current??0).toString())},{signal:o.signal}),()=>o.abort()},[f,t]),{saveValue:f,retrieveValue:c}};exports.cancelToken=s.cancelToken;exports.useAuth=s.useAuth;exports.useAxios=s.useAxios;exports.useClickOutside=s.useClickOutside;exports.useClipboard=s.useClipboard;exports.useConfirm=s.useConfirm;exports.useFormControlType=s.useFormControlType;exports.useKeyPress=s.useKeyPress;exports.useNotifications=s.useNotifications;exports.usePermissions=s.usePermissions;exports.usePrompt=s.usePrompt;exports.useWindowSize=s.useWindowSize;exports.useZodSchemaTypes=s.useZodSchemaTypes;exports.useGetApiData=b.useGetApiData;exports.useLocalStorageState=b.useLocalStorageState;exports.useEmployeePhotoPath=p.useEmployeePhotoPath;exports.useRenderDraggableInPortal=p.useRenderDraggableInPortal;exports.useSearchQuery=p.useSearchQuery;exports.useSearchQueryState=p.useSearchQueryState;exports.useGetApiDataBound=E;exports.useGetDataBound=I;exports.useScrollSave=L;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { u as ot, a as ut } from "./useLocalStorageState-
|
|
4
|
-
import { useState as
|
|
1
|
+
import { aw as k, aX as L, ar as O } from "./ShortcutLinksContext-CNZMOV_j.js";
|
|
2
|
+
import { bO as Z, bw as j, bQ as J, aR as M, bP as _, af as K, aY as tt, bb as et, bo as at, a2 as st, bh as rt } from "./ShortcutLinksContext-CNZMOV_j.js";
|
|
3
|
+
import { u as ot, a as ut } from "./useLocalStorageState-Uqlj_lt1.js";
|
|
4
|
+
import { useState as b, useEffect as g, useContext as $, useRef as I, useCallback as S } from "react";
|
|
5
5
|
import { c as ct, u as it, a as dt, b as mt } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
6
6
|
import "react-router-dom";
|
|
7
7
|
import "react-dom";
|
|
@@ -10,45 +10,45 @@ import "react-flexmonster";
|
|
|
10
10
|
import "@azure/msal-browser";
|
|
11
11
|
import "@azure/msal-react";
|
|
12
12
|
const y = (e) => {
|
|
13
|
-
let t = "pending",
|
|
13
|
+
let t = "pending", r;
|
|
14
14
|
const a = e.then((s) => {
|
|
15
|
-
t = "success",
|
|
15
|
+
t = "success", r = s;
|
|
16
16
|
}, (s) => {
|
|
17
|
-
t = "error",
|
|
17
|
+
t = "error", r = s;
|
|
18
18
|
});
|
|
19
19
|
return () => {
|
|
20
20
|
switch (t) {
|
|
21
21
|
case "pending":
|
|
22
22
|
throw a;
|
|
23
23
|
case "success":
|
|
24
|
-
return
|
|
24
|
+
return r;
|
|
25
25
|
case "error":
|
|
26
|
-
throw
|
|
26
|
+
throw r;
|
|
27
27
|
default:
|
|
28
28
|
throw new Error("Unknown status");
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
const
|
|
32
|
+
function q(e, t) {
|
|
33
|
+
const r = k({
|
|
34
34
|
silent: !0,
|
|
35
35
|
differentBaseUrl: t == null ? void 0 : t.customBaseUrl,
|
|
36
36
|
customToken: t == null ? void 0 : t.customToken
|
|
37
|
-
}), [a, s] =
|
|
37
|
+
}), [a, s] = b(null);
|
|
38
38
|
return g(() => {
|
|
39
39
|
(async () => {
|
|
40
|
-
const
|
|
41
|
-
s(y(
|
|
40
|
+
const n = r.get(e).then((u) => u.data);
|
|
41
|
+
s(y(n));
|
|
42
42
|
})();
|
|
43
|
-
}, [
|
|
43
|
+
}, [r, e]), a;
|
|
44
44
|
}
|
|
45
|
-
const B = (e, t,
|
|
45
|
+
const B = (e, t, r) => {
|
|
46
46
|
let a = "pending", s;
|
|
47
|
-
const c = e.then((
|
|
48
|
-
a = "success", s =
|
|
49
|
-
}, (
|
|
50
|
-
const u =
|
|
51
|
-
(u == null ? void 0 : u.status) === 404 &&
|
|
47
|
+
const c = e.then((n) => {
|
|
48
|
+
a = "success", s = n;
|
|
49
|
+
}, (n) => {
|
|
50
|
+
const u = n == null ? void 0 : n.response;
|
|
51
|
+
(u == null ? void 0 : u.status) === 404 && r ? (a = "error-404", s = n) : (a = "error", s = n);
|
|
52
52
|
});
|
|
53
53
|
return () => {
|
|
54
54
|
switch (a) {
|
|
@@ -70,30 +70,30 @@ const B = (e, t, n) => {
|
|
|
70
70
|
enabled: !0,
|
|
71
71
|
nullStateBeforeLoad: !0,
|
|
72
72
|
nullStateOnFail: !1
|
|
73
|
-
},
|
|
74
|
-
const l =
|
|
73
|
+
}, z = (e, { loadOnInit: t = d.loadOnInit, enabled: r = d.enabled, silent: a = d.silent, nullStateBeforeLoad: s = d.nullStateBeforeLoad, nullStateOnFail: c = d.nullStateOnFail, customApiUrl: n, customBearerToken: u, dataTransformer: i, errorBoundaryOn404: o } = d) => {
|
|
74
|
+
const l = k({
|
|
75
75
|
silent: a,
|
|
76
76
|
customToken: u,
|
|
77
|
-
differentBaseUrl:
|
|
77
|
+
differentBaseUrl: n,
|
|
78
78
|
noToastOnStatus: o ? [404] : void 0
|
|
79
|
-
}), { startLoading: m, stopLoading:
|
|
80
|
-
if (!
|
|
79
|
+
}), { startLoading: m, stopLoading: v } = $(L), P = I(0), { isAuthenticated: D } = O(), [T, w] = b(null), h = S(async (f, C) => {
|
|
80
|
+
if (!D() || r === !1)
|
|
81
81
|
return;
|
|
82
|
-
!a && m(`loadData-${e}-${C}`), s &&
|
|
82
|
+
!a && m(`loadData-${e}-${C}`), s && w(null);
|
|
83
83
|
const A = l.get(e, {
|
|
84
84
|
signal: f
|
|
85
|
-
}).then((
|
|
86
|
-
|
|
85
|
+
}).then((x) => i ? i(x.data) : x.data).finally(() => !a && v(`loadData-${e}-${C}`));
|
|
86
|
+
w(B(A, c ?? !1, o ?? !1));
|
|
87
87
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
D,
|
|
89
|
+
r,
|
|
90
90
|
a,
|
|
91
91
|
m,
|
|
92
92
|
e,
|
|
93
93
|
s,
|
|
94
94
|
l,
|
|
95
95
|
i,
|
|
96
|
-
|
|
96
|
+
v,
|
|
97
97
|
c,
|
|
98
98
|
o
|
|
99
99
|
]);
|
|
@@ -101,16 +101,16 @@ const B = (e, t, n) => {
|
|
|
101
101
|
if (t === !1)
|
|
102
102
|
return;
|
|
103
103
|
const f = new AbortController();
|
|
104
|
-
return
|
|
104
|
+
return h(f.signal, ++P.current), () => {
|
|
105
105
|
f.abort();
|
|
106
106
|
};
|
|
107
|
-
}, [
|
|
107
|
+
}, [h, t]), { data: T, setData: w, reloadData: h };
|
|
108
108
|
}, p = {
|
|
109
109
|
storageKey: "--tmp-scroll-save--",
|
|
110
110
|
requiredHeight: 100,
|
|
111
111
|
retryInterval: 50
|
|
112
|
-
},
|
|
113
|
-
const [s, c] =
|
|
112
|
+
}, H = (e, { storageKey: t = p.storageKey, requiredHeight: r = p.requiredHeight, retryInterval: a = p.retryInterval } = p) => {
|
|
113
|
+
const [s, c] = b(!1), n = I(null), u = S(() => {
|
|
114
114
|
const o = localStorage.getItem(t);
|
|
115
115
|
return localStorage.removeItem(t), o === null ? null : Number(o);
|
|
116
116
|
}, [t]), i = S((o) => {
|
|
@@ -118,7 +118,7 @@ const B = (e, t, n) => {
|
|
|
118
118
|
}, [t]);
|
|
119
119
|
return g(() => {
|
|
120
120
|
const o = window.setInterval(() => {
|
|
121
|
-
if (!s && e.current !== null && e.current.getBoundingClientRect().height >
|
|
121
|
+
if (!s && e.current !== null && e.current.getBoundingClientRect().height > r) {
|
|
122
122
|
c(!0);
|
|
123
123
|
const l = u();
|
|
124
124
|
l !== null && e.current.scrollTo({ top: l }), window.clearInterval(o);
|
|
@@ -127,36 +127,36 @@ const B = (e, t, n) => {
|
|
|
127
127
|
return () => {
|
|
128
128
|
window.clearTimeout(o);
|
|
129
129
|
};
|
|
130
|
-
}, [s,
|
|
130
|
+
}, [s, r, u, a, e]), g(() => {
|
|
131
131
|
var l;
|
|
132
132
|
const o = new AbortController();
|
|
133
133
|
return (l = e.current) == null || l.addEventListener("scrollend", () => {
|
|
134
134
|
var m;
|
|
135
|
-
|
|
135
|
+
n.current = ((m = e.current) == null ? void 0 : m.scrollTop) ?? 0, i((n.current ?? 0).toString());
|
|
136
136
|
}, { signal: o.signal }), () => o.abort();
|
|
137
137
|
}, [i, e]), { saveValue: i, retrieveValue: u };
|
|
138
138
|
};
|
|
139
139
|
export {
|
|
140
140
|
Z as cancelToken,
|
|
141
141
|
O as useAuth,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
k as useAxios,
|
|
143
|
+
j as useClickOutside,
|
|
144
|
+
J as useClipboard,
|
|
145
|
+
M as useConfirm,
|
|
146
146
|
ct as useEmployeePhotoPath,
|
|
147
147
|
_ as useFormControlType,
|
|
148
148
|
ot as useGetApiData,
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
z as useGetApiDataBound,
|
|
150
|
+
q as useGetDataBound,
|
|
151
151
|
K as useKeyPress,
|
|
152
152
|
ut as useLocalStorageState,
|
|
153
153
|
tt as useNotifications,
|
|
154
154
|
et as usePermissions,
|
|
155
155
|
at as usePrompt,
|
|
156
156
|
it as useRenderDraggableInPortal,
|
|
157
|
-
|
|
157
|
+
H as useScrollSave,
|
|
158
158
|
dt as useSearchQuery,
|
|
159
159
|
mt as useSearchQueryState,
|
|
160
160
|
st as useWindowSize,
|
|
161
|
-
|
|
161
|
+
rt as useZodSchemaTypes
|
|
162
162
|
};
|
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("./ShortcutLinksContext-AgOPPcPf.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 P="_side-menu-item_o72rm_1",f="_disabled_o72rm_6",w="_hidden_o72rm_10",T="_nav-button_o72rm_13",q="_child_o72rm_21",S="_text_o72rm_26",I="_icon_o72rm_36",L="_collapse-icon_o72rm_42",O="_collapsed_o72rm_52",A="_collapse-icon-mini_o72rm_55",$="_expanded_o72rm_86",D="_children-container_o72rm_92",K="_visible_o72rm_100",F="_children_o72rm_92",z="_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:T,child:q,text:S,icon:I,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:L,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:A,expanded:$,"children-container":"_children-container_o72rm_92",childrenContainer:D,visible:K,children:F,mobile:z},G=({item:s,menuExpanded:i,useTooltips:r,children:c})=>s.tooltip&&!i&&r?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,C=({item:s,menuExpanded:i,collapsed:r,onCollapse:c,currentPath:_,useHover:l,useTooltips:p,isMobile:k,disableMode:a})=>{var N,v,E,y;const[M,h]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((N=s.children)==null?void 0:N.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>r&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:k},{[n.expanded]:i},{active:M||R},{open:r&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((E=s.children)==null?void 0:E.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[e.jsxRuntimeExports.jsx(G,{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}),!l&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:r}),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]:r}),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]:r}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(y=s.children)==null?void 0:y.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))})})]})},H="_side-menu_12rky_1",U="_sidebar-header_12rky_15",W="_side-menu-content_12rky_22",J="_no-top-margin_12rky_28",Q="_expand_12rky_34",V="_only-logo_12rky_38",X="_mobile_12rky_41",Y="_divider_12rky_56",u={"side-menu":"_side-menu_12rky_1",sideMenu:H,"sidebar-header":"_sidebar-header_12rky_15",sidebarHeader:U,"side-menu-content":"_side-menu-content_12rky_22",sideMenuContent:W,"no-top-margin":"_no-top-margin_12rky_28",noTopMargin:J,expand:Q,"only-logo":"_only-logo_12rky_38",onlyLogo:V,mobile:X,divider:Y},Z=14,ee=({headerItem:s,searchItem:i,shortcutsItem:r,mainItems:c,secondaryItems:_,expanded:l,setExpanded:p,currentPath:k,useHover:a,useTooltips:M,disableMode:h="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),N=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(b=>({...b,notPermitted:!m(b.permissions??[],"any"),disabled:t.disabled||b.disabled}))}}),[c,m]),v=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(b=>({...b,notPermitted:!m(b.permissions??[],"any")}))}}),[_,m]),E=t=>{R(t===j?-1:t)};x.useEffect(()=>{l||R(-1)},[l]);const y=x.useRef(null);e.useClickOutside([y],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:y,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:l},{expand:l}),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(!l),children:a?s:l?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),l&&(i||r)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[r&&l?r:null,i&&l?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:e.classNames(u.sideMenuContent,{[u.noTopMargin]:[...N,...v].length>Z}),children:[N.map((t,d)=>e.jsxRuntimeExports.jsx(C,{item:t,menuExpanded:l,collapsed:d===j,onCollapse:()=>E(d),currentPath:k,useHover:a,useTooltips:M,isMobile:o,disableMode:h},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),v.map((t,d)=>e.jsxRuntimeExports.jsx(C,{item:t,menuExpanded:l,collapsed:d===j,onCollapse:()=>E(d),currentPath:k,useHover:a,useTooltips:M,isMobile:o,disableMode:h},t.title))]})]})},se="_top-bar_lnmq0_1",ne="_top-bar-brand_lnmq0_12",B={"top-bar":"_top-bar_lnmq0_1",topBar:se,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ne},oe=({appName:s,leftOffset:i,leftContent:r,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",B.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",B.topBarBrand),children:s}),r]}),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=ee;exports.TopBar=oe;
|