react-luminus-components 1.3.211 → 1.3.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +50 -50
- package/dist/{Loading-DfMB_hGw.cjs → Loading-BHSN3kz4.cjs} +1 -1
- package/dist/{Loading-DPCBNtPT.js → Loading-DuLgnQ2I.js} +1 -1
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexItem/ReportIndexItem.d.ts +10 -0
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexItem/comps/ReportsCollapseVersionList/ReportsCollapseVersionList.d.ts +9 -0
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexItem/comps/ReportsCollapseVersionList/comps/ReportCollapseVersionItem/ReportCollapseVersionItem.d.ts +9 -0
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexItem/comps/ReportsCollapseVersionList/comps/index.d.ts +1 -0
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexItem/comps/index.d.ts +1 -0
- package/dist/components/common/ReportsIndexPage/comps/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +80 -80
- 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 +19 -19
- package/dist/main.cjs.js +43 -43
- package/dist/main.es.js +2529 -2495
- package/dist/models/api/reports/ReportDto.d.ts +1 -0
- package/dist/{nivo-bar.es-DqlCC2zX.js → nivo-bar.es-DZ4VU2jA.js} +137 -134
- package/dist/{nivo-bar.es-9RAk4RS0.cjs → nivo-bar.es-jWuvqw9Y.cjs} +22 -22
- package/dist/{searchUtils-DpOUaU8G.js → searchUtils-BsCd2hJS.js} +1 -1
- package/dist/{searchUtils-BAOsCVfb.cjs → searchUtils-DzNl1kFt.cjs} +1 -1
- package/dist/{useGetApiData-O5Y-KQks.cjs → useGetApiData-Cmn4D8m2.cjs} +1 -1
- package/dist/{useGetApiData-C3j_1h6n.js → useGetApiData-D9yWD6tn.js} +1 -1
- package/dist/{usePermissions-Dvcn0n88.cjs → usePermissions-D-byaRUU.cjs} +1 -1
- package/dist/usePermissions-gjBM7vmg.js +21 -0
- package/dist/{useRenderDraggableInPortal-UyS2aKjd.js → useRenderDraggableInPortal-B7wUirq_.js} +1 -1
- package/dist/{useRenderDraggableInPortal-DWV23TS4.cjs → useRenderDraggableInPortal-D1OghDQ8.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +20 -20
- package/package.json +1 -1
- package/dist/usePermissions-Dq4wr7P0.js +0 -21
package/dist/contexts.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var Se = Object.defineProperty;
|
|
2
2
|
var Oe = (e, t, r) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
4
|
-
import { t as N,
|
|
5
|
-
import E, { useState as C, useCallback as p, useMemo as
|
|
6
|
-
import { EventType as
|
|
3
|
+
var b = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { t as N, bt as Ee, j as f, bu as we, $ as z, ap as Ie, bv as fe, av as S, am as je, a0 as G, bw as Pe, at as De, ar as ke, b2 as de, bx as me, b3 as Le, b4 as D, as as He, by as $e, aF as se, bz as _e, aX as pe, bA as oe, bB as Me, aq as Re } from "./nivo-bar.es-DZ4VU2jA.js";
|
|
5
|
+
import E, { useState as C, useCallback as p, useMemo as A, useContext as $, useEffect as P, useRef as he, Component as te } from "react";
|
|
6
|
+
import { EventType as W } from "@azure/msal-browser";
|
|
7
7
|
import { MsalProvider as Ue } 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 Ne } from "./Loading-
|
|
13
|
-
import { u as Fe } from "./useGetApiData-
|
|
12
|
+
import { L as Ne } from "./Loading-DuLgnQ2I.js";
|
|
13
|
+
import { u as Fe } from "./useGetApiData-D9yWD6tn.js";
|
|
14
14
|
import { u as qe } from "./useLocalStorageState-Bt99kkCr.js";
|
|
15
15
|
function Ge(e) {
|
|
16
16
|
const t = N(e);
|
|
@@ -26,29 +26,29 @@ function Ke(e, t) {
|
|
|
26
26
|
].sort((o, l) => o - l);
|
|
27
27
|
return r >= n && r <= s;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Be() {
|
|
30
30
|
return Ee(Date.now());
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const Ve = ({ children: e }) => {
|
|
33
33
|
const [t, r] = C(!1), [n, s] = C(""), o = p((c) => {
|
|
34
34
|
r(!0), s(c);
|
|
35
35
|
}, []), l = p(() => {
|
|
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
|
}, Ye = () => {
|
|
43
|
-
const { texts: { confirm: e } } =
|
|
43
|
+
const { texts: { confirm: e } } = $(z), { isShown: t, text: r, onFinish: n } = Ie(), { options: s } = $(fe), [o, l] = C(s.defaultValue ?? ""), a = p(() => {
|
|
44
44
|
n(null);
|
|
45
45
|
}, [n]), c = p((u) => {
|
|
46
46
|
u.preventDefault(), !(s.required && !o) && n(o);
|
|
47
47
|
}, [n, s.required, o]);
|
|
48
|
-
|
|
48
|
+
P(() => {
|
|
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",
|
|
@@ -68,13 +68,13 @@ const Be = ({ children: e }) => {
|
|
|
68
68
|
] })
|
|
69
69
|
] })
|
|
70
70
|
] });
|
|
71
|
-
},
|
|
71
|
+
}, Je = ({ children: e }) => {
|
|
72
72
|
const [t, r] = C(!1), [n, s] = C(""), [o, l] = C({ input: "textarea", type: "text" }), a = he(() => {
|
|
73
73
|
}), c = p((d) => {
|
|
74
74
|
s(d), r(!0);
|
|
75
75
|
}, []), i = p(() => {
|
|
76
76
|
r(!1);
|
|
77
|
-
}, []), u =
|
|
77
|
+
}, []), u = A(() => ({
|
|
78
78
|
isShown: t,
|
|
79
79
|
text: n,
|
|
80
80
|
showPrompt: c,
|
|
@@ -87,8 +87,8 @@ const Be = ({ children: e }) => {
|
|
|
87
87
|
e,
|
|
88
88
|
/* @__PURE__ */ f.jsx(Ye, {})
|
|
89
89
|
] });
|
|
90
|
-
},
|
|
91
|
-
const c =
|
|
90
|
+
}, _t = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: a }) => {
|
|
91
|
+
const c = A(() => ({
|
|
92
92
|
axiosOptions: t,
|
|
93
93
|
cookieDomain: e,
|
|
94
94
|
language: r,
|
|
@@ -105,8 +105,8 @@ const Be = ({ children: e }) => {
|
|
|
105
105
|
n,
|
|
106
106
|
l
|
|
107
107
|
]);
|
|
108
|
-
return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(
|
|
109
|
-
/* @__PURE__ */ f.jsx(
|
|
108
|
+
return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Ve, { children: /* @__PURE__ */ f.jsxs(Je, { children: [
|
|
109
|
+
/* @__PURE__ */ f.jsx(Pe, {}),
|
|
110
110
|
a
|
|
111
111
|
] }) }) });
|
|
112
112
|
}, Mt = ({ children: e }) => {
|
|
@@ -114,26 +114,26 @@ const Be = ({ children: e }) => {
|
|
|
114
114
|
n.add(a), r(!0);
|
|
115
115
|
}, [n]), o = p((a) => {
|
|
116
116
|
n.delete(a), n.size === 0 && r(!1);
|
|
117
|
-
}, [n]), l =
|
|
118
|
-
return /* @__PURE__ */ f.jsxs(
|
|
117
|
+
}, [n]), l = A(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
|
|
118
|
+
return /* @__PURE__ */ f.jsxs(De.Provider, { value: l, children: [
|
|
119
119
|
t && /* @__PURE__ */ f.jsx(Ne, {}),
|
|
120
120
|
e
|
|
121
121
|
] });
|
|
122
122
|
}, Rt = ({ children: e }) => {
|
|
123
|
-
const t = ke(), { msalInstance: r } =
|
|
123
|
+
const t = ke(), { msalInstance: r } = $(de), { delegation: n, setDelegation: s, setAvailableDelegations: o, refreshAvailableDelegations: l } = $(me), { getToken: a } = Le(), [c, i] = C(null), u = p(async () => {
|
|
124
124
|
const y = await a();
|
|
125
125
|
y && i(y.token);
|
|
126
126
|
}, [a]);
|
|
127
|
-
|
|
127
|
+
P(() => {
|
|
128
128
|
u();
|
|
129
129
|
}, [u]);
|
|
130
130
|
const h = p(() => {
|
|
131
131
|
const y = localStorage.getItem("user") ?? null;
|
|
132
132
|
return y ? JSON.parse(y ?? "") : null;
|
|
133
133
|
}, [])(), [m, g] = C({
|
|
134
|
-
state: h ?
|
|
134
|
+
state: h ? D.LOGGED_IN : D.LOGGING_IN,
|
|
135
135
|
user: h
|
|
136
|
-
}),
|
|
136
|
+
}), _ = p(async (y) => {
|
|
137
137
|
let v = null;
|
|
138
138
|
return await t.get("/user/detail", y ? { headers: { Authorization: `Bearer ${y}` } } : void 0).then((K) => {
|
|
139
139
|
v = K.data;
|
|
@@ -142,29 +142,29 @@ const Be = ({ children: e }) => {
|
|
|
142
142
|
}), v;
|
|
143
143
|
}, [t]), w = p(() => {
|
|
144
144
|
localStorage.removeItem("user"), g({
|
|
145
|
-
state:
|
|
145
|
+
state: D.LOGGED_OUT,
|
|
146
146
|
user: null
|
|
147
147
|
}), s(null), o(null);
|
|
148
148
|
}, [o, s]), O = p(async (y) => {
|
|
149
149
|
g({
|
|
150
|
-
state:
|
|
150
|
+
state: D.LOGGING_IN,
|
|
151
151
|
user: null
|
|
152
152
|
});
|
|
153
|
-
const v = await
|
|
153
|
+
const v = await _(y);
|
|
154
154
|
return v ? (g({
|
|
155
|
-
state:
|
|
155
|
+
state: D.LOGGED_IN,
|
|
156
156
|
user: v
|
|
157
157
|
}), localStorage.setItem("user", JSON.stringify(v)), await l(), !0) : (g({
|
|
158
|
-
state:
|
|
158
|
+
state: D.LOGIN_FAILED,
|
|
159
159
|
user: null
|
|
160
160
|
}), !1);
|
|
161
|
-
}, [
|
|
161
|
+
}, [_, l]), I = p(() => {
|
|
162
162
|
w();
|
|
163
163
|
}, [w]);
|
|
164
|
-
|
|
164
|
+
P(() => {
|
|
165
165
|
if (r) {
|
|
166
166
|
const y = r.addEventCallback((v) => {
|
|
167
|
-
if (v.eventType ===
|
|
167
|
+
if (v.eventType === W.LOGIN_SUCCESS && v.payload) {
|
|
168
168
|
const K = v.payload;
|
|
169
169
|
i(K.accessToken);
|
|
170
170
|
}
|
|
@@ -181,27 +181,27 @@ const Be = ({ children: e }) => {
|
|
|
181
181
|
I(), s(null);
|
|
182
182
|
});
|
|
183
183
|
}, [O, I, s]);
|
|
184
|
-
|
|
184
|
+
P(() => {
|
|
185
185
|
ne(c);
|
|
186
186
|
}, [c, n == null ? void 0 : n.id, ne]);
|
|
187
|
-
const
|
|
187
|
+
const be = A(() => ({
|
|
188
188
|
user: m.user,
|
|
189
189
|
userLoginState: m,
|
|
190
190
|
loginUser: O,
|
|
191
191
|
logoutUser: I
|
|
192
192
|
}), [m, O, I]);
|
|
193
|
-
return /* @__PURE__ */ f.jsx(He.Provider, { value:
|
|
193
|
+
return /* @__PURE__ */ f.jsx(He.Provider, { value: be, children: e });
|
|
194
194
|
}, Ut = ({ ...e }) => {
|
|
195
|
-
const { cookieDomain: t } =
|
|
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 ?? [] : [],
|
|
199
199
|
msalExtraScopes: e.useMsal ? e.msalExtraScopes ?? [] : []
|
|
200
200
|
}), [e]);
|
|
201
|
-
return
|
|
201
|
+
return P(() => {
|
|
202
202
|
if (e.useMsal) {
|
|
203
203
|
const s = e.msalInstance.addEventCallback((o) => {
|
|
204
|
-
if (o.eventType ===
|
|
204
|
+
if (o.eventType === W.LOGIN_SUCCESS || o.eventType === W.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,23 +223,23 @@ const Be = ({ children: e }) => {
|
|
|
223
223
|
};
|
|
224
224
|
}, [e, r, t]), /* @__PURE__ */ f.jsx(de.Provider, { value: n, children: e.useMsal ? /* @__PURE__ */ f.jsx(Ue, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
225
225
|
}, Nt = ({ children: e, relativeEndpoint: t }) => {
|
|
226
|
-
const [r, n, s] = qe("user-delegation", null), o =
|
|
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) :
|
|
229
|
+
const d = r.from ? se(r.from) : Be(), h = r.to ? se(r.to) : ze();
|
|
230
230
|
return Ke(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
|
|
231
231
|
}, [r, n]), { data: l, setData: a, reloadData: c } = Fe(t, {
|
|
232
232
|
nullStateBeforeLoad: !1,
|
|
233
233
|
nullStateOnFail: !0
|
|
234
234
|
}), i = he(null);
|
|
235
|
-
|
|
235
|
+
P(() => {
|
|
236
236
|
const d = () => {
|
|
237
|
-
c(), i.current = window.setTimeout(d,
|
|
237
|
+
c(), i.current = window.setTimeout(d, _e() + 5e3);
|
|
238
238
|
};
|
|
239
239
|
return d(), () => {
|
|
240
240
|
i.current !== null && window.clearTimeout(i.current);
|
|
241
241
|
};
|
|
242
|
-
}, [c]),
|
|
242
|
+
}, [c]), P(() => {
|
|
243
243
|
const d = () => {
|
|
244
244
|
s();
|
|
245
245
|
};
|
|
@@ -247,7 +247,7 @@ const Be = ({ 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 Be = ({ children: e }) => {
|
|
|
262
262
|
]);
|
|
263
263
|
return /* @__PURE__ */ f.jsx(me.Provider, { value: u, children: e });
|
|
264
264
|
};
|
|
265
|
-
var
|
|
265
|
+
var We = typeof Element < "u", Ze = typeof Map == "function", Qe = typeof Set == "function", Xe = 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 (Ze && 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 (We && 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 rt = function(t, r, n, s) {
|
|
|
341
341
|
return !0;
|
|
342
342
|
};
|
|
343
343
|
const nt = /* @__PURE__ */ pe(rt);
|
|
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 || {}), B = {
|
|
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
|
}, at = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
404
|
-
}),
|
|
404
|
+
}), V = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), it = (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: V("bodyAttributes", e),
|
|
455
455
|
defer: H(e, L.DEFER),
|
|
456
456
|
encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
|
|
457
|
-
htmlAttributes:
|
|
457
|
+
htmlAttributes: V("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: ot(e),
|
|
498
|
-
titleAttributes:
|
|
498
|
+
titleAttributes: V("titleAttributes", e),
|
|
499
499
|
prioritizeSeoTags: ct(e, L.PRIORITIZE_SEO_TAGS)
|
|
500
500
|
}), ge = (e) => Array.isArray(e) ? e.join("") : e, ft = (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
|
+
], Z = (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
|
}, ""), mt = (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}>${Z(
|
|
523
523
|
o,
|
|
524
524
|
n
|
|
525
|
-
)}</${e}>` : `<${e} ${x}="true">${
|
|
525
|
+
)}</${e}>` : `<${e} ${x}="true">${Z(
|
|
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}="${Z(o[u], r)}"`;
|
|
534
534
|
return i ? `${i} ${d}` : d;
|
|
535
535
|
}, ""), a = o.innerHTML || o.cssText || "", c = dt.indexOf(e) === -1;
|
|
536
536
|
return `${n}<${e} ${x}="true" ${l}${c ? "/>" : `>${a}</${e}>`}`;
|
|
@@ -576,7 +576,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
}, yt = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
|
|
579
|
-
const s = Y(e,
|
|
579
|
+
const s = Y(e, B.meta), o = Y(t, B.link), l = Y(r, B.script);
|
|
580
580
|
return {
|
|
581
581
|
priorityMethods: {
|
|
582
582
|
toComponent: () => [
|
|
@@ -628,10 +628,10 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
628
628
|
};
|
|
629
629
|
}, Q = gt, U = [], xe = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
|
|
630
630
|
constructor(e, t) {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
631
|
+
b(this, "instances", []);
|
|
632
|
+
b(this, "canUseDOM", xe);
|
|
633
|
+
b(this, "context");
|
|
634
|
+
b(this, "value", {
|
|
635
635
|
setHelmet: (e) => {
|
|
636
636
|
this.context.helmet = e;
|
|
637
637
|
},
|
|
@@ -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
|
-
}, Tt = {}, Ce = E.createContext(Tt), j,
|
|
663
|
+
}, Tt = {}, Ce = E.createContext(Tt), j, Ae = (j = class extends te {
|
|
664
664
|
constructor(r) {
|
|
665
665
|
super(r);
|
|
666
|
-
|
|
666
|
+
b(this, "helmetData");
|
|
667
667
|
this.helmetData = new X(this.props.context || {}, j.canUseDOM);
|
|
668
668
|
}
|
|
669
669
|
render() {
|
|
670
670
|
return /* @__PURE__ */ E.createElement(Ce.Provider, { value: this.helmetData.value }, this.props.children);
|
|
671
671
|
}
|
|
672
|
-
},
|
|
672
|
+
}, b(j, "canUseDOM", xe), j), k = (e, t) => {
|
|
673
673
|
const r = document.head || document.querySelector(
|
|
674
674
|
"head"
|
|
675
675
|
/* HEAD */
|
|
@@ -733,11 +733,11 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
733
733
|
noscriptTags: k("noscript", a),
|
|
734
734
|
scriptTags: k("script", i),
|
|
735
735
|
styleTags: k("style", u)
|
|
736
|
-
}, g = {},
|
|
736
|
+
}, g = {}, _ = {};
|
|
737
737
|
Object.keys(m).forEach((w) => {
|
|
738
738
|
const { newTags: O, oldTags: I } = m[w];
|
|
739
|
-
O.length && (g[w] = O), I.length && (
|
|
740
|
-
}), t && t(), c(e, g,
|
|
739
|
+
O.length && (g[w] = O), I.length && (_[w] = m[w].oldTags);
|
|
740
|
+
}), t && t(), c(e, g, _);
|
|
741
741
|
}, R = null, xt = (e) => {
|
|
742
742
|
R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
|
|
743
743
|
le(e, () => {
|
|
@@ -747,7 +747,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
747
747
|
}, Ct = xt, ce = class extends te {
|
|
748
748
|
constructor() {
|
|
749
749
|
super(...arguments);
|
|
750
|
-
|
|
750
|
+
b(this, "rendered", !1);
|
|
751
751
|
}
|
|
752
752
|
shouldComponentUpdate(t) {
|
|
753
753
|
return !nt(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 ? Ct(s) : Q && (n = Q(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
|
+
}, J, At = (J = class extends te {
|
|
787
787
|
shouldComponentUpdate(e) {
|
|
788
788
|
return !tt(ie(this.props, "helmetData"), ie(e, "helmetData"));
|
|
789
789
|
}
|
|
@@ -901,11 +901,11 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
901
901
|
}
|
|
902
902
|
return n ? /* @__PURE__ */ E.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ E.createElement(Ce.Consumer, null, (s) => /* @__PURE__ */ E.createElement(ce, { ...r, context: s }));
|
|
903
903
|
}
|
|
904
|
-
},
|
|
904
|
+
}, b(J, "defaultProps", {
|
|
905
905
|
defer: !0,
|
|
906
906
|
encodeSpecialCharacters: !0,
|
|
907
907
|
prioritizeSeoTags: !1
|
|
908
|
-
}),
|
|
908
|
+
}), J);
|
|
909
909
|
const ue = (e, t) => e ? `${e} | ${t}` : t, Ft = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
|
|
910
910
|
const [n, s] = C([
|
|
911
911
|
ue(r ?? "", e)
|
|
@@ -913,13 +913,13 @@ const ue = (e, t) => e ? `${e} | ${t}` : t, Ft = ({ defaultHelmet: e, children:
|
|
|
913
913
|
s((u) => [...u, ue(r ?? "", i)]);
|
|
914
914
|
}, [r]), l = p(() => {
|
|
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(At, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: a }) }),
|
|
919
919
|
t
|
|
920
920
|
] }) });
|
|
921
|
-
},
|
|
922
|
-
const { texts: { confirm: e } } =
|
|
921
|
+
}, bt = () => {
|
|
922
|
+
const { texts: { confirm: e } } = $(z), { onConfirm: t, onCancel: r, text: n, show: s } = Re();
|
|
923
923
|
return /* @__PURE__ */ f.jsxs(S, { show: s, size: "sm", centered: !0, onHide: r, children: [
|
|
924
924
|
/* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: n }) }),
|
|
925
925
|
/* @__PURE__ */ f.jsx(S.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
@@ -935,10 +935,10 @@ export {
|
|
|
935
935
|
Nt as DelegationProvider,
|
|
936
936
|
Me as HelmetContext,
|
|
937
937
|
Ft as HelmetProvider,
|
|
938
|
-
|
|
938
|
+
De as LoadingContext,
|
|
939
939
|
Mt as LoadingProvider,
|
|
940
940
|
z as LuminusComponentsContext,
|
|
941
|
-
|
|
941
|
+
_t as LuminusComponentsProvider,
|
|
942
942
|
He as UserContext,
|
|
943
943
|
Rt as UserProvider
|
|
944
944
|
};
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar.es-jWuvqw9Y.cjs"),k=require("./useClickOutside-D0505nsm.cjs"),T=require("./usePermissions-D-byaRUU.cjs"),l=require("./useRenderDraggableInPortal-D1OghDQ8.cjs"),x=require("./useGetApiData-Cmn4D8m2.cjs"),c=require("react"),B=require("./useLocalStorageState-BFc8Gc8H.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const G=r=>{let e="pending",u;const t=r.then(s=>{e="success",u=s},s=>{e="error",u=s});return()=>{switch(e){case"pending":throw t;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function L(r,e){const u=a.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=u.get(r).then(o=>o.data);s(G(n))})()},[u,r]),t}const O=(r,e,u)=>{let t="pending",s;const d=r.then(n=>{t="success",s=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(t="error-404",s=n):(t="error",s=n)});return()=>{switch(t){case"pending":throw d;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},E=(r,{loadOnInit:e=i.loadOnInit,enabled:u=i.enabled,silent:t=i.silent,nullStateBeforeLoad:s=i.nullStateBeforeLoad,nullStateOnFail:d=i.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=i)=>{const p=a.useAxios({silent:t,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(a.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=a.useAuth(),[q,g]=c.useState(null),m=c.useCallback(async(f,y)=>{if(!P()||u===!1)return;!t&&D(`loadData-${r}-${y}`),s&&g(null);const b=p.get(r,{signal:f}).then(A=>h?h(A.data):A.data).finally(()=>!t&&w(`loadData-${r}-${y}`));g(O(b,d??!1,S??!1))},[P,u,t,D,r,s,p,h,w,d,S]);return c.useEffect(()=>{if(e===!1)return;const f=new AbortController;return m(f.signal,++C.current),()=>{f.abort()}},[m,e]),{data:q,setData:g,reloadData:m}};exports.cancelToken=a.cancelToken;exports.useAuth=a.useAuth;exports.useAxios=a.useAxios;exports.useConfirm=a.useConfirm;exports.useFormControlType=a.useFormControlType;exports.useNotifications=a.useNotifications;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.useZodSchemaTypes;exports.useClickOutside=k.useClickOutside;exports.usePermissions=T.usePermissions;exports.useClipboard=l.useClipboard;exports.useEmployeePhotoPath=l.useEmployeePhotoPath;exports.useKeyPress=l.useKeyPress;exports.useRenderDraggableInPortal=l.useRenderDraggableInPortal;exports.useSearchQuery=l.useSearchQuery;exports.useSearchQueryState=l.useSearchQueryState;exports.useGetApiData=x.useGetApiData;exports.useLocalStorageState=B.useLocalStorageState;exports.useGetApiDataBound=E;exports.useGetDataBound=L;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ar as S, at as P, b3 as L } from "./nivo-bar.es-DZ4VU2jA.js";
|
|
2
|
+
import { bC as j, aq as H, ae as J, au as M, ap as V, aI as X, bD as Y } from "./nivo-bar.es-DZ4VU2jA.js";
|
|
3
3
|
import { u as ee } from "./useClickOutside-BmlXg38T.js";
|
|
4
|
-
import { u as se } from "./usePermissions-
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as fe } from "./useGetApiData-
|
|
4
|
+
import { u as se } from "./usePermissions-gjBM7vmg.js";
|
|
5
|
+
import { u as re, e as oe, a as ne, b as ue, c as ce, d as le } from "./useRenderDraggableInPortal-B7wUirq_.js";
|
|
6
|
+
import { u as fe } from "./useGetApiData-D9yWD6tn.js";
|
|
7
7
|
import { useState as b, useEffect as C, useContext as T, useRef as U, useCallback as $ } from "react";
|
|
8
8
|
import { u as me } from "./useLocalStorageState-Bt99kkCr.js";
|
|
9
9
|
import "react-router-dom";
|
|
@@ -12,9 +12,9 @@ import "react-hook-form";
|
|
|
12
12
|
import "react-flexmonster";
|
|
13
13
|
import "@azure/msal-browser";
|
|
14
14
|
import "@azure/msal-react";
|
|
15
|
-
const B = (
|
|
15
|
+
const B = (r) => {
|
|
16
16
|
let e = "pending", a;
|
|
17
|
-
const t =
|
|
17
|
+
const t = r.then((s) => {
|
|
18
18
|
e = "success", a = s;
|
|
19
19
|
}, (s) => {
|
|
20
20
|
e = "error", a = s;
|
|
@@ -32,7 +32,7 @@ const B = (o) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function z(r, e) {
|
|
36
36
|
const a = S({
|
|
37
37
|
silent: !0,
|
|
38
38
|
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
@@ -40,18 +40,18 @@ function K(o, e) {
|
|
|
40
40
|
}), [t, s] = b(null);
|
|
41
41
|
return C(() => {
|
|
42
42
|
(async () => {
|
|
43
|
-
const
|
|
44
|
-
s(B(
|
|
43
|
+
const o = a.get(r).then((n) => n.data);
|
|
44
|
+
s(B(o));
|
|
45
45
|
})();
|
|
46
|
-
}, [a,
|
|
46
|
+
}, [a, r]), t;
|
|
47
47
|
}
|
|
48
|
-
const E = (
|
|
48
|
+
const E = (r, e, a) => {
|
|
49
49
|
let t = "pending", s;
|
|
50
|
-
const c =
|
|
51
|
-
t = "success", s =
|
|
52
|
-
}, (
|
|
53
|
-
const n =
|
|
54
|
-
(n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s =
|
|
50
|
+
const c = r.then((o) => {
|
|
51
|
+
t = "success", s = o;
|
|
52
|
+
}, (o) => {
|
|
53
|
+
const n = o == null ? void 0 : o.response;
|
|
54
|
+
(n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s = o) : (t = "error", s = o);
|
|
55
55
|
});
|
|
56
56
|
return () => {
|
|
57
57
|
switch (t) {
|
|
@@ -73,26 +73,26 @@ const E = (o, e, a) => {
|
|
|
73
73
|
enabled: !0,
|
|
74
74
|
nullStateBeforeLoad: !0,
|
|
75
75
|
nullStateOnFail: !1
|
|
76
|
-
},
|
|
76
|
+
}, K = (r, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: c = u.nullStateOnFail, customApiUrl: o, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
|
|
77
77
|
const p = S({
|
|
78
78
|
silent: t,
|
|
79
79
|
customToken: n,
|
|
80
|
-
differentBaseUrl:
|
|
80
|
+
differentBaseUrl: o,
|
|
81
81
|
noToastOnStatus: f ? [404] : void 0
|
|
82
|
-
}), { startLoading: h, stopLoading: g } = T(P), k = U(0), { isAuthenticated: w } = L(), [
|
|
82
|
+
}), { startLoading: h, stopLoading: g } = T(P), k = U(0), { isAuthenticated: w } = L(), [y, d] = b(null), m = $(async (l, D) => {
|
|
83
83
|
if (!w() || a === !1)
|
|
84
84
|
return;
|
|
85
|
-
!t && h(`loadData-${
|
|
86
|
-
const
|
|
85
|
+
!t && h(`loadData-${r}-${D}`), s && d(null);
|
|
86
|
+
const A = p.get(r, {
|
|
87
87
|
signal: l
|
|
88
|
-
}).then((x) => i ? i(x.data) : x.data).finally(() => !t && g(`loadData-${
|
|
89
|
-
d(E(
|
|
88
|
+
}).then((x) => i ? i(x.data) : x.data).finally(() => !t && g(`loadData-${r}-${D}`));
|
|
89
|
+
d(E(A, c ?? !1, f ?? !1));
|
|
90
90
|
}, [
|
|
91
91
|
w,
|
|
92
92
|
a,
|
|
93
93
|
t,
|
|
94
94
|
h,
|
|
95
|
-
|
|
95
|
+
r,
|
|
96
96
|
s,
|
|
97
97
|
p,
|
|
98
98
|
i,
|
|
@@ -107,20 +107,20 @@ const E = (o, e, a) => {
|
|
|
107
107
|
return m(l.signal, ++k.current), () => {
|
|
108
108
|
l.abort();
|
|
109
109
|
};
|
|
110
|
-
}, [m, e]), { data:
|
|
110
|
+
}, [m, e]), { data: y, setData: d, reloadData: m };
|
|
111
111
|
};
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
j as cancelToken,
|
|
114
114
|
L as useAuth,
|
|
115
115
|
S as useAxios,
|
|
116
116
|
ee as useClickOutside,
|
|
117
|
-
|
|
117
|
+
re as useClipboard,
|
|
118
118
|
H as useConfirm,
|
|
119
|
-
|
|
119
|
+
oe as useEmployeePhotoPath,
|
|
120
120
|
J as useFormControlType,
|
|
121
121
|
fe as useGetApiData,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
K as useGetApiDataBound,
|
|
123
|
+
z as useGetDataBound,
|
|
124
124
|
ne as useKeyPress,
|
|
125
125
|
me as useLocalStorageState,
|
|
126
126
|
M as useNotifications,
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-jWuvqw9Y.cjs"),x=require("react"),y=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const C=require("./useClickOutside-D0505nsm.cjs");require("react-dom");const k=require("./usePermissions-D-byaRUU.cjs"),P="_side-menu-item_1o1uo_1",f="_disabled_1o1uo_6",w="_nav-button_1o1uo_10",I="_child_1o1uo_18",S="_text_1o1uo_23",L="_icon_1o1uo_30",T="_collapse-icon_1o1uo_36",O="_collapsed_1o1uo_46",$="_collapse-icon-mini_1o1uo_49",A="_expanded_1o1uo_80",K="_children-container_1o1uo_86",D="_visible_1o1uo_94",F="_children_1o1uo_86",z="_mobile_1o1uo_106",o={"side-menu-item":"_side-menu-item_1o1uo_1",sideMenuItem:P,disabled:f,"nav-button":"_nav-button_1o1uo_10",navButton:w,child:I,text:S,icon:L,"collapse-icon":"_collapse-icon_1o1uo_36",collapseIcon:T,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_1o1uo_49",collapseIconMini:$,expanded:A,"children-container":"_children-container_1o1uo_86",childrenContainer:K,visible:D,children:F,mobile:z},U=({item:s,menuExpanded:i,useTooltips:l,children:r})=>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:r})}):r,g=({item:s,menuExpanded:i,collapsed:l,onCollapse:r,currentPath:_,useHover:a,useTooltips:p,isMobile:E})=>{var M,q,v,N;const[d,h]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((M=s.children)==null?void 0:M.some(n=>n.linkTo===j)),u=x.useRef(null);return C.useClickOutside([u],()=>l&&r()),e.jsxRuntimeExports.jsxs("li",{ref:u,className:e.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.mobile]:E},{[o.expanded]:i},{active:d||R},{open:l&&s.children},{[o.disabled]:s.disabled||s.notPermitted||((q=s.children)==null?void 0:q.every(n=>n.notPermitted||n.disabled))},{disabled:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(n=>n.notPermitted||n.disabled))}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[e.jsxRuntimeExports.jsx(U,{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",o.navButton),onClick:()=>{r()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:s.icon}),!a&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",o.collapseIconMini,{[o.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(y.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",o.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",o.childrenContainer,{[o.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",o.children),children:(N=s.children)==null?void 0:N.map(n=>e.jsxRuntimeExports.jsx(y.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:e.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),onClick:r,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},W="_side-menu_1q9oh_1",G="_sidebar-header_1q9oh_15",J="_side-menu-content_1q9oh_22",Q="_expand_1q9oh_27",V="_only-logo_1q9oh_31",X="_mobile_1q9oh_34",Y="_divider_1q9oh_49",m={"side-menu":"_side-menu_1q9oh_1",sideMenu:W,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:G,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:J,expand:Q,"only-logo":"_only-logo_1q9oh_31",onlyLogo:V,mobile:X,divider:Y},Z=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:r,secondaryItems:_,expanded:a,setExpanded:p,currentPath:E,useHover:d,useTooltips:h})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:u}=k.usePermissions(),M=x.useMemo(()=>r.map(t=>{var c;return{...t,notPermitted:!u(t.permissions??[],"any"),children:(c=t.children)==null?void 0:c.map(b=>({...b,notPermitted:!u(b.permissions??[],"any"),disabled:t.disabled||b.disabled}))}}),[r,u]),q=x.useMemo(()=>_.map(t=>{var c;return{...t,notPermitted:!u(t.permissions??[],"any"),children:(c=t.children)==null?void 0:c.map(b=>({...b,notPermitted:!u(b.permissions??[],"any")}))}}),[_,u]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{a||R(-1)},[a]);const N=x.useRef(null);C.useClickOutside([N],()=>p(!1));const{isMobile:n}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",m.sideMenu,{[m.mobile]:n},{[m.expand]:a},{expand:a}),onMouseEnter:()=>d&&p(!0),onMouseLeave:()=>d&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",m.sidebarHeader,{[m.onlyLogo]:d}),role:d?void 0:"button",onClick:d?void 0:()=>p(!a),children:d?s:a?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),a&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&a?l:null,i&&a?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:m.sideMenuContent,children:[M.map((t,c)=>e.jsxRuntimeExports.jsx(g,{item:t,menuExpanded:a,collapsed:c===j,onCollapse:()=>v(c),currentPath:E,useHover:d,useTooltips:h,isMobile:n},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",m.divider)}),q.map((t,c)=>e.jsxRuntimeExports.jsx(g,{item:t,menuExpanded:a,collapsed:c===j,onCollapse:()=>v(c),currentPath:E,useHover:d,useTooltips:h,isMobile:n},t.title))]})]})},H="_top-bar_lnmq0_1",ee="_top-bar-brand_lnmq0_12",B={"top-bar":"_top-bar_lnmq0_1",topBar:H,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ee},se=({appName:s,leftOffset:i,leftContent:l,centerContent:r,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(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",B.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:r??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=Z;exports.TopBar=se;
|