react-luminus-components 1.3.152 → 1.3.156

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 (45) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +52 -52
  3. package/dist/Loading-Bb2_fdjT.cjs +1 -0
  4. package/dist/{Loading-D012N8ha.js → Loading-CV3ZT5gc.js} +1 -1
  5. package/dist/components/Documents/components/DocumentDirectory/components/DocumentDirectoryLabel/DocumentDirectoryLabel.d.ts +2 -1
  6. package/dist/components/Form/CustomSelectInput/CustomSelectInput.d.ts +1 -1
  7. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
  8. package/dist/components/Form/TextInput/TextInput.d.ts +1 -1
  9. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
  10. package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +1 -1
  11. package/dist/components/common/SimplePicker/SimplePicker.d.ts +4 -2
  12. package/dist/contexts.cjs.js +1 -1
  13. package/dist/contexts.es.js +61 -61
  14. package/dist/hooks.cjs.js +1 -1
  15. package/dist/hooks.es.js +21 -21
  16. package/dist/layout.cjs.js +1 -1
  17. package/dist/layout.es.js +22 -22
  18. package/dist/main.cjs.js +2 -2
  19. package/dist/main.es.js +3125 -3107
  20. package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +1 -0
  21. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +2 -0
  22. package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +2 -0
  23. package/dist/models/texts/CustomSelectTexts.d.ts +3 -0
  24. package/dist/nivo-bar.es-CaE2W807.cjs +279 -0
  25. package/dist/{ResponsiveContextDropdown-C9WqbqI0.js → nivo-bar.es-DDwtI-my.js} +11142 -11133
  26. package/dist/{searchUtils-Bd-Jy9zp.js → searchUtils-C6PvM1bt.js} +1 -1
  27. package/dist/searchUtils-b1QW5y-z.cjs +1 -0
  28. package/dist/style.css +1 -1
  29. package/dist/useClipboard-BD7keGSc.cjs +1 -0
  30. package/dist/{useClipboard-ClHiiBOP.js → useClipboard-aZlIwfmN.js} +1 -1
  31. package/dist/useGetApiData-CC06DqnB.cjs +1 -0
  32. package/dist/{useGetApiData-DvRb2p5u.js → useGetApiData-Hc-yXwUZ.js} +8 -8
  33. package/dist/usePermissions-BJe0PsSE.cjs +1 -0
  34. package/dist/usePermissions-CtHtAy8y.js +20 -0
  35. package/dist/utils.cjs.js +1 -1
  36. package/dist/utils.es.js +26 -26
  37. package/dist/variables.scss +165 -165
  38. package/package.json +116 -116
  39. package/dist/Loading-TbgEJLF_.cjs +0 -1
  40. package/dist/ResponsiveContextDropdown-ep8LBIy7.cjs +0 -279
  41. package/dist/searchUtils-CqU0wzK3.cjs +0 -1
  42. package/dist/useClipboard-BoSxUeRj.cjs +0 -1
  43. package/dist/useGetApiData-B2Ap2urp.cjs +0 -1
  44. package/dist/usePermissions-CE2IinZO.js +0 -20
  45. package/dist/usePermissions-LOq-NC5k.cjs +0 -1
@@ -1,22 +1,22 @@
1
- var Se = Object.defineProperty;
2
- var be = (e, t, r) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var S = (e, t, r) => be(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as N, be as Oe, j as f, bf as Ee, a2 as z, a$ as we, bg as ue, ae as b, a_ as Ie, a3 as q, bh as je, aS as Pe, ar as De, az as fe, bi as de, aA as ke, aC as D, aB as Le, bj as He, aQ as se, bk as _e, bl as me, bm as oe, bn as $e, aU as Me } from "./ResponsiveContextDropdown-C9WqbqI0.js";
1
+ var be = Object.defineProperty;
2
+ var Se = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var b = (e, t, r) => Se(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { t as N, bh as Oe, j as f, bi as Ee, a2 as z, ap as we, bj as ue, av as S, am as Ie, a3 as G, bk as je, at as Pe, ar as De, aV as fe, bl as de, aW as ke, aX as D, as as Le, bm as He, aF as se, bn as _e, bo as me, bp as oe, bq as $e, aq as Me } from "./nivo-bar.es-DDwtI-my.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 Q } from "@azure/msal-browser";
6
+ import { EventType as J } 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-D012N8ha.js";
12
- import { u as Ne } from "./useGetApiData-DvRb2p5u.js";
11
+ import { L as Ue } from "./Loading-CV3ZT5gc.js";
12
+ import { u as Ne } from "./useGetApiData-Hc-yXwUZ.js";
13
13
  import { u as Fe } from "./useLocalStorageState-Bt99kkCr.js";
14
- function Ge(e) {
14
+ function qe(e) {
15
15
  const t = N(e);
16
16
  return t.setHours(23, 59, 59, 999), t;
17
17
  }
18
- function qe() {
19
- return Ge(Date.now());
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 Be = ({ children: e }) => {
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
- }, Ve = () => {
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) => {
@@ -54,16 +54,16 @@ const Be = ({ children: e }) => {
54
54
  autoFocus: !0,
55
55
  tabIndex: 0
56
56
  }), [o]);
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 }) }),
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 }) }),
59
59
  /* @__PURE__ */ f.jsxs("form", { onSubmit: i, children: [
60
- /* @__PURE__ */ f.jsxs(b.Body, { children: [
60
+ /* @__PURE__ */ f.jsxs(S.Body, { children: [
61
61
  s.input === "textarea" ? /* @__PURE__ */ f.jsx("textarea", { ...l, rows: 5 }) : void 0,
62
62
  s.input === "input" ? /* @__PURE__ */ f.jsx(Ie, { ...l, type: s.type }) : void 0
63
63
  ] }),
64
- /* @__PURE__ */ f.jsxs(b.Footer, { className: "w-100 d-flex gap-5", children: [
65
- /* @__PURE__ */ f.jsx(q, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
66
- /* @__PURE__ */ f.jsx(q, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
64
+ /* @__PURE__ */ f.jsxs(S.Footer, { className: "w-100 d-flex gap-5", children: [
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(Ve, {})
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(Be, { children: /* @__PURE__ */ f.jsxs(Ye, { children: [
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 === Q.LOGIN_SUCCESS && v.payload) {
166
+ if (v.eventType === J.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 === Q.LOGIN_SUCCESS || o.eventType === Q.ACQUIRE_TOKEN_SUCCESS && o.payload) {
202
+ if (o.eventType === J.LOGIN_SUCCESS || o.eventType === J.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) : qe();
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 Je = typeof Element < "u", Qe = typeof Map == "function", We = typeof Set == "function", Ze = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
263
+ var We = typeof Element < "u", Je = typeof Map == "function", Ze = typeof Set == "function", Qe = 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 (Qe && e instanceof Map && t instanceof Map) {
276
+ if (Je && 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 (We && e instanceof Set && t instanceof Set) {
284
+ if (Ze && 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 (Ze && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
290
+ if (Qe && 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 (Je && e instanceof Element) return !1;
302
+ if (We && 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 || {}), B = {
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
- }), V = (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) => {
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: V("bodyAttributes", e),
452
+ bodyAttributes: B("bodyAttributes", e),
453
453
  defer: H(e, L.DEFER),
454
454
  encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
455
- htmlAttributes: V("htmlAttributes", e),
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: V("titleAttributes", e),
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
- ], 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;"), ge = (e) => Object.keys(e).reduce((t, r) => {
515
+ ], 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;"), 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}>${W(
520
+ return s ? `<${e} ${x}="true" ${s}>${Z(
521
521
  o,
522
522
  n
523
- )}</${e}>` : `<${e} ${x}="true">${W(
523
+ )}</${e}>` : `<${e} ${x}="true">${Z(
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}="${W(o[u], r)}"`;
531
+ const d = typeof o[u] > "u" ? u : `${u}="${Z(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
- }, G = (e, t) => t.map((r, n) => {
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: () => G(e, t),
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, B.meta), o = Y(t, B.link), c = Y(r, B.script);
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
- ...G("meta", s.priority),
582
- ...G("link", o.priority),
583
- ...G("script", c.priority)
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,12 +624,12 @@ 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
- }, Z = yt, U = [], ve = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
627
+ }, Q = yt, U = [], ve = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
628
628
  constructor(e, t) {
629
- S(this, "instances", []);
630
- S(this, "canUseDOM", ve);
631
- S(this, "context");
632
- S(this, "value", {
629
+ b(this, "instances", []);
630
+ b(this, "canUseDOM", ve);
631
+ b(this, "context");
632
+ b(this, "value", {
633
633
  setHelmet: (e) => {
634
634
  this.context.helmet = e;
635
635
  },
@@ -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 = Z({
647
+ this.context = e, this.canUseDOM = t || !1, t || (e.helmet = Q({
648
648
  baseTag: [],
649
649
  bodyAttributes: {},
650
650
  encodeSpecialCharacters: !0,
@@ -661,13 +661,13 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
661
661
  }, gt = {}, xe = E.createContext(gt), j, Ce = (j = class extends te {
662
662
  constructor(r) {
663
663
  super(r);
664
- S(this, "helmetData");
664
+ b(this, "helmetData");
665
665
  this.helmetData = new X(this.props.context || {}, j.canUseDOM);
666
666
  }
667
667
  render() {
668
668
  return /* @__PURE__ */ E.createElement(xe.Provider, { value: this.helmetData.value }, this.props.children);
669
669
  }
670
- }, S(j, "canUseDOM", ve), j), k = (e, t) => {
670
+ }, b(j, "canUseDOM", ve), j), k = (e, t) => {
671
671
  const r = document.head || document.querySelector(
672
672
  "head"
673
673
  /* HEAD */
@@ -745,7 +745,7 @@ var he = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
745
745
  }, xt = vt, ce = class extends te {
746
746
  constructor() {
747
747
  super(...arguments);
748
- S(this, "rendered", !1);
748
+ b(this, "rendered", !1);
749
749
  }
750
750
  shouldComponentUpdate(t) {
751
751
  return !rt(t, this.props);
@@ -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) : Z && (n = Z(s)), r(n);
769
+ Ce.canUseDOM ? xt(s) : Q && (n = Q(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
- }, J, Ct = (J = class extends te {
784
+ }, W, Ct = (W = 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
- }, S(J, "defaultProps", {
902
+ }, b(W, "defaultProps", {
903
903
  defer: !0,
904
904
  encodeSpecialCharacters: !0,
905
905
  prioritizeSeoTags: !1
906
- }), J);
906
+ }), W);
907
907
  const Ut = ({ defaultHelmet: e, children: t }) => {
908
908
  const [r, n] = C([e]), s = p((i) => {
909
909
  n((l) => [...l, i]);
@@ -916,11 +916,11 @@ const Ut = ({ defaultHelmet: e, children: t }) => {
916
916
  ] }) });
917
917
  }, At = () => {
918
918
  const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: r, text: n, show: s } = Me();
919
- return /* @__PURE__ */ f.jsxs(b, { show: s, size: "sm", centered: !0, onHide: r, children: [
920
- /* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: n }) }),
921
- /* @__PURE__ */ f.jsx(b.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
922
- /* @__PURE__ */ f.jsx(q, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
923
- /* @__PURE__ */ f.jsx(q, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
919
+ return /* @__PURE__ */ f.jsxs(S, { show: s, size: "sm", centered: !0, onHide: r, children: [
920
+ /* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: n }) }),
921
+ /* @__PURE__ */ f.jsx(S.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
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("./ResponsiveContextDropdown-ep8LBIy7.cjs"),q=require("./useWindowSize-CE6DJWzn.cjs"),x=require("./usePermissions-LOq-NC5k.cjs"),d=require("./useClipboard-BoSxUeRj.cjs"),T=require("./useGetApiData-B2Ap2urp.cjs"),c=require("react"),G=require("./useLocalStorageState-BFc8Gc8H.cjs");require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const L=o=>{let e="pending",a;const t=o.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(o,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 r=a.get(o).then(n=>n.data);s(L(r))})()},[a,o]),t}const E=(o,e,a)=>{let t="pending",s;const l=o.then(r=>{t="success",s=r},r=>{const n=r==null?void 0:r.response;(n==null?void 0:n.status)===404&&a?(t="error-404",s=r):(t="error",s=r)});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=(o,{loadOnInit:e=i.loadOnInit,enabled:a=i.enabled,silent:t=i.silent,nullStateBeforeLoad:s=i.nullStateBeforeLoad,nullStateOnFail:l=i.nullStateOnFail,customApiUrl:r,customBearerToken:n,dataTransformer:h,errorBoundaryOn404:S}=i)=>{const w=u.useAxios({silent:t,customToken:n,differentBaseUrl:r,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:g}=c.useContext(u.LoadingContext),P=c.useRef(0),{isAuthenticated:C}=u.useAuth(),[b,p]=c.useState(null),m=c.useCallback(async(f,y)=>{if(!C()||a===!1)return;!t&&D(`loadData-${o}-${y}`),s&&p(null);const k=w.get(o,{signal:f}).then(A=>h?h(A.data):A.data).finally(()=>!t&&g(`loadData-${o}-${y}`));p(E(k,l??!1,S??!1))},[C,a,t,D,o,s,w,h,g,l,S]);return c.useEffect(()=>{if(e===!1)return;const f=new AbortController;return m(f.signal,++P.current),()=>{f.abort()}},[m,e]),{data:b,setData:p,reloadData:m}};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=G.useLocalStorageState;exports.useGetApiDataBound=O;exports.useGetDataBound=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar.es-CaE2W807.cjs"),q=require("./useWindowSize-CE6DJWzn.cjs"),T=require("./usePermissions-BJe0PsSE.cjs"),d=require("./useClipboard-BD7keGSc.cjs"),x=require("./useGetApiData-CC06DqnB.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,10 +1,10 @@
1
- import { ar as x, aS as T, aA as U } from "./ResponsiveContextDropdown-C9WqbqI0.js";
2
- import { bo as j, aU as q, aG as H, aT as J, a$ as M, bp as V } from "./ResponsiveContextDropdown-C9WqbqI0.js";
1
+ import { ar as S, at as L, aW as P } from "./nivo-bar.es-DDwtI-my.js";
2
+ import { br as Z, aq as j, af as H, au as J, ap as M, bs as V } from "./nivo-bar.es-DDwtI-my.js";
3
3
  import { a as Y, u as _ } from "./useWindowSize-OLYtjFv_.js";
4
- import { u as et } from "./usePermissions-CE2IinZO.js";
5
- import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-ClHiiBOP.js";
6
- import { u as lt } from "./useGetApiData-DvRb2p5u.js";
7
- import { useState as b, useEffect as C, useContext as $, useRef as L, useCallback as P } from "react";
4
+ import { u as et } from "./usePermissions-CtHtAy8y.js";
5
+ import { u as at, d as ot, a as rt, b as nt, c as ut } from "./useClipboard-aZlIwfmN.js";
6
+ import { u as lt } from "./useGetApiData-Hc-yXwUZ.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";
@@ -31,8 +31,8 @@ const B = (o) => {
31
31
  }
32
32
  };
33
33
  };
34
- function I(o, t) {
35
- const a = x({
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,20 +72,20 @@ const E = (o, t, a) => {
72
72
  enabled: !0,
73
73
  nullStateBeforeLoad: !0,
74
74
  nullStateOnFail: !1
75
- }, K = (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 = x({
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,
80
80
  noToastOnStatus: f ? [404] : void 0
81
- }), { startLoading: h, stopLoading: w } = $(T), k = L(0), { isAuthenticated: g } = U(), [A, 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);
85
- const y = p.get(o, {
85
+ const A = p.get(o, {
86
86
  signal: l
87
- }).then((S) => i ? i(S.data) : S.data).finally(() => !e && w(`loadData-${o}-${D}`));
88
- d(E(y, c ?? !1, f ?? !1));
87
+ }).then((x) => i ? i(x.data) : x.data).finally(() => !e && w(`loadData-${o}-${D}`));
88
+ d(E(A, c ?? !1, f ?? !1));
89
89
  }, [
90
90
  g,
91
91
  a,
@@ -106,20 +106,20 @@ const E = (o, t, a) => {
106
106
  return m(l.signal, ++k.current), () => {
107
107
  l.abort();
108
108
  };
109
- }, [m, t]), { data: A, setData: d, reloadData: m };
109
+ }, [m, t]), { data: y, setData: d, reloadData: m };
110
110
  };
111
111
  export {
112
- j as cancelToken,
113
- U as useAuth,
114
- x as useAxios,
112
+ Z as cancelToken,
113
+ P as useAuth,
114
+ S as useAxios,
115
115
  Y as useClickOutside,
116
116
  at as useClipboard,
117
- q as useConfirm,
117
+ j as useConfirm,
118
118
  ot as useEmployeePhotoPath,
119
119
  H as useFormControlType,
120
120
  lt as useGetApiData,
121
- K as useGetApiDataBound,
122
- I as useGetDataBound,
121
+ I as useGetApiDataBound,
122
+ z as useGetDataBound,
123
123
  rt as useKeyPress,
124
124
  ft as useLocalStorageState,
125
125
  J as useNotifications,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ResponsiveContextDropdown-ep8LBIy7.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"),k=require("./usePermissions-LOq-NC5k.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",D="_children_1o1uo_86",K="_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:D,mobile:K},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:r,useHover:x,useTooltips:v,isMobile:c})=>{var M,h,R,j;const[N,_]=m.useState(!1),[p]=r.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:r,setExpanded:x,currentPath:v,useHover:c,useTooltips:N})=>{const[_,p]=m.useState(-1),{checkUserHasPermissions:d}=k.usePermissions(),E=m.useMemo(()=>i.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any"),disabled:s.disabled||b.disabled}))}}),[i,d]),M=m.useMemo(()=>a.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any")}))}}),[a,d]),h=s=>{p(s===_?-1:s)};m.useEffect(()=>{r||p(-1)},[r]);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]:r},{expand:r}),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(!r),children:c?n:r?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,l)=>e.jsxRuntimeExports.jsx(B,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),M.map((s,l)=>e.jsxRuntimeExports.jsx(B,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title))]})]})},Z="_top-bar_1usoa_1",H="_top-bar-brand_1usoa_13",C={"top-bar":"_top-bar_1usoa_1",topBar:Z,"top-bar-brand":"_top-bar-brand_1usoa_13",topBarBrand:H},ee=({appName:n,leftOffset:t,centerContent:i,rightContent:a})=>e.jsxRuntimeExports.jsxs("nav",{className:e.classNames("luminus-top-bar shadow gap-1 gap-lg-3",C.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[e.jsxRuntimeExports.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:n}),i&&e.jsxRuntimeExports.jsx("div",{children:i}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center",children:a??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-CaE2W807.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 B=require("./useWindowSize-CE6DJWzn.cjs"),C=require("./usePermissions-BJe0PsSE.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,g=({item:n,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:r,useHover:x,useTooltips:v,isMobile:c})=>{var M,h,R,j;const[N,_]=m.useState(!1),[p]=r.split("?"),d=n.linkTo===p||((M=n.children)==null?void 0:M.some(s=>s.linkTo===p)),E=m.useRef(null);return B.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:r,setExpanded:x,currentPath:v,useHover:c,useTooltips:N})=>{const[_,p]=m.useState(-1),{checkUserHasPermissions:d}=C.usePermissions(),E=m.useMemo(()=>i.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any"),disabled:s.disabled||b.disabled}))}}),[i,d]),M=m.useMemo(()=>a.map(s=>{var l;return{...s,notPermitted:!d(s.permissions??[],"any"),children:(l=s.children)==null?void 0:l.map(b=>({...b,notPermitted:!d(b.permissions??[],"any")}))}}),[a,d]),h=s=>{p(s===_?-1:s)};m.useEffect(()=>{r||p(-1)},[r]);const R=m.useRef(null);B.useClickOutside([R],()=>x(!1));const{isMobile:j}=B.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:R,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:j},{[u.expand]:r},{expand:r}),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(!r),children:c?n:r?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,l)=>e.jsxRuntimeExports.jsx(g,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),currentPath:v,useHover:c,useTooltips:N,isMobile:j},s.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),M.map((s,l)=>e.jsxRuntimeExports.jsx(g,{item:s,menuExpanded:r,collapsed:l===_,onCollapse:()=>h(l),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,centerContent:i,rightContent:a})=>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.jsx(y.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",k.topBarBrand),children:n}),i&&e.jsxRuntimeExports.jsx("div",{children:i}),e.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center",children:a??null})]});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Y;exports.TopBar=ee;
package/dist/layout.es.js CHANGED
@@ -1,27 +1,27 @@
1
- import { j as o, c as i, ac as g, ax as L, bb as T, bc as R } from "./ResponsiveContextDropdown-C9WqbqI0.js";
2
- import { b0 as Ne, bd as ye } from "./ResponsiveContextDropdown-C9WqbqI0.js";
3
- import { useState as I, useRef as z, useMemo as k, useEffect as S } from "react";
4
- import { Link as f } from "react-router-dom";
1
+ import { j as o, c as i, ac as g, aG as L, be as T, bf as R } from "./nivo-bar.es-DDwtI-my.js";
2
+ import { aw as Ne, bg as ye } from "./nivo-bar.es-DDwtI-my.js";
3
+ import { useState as I, useRef as w, useMemo as k, useEffect as S } from "react";
4
+ import { Link as B } from "react-router-dom";
5
5
  import "react-hook-form";
6
6
  import "react-flexmonster";
7
7
  import "@azure/msal-browser";
8
8
  import "@azure/msal-react";
9
- import { a as w, u as $ } from "./useWindowSize-OLYtjFv_.js";
10
- import { u as A } from "./usePermissions-CE2IinZO.js";
11
- const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", U = "_text_1o1uo_23", W = "_icon_1o1uo_30", q = "_collapse-icon_1o1uo_36", E = "_collapsed_1o1uo_46", G = "_collapse-icon-mini_1o1uo_49", J = "_expanded_1o1uo_80", Q = "_children-container_1o1uo_86", V = "_visible_1o1uo_94", X = "_children_1o1uo_86", Y = "_mobile_1o1uo_106", s = {
9
+ import { a as z, u as $ } from "./useWindowSize-OLYtjFv_.js";
10
+ import { u as A } from "./usePermissions-CtHtAy8y.js";
11
+ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1o1uo_10", D = "_child_1o1uo_18", G = "_text_1o1uo_23", U = "_icon_1o1uo_30", W = "_collapse-icon_1o1uo_36", q = "_collapsed_1o1uo_46", E = "_collapse-icon-mini_1o1uo_49", J = "_expanded_1o1uo_80", Q = "_children-container_1o1uo_86", V = "_visible_1o1uo_94", X = "_children_1o1uo_86", Y = "_mobile_1o1uo_106", s = {
12
12
  "side-menu-item": "_side-menu-item_1o1uo_1",
13
13
  sideMenuItem: F,
14
14
  disabled: K,
15
15
  "nav-button": "_nav-button_1o1uo_10",
16
16
  navButton: O,
17
17
  child: D,
18
- text: U,
19
- icon: W,
18
+ text: G,
19
+ icon: U,
20
20
  "collapse-icon": "_collapse-icon_1o1uo_36",
21
- collapseIcon: q,
22
- collapsed: E,
21
+ collapseIcon: W,
22
+ collapsed: q,
23
23
  "collapse-icon-mini": "_collapse-icon-mini_1o1uo_49",
24
- collapseIconMini: G,
24
+ collapseIconMini: E,
25
25
  expanded: J,
26
26
  "children-container": "_children-container_1o1uo_86",
27
27
  childrenContainer: Q,
@@ -29,9 +29,9 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
29
29
  children: X,
30
30
  mobile: Y
31
31
  }, Z = ({ item: n, menuExpanded: t, useTooltips: l, children: a }) => n.tooltip && !t && l ? /* @__PURE__ */ o.jsx(L, { text: n.tooltip, placement: "top", delay: { show: 1e3, hide: 0 }, children: /* @__PURE__ */ o.jsx("div", { children: a }) }) : a, C = ({ item: n, menuExpanded: t, collapsed: l, onCollapse: a, currentPath: c, useHover: m, useTooltips: M, isMobile: r }) => {
32
- var B, v, j, x;
33
- const [N, p] = I(!1), [b] = c.split("?"), _ = n.linkTo === b || ((B = n.children) == null ? void 0 : B.some((e) => e.linkTo === b)), y = z(null);
34
- return w([y], () => l && a()), /* @__PURE__ */ o.jsxs("li", { ref: y, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: r }, {
32
+ var f, v, j, x;
33
+ const [N, p] = I(!1), [b] = c.split("?"), _ = n.linkTo === b || ((f = n.children) == null ? void 0 : f.some((e) => e.linkTo === b)), y = w(null);
34
+ return z([y], () => l && a()), /* @__PURE__ */ o.jsxs("li", { ref: y, className: i("luminus-side-menu-item", s.sideMenuItem, { [s.mobile]: r }, {
35
35
  [s.expanded]: t
36
36
  }, { active: N || _ }, { open: l && n.children }, {
37
37
  [s.disabled]: n.disabled || n.notPermitted || ((v = n.children) == null ? void 0 : v.every((e) => e.notPermitted || e.disabled))
@@ -49,13 +49,13 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
49
49
  t && /* @__PURE__ */ o.jsx("div", { className: i("collapse-icon", s.collapseIcon, {
50
50
  [s.collapsed]: l
51
51
  }), children: /* @__PURE__ */ o.jsx(g, {}) })
52
- ] }) }) : /* @__PURE__ */ o.jsxs(f, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
52
+ ] }) }) : /* @__PURE__ */ o.jsxs(B, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", s.navButton), children: [
53
53
  /* @__PURE__ */ o.jsx("div", { className: i("icon", s.icon), children: n.icon }),
54
54
  t && /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: n.title })
55
55
  ] }) }),
56
56
  /* @__PURE__ */ o.jsx("div", { className: i("children-container", s.childrenContainer, {
57
57
  [s.visible]: l
58
- }), children: /* @__PURE__ */ o.jsx("div", { className: i("shadow rounded children", s.children), children: (x = n.children) == null ? void 0 : x.map((e) => /* @__PURE__ */ o.jsx(f, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, { [s.disabled]: e.disabled || e.notPermitted }, { disabled: e.disabled || e.notPermitted }), onClick: a, children: /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }) }, e.linkTo)) }) })
58
+ }), children: /* @__PURE__ */ o.jsx("div", { className: i("shadow rounded children", s.children), children: (x = n.children) == null ? void 0 : x.map((e) => /* @__PURE__ */ o.jsx(B, { to: e.disabled || e.notPermitted ? "/" : e.linkTo ?? "/", className: i("nav-link child rounded", s.navButton, s.child, { [s.disabled]: e.disabled || e.notPermitted }, { disabled: e.disabled || e.notPermitted }), onClick: a, children: /* @__PURE__ */ o.jsx("div", { className: i("text", s.text, "text-nowrap"), children: e.title }) }, e.linkTo)) }) })
59
59
  ] });
60
60
  }, H = "_side-menu_15z3o_1", ee = "_sidebar-header_15z3o_13", oe = "_side-menu-content_15z3o_20", ne = "_expand_15z3o_24", se = "_only-logo_15z3o_28", ie = "_mobile_15z3o_31", te = "_divider_15z3o_45", u = {
61
61
  "side-menu": "_side-menu_15z3o_1",
@@ -81,7 +81,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
81
81
  disabled: e.disabled || h.disabled
82
82
  }))
83
83
  };
84
- }), [l, _]), B = k(() => a.map((e) => {
84
+ }), [l, _]), f = k(() => a.map((e) => {
85
85
  var d;
86
86
  return {
87
87
  ...e,
@@ -97,8 +97,8 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
97
97
  S(() => {
98
98
  c || b(-1);
99
99
  }, [c]);
100
- const j = z(null);
101
- w([j], () => m(!1));
100
+ const j = w(null);
101
+ z([j], () => m(!1));
102
102
  const { isMobile: x } = $();
103
103
  return /* @__PURE__ */ o.jsxs("section", { ref: j, className: i("luminus-side-menu shadow", u.sideMenu, { [u.mobile]: x }, {
104
104
  [u.expand]: c
@@ -113,7 +113,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
113
113
  t ? /* @__PURE__ */ o.jsx("div", { className: "p-3", children: t }) : null,
114
114
  y.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title)),
115
115
  /* @__PURE__ */ o.jsx("hr", { className: i("divider", u.divider) }),
116
- B.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title))
116
+ f.map((e, d) => /* @__PURE__ */ o.jsx(C, { item: e, menuExpanded: c, collapsed: d === p, onCollapse: () => v(d), currentPath: M, useHover: r, useTooltips: N, isMobile: x }, e.title))
117
117
  ] })
118
118
  ] });
119
119
  }, le = "_top-bar_1usoa_1", ae = "_top-bar-brand_1usoa_13", P = {
@@ -125,7 +125,7 @@ const F = "_side-menu-item_1o1uo_1", K = "_disabled_1o1uo_6", O = "_nav-button_1
125
125
  width: t ? `calc(100% - ${t}px)` : void 0,
126
126
  left: t ? `${t}px` : void 0
127
127
  }, children: [
128
- /* @__PURE__ */ o.jsx(f, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
128
+ /* @__PURE__ */ o.jsx(B, { to: "/", className: i("luminus-top-bar-brand", P.topBarBrand), children: n }),
129
129
  l && /* @__PURE__ */ o.jsx("div", { children: l }),
130
130
  /* @__PURE__ */ o.jsx("div", { className: "d-flex justify-content-end align-items-center", children: a ?? null })
131
131
  ] });