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