react-luminus-components 1.4.34 → 1.4.35

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.
@@ -1,18 +1,18 @@
1
1
  var Ee = Object.defineProperty;
2
2
  var Oe = (e, t, r) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var C = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as F, bC as we, j as f, bD as De, P as z, ak as Ie, bE as de, a1 as A, ag as Pe, Q as q, bF as je, ao as ke, am as Le, b4 as me, br as pe, b5 as Me, b6 as j, an as He, bG as _e, aB as se, bH as $e, aT as he, bI as oe, bJ as Re, al as Ue, aX as Fe, a2 as Ne } from "./nivo-bar.es-CTs3Ptar.js";
5
- import { bK as Bt, ad as Vt } from "./nivo-bar.es-CTs3Ptar.js";
6
- import O, { useState as x, useCallback as p, useMemo as g, useContext as H, useEffect as P, useRef as ye, Component as te } from "react";
3
+ var S = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { t as F, bC as we, j as f, bD as Ie, P as z, ak as De, bE as de, a1 as A, ag as Pe, Q as q, bF as je, ao as ke, am as Le, b4 as me, br as pe, b5 as He, b6 as j, an as _e, bG as $e, aB as se, bH as Me, aT as he, bI as oe, bJ as Re, al as Ue, aX as Fe, a2 as Ne } from "./nivo-bar.es-CAK_sBtK.js";
5
+ import { bK as Bt, ad as Vt } from "./nivo-bar.es-CAK_sBtK.js";
6
+ import O, { useState as x, useCallback as m, useMemo as g, useContext as _, useEffect as P, useRef as ye, Component as te } from "react";
7
7
  import { EventType as W } from "@azure/msal-browser";
8
8
  import { MsalProvider as Ge } from "@azure/msal-react";
9
9
  import "react-router-dom";
10
10
  import "react-dom";
11
11
  import "react-hook-form";
12
12
  import "react-flexmonster";
13
- import { L as qe } from "./FormDisabledProvider-prNEKV5X.js";
14
- import { F as Jt } from "./FormDisabledProvider-prNEKV5X.js";
15
- import { a as ze, u as Ke } from "./useLocalStorageState-rNuPqT1C.js";
13
+ import { L as qe } from "./FormDisabledProvider-C4BJtnSl.js";
14
+ import { F as Jt } from "./FormDisabledProvider-C4BJtnSl.js";
15
+ import { a as ze, u as Ke } from "./useLocalStorageState-zVazoLpV.js";
16
16
  function Be(e) {
17
17
  const t = F(e);
18
18
  return t.setHours(23, 59, 59, 999), t;
@@ -31,19 +31,19 @@ function Je() {
31
31
  return we(Date.now());
32
32
  }
33
33
  const We = ({ children: e }) => {
34
- const [t, r] = x(!1), [n, s] = x(""), [o, c] = x(void 0), i = p((u, d) => {
34
+ const [t, r] = x(!1), [n, s] = x(""), [o, c] = x(void 0), i = m((u, d) => {
35
35
  r(!0), s(u), c(d);
36
- }, []), l = p(() => {
36
+ }, []), l = m(() => {
37
37
  r(!1);
38
38
  }, []), a = g(() => ({ show: t, text: n, showConfirm: i, hideConfirm: l, textSm: o }), [t, n, i, l, o]);
39
- return /* @__PURE__ */ f.jsxs(De.Provider, { value: a, children: [
39
+ return /* @__PURE__ */ f.jsxs(Ie.Provider, { value: a, children: [
40
40
  /* @__PURE__ */ f.jsx(Ot, {}),
41
41
  e
42
42
  ] });
43
43
  }, Qe = () => {
44
- const { texts: { confirm: e } } = H(z), { isShown: t, text: r, onFinish: n } = Ie(), { options: s } = H(de), [o, c] = x(s.defaultValue ?? ""), i = p(() => {
44
+ const { texts: { confirm: e } } = _(z), { isShown: t, text: r, onFinish: n } = De(), { options: s } = _(de), [o, c] = x(s.defaultValue ?? ""), i = m(() => {
45
45
  n(null);
46
- }, [n]), l = p((u) => {
46
+ }, [n]), l = m((u) => {
47
47
  u.preventDefault(), !(s.required && !o) && n(o);
48
48
  }, [n, s.required, o]);
49
49
  P(() => {
@@ -71,9 +71,9 @@ const We = ({ children: e }) => {
71
71
  ] });
72
72
  }, Xe = ({ children: e }) => {
73
73
  const [t, r] = x(!1), [n, s] = x(""), [o, c] = x({ input: "textarea", type: "text" }), i = ye(() => {
74
- }), l = p((d) => {
74
+ }), l = m((d) => {
75
75
  s(d), r(!0);
76
- }, []), a = p(() => {
76
+ }, []), a = m(() => {
77
77
  r(!1);
78
78
  }, []), u = g(() => ({
79
79
  isShown: t,
@@ -111,9 +111,9 @@ const We = ({ children: e }) => {
111
111
  i
112
112
  ] }) }) });
113
113
  }, Ut = ({ children: e }) => {
114
- const [t, r] = x(!1), [n] = x(/* @__PURE__ */ new Set()), s = p((i) => {
114
+ const [t, r] = x(!1), [n] = x(/* @__PURE__ */ new Set()), s = m((i) => {
115
115
  n.add(i), r(!0);
116
- }, [n]), o = p((i) => {
116
+ }, [n]), o = m((i) => {
117
117
  n.delete(i), n.size === 0 && r(!1);
118
118
  }, [n]), c = g(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
119
119
  return /* @__PURE__ */ f.jsxs(ke.Provider, { value: c, children: [
@@ -121,37 +121,37 @@ const We = ({ children: e }) => {
121
121
  e
122
122
  ] });
123
123
  }, Ft = ({ children: e }) => {
124
- const t = Le(), { msalInstance: r } = H(me), { delegation: n, setDelegation: s, setAvailableDelegations: o, refreshAvailableDelegations: c } = H(pe), { getToken: i } = Me(), [l, a] = x(null), u = p(async () => {
124
+ const t = Le(), { msalInstance: r } = _(me), { delegation: n, setDelegation: s, setAvailableDelegations: o, refreshAvailableDelegations: c } = _(pe), { getToken: i } = He(), [l, a] = x(null), u = m(async () => {
125
125
  const y = await i();
126
126
  y && a(y.token);
127
127
  }, [i]);
128
128
  P(() => {
129
129
  u();
130
130
  }, [u]);
131
- const m = p(() => {
131
+ const h = m(() => {
132
132
  const y = localStorage.getItem("user") ?? null;
133
133
  return y ? JSON.parse(y ?? "") : null;
134
- }, [])(), [h, T] = x({
135
- state: m ? j.LOGGED_IN : j.LOGGING_IN,
136
- user: m
137
- }), _ = p(async (y) => {
134
+ }, [])(), [p, T] = x({
135
+ state: h ? j.LOGGED_IN : j.LOGGING_IN,
136
+ user: h
137
+ }), $ = m(async (y) => {
138
138
  let b = null;
139
139
  return await t.get("/user/detail", y ? { headers: { Authorization: `Bearer ${y}` } } : void 0).then((K) => {
140
140
  b = K.data;
141
141
  }).catch(() => {
142
142
  b = null;
143
143
  }), b;
144
- }, [t]), w = p(() => {
144
+ }, [t]), w = m(() => {
145
145
  localStorage.removeItem("user"), T({
146
146
  state: j.LOGGED_OUT,
147
147
  user: null
148
148
  }), s(null), o(null);
149
- }, [o, s]), E = p(async (y) => {
149
+ }, [o, s]), E = m(async (y) => {
150
150
  T({
151
151
  state: j.LOGGING_IN,
152
152
  user: null
153
153
  });
154
- const b = await _(y);
154
+ const b = await $(y);
155
155
  return b ? (T({
156
156
  state: j.LOGGED_IN,
157
157
  user: b
@@ -159,7 +159,7 @@ const We = ({ children: e }) => {
159
159
  state: j.LOGIN_FAILED,
160
160
  user: null
161
161
  }), !1);
162
- }, [_, c]), D = p(() => {
162
+ }, [$, c]), I = m(() => {
163
163
  w();
164
164
  }, [w]);
165
165
  P(() => {
@@ -176,78 +176,66 @@ const We = ({ children: e }) => {
176
176
  }
177
177
  return () => {
178
178
  };
179
- }, [r, E, D]);
180
- const ne = p(async (y) => {
179
+ }, [r, E, I]);
180
+ const ne = m(async (y) => {
181
181
  y && await E(y).catch(() => {
182
- D(), s(null);
182
+ I(), s(null);
183
183
  });
184
- }, [E, D, s]);
184
+ }, [E, I, s]);
185
185
  P(() => {
186
186
  ne(l);
187
187
  }, [l, n == null ? void 0 : n.id, ne]);
188
188
  const Ae = g(() => ({
189
- user: h.user,
190
- userLoginState: h,
189
+ user: p.user,
190
+ userLoginState: p,
191
191
  loginUser: E,
192
- logoutUser: D
193
- }), [h, E, D]);
194
- return /* @__PURE__ */ f.jsx(He.Provider, { value: Ae, children: e });
192
+ logoutUser: I
193
+ }), [p, E, I]);
194
+ return /* @__PURE__ */ f.jsx(_e.Provider, { value: Ae, children: e });
195
195
  }, Nt = ({ ...e }) => {
196
- const { cookieDomain: t } = H(z), [, r] = _e(["Authorization"]), n = g(
197
- () => e.useMsal ? e.msalInstance : null,
198
- // eslint-disable-next-line react-hooks/exhaustive-deps
199
- [e.useMsal, e.useMsal ? e.msalInstance : null]
200
- ), s = g(
201
- () => e.useMsal ? e.msalScopes : [],
202
- // eslint-disable-next-line react-hooks/exhaustive-deps
203
- [e.useMsal, e.useMsal ? e.msalScopes : null]
204
- ), o = g(
205
- () => e.useMsal ? e.msalExtraScopes : [],
206
- // eslint-disable-next-line react-hooks/exhaustive-deps
207
- [e.useMsal, e.useMsal ? e.msalExtraScopes : null]
208
- ), c = g(() => ({
196
+ const { cookieDomain: t } = _(z), [, r] = $e(["Authorization"]), n = g(() => ({
209
197
  useMsal: e.useMsal ?? !1,
210
- msalInstance: n,
211
- msalScopes: s,
212
- msalExtraScopes: o
213
- }), [e.useMsal, n, s, o]);
198
+ msalInstance: e.useMsal ? e.msalInstance ?? null : null,
199
+ msalScopes: e.useMsal ? e.msalScopes ?? [] : [],
200
+ msalExtraScopes: e.useMsal ? e.msalExtraScopes ?? [] : []
201
+ }), [e]);
214
202
  return P(() => {
215
- if (e.useMsal && n) {
216
- const i = n.addEventCallback((l) => {
217
- if (l.eventType === W.LOGIN_SUCCESS || l.eventType === W.ACQUIRE_TOKEN_SUCCESS && l.payload) {
218
- const a = l.payload, u = a.account;
219
- n.setActiveAccount(u);
220
- const d = a.accessToken, m = a.expiresOn;
221
- r("Authorization", d, {
203
+ if (e.useMsal) {
204
+ const s = e.msalInstance.addEventCallback((o) => {
205
+ if (o.eventType === W.LOGIN_SUCCESS || o.eventType === W.ACQUIRE_TOKEN_SUCCESS && o.payload) {
206
+ const c = o.payload, i = c.account;
207
+ e.msalInstance.setActiveAccount(i);
208
+ const l = c.accessToken, a = c.expiresOn;
209
+ r("Authorization", l, {
222
210
  path: "/",
223
211
  secure: !0,
224
212
  sameSite: "none",
225
213
  domain: t,
226
- expires: m ?? void 0
214
+ expires: a ?? void 0
227
215
  });
228
216
  }
229
- l.error && console.error("AuthProvider MSAL Error", l);
217
+ o.error && console.error("AuthProvider MSAL Error", o);
230
218
  });
231
219
  return () => {
232
- i && n.removeEventCallback(i);
220
+ s && e.msalInstance.removeEventCallback(s);
233
221
  };
234
222
  }
235
223
  return () => {
236
224
  };
237
- }, [e.useMsal, n, r, t]), /* @__PURE__ */ f.jsx(me.Provider, { value: c, children: e.useMsal ? /* @__PURE__ */ f.jsx(Ge, { instance: e.msalInstance, children: e.children }) : e.children });
225
+ }, [e, r, t]), /* @__PURE__ */ f.jsx(me.Provider, { value: n, children: e.useMsal ? /* @__PURE__ */ f.jsx(Ge, { instance: e.msalInstance, children: e.children }) : e.children });
238
226
  }, Gt = ({ children: e, relativeEndpoint: t }) => {
239
227
  const [r, n, s] = ze("user-delegation", null), o = g(() => {
240
228
  if (!r)
241
229
  return null;
242
- const d = r.from ? se(r.from) : Je(), m = r.to ? se(r.to) : Ve();
243
- return Ye(new Date(Date.now()), { start: d, end: m }) ? r : (n(null), null);
230
+ const d = r.from ? se(r.from) : Je(), h = r.to ? se(r.to) : Ve();
231
+ return Ye(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
244
232
  }, [r, n]), { data: c, setData: i, reloadData: l } = Ke(t, {
245
233
  nullStateBeforeLoad: !1,
246
234
  nullStateOnFail: !0
247
235
  }), a = ye(null);
248
236
  P(() => {
249
237
  const d = () => {
250
- l(), a.current = window.setTimeout(d, $e() + 5e3);
238
+ l(), a.current = window.setTimeout(d, Me() + 5e3);
251
239
  };
252
240
  return d(), () => {
253
241
  a.current !== null && window.clearTimeout(a.current);
@@ -347,8 +335,8 @@ var ot = function(t, r, n, s) {
347
335
  var u = c[a];
348
336
  if (!l(u))
349
337
  return !1;
350
- var d = t[u], m = r[u];
351
- if (o = n ? n.call(s, d, m, u) : void 0, o === !1 || o === void 0 && d !== m)
338
+ var d = t[u], h = r[u];
339
+ if (o = n ? n.call(s, d, h, u) : void 0, o === !1 || o === void 0 && d !== h)
352
340
  return !1;
353
341
  }
354
342
  return !0;
@@ -388,14 +376,14 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
388
376
  }, it = Object.entries(re).reduce(
389
377
  (e, [t, r]) => (e[r] = t, e),
390
378
  {}
391
- ), S = "data-rh", L = {
379
+ ), C = "data-rh", L = {
392
380
  DEFAULT_TITLE: "defaultTitle",
393
381
  DEFER: "defer",
394
382
  ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
395
383
  ON_CHANGE_CLIENT_STATE: "onChangeClientState",
396
384
  TITLE_TEMPLATE: "titleTemplate",
397
385
  PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
398
- }, M = (e, t) => {
386
+ }, H = (e, t) => {
399
387
  for (let r = e.length - 1; r >= 0; r -= 1) {
400
388
  const n = e[r];
401
389
  if (Object.prototype.hasOwnProperty.call(n, t))
@@ -403,17 +391,17 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
403
391
  }
404
392
  return null;
405
393
  }, lt = (e) => {
406
- let t = M(
394
+ let t = H(
407
395
  e,
408
396
  "title"
409
397
  /* TITLE */
410
398
  );
411
- const r = M(e, L.TITLE_TEMPLATE);
399
+ const r = H(e, L.TITLE_TEMPLATE);
412
400
  if (Array.isArray(t) && (t = t.join("")), r && t)
413
401
  return r.replace(/%s/g, () => t);
414
- const n = M(e, L.DEFAULT_TITLE);
402
+ const n = H(e, L.DEFAULT_TITLE);
415
403
  return t || n || void 0;
416
- }, ct = (e) => M(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
404
+ }, ct = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
417
405
  }), V = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), ut = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
418
406
  if (!r.length) {
419
407
  const s = Object.keys(n);
@@ -424,7 +412,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
424
412
  }
425
413
  }
426
414
  return r;
427
- }, []), ft = (e) => console && typeof console.warn == "function" && console.warn(e), $ = (e, t, r) => {
415
+ }, []), ft = (e) => console && typeof console.warn == "function" && console.warn(e), M = (e, t, r) => {
428
416
  const n = {};
429
417
  return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && ft(
430
418
  `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
@@ -433,9 +421,9 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
433
421
  o.filter((l) => {
434
422
  let a;
435
423
  const u = Object.keys(l);
436
- for (let m = 0; m < u.length; m += 1) {
437
- const h = u[m], T = h.toLowerCase();
438
- t.indexOf(T) !== -1 && !(a === "rel" && l[a].toLowerCase() === "canonical") && !(T === "rel" && l[T].toLowerCase() === "stylesheet") && (a = T), t.indexOf(h) !== -1 && (h === "innerHTML" || h === "cssText" || h === "itemprop") && (a = h);
424
+ for (let h = 0; h < u.length; h += 1) {
425
+ const p = u[h], T = p.toLowerCase();
426
+ t.indexOf(T) !== -1 && !(a === "rel" && l[a].toLowerCase() === "canonical") && !(T === "rel" && l[T].toLowerCase() === "stylesheet") && (a = T), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (a = p);
439
427
  }
440
428
  if (!a || !l[a])
441
429
  return !1;
@@ -465,10 +453,10 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
465
453
  /* HREF */
466
454
  ], e),
467
455
  bodyAttributes: V("bodyAttributes", e),
468
- defer: M(e, L.DEFER),
469
- encode: M(e, L.ENCODE_SPECIAL_CHARACTERS),
456
+ defer: H(e, L.DEFER),
457
+ encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
470
458
  htmlAttributes: V("htmlAttributes", e),
471
- linkTags: $(
459
+ linkTags: M(
472
460
  "link",
473
461
  [
474
462
  "rel",
@@ -477,7 +465,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
477
465
  ],
478
466
  e
479
467
  ),
480
- metaTags: $(
468
+ metaTags: M(
481
469
  "meta",
482
470
  [
483
471
  "name",
@@ -489,12 +477,12 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
489
477
  ],
490
478
  e
491
479
  ),
492
- noscriptTags: $("noscript", [
480
+ noscriptTags: M("noscript", [
493
481
  "innerHTML"
494
482
  /* INNER_HTML */
495
483
  ], e),
496
484
  onChangeClientState: ct(e),
497
- scriptTags: $(
485
+ scriptTags: M(
498
486
  "script",
499
487
  [
500
488
  "src",
@@ -503,7 +491,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
503
491
  ],
504
492
  e
505
493
  ),
506
- styleTags: $("style", [
494
+ styleTags: M("style", [
507
495
  "cssText"
508
496
  /* CSS_TEXT */
509
497
  ], e),
@@ -532,10 +520,10 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
532
520
  return t ? `${t} ${n}` : n;
533
521
  }, ""), yt = (e, t, r, n) => {
534
522
  const s = ve(r), o = Te(t);
535
- return s ? `<${e} ${S}="true" ${s}>${Q(
523
+ return s ? `<${e} ${C}="true" ${s}>${Q(
536
524
  o,
537
525
  n
538
- )}</${e}>` : `<${e} ${S}="true">${Q(
526
+ )}</${e}>` : `<${e} ${C}="true">${Q(
539
527
  o,
540
528
  n
541
529
  )}</${e}>`;
@@ -546,20 +534,20 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
546
534
  const d = typeof o[u] > "u" ? u : `${u}="${Q(o[u], r)}"`;
547
535
  return a ? `${a} ${d}` : d;
548
536
  }, ""), i = o.innerHTML || o.cssText || "", l = ht.indexOf(e) === -1;
549
- return `${n}<${e} ${S}="true" ${c}${l ? "/>" : `>${i}</${e}>`}`;
537
+ return `${n}<${e} ${C}="true" ${c}${l ? "/>" : `>${i}</${e}>`}`;
550
538
  }, ""), xe = (e, t = {}) => Object.keys(e).reduce((r, n) => {
551
539
  const s = re[n];
552
540
  return r[s || n] = e[n], r;
553
541
  }, t), Tt = (e, t, r) => {
554
542
  const n = {
555
543
  key: t,
556
- [S]: !0
544
+ [C]: !0
557
545
  }, s = xe(r, n);
558
546
  return [O.createElement("title", s, t)];
559
547
  }, G = (e, t) => t.map((r, n) => {
560
548
  const s = {
561
549
  key: n,
562
- [S]: !0
550
+ [C]: !0
563
551
  };
564
552
  return Object.keys(r).forEach((o) => {
565
553
  const i = re[o] || o;
@@ -622,29 +610,29 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
622
610
  titleAttributes: l,
623
611
  prioritizeSeoTags: a
624
612
  } = e;
625
- let { linkTags: u, metaTags: d, scriptTags: m } = e, h = {
613
+ let { linkTags: u, metaTags: d, scriptTags: h } = e, p = {
626
614
  toComponent: () => {
627
615
  },
628
616
  toString: () => ""
629
617
  };
630
- return a && ({ priorityMethods: h, linkTags: u, metaTags: d, scriptTags: m } = vt(e)), {
631
- priority: h,
618
+ return a && ({ priorityMethods: p, linkTags: u, metaTags: d, scriptTags: h } = vt(e)), {
619
+ priority: p,
632
620
  base: v("base", t, n),
633
621
  bodyAttributes: v("bodyAttributes", r, n),
634
622
  htmlAttributes: v("htmlAttributes", s, n),
635
623
  link: v("link", u, n),
636
624
  meta: v("meta", d, n),
637
625
  noscript: v("noscript", o, n),
638
- script: v("script", m, n),
626
+ script: v("script", h, n),
639
627
  style: v("style", c, n),
640
628
  title: v("title", { title: i, titleAttributes: l }, n)
641
629
  };
642
630
  }, X = xt, U = [], be = !!(typeof window < "u" && window.document && window.document.createElement), Z = class {
643
631
  constructor(e, t) {
644
- C(this, "instances", []);
645
- C(this, "canUseDOM", be);
646
- C(this, "context");
647
- C(this, "value", {
632
+ S(this, "instances", []);
633
+ S(this, "canUseDOM", be);
634
+ S(this, "context");
635
+ S(this, "value", {
648
636
  setHelmet: (e) => {
649
637
  this.context.helmet = e;
650
638
  },
@@ -673,20 +661,20 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
673
661
  titleAttributes: {}
674
662
  }));
675
663
  }
676
- }, bt = {}, Se = O.createContext(bt), I, Ce = (I = class extends te {
664
+ }, bt = {}, Ce = O.createContext(bt), D, Se = (D = class extends te {
677
665
  constructor(r) {
678
666
  super(r);
679
- C(this, "helmetData");
680
- this.helmetData = new Z(this.props.context || {}, I.canUseDOM);
667
+ S(this, "helmetData");
668
+ this.helmetData = new Z(this.props.context || {}, D.canUseDOM);
681
669
  }
682
670
  render() {
683
- return /* @__PURE__ */ O.createElement(Se.Provider, { value: this.helmetData.value }, this.props.children);
671
+ return /* @__PURE__ */ O.createElement(Ce.Provider, { value: this.helmetData.value }, this.props.children);
684
672
  }
685
- }, C(I, "canUseDOM", be), I), k = (e, t) => {
673
+ }, S(D, "canUseDOM", be), D), k = (e, t) => {
686
674
  const r = document.head || document.querySelector(
687
675
  "head"
688
676
  /* HEAD */
689
- ), n = r.querySelectorAll(`${e}[${S}]`), s = [].slice.call(n), o = [];
677
+ ), n = r.querySelectorAll(`${e}[${C}]`), s = [].slice.call(n), o = [];
690
678
  let c;
691
679
  return t && t.length && t.forEach((i) => {
692
680
  const l = document.createElement(e);
@@ -700,7 +688,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
700
688
  const u = a, d = typeof i[u] > "u" ? "" : i[u];
701
689
  l.setAttribute(a, d);
702
690
  }
703
- l.setAttribute(S, "true"), s.some((a, u) => (c = u, l.isEqualNode(a))) ? s.splice(c, 1) : o.push(l);
691
+ l.setAttribute(C, "true"), s.some((a, u) => (c = u, l.isEqualNode(a))) ? s.splice(c, 1) : o.push(l);
704
692
  }), s.forEach((i) => {
705
693
  var l;
706
694
  return (l = i.parentNode) == null ? void 0 : l.removeChild(i);
@@ -712,7 +700,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
712
700
  const r = document.getElementsByTagName(e)[0];
713
701
  if (!r)
714
702
  return;
715
- const n = r.getAttribute(S), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
703
+ const n = r.getAttribute(C), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
716
704
  for (const i of c) {
717
705
  const l = t[i] || "";
718
706
  r.getAttribute(i) !== l && r.setAttribute(i, l), s.indexOf(i) === -1 && s.push(i);
@@ -721,8 +709,8 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
721
709
  }
722
710
  for (let i = o.length - 1; i >= 0; i -= 1)
723
711
  r.removeAttribute(o[i]);
724
- s.length === o.length ? r.removeAttribute(S) : r.getAttribute(S) !== c.join(",") && r.setAttribute(S, c.join(","));
725
- }, St = (e, t) => {
712
+ s.length === o.length ? r.removeAttribute(C) : r.getAttribute(C) !== c.join(",") && r.setAttribute(C, c.join(","));
713
+ }, Ct = (e, t) => {
726
714
  typeof e < "u" && document.title !== e && (document.title = Te(e)), ee("title", t);
727
715
  }, le = (e, t) => {
728
716
  const {
@@ -736,31 +724,31 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
736
724
  scriptTags: a,
737
725
  styleTags: u,
738
726
  title: d,
739
- titleAttributes: m
727
+ titleAttributes: h
740
728
  } = e;
741
- ee("body", n), ee("html", s), St(d, m);
742
- const h = {
729
+ ee("body", n), ee("html", s), Ct(d, h);
730
+ const p = {
743
731
  baseTag: k("base", r),
744
732
  linkTags: k("link", o),
745
733
  metaTags: k("meta", c),
746
734
  noscriptTags: k("noscript", i),
747
735
  scriptTags: k("script", a),
748
736
  styleTags: k("style", u)
749
- }, T = {}, _ = {};
750
- Object.keys(h).forEach((w) => {
751
- const { newTags: E, oldTags: D } = h[w];
752
- E.length && (T[w] = E), D.length && (_[w] = h[w].oldTags);
753
- }), t && t(), l(e, T, _);
754
- }, R = null, Ct = (e) => {
737
+ }, T = {}, $ = {};
738
+ Object.keys(p).forEach((w) => {
739
+ const { newTags: E, oldTags: I } = p[w];
740
+ E.length && (T[w] = E), I.length && ($[w] = p[w].oldTags);
741
+ }), t && t(), l(e, T, $);
742
+ }, R = null, St = (e) => {
755
743
  R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
756
744
  le(e, () => {
757
745
  R = null;
758
746
  });
759
747
  }) : (le(e), R = null);
760
- }, At = Ct, ce = class extends te {
748
+ }, At = St, ce = class extends te {
761
749
  constructor() {
762
750
  super(...arguments);
763
- C(this, "rendered", !1);
751
+ S(this, "rendered", !1);
764
752
  }
765
753
  shouldComponentUpdate(t) {
766
754
  return !at(t, this.props);
@@ -781,7 +769,7 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
781
769
  return delete c.context, c;
782
770
  })
783
771
  );
784
- Ce.canUseDOM ? At(s) : X && (n = X(s)), r(n);
772
+ Se.canUseDOM ? At(s) : X && (n = X(s)), r(n);
785
773
  }
786
774
  // componentWillMount will be deprecated
787
775
  // for SSR, initialize on first render
@@ -912,9 +900,9 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
912
900
  const s = n;
913
901
  n = new Z(s.context, !0), delete r.helmetData;
914
902
  }
915
- return n ? /* @__PURE__ */ O.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ O.createElement(Se.Consumer, null, (s) => /* @__PURE__ */ O.createElement(ce, { ...r, context: s }));
903
+ return n ? /* @__PURE__ */ O.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ O.createElement(Ce.Consumer, null, (s) => /* @__PURE__ */ O.createElement(ce, { ...r, context: s }));
916
904
  }
917
- }, C(J, "defaultProps", {
905
+ }, S(J, "defaultProps", {
918
906
  defer: !0,
919
907
  encodeSpecialCharacters: !0,
920
908
  prioritizeSeoTags: !1
@@ -922,17 +910,17 @@ var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
922
910
  const ue = (e, t) => e ? `${e} | ${t}` : t, qt = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
923
911
  const [n, s] = x([
924
912
  ue(r ?? "", e)
925
- ]), o = p((a) => {
913
+ ]), o = m((a) => {
926
914
  s((u) => [...u, ue(r ?? "", a)]);
927
- }, [r]), c = p(() => {
915
+ }, [r]), c = m(() => {
928
916
  s((a) => a.length > 1 ? a.slice(0, -1) : a);
929
917
  }, [s]), i = g(() => n.at(-1) ?? "", [n]), l = g(() => ({ addHelmet: o, removeHelmet: c }), [o, c]);
930
- return /* @__PURE__ */ f.jsx(Re.Provider, { value: l, children: /* @__PURE__ */ f.jsxs(Ce, { children: [
918
+ return /* @__PURE__ */ f.jsx(Re.Provider, { value: l, children: /* @__PURE__ */ f.jsxs(Se, { children: [
931
919
  /* @__PURE__ */ f.jsx(Et, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: i }) }),
932
920
  t
933
921
  ] }) });
934
922
  }, fe = 50, Ot = () => {
935
- const { texts: { confirm: e } } = H(z), { onConfirm: t, onCancel: r, text: n, show: s, textSm: o } = Ue(), c = g(() => o === void 0 ? n.length > fe : o, [n, o]), i = g(() => n.length > fe, [n]), l = p((a) => {
923
+ const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: r, text: n, show: s, textSm: o } = Ue(), c = g(() => o === void 0 ? n.length > fe : o, [n, o]), i = g(() => n.length > fe, [n]), l = m((a) => {
936
924
  if (s)
937
925
  switch (a.key) {
938
926
  case "Enter":
@@ -964,7 +952,7 @@ export {
964
952
  Ut as LoadingProvider,
965
953
  z as LuminusComponentsContext,
966
954
  Rt as LuminusComponentsProvider,
967
- He as UserContext,
955
+ _e as UserContext,
968
956
  Ft as UserProvider,
969
957
  Vt as useFormDisabledContext
970
958
  };
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-bar.es-Cz-_XfUi.cjs"),b=require("./useLocalStorageState-CIf5aDoR.cjs"),l=require("react"),p=require("./useRenderDraggableInPortal-QPCaw-E_.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const q=t=>{let e="pending",n;const r=t.then(a=>{e="success",n=a},a=>{e="error",n=a});return()=>{switch(e){case"pending":throw r;case"success":return n;case"error":throw n;default:throw new Error("Unknown status")}}};function I(t,e){const n=s.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[r,a]=l.useState(null);return l.useEffect(()=>{(async()=>{const u=n.get(t).then(c=>c.data);a(q(u))})()},[n,t]),r}const E=(t,e,n)=>{let r="pending",a;const d=t.then(u=>{r="success",a=u},u=>{const c=u==null?void 0:u.response;(c==null?void 0:c.status)===404&&n?(r="error-404",a=u):(r="error",a=u)});return()=>{switch(r){case"pending":throw d;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},x=(t,{loadOnInit:e=S.loadOnInit,enabled:n=S.enabled,silent:r=S.silent,nullStateBeforeLoad:a=S.nullStateBeforeLoad,nullStateOnFail:d=S.nullStateOnFail,customApiUrl:u,customBearerToken:c,dataTransformer:f,errorBoundaryOn404:o}=S)=>{const i=s.useAxios({silent:r,customToken:c,differentBaseUrl:u,noToastOnStatus:o?[404]:void 0}),{startLoading:g,stopLoading:v}=l.useContext(s.LoadingContext),y=l.useRef(0),{isAuthenticated:C}=s.useAuth(),[k,w]=l.useState(null),D=l.useCallback(async(m,P)=>{if(!C()||n===!1)return;!r&&g(`loadData-${t}-${P}`),a&&w(null);const T=i.get(t,{signal:m}).then(A=>f?f(A.data):A.data).finally(()=>!r&&v(`loadData-${t}-${P}`));w(E(T,d??!1,o??!1))},[C,n,r,g,t,a,i,f,v,d,o]);return l.useEffect(()=>{if(e===!1)return;const m=new AbortController;return D(m.signal,++y.current),()=>{m.abort()}},[D,e]),{data:k,setData:w,reloadData:D}},h={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},B=(t,{storageKey:e=h.storageKey,requiredHeight:n=h.requiredHeight,retryInterval:r=h.retryInterval}=h)=>{const[a,d]=l.useState(!1),u=l.useRef(null),c=l.useCallback(()=>{const o=localStorage.getItem(e);return localStorage.removeItem(e),o===null?null:Number(o)},[e]),f=l.useCallback(o=>{localStorage.setItem(e,o)},[e]);return l.useEffect(()=>{const o=window.setInterval(()=>{if(!a&&t.current!==null&&t.current.getBoundingClientRect().height>n){d(!0);const i=c();i!==null&&t.current.scrollTo({top:i}),window.clearInterval(o)}},r);return()=>{window.clearTimeout(o)}},[a,n,c,r,t]),l.useEffect(()=>{var i;const o=new AbortController;return(i=t.current)==null||i.addEventListener("scrollend",()=>{var g;u.current=((g=t.current)==null?void 0:g.scrollTop)??0,f((u.current??0).toString())},{signal:o.signal}),()=>o.abort()},[f,t]),{saveValue:f,retrieveValue:c}};exports.cancelToken=s.cancelToken;exports.useAuth=s.useAuth;exports.useAxios=s.useAxios;exports.useClickOutside=s.useClickOutside;exports.useClipboard=s.useClipboard;exports.useConfirm=s.useConfirm;exports.useFormControlType=s.useFormControlType;exports.useKeyPress=s.useKeyPress;exports.useNotifications=s.useNotifications;exports.usePermissions=s.usePermissions;exports.usePrompt=s.usePrompt;exports.useWindowSize=s.useWindowSize;exports.useZodSchemaTypes=s.useZodSchemaTypes;exports.useGetApiData=b.useGetApiData;exports.useLocalStorageState=b.useLocalStorageState;exports.useEmployeePhotoPath=p.useEmployeePhotoPath;exports.useRenderDraggableInPortal=p.useRenderDraggableInPortal;exports.useSearchQuery=p.useSearchQuery;exports.useSearchQueryState=p.useSearchQueryState;exports.useGetApiDataBound=x;exports.useGetDataBound=I;exports.useScrollSave=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-bar.es-C2UfrfEW.cjs"),b=require("./useLocalStorageState-DgnSxAxT.cjs"),l=require("react"),p=require("./useRenderDraggableInPortal-QPCaw-E_.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const q=t=>{let e="pending",n;const r=t.then(a=>{e="success",n=a},a=>{e="error",n=a});return()=>{switch(e){case"pending":throw r;case"success":return n;case"error":throw n;default:throw new Error("Unknown status")}}};function I(t,e){const n=s.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[r,a]=l.useState(null);return l.useEffect(()=>{(async()=>{const u=n.get(t).then(c=>c.data);a(q(u))})()},[n,t]),r}const E=(t,e,n)=>{let r="pending",a;const d=t.then(u=>{r="success",a=u},u=>{const c=u==null?void 0:u.response;(c==null?void 0:c.status)===404&&n?(r="error-404",a=u):(r="error",a=u)});return()=>{switch(r){case"pending":throw d;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},x=(t,{loadOnInit:e=S.loadOnInit,enabled:n=S.enabled,silent:r=S.silent,nullStateBeforeLoad:a=S.nullStateBeforeLoad,nullStateOnFail:d=S.nullStateOnFail,customApiUrl:u,customBearerToken:c,dataTransformer:f,errorBoundaryOn404:o}=S)=>{const i=s.useAxios({silent:r,customToken:c,differentBaseUrl:u,noToastOnStatus:o?[404]:void 0}),{startLoading:g,stopLoading:v}=l.useContext(s.LoadingContext),y=l.useRef(0),{isAuthenticated:C}=s.useAuth(),[k,w]=l.useState(null),D=l.useCallback(async(m,P)=>{if(!C()||n===!1)return;!r&&g(`loadData-${t}-${P}`),a&&w(null);const T=i.get(t,{signal:m}).then(A=>f?f(A.data):A.data).finally(()=>!r&&v(`loadData-${t}-${P}`));w(E(T,d??!1,o??!1))},[C,n,r,g,t,a,i,f,v,d,o]);return l.useEffect(()=>{if(e===!1)return;const m=new AbortController;return D(m.signal,++y.current),()=>{m.abort()}},[D,e]),{data:k,setData:w,reloadData:D}},h={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},B=(t,{storageKey:e=h.storageKey,requiredHeight:n=h.requiredHeight,retryInterval:r=h.retryInterval}=h)=>{const[a,d]=l.useState(!1),u=l.useRef(null),c=l.useCallback(()=>{const o=localStorage.getItem(e);return localStorage.removeItem(e),o===null?null:Number(o)},[e]),f=l.useCallback(o=>{localStorage.setItem(e,o)},[e]);return l.useEffect(()=>{const o=window.setInterval(()=>{if(!a&&t.current!==null&&t.current.getBoundingClientRect().height>n){d(!0);const i=c();i!==null&&t.current.scrollTo({top:i}),window.clearInterval(o)}},r);return()=>{window.clearTimeout(o)}},[a,n,c,r,t]),l.useEffect(()=>{var i;const o=new AbortController;return(i=t.current)==null||i.addEventListener("scrollend",()=>{var g;u.current=((g=t.current)==null?void 0:g.scrollTop)??0,f((u.current??0).toString())},{signal:o.signal}),()=>o.abort()},[f,t]),{saveValue:f,retrieveValue:c}};exports.cancelToken=s.cancelToken;exports.useAuth=s.useAuth;exports.useAxios=s.useAxios;exports.useClickOutside=s.useClickOutside;exports.useClipboard=s.useClipboard;exports.useConfirm=s.useConfirm;exports.useFormControlType=s.useFormControlType;exports.useKeyPress=s.useKeyPress;exports.useNotifications=s.useNotifications;exports.usePermissions=s.usePermissions;exports.usePrompt=s.usePrompt;exports.useWindowSize=s.useWindowSize;exports.useZodSchemaTypes=s.useZodSchemaTypes;exports.useGetApiData=b.useGetApiData;exports.useLocalStorageState=b.useLocalStorageState;exports.useEmployeePhotoPath=p.useEmployeePhotoPath;exports.useRenderDraggableInPortal=p.useRenderDraggableInPortal;exports.useSearchQuery=p.useSearchQuery;exports.useSearchQueryState=p.useSearchQueryState;exports.useGetApiDataBound=x;exports.useGetDataBound=I;exports.useScrollSave=B;
package/dist/hooks.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { am as x, ao as P, b5 as E } from "./nivo-bar.es-CTs3Ptar.js";
2
- import { bL as Z, aN as j, bN as J, al as Y, bM as _, aX as K, ap as tt, bo as et, ak as at, aE as st, bq as rt } from "./nivo-bar.es-CTs3Ptar.js";
3
- import { u as ot, a as ut } from "./useLocalStorageState-rNuPqT1C.js";
1
+ import { am as x, ao as P, b5 as E } from "./nivo-bar.es-CAK_sBtK.js";
2
+ import { bL as Z, aN as j, bN as J, al as Y, bM as _, aX as K, ap as tt, bo as et, ak as at, aE as st, bq as rt } from "./nivo-bar.es-CAK_sBtK.js";
3
+ import { u as ot, a as ut } from "./useLocalStorageState-zVazoLpV.js";
4
4
  import { useState as v, useEffect as g, useContext as $, useRef as I, useCallback as S } from "react";
5
5
  import { c as ct, u as it, a as dt, b as mt } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
6
6
  import "react-router-dom";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-Cz-_XfUi.cjs"),x=require("react"),g=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k="_side-menu-item_o72rm_1",P="_disabled_o72rm_6",f="_hidden_o72rm_10",w="_nav-button_o72rm_13",I="_child_o72rm_21",S="_text_o72rm_26",L="_icon_o72rm_36",T="_collapse-icon_o72rm_42",O="_collapsed_o72rm_52",$="_collapse-icon-mini_o72rm_55",A="_expanded_o72rm_86",K="_children-container_o72rm_92",D="_visible_o72rm_100",F="_children_o72rm_92",z="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:k,disabled:P,hidden:f,"nav-button":"_nav-button_o72rm_13",navButton:w,child:I,text:S,icon:L,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:T,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:$,expanded:A,"children-container":"_children-container_o72rm_92",childrenContainer:K,visible:D,children:F,mobile:z},U=({item:s,menuExpanded:i,useTooltips:l,children:c})=>s.tooltip&&!i&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,B=({item:s,menuExpanded:i,collapsed:l,onCollapse:c,currentPath:_,useHover:r,useTooltips:p,isMobile:E,disableMode:a})=>{var q,y,v,N;const[M,b]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((q=s.children)==null?void 0:q.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>l&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:E},{[n.expanded]:i},{active:M||R},{open:l&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((y=s.children)==null?void 0:y.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsxRuntimeExports.jsx(U,{item:s,menuExpanded:i,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",n.navButton),onClick:()=>{c()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),!r&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",n.collapseIcon,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(g.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",n.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",n.childrenContainer,{[n.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(N=s.children)==null?void 0:N.map(o=>e.jsxRuntimeExports.jsx(g.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",n.navButton,n.child,{[a==="disable"?n.disabled:n.hidden]:o.disabled||o.notPermitted},{[a==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted}),onClick:c,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},W="_side-menu_1q9oh_1",G="_sidebar-header_1q9oh_15",J="_side-menu-content_1q9oh_22",Q="_expand_1q9oh_27",V="_only-logo_1q9oh_31",X="_mobile_1q9oh_34",Y="_divider_1q9oh_49",u={"side-menu":"_side-menu_1q9oh_1",sideMenu:W,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:G,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:J,expand:Q,"only-logo":"_only-logo_1q9oh_31",onlyLogo:V,mobile:X,divider:Y},Z=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:c,secondaryItems:_,expanded:r,setExpanded:p,currentPath:E,useHover:a,useTooltips:M,disableMode:b="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),q=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any"),disabled:t.disabled||h.disabled}))}}),[c,m]),y=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any")}))}}),[_,m]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{r||R(-1)},[r]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:r},{expand:r}),onMouseEnter:()=>a&&p(!0),onMouseLeave:()=>a&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:a}),role:a?void 0:"button",onClick:a?void 0:()=>p(!r),children:a?s:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),r&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&r?l:null,i&&r?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[q.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),y.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title))]})]})},H="_top-bar_lnmq0_1",ee="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:H,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ee},se=({appName:s,leftOffset:i,leftContent:l,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:i?`calc(100% - ${i}px)`:void 0,left:i?`${i}px`:void 0},children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 row g-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsxRuntimeExports.jsx(g.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:c??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:_??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Z;exports.TopBar=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-C2UfrfEW.cjs"),x=require("react"),g=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k="_side-menu-item_o72rm_1",P="_disabled_o72rm_6",f="_hidden_o72rm_10",w="_nav-button_o72rm_13",I="_child_o72rm_21",S="_text_o72rm_26",L="_icon_o72rm_36",T="_collapse-icon_o72rm_42",O="_collapsed_o72rm_52",$="_collapse-icon-mini_o72rm_55",A="_expanded_o72rm_86",K="_children-container_o72rm_92",D="_visible_o72rm_100",F="_children_o72rm_92",z="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:k,disabled:P,hidden:f,"nav-button":"_nav-button_o72rm_13",navButton:w,child:I,text:S,icon:L,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:T,collapsed:O,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:$,expanded:A,"children-container":"_children-container_o72rm_92",childrenContainer:K,visible:D,children:F,mobile:z},U=({item:s,menuExpanded:i,useTooltips:l,children:c})=>s.tooltip&&!i&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,B=({item:s,menuExpanded:i,collapsed:l,onCollapse:c,currentPath:_,useHover:r,useTooltips:p,isMobile:E,disableMode:a})=>{var q,y,v,N;const[M,b]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((q=s.children)==null?void 0:q.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>l&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:E},{[n.expanded]:i},{active:M||R},{open:l&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((y=s.children)==null?void 0:y.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsxRuntimeExports.jsx(U,{item:s,menuExpanded:i,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",n.navButton),onClick:()=>{c()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),!r&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",n.collapseIcon,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(g.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",n.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",n.childrenContainer,{[n.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(N=s.children)==null?void 0:N.map(o=>e.jsxRuntimeExports.jsx(g.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",n.navButton,n.child,{[a==="disable"?n.disabled:n.hidden]:o.disabled||o.notPermitted},{[a==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted}),onClick:c,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},W="_side-menu_1q9oh_1",G="_sidebar-header_1q9oh_15",J="_side-menu-content_1q9oh_22",Q="_expand_1q9oh_27",V="_only-logo_1q9oh_31",X="_mobile_1q9oh_34",Y="_divider_1q9oh_49",u={"side-menu":"_side-menu_1q9oh_1",sideMenu:W,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:G,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:J,expand:Q,"only-logo":"_only-logo_1q9oh_31",onlyLogo:V,mobile:X,divider:Y},Z=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:c,secondaryItems:_,expanded:r,setExpanded:p,currentPath:E,useHover:a,useTooltips:M,disableMode:b="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=e.usePermissions(),q=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any"),disabled:t.disabled||h.disabled}))}}),[c,m]),y=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any")}))}}),[_,m]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{r||R(-1)},[r]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:r},{expand:r}),onMouseEnter:()=>a&&p(!0),onMouseLeave:()=>a&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:a}),role:a?void 0:"button",onClick:a?void 0:()=>p(!r),children:a?s:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),r&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&r?l:null,i&&r?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[q.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),y.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title))]})]})},H="_top-bar_lnmq0_1",ee="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:H,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:ee},se=({appName:s,leftOffset:i,leftContent:l,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:i?`calc(100% - ${i}px)`:void 0,left:i?`${i}px`:void 0},children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 row g-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsxRuntimeExports.jsx(g.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:c??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:_??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=Z;exports.TopBar=se;