react-luminus-components 1.3.199 → 1.3.200

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.
Files changed (40) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +52 -52
  3. package/dist/Loading-DLuDwoeB.cjs +1 -0
  4. package/dist/{Loading-DKGQuT8s.js → Loading-mfS4ABrJ.js} +1 -1
  5. package/dist/contexts.cjs.js +1 -1
  6. package/dist/contexts.es.js +69 -69
  7. package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +4 -1
  8. package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +3 -1
  9. package/dist/hooks/useAuth/useAuth.d.ts +4 -1
  10. package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +3 -0
  11. package/dist/hooks.cjs.js +1 -1
  12. package/dist/hooks.es.js +16 -16
  13. package/dist/layout.cjs.js +1 -1
  14. package/dist/layout.es.js +22 -22
  15. package/dist/main.cjs.js +2 -2
  16. package/dist/main.es.js +2963 -2980
  17. package/dist/models/index.d.ts +1 -0
  18. package/dist/models/types/auth/AuthToken.d.ts +4 -0
  19. package/dist/{ShortcutLinksContext-B-VbdHKI.js → nivo-bar.es-DGVi05mA.js} +17542 -17512
  20. package/dist/nivo-bar.es-DnqBs8g4.cjs +279 -0
  21. package/dist/{searchUtils-v8Zc88Fw.js → searchUtils-B2fG-k8t.js} +1 -1
  22. package/dist/searchUtils-CRQZn2Ty.cjs +1 -0
  23. package/dist/style.css +1 -1
  24. package/dist/{useClipboard-CkQdPMc3.js → useClipboard-Cp8tpT_m.js} +1 -1
  25. package/dist/useClipboard-DooX0YL3.cjs +1 -0
  26. package/dist/useGetApiData-BCZKU8Gf.cjs +1 -0
  27. package/dist/{useGetApiData-Dy3s3B_K.js → useGetApiData-C2iIbjEW.js} +6 -6
  28. package/dist/usePermissions-Dd6Eq7Yp.js +20 -0
  29. package/dist/usePermissions-SansQ3VT.cjs +1 -0
  30. package/dist/utils.cjs.js +1 -1
  31. package/dist/utils.es.js +29 -29
  32. package/dist/variables.scss +165 -165
  33. package/package.json +116 -116
  34. package/dist/Loading-rqedPeYM.cjs +0 -1
  35. package/dist/ShortcutLinksContext-CQTIVDsc.cjs +0 -279
  36. package/dist/searchUtils-9MKFzsKf.cjs +0 -1
  37. package/dist/useClipboard-SRREkfCX.cjs +0 -1
  38. package/dist/useGetApiData-CZFD4lbG.cjs +0 -1
  39. package/dist/usePermissions-Dvict3ua.cjs +0 -1
  40. package/dist/usePermissions-mIYXICaL.js +0 -20
@@ -1,15 +1,15 @@
1
- var Se = Object.defineProperty;
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 A = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as N, bj as Ee, j as f, bk as we, $ as z, b4 as Ie, bl as fe, ab as S, b3 as je, a0 as G, bm as De, aT as Pe, as as ke, aA as de, bn as me, aB as Le, aD as P, aC as He, bo as $e, aR as se, bp as _e, bq as pe, br as oe, bs as Me, aV as Re } from "./ShortcutLinksContext-B-VbdHKI.js";
5
- import E, { useState as C, useCallback as p, useMemo as b, useContext as $, useEffect as D, useRef as he, Component as te } from "react";
6
- import { EventType as W } from "@azure/msal-browser";
1
+ var be = Object.defineProperty;
2
+ var Oe = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var S = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { t as N, bl as Ee, j as f, bm as we, $ as z, ap as Ie, bn as fe, av as b, am as je, a0 as G, bo as Pe, at as De, ar as ke, aX as de, bp as me, aY as Le, aZ as D, as as He, bq as $e, aF as se, br as _e, bs as pe, bt as oe, bu as Me, aq as Re } from "./nivo-bar.es-DGVi05mA.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 J } from "@azure/msal-browser";
7
7
  import { MsalProvider as Ue } 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 Ne } from "./Loading-DKGQuT8s.js";
12
- import { u as Fe } from "./useGetApiData-Dy3s3B_K.js";
11
+ import { L as Ne } from "./Loading-mfS4ABrJ.js";
12
+ import { u as Fe } from "./useGetApiData-C2iIbjEW.js";
13
13
  import { u as qe } from "./useLocalStorageState-Bt99kkCr.js";
14
14
  function Ge(e) {
15
15
  const t = N(e);
@@ -33,9 +33,9 @@ const Be = ({ children: e }) => {
33
33
  r(!0), s(c);
34
34
  }, []), l = p(() => {
35
35
  r(!1);
36
- }, []), a = b(() => ({ show: t, text: n, showConfirm: o, hideConfirm: l }), [t, n, o, l]);
36
+ }, []), a = A(() => ({ show: t, text: n, showConfirm: o, hideConfirm: l }), [t, n, o, l]);
37
37
  return /* @__PURE__ */ f.jsxs(we.Provider, { value: a, children: [
38
- /* @__PURE__ */ f.jsx(At, {}),
38
+ /* @__PURE__ */ f.jsx(St, {}),
39
39
  e
40
40
  ] });
41
41
  }, Ye = () => {
@@ -44,36 +44,36 @@ const Be = ({ children: e }) => {
44
44
  }, [n]), c = p((u) => {
45
45
  u.preventDefault(), !(s.required && !o) && n(o);
46
46
  }, [n, s.required, o]);
47
- D(() => {
47
+ P(() => {
48
48
  t === !0 && l(s.defaultValue ?? "");
49
49
  }, [t, s.defaultValue]);
50
- const i = b(() => ({
50
+ const i = A(() => ({
51
51
  value: o,
52
52
  onChange: (u) => l(u.currentTarget.value),
53
53
  className: "w-100",
54
54
  autoFocus: !0,
55
55
  tabIndex: 0
56
56
  }), [o]);
57
- return /* @__PURE__ */ f.jsxs(S, { show: t, size: "sm", centered: !0, onHide: a, children: [
58
- /* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: r }) }),
57
+ return /* @__PURE__ */ f.jsxs(b, { show: t, size: "sm", centered: !0, onHide: a, children: [
58
+ /* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: r }) }),
59
59
  /* @__PURE__ */ f.jsxs("form", { onSubmit: c, children: [
60
- /* @__PURE__ */ f.jsxs(S.Body, { children: [
60
+ /* @__PURE__ */ f.jsxs(b.Body, { children: [
61
61
  s.input === "textarea" ? /* @__PURE__ */ f.jsx("textarea", { ...i, rows: 5 }) : void 0,
62
62
  s.input === "input" ? /* @__PURE__ */ f.jsx(je, { ...i, type: s.type }) : void 0
63
63
  ] }),
64
- /* @__PURE__ */ f.jsxs(S.Footer, { className: "w-100 d-flex gap-5", children: [
64
+ /* @__PURE__ */ f.jsxs(b.Footer, { className: "w-100 d-flex gap-5", children: [
65
65
  /* @__PURE__ */ f.jsx(G, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
66
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
  ] });
70
- }, Je = ({ children: e }) => {
70
+ }, Ze = ({ children: e }) => {
71
71
  const [t, r] = C(!1), [n, s] = C(""), [o, l] = C({ input: "textarea", type: "text" }), a = he(() => {
72
72
  }), c = p((d) => {
73
73
  s(d), r(!0);
74
74
  }, []), i = p(() => {
75
75
  r(!1);
76
- }, []), u = b(() => ({
76
+ }, []), u = A(() => ({
77
77
  isShown: t,
78
78
  text: n,
79
79
  showPrompt: c,
@@ -87,7 +87,7 @@ const Be = ({ children: e }) => {
87
87
  /* @__PURE__ */ f.jsx(Ye, {})
88
88
  ] });
89
89
  }, $t = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: a }) => {
90
- const c = b(() => ({
90
+ const c = A(() => ({
91
91
  axiosOptions: t,
92
92
  cookieDomain: e,
93
93
  language: r,
@@ -104,8 +104,8 @@ const Be = ({ children: e }) => {
104
104
  n,
105
105
  l
106
106
  ]);
107
- return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Be, { children: /* @__PURE__ */ f.jsxs(Je, { children: [
108
- /* @__PURE__ */ f.jsx(De, {}),
107
+ return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Be, { children: /* @__PURE__ */ f.jsxs(Ze, { children: [
108
+ /* @__PURE__ */ f.jsx(Pe, {}),
109
109
  a
110
110
  ] }) }) });
111
111
  }, _t = ({ children: e }) => {
@@ -113,24 +113,24 @@ const Be = ({ children: e }) => {
113
113
  n.add(a), r(!0);
114
114
  }, [n]), o = p((a) => {
115
115
  n.delete(a), n.size === 0 && r(!1);
116
- }, [n]), l = b(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
117
- return /* @__PURE__ */ f.jsxs(Pe.Provider, { value: l, children: [
116
+ }, [n]), l = A(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
117
+ return /* @__PURE__ */ f.jsxs(De.Provider, { value: l, children: [
118
118
  t && /* @__PURE__ */ f.jsx(Ne, {}),
119
119
  e
120
120
  ] });
121
121
  }, Mt = ({ children: e }) => {
122
122
  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 () => {
123
123
  const y = await a();
124
- y && i(y);
124
+ y && i(y.token);
125
125
  }, [a]);
126
- D(() => {
126
+ P(() => {
127
127
  u();
128
128
  }, [u]);
129
129
  const h = p(() => {
130
130
  const y = localStorage.getItem("user") ?? null;
131
131
  return y ? JSON.parse(y ?? "") : null;
132
132
  }, [])(), [m, g] = C({
133
- state: h ? P.LOGGED_IN : P.LOGGING_IN,
133
+ state: h ? D.LOGGED_IN : D.LOGGING_IN,
134
134
  user: h
135
135
  }), _ = p(async (y) => {
136
136
  let v = null;
@@ -141,29 +141,29 @@ const Be = ({ children: e }) => {
141
141
  }), v;
142
142
  }, [t]), w = p(() => {
143
143
  localStorage.removeItem("user"), g({
144
- state: P.LOGGED_OUT,
144
+ state: D.LOGGED_OUT,
145
145
  user: null
146
146
  }), s(null), o(null);
147
147
  }, [o, s]), O = p(async (y) => {
148
148
  g({
149
- state: P.LOGGING_IN,
149
+ state: D.LOGGING_IN,
150
150
  user: null
151
151
  });
152
152
  const v = await _(y);
153
153
  return v ? (g({
154
- state: P.LOGGED_IN,
154
+ state: D.LOGGED_IN,
155
155
  user: v
156
156
  }), localStorage.setItem("user", JSON.stringify(v)), await l(), !0) : (g({
157
- state: P.LOGIN_FAILED,
157
+ state: D.LOGIN_FAILED,
158
158
  user: null
159
159
  }), !1);
160
160
  }, [_, l]), I = p(() => {
161
161
  w();
162
162
  }, [w]);
163
- D(() => {
163
+ P(() => {
164
164
  if (r) {
165
165
  const y = r.addEventCallback((v) => {
166
- if (v.eventType === W.LOGIN_SUCCESS && v.payload) {
166
+ if (v.eventType === J.LOGIN_SUCCESS && v.payload) {
167
167
  const K = v.payload;
168
168
  i(K.accessToken);
169
169
  }
@@ -180,27 +180,27 @@ const Be = ({ children: e }) => {
180
180
  I(), s(null);
181
181
  });
182
182
  }, [O, I, s]);
183
- D(() => {
183
+ P(() => {
184
184
  ne(c);
185
185
  }, [c, n == null ? void 0 : n.id, ne]);
186
- const Ae = b(() => ({
186
+ const Se = A(() => ({
187
187
  user: m.user,
188
188
  userLoginState: m,
189
189
  loginUser: O,
190
190
  logoutUser: I
191
191
  }), [m, O, I]);
192
- return /* @__PURE__ */ f.jsx(He.Provider, { value: Ae, children: e });
192
+ return /* @__PURE__ */ f.jsx(He.Provider, { value: Se, children: e });
193
193
  }, Rt = ({ ...e }) => {
194
- const { cookieDomain: t } = $(z), [, r] = $e(["Authorization"]), n = b(() => ({
194
+ const { cookieDomain: t } = $(z), [, r] = $e(["Authorization"]), n = A(() => ({
195
195
  useMsal: e.useMsal ?? !1,
196
196
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
197
197
  msalScopes: e.useMsal ? e.msalScopes ?? [] : [],
198
198
  msalExtraScopes: e.useMsal ? e.msalExtraScopes ?? [] : []
199
199
  }), [e]);
200
- return D(() => {
200
+ return P(() => {
201
201
  if (e.useMsal) {
202
202
  const s = e.msalInstance.addEventCallback((o) => {
203
- if (o.eventType === W.LOGIN_SUCCESS || o.eventType === W.ACQUIRE_TOKEN_SUCCESS && o.payload) {
203
+ if (o.eventType === J.LOGIN_SUCCESS || o.eventType === J.ACQUIRE_TOKEN_SUCCESS && o.payload) {
204
204
  const l = o.payload, a = l.account;
205
205
  e.msalInstance.setActiveAccount(a);
206
206
  const c = l.accessToken, i = l.expiresOn;
@@ -222,7 +222,7 @@ const Be = ({ children: e }) => {
222
222
  };
223
223
  }, [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 });
224
224
  }, Ut = ({ children: e, relativeEndpoint: t }) => {
225
- const [r, n, s] = qe("user-delegation", null), o = b(() => {
225
+ const [r, n, s] = qe("user-delegation", null), o = A(() => {
226
226
  if (!r)
227
227
  return null;
228
228
  const d = r.from ? se(r.from) : Ve(), h = r.to ? se(r.to) : ze();
@@ -231,14 +231,14 @@ const Be = ({ children: e }) => {
231
231
  nullStateBeforeLoad: !1,
232
232
  nullStateOnFail: !0
233
233
  }), i = he(null);
234
- D(() => {
234
+ P(() => {
235
235
  const d = () => {
236
236
  c(), i.current = window.setTimeout(d, _e() + 5e3);
237
237
  };
238
238
  return d(), () => {
239
239
  i.current !== null && window.clearTimeout(i.current);
240
240
  };
241
- }, [c]), D(() => {
241
+ }, [c]), P(() => {
242
242
  const d = () => {
243
243
  s();
244
244
  };
@@ -246,7 +246,7 @@ const Be = ({ children: e }) => {
246
246
  window.removeEventListener("focus", d);
247
247
  };
248
248
  }, [s, c]);
249
- const u = b(() => ({
249
+ const u = A(() => ({
250
250
  delegation: o,
251
251
  setDelegation: n,
252
252
  availableDelegations: l,
@@ -261,7 +261,7 @@ const Be = ({ children: e }) => {
261
261
  ]);
262
262
  return /* @__PURE__ */ f.jsx(me.Provider, { value: u, children: e });
263
263
  };
264
- var We = typeof Element < "u", Ze = typeof Map == "function", Qe = typeof Set == "function", Xe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
264
+ var Je = typeof Element < "u", We = typeof Map == "function", Qe = typeof Set == "function", Xe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
265
265
  function F(e, t) {
266
266
  if (e === t) return !0;
267
267
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -274,7 +274,7 @@ function F(e, t) {
274
274
  return !0;
275
275
  }
276
276
  var o;
277
- if (Ze && e instanceof Map && t instanceof Map) {
277
+ if (We && e instanceof Map && t instanceof Map) {
278
278
  if (e.size !== t.size) return !1;
279
279
  for (o = e.entries(); !(n = o.next()).done; )
280
280
  if (!t.has(n.value[0])) return !1;
@@ -300,7 +300,7 @@ function F(e, t) {
300
300
  if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
301
301
  for (n = r; n-- !== 0; )
302
302
  if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
303
- if (We && e instanceof Element) return !1;
303
+ if (Je && e instanceof Element) return !1;
304
304
  for (n = r; n-- !== 0; )
305
305
  if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !F(e[s[n]], t[s[n]]))
306
306
  return !1;
@@ -513,15 +513,15 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
513
513
  "script",
514
514
  "style"
515
515
  /* STYLE */
516
- ], Z = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), Te = (e) => Object.keys(e).reduce((t, r) => {
516
+ ], W = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), Te = (e) => Object.keys(e).reduce((t, r) => {
517
517
  const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
518
518
  return t ? `${t} ${n}` : n;
519
519
  }, ""), mt = (e, t, r, n) => {
520
520
  const s = Te(r), o = ge(t);
521
- return s ? `<${e} ${x}="true" ${s}>${Z(
521
+ return s ? `<${e} ${x}="true" ${s}>${W(
522
522
  o,
523
523
  n
524
- )}</${e}>` : `<${e} ${x}="true">${Z(
524
+ )}</${e}>` : `<${e} ${x}="true">${W(
525
525
  o,
526
526
  n
527
527
  )}</${e}>`;
@@ -529,7 +529,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
529
529
  const o = s, l = Object.keys(o).filter(
530
530
  (i) => !(i === "innerHTML" || i === "cssText")
531
531
  ).reduce((i, u) => {
532
- const d = typeof o[u] > "u" ? u : `${u}="${Z(o[u], r)}"`;
532
+ const d = typeof o[u] > "u" ? u : `${u}="${W(o[u], r)}"`;
533
533
  return i ? `${i} ${d}` : d;
534
534
  }, ""), a = o.innerHTML || o.cssText || "", c = dt.indexOf(e) === -1;
535
535
  return `${n}<${e} ${x}="true" ${l}${c ? "/>" : `>${a}</${e}>`}`;
@@ -627,10 +627,10 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
627
627
  };
628
628
  }, Q = gt, U = [], xe = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
629
629
  constructor(e, t) {
630
- A(this, "instances", []);
631
- A(this, "canUseDOM", xe);
632
- A(this, "context");
633
- A(this, "value", {
630
+ S(this, "instances", []);
631
+ S(this, "canUseDOM", xe);
632
+ S(this, "context");
633
+ S(this, "value", {
634
634
  setHelmet: (e) => {
635
635
  this.context.helmet = e;
636
636
  },
@@ -659,16 +659,16 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
659
659
  titleAttributes: {}
660
660
  }));
661
661
  }
662
- }, Tt = {}, Ce = E.createContext(Tt), j, be = (j = class extends te {
662
+ }, Tt = {}, Ce = E.createContext(Tt), j, Ae = (j = class extends te {
663
663
  constructor(r) {
664
664
  super(r);
665
- A(this, "helmetData");
665
+ S(this, "helmetData");
666
666
  this.helmetData = new X(this.props.context || {}, j.canUseDOM);
667
667
  }
668
668
  render() {
669
669
  return /* @__PURE__ */ E.createElement(Ce.Provider, { value: this.helmetData.value }, this.props.children);
670
670
  }
671
- }, A(j, "canUseDOM", xe), j), k = (e, t) => {
671
+ }, S(j, "canUseDOM", xe), j), k = (e, t) => {
672
672
  const r = document.head || document.querySelector(
673
673
  "head"
674
674
  /* HEAD */
@@ -746,7 +746,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
746
746
  }, Ct = xt, ce = class extends te {
747
747
  constructor() {
748
748
  super(...arguments);
749
- A(this, "rendered", !1);
749
+ S(this, "rendered", !1);
750
750
  }
751
751
  shouldComponentUpdate(t) {
752
752
  return !nt(t, this.props);
@@ -767,7 +767,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
767
767
  return delete l.context, l;
768
768
  })
769
769
  );
770
- be.canUseDOM ? Ct(s) : Q && (n = Q(s)), r(n);
770
+ Ae.canUseDOM ? Ct(s) : Q && (n = Q(s)), r(n);
771
771
  }
772
772
  // componentWillMount will be deprecated
773
773
  // for SSR, initialize on first render
@@ -782,7 +782,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
782
782
  render() {
783
783
  return this.init(), null;
784
784
  }
785
- }, J, bt = (J = class extends te {
785
+ }, Z, At = (Z = class extends te {
786
786
  shouldComponentUpdate(e) {
787
787
  return !tt(ie(this.props, "helmetData"), ie(e, "helmetData"));
788
788
  }
@@ -900,11 +900,11 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
900
900
  }
901
901
  return n ? /* @__PURE__ */ E.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ E.createElement(Ce.Consumer, null, (s) => /* @__PURE__ */ E.createElement(ce, { ...r, context: s }));
902
902
  }
903
- }, A(J, "defaultProps", {
903
+ }, S(Z, "defaultProps", {
904
904
  defer: !0,
905
905
  encodeSpecialCharacters: !0,
906
906
  prioritizeSeoTags: !1
907
- }), J);
907
+ }), Z);
908
908
  const ue = (e, t) => e ? `${e} | ${t}` : t, Nt = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
909
909
  const [n, s] = C([
910
910
  ue(r ?? "", e)
@@ -912,16 +912,16 @@ const ue = (e, t) => e ? `${e} | ${t}` : t, Nt = ({ defaultHelmet: e, children:
912
912
  s((u) => [...u, ue(r ?? "", i)]);
913
913
  }, [r]), l = p(() => {
914
914
  s((i) => i.length > 1 ? i.slice(0, -1) : i);
915
- }, [s]), a = b(() => n.at(-1) ?? "", [n]), c = b(() => ({ addHelmet: o, removeHelmet: l }), [o, l]);
916
- return /* @__PURE__ */ f.jsx(Me.Provider, { value: c, children: /* @__PURE__ */ f.jsxs(be, { children: [
917
- /* @__PURE__ */ f.jsx(bt, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: a }) }),
915
+ }, [s]), a = A(() => n.at(-1) ?? "", [n]), c = A(() => ({ addHelmet: o, removeHelmet: l }), [o, l]);
916
+ return /* @__PURE__ */ f.jsx(Me.Provider, { value: c, children: /* @__PURE__ */ f.jsxs(Ae, { children: [
917
+ /* @__PURE__ */ f.jsx(At, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: a }) }),
918
918
  t
919
919
  ] }) });
920
- }, At = () => {
920
+ }, St = () => {
921
921
  const { texts: { confirm: e } } = $(z), { onConfirm: t, onCancel: r, text: n, show: s } = Re();
922
- return /* @__PURE__ */ f.jsxs(S, { show: s, size: "sm", centered: !0, onHide: r, children: [
923
- /* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: n }) }),
924
- /* @__PURE__ */ f.jsx(S.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
922
+ return /* @__PURE__ */ f.jsxs(b, { show: s, size: "sm", centered: !0, onHide: r, children: [
923
+ /* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: n }) }),
924
+ /* @__PURE__ */ f.jsx(b.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
925
925
  /* @__PURE__ */ f.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
926
926
  /* @__PURE__ */ f.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
927
927
  ] }) })
@@ -934,7 +934,7 @@ export {
934
934
  Ut as DelegationProvider,
935
935
  Me as HelmetContext,
936
936
  Nt as HelmetProvider,
937
- Pe as LoadingContext,
937
+ De as LoadingContext,
938
938
  _t as LoadingProvider,
939
939
  z as LuminusComponentsContext,
940
940
  $t as LuminusComponentsProvider,
@@ -2,6 +2,9 @@ declare const useDevAuth: () => {
2
2
  isAuthenticated: () => boolean;
3
3
  login: (kid: string, password: string) => Promise<string | null>;
4
4
  logout: () => void;
5
- getToken: () => string | null;
5
+ getToken: () => {
6
+ token: string;
7
+ expiresOn: Date;
8
+ } | null;
6
9
  };
7
10
  export default useDevAuth;
@@ -1,8 +1,10 @@
1
+ import { AuthToken } from '../../../models/index';
2
+
1
3
  declare const useMsalAuth: () => {
2
4
  isAuthenticated: () => boolean;
3
5
  isAuthenticating: () => boolean;
4
6
  login: () => Promise<string | null>;
5
7
  logout: () => void;
6
- getToken: () => Promise<string | null>;
8
+ getToken: () => Promise<AuthToken | null>;
7
9
  };
8
10
  export default useMsalAuth;
@@ -1,7 +1,10 @@
1
1
  declare const useAuth: () => {
2
2
  isAuthenticated: () => boolean;
3
3
  isAuthenticating: () => boolean;
4
- getToken: (() => string | null) | (() => Promise<string | null>);
4
+ getToken: (() => {
5
+ token: string;
6
+ expiresOn: Date;
7
+ } | null) | (() => Promise<import('../../models').AuthToken | null>);
5
8
  login: (kid: string, password: string) => Promise<string | null>;
6
9
  logout: () => void;
7
10
  };
@@ -18,6 +18,9 @@ type NumberTypeProps = CustomTypeProps & {
18
18
  type ZFileProps = {
19
19
  required: boolean;
20
20
  multiple: boolean;
21
+ /**
22
+ * Maximal file size in bytes.
23
+ */
21
24
  maxFileSize: number;
22
25
  };
23
26
  declare const useZodSchemaTypes: () => {
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./ShortcutLinksContext-CQTIVDsc.cjs"),q=require("./useWindowSize-CE6DJWzn.cjs"),x=require("./usePermissions-Dvict3ua.cjs"),d=require("./useClipboard-SRREkfCX.cjs"),T=require("./useGetApiData-CZFD4lbG.cjs"),c=require("react"),L=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 B(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:C}=u.useAuth(),[k,m]=c.useState(null),p=c.useCallback(async(f,y)=>{if(!C()||a===!1)return;!t&&w(`loadData-${r}-${y}`),s&&m(null);const b=g.get(r,{signal:f}).then(A=>h?h(A.data):A.data).finally(()=>!t&&D(`loadData-${r}-${y}`));m(E(b,l??!1,S??!1))},[C,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:k,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=x.usePermissions;exports.useClipboard=d.useClipboard;exports.useEmployeePhotoPath=d.useEmployeePhotoPath;exports.useKeyPress=d.useKeyPress;exports.useSearchQuery=d.useSearchQuery;exports.useSearchQueryState=d.useSearchQueryState;exports.useGetApiData=T.useGetApiData;exports.useLocalStorageState=L.useLocalStorageState;exports.useGetApiDataBound=O;exports.useGetDataBound=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar.es-DnqBs8g4.cjs"),q=require("./useWindowSize-CE6DJWzn.cjs"),T=require("./usePermissions-SansQ3VT.cjs"),d=require("./useClipboard-DooX0YL3.cjs"),x=require("./useGetApiData-BCZKU8Gf.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,17 +1,17 @@
1
- import { as as S, aT as T, aB as U } from "./ShortcutLinksContext-B-VbdHKI.js";
2
- import { bt as V, aV as Z, aH as j, aU as q, b4 as J, bu as M } from "./ShortcutLinksContext-B-VbdHKI.js";
3
- import { a as Y, u as _ } from "./useWindowSize-OLYtjFv_.js";
4
- import { u as et } from "./usePermissions-mIYXICaL.js";
5
- import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-CkQdPMc3.js";
6
- import { u as lt } from "./useGetApiData-Dy3s3B_K.js";
7
- import { useState as b, useEffect as C, useContext as B, useRef as L, useCallback as P } from "react";
1
+ import { ar as S, at as L, aY as P } from "./nivo-bar.es-DGVi05mA.js";
2
+ import { bv as Y, aq as Z, ae as j, au as H, ap as J, bw as M } from "./nivo-bar.es-DGVi05mA.js";
3
+ import { a as X, u as _ } from "./useWindowSize-OLYtjFv_.js";
4
+ import { u as et } from "./usePermissions-Dd6Eq7Yp.js";
5
+ import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-Cp8tpT_m.js";
6
+ import { u as lt } from "./useGetApiData-C2iIbjEW.js";
7
+ import { useState as b, useEffect as C, useContext as T, useRef as U, useCallback as $ } from "react";
8
8
  import { u as ft } from "./useLocalStorageState-Bt99kkCr.js";
9
9
  import "react-router-dom";
10
10
  import "react-hook-form";
11
11
  import "react-flexmonster";
12
12
  import "@azure/msal-browser";
13
13
  import "@azure/msal-react";
14
- const $ = (o) => {
14
+ const B = (o) => {
15
15
  let t = "pending", a;
16
16
  const e = o.then((s) => {
17
17
  t = "success", a = s;
@@ -31,7 +31,7 @@ const $ = (o) => {
31
31
  }
32
32
  };
33
33
  };
34
- function H(o, t) {
34
+ function z(o, t) {
35
35
  const a = S({
36
36
  silent: !0,
37
37
  differentBaseUrl: t == null ? void 0 : t.customBaseUrl,
@@ -40,7 +40,7 @@ function H(o, t) {
40
40
  return C(() => {
41
41
  (async () => {
42
42
  const r = a.get(o).then((n) => n.data);
43
- s($(r));
43
+ s(B(r));
44
44
  })();
45
45
  }, [a, o]), e;
46
46
  }
@@ -78,7 +78,7 @@ const E = (o, t, a) => {
78
78
  customToken: n,
79
79
  differentBaseUrl: r,
80
80
  noToastOnStatus: f ? [404] : void 0
81
- }), { startLoading: h, stopLoading: w } = B(T), k = L(0), { isAuthenticated: g } = U(), [y, d] = b(null), m = P(async (l, D) => {
81
+ }), { startLoading: h, stopLoading: w } = T(L), k = U(0), { isAuthenticated: g } = P(), [y, d] = b(null), m = $(async (l, D) => {
82
82
  if (!g() || a === !1)
83
83
  return;
84
84
  !e && h(`loadData-${o}-${D}`), s && d(null);
@@ -109,20 +109,20 @@ const E = (o, t, a) => {
109
109
  }, [m, t]), { data: y, setData: d, reloadData: m };
110
110
  };
111
111
  export {
112
- V as cancelToken,
113
- U as useAuth,
112
+ Y as cancelToken,
113
+ P as useAuth,
114
114
  S as useAxios,
115
- Y as useClickOutside,
115
+ X as useClickOutside,
116
116
  at as useClipboard,
117
117
  Z as useConfirm,
118
118
  ot as useEmployeePhotoPath,
119
119
  j as useFormControlType,
120
120
  lt as useGetApiData,
121
121
  I as useGetApiDataBound,
122
- H as useGetDataBound,
122
+ z as useGetDataBound,
123
123
  rt as useKeyPress,
124
124
  ft as useLocalStorageState,
125
- q as useNotifications,
125
+ H as useNotifications,
126
126
  et as usePermissions,
127
127
  J as usePrompt,
128
128
  nt as useSearchQuery,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-CQTIVDsc.cjs"),m=require("react"),y=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const g=require("./useWindowSize-CE6DJWzn.cjs"),C=require("./usePermissions-Dvict3ua.cjs"),P="_side-menu-item_1o1uo_1",w="_disabled_1o1uo_6",z="_nav-button_1o1uo_10",I="_child_1o1uo_18",f="_text_1o1uo_23",S="_icon_1o1uo_30",L="_collapse-icon_1o1uo_36",q="_collapsed_1o1uo_46",T="_collapse-icon-mini_1o1uo_49",O="_expanded_1o1uo_80",$="_children-container_1o1uo_86",A="_visible_1o1uo_94",K="_children_1o1uo_86",D="_mobile_1o1uo_106",o={"side-menu-item":"_side-menu-item_1o1uo_1",sideMenuItem:P,disabled:w,"nav-button":"_nav-button_1o1uo_10",navButton:z,child:I,text:f,icon:S,"collapse-icon":"_collapse-icon_1o1uo_36",collapseIcon:L,collapsed:q,"collapse-icon-mini":"_collapse-icon-mini_1o1uo_49",collapseIconMini:T,expanded:O,"children-container":"_children-container_1o1uo_86",childrenContainer:$,visible:A,children:K,mobile:D},F=({item:n,menuExpanded:t,useTooltips:i,children:a})=>n.tooltip&&!t&&i?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:n.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:a})}):a,k=({item:n,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l,useHover:x,useTooltips:v,isMobile:c})=>{var M,h,R,j;const[N,_]=m.useState(!1),[p]=l.split("?"),d=n.linkTo===p||((M=n.children)==null?void 0:M.some(s=>s.linkTo===p)),E=m.useRef(null);return g.useClickOutside([E],()=>i&&a()),e.jsxRuntimeExports.jsxs("li",{ref:E,className:e.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.mobile]:c},{[o.expanded]:t},{active:N||d},{open:i&&n.children},{[o.disabled]:n.disabled||n.notPermitted||((h=n.children)==null?void 0:h.every(s=>s.notPermitted||s.disabled))},{disabled:n.disabled||n.notPermitted||((R=n.children)==null?void 0:R.every(s=>s.notPermitted||s.disabled))}),onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:[e.jsxRuntimeExports.jsx(F,{item:n,menuExpanded:t,useTooltips:v,children:n.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",o.navButton),onClick:()=>{a()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),!x&&!t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",o.collapseIconMini,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(y.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:e.classNames("nav-link",o.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",o.children),children:(j=n.children)==null?void 0:j.map(s=>e.jsxRuntimeExports.jsx(y.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:s.disabled||s.notPermitted},{disabled:s.disabled||s.notPermitted}),onClick:a,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title})},s.linkTo))})})]})},W="_side-menu_15z3o_1",U="_sidebar-header_15z3o_13",G="_side-menu-content_15z3o_20",J="_expand_15z3o_24",Q="_only-logo_15z3o_28",V="_mobile_15z3o_31",X="_divider_15z3o_45",u={"side-menu":"_side-menu_15z3o_1",sideMenu:W,"sidebar-header":"_sidebar-header_15z3o_13",sidebarHeader:U,"side-menu-content":"_side-menu-content_15z3o_20",sideMenuContent:G,expand:J,"only-logo":"_only-logo_15z3o_28",onlyLogo:Q,mobile:V,divider:X},Y=({headerItem:n,searchItem:t,mainItems:i,secondaryItems:a,expanded:l,setExpanded:x,currentPath:v,useHover:c,useTooltips:N})=>{const[_,p]=m.useState(-1),{checkUserHasPermissions:d}=C.usePermissions(),E=m.useMemo(()=>i.map(s=>{var r;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(r=s.children)==null?void 0:r.map(b=>({...b,notPermitted:!d(b.permissions??[],"any"),disabled:s.disabled||b.disabled}))}}),[i,d]),M=m.useMemo(()=>a.map(s=>{var r;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(r=s.children)==null?void 0:r.map(b=>({...b,notPermitted:!d(b.permissions??[],"any")}))}}),[a,d]),h=s=>{p(s===_?-1:s)};m.useEffect(()=>{l||p(-1)},[l]);const R=m.useRef(null);g.useClickOutside([R],()=>x(!1));const{isMobile:j}=g.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:R,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:j},{[u.expand]:l},{expand:l}),onMouseEnter:()=>c&&x(!0),onMouseLeave:()=>c&&x(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:c}),role:c?void 0:"button",onClick:c?void 0:()=>x(!l),children:c?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:u.sideMenuContent,children:[t?e.jsxRuntimeExports.jsx("div",{className:"p-3",children:t}):null,E.map((s,r)=>e.jsxRuntimeExports.jsx(k,{item:s,menuExpanded:l,collapsed:r===_,onCollapse:()=>h(r),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),M.map((s,r)=>e.jsxRuntimeExports.jsx(k,{item:s,menuExpanded:l,collapsed:r===_,onCollapse:()=>h(r),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title))]})]})},Z="_top-bar_1usoa_1",H="_top-bar-brand_1usoa_13",B={"top-bar":"_top-bar_1usoa_1",topBar:Z,"top-bar-brand":"_top-bar-brand_1usoa_13",topBarBrand:H},ee=({appName:n,leftOffset:t,leftContent:i,centerContent:a,rightContent:l})=>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.jsxs("div",{className:"d-flex gap-4 align-items-center",children:[e.jsxRuntimeExports.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",B.topBarBrand),children:n}),i]}),a&&e.jsxRuntimeExports.jsx("div",{children:a}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center",children:l??null})]});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Y;exports.TopBar=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-DnqBs8g4.cjs"),m=require("react"),y=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const g=require("./useWindowSize-CE6DJWzn.cjs"),C=require("./usePermissions-SansQ3VT.cjs"),P="_side-menu-item_1o1uo_1",w="_disabled_1o1uo_6",z="_nav-button_1o1uo_10",I="_child_1o1uo_18",f="_text_1o1uo_23",S="_icon_1o1uo_30",q="_collapse-icon_1o1uo_36",L="_collapsed_1o1uo_46",T="_collapse-icon-mini_1o1uo_49",O="_expanded_1o1uo_80",$="_children-container_1o1uo_86",A="_visible_1o1uo_94",K="_children_1o1uo_86",D="_mobile_1o1uo_106",o={"side-menu-item":"_side-menu-item_1o1uo_1",sideMenuItem:P,disabled:w,"nav-button":"_nav-button_1o1uo_10",navButton:z,child:I,text:f,icon:S,"collapse-icon":"_collapse-icon_1o1uo_36",collapseIcon:q,collapsed:L,"collapse-icon-mini":"_collapse-icon-mini_1o1uo_49",collapseIconMini:T,expanded:O,"children-container":"_children-container_1o1uo_86",childrenContainer:$,visible:A,children:K,mobile:D},F=({item:n,menuExpanded:t,useTooltips:i,children:a})=>n.tooltip&&!t&&i?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:n.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:a})}):a,B=({item:n,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l,useHover:x,useTooltips:v,isMobile:c})=>{var M,h,R,j;const[N,_]=m.useState(!1),[p]=l.split("?"),d=n.linkTo===p||((M=n.children)==null?void 0:M.some(s=>s.linkTo===p)),E=m.useRef(null);return g.useClickOutside([E],()=>i&&a()),e.jsxRuntimeExports.jsxs("li",{ref:E,className:e.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.mobile]:c},{[o.expanded]:t},{active:N||d},{open:i&&n.children},{[o.disabled]:n.disabled||n.notPermitted||((h=n.children)==null?void 0:h.every(s=>s.notPermitted||s.disabled))},{disabled:n.disabled||n.notPermitted||((R=n.children)==null?void 0:R.every(s=>s.notPermitted||s.disabled))}),onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:[e.jsxRuntimeExports.jsx(F,{item:n,menuExpanded:t,useTooltips:v,children:n.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",o.navButton),onClick:()=>{a()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),!x&&!t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",o.collapseIconMini,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(y.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:e.classNames("nav-link",o.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",o.icon),children:n.icon}),t&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:n.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",o.children),children:(j=n.children)==null?void 0:j.map(s=>e.jsxRuntimeExports.jsx(y.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:s.disabled||s.notPermitted},{disabled:s.disabled||s.notPermitted}),onClick:a,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",o.text,"text-nowrap"),children:s.title})},s.linkTo))})})]})},W="_side-menu_15z3o_1",U="_sidebar-header_15z3o_13",G="_side-menu-content_15z3o_20",J="_expand_15z3o_24",Q="_only-logo_15z3o_28",V="_mobile_15z3o_31",X="_divider_15z3o_45",u={"side-menu":"_side-menu_15z3o_1",sideMenu:W,"sidebar-header":"_sidebar-header_15z3o_13",sidebarHeader:U,"side-menu-content":"_side-menu-content_15z3o_20",sideMenuContent:G,expand:J,"only-logo":"_only-logo_15z3o_28",onlyLogo:Q,mobile:V,divider:X},Y=({headerItem:n,searchItem:t,mainItems:i,secondaryItems:a,expanded:l,setExpanded:x,currentPath:v,useHover:c,useTooltips:N})=>{const[_,p]=m.useState(-1),{checkUserHasPermissions:d}=C.usePermissions(),E=m.useMemo(()=>i.map(s=>{var r;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(r=s.children)==null?void 0:r.map(b=>({...b,notPermitted:!d(b.permissions??[],"any"),disabled:s.disabled||b.disabled}))}}),[i,d]),M=m.useMemo(()=>a.map(s=>{var r;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(r=s.children)==null?void 0:r.map(b=>({...b,notPermitted:!d(b.permissions??[],"any")}))}}),[a,d]),h=s=>{p(s===_?-1:s)};m.useEffect(()=>{l||p(-1)},[l]);const R=m.useRef(null);g.useClickOutside([R],()=>x(!1));const{isMobile:j}=g.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:R,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:j},{[u.expand]:l},{expand:l}),onMouseEnter:()=>c&&x(!0),onMouseLeave:()=>c&&x(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:c}),role:c?void 0:"button",onClick:c?void 0:()=>x(!l),children:c?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:u.sideMenuContent,children:[t?e.jsxRuntimeExports.jsx("div",{className:"p-3",children:t}):null,E.map((s,r)=>e.jsxRuntimeExports.jsx(B,{item:s,menuExpanded:l,collapsed:r===_,onCollapse:()=>h(r),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),M.map((s,r)=>e.jsxRuntimeExports.jsx(B,{item:s,menuExpanded:l,collapsed:r===_,onCollapse:()=>h(r),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title))]})]})},Z="_top-bar_1usoa_1",H="_top-bar-brand_1usoa_13",k={"top-bar":"_top-bar_1usoa_1",topBar:Z,"top-bar-brand":"_top-bar-brand_1usoa_13",topBarBrand:H},ee=({appName:n,leftOffset:t,leftContent:i,centerContent:a,rightContent:l})=>e.jsxRuntimeExports.jsxs("nav",{className:e.classNames("luminus-top-bar shadow gap-1 gap-lg-3",k.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[e.jsxRuntimeExports.jsxs("div",{className:"d-flex gap-4 align-items-center",children:[e.jsxRuntimeExports.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",k.topBarBrand),children:n}),i]}),a&&e.jsxRuntimeExports.jsx("div",{children:a}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center",children:l??null})]});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Y;exports.TopBar=ee;